com.wewebu.ow.server.ecm
Interface OwRepository

All Superinterfaces:
OwFieldDefinitionProvider
All Known Subinterfaces:
OwHistoryManager, OwNetwork, OwWorkitemRepository
All Known Implementing Classes:
OwSimpleHistoryManager, OwStandardHistoryManager

public interface OwRepository
extends OwFieldDefinitionProvider

Base interface for Repositories. Subclasses are OwNetwork and OwHistoryManager.
Offers search and browse functions for Objects stored in the repository.

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


Method Summary
 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 doSearch(OwSearchNode searchCriteria_p, OwSort sortCriteria_p, Collection propertyNames_p, int iMaxSize_p, int iVersionSelection_p)
          performs a search on the network and returns a result list, if more than iMaxSize_p objects are found then doSearch returns the first iMaxSize_p Objects
 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
 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, OwObjectReference.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
 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
 
Methods inherited from interface com.wewebu.ow.server.field.OwFieldDefinitionProvider
getFieldDefinition, getWildCardDefinitions
 

Method Detail

refreshStaticClassdescriptions

void refreshStaticClassdescriptions()
                                    throws Exception
force the network adapter to reload all the static class description data.

Throws:
Exception

canRefreshStaticClassdescriptions

boolean canRefreshStaticClassdescriptions()
                                          throws Exception
check if reload of all the static class description data is supported / necessary.

Returns:
boolean true = refresh is supported and should be done, false = refresh is not supported and not necessary.
Throws:
Exception

doSearch

OwObjectCollection doSearch(OwSearchNode searchCriteria_p,
                            OwSort sortCriteria_p,
                            Collection propertyNames_p,
                            int iMaxSize_p,
                            int iVersionSelection_p)
                            throws Exception
performs a search on the network and returns a result list, if more than iMaxSize_p objects are found then doSearch returns the first iMaxSize_p Objects

Parameters:
searchCriteria_p - list of search criteria
sortCriteria_p - optional list of sort criteria
propertyNames_p - a optional Collection of properties to retrieve with the documents, can be null
iMaxSize_p - int value to specify the maximum size of the OwObjectCollection if more objects match the criteria
iVersionSelection_p - int Selects the versions as defined in OwSearchTemplate.VERSION_SELECT_... or (OwSearchTemplate.VERSION_SELECT_DEFAULT or 0) to use default version
Returns:
list of found objects
Throws:
Exception

getObjectFromDMSID

OwObject getObjectFromDMSID(String strDMSID_p,
                            boolean fRefresh_p)
                            throws Exception
reconstructs an Object from ECM Id, OwObjectReference.getDMSID() for details.

Parameters:
strDMSID_p - ECM ID for the requested object
fRefresh_p - true = force refresh of object from ECM System, false = may use cached object
Returns:
an Object Instance
Throws:
Exception

getObjectFromPath

OwObject getObjectFromPath(String strPath_p,
                           boolean fRefresh_p)
                           throws Exception
get object from given path

Parameters:
strPath_p - path to the object starting with "/..."
fRefresh_p - true = force refresh of object from ECM System, false = may use cached object
Returns:
OwObject
Throws:
Exception

getObjectClass

OwObjectClass getObjectClass(String strClassName_p,
                             OwResource resource_p)
                             throws Exception
get a Property class description of the available object class descriptions

Parameters:
strClassName_p - Name of class
resource_p - OwResource to retrieve the objects from, or null to use the default resource
Returns:
OwObjectClass instance
Throws:
Exception

getObjectClassNames

Map getObjectClassNames(int[] iTypes_p,
                        boolean fExcludeHiddenAndNonInstantiable_p,
                        boolean fRootOnly_p,
                        OwResource resource_p)
                        throws Exception
get a list of the available object class descriptions names

Parameters:
iTypes_p - int array of Object types as defined in OwObject, if null to retrieve all class names
fExcludeHiddenAndNonInstantiable_p - boolean true = exclude all hidden and non instantiable class descriptions
fRootOnly_p - true = gets only the root classes if we deal with a class tree, false = gets all classes
resource_p - OwResource to retrieve the objects from, or null to use the default resource
Returns:
Map of symbol name keys mapped to displaynames
Throws:
Exception

getResource

OwResource getResource(String strID_p)
                       throws Exception
get the resource with the specified key

Parameters:
strID_p - String resource ID, if strID_p is null returns the default resource or OwObjectNotFoundException
Returns:
OwResource
Throws:
Exception

getResourceIDs

Iterator getResourceIDs()
                        throws Exception
get a Iterator of available resource IDs

Returns:
Collection of resource IDs used in getResource, or null if no resources are available
Throws:
Exception

getEventManager

OwEventManager getEventManager()
get the instance of the history manager


getDMSPrefix

String getDMSPrefix()
get a prefix which is used to distinguish the DMSID of objects from the repository


releaseResources

void releaseResources()
                      throws Exception
releases all resources that have been used during this session

Throws:
Exception

canBatch

boolean canBatch()
check if repository supports batch operations

Returns:
true if repository supports batch operations, false otherwise
See Also:
openBatch(), closeBatch(OwBatch)

openBatch

OwBatch openBatch()
                  throws OwException
open a new batch operation

Returns:
OwBatch operator
Throws:
OwException
See Also:
canBatch(), closeBatch(OwBatch)

closeBatch

void closeBatch(OwBatch batch_p)
                throws OwException
close a batch operation, if the batch was not committed, rollback the batch

Throws:
OwException
See Also:
canBatch(), openBatch()


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.