Class 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 Detail

      • COLLECTION

        public static final int COLLECTION
        Type of collection objects
        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
      • 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

        @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
      • 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: just 1 << TYPE
        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)
    • 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