com.wewebu.ow.server.ecmimpl.cmis.property
Enum OwCMISPropertyNames

java.lang.Object
  extended by java.lang.Enum<OwCMISPropertyNames>
      extended by com.wewebu.ow.server.ecmimpl.cmis.property.OwCMISPropertyNames
All Implemented Interfaces:
Serializable, Comparable<OwCMISPropertyNames>

public enum OwCMISPropertyNames
extends Enum<OwCMISPropertyNames>

OwCMISPropertyNames enumeration and helper class. Enumeration for the frequently used properties, with helper methods to retrieve that property from native CmisObjectType.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Nested Class Summary
protected static class OwCMISPropertyNames.SyncList
           SyncList is a helper class for singleton implementation.
 
Enum Constant Summary
ALLOWED_CHILD_OBJECTTYPE_IDS
          Constant for the cmis:allowedChildObjecttypeIDs property
BASE_TYPE_ID
          Constant for the cmis:baseTypeId property
CHANGE_TOKEN
          Constant for the cmis:changeToken property
CHECKIN_COMMENT
          Constant for the cmis:checkinComment property
CONTENT_STREAM_FILENAME
          Constant for the cmis:contentStreamFileName property
CONTENT_STREAM_ID
          Constant for the cmis:contentStreamId property
CONTENT_STREAM_LENGTH
          Constant for the cmis:contentStreamLength property
CONTENT_STREAM_MIME_TYPE
          Constant for the cmis:contentStreamMimeType property
IS_IMMUTABLE
          Constant for the cmis:isImmutable property
IS_LATEST_MAJOR_VERSION
          Constant for the cmis:isLatestMajorVersion property
IS_LATEST_VERSION
          Constant for the cmis:isLatestVersion property
IS_MAJOR_VERSION
          Constant for the cmis:isMajorVersion property
IS_VERSION_SERIES_CHECKED_OUT
          Constant for the cmis:isVersionSeriesCheckedOut property
NAME
          Constant for the cmis:name property
NONE
          Constant for the value cmis:none which is used very often, not a real property
OBJECT_ID
          Constant for the cmis:objectId property
OBJECT_TYPE_ID
          Constant for the cmis:objectTypeId property
PARENT_ID
          Constant for the cmis:parentId property
PATH
          Constant for the cmis:path property
VERSION_LABEL
          Constant for the cmis:versionLabel property
VERSION_SERIES_CHECKED_OUT_BY
          Constant for the cmis:versionSeriesCheckedOutBy property
VERSION_SERIES_CHECKED_OUT_ID
          Constant for the cmis:versionSeriesCheckedOutId property
VERSION_SERIES_ID
          Constant for the cmis:versionSeriesId property
 
Method Summary
 org.oasis_open.docs.ns.cmis.core._200908.CmisProperty fromObject(org.oasis_open.docs.ns.cmis.core._200908.CmisObjectType cmisObject_p)
          Try to retrieve the property form native CmisObjectType calling fromPropertyList(List), can return null if the CmisObjectType does not contain that property.
 org.oasis_open.docs.ns.cmis.core._200908.CmisProperty fromPropertyList(List<org.oasis_open.docs.ns.cmis.core._200908.CmisProperty> propertyList_p)
          Trying to find the property in given collection, comparing the property definition id with getId().
 Boolean getBooleanValue(org.oasis_open.docs.ns.cmis.core._200908.CmisObjectType cmisObject_p)
          Retrieve the single Boolean value form the current selected property, which should be retrieved with the given CmisObjectType.
 String getId()
          Return a String which represents the id/name of the property.
 String getIdValue(org.oasis_open.docs.ns.cmis.core._200908.CmisObjectType cmisObject_p)
          Retrieve the single String value from the property which should be contained in the CmisObjectType.
 String getStringValue(org.oasis_open.docs.ns.cmis.core._200908.CmisObjectType cmisObject_p)
          Retrieve the single String value from the property which should be contained in the CmisObjectType.
static List<String> getSystemPropertiesCmisNames()
          Return an object-type independent list of properties which are system properties.
 boolean isSameId(org.oasis_open.docs.ns.cmis.core._200908.CmisPropertyDefinitionType propertyDefinitionType_p)
          Comparing given CmisPropertyDefinitionType.getId with current selected property id, delegating to isSameId(String).
 boolean isSameId(String id_p)
          Comparing given id with current selected property id, using String.equals(..).
 boolean isSystemProperty()
          Return boolean if this property is an object type independent system property.
static OwCMISPropertyNames valueOf(String name)
          Returns the enum constant of this type with the specified name.
static OwCMISPropertyNames[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PATH

public static final OwCMISPropertyNames PATH
Constant for the cmis:path property


ALLOWED_CHILD_OBJECTTYPE_IDS

public static final OwCMISPropertyNames ALLOWED_CHILD_OBJECTTYPE_IDS
Constant for the cmis:allowedChildObjecttypeIDs property


BASE_TYPE_ID

public static final OwCMISPropertyNames BASE_TYPE_ID
Constant for the cmis:baseTypeId property


IS_IMMUTABLE

public static final OwCMISPropertyNames IS_IMMUTABLE
Constant for the cmis:isImmutable property


CHECKIN_COMMENT

public static final OwCMISPropertyNames CHECKIN_COMMENT
Constant for the cmis:checkinComment property


IS_VERSION_SERIES_CHECKED_OUT

public static final OwCMISPropertyNames IS_VERSION_SERIES_CHECKED_OUT
Constant for the cmis:isVersionSeriesCheckedOut property


IS_LATEST_MAJOR_VERSION

public static final OwCMISPropertyNames IS_LATEST_MAJOR_VERSION
Constant for the cmis:isLatestMajorVersion property


IS_MAJOR_VERSION

public static final OwCMISPropertyNames IS_MAJOR_VERSION
Constant for the cmis:isMajorVersion property


VERSION_SERIES_CHECKED_OUT_BY

public static final OwCMISPropertyNames VERSION_SERIES_CHECKED_OUT_BY
Constant for the cmis:versionSeriesCheckedOutBy property


VERSION_SERIES_CHECKED_OUT_ID

public static final OwCMISPropertyNames VERSION_SERIES_CHECKED_OUT_ID
Constant for the cmis:versionSeriesCheckedOutId property


IS_LATEST_VERSION

public static final OwCMISPropertyNames IS_LATEST_VERSION
Constant for the cmis:isLatestVersion property


CHANGE_TOKEN

public static final OwCMISPropertyNames CHANGE_TOKEN
Constant for the cmis:changeToken property


VERSION_LABEL

public static final OwCMISPropertyNames VERSION_LABEL
Constant for the cmis:versionLabel property


CONTENT_STREAM_ID

public static final OwCMISPropertyNames CONTENT_STREAM_ID
Constant for the cmis:contentStreamId property


VERSION_SERIES_ID

public static final OwCMISPropertyNames VERSION_SERIES_ID
Constant for the cmis:versionSeriesId property


PARENT_ID

public static final OwCMISPropertyNames PARENT_ID
Constant for the cmis:parentId property


OBJECT_ID

public static final OwCMISPropertyNames OBJECT_ID
Constant for the cmis:objectId property


NAME

public static final OwCMISPropertyNames NAME
Constant for the cmis:name property


OBJECT_TYPE_ID

public static final OwCMISPropertyNames OBJECT_TYPE_ID
Constant for the cmis:objectTypeId property


CONTENT_STREAM_MIME_TYPE

public static final OwCMISPropertyNames CONTENT_STREAM_MIME_TYPE
Constant for the cmis:contentStreamMimeType property


CONTENT_STREAM_FILENAME

public static final OwCMISPropertyNames CONTENT_STREAM_FILENAME
Constant for the cmis:contentStreamFileName property


CONTENT_STREAM_LENGTH

public static final OwCMISPropertyNames CONTENT_STREAM_LENGTH
Constant for the cmis:contentStreamLength property


NONE

public static final OwCMISPropertyNames NONE
Constant for the value cmis:none which is used very often, not a real property

Method Detail

values

public static OwCMISPropertyNames[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OwCMISPropertyNames c : OwCMISPropertyNames.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OwCMISPropertyNames valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getSystemPropertiesCmisNames

public static List<String> getSystemPropertiesCmisNames()
Return an object-type independent list of properties which are system properties.

Returns:
List of String, containing the names of the system properties

isSystemProperty

public boolean isSystemProperty()
Return boolean if this property is an object type independent system property.

Returns:
boolean

getId

public String getId()
Return a String which represents the id/name of the property.

Returns:
String

fromObject

public org.oasis_open.docs.ns.cmis.core._200908.CmisProperty fromObject(org.oasis_open.docs.ns.cmis.core._200908.CmisObjectType cmisObject_p)
Try to retrieve the property form native CmisObjectType calling fromPropertyList(List), can return null if the CmisObjectType does not contain that property.

Parameters:
cmisObject_p - CmisObjectType, non-null value
Returns:
CmisProperty or null

fromPropertyList

public org.oasis_open.docs.ns.cmis.core._200908.CmisProperty fromPropertyList(List<org.oasis_open.docs.ns.cmis.core._200908.CmisProperty> propertyList_p)
Trying to find the property in given collection, comparing the property definition id with getId().

Parameters:
propertyList_p - List of native CmisProperty
Returns:
CmisProperty or null if not found

getIdValue

public String getIdValue(org.oasis_open.docs.ns.cmis.core._200908.CmisObjectType cmisObject_p)
                  throws com.wewebu.ow.server.exceptions.OwInvalidOperationException
Retrieve the single String value from the property which should be contained in the CmisObjectType.

ATTENTION: This method will not dynamically make a retrieve from back-end system and could end up in a NullPointerException.

Parameters:
cmisObject_p -
Returns:
String or null
Throws:
com.wewebu.ow.server.exceptions.OwInvalidOperationException - if type of property is not matching CmisPropertyId

getBooleanValue

public Boolean getBooleanValue(org.oasis_open.docs.ns.cmis.core._200908.CmisObjectType cmisObject_p)
                        throws com.wewebu.ow.server.exceptions.OwInvalidOperationException
Retrieve the single Boolean value form the current selected property, which should be retrieved with the given CmisObjectType.

ATTENTION: This method will not dynamically make a retrieve from back-end system and could end up in a NullPointerException.

Parameters:
cmisObject_p - CmisObjectType from where to retrieve
Returns:
Boolean or null
Throws:
com.wewebu.ow.server.exceptions.OwInvalidOperationException - if type of property is not matching CmisPropertyBoolean

getStringValue

public String getStringValue(org.oasis_open.docs.ns.cmis.core._200908.CmisObjectType cmisObject_p)
                      throws com.wewebu.ow.server.exceptions.OwInvalidOperationException
Retrieve the single String value from the property which should be contained in the CmisObjectType.

ATTENTION: This method will not dynamically make a retrieve from back-end system and could end up in a NullPointerException.

Parameters:
cmisObject_p -
Returns:
String or null
Throws:
com.wewebu.ow.server.exceptions.OwInvalidOperationException - if type of property is not matching CmisPropertyString

isSameId

public boolean isSameId(String id_p)
Comparing given id with current selected property id, using String.equals(..).

Parameters:
id_p - String representing Id to compare with
Returns:
boolean true only if matching with current property id

isSameId

public boolean isSameId(org.oasis_open.docs.ns.cmis.core._200908.CmisPropertyDefinitionType propertyDefinitionType_p)
Comparing given CmisPropertyDefinitionType.getId with current selected property id, delegating to isSameId(String).

Parameters:
propertyDefinitionType_p - CmisPropertyDefinitionType to use for comparison
Returns:
boolean true only if matching with current property id


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.