|
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<D> net.sf.basedb.core.BasicChildItem<PlatformFileTypeData> net.sf.basedb.core.PlatformFileType
public class PlatformFileType
This class represents a specific DataFileType
that is part of a platform.
Field Summary | |
---|---|
private static QueryRuntimeFilter |
RUNTIME_FILTER
This filter will only return items if the logged in user has generic read permission to platforms. |
static Item |
TYPE
The type of item represented by this class. |
Constructor Summary | |
---|---|
PlatformFileType(PlatformFileTypeData data)
Creates a new member item from the given data. |
Method Summary | |
---|---|
static PlatformFileType |
getById(DbControl dc,
int id)
Get a PlatformFileType object when you know the ID. |
DataFileType |
getDataFileType()
Get the type of the file. |
(package private) static PlatformFileType |
getNew(DbControl dc,
Platform platform,
PlatformVariant variant,
DataFileType fileType,
boolean required)
Create a new item linking a file type to a platform/variant. |
(package private) Item |
getParentType()
Get the type of item that is the parent of this item. |
Platform |
getPlatform()
Get the platform. |
static ItemQuery<PlatformFileType> |
getQuery(Platform platform,
PlatformVariant variant,
boolean restrict)
Get the file types that have been registered for a specific platform and variant. |
Item |
getType()
Get the type of item represented by the object. |
PlatformVariant |
getVariant()
Get the platform variant. |
boolean |
isRequired()
Check if a file of this type is required or not. |
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.PLATFORMFILETYPE
,
getType()
private static final QueryRuntimeFilter RUNTIME_FILTER
Constructor Detail |
---|
PlatformFileType(PlatformFileTypeData data)
data
- the data.Method Detail |
---|
static PlatformFileType getNew(DbControl dc, Platform platform, PlatformVariant variant, DataFileType fileType, boolean required)
dc
- platform
- The platformvariant
- The variant (optional)fileType
- The file typerequired
- If files of this type are required when using the platform or nopublic static PlatformFileType 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<PlatformFileType> getQuery(Platform platform, PlatformVariant variant, boolean restrict)
restrict
parameter is TRUE the query will
be restricted to return fewer items. It works like this:
platform
and
variant
is null
variant
is null, the query will return file
types the platform and all variants if restrict=false
. If
restrict=true
the query will only return items
registered directly with the platform
variant
isn't null, the query will return file
types that have been registered for that variant plus file
types registered with the platform if restrict=false
.
If restrict=true
the query will only return file types
registered for that particular variant.
platform
- A platform object or null to return items for
all platformsvariant
- A platform variant or null to return items for all
variantsrestrict
- Indicates if the query should be restricted to inlcude
fewer items
PlatformFileType
itemspublic Item getType()
Identifiable
Item
enumeration.
Item getParentType()
BasicChildItem
getParentType
in class BasicChildItem<PlatformFileTypeData>
public Platform getPlatform()
public PlatformVariant getVariant()
public DataFileType getDataFileType()
public boolean isRequired()
FileSet
contains all files that have been marked as required
use FileSet.hasAllRequiredFiles()
.
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |