org.dspace.core
Class Constants

java.lang.Object
  extended by 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: 4309 $
Author:
David Stuve

Field Summary
static String[] actionText
          lets you look up action names from the action IDs
static 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
static int ADD
          Action of adding something to a container.
static int ADMIN
          Administrative actions - System Admin, Community Admin, Collection Admin
static int BITSTREAM
          Type of bitstream objects
static int BUNDLE
          Type of bundle objects
static int COLLECTION
          Type of collection objects
static int COLLECTION_ADMIN
          Deprecated. As of DSpace 1.6, replaced by Constants.ADMIN
static int COMMUNITY
          Type of community objects
static String CONTENT_BUNDLE_NAME
          Name of bundle for user-visible "content" (same as default for now).
static int DEFAULT_BITSTREAM_READ
          Default Read policies for Bitstreams submitted to container
static String DEFAULT_BUNDLE_NAME
          Default bundle name for the "original" item content; "derived" content such as thumbnails goes in other bundles.
static String DEFAULT_ENCODING
           
static int DEFAULT_ITEM_READ
          Default Read policies for Items submitted to container
static int DELETE
          Action of deleting something.
static int EPERSON
          Type of individual eperson objects
static int GROUP
          Type of eperson groups
static int ITEM
          Type of item objects
static String LICENSE_BITSTREAM_NAME
          Magic name of item license, as bitstream in LICENSE_BUNDLE_NAME
static String LICENSE_BUNDLE_NAME
          Magic name of bundle containing item license
static String METADATA_BUNDLE_NAME
          Bundle name for structured metadata bitstreams.
static int NEWS_SIDE
          Position of front page news item -- sidebar
static int NEWS_TOP
          Position of front page news item -- top box
static int RBITSTREAM
          constants for the relevance array generating dynamicallis is simple: just 1 < < TYPE
static int RBUNDLE
           
static int RCOLLECTION
           
static int RCOMMUNITY
           
static int READ
          Action of reading, viewing or downloading something
static int REMOVE
          Action of removing something from a container.
static int RITEM
           
static int SITE
          DSpace site type
static String[] typeText
          lets you look up type names from the type IDs
static int WORKFLOW_ABORT
          Action of performing a workflow
static int WORKFLOW_STEP_1
          Action of performing workflow step 1
static int WORKFLOW_STEP_2
          Action of performing workflow step 2
static int WORKFLOW_STEP_3
          Action of performing workflow step 3
static int WRITE
          Action of modifying something
 
Constructor Summary
Constants()
           
 
Method Summary
static int getActionID(String action)
          If you know the action string, look up the corresponding type ID constant.
static int getTypeID(String type)
          If you know the type string, look up the corresponding type ID constant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 have ADD permission 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

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

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
constants for the relevance array generating dynamicallis is simple: just 1 < < 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
Constructor Detail

Constants

public Constants()
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 -1 if 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 -1 if the action string is unknown


Copyright © 2010 DuraSpace. All Rights Reserved.