com.wewebu.ow.server.ecm
Interface OwObject

All Superinterfaces:
OwFieldProvider, OwObjectReference
All Known Subinterfaces:
OwHistoryEntry, OwObjectLink, OwSemiVirtualFolder, OwVirtualFolderObject, OwWorkitem, OwWorkitemContainer
All Known Implementing Classes:
OwFileObject, OwObjectSkeleton, OwSessionHistoryEntry, OwStandardDecoratorObject, OwStandardHistoryEntry, OwStandardVirtualFolderObjectFactory

public interface OwObject
extends OwObjectReference, OwFieldProvider

Base interface for all ECM objects.

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
static String STANDARD_PATH_DELIMITER
          path delimiter for building paths
 
Fields inherited from interface com.wewebu.ow.server.ecm.OwObjectReference
OBJECT_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_TRACKER
 
Fields inherited from interface com.wewebu.ow.server.field.OwFieldProvider
TYPE_AJAX, TYPE_CHECKIN_OBJECT, TYPE_CREATE_OBJECT, TYPE_META_OBJECT, TYPE_RESULT_LIST, TYPE_SEARCH, TYPE_SMALL
 
Method Summary
 void add(OwObject oObject_p)
          adds a object reference to this parent object (folder)
 boolean canAdd(OwObject oObject_p, int iContext_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 iContext_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 iContentType_p, int iContext_p)
          check if content retrieval is allowed
 boolean canGetPermissions()
          check if permissions are accessible
 boolean canGetProperties(int iContext_p)
          check if property retrieval is allowed
 boolean canLock()
          check if object supports lock mechanism
 boolean canMove(OwObject oObject_p, OwObject oldParent_p, int iContext_p)
          check if move operation is allowed
 boolean canRemoveReference(OwObject oObject_p, int iContext_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 iContentType_p, int iContext_p)
          check if content can be set on this document with setContent
 boolean canSetPermissions()
          check if permissions can be set
 boolean canSetProperties(int iContext_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
 int getChildCount(int[] iObjectTypes_p, int iContext_p)
          get the number of children
 OwObjectCollection getChilds(int[] iObjectTypes_p, Collection propertyNames_p, OwSort sort_p, int iMaxSize_p, int iVersionSelection_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
 Collection getFilterProperties(Collection propertynames_p)
          get a collection of OwFieldDefinition's for a given list of names
 boolean getLock(int iContext_p)
          get the lock state of the object for ALL users
 String getLockUserID(int iContext_p)
          get the lock user of the object
 boolean getMyLock(int iContext_p)
          get the lock state of the object for the CURRENTLY logged on user
 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
 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
 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
 OwVersion getVersion()
          get the current version object
 OwVersionSeries getVersionSeries()
          get the version series object to this object, if the object is versionable
 boolean hasChilds(int[] iObjectTypes_p, int iContext_p)
          check if object has children
 boolean hasVersionSeries()
          check if a version series object is available, i.e.
 void move(OwObject oObject_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 oObject_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
 boolean setLock(boolean fLock_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
 
Methods inherited from interface com.wewebu.ow.server.ecm.OwObjectReference
getDMSID, getID, getInstance, getMIMEParameter, getMIMEType, getName, getPageCount, getResourceID, getType, hasContent
 
Methods inherited from interface com.wewebu.ow.server.field.OwFieldProvider
getField, getFieldProviderName, getFieldProviderSource, getFieldProviderType, getFields, getSafeFieldValue, setField
 

Field Detail

STANDARD_PATH_DELIMITER

static final String STANDARD_PATH_DELIMITER
path delimiter for building paths

See Also:
Constant Field Values
Method Detail

getClassName

String getClassName()
get the class name of the object, the class names are defined by the ECM System

Returns:
class name of object class

getObjectClass

OwObjectClass getObjectClass()
get the class description of the object, the class descriptions are defined by the ECM System

Returns:
class description name of object class

getParents

OwObjectCollection getParents()
                              throws Exception
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.

Returns:
Parent Object, or null if object does not have any parents
Throws:
Exception

getChilds

OwObjectCollection getChilds(int[] iObjectTypes_p,
                             Collection propertyNames_p,
                             OwSort sort_p,
                             int iMaxSize_p,
                             int iVersionSelection_p,
                             OwSearchNode filterCriteria_p)
                             throws Exception
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

Parameters:
iObjectTypes_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 list
iMaxSize_p - int maximum number of objects to retrieve
iVersionSelection_p - int Selects the versions as defined in OwSearchTemplate.VERSION_SELECT_... or 0 to use default version
filterCriteria_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 node
Returns:
list of child objects, or null
Throws:
Exception

hasChilds

boolean hasChilds(int[] iObjectTypes_p,
                  int iContext_p)
                  throws Exception
check if object has children

Parameters:
iObjectTypes_p - the requested object types (folder or document)
iContext_p - int as defined in OwStatusContextDefinitions
Returns:
true, object has children or throws OwStatusContextException
Throws:
Exception

getChildCount

int getChildCount(int[] iObjectTypes_p,
                  int iContext_p)
                  throws Exception
get the number of children

Parameters:
iObjectTypes_p - the requested object types (folder or document)
iContext_p - OwStatusContextDefinitions
Returns:
int number of children or throws OwStatusContextException
Throws:
Exception

changeClass

void changeClass(String strNewClassName_p,
                 OwPropertyCollection properties_p,
                 OwPermissionCollection permissions_p)
                 throws Exception
change the class of the object

Parameters:
strNewClassName_p -
properties_p - OwPropertyCollection (optional, can be null to set previous properties)
permissions_p - OwPermissionCollection (optional, can be null to set previous permissions)
Throws:
Exception

canChangeClass

boolean canChangeClass()
                       throws Exception
check if object can change its class

Throws:
Exception

canFilterChilds

boolean canFilterChilds()
                        throws Exception
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

Returns:
true = filter children with FilterCriteria_p is possible, false = filter is not possible / ignored
Throws:
Exception

getFilterProperties

Collection getFilterProperties(Collection propertynames_p)
                               throws Exception
get a collection of OwFieldDefinition's for a given list of names

Parameters:
propertynames_p - Collection of property names the client wants to use as filter properties or null to retrieve all possible filter properties
Returns:
Collection of OwFieldDefinition's that can actually be filtered, may be a subset of propertynames_p, or null if no filter properties are allowed
Throws:
Exception

getVersionSeries

OwVersionSeries getVersionSeries()
                                 throws Exception
get the version series object to this object, if the object is versionable

Returns:
a list of object versions, or null if object contains no versions
Throws:
Exception

hasVersionSeries

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

Returns:
true if object is versionable
Throws:
Exception

getVersion

OwVersion getVersion()
                     throws Exception
get the current version object

Returns:
OwVersion Object identifying the currently set version, or null if versions not supported
Throws:
Exception

getProperty

OwProperty getProperty(String strPropertyName_p)
                       throws Exception
retrieve the specified property from the object. NOTE: if the property was not already obtained from the archive (e.g. by OwNetwork.doSearch(...,PropertyList)), than the ECM Adapter has to launch a new query. It is therefore best practice to obtain the needed properties in advance in a call to OwNetwork.doSearch(...) ==> Alternatively you can use the getProperties Function to retrieve a whole bunch of properties in one step, making the ECM adaptor use only one new query.

Parameters:
strPropertyName_p - the name of the requested property
Returns:
a property object
Throws:
Exception

getProperties

OwPropertyCollection getProperties(Collection propertyNames_p)
                                   throws Exception
retrieve the specified properties from the object. NOTE: The returned collection might contain more Properties than requested with PropertyNames_p

NOTE: if the properties where not already obtained from the archive (e.g. by OwNetwork.doSearch(...,PropertyList)), than the ECM Adapter has to launch a new query. It is therefore best practice to obtain the needed properties in advance in a call to OwNetwork.doSearch(...)

Parameters:
propertyNames_p - a collection of property names to retrieve, if null all properties are retrieved
Returns:
a property list
Throws:
Exception

getClonedProperties

OwPropertyCollection getClonedProperties(Collection propertyNames_p)
                                         throws Exception
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. by OwNetwork.doSearch(...,PropertyList)), than the ECM Adapter has to launch a new query. It is therefore best practice to obtain the needed properties in advance in a call to OwNetwork.doSearch(...)

Parameters:
propertyNames_p - a collection of property names to retrieve, if null all properties are retrieved
Returns:
a property list
Throws:
Exception

setProperties

void setProperties(OwPropertyCollection properties_p)
                   throws Exception
set the properties in the object

Parameters:
properties_p - OwPropertyList list of OwProperties to set
Throws:
Exception

setProperties

void setProperties(OwPropertyCollection properties_p,
                   Object mode_p)
                   throws Exception
set the properties in the object

Parameters:
properties_p - OwPropertyList list of OwProperties to set
mode_p - mode to use or null to use default mode, @see OwObjectClass.getModes(int)
Throws:
Exception

canSetProperties

boolean canSetProperties(int iContext_p)
                         throws Exception
check if object allows to set / change properties

Parameters:
iContext_p - OwStatusContextDefinitions
Returns:
true if allowed
Throws:
Exception

canGetProperties

boolean canGetProperties(int iContext_p)
                         throws Exception
check if property retrieval is allowed

Parameters:
iContext_p - OwStatusContextDefinitions
Returns:
true if allowed
Throws:
Exception

canLock

boolean canLock()
                throws Exception
check if object supports lock mechanism

Returns:
true, if object supports lock, i.e. the setLock function works
Throws:
Exception

setLock

boolean setLock(boolean fLock_p)
                throws Exception
lock / unlock object, make it unaccessible for other users

Parameters:
fLock_p - true to lock it, false to unlock it.
Returns:
the new lock state of the object
Throws:
Exception

getLock

boolean getLock(int iContext_p)
                throws Exception
get the lock state of the object for ALL users

Parameters:
iContext_p - OwStatusContextDefinitions
Returns:
the lock state of the object
Throws:
Exception

getMyLock

boolean getMyLock(int iContext_p)
                  throws Exception
get the lock state of the object for the CURRENTLY logged on user

Parameters:
iContext_p - OwStatusContextDefinitions
Returns:
the lock state of the object
Throws:
Exception

getLockUserID

String getLockUserID(int iContext_p)
                     throws Exception
get the lock user of the object

Parameters:
iContext_p - OwStatusContextDefinitions
Returns:
the User ID of the user who locked the item, or null if it is not locked
Throws:
Exception

delete

void delete()
            throws Exception
delete object and all references from DB

Throws:
Exception

canDelete

boolean canDelete(int iContext_p)
                  throws Exception
check if object can be deleted and if user has sufficient access rights

Parameters:
iContext_p - OwStatusContextDefinitions
Returns:
true, if delete operation works on object
Throws:
Exception

removeReference

void removeReference(OwObject oObject_p)
                     throws Exception
removes the reference of the given object from this object (folder) this object needs to be parent of given object

Parameters:
oObject_p - OwObject reference to be removed from this object (folder)
Throws:
Exception

canRemoveReference

boolean canRemoveReference(OwObject oObject_p,
                           int iContext_p)
                           throws Exception
checks if the reference can be removed this object needs to be parent of given object, and user needs to have sufficient access rights

Parameters:
oObject_p - OwObject reference to be checked upon
iContext_p - OwStatusContextDefinitions
Returns:
true, if given OwObject reference can be removed from this object (folder)
Throws:
Exception

add

void add(OwObject oObject_p)
         throws Exception
adds a object reference to this parent object (folder)

Parameters:
oObject_p - OwObject reference to add to
Throws:
Exception

canAdd

boolean canAdd(OwObject oObject_p,
               int iContext_p)
               throws Exception
checks if object supports add function and if user has sufficient access rights

Parameters:
oObject_p - OwObject reference to be added
iContext_p - OwStatusContextDefinitions
Returns:
true if object supports add function
Throws:
Exception

move

void move(OwObject oObject_p,
          OwObject oldParent_p)
          throws Exception
moves a object reference to this parent object (folder)

Parameters:
oObject_p - OwObject reference to add to this folder
oldParent_p - OwObject Old Parent to remove from, used for move operation, can be null
Throws:
Exception

canMove

boolean canMove(OwObject oObject_p,
                OwObject oldParent_p,
                int iContext_p)
                throws Exception
check if move operation is allowed

Parameters:
oObject_p - OwObject reference to add to
oldParent_p - OwObject Old Parent to remove from, used for move operation, can be null
iContext_p - OwStatusContextDefinitions
Throws:
Exception

getSearchTemplate

OwSearchTemplate getSearchTemplate()
                                   throws Exception
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

Returns:
OwSearchTemplate or null if not defined for the object
Throws:
Exception

getColumnInfoList

Collection getColumnInfoList()
                             throws Exception
get the column info list that describes the columns for the child list

Returns:
List of OwFieldColumnInfo, or null if not defined
Throws:
Exception

getResource

OwResource getResource()
                       throws Exception
get the resource the object belongs to in a multiple resource Network

Returns:
OwResource to identify the resource, or null for the default resource
Throws:
Exception

getPermissions

OwPermissionCollection getPermissions()
                                      throws Exception
get the permissions object

Returns:
OwPermissionCollection of the object
Throws:
Exception

getClonedPermissions

OwPermissionCollection getClonedPermissions()
                                            throws Exception
get the cloned permissions

Returns:
OwPermissionCollection clone of the object
Throws:
Exception

canGetPermissions

boolean canGetPermissions()
                          throws Exception
check if permissions are accessible

Returns:
true = permissions can be retrieved
Throws:
Exception

canSetPermissions

boolean canSetPermissions()
                          throws Exception
check if permissions can be set

Returns:
true = permissions can be set
Throws:
Exception

setPermissions

void setPermissions(OwPermissionCollection permissions_p)
                    throws Exception
set the permissions object

Parameters:
permissions_p - OwPermissionCollection to set
Throws:
Exception

getContentCollection

OwContentCollection getContentCollection()
                                         throws Exception
get the content of the object

Returns:
OwContentCollection
Throws:
Exception

setContentCollection

void setContentCollection(OwContentCollection content_p)
                          throws Exception
set the content to the object

Parameters:
content_p - OwContentCollection to store in the object
Throws:
Exception

canSetContent

boolean canSetContent(int iContentType_p,
                      int iContext_p)
                      throws Exception
check if content can be set on this document with setContent

Parameters:
iContentType_p - int designating the type of content (CONTENT_TYPE_DOCUMENT, CONTENT_TYPE_ANNOTATION,...)
iContext_p - OwStatusContextDefinitions
Returns:
true, if content can be set with setContent
Throws:
Exception

canGetContent

boolean canGetContent(int iContentType_p,
                      int iContext_p)
                      throws Exception
check if content retrieval is allowed

Parameters:
iContentType_p - int designating the type of content (CONTENT_TYPE_DOCUMENT, CONTENT_TYPE_ANNOTATION,...)
iContext_p - OwStatusContextDefinitions
Returns:
true if allowed
Throws:
Exception

refreshProperties

void refreshProperties()
                       throws Exception
refresh the property cache

Throws:
Exception

refreshProperties

void refreshProperties(Collection props_p)
                       throws Exception
refresh the property cache

Parameters:
props_p - Collection of property names to update
Throws:
Exception

getNativeObject

Object getNativeObject()
                       throws Exception
get the native object from the ECM system NOTE: The returned object is Opaque. Using the native object makes the client dependent on the ECM System

Returns:
Object native to the ECM System
Throws:
Exception

getPath

String getPath()
               throws Exception
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. Unlike the symbol name and the DMSID, the path is not necessarily unique, but provides a readable information of the objects location.

Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.