public abstract class OwStandardHistoryManager extends Object implements OwHistoryManager
Base implementation for history managers to collect and retrieve history information.
History Events are collected both in the EcmAdapter and in the Workdesk itself.
Most ECM Systems will write their own history and so the history manager needs only to read that information.
If the ECM System does not write a history, then the Adapter needs to write events to a database
and the history manager needs to read the events there.
For Workdesk events such as a clicked plugin the addEntry function needs to be
implemented and the event needs to be written to a database.
To be implemented with the specific ECM system.
You get a instance of the HistoryManager by calling getContext().getHistoryManager().
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
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 |
---|
OwStandardHistoryManager() |
Modifier and Type | Method and Description |
---|---|
void |
addEvent(int eventType_p,
String strEventID_p,
OwEvent event_p,
int status_p)
add a new history event to the history database if supported by the historymanager
|
static void |
addEventIDDisplayString(String id_p,
OwString displaystring_p)
add a string to the static map
|
boolean |
canPageSearch()
check for support paging in search
|
OwObjectCollection |
doObjectSearch(OwObjectReference object_p,
OwSearchNode filterCriteria_p,
OwSort sortCriteria_p,
Collection propertyNames_p,
int[] includeSubObjectTypes_p,
int maxSize_p)
Search for in memory history entries.
|
OwIterable<OwHistoryEntry> |
doSearch(OwSearchNode searchClause,
OwLoadContext loadContext)
performs a search on the network and returns an iterable collection of results
corresponding to the given search clause in the given load context
|
protected OwXMLUtil |
getConfigNode()
get configuration node with XML config information
|
OwHistoryManagerContext |
getContext()
get the application context
|
protected List |
getDMSIdsFromEvent(OwEvent event_p)
Create a list of object DMSIDs affected by this event.
|
static String |
getEventIDDisplayName(Locale locale_p,
String strEventID_p)
get displayname for given predefined event ID as defined in HISTORY_EVENT_ID_...
|
static Collection |
getEventIDs()
get the predefined event IDs
|
static OwEnumCollection |
getEventStatusEnum()
get a OwEnum enumerator for Combobox selection
|
static OwEnumCollection |
getEventTypeEnum()
get a OwEnum enumerator for Combobox selection
|
OwNetwork |
getNetwork()
get a reference to the network adapter
|
void |
init(OwHistoryManagerContext mainContext_p,
OwXMLUtil configNode_p)
init the manager, set context
|
void |
setNetwork(OwNetwork network_p)
set a reference to the network adapter
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addEvent
canBatch, canRefreshStaticClassdescriptions, closeBatch, doSearch, getDMSPrefix, getEventManager, getObjectClass, getObjectClassNames, getObjectFromDMSID, getObjectFromPath, getResource, getResourceIDs, openBatch, refreshStaticClassdescriptions, releaseResources
getFieldDefinition, getWildCardDefinitions
public static void addEventIDDisplayString(String id_p, OwString displaystring_p)
id_p
- displaystring_p
- public static String getEventIDDisplayName(Locale locale_p, String strEventID_p)
public static Collection getEventIDs()
public static OwEnumCollection getEventTypeEnum()
public static OwEnumCollection getEventStatusEnum()
protected OwXMLUtil getConfigNode()
public OwHistoryManagerContext getContext()
public void init(OwHistoryManagerContext mainContext_p, OwXMLUtil configNode_p) throws Exception
init
in interface OwHistoryManager
configNode_p
- OwXMLUtil node with configuration informationmainContext_p
- reference to the main app context of the applicationException
public void setNetwork(OwNetwork network_p)
setNetwork
in interface OwHistoryManager
network_p
- OwNetworkpublic OwNetwork getNetwork()
public OwObjectCollection doObjectSearch(OwObjectReference object_p, OwSearchNode filterCriteria_p, OwSort sortCriteria_p, Collection propertyNames_p, int[] includeSubObjectTypes_p, int maxSize_p) throws Exception
doObjectSearch
in interface OwHistoryManager
object_p
- OwObjectReference to find entries forfilterCriteria_p
- OwSearchNode to refine the search or null to retrieve all entriessortCriteria_p
- OwSort to apply, or nullpropertyNames_p
- Collection of properties to retrieve with the history entriesincludeSubObjectTypes_p
- array of child OwObject types to be included in history, or nullmaxSize_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 void addEvent(int eventType_p, String strEventID_p, OwEvent event_p, int status_p) throws Exception
OwEventManager
addEvent
in interface OwEventManager
eventType_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
- OwEvent according to iEventType_p, contains additional information, such as the affected Objects or propertiesstatus_p
- int as defined in OwHistoryManager.HISTORY_STATUS_...Exception
OwEventManager.addEvent(int, java.lang.String, com.wewebu.ow.server.event.OwEvent, int)
protected List getDMSIdsFromEvent(OwEvent event_p) throws Exception
event_p
- - the event.java.util.List
- a list of DMSID affected by the given event.Exception
public OwIterable<OwHistoryEntry> doSearch(OwSearchNode searchClause, OwLoadContext loadContext) throws OwException
OwRepository
doSearch
in interface OwRepository<OwHistoryEntry>
OwIterable
OwException
public boolean canPageSearch()
OwRepository
canPageSearch
in interface OwRepository<OwHistoryEntry>
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.