com.wewebu.ow.server.ecmimpl.owdummy
Class OwDummyWorkitemContainer

java.lang.Object
  extended by com.wewebu.ow.server.ecm.OwFileObject
      extended by com.wewebu.ow.server.ecmimpl.owdummy.OwDummyWorkitemContainer
All Implemented Interfaces:
com.wewebu.ow.server.ecm.bpm.OwWorkitemContainer, com.wewebu.ow.server.ecm.OwContentCollection, com.wewebu.ow.server.ecm.OwContentElement, com.wewebu.ow.server.ecm.OwObject, com.wewebu.ow.server.ecm.OwObjectReference, com.wewebu.ow.server.field.OwFieldProvider
Direct Known Subclasses:
OwDummyLaunchWorkitemContainer

public class OwDummyWorkitemContainer
extends com.wewebu.ow.server.ecm.OwFileObject
implements com.wewebu.ow.server.ecm.bpm.OwWorkitemContainer

Implementation for the dummy BPM Repository.

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
 
Nested classes/interfaces inherited from class com.wewebu.ow.server.ecm.OwFileObject
com.wewebu.ow.server.ecm.OwFileObject.OwFileObjectClass, com.wewebu.ow.server.ecm.OwFileObject.OwFilePropertyClass, com.wewebu.ow.server.ecm.OwFileObject.OwObjectFileFilter
 
Field Summary
protected  OwDummyWorkitemRepository m_repository
           
 
Fields inherited from class com.wewebu.ow.server.ecm.OwFileObject
m_DirectoryClassDescription, m_eventmanager, m_File, m_FileClassDescription, m_locale, m_PropertyMap
 
Fields inherited from interface com.wewebu.ow.server.ecm.bpm.OwWorkitemContainer
FILTER_TYPE_NONE, FILTER_TYPE_NORMAL, FILTER_TYPE_RESUBMISSION, GROUPBOX_PROPERTY_NAME
 
Fields inherited from interface com.wewebu.ow.server.ecm.OwObject
STANDARD_PATH_DELIMITER
 
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
 
Fields inherited from interface com.wewebu.ow.server.ecm.OwContentCollection
CONTENT_REPRESENTATION_TYPE_NONE, CONTENT_REPRESENTATION_TYPE_OBJECT, CONTENT_REPRESENTATION_TYPE_STREAM, CONTENT_REPRESENTATION_TYPE_URL, CONTENT_REPRESENTATION_TYPE_USER_START, CONTENT_TYPE_ANNOTATION, CONTENT_TYPE_DOCUMENT, CONTENT_TYPE_SECURITY, CONTENT_TYPE_USER_START
 
Constructor Summary
OwDummyWorkitemContainer(OwDummyWorkitemRepository repository_p, File file_p, String sMimeType_p, int iType_p)
          construct a dummy work item container
 
Method Summary
 boolean canPull(int iContext_p)
          check if container supports work item pull, see pull
 boolean canResubmit()
           
protected  com.wewebu.ow.server.ecm.OwFileObject createFileObject(File file_p)
          overridable factory method
 int getChildCount(int[] iObjectTypes_p, int iContext_p)
           
 com.wewebu.ow.server.ecm.OwObjectCollection getChilds(int[] iObjectTypes_p, Collection propertyNames_p, com.wewebu.ow.server.field.OwSort sort_p, int iMaxSize_p, int iVersionSelection_p, com.wewebu.ow.server.field.OwSearchNode filterCriteria_p)
           
 Collection getDefaultUsers()
          get a collection of users that should be offered to the users for reassignment.
The dummy implementation returns a hard-coded list of users.
 Collection getFilterProperties(Collection propertynames_p)
           
 int getFilterType()
          get a filter to filter specific items in getChilds in addition to the getChilds OwSearchNode parameter
 String getMIMEType()
           
 String getPublicReassignContainerDisplayName(String sName_p)
           
 Collection getPublicReassignContainerNames()
           
 com.wewebu.ow.server.field.OwSearchTemplate getSearchTemplate()
           
 int getType()
           
 com.wewebu.ow.server.ecm.bpm.OwWorkitem pull(com.wewebu.ow.server.field.OwSort sort_p, Set exclude_p)
          pulls the next available work item out of the container and locks it for the user
 void setFilterType(int iFilterType_p)
          set a filter to filter specific items in getChilds in addition to the getChilds OwSearchNode parameter
 
Methods inherited from class com.wewebu.ow.server.ecm.OwFileObject
add, canAdd, canChangeClass, canDelete, canFilterChilds, canGetContent, canGetPermissions, canGetProperties, canLock, canMove, canRemoveReference, canSetContent, canSetPermissions, canSetProperties, changeClass, delete, exists, getClassName, getClonedPermissions, getClonedProperties, getColumnInfoList, getContentCollection, getContentElement, getContentFilePath, getContentObject, getContentRepresentation, getContentStream, getContentTypes, getContentURL, getDMSID, getField, getFieldProviderName, getFieldProviderSource, getFieldProviderType, getFields, getFileObject, getID, getInstance, getLock, getLockUserID, getMIMEParameter, getMyLock, getName, getNativeObject, getNetwork, getObjectClass, getPageCount, getPageNumber, getParents, getPath, getPermissions, getProperties, getProperty, getResource, getResourceID, getSafeFieldValue, getVersion, getVersionSeries, hasChilds, hasContent, hasVersionSeries, isInputStreamNative, loadProperties, move, refreshProperties, refreshProperties, releaseResources, removeReference, setContentCollection, setField, setLock, setPermissions, setProperties, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.wewebu.ow.server.ecm.OwObject
add, canAdd, canChangeClass, canDelete, canFilterChilds, canGetContent, canGetPermissions, canGetProperties, canLock, canMove, canRemoveReference, canSetContent, canSetPermissions, canSetProperties, changeClass, delete, getClassName, getClonedPermissions, getClonedProperties, getColumnInfoList, getContentCollection, getLock, getLockUserID, getMyLock, getNativeObject, getObjectClass, getParents, getPath, getPermissions, getProperties, getProperty, getResource, getVersion, getVersionSeries, hasChilds, hasVersionSeries, move, refreshProperties, refreshProperties, removeReference, setContentCollection, setLock, setPermissions, setProperties, setProperties
 
Methods inherited from interface com.wewebu.ow.server.ecm.OwObjectReference
getDMSID, getID, getInstance, getMIMEParameter, getName, getPageCount, getResourceID, hasContent
 
Methods inherited from interface com.wewebu.ow.server.field.OwFieldProvider
getField, getFieldProviderName, getFieldProviderSource, getFieldProviderType, getFields, getSafeFieldValue, setField
 

Field Detail

m_repository

protected OwDummyWorkitemRepository m_repository
Constructor Detail

OwDummyWorkitemContainer

public OwDummyWorkitemContainer(OwDummyWorkitemRepository repository_p,
                                File file_p,
                                String sMimeType_p,
                                int iType_p)
                         throws Exception
construct a dummy work item container

Parameters:
repository_p -
file_p -
sMimeType_p -
iType_p -
Throws:
Exception
Method Detail

canResubmit

public boolean canResubmit()
                    throws Exception
Specified by:
canResubmit in interface com.wewebu.ow.server.ecm.bpm.OwWorkitemContainer
Throws:
Exception

getFilterProperties

public Collection getFilterProperties(Collection propertynames_p)
                               throws Exception
Specified by:
getFilterProperties in interface com.wewebu.ow.server.ecm.OwObject
Overrides:
getFilterProperties in class com.wewebu.ow.server.ecm.OwFileObject
Throws:
Exception

getSearchTemplate

public com.wewebu.ow.server.field.OwSearchTemplate getSearchTemplate()
                                                              throws Exception
Specified by:
getSearchTemplate in interface com.wewebu.ow.server.ecm.OwObject
Overrides:
getSearchTemplate in class com.wewebu.ow.server.ecm.OwFileObject
Throws:
Exception

setFilterType

public void setFilterType(int iFilterType_p)
set a filter to filter specific items in getChilds in addition to the getChilds OwSearchNode parameter

Specified by:
setFilterType in interface com.wewebu.ow.server.ecm.bpm.OwWorkitemContainer
Parameters:
iFilterType_p - int as defined in FILTER_TYPE_...

getFilterType

public int getFilterType()
get a filter to filter specific items in getChilds in addition to the getChilds OwSearchNode parameter

Specified by:
getFilterType in interface com.wewebu.ow.server.ecm.bpm.OwWorkitemContainer
Returns:
int as defined in FILTER_TYPE_...

getMIMEType

public String getMIMEType()
                   throws Exception
Specified by:
getMIMEType in interface com.wewebu.ow.server.ecm.OwContentElement
Specified by:
getMIMEType in interface com.wewebu.ow.server.ecm.OwObjectReference
Overrides:
getMIMEType in class com.wewebu.ow.server.ecm.OwFileObject
Throws:
Exception

getType

public int getType()
Specified by:
getType in interface com.wewebu.ow.server.ecm.OwObjectReference
Overrides:
getType in class com.wewebu.ow.server.ecm.OwFileObject

getPublicReassignContainerDisplayName

public String getPublicReassignContainerDisplayName(String sName_p)
Specified by:
getPublicReassignContainerDisplayName in interface com.wewebu.ow.server.ecm.bpm.OwWorkitemContainer

getPublicReassignContainerNames

public Collection getPublicReassignContainerNames()
                                           throws Exception
Specified by:
getPublicReassignContainerNames in interface com.wewebu.ow.server.ecm.bpm.OwWorkitemContainer
Throws:
Exception

createFileObject

protected com.wewebu.ow.server.ecm.OwFileObject createFileObject(File file_p)
                                                          throws Exception
overridable factory method

Overrides:
createFileObject in class com.wewebu.ow.server.ecm.OwFileObject
Parameters:
file_p -
Returns:
an OwFileObject
Throws:
Exception

getChilds

public com.wewebu.ow.server.ecm.OwObjectCollection getChilds(int[] iObjectTypes_p,
                                                             Collection propertyNames_p,
                                                             com.wewebu.ow.server.field.OwSort sort_p,
                                                             int iMaxSize_p,
                                                             int iVersionSelection_p,
                                                             com.wewebu.ow.server.field.OwSearchNode filterCriteria_p)
                                                      throws Exception
Specified by:
getChilds in interface com.wewebu.ow.server.ecm.OwObject
Overrides:
getChilds in class com.wewebu.ow.server.ecm.OwFileObject
Throws:
Exception

getChildCount

public int getChildCount(int[] iObjectTypes_p,
                         int iContext_p)
                  throws Exception
Specified by:
getChildCount in interface com.wewebu.ow.server.ecm.OwObject
Overrides:
getChildCount in class com.wewebu.ow.server.ecm.OwFileObject
Throws:
Exception

canPull

public boolean canPull(int iContext_p)
                throws Exception,
                       com.wewebu.ow.server.ecm.OwStatusContextException
check if container supports work item pull, see pull

Specified by:
canPull in interface com.wewebu.ow.server.ecm.bpm.OwWorkitemContainer
Parameters:
iContext_p - as defined by OwStatusContextDefinitions
Returns:
boolean
Throws:
Exception
com.wewebu.ow.server.ecm.OwStatusContextException

pull

public com.wewebu.ow.server.ecm.bpm.OwWorkitem pull(com.wewebu.ow.server.field.OwSort sort_p,
                                                    Set exclude_p)
                                             throws Exception,
                                                    com.wewebu.ow.server.exceptions.OwObjectNotFoundException,
                                                    com.wewebu.ow.server.exceptions.OwServerException
pulls the next available work item out of the container and locks it for the user

Specified by:
pull in interface com.wewebu.ow.server.ecm.bpm.OwWorkitemContainer
Parameters:
sort_p - OwSort optional sorts the items and takes the first available one, can be null
exclude_p - Set of work item DMSIDs to be excluded, i.e. that may have already been pulled by the user
Returns:
OwWorkitem or OwObjectNotFoundException if no object is available or OwServerException if no object could be pulled within timeout
Throws:
Exception - for general error, or OwServerException if timed out or OwObjectNotFoundException if no work item is available
com.wewebu.ow.server.exceptions.OwObjectNotFoundException
com.wewebu.ow.server.exceptions.OwServerException

getDefaultUsers

public Collection getDefaultUsers()
get a collection of users that should be offered to the users for reassignment.
The dummy implementation returns a hard-coded list of users.

Specified by:
getDefaultUsers in interface com.wewebu.ow.server.ecm.bpm.OwWorkitemContainer
Returns:
Collection of OwUserInfo or null if no default list is available


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.