public class ItemSubtypeFileType extends BasicChildItem<ItemSubtypeFileTypeData> implements UsableDataFileType
DataFileType
that is associated with an item subtype.Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ItemSubtypeFileType(ItemSubtypeFileTypeData data)
Creates a new member item from the given data.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getPermissionForWriteDeleteAndCreate, getPluginPermissions, initPermissions
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
public static final Item TYPE
Item.ITEMSUBTYPEFILETYPE
,
getType()
private static final QueryRuntimeFilter RUNTIME_FILTER
ItemSubtypeFileType(ItemSubtypeFileTypeData data)
data
- the data.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 loadPlatformFileType
itemItemNotFoundException
- If an item with the specified ID is not foundPermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission to the itemBaseException
- If there is another errorpublic static ItemQuery<ItemSubtypeFileType> getQuery(ItemSubtype subtype)
subtype
- An item subtype object or null to return items for
all platformsItemSubtypeFileType
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)