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 final String[]
    lets you look up action names from the action IDs
    static 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 int
    Action of adding something to a container.
    static final int
    Administrative actions - System Admin, Community Admin, Collection Admin
    static final int
    Type of bitstream objects
    static final int
    Type of bundle objects
    static final int
    Type of collection objects
    static final int
    Deprecated.
    As of DSpace 1.6, replaced by Constants.ADMIN
    static final int
    Type of community objects
    static final String
    Name of bundle for user-visible "content" (same as default for now).
    static final int
    Default Read policies for Bitstreams submitted to container
    static final String
    Default bundle name for the "original" item content; "derived" content such as thumbnails goes in other bundles.
    static final String
     
    static final int
    Default Read policies for Items submitted to container
    static final int
    Action of deleting something.
    static final String
     
    static final int
    Type of individual eperson objects
    static final int
    Type of eperson groups
    static final int
    Type of item objects
    static final int
    Type of LDN MESSAGE objects
    static final String
    Magic name of item license, as bitstream in LICENSE_BUNDLE_NAME
    static final String
    Magic name of bundle containing item license
    static final String
    Bundle name for structured metadata bitstreams.
    static final int
    Position of front page news item -- sidebar
    static final int
    Position of front page news item -- top box
    static final int
    generating constants for the relevance array dynamically is simple: just 1 << TYPE
    static final int
     
    static final int
     
    static final int
     
    static final int
    Action of reading, viewing or downloading something
    static final int
    Action of removing something from a container.
    static final int
     
    static final int
    DSpace site type
    static final String[]
    lets you look up type names from the type IDs
    static final String
     
    static final int
     
    static final int
    Action of performing a workflow
    static final int
    Action of performing workflow step 1
    static final int
    Action of performing workflow step 2
    static final int
    Action of performing workflow step 3
    static final int
    Action of modifying something
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    If you know the action string, look up the corresponding type ID constant.
    static int
    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 Details

    • BITSTREAM

      public static final int BITSTREAM
      Type of bitstream objects
      See Also:
    • BUNDLE

      public static final int BUNDLE
      Type of bundle objects
      See Also:
    • ITEM

      public static final int ITEM
      Type of item objects
      See Also:
    • COLLECTION

      public static final int COLLECTION
      Type of collection objects
      See Also:
    • COMMUNITY

      public static final int COMMUNITY
      Type of community objects
      See Also:
    • SITE

      public static final int SITE
      DSpace site type
      See Also:
    • GROUP

      public static final int GROUP
      Type of eperson groups
      See Also:
    • EPERSON

      public static final int EPERSON
      Type of individual eperson objects
      See Also:
    • LDN_MESSAGE

      public static final int LDN_MESSAGE
      Type of LDN MESSAGE objects
      See Also:
    • 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:
    • LICENSE_BUNDLE_NAME

      public static final String LICENSE_BUNDLE_NAME
      Magic name of bundle containing item license
      See Also:
    • 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:
    • CONTENT_BUNDLE_NAME

      public static final String CONTENT_BUNDLE_NAME
      Name of bundle for user-visible "content" (same as default for now).
      See Also:
    • METADATA_BUNDLE_NAME

      public static final String METADATA_BUNDLE_NAME
      Bundle name for structured metadata bitstreams.
      See Also:
    • READ

      public static final int READ
      Action of reading, viewing or downloading something
      See Also:
    • WRITE

      public static final int WRITE
      Action of modifying something
      See Also:
    • DELETE

      public static final int DELETE
      Action of deleting something. Different from removing something from a container. (DELETE is now obsolete)
      See Also:
    • 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:
    • REMOVE

      public static final int REMOVE
      Action of removing something from a container. Different from deletion.
      See Also:
    • WORKFLOW_STEP_1

      public static final int WORKFLOW_STEP_1
      Action of performing workflow step 1
      See Also:
    • WORKFLOW_STEP_2

      public static final int WORKFLOW_STEP_2
      Action of performing workflow step 2
      See Also:
    • WORKFLOW_STEP_3

      public static final int WORKFLOW_STEP_3
      Action of performing workflow step 3
      See Also:
    • WORKFLOW_ABORT

      public static final int WORKFLOW_ABORT
      Action of performing a workflow
      See Also:
    • DEFAULT_BITSTREAM_READ

      public static final int DEFAULT_BITSTREAM_READ
      Default Read policies for Bitstreams submitted to container
      See Also:
    • DEFAULT_ITEM_READ

      public static final int DEFAULT_ITEM_READ
      Default Read policies for Items submitted to container
      See Also:
    • COLLECTION_ADMIN

      @Deprecated public static final int COLLECTION_ADMIN
      Deprecated.
      As of DSpace 1.6, replaced by Constants.ADMIN
      See Also:
    • ADMIN

      public static final int ADMIN
      Administrative 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_TOP
      Position of front page news item -- top box
      See Also:
    • NEWS_SIDE

      public static final int NEWS_SIDE
      Position of front page news item -- sidebar
      See Also:
    • 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:
    • 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[] 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:
    • VIRTUAL_AUTHORITY_PREFIX

      public static final String VIRTUAL_AUTHORITY_PREFIX
      See Also:
    • ENTITY_TYPE_NONE

      public static final String ENTITY_TYPE_NONE
      See Also:
  • Method Details

    • 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