Package org.dspace.core
Class Constants
java.lang.Object
org.dspace.core.Constants
Class with constants and matching strings, for DSpace types. These numbers
must never be changed!!
- Version:
- $Revision$
- Author:
- David Stuve
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]lets you look up action names from the action IDsstatic final int[]Array of relevances of actions to objects - used by the UI to only display actions that are relevant to an object type; To see if an action is relevant to an object, just OR the relevance type above with the value in actionTypeRelevance[] (To see if READ is relevant to community, just test actionTypeRelevance[READ] | RCOMMUNITY, 0 = irrelevant)static final intAction of adding something to a container.static final intAdministrative actions - System Admin, Community Admin, Collection Adminstatic final intType of bitstream objectsstatic final intType of bundle objectsstatic final intType of collection objectsstatic final intDeprecated.As of DSpace 1.6, replaced by Constants.ADMINstatic final intType of community objectsstatic final StringName of bundle for user-visible "content" (same as default for now).static final intDefault Read policies for Bitstreams submitted to containerstatic final StringDefault bundle name for the "original" item content; "derived" content such as thumbnails goes in other bundles.static final Stringstatic final intDefault Read policies for Items submitted to containerstatic final intAction of deleting something.static final Stringstatic final intType of individual eperson objectsstatic final intType of eperson groupsstatic final intType of item objectsstatic final intType of LDN MESSAGE objectsstatic final StringMagic name of item license, as bitstream in LICENSE_BUNDLE_NAMEstatic final StringMagic name of bundle containing item licensestatic final StringBundle name for structured metadata bitstreams.static final intPosition of front page news item -- sidebarstatic final intPosition of front page news item -- top boxstatic final intgenerating constants for the relevance array dynamically is simple: just1 << TYPEstatic final intstatic final intstatic final intstatic final intAction of reading, viewing or downloading somethingstatic final intAction of removing something from a container.static final intstatic final intDSpace site typestatic final String[]lets you look up type names from the type IDsstatic final Stringstatic final intstatic final intAction of performing a workflowstatic final intAction of performing workflow step 1static final intAction of performing workflow step 2static final intAction of performing workflow step 3static final intAction of modifying something -
Method Summary
Modifier and TypeMethodDescriptionstatic intgetActionID(String action) If you know the action string, look up the corresponding type ID constant.static intIf you know the type string, look up the corresponding type ID constant.
-
Field Details
-
BITSTREAM
public static final int BITSTREAMType of bitstream objects- See Also:
-
BUNDLE
public static final int BUNDLEType of bundle objects- See Also:
-
ITEM
public static final int ITEMType of item objects- See Also:
-
COLLECTION
public static final int COLLECTIONType of collection objects- See Also:
-
COMMUNITY
public static final int COMMUNITYType of community objects- See Also:
-
SITE
public static final int SITEDSpace site type- See Also:
-
GROUP
public static final int GROUPType of eperson groups- See Also:
-
EPERSON
public static final int EPERSONType of individual eperson objects- See Also:
-
LDN_MESSAGE
public static final int LDN_MESSAGEType of LDN MESSAGE objects- See Also:
-
typeText
lets you look up type names from the type IDs -
LICENSE_BITSTREAM_NAME
Magic name of item license, as bitstream in LICENSE_BUNDLE_NAME- See Also:
-
LICENSE_BUNDLE_NAME
Magic name of bundle containing item license- See Also:
-
DEFAULT_BUNDLE_NAME
Default bundle name for the "original" item content; "derived" content such as thumbnails goes in other bundles.- See Also:
-
CONTENT_BUNDLE_NAME
Name of bundle for user-visible "content" (same as default for now).- See Also:
-
METADATA_BUNDLE_NAME
Bundle name for structured metadata bitstreams.- See Also:
-
READ
public static final int READAction of reading, viewing or downloading something- See Also:
-
WRITE
public static final int WRITEAction of modifying something- See Also:
-
DELETE
public static final int DELETEAction of deleting something. Different from removing something from a container. (DELETE is now obsolete)- See Also:
-
ADD
public static final int ADDAction of adding something to a container. For example, to add an item to a collection, a user must haveADDpermission on the collection.- See Also:
-
REMOVE
public static final int REMOVEAction of removing something from a container. Different from deletion.- See Also:
-
WORKFLOW_STEP_1
public static final int WORKFLOW_STEP_1Action of performing workflow step 1- See Also:
-
WORKFLOW_STEP_2
public static final int WORKFLOW_STEP_2Action of performing workflow step 2- See Also:
-
WORKFLOW_STEP_3
public static final int WORKFLOW_STEP_3Action of performing workflow step 3- See Also:
-
WORKFLOW_ABORT
public static final int WORKFLOW_ABORTAction of performing a workflow- See Also:
-
DEFAULT_BITSTREAM_READ
public static final int DEFAULT_BITSTREAM_READDefault Read policies for Bitstreams submitted to container- See Also:
-
DEFAULT_ITEM_READ
public static final int DEFAULT_ITEM_READDefault Read policies for Items submitted to container- See Also:
-
COLLECTION_ADMIN
Deprecated.As of DSpace 1.6, replaced by Constants.ADMIN- See Also:
-
ADMIN
public static final int ADMINAdministrative actions - System Admin, Community Admin, Collection Admin- See Also:
-
WITHDRAWN_READ
public static final int WITHDRAWN_READ- See Also:
-
NEWS_TOP
public static final int NEWS_TOPPosition of front page news item -- top box- See Also:
-
NEWS_SIDE
public static final int NEWS_SIDEPosition of front page news item -- sidebar- See Also:
-
actionText
lets you look up action names from the action IDs -
RBITSTREAM
public static final int RBITSTREAMgenerating constants for the relevance array dynamically is simple: just1 << TYPE- See Also:
-
RBUNDLE
public static final int RBUNDLE- See Also:
-
RITEM
public static final int RITEM- See Also:
-
RCOLLECTION
public static final int RCOLLECTION- See Also:
-
RCOMMUNITY
public static final int RCOMMUNITY- See Also:
-
actionTypeRelevance
public static final int[] actionTypeRelevanceArray of relevances of actions to objects - used by the UI to only display actions that are relevant to an object type; To see if an action is relevant to an object, just OR the relevance type above with the value in actionTypeRelevance[] (To see if READ is relevant to community, just test actionTypeRelevance[READ] | RCOMMUNITY, 0 = irrelevant) -
DEFAULT_ENCODING
- See Also:
-
VIRTUAL_AUTHORITY_PREFIX
- See Also:
-
ENTITY_TYPE_NONE
- See Also:
-
-
Method Details
-
getTypeID
If you know the type string, look up the corresponding type ID constant.- Parameters:
type- String with the name of the type (must be exact match)- Returns:
- the corresponding type ID, or
-1if the type string is unknown
-
getActionID
If you know the action string, look up the corresponding type ID constant.- Parameters:
action- String with the name of the action (must be exact match)- Returns:
- the corresponding action ID, or
-1if the action string is unknown
-