|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.BasicItem<FileSetMemberData> net.sf.basedb.core.FileSetMember
public class FileSetMember
This class represents a file that is member of a file set.
Nested Class Summary | |
---|---|
private static class |
FileSetMember.QueryRuntimeFilterImpl
|
Field Summary | |
---|---|
private static QueryRuntimeFilter |
RUNTIME_FILTER
This filter gives everybody read permission to file set members. |
static Item |
TYPE
The type of item represented by this class. |
Constructor Summary | |
---|---|
FileSetMember(FileSetMemberData data)
Creates a new member item from the given data. |
Method Summary | |
---|---|
static FileSetMember |
getById(DbControl dc,
int id)
Get a FileSetMember object when you know the ID. |
DataFileType |
getDataFileType()
Get the type of the file. |
String |
getErrorMessage()
Get the error message if the validation failed. |
File |
getFile()
Get the file this item is representing in the file set. |
FileSet |
getFileSet()
Get the file set the file is a member of. |
(package private) static FileSetMember |
getNew(DbControl dc,
FileSet fileSet,
File file,
DataFileType type)
Create a new member in a file set. |
(package private) PluginPermission |
getPluginPermissions()
|
static ItemQuery<FileSetMember> |
getQuery(FileSet fileSet)
Get a query configured to retrieve FileSetMember items. |
Item |
getType()
Get the type of item represented by the object. |
(package private) void |
initPermissions(int granted,
int denied)
READ permission is granted to all users. |
boolean |
isPlatformFile()
Checks if this file is part of the platform/variant the parent item belongs to. |
Boolean |
isValid()
Check if the file has been validated and if it passed or not. |
void |
setValid(Boolean valid,
String errorMessage)
Set the validation status of this member. |
Methods inherited from class net.sf.basedb.core.BasicItem |
---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getSessionControl, getUsingItems, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, onAfterCommit, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, toTransferable, validate |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Item TYPE
Item.FILESETMEMBER
,
getType()
private static final QueryRuntimeFilter RUNTIME_FILTER
Constructor Detail |
---|
FileSetMember(FileSetMemberData data)
data
- the data.Method Detail |
---|
static FileSetMember getNew(DbControl dc, FileSet fileSet, File file, DataFileType type)
FileSet.setMember(File, DataFileType)
public static FileSetMember getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
FileSetMember
object when you know the ID.
dc
- The DbControl
which will be used for
permission checking and database access.id
- The ID of the item to load
FileSetMember
item
ItemNotFoundException
- If an item with the specified ID is not found
PermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission to the items
BaseException
- If there is another errorpublic static ItemQuery<FileSetMember> getQuery(FileSet fileSet) throws BaseException
FileSetMember
items.
fileSet
- The file set to get members for, null is not allowed
ItemQuery
object
InvalidUseOfNullException
- If required argument is null.
BaseException
- If there is another error.public Item getType()
Identifiable
Item
enumeration.
void initPermissions(int granted, int denied) throws BaseException
initPermissions
in class BasicItem<FileSetMemberData>
granted
- Permissions that have been granted by the subclassdenied
- Permissions that have been denied by the subclass
BaseException
- If the permissions couldn't be initialisedPluginPermission getPluginPermissions()
getPluginPermissions
in class BasicItem<FileSetMemberData>
public FileSet getFileSet()
public File getFile()
public DataFileType getDataFileType()
public Boolean isValid()
public void setValid(Boolean valid, String errorMessage)
valid
- If the member file is valid or not, use null to
indicate that no validation has been performederrorMessage
- The error message if the validation failespublic String getErrorMessage()
public boolean isPlatformFile()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |