public abstract class OwStandardDecoratorObject extends Object implements OwObject, OwPageableObject<OwObject>
OwObject wrapper to implement a decorator pattern.
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
STANDARD_PATH_DELIMITEROBJECT_TYPE_ALL_CONTAINER_OBJECTS, OBJECT_TYPE_ALL_CONTENT_OBJECTS, OBJECT_TYPE_ALL_TUPLE_OBJECTS, OBJECT_TYPE_ALL_WORKFLOW_OBJECTS, OBJECT_TYPE_BPM_ROOT_FOLDER, OBJECT_TYPE_CONTAINER_USER_START, OBJECT_TYPE_CONTENT_USER_START, OBJECT_TYPE_CROSS_QUEUE_FOLDER, OBJECT_TYPE_CUSTOM, OBJECT_TYPE_DOCUMENT, OBJECT_TYPE_DYNAMIC_VIRTUAL_FOLDER, OBJECT_TYPE_ECM_ROOT_FOLDER, OBJECT_TYPE_FOLDER, OBJECT_TYPE_HISTORY, OBJECT_TYPE_LINK, OBJECT_TYPE_PROXY_QUEUE_FOLDER, OBJECT_TYPE_PUBLIC_QUEUE_FOLDER, OBJECT_TYPE_ROSTER_FOLDER, OBJECT_TYPE_ROSTERITEM, OBJECT_TYPE_STORED_SEARCH, OBJECT_TYPE_SYS_QUEUE_FOLDER, OBJECT_TYPE_TRACKER_QUEUE_FOLDER, OBJECT_TYPE_TUPLE_USER_START, OBJECT_TYPE_UNDEFINED, OBJECT_TYPE_USER_QUEUE_FOLDER, OBJECT_TYPE_VIRTUAL_FOLDER, OBJECT_TYPE_WORKFLOW_USER_START, OBJECT_TYPE_WORKITEM, OBJECT_TYPE_WORKITEM_PROXY, OBJECT_TYPE_WORKITEM_TRACKERTYPE_AJAX, TYPE_CHECKIN_OBJECT, TYPE_CREATE_OBJECT, TYPE_META_OBJECT, TYPE_RESULT_LIST, TYPE_SEARCH, TYPE_SMALL| Constructor and Description |
|---|
OwStandardDecoratorObject() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(OwObject object_p)
adds a object reference to this parent object (folder)
|
boolean |
canAdd(OwObject object_p,
int context_p)
checks if object supports add function and if user has sufficient access rights
|
boolean |
canChangeClass()
check if object can change its class
|
boolean |
canDelete(int context_p)
check if object can be deleted and if user has sufficient access rights
|
boolean |
canFilterChilds()
check if the FilterCriteria_p in getChilds is possible
NOTE: The FilterCriteria_p parameter in getChilds is an additional filter to the internal SearchTemplate used in the getSearchTemplate(...) function
The internal SearchTemplate used in the getSearchTemplate(...) is used for virtual folders, the FilterCriteria_p is used to refine the result of a node
|
boolean |
canGetContent(int contentType_p,
int context_p)
check if content retrieval is allowed
|
boolean |
canGetPermissions()
check if permissions are accessible
|
boolean |
canGetProperties(int context_p)
check if property retrieval is allowed
|
boolean |
canLock()
check if object supports lock mechanism
|
boolean |
canMove(OwObject object_p,
OwObject oldParent_p,
int context_p)
check if move operation is allowed
|
boolean |
canRemoveReference(OwObject object_p,
int context_p)
checks if the reference can be removed
this object needs to be parent of given object, and user needs to have sufficient access rights
|
boolean |
canSetContent(int contentType_p,
int context_p)
check if content can be set on this document with setContent
|
boolean |
canSetPermissions()
check if permissions can be set
|
boolean |
canSetProperties(int context_p)
check if object allows to set / change properties
|
void |
changeClass(String strNewClassName_p,
OwPropertyCollection properties_p,
OwPermissionCollection permissions_p)
change the class of the object
|
void |
delete()
delete object and all references from DB
|
boolean |
equals(Object obj) |
int |
getChildCount(int[] objectTypes_p,
int context_p)
get the number of children
|
OwIterable<OwObject> |
getChildren(OwLoadContext filter) |
OwObjectCollection |
getChilds(int[] objectTypes_p,
Collection propertyNames_p,
OwSort sort_p,
int maxSize_p,
int versionSelection_p,
OwSearchNode filterCriteria_p)
get the children of the object, does NOT cache the returned object
For Compound Documents returns the list of contained documents
For Folders returns the list of subfolders
|
String |
getClassName()
get the class name of the object, the class names are defined by the ECM System
|
OwPermissionCollection |
getClonedPermissions()
get the cloned permissions
|
OwPropertyCollection |
getClonedProperties(Collection propertyNames_p)
retrieve the specified properties from the object as a copy
NOTE: Other the getProperties, the returned collection returns exactly the requested properties
NOTE: if the properties where not already obtained from the archive (e.g. |
Collection |
getColumnInfoList()
get the column info list that describes the columns for the child list
|
OwContentCollection |
getContentCollection()
get the content of the object
|
String |
getDMSID()
get the ECM specific ID of the Object.
|
OwField |
getField(String strFieldClassName_p)
get a field with the given field definition class name
|
String |
getFieldProviderName()
get a name that identifies the field provider, e.g.
|
Object |
getFieldProviderSource()
get the source object that originally provided the fields.
|
int |
getFieldProviderType()
get the type of field provider can be one or more of TYPE_...
|
Collection |
getFields()
get all the properties in the form
|
Collection |
getFilterProperties(Collection propertynames_p)
get a collection of OwFieldDefinition's for a given list of names
|
String |
getID()
get Object symbolic name of the object which is unique among its siblings
used for path construction
|
OwObject |
getInstance()
get a instance from this reference
|
boolean |
getLock(int context_p)
get the lock state of the object for ALL users
|
String |
getLockUserID(int context_p)
get the lock user of the object
|
String |
getMIMEParameter()
get the additional MIME Parameter of the Object
|
String |
getMIMEType()
get the MIME Type of the Object
|
boolean |
getMyLock(int context_p)
get the lock state of the object for the CURRENTLY logged on user
|
String |
getName()
get Object name property string
|
Object |
getNativeObject()
get the native object from the ECM system
NOTE: The returned object is Opaque.
|
OwObjectClass |
getObjectClass()
get the class description of the object, the class descriptions are defined by the ECM System
|
int |
getPageCount()
retrieve the number of pages in the objects
|
OwObjectCollection |
getParents()
get the containing parents of this object, does NOT cache returned objects
for folders it is several parent folders, for compound documents it is one parent document.
|
String |
getPath()
get the path to the object, which can be used in OwNetwork.getObjectFromPath to recreate the object
The path is build with the name property.
|
OwPermissionCollection |
getPermissions()
get the permissions object
|
OwPropertyCollection |
getProperties(Collection propertyNames_p)
retrieve the specified properties from the object.
|
OwProperty |
getProperty(String strPropertyName_p)
retrieve the specified property from the object.
|
OwResource |
getResource()
get the resource the object belongs to in a multiple resource Network
|
String |
getResourceID()
get the ID / name identifying the resource the object belongs to
|
Object |
getSafeFieldValue(String name_p,
Object defaultvalue_p)
retrieve the value of a Field
|
OwSearchTemplate |
getSearchTemplate()
get a search template associated with this Object
The search from the template can be used to refine the result in getChilds(...)
==> The search is automatically performed when calling getChilds(...)
The ColumnInfoList from the template can be used to format the result list of the children
NOTE: This function is especially used in virtual folders
|
int |
getType()
get Object type
|
OwVersion |
getVersion()
get the current version object
|
OwVersionSeries |
getVersionSeries()
get the version series object to this object, if the object is versionable
|
abstract OwObject |
getWrappedObject()
to be overridden
|
boolean |
hasChilds(int[] objectTypes_p,
int context_p)
check if object has children
|
boolean |
hasContent(int context_p)
check if the object contains a content, which can be retrieved using getContentCollection
|
int |
hashCode() |
boolean |
hasVersionSeries()
check if a version series object is available, i.e.
|
void |
move(OwObject object_p,
OwObject oldParent_p)
moves a object reference to this parent object (folder)
|
void |
refreshProperties()
refresh the property cache
|
void |
refreshProperties(Collection props_p)
refresh the property cache
|
void |
removeReference(OwObject object_p)
removes the reference of the given object from this object (folder)
this object needs to be parent of given object
|
void |
setContentCollection(OwContentCollection content_p)
set the content to the object
|
void |
setField(String name_p,
Object value_p)
modify a Field value, but does not save the value right away
|
boolean |
setLock(boolean lock_p)
lock / unlock object, make it unaccessible for other users
|
void |
setPermissions(OwPermissionCollection permissions_p)
set the permissions object
|
void |
setProperties(OwPropertyCollection properties_p)
set the properties in the object
|
void |
setProperties(OwPropertyCollection properties_p,
Object mode_p)
set the properties in the object
|
static Object |
unwrap(Object decorator)
Tries to unwrap all
OwStandardDecoratorObject layers from the given object. |
public abstract OwObject getWrappedObject()
public boolean canAdd(OwObject object_p, int context_p) throws Exception
OwObjectpublic void add(OwObject object_p) throws Exception
OwObjectpublic boolean canChangeClass()
throws Exception
OwObjectcanChangeClass in interface OwObjectExceptionpublic void setProperties(OwPropertyCollection properties_p, Object mode_p) throws Exception
OwObjectsetProperties in interface OwObjectproperties_p - OwPropertyList list of OwProperties to setmode_p - mode to use or null to use default mode, @see OwObjectClass.getModes(int)Exceptionpublic boolean canDelete(int context_p)
throws Exception
OwObjectpublic boolean canFilterChilds()
throws Exception
OwObjectcanFilterChilds in interface OwObjectExceptionpublic boolean canGetContent(int contentType_p,
int context_p)
throws Exception
OwObjectcanGetContent in interface OwObjectcontentType_p - int designating the type of content (CONTENT_TYPE_DOCUMENT, CONTENT_TYPE_ANNOTATION,...)context_p - OwStatusContextDefinitionsExceptionpublic boolean canGetPermissions()
throws Exception
OwObjectcanGetPermissions in interface OwObjectExceptionpublic boolean canGetProperties(int context_p)
throws Exception
OwObjectcanGetProperties in interface OwObjectcontext_p - OwStatusContextDefinitionsExceptionpublic boolean canLock()
throws Exception
OwObjectpublic boolean canMove(OwObject object_p, OwObject oldParent_p, int context_p) throws Exception
OwObjectpublic boolean canRemoveReference(OwObject object_p, int context_p) throws Exception
OwObjectcanRemoveReference in interface OwObjectobject_p - OwObject reference to be checked uponcontext_p - OwStatusContextDefinitionsExceptionpublic boolean canSetContent(int contentType_p,
int context_p)
throws Exception
OwObjectcanSetContent in interface OwObjectcontentType_p - int designating the type of content (CONTENT_TYPE_DOCUMENT, CONTENT_TYPE_ANNOTATION,...)context_p - OwStatusContextDefinitionsExceptionpublic boolean canSetPermissions()
throws Exception
OwObjectcanSetPermissions in interface OwObjectExceptionpublic boolean canSetProperties(int context_p)
throws Exception
OwObjectcanSetProperties in interface OwObjectcontext_p - OwStatusContextDefinitionsExceptionpublic void changeClass(String strNewClassName_p, OwPropertyCollection properties_p, OwPermissionCollection permissions_p) throws Exception
OwObjectchangeClass in interface OwObjectproperties_p - OwPropertyCollection (optional, can be null to set previous properties)permissions_p - OwPermissionCollection (optional, can be null to set previous permissions)Exceptionpublic void delete()
throws Exception
OwObjectpublic int getChildCount(int[] objectTypes_p,
int context_p)
throws Exception
OwObjectgetChildCount in interface OwObjectobjectTypes_p - the requested object types (folder or document)context_p - OwStatusContextDefinitionsExceptionpublic OwObjectCollection getChilds(int[] objectTypes_p, Collection propertyNames_p, OwSort sort_p, int maxSize_p, int versionSelection_p, OwSearchNode filterCriteria_p) throws Exception
OwObjectgetChilds in interface OwObjectobjectTypes_p - the requested object types (folder or document)propertyNames_p - properties to fetch from ECM system along with the children, can be null.sort_p - OwSort Sortcriteria list to sort return listmaxSize_p - int maximum number of objects to retrieveversionSelection_p - int Selects the versions as defined in OwSearchTemplate.VERSION_SELECT_... or 0 to use default versionfilterCriteria_p - optional OwSearchNode to filter the children, can be null
NOTE: This parameter is an additional filter to the internal SearchTemplate used in the getSearchTemplate(...) function
The internal SearchTemplate used in the getSearchTemplate(...) is used for virtual folders, the FilterCriteria_p is used to refine the result of a nodeExceptionpublic String getClassName()
OwObjectgetClassName in interface OwObjectpublic OwPermissionCollection getClonedPermissions() throws Exception
OwObjectgetClonedPermissions in interface OwObjectExceptionpublic OwPropertyCollection getClonedProperties(Collection propertyNames_p) throws Exception
OwObjectgetClonedProperties in interface OwObjectpropertyNames_p - a collection of property names to retrieve, if null all properties are retrievedExceptionpublic Collection getColumnInfoList() throws Exception
OwObjectgetColumnInfoList in interface OwObjectExceptionpublic OwContentCollection getContentCollection() throws Exception
OwObjectgetContentCollection in interface OwObjectExceptionpublic Collection getFilterProperties(Collection propertynames_p) throws Exception
OwObjectgetFilterProperties in interface OwObjectpropertynames_p - Collection of property names the client wants to use as filter properties or null to retrieve all possible filter propertiesExceptionpublic boolean getLock(int context_p)
throws Exception
OwObjectpublic String getLockUserID(int context_p) throws Exception
OwObjectgetLockUserID in interface OwObjectcontext_p - OwStatusContextDefinitionsExceptionpublic boolean getMyLock(int context_p)
throws Exception
OwObjectpublic Object getNativeObject() throws Exception
OwObjectgetNativeObject in interface OwObjectExceptionpublic OwObjectClass getObjectClass()
OwObjectgetObjectClass in interface OwObjectpublic OwObjectCollection getParents() throws Exception
OwObjectgetParents in interface OwObjectExceptionpublic String getPath() throws Exception
OwObjectpublic OwPermissionCollection getPermissions() throws Exception
OwObjectgetPermissions in interface OwObjectExceptionpublic OwPropertyCollection getProperties(Collection propertyNames_p) throws Exception
OwObjectgetProperties in interface OwObjectpropertyNames_p - a collection of property names to retrieve, if null all properties are retrievedExceptionpublic OwProperty getProperty(String strPropertyName_p) throws Exception
OwObjectgetProperty in interface OwObjectstrPropertyName_p - the name of the requested propertyExceptionpublic OwResource getResource() throws Exception
OwObjectgetResource in interface OwObjectExceptionpublic OwSearchTemplate getSearchTemplate() throws Exception
OwObjectgetSearchTemplate in interface OwObjectExceptionpublic OwVersion getVersion() throws Exception
OwObjectgetVersion in interface OwObjectExceptionpublic OwVersionSeries getVersionSeries() throws Exception
OwObjectgetVersionSeries in interface OwObjectExceptionpublic boolean hasChilds(int[] objectTypes_p,
int context_p)
throws Exception
OwObjecthasChilds in interface OwObjectobjectTypes_p - the requested object types (folder or document)context_p - int as defined in OwStatusContextDefinitionsExceptionpublic boolean hasVersionSeries()
throws Exception
OwObjecthasVersionSeries in interface OwObjectExceptionpublic void move(OwObject object_p, OwObject oldParent_p) throws Exception
OwObjectpublic void refreshProperties()
throws Exception
OwObjectrefreshProperties in interface OwObjectExceptionpublic void refreshProperties(Collection props_p) throws Exception
OwObjectrefreshProperties in interface OwObjectprops_p - Collection of property names to updateExceptionpublic void removeReference(OwObject object_p) throws Exception
OwObjectremoveReference in interface OwObjectobject_p - OwObject reference to be removed from this object (folder)Exceptionpublic void setContentCollection(OwContentCollection content_p) throws Exception
OwObjectsetContentCollection in interface OwObjectcontent_p - OwContentCollection to store in the objectExceptionpublic boolean setLock(boolean lock_p)
throws Exception
OwObjectpublic void setPermissions(OwPermissionCollection permissions_p) throws Exception
OwObjectsetPermissions in interface OwObjectpermissions_p - OwPermissionCollection to setExceptionpublic void setProperties(OwPropertyCollection properties_p) throws Exception
OwObjectsetProperties in interface OwObjectproperties_p - OwPropertyList list of OwProperties to setExceptionpublic String getDMSID() throws Exception
OwObjectReferencegetDMSID in interface OwObjectReferenceExceptionpublic String getID()
OwObjectReferencegetID in interface OwObjectReferencepublic OwObject getInstance() throws Exception
OwObjectReferencegetInstance in interface OwObjectReferenceExceptionpublic String getMIMEParameter() throws Exception
OwObjectReferencegetMIMEParameter in interface OwObjectReferenceExceptionpublic String getMIMEType() throws Exception
OwObjectReferencegetMIMEType in interface OwObjectReferenceExceptionpublic String getName()
OwObjectReferencegetName in interface OwObjectReferencepublic int getPageCount()
throws Exception
OwObjectReferencegetPageCount in interface OwObjectReferenceExceptionpublic String getResourceID() throws Exception
OwObjectReferencegetResourceID in interface OwObjectReferenceExceptionOwResourcepublic int getType()
OwObjectReferencegetType in interface OwObjectReferencepublic boolean hasContent(int context_p)
throws Exception
OwObjectReferencehasContent in interface OwObjectReferencecontext_p - OwStatusContextDefinitionsExceptionpublic OwField getField(String strFieldClassName_p) throws Exception, OwObjectNotFoundException
OwFieldProvidergetField in interface OwFieldProviderstrFieldClassName_p - String class name of requested fieldsExceptionOwObjectNotFoundExceptionpublic String getFieldProviderName()
OwFieldProvidergetFieldProviderName in interface OwFieldProviderpublic Object getFieldProviderSource()
OwFieldProvidergetFieldProviderSource in interface OwFieldProviderpublic int getFieldProviderType()
OwFieldProvidergetFieldProviderType in interface OwFieldProviderpublic Collection getFields() throws Exception
OwFieldProvidergetFields in interface OwFieldProviderExceptionpublic Object getSafeFieldValue(String name_p, Object defaultvalue_p)
OwFieldProvidergetSafeFieldValue in interface OwFieldProviderpublic void setField(String name_p, Object value_p) throws Exception, OwObjectNotFoundException
OwFieldProvidersetField in interface OwFieldProviderExceptionOwObjectNotFoundExceptionpublic OwIterable<OwObject> getChildren(OwLoadContext filter) throws OwException
getChildren in interface OwPageableObject<OwObject>OwExceptionpublic static Object unwrap(Object decorator)
OwStandardDecoratorObject layers from the given object.decorator - OwStandardDecoratorObject.Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.