|
3.2.4: 2013-12-06 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.core.BasicItem<D>
net.sf.basedb.core.BasicChildItem<ItemSubtypeFileTypeData>
net.sf.basedb.core.ItemSubtypeFileType
public class ItemSubtypeFileType
This class represents a specific DataFileType
that is associated with an item subtype.
Field Summary | |
---|---|
private static QueryRuntimeFilter |
RUNTIME_FILTER
This filter will only return items if the logged in user has generic read permission to item subtypes. |
static Item |
TYPE
The type of item represented by this class. |
Constructor Summary | |
---|---|
ItemSubtypeFileType(ItemSubtypeFileTypeData data)
Creates a new member item from the given data. |
Method Summary | |
---|---|
boolean |
getAllowMultiple()
Check if more than one file of this type is allowed in a file set or not. |
static ItemSubtypeFileType |
getById(DbControl dc,
int id)
Get a PlatformFileType object when you know the ID. |
DataFileType |
getDataFileType()
Get the type of the file. |
ItemSubtype |
getItemSubtype()
Get the item subtype. |
(package private) static ItemSubtypeFileType |
getNew(DbControl dc,
ItemSubtype subtype,
DataFileType fileType)
Create a new item linking a file type to an item subtype. |
(package private) Item |
getParentType()
Get the type of item that is the parent of this item. |
static ItemQuery<ItemSubtypeFileType> |
getQuery(ItemSubtype subtype)
Get the file types that have been registered for a specific item subtype. |
Item |
getType()
Get the type of item represented by the object. |
boolean |
isRequired()
Check if a file of this type is required or not. |
void |
setAllowMultiple(boolean multiple)
Allow or disallow multiple files of this file type in a file set. |
void |
setRequired(boolean required)
Set the required flag for this file type. |
Methods inherited from class net.sf.basedb.core.BasicChildItem |
---|
getPermissionForWriteDeleteAndCreate, getPluginPermissions, initPermissions |
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.ITEMSUBTYPEFILETYPE
,
getType()
private static final QueryRuntimeFilter RUNTIME_FILTER
Constructor Detail |
---|
ItemSubtypeFileType(ItemSubtypeFileTypeData data)
data
- the data.Method Detail |
---|
static ItemSubtypeFileType getNew(DbControl dc, ItemSubtype subtype, DataFileType fileType)
dc
- subtype
- The item subtypefileType
- The file typepublic static ItemSubtypeFileType getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
PlatformFileType
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
PlatformFileType
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 item
BaseException
- If there is another errorpublic static ItemQuery<ItemSubtypeFileType> getQuery(ItemSubtype subtype)
subtype
- An item subtype object or null to return items for
all platforms
ItemSubtypeFileType
itemspublic Item getType()
Identifiable
Item
enumeration.
getType
in interface Identifiable
Item getParentType()
BasicChildItem
getParentType
in class BasicChildItem<ItemSubtypeFileTypeData>
public ItemSubtype getItemSubtype()
public DataFileType getDataFileType()
getDataFileType
in interface UsableDataFileType
public boolean isRequired()
FileSet
contains all files that have been marked as required
use FileSet.hasAllRequiredFiles()
.
isRequired
in interface UsableDataFileType
public void setRequired(boolean required)
public boolean getAllowMultiple()
getAllowMultiple
in interface UsableDataFileType
public void setAllowMultiple(boolean multiple)
|
3.2.4: 2013-12-06 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |