public class OwSimpleHistoryManager extends OwStandardHistoryManager
Simple implementation for the history manager, does not create a history.
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
Modifier and Type | Field and Description |
---|---|
static String |
DMS_PREFIX
DMS prefix to identify this adapter
|
HISTORY_EVENT_ID_COPY_OBJECT, HISTORY_EVENT_ID_DOWNLOAD, HISTORY_EVENT_ID_LOGIN, HISTORY_EVENT_ID_LOGOFF, HISTORY_EVENT_ID_NEW_OBJECT, HISTORY_EVENT_ID_OBJECT_ADD, HISTORY_EVENT_ID_OBJECT_CANCELCHECKOUT, HISTORY_EVENT_ID_OBJECT_CHECKIN, HISTORY_EVENT_ID_OBJECT_CHECKOUT, HISTORY_EVENT_ID_OBJECT_DELETE, HISTORY_EVENT_ID_OBJECT_DEMOTE, HISTORY_EVENT_ID_OBJECT_DISPATCH, HISTORY_EVENT_ID_OBJECT_GENERIC, HISTORY_EVENT_ID_OBJECT_LOCK, HISTORY_EVENT_ID_OBJECT_MODIFY_ANNOTATIONS, HISTORY_EVENT_ID_OBJECT_MODIFY_PERMISSIONS, HISTORY_EVENT_ID_OBJECT_MODIFY_PROPERTIES, HISTORY_EVENT_ID_OBJECT_MOVE, HISTORY_EVENT_ID_OBJECT_PROMOTE, HISTORY_EVENT_ID_OBJECT_REMOVE_REF, HISTORY_EVENT_ID_OBJECT_RESUBMIT, HISTORY_EVENT_ID_OBJECT_RETURN_TO_SOURCE, HISTORY_EVENT_ID_SEARCH, HISTORY_EVENT_ID_UPLOAD, HISTORY_EVENT_TYPE_CLEAR_SESSION_HISTORY_FOR_OBJECT, HISTORY_EVENT_TYPE_ECM, HISTORY_EVENT_TYPE_GENERIC, HISTORY_EVENT_TYPE_OBJECT, HISTORY_EVENT_TYPE_PLUGIN_DSPATCH, HISTORY_EVENT_TYPE_PLUGIN_INVOKE_EDIT, HISTORY_EVENT_TYPE_PLUGIN_INVOKE_UI, HISTORY_EVENT_TYPE_PLUGIN_INVOKE_VIEW, HISTORY_EVENT_TYPE_PROPERTY, HISTORY_EVENT_TYPE_VERSION, HISTORY_STATUS_BEGIN, HISTORY_STATUS_CANCEL, HISTORY_STATUS_DISABLED, HISTORY_STATUS_FAILED, HISTORY_STATUS_OK
Constructor and Description |
---|
OwSimpleHistoryManager() |
Modifier and Type | Method and Description |
---|---|
void |
addEvent(int iEventType_p,
String strEventID_p,
int iStatus_p)
add a new history event to the history database if supported by the historymanager
|
void |
addEvent(int iEventType_p,
String strEventID_p,
OwEvent event_p,
int iStatus_p)
add a new history event to the history database if supported by the historymanager
|
boolean |
canBatch()
check if repository supports batch operations
|
boolean |
canRefreshStaticClassdescriptions()
check if reload of all the static class description data is supported / necessary.
|
void |
closeBatch(OwBatch batch_p)
close a batch operation, if the batch was not committed, rollback the batch
|
OwObjectCollection |
doObjectSearch(OwObjectReference object_p,
OwSearchNode filterCriteria_p,
OwSort sortCriteria_p,
Collection propertyNames_p,
int[] includeSubObjectTypes_p,
int iMaxSize_p)
search for entries in the database for a specific ECM object
|
OwObjectCollection |
doSearch(OwSearchNode filterCriteria_p,
OwSort sortCriteria_p,
Collection propertyNames_p,
int iMaxSize_p,
int iVersionSelection_p)
search for entries in the database
|
String |
getDMSPrefix()
get a prefix which is used to distinguish the DMSID of objects from the repository
|
OwEventManager |
getEventManager()
get the instance of the history manager
|
OwFieldDefinition |
getFieldDefinition(String strFieldDefinitionName_p,
String strResourceName_p)
get a field definition for the given name and resource
|
OwObjectClass |
getObjectClass(String strClassName_p,
OwResource resource_p)
get a Property class description of the available object class descriptions
|
Map |
getObjectClassNames(int[] iTypes_p,
boolean fExcludeHiddenAndNonInstantiable_p,
boolean fRootOnly_p,
OwResource resource_p)
get a list of the available object class descriptions names
|
OwObject |
getObjectFromDMSID(String strDMSID_p,
boolean fRefresh_p)
reconstructs an Object from ECM Id, see OwObject.getDMSID for details.
|
OwObject |
getObjectFromPath(String strPath_p,
boolean fRefresh_p)
get object from given path
|
OwResource |
getResource(String strID_p)
get the resource with the specified key
|
Iterator |
getResourceIDs()
get a Iterator of available resource IDs
|
Collection |
getWildCardDefinitions(String strFieldDefinitionName_p,
String strResourceName_p,
int iOp_p)
get a collection of wild card definitions that are allowed for the given field, resource and search operator
|
OwBatch |
openBatch()
open a new batch operation
|
void |
refreshStaticClassdescriptions()
force the network adapter to reload all the static class description data.
|
void |
releaseResources()
releases all resources that have been used during this session
|
addEventIDDisplayString, canPageSearch, doSearch, getConfigNode, getContext, getDMSIdsFromEvent, getEventIDDisplayName, getEventIDs, getEventStatusEnum, getEventTypeEnum, getNetwork, init, setNetwork
public static final String DMS_PREFIX
public void addEvent(int iEventType_p, String strEventID_p, OwEvent event_p, int iStatus_p) throws Exception
addEvent
in interface OwEventManager
addEvent
in class OwStandardHistoryManager
iEventType_p
- int type of event as defined in OwHistoryManager.HISTORY_EVENT_TYPE_...strEventID_p
- Id of event such as a plugin id, can be nullevent_p
- OwHistoryEvent according to iEventType_p, contains additional information, such as the affected Objects or propertiesiStatus_p
- int as defined in OwHistoryManager.HISTORY_STATUS_...Exception
OwEventManager.addEvent(int, java.lang.String, com.wewebu.ow.server.event.OwEvent, int)
public void addEvent(int iEventType_p, String strEventID_p, int iStatus_p) throws Exception
iEventType_p
- int type of event as defined in OwHistoryManager.HISTORY_EVENT_TYPE_...strEventID_p
- Id of event such as a plugin id, can be nulliStatus_p
- int as defined in OwHistoryManager.HISTORY_STATUS_...Exception
public OwObjectCollection doSearch(OwSearchNode filterCriteria_p, OwSort sortCriteria_p, Collection propertyNames_p, int iMaxSize_p, int iVersionSelection_p) throws Exception
filterCriteria_p
- OwSearchNode to refine the search or null to retrieve all entriessortCriteria_p
- OwSort to applypropertyNames_p
- Collection of properties to retrieve with the history entriesiMaxSize_p
- max size of entries to retrieveiVersionSelection_p
- int Selects the versions as defined in OwSearchTemplate.VERSION_SELECT_... or 0 to use default versionException
public OwObjectCollection doObjectSearch(OwObjectReference object_p, OwSearchNode filterCriteria_p, OwSort sortCriteria_p, Collection propertyNames_p, int[] includeSubObjectTypes_p, int iMaxSize_p) throws Exception
doObjectSearch
in interface OwHistoryManager
doObjectSearch
in class OwStandardHistoryManager
object_p
- OwObject to find entries forfilterCriteria_p
- OwSearchNode to refine the search or null to retrieve all entriessortCriteria_p
- OwSort to applypropertyNames_p
- Collection of properties to retrieve with the history entriesincludeSubObjectTypes_p
- array of child OwObject types to be included in history, or nulliMaxSize_p
- max size of entries to retrieveException
OwHistoryManager.doObjectSearch(com.wewebu.ow.server.ecm.OwObjectReference, com.wewebu.ow.server.field.OwSearchNode, com.wewebu.ow.server.field.OwSort, java.util.Collection, int[], int)
public OwFieldDefinition getFieldDefinition(String strFieldDefinitionName_p, String strResourceName_p) throws Exception, OwObjectNotFoundException
strFieldDefinitionName_p
- Name of the field definition classstrResourceName_p
- optional name of the resource if there are several different resources for field definitions, can be nullException
OwObjectNotFoundException
public OwObject getObjectFromDMSID(String strDMSID_p, boolean fRefresh_p) throws Exception
strDMSID_p
- ECM ID for the requested objectfRefresh_p
- true = force refresh of object from ECM System, false = may use cached objectException
public OwObject getObjectFromPath(String strPath_p, boolean fRefresh_p) throws Exception
strPath_p
- path to the object starting with "/..."fRefresh_p
- true = force refresh of object from ECM System, false = may use cached objectException
public OwObjectClass getObjectClass(String strClassName_p, OwResource resource_p) throws Exception
strClassName_p
- Name of classresource_p
- OwResource to retrieve the objects from, or null to use the default resourceException
public Map getObjectClassNames(int[] iTypes_p, boolean fExcludeHiddenAndNonInstantiable_p, boolean fRootOnly_p, OwResource resource_p) throws Exception
iTypes_p
- int array of Object types as defined in OwObject, of null to retrieve all class namesfExcludeHiddenAndNonInstantiable_p
- boolean true = exclude all hidden and non instantiable class descriptionsfRootOnly_p
- true = gets only the root classes if we deal with a class tree, false = gets all classesresource_p
- OwResource to retrieve the objects from, or null to use the default resourceException
public OwResource getResource(String strID_p) throws Exception
strID_p
- String resource ID, if strID_p is null, returns the default resourceOwResource
Exception
public Iterator getResourceIDs() throws Exception
Exception
public OwEventManager getEventManager()
public void refreshStaticClassdescriptions() throws Exception
Exception
public boolean canRefreshStaticClassdescriptions() throws Exception
Exception
public String getDMSPrefix()
public void releaseResources() throws Exception
Exception
public Collection getWildCardDefinitions(String strFieldDefinitionName_p, String strResourceName_p, int iOp_p) throws Exception
strFieldDefinitionName_p
- Name of the field definition classstrResourceName_p
- optional name of the resource if there are several different resources for field definitions, can be nulliOp_p
- search operator as defined in OwSearchOperator CRIT_OP_...Exception
public boolean canBatch()
OwRepository
OwRepository.openBatch()
,
OwRepository.closeBatch(OwBatch)
public void closeBatch(OwBatch batch_p) throws OwInvalidOperationException
OwRepository
OwInvalidOperationException
OwRepository.canBatch()
,
OwRepository.openBatch()
public OwBatch openBatch() throws OwInvalidOperationException
OwRepository
OwInvalidOperationException
OwRepository.canBatch()
,
OwRepository.closeBatch(OwBatch)
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.