Package org.dspace.core
Class Constants
- java.lang.Object
-
- org.dspace.core.Constants
-
public class Constants extends Object
Class with constants and matching strings, for DSpace types. These numbers must never be changed!!- Version:
- $Revision$
- Author:
- David Stuve
-
-
Field Summary
Fields Modifier and Type Field Description static String[]actionTextlets you look up action names from the action IDsstatic 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)static intADDAction of adding something to a container.static intADMINAdministrative actions - System Admin, Community Admin, Collection Adminstatic intBITSTREAMType of bitstream objectsstatic intBUNDLEType of bundle objectsstatic intCOLLECTIONType of collection objectsstatic intCOLLECTION_ADMINDeprecated.As of DSpace 1.6, replaced by Constants.ADMINstatic intCOMMUNITYType of community objectsstatic StringCONTENT_BUNDLE_NAMEName of bundle for user-visible "content" (same as default for now).static intDEFAULT_BITSTREAM_READDefault Read policies for Bitstreams submitted to containerstatic StringDEFAULT_BUNDLE_NAMEDefault bundle name for the "original" item content; "derived" content such as thumbnails goes in other bundles.static StringDEFAULT_ENCODINGstatic intDEFAULT_ITEM_READDefault Read policies for Items submitted to containerstatic intDELETEAction of deleting something.static StringENTITY_TYPE_NONEstatic intEPERSONType of individual eperson objectsstatic intGROUPType of eperson groupsstatic intITEMType of item objectsstatic StringLICENSE_BITSTREAM_NAMEMagic name of item license, as bitstream in LICENSE_BUNDLE_NAMEstatic StringLICENSE_BUNDLE_NAMEMagic name of bundle containing item licensestatic StringMETADATA_BUNDLE_NAMEBundle name for structured metadata bitstreams.static intNEWS_SIDEPosition of front page news item -- sidebarstatic intNEWS_TOPPosition of front page news item -- top boxstatic intRBITSTREAMgenerating constants for the relevance array dynamically is simple: just1 << TYPEstatic intRBUNDLEstatic intRCOLLECTIONstatic intRCOMMUNITYstatic intREADAction of reading, viewing or downloading somethingstatic intREMOVEAction of removing something from a container.static intRITEMstatic intSITEDSpace site typestatic String[]typeTextlets you look up type names from the type IDsstatic StringVIRTUAL_AUTHORITY_PREFIXstatic intWITHDRAWN_READstatic intWORKFLOW_ABORTAction of performing a workflowstatic intWORKFLOW_STEP_1Action of performing workflow step 1static intWORKFLOW_STEP_2Action of performing workflow step 2static intWORKFLOW_STEP_3Action of performing workflow step 3static intWRITEAction of modifying something
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetActionID(String action)If you know the action string, look up the corresponding type ID constant.static intgetTypeID(String type)If you know the type string, look up the corresponding type ID constant.
-
-
-
Field Detail
-
BITSTREAM
public static final int BITSTREAM
Type of bitstream objects- See Also:
- Constant Field Values
-
BUNDLE
public static final int BUNDLE
Type of bundle objects- See Also:
- Constant Field Values
-
ITEM
public static final int ITEM
Type of item objects- See Also:
- Constant Field Values
-
COLLECTION
public static final int COLLECTION
Type of collection objects- See Also:
- Constant Field Values
-
COMMUNITY
public static final int COMMUNITY
Type of community objects- See Also:
- Constant Field Values
-
SITE
public static final int SITE
DSpace site type- See Also:
- Constant Field Values
-
GROUP
public static final int GROUP
Type of eperson groups- See Also:
- Constant Field Values
-
EPERSON
public static final int EPERSON
Type of individual eperson objects- See Also:
- Constant Field Values
-
typeText
public static final String[] typeText
lets you look up type names from the type IDs
-
LICENSE_BITSTREAM_NAME
public static final String LICENSE_BITSTREAM_NAME
Magic name of item license, as bitstream in LICENSE_BUNDLE_NAME- See Also:
- Constant Field Values
-
LICENSE_BUNDLE_NAME
public static final String LICENSE_BUNDLE_NAME
Magic name of bundle containing item license- See Also:
- Constant Field Values
-
DEFAULT_BUNDLE_NAME
public static final String DEFAULT_BUNDLE_NAME
Default bundle name for the "original" item content; "derived" content such as thumbnails goes in other bundles.- See Also:
- Constant Field Values
-
CONTENT_BUNDLE_NAME
public static final String CONTENT_BUNDLE_NAME
Name of bundle for user-visible "content" (same as default for now).- See Also:
- Constant Field Values
-
METADATA_BUNDLE_NAME
public static final String METADATA_BUNDLE_NAME
Bundle name for structured metadata bitstreams.- See Also:
- Constant Field Values
-
READ
public static final int READ
Action of reading, viewing or downloading something- See Also:
- Constant Field Values
-
WRITE
public static final int WRITE
Action of modifying something- See Also:
- Constant Field Values
-
DELETE
public static final int DELETE
Action of deleting something. Different from removing something from a container. (DELETE is now obsolete)- See Also:
REMOVE, Constant Field Values
-
ADD
public static final int ADD
Action of adding something to a container. For example, to add an item to a collection, a user must haveADDpermission on the collection.- See Also:
- Constant Field Values
-
REMOVE
public static final int REMOVE
Action of removing something from a container. Different from deletion.- See Also:
DELETE, Constant Field Values
-
WORKFLOW_STEP_1
public static final int WORKFLOW_STEP_1
Action of performing workflow step 1- See Also:
- Constant Field Values
-
WORKFLOW_STEP_2
public static final int WORKFLOW_STEP_2
Action of performing workflow step 2- See Also:
- Constant Field Values
-
WORKFLOW_STEP_3
public static final int WORKFLOW_STEP_3
Action of performing workflow step 3- See Also:
- Constant Field Values
-
WORKFLOW_ABORT
public static final int WORKFLOW_ABORT
Action of performing a workflow- See Also:
- Constant Field Values
-
DEFAULT_BITSTREAM_READ
public static final int DEFAULT_BITSTREAM_READ
Default Read policies for Bitstreams submitted to container- See Also:
- Constant Field Values
-
DEFAULT_ITEM_READ
public static final int DEFAULT_ITEM_READ
Default Read policies for Items submitted to container- See Also:
- Constant Field Values
-
COLLECTION_ADMIN
@Deprecated public static final int COLLECTION_ADMIN
Deprecated.As of DSpace 1.6, replaced by Constants.ADMIN- See Also:
- Constant Field Values
-
ADMIN
public static final int ADMIN
Administrative actions - System Admin, Community Admin, Collection Admin- See Also:
- Constant Field Values
-
WITHDRAWN_READ
public static final int WITHDRAWN_READ
- See Also:
- Constant Field Values
-
NEWS_TOP
public static final int NEWS_TOP
Position of front page news item -- top box- See Also:
- Constant Field Values
-
NEWS_SIDE
public static final int NEWS_SIDE
Position of front page news item -- sidebar- See Also:
- Constant Field Values
-
actionText
public static final String[] actionText
lets you look up action names from the action IDs
-
RBITSTREAM
public static final int RBITSTREAM
generating constants for the relevance array dynamically is simple: just1 << TYPE- See Also:
- Constant Field Values
-
RBUNDLE
public static final int RBUNDLE
- See Also:
- Constant Field Values
-
RITEM
public static final int RITEM
- See Also:
- Constant Field Values
-
RCOLLECTION
public static final int RCOLLECTION
- See Also:
- Constant Field Values
-
RCOMMUNITY
public static final int RCOMMUNITY
- See Also:
- Constant Field Values
-
actionTypeRelevance
public static final int[] actionTypeRelevance
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)
-
DEFAULT_ENCODING
public static final String DEFAULT_ENCODING
- See Also:
- Constant Field Values
-
VIRTUAL_AUTHORITY_PREFIX
public static final String VIRTUAL_AUTHORITY_PREFIX
- See Also:
- Constant Field Values
-
ENTITY_TYPE_NONE
public static final String ENTITY_TYPE_NONE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTypeID
public static int getTypeID(String type)
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
public static int getActionID(String action)
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
-
-