com.wewebu.ow.server.ecm
Class OwStandardObjectClass

java.lang.Object
  extended by com.wewebu.ow.server.ecm.OwStandardObjectClass
All Implemented Interfaces:
OwObjectClass
Direct Known Subclasses:
OwStandardHistoryEntry.OwStandardHistoryEntryObjectClass

public class OwStandardObjectClass
extends Object
implements OwObjectClass

Class descriptions are defined by the ECM System, the contain information about the object type.

To be implemented with the specific ECM system.

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


Field Summary
protected  OwString m_Description
          a description of the object class
protected  OwString m_DisplayName
           
protected  boolean m_fCanCreateNewObject
           
protected  boolean m_fHidden
           
protected  boolean m_fVersionable
          flag indicating if a version series objectclass is available, i.e.
protected  int m_iType
           
protected  OwObjectClass m_parent
          the parent class of this class
protected  Map m_PropertyClassesMap
          map containing the property class descriptions of the class
protected  Collection m_propertyKeyList
          optional backup list for predictable order of keys (ClassNames)
protected  String m_strClassName
           
protected  String m_strNamePropertyName
           
 
Fields inherited from interface com.wewebu.ow.server.ecm.OwObjectClass
OPERATION_TYPE_CHECKIN, OPERATION_TYPE_CHECKOUT, OPERATION_TYPE_CREATE_NEW_OBJECT, OPERATION_TYPE_SET_PROPERTIES, OPERATION_TYPE_UNDEF
 
Constructor Summary
OwStandardObjectClass()
          default constructor, override with subclass
OwStandardObjectClass(String classname_p, int iType_p)
          simple constructor
 
Method Summary
 boolean canCreateNewObject()
          check, if new object instances can be created for this class
static Object createInitialNullValue(OwFieldDefinition fieldDefinition_p, boolean fArrayInit_p)
          create a null value for the given field definition in case of a complex value, returns an array of null's for the complex properties
static int getBaseObjectType(int iObjectType_p)
          get the base defining type for the given object type.
 Map getChildNames(OwNetwork network_p, boolean fExcludeHiddenAndNonInstantiable_p)
          get the child classes of this class if we deal with a class tree
 List getChilds(OwNetwork network_p, boolean fExcludeHiddenAndNonInstantiable_p)
          get the child classes of this class if we deal with a class tree
 String getClassName()
          get the name of the class
 String getDescription(Locale locale_p)
          retrieve a description of the object class
 String getDisplayName(Locale locale_p)
          get the displayable name of the type as defined by the ECM System
 String getID()
          get the unique ID of the class
 List getModes(int operation_p)
          get the available modes for operations like checkin, createNewObject, setProperties
 String getNamePropertyName()
          get the name of the name property
 OwObjectClass getParent()
          get the parent class of this class
 OwPropertyClass getPropertyClass(String strClassName_p)
          get a map of the available property class descriptions
 Collection getPropertyClassNames()
          get a list of the available property class descriptions names
 int getType()
          get Object type
 boolean hasChilds(OwNetwork network_p, boolean fExcludeHiddenAndNonInstantiable_p, int context_p)
          check if children are available
 boolean hasVersionSeries()
          check if a version series objectclass is available, i.e.
static boolean isContainerType(int iObjectType_p)
          check if a given type is a container type like a folder
static boolean isContentType(int iObjectType_p)
          check if a given type is a Content type, like a document
 boolean isHidden()
          check if class is visible to the user
static boolean isTupleType(int iObjectType_p)
          check if a given type is a Tuple type, like a custom object
static boolean isWorkflowObjectType(int iObjectType_p)
          check if a given type is a Tuple type, like a custom object
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_PropertyClassesMap

protected Map m_PropertyClassesMap
map containing the property class descriptions of the class


m_propertyKeyList

protected Collection m_propertyKeyList
optional backup list for predictable order of keys (ClassNames)


m_fCanCreateNewObject

protected boolean m_fCanCreateNewObject

m_strClassName

protected String m_strClassName

m_strNamePropertyName

protected String m_strNamePropertyName

m_parent

protected OwObjectClass m_parent
the parent class of this class


m_DisplayName

protected OwString m_DisplayName

m_fHidden

protected boolean m_fHidden

m_iType

protected int m_iType

m_fVersionable

protected boolean m_fVersionable
flag indicating if a version series objectclass is available, i.e. the object is versionable


m_Description

protected OwString m_Description
a description of the object class

Constructor Detail

OwStandardObjectClass

public OwStandardObjectClass()
default constructor, override with subclass


OwStandardObjectClass

public OwStandardObjectClass(String classname_p,
                             int iType_p)
simple constructor

Parameters:
classname_p -
Method Detail

getBaseObjectType

public static int getBaseObjectType(int iObjectType_p)
get the base defining type for the given object type. e.g. get OwObjectReference.OBJECT_TYPE_ALL_CONTENT_OBJECTS for OwObjectReference.OBJECT_TYPE_DOCUMENT

Parameters:
iObjectType_p - object type as defined in OwObjectReference OBJECT_TYPE_...
Returns:
int base type OwObjectReference.OBJECT_TYPE_ALL_...

isContainerType

public static boolean isContainerType(int iObjectType_p)
check if a given type is a container type like a folder

Parameters:
iObjectType_p - int object type
Returns:
true = container type, false = otherwise

isContentType

public static boolean isContentType(int iObjectType_p)
check if a given type is a Content type, like a document

Parameters:
iObjectType_p - int object type
Returns:
true = Content type, false = otherwise

isTupleType

public static boolean isTupleType(int iObjectType_p)
check if a given type is a Tuple type, like a custom object

Parameters:
iObjectType_p - int object type
Returns:
true = Tuple type, false = otherwise

isWorkflowObjectType

public static boolean isWorkflowObjectType(int iObjectType_p)
check if a given type is a Tuple type, like a custom object

Parameters:
iObjectType_p - int object type
Returns:
true = Tuple type, false = otherwise

getType

public int getType()
get Object type

Specified by:
getType in interface OwObjectClass
Returns:
the type of the object
See Also:
OwObjectReference

getChildNames

public Map getChildNames(OwNetwork network_p,
                         boolean fExcludeHiddenAndNonInstantiable_p)
                  throws Exception
get the child classes of this class if we deal with a class tree

Specified by:
getChildNames in interface OwObjectClass
Parameters:
network_p - OwNetwork, in case the class description is static for all users, we can still dynamically load the class members
fExcludeHiddenAndNonInstantiable_p - boolean true = exclude all hidden and non instantiable class descriptions
Returns:
Map of child class symbolic names, mapped to display names, or null if no class tree is supported
Throws:
Exception

hasChilds

public boolean hasChilds(OwNetwork network_p,
                         boolean fExcludeHiddenAndNonInstantiable_p,
                         int context_p)
check if children are available

Specified by:
hasChilds in interface OwObjectClass
Parameters:
network_p - OwNetwork, in case the class description is static for all users, we can still dynamically load the class members
fExcludeHiddenAndNonInstantiable_p - boolean true = exclude all hidden and non instantiable class descriptions
context_p - OwStatusContextDefinitions
Returns:
Map of child class symbolic names, mapped to display names, or null if no class tree is supported

getChilds

public List getChilds(OwNetwork network_p,
                      boolean fExcludeHiddenAndNonInstantiable_p)
               throws Exception
get the child classes of this class if we deal with a class tree

Specified by:
getChilds in interface OwObjectClass
Parameters:
network_p - OwNetwork, in case the class description is static for all users, we can still dynamically load the class members
fExcludeHiddenAndNonInstantiable_p - boolean true = exclude all hidden and non instantiable class descriptions
Returns:
List of child classes, or null if no children are available
Throws:
Exception

getClassName

public String getClassName()
get the name of the class

Specified by:
getClassName in interface OwObjectClass
Returns:
class name

getID

public String getID()
get the unique ID of the class

Returns:
class ID

getDisplayName

public String getDisplayName(Locale locale_p)
get the displayable name of the type as defined by the ECM System

Specified by:
getDisplayName in interface OwObjectClass
Parameters:
locale_p - Local to use
Returns:
type displayable name of property

getPropertyClass

public OwPropertyClass getPropertyClass(String strClassName_p)
                                 throws Exception
get a map of the available property class descriptions

Specified by:
getPropertyClass in interface OwObjectClass
Parameters:
strClassName_p - Name of class
Returns:
OwPropertyClass instance
Throws:
Exception

getPropertyClassNames

public Collection getPropertyClassNames()
                                 throws Exception
get a list of the available property class descriptions names

Specified by:
getPropertyClassNames in interface OwObjectClass
Returns:
string array of OwPropertyClass Names
Throws:
Exception

getNamePropertyName

public String getNamePropertyName()
                           throws Exception
get the name of the name property

Specified by:
getNamePropertyName in interface OwObjectClass
Returns:
String name of the name property
Throws:
Exception

canCreateNewObject

public boolean canCreateNewObject()
                           throws Exception
check, if new object instances can be created for this class

Specified by:
canCreateNewObject in interface OwObjectClass
Returns:
true, if object can be created
Throws:
Exception

hasVersionSeries

public boolean hasVersionSeries()
                         throws Exception
check if a version series objectclass is available, i.e. the object is versionable

Specified by:
hasVersionSeries in interface OwObjectClass
Returns:
true if objectclass is versionable
Throws:
Exception

getDescription

public String getDescription(Locale locale_p)
retrieve a description of the object class

Specified by:
getDescription in interface OwObjectClass
Parameters:
locale_p - Local to use
Returns:
String Description of the object class

isHidden

public boolean isHidden()
                 throws Exception
check if class is visible to the user

Specified by:
isHidden in interface OwObjectClass
Returns:
true if property is visible to the user
Throws:
Exception

getParent

public OwObjectClass getParent()
                        throws Exception
get the parent class of this class

Specified by:
getParent in interface OwObjectClass
Returns:
OwObjectClass parent or null if topmost class
Throws:
Exception

toString

public String toString()
Overrides:
toString in class Object

getModes

public List getModes(int operation_p)
              throws Exception
Description copied from interface: OwObjectClass
get the available modes for operations like checkin, createNewObject, setProperties

Specified by:
getModes in interface OwObjectClass
Parameters:
operation_p - int as defined with OPERATION_TYPE_...
Returns:
List of OwEnum objects, or null if no modes are defined for the given operation
Throws:
Exception

createInitialNullValue

public static Object createInitialNullValue(OwFieldDefinition fieldDefinition_p,
                                            boolean fArrayInit_p)
                                     throws Exception
create a null value for the given field definition in case of a complex value, returns an array of null's for the complex properties

Parameters:
fieldDefinition_p -
fArrayInit_p - true = create a initial value for an array element, false = create initial value for the whole array
Returns:
Object
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.