Novell exteNd
Director 5.2 API

com.sssw.cm.util
Class EboDocPropUtil

java.lang.Object
 |
 +--com.sssw.cm.util.EboDocPropUtil

public class EboDocPropUtil
extends Object

This class contains utility methods for managing information about the available standard Document Metadata properties (doc ID, author, etc.)


Field Summary
static String AUTHOR
          The author property
static String CONTENTSIZE
          The document published content size property
static String CREATED
          The creation date/time property
static String DOCABSTRACT
          The document abstract property
static String DOCID
          The Document ID property.
static String DOCNAME
          The document name property
static String DOCTYPEID
          The document type ID property
static String DOCTYPENAME
          The document type name property
static String ENCODING
          The document published content ENCODING property
static String EXPIRATIONDATE
          The expiration date/time property
static String FOLDERID
          The folder ID property
static int IDX_AUTHOR
          The index of the author property
static int IDX_CONTENTSIZE
          The index of the document published content size property
static int IDX_CREATED
          The index of the creation date/time property
static int IDX_DOCABSTRACT
          The index of the document abstract property
static int IDX_DOCID
          The index of the document ID property
static int IDX_DOCNAME
          The index of the document name property
static int IDX_DOCTYPEID
          The index of the document type ID property
static int IDX_DOCTYPENAME
          The index of the document type name property
static int IDX_ENCODING
          The index of the document published content ENCODING property
static int IDX_EXPIRATIONDATE
          The index of the expiration date/time property
static int IDX_FOLDERID
          The index of the folder ID property
static int IDX_LOCKEDBY
          The index of the 'locked by' property.
static int IDX_MIMETYPE
          The index of the document published content MIME type property
static int IDX_ORIGINATOR
          The index of the document originator property
static int IDX_PARENTDOCID
          The index of the parent document ID property
static int IDX_PUBLISHDATE
          The index of the publish date/time property
static int IDX_PUBLISHSTATUS
          The index of the document publish status property
static int IDX_REPOSITORYID
          The index of the repository ID property
static int IDX_STATUS
          The index of the status property
static int IDX_SUBTITLE
          The index of the subtitle property
static int IDX_TITLE
          The index of the title property
static int IDX_UPDATETIME
          The index of the update time property
static int IDX_UPDATEUSER
          The update user property index
static String LOCKEDBY
          The 'locked by' property.
static String MIMETYPE
          The document published content MIME type property
static String ORIGINATOR
          The document originator property
static String PARENTDOCID
          The parent document ID property
static String PUBLISHDATE
          The publish date/time property
static String PUBLISHSTATUS
          The document publish status property
static String REPOSITORYID
          The repository ID property
static int SORT_BY_PROP_DISPLAY_NAME
          Sort mode of "sort by property display name".
static int SORT_BY_PROP_INDEX
          Sort mode of "sort by property index".
static int SORT_BY_PROP_NAME
          Sort mode of "sort by property name".
static int SORT_BY_PROP_TYPE
          Sort mode of "sort by property type".
static String STATUS
          The status property
static String SUBTITLE
          The subtitle property
static String TITLE
          The title property
static String UPDATETIME
          The update time property.
static String UPDATEUSER
          The update user property
 
Constructor Summary
EboDocPropUtil()
           
 
Method Summary
static Object getDocPropValue(EbiDocument doc, String propName)
          Given an EbiDocument object and a property name, extracts the value of that property from the object.
static Collection getOperators(int index, Locale locale, int sortBy)
          Enumerates the operators that are applicable for a given property.
static Collection getOperators(String propName, Locale locale, int sortBy)
          Enumerates the operators that are applicable for a given property.
static int getPropertyCount()
          Gets the number of available standard document properties.
static EbiDocPropDescriptor getPropertyDescriptor(int index, Locale locale)
          Given the index of a property, returns its Document Property Descriptor.
static Collection getPropertyDescriptors(Locale locale)
          Enumerates all the document properties, returning a collection of EbiDocPropDescriptor's.
static Collection getPropertyDescriptors(Locale locale, int sortBy)
          Enumerates all the document properties, returning a collection of EbiDocPropDescriptor's, in a sorted fashion
static String getPropertyDisplayName(int index, Locale locale)
          Given the index of a property, gets its user-friendly, displayable name
static int getPropertyIndex(String propName)
          Given a property name, returns its index
static int[] getPropertyIndices(String[] docProps)
          Given a set of property names, returns their corresponding indices
static String getPropertyName(int index)
          Given the index of the property, gets its name
static boolean isIntegerProperty(String propName)
          Tells whether the property whose name is passed in, is an integer property (i.e.
static boolean isMandatoryProperty(int index)
          Tells whether the property whose index is passed in, is mandatory (i.e.
static boolean isStringProperty(String propName)
          Tells whether the property whose name is passed in, is a string property (i.e.
static boolean isTimestampProperty(String propName)
          Tells whether the property whose name is passed in, is a timestamp property (i.e.
static boolean isValidProperty(int index)
          Given the index of the property, checks to see if the specified property is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOCID

public static final String DOCID
The Document ID property.

IDX_DOCID

public static final int IDX_DOCID
The index of the document ID property

DOCNAME

public static final String DOCNAME
The document name property

IDX_DOCNAME

public static final int IDX_DOCNAME
The index of the document name property

DOCTYPEID

public static final String DOCTYPEID
The document type ID property

IDX_DOCTYPEID

public static final int IDX_DOCTYPEID
The index of the document type ID property

FOLDERID

public static final String FOLDERID
The folder ID property

IDX_FOLDERID

public static final int IDX_FOLDERID
The index of the folder ID property

AUTHOR

public static final String AUTHOR
The author property

IDX_AUTHOR

public static final int IDX_AUTHOR
The index of the author property

CREATED

public static final String CREATED
The creation date/time property

IDX_CREATED

public static final int IDX_CREATED
The index of the creation date/time property

TITLE

public static final String TITLE
The title property

IDX_TITLE

public static final int IDX_TITLE
The index of the title property

SUBTITLE

public static final String SUBTITLE
The subtitle property

IDX_SUBTITLE

public static final int IDX_SUBTITLE
The index of the subtitle property

DOCABSTRACT

public static final String DOCABSTRACT
The document abstract property

IDX_DOCABSTRACT

public static final int IDX_DOCABSTRACT
The index of the document abstract property

PUBLISHDATE

public static final String PUBLISHDATE
The publish date/time property

IDX_PUBLISHDATE

public static final int IDX_PUBLISHDATE
The index of the publish date/time property

EXPIRATIONDATE

public static final String EXPIRATIONDATE
The expiration date/time property

IDX_EXPIRATIONDATE

public static final int IDX_EXPIRATIONDATE
The index of the expiration date/time property

LOCKEDBY

public static final String LOCKEDBY
The 'locked by' property.

IDX_LOCKEDBY

public static final int IDX_LOCKEDBY
The index of the 'locked by' property.

STATUS

public static final String STATUS
The status property

IDX_STATUS

public static final int IDX_STATUS
The index of the status property

PARENTDOCID

public static final String PARENTDOCID
The parent document ID property

IDX_PARENTDOCID

public static final int IDX_PARENTDOCID
The index of the parent document ID property

REPOSITORYID

public static final String REPOSITORYID
The repository ID property

IDX_REPOSITORYID

public static final int IDX_REPOSITORYID
The index of the repository ID property

UPDATETIME

public static final String UPDATETIME
The update time property.

IDX_UPDATETIME

public static final int IDX_UPDATETIME
The index of the update time property

UPDATEUSER

public static final String UPDATEUSER
The update user property

IDX_UPDATEUSER

public static final int IDX_UPDATEUSER
The update user property index

PUBLISHSTATUS

public static final String PUBLISHSTATUS
The document publish status property

IDX_PUBLISHSTATUS

public static final int IDX_PUBLISHSTATUS
The index of the document publish status property

ORIGINATOR

public static final String ORIGINATOR
The document originator property

IDX_ORIGINATOR

public static final int IDX_ORIGINATOR
The index of the document originator property

DOCTYPENAME

public static final String DOCTYPENAME
The document type name property

IDX_DOCTYPENAME

public static final int IDX_DOCTYPENAME
The index of the document type name property

CONTENTSIZE

public static final String CONTENTSIZE
The document published content size property

IDX_CONTENTSIZE

public static final int IDX_CONTENTSIZE
The index of the document published content size property

MIMETYPE

public static final String MIMETYPE
The document published content MIME type property

IDX_MIMETYPE

public static final int IDX_MIMETYPE
The index of the document published content MIME type property

ENCODING

public static final String ENCODING
The document published content ENCODING property

IDX_ENCODING

public static final int IDX_ENCODING
The index of the document published content ENCODING property

SORT_BY_PROP_NAME

public static final int SORT_BY_PROP_NAME
Sort mode of "sort by property name". See also: getPropertyDescriptors.

SORT_BY_PROP_DISPLAY_NAME

public static final int SORT_BY_PROP_DISPLAY_NAME
Sort mode of "sort by property display name". See also: getPropertyDescriptors.

SORT_BY_PROP_INDEX

public static final int SORT_BY_PROP_INDEX
Sort mode of "sort by property index". See also: getPropertyDescriptors.

SORT_BY_PROP_TYPE

public static final int SORT_BY_PROP_TYPE
Sort mode of "sort by property type". See also: getPropertyDescriptors.
Constructor Detail

EboDocPropUtil

public EboDocPropUtil()
Method Detail

getPropertyName

public static String getPropertyName(int index)
Given the index of the property, gets its name
Parameters:
index - the index of the property
Returns:
the property name

isValidProperty

public static boolean isValidProperty(int index)
Given the index of the property, checks to see if the specified property is valid.
Parameters:
index - the index
Returns:
true if the property is valid, false otherwise

getPropertyIndex

public static int getPropertyIndex(String propName)
Given a property name, returns its index
Parameters:
propName - the name of the property
Returns:
the index; -1 if the property name is invalid

getPropertyDisplayName

public static String getPropertyDisplayName(int index,
                                            Locale locale)
Given the index of a property, gets its user-friendly, displayable name
Parameters:
index - the index of the property
locale - the locale to use; if null, the default locale is used
Returns:
the displayable property name

isMandatoryProperty

public static boolean isMandatoryProperty(int index)
Tells whether the property whose index is passed in, is mandatory (i.e. must have a value)
Parameters:
index - the index of the property
Returns:
true if mandatory, false otherwise

getPropertyIndices

public static int[] getPropertyIndices(String[] docProps)
Given a set of property names, returns their corresponding indices
Parameters:
docProps - the list of property names
Returns:
property indices

getPropertyDescriptor

public static EbiDocPropDescriptor getPropertyDescriptor(int index,
                                                         Locale locale)
Given the index of a property, returns its Document Property Descriptor.
Parameters:
index - the index of the property
locale - the locale to use; if null, the default locale is used
Returns:
the Document Property Descriptor for the property, or null if the index is invalid

getPropertyDescriptors

public static Collection getPropertyDescriptors(Locale locale)
Enumerates all the document properties, returning a collection of EbiDocPropDescriptor's.
Parameters:
locale - the locale to use; if null, the default locale is used
Returns:
collection of EbiDocPropDescriptor's

getPropertyDescriptors

public static Collection getPropertyDescriptors(Locale locale,
                                                int sortBy)
Enumerates all the document properties, returning a collection of EbiDocPropDescriptor's, in a sorted fashion
Parameters:
locale - the locale to use; if null, the default locale is used
sortBy - the sort mode
Returns:
collection of EbiDocPropDescriptor's

getPropertyCount

public static int getPropertyCount()
Gets the number of available standard document properties.
Returns:
the number of available standard document properties

getDocPropValue

public static Object getDocPropValue(EbiDocument doc,
                                     String propName)
Given an EbiDocument object and a property name, extracts the value of that property from the object.
Parameters:
doc - the document object
propName - the name of the property
Returns:
the value of the property; may be null

getOperators

public static Collection getOperators(String propName,
                                      Locale locale,
                                      int sortBy)
Enumerates the operators that are applicable for a given property.
Parameters:
propName - the name of the property
locale - the locale to use; if null, the default locale is used
sortBy - the sort mode for sorting the returned descriptors
Returns:
a collection of EbiDocPropDescriptor's

getOperators

public static Collection getOperators(int index,
                                      Locale locale,
                                      int sortBy)
Enumerates the operators that are applicable for a given property.
Parameters:
index - the index of the property
locale - the locale to use; if null, the default locale is used
sortBy - the sort mode for sorting the returned descriptors
Returns:
a collection of EbiDocPropDescriptor's

isStringProperty

public static boolean isStringProperty(String propName)
Tells whether the property whose name is passed in, is a string property (i.e. a property whose value is a String).
Parameters:
propName - the name of the property
Returns:
true if the property is a string one, false otherwise

isTimestampProperty

public static boolean isTimestampProperty(String propName)
Tells whether the property whose name is passed in, is a timestamp property (i.e. a property whose value is a Timestamp).
Parameters:
propName - the name of the property
Returns:
true if the property is a Timestamp one, false otherwise

isIntegerProperty

public static boolean isIntegerProperty(String propName)
Tells whether the property whose name is passed in, is an integer property (i.e. a property whose value is a Integer).
Parameters:
propName - the name of the property
Returns:
true if the property is a Integer one, false otherwise

Novell exteNd
Director 5.2 API