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

java.lang.Object
  extended by com.wewebu.ow.server.ecmimpl.owdummy.OwDummyNetwork
All Implemented Interfaces:
com.wewebu.ow.server.ecm.OwAuthenticationProvider, com.wewebu.ow.server.ecm.OwNetwork, com.wewebu.ow.server.ecm.OwRepository, com.wewebu.ow.server.field.OwFieldDefinitionProvider

public class OwDummyNetwork
extends Object
implements com.wewebu.ow.server.ecm.OwNetwork

Base Class for the network access. Covers access to all objects in the DMS system. Covers access to the authentication provider as well.
Custom implementation for Workdesk testing purpose only. Used as a dummy DMS 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 DMS_PREFIX
          DMS prefix to identify this adapter
protected  com.wewebu.ow.server.ecm.OwAttributeBagsSupport m_bagsSupport
          attribute bag support
protected static HashMap m_jndiPropertyNames
           
protected static HashMap m_ObjectClassesMap
          map containing the Object class descriptions of the DMS Adapter
protected  String m_preferencesFolder
          preferences folder - can be configured in owbootstrap.xml file
static String OBJECT_CATEGORY_PREFERENCES
          object category for the preferences, which can be user or application defined, like usersettings, recent file list...
static String VIRTUAL_FOLDER_PREFIX
          prefix for DMSID to identify virtual folders
 
Fields inherited from interface com.wewebu.ow.server.ecm.OwNetwork
APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG, APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG_ITERATOR, APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG_WRITABLE, APPLICATION_OBJECT_TYPE_ENTRY_TEMPLATE, APPLICATION_OBJECT_TYPE_ENUM_COLLECTION, APPLICATION_OBJECT_TYPE_INVERTED_ATTRIBUTE_BAG, APPLICATION_OBJECT_TYPE_PREFERENCES, APPLICATION_OBJECT_TYPE_SEARCHTEMPLATE, APPLICATION_OBJECT_TYPE_USER_START, APPLICATION_OBJECT_TYPE_VIRTUAL_FOLDER, APPLICATION_OBJECT_TYPE_XML_DOCUMENT, CAN_DO_FUNCTIONCODE_ACL_TO_MODIFY_ANNOTATION, CAN_DO_FUNCTIONCODE_CREATE_ANNOTATION, CAN_DO_FUNCTIONCODE_DELETE_ANNOTATION, CAN_DO_FUNCTIONCODE_EDIT_ANNOTATION, CAN_DO_FUNCTIONCODE_PRINT, CAN_DO_FUNCTIONCODE_SAVE_CONTENT_TO_DISK, CAN_DO_FUNCTIONCODE_USER_START
 
Constructor Summary
OwDummyNetwork()
           
 
Method Summary
protected  void attributeBagSupportSetup()
          Return Attributebag support to be used.
 boolean canBatch()
           
 boolean canCreateNewObject(com.wewebu.ow.server.ecm.OwResource resource_p, com.wewebu.ow.server.ecm.OwObject parent_p, int iContext_p)
          check, if adaptor can create a new object
 boolean canCreateObjectCopy(com.wewebu.ow.server.ecm.OwObject parent_p, int[] childTypes_p, int iContext_p)
          creates a cloned object with new properties on the DMS system
 boolean canDo(com.wewebu.ow.server.ecm.OwObject obj_p, int iFunctionCode_p, int iContext_p)
          check if a extended function like print can be performed on the given object compared to the OwRoleManager.isAllowed function the canDo function works on objects and is more faster due to the iContext parameter
 boolean canEditAccessRights(com.wewebu.ow.server.ecm.OwObject object_p)
          check if access rights can be edited on the Object.
 boolean canRefreshStaticClassdescriptions()
          check if reload of all the static class description data is supported / necessary.
 boolean canUserSelect()
          check if the user select module is supported i.e.
 void closeBatch(com.wewebu.ow.server.ecm.OwBatch batch_p)
           
 String createNewObject(boolean fPromote_p, Object mode_p, com.wewebu.ow.server.ecm.OwResource resource_p, String strObjectClassName_p, com.wewebu.ow.server.ecm.OwPropertyCollection properties_p, com.wewebu.ow.server.ecm.OwPermissionCollection permissions_p, com.wewebu.ow.server.ecm.OwContentCollection content_p, com.wewebu.ow.server.ecm.OwObject parent_p, String strMimeType_p, String strMimeParameter_p)
          creates a new object on the ECM System using the given parameters has additional promote and checkin mode parameters for versionable objects
 String createNewObject(boolean fPromote_p, Object mode_p, com.wewebu.ow.server.ecm.OwResource resource_p, String strObjectClassName_p, com.wewebu.ow.server.ecm.OwPropertyCollection properties_p, com.wewebu.ow.server.ecm.OwPermissionCollection permissions_p, com.wewebu.ow.server.ecm.OwContentCollection content_p, com.wewebu.ow.server.ecm.OwObject parent_p, String strMimeType_p, String strMimeParameter_p, boolean fKeepCheckedOut_p)
          Creates a new object on the ECM System using the given parameters.
Has additional promote and checkin mode parameters for versionable objects and the extra parameter fKeepCheckedOut_p to control whether the new objects are checked in automatically or not.
 String createNewObject(com.wewebu.ow.server.ecm.OwResource resource_p, String strObjectClassName_p, com.wewebu.ow.server.ecm.OwPropertyCollection properties_p, com.wewebu.ow.server.ecm.OwPermissionCollection permissions_p, com.wewebu.ow.server.ecm.OwContentCollection content_p, com.wewebu.ow.server.ecm.OwObject parent_p, String strMimeType_p, String strMimeParameter_p)
          creates a new object on the ECM System using the given parameters
 String createObjectCopy(com.wewebu.ow.server.ecm.OwObject obj_p, com.wewebu.ow.server.ecm.OwPropertyCollection properties_p, com.wewebu.ow.server.ecm.OwPermissionCollection permissions_p, com.wewebu.ow.server.ecm.OwObject parent_p, int[] childTypes_p)
          creates a cloned object with new properties on the ECM system copies the content as well
 com.wewebu.ow.server.ecm.OwObjectSkeleton createObjectSkeleton(com.wewebu.ow.server.ecm.OwObjectClass objectclass_p, com.wewebu.ow.server.ecm.OwResource resource_p)
           
protected  com.wewebu.ow.server.ecm.OwObject createVirtualFolder(Node xmlVirtualFolderDescriptionNode_p, String strName_p, String strDmsIDPart_p)
          (overridable) create a virtual folder object from the given XML description
 void doLogin(String strUserName_p, String strPassword_p)
          perform logon process authenticate user
 com.wewebu.ow.server.ecm.OwObjectCollection doSearch(com.wewebu.ow.server.field.OwSearchNode searchNode_p, com.wewebu.ow.server.field.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
 Object getApplicationObject(int iTyp_p, String strName_p, boolean fForceUserSpecificObject_p, boolean fCreateIfNotExist_p)
          get a Objects for the application to work, like search templates, preferences...
 Object getApplicationObject(int iTyp_p, String strName_p, Object param_p, boolean fForceUserSpecificObject_p, boolean fCreateIfNotExist_p)
          get a Objects for the application to work, like search templates, preferences...
 Collection getApplicationObjects(int iTyp_p, String strName_p, boolean fForceUserSpecificObject_p)
          get a list of Objects for the application to work, like search templates, preferences...
 String getArchiveBaseDir()
          get the base directory of the dummy archive
 com.wewebu.ow.server.util.OwXMLUtil getConfigNode()
          get the network configuration node
 com.wewebu.ow.server.ecm.OwNetworkContext getContext()
          return context reference
 com.wewebu.ow.server.ecm.OwCredentials getCredentials()
          get the credentials of the logged in user
 String getDMSPrefix()
          get a prefix which is used to distinguish the DMSID of objects from the repository
 com.wewebu.ow.server.ecm.ui.OwUIAccessRightsModul getEditAccessRightsSubModul(com.wewebu.ow.server.ecm.OwObject object_p)
          get an instance of the edit access rights UI submodule for editing document access rights Access rights are very specific to the DMS System and can not be handled generically
 com.wewebu.ow.server.event.OwEventManager getEventManager()
          get the history manager instance
 com.wewebu.ow.server.field.OwFieldDefinition getFieldDefinition(String strFieldDefinitionName_p, String strResourceName_p)
          implementation of OwFieldDefinitionProvider: get a field definition for the given name and resource
 Object getInterface(String strInterfaceName_p, Object oObject_p)
          get an additional interface, e.g.
 Locale getLocale()
          get current locale
 com.wewebu.ow.server.ecm.ui.OwUILoginModul getLoginSubModul()
          get an instance of the login UI submodule for user authentication Login is very specific to the DMS System and can not be handled generically
 com.wewebu.ow.server.ecm.OwObjectClass getObjectClass(String strClassName_p, com.wewebu.ow.server.ecm.OwResource resource_p)
          get a Object class description of the available object class descriptions
protected  HashMap getObjectClassMap()
          create static HashMap of the object class descriptions
 Map getObjectClassNames(int[] iTypes_p, boolean fExcludeHiddenAndNonInstantiable_p, boolean fRootOnly_p, com.wewebu.ow.server.ecm.OwResource resource_p)
          get a list of the available object class descriptions names
 com.wewebu.ow.server.ecm.OwObject getObjectFromDMSID(String strDMSID_p, boolean fRefresh_p)
          reconstructs an Object from DMS Id, see OwObject.getDMSID for details.
 com.wewebu.ow.server.ecm.OwObject getObjectFromPath(String strPath_p, boolean fRefresh_p)
          get object from given path
 com.wewebu.ow.server.ecm.OwResource getResource(String strID_p)
          get the resource with the specified key
 Iterator getResourceIDs()
          get a Iterator of available resource IDs
 String getRoleDisplayName(String strRoleName_p)
          get the display name for a role name
 com.wewebu.ow.server.ecm.OwPropertyClass getUnsafePropertyClass(String strClassName_p, com.wewebu.ow.server.ecm.OwResource resource_p)
          get a property class description of the available object class descriptions NOTE: This function gets the next available property class for the given name.
 com.wewebu.ow.server.ecm.OwUserInfo getUserFromID(String strID_p)
          get the user information form a User ID NOTE: The length of the user ID MUST NOT EXCEED 32 Characters
 com.wewebu.ow.server.ecm.ui.OwUIUserSelectModul getUserSelectSubModul(String strID_p, int[] types_p)
          get an instance of the user select UI submodule for selecting a user or group User selection is very specific to the DMS System and can not be handled generically
 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
 boolean hasInterface(String strInterfaceName_p)
          check if an additional interface is available, e.g.
 void init(com.wewebu.ow.server.ecm.OwNetworkContext context_p, com.wewebu.ow.server.util.OwXMLUtil networkSettings_p)
          initialize the network adaptor
 void loginDefault(String strUser_p, String strPassword_p)
          log on to the network with default configuration NOTE: The behavior of the function depends on the configuration of the ECM adapter.
 void logout()
          log off and reset credentials
 com.wewebu.ow.server.ecm.OwBatch openBatch()
           
 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
 void setEventManager(com.wewebu.ow.server.event.OwEventManager eventManager_p)
          set the rolemanager to use
 void setRoleManager(com.wewebu.ow.server.role.OwRoleManager roleManager_p)
          set the rolemanager to use
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DMS_PREFIX

public static final String DMS_PREFIX
DMS prefix to identify this adapter

See Also:
Constant Field Values

VIRTUAL_FOLDER_PREFIX

public static final String VIRTUAL_FOLDER_PREFIX
prefix for DMSID to identify virtual folders

See Also:
Constant Field Values

OBJECT_CATEGORY_PREFERENCES

public static final String OBJECT_CATEGORY_PREFERENCES
object category for the preferences, which can be user or application defined, like usersettings, recent file list...

See Also:
Constant Field Values

m_preferencesFolder

protected String m_preferencesFolder
preferences folder - can be configured in owbootstrap.xml file


m_ObjectClassesMap

protected static final HashMap m_ObjectClassesMap
map containing the Object class descriptions of the DMS Adapter


m_jndiPropertyNames

protected static final HashMap m_jndiPropertyNames

m_bagsSupport

protected com.wewebu.ow.server.ecm.OwAttributeBagsSupport m_bagsSupport
attribute bag support

Constructor Detail

OwDummyNetwork

public OwDummyNetwork()
Method Detail

getConfigNode

public com.wewebu.ow.server.util.OwXMLUtil getConfigNode()
get the network configuration node


getLocale

public Locale getLocale()
get current locale

Specified by:
getLocale in interface com.wewebu.ow.server.ecm.OwNetwork

getContext

public com.wewebu.ow.server.ecm.OwNetworkContext getContext()
return context reference

Specified by:
getContext in interface com.wewebu.ow.server.ecm.OwNetwork

getObjectClassMap

protected HashMap getObjectClassMap()
                             throws Exception
create static HashMap of the object class descriptions

Throws:
Exception

getInterface

public Object getInterface(String strInterfaceName_p,
                           Object oObject_p)
                    throws Exception
get an additional interface, e.g. interface to a workflow engine

Specified by:
getInterface in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
strInterfaceName_p - Name of the interface
oObject_p - optional object to be wrapped
Returns:
a reference to the interface
Throws:
Exception

hasInterface

public boolean hasInterface(String strInterfaceName_p)
check if an additional interface is available, e.g. interface to a workflow engine

Specified by:
hasInterface in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
strInterfaceName_p - Name of the interface
Returns:
true, if interface is available

init

public void init(com.wewebu.ow.server.ecm.OwNetworkContext context_p,
                 com.wewebu.ow.server.util.OwXMLUtil networkSettings_p)
          throws Exception
initialize the network adaptor

Specified by:
init in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
context_p - Application Context
networkSettings_p - Settings DOM Node wrapped by OwXMLUtil
Throws:
Exception

setRoleManager

public void setRoleManager(com.wewebu.ow.server.role.OwRoleManager roleManager_p)
set the rolemanager to use

Specified by:
setRoleManager in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
roleManager_p - OwRoleManager

setEventManager

public void setEventManager(com.wewebu.ow.server.event.OwEventManager eventManager_p)
set the rolemanager to use

Specified by:
setEventManager in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
eventManager_p - OwHistoryManager to write history to, only if ECM system does not write its own history

getEventManager

public com.wewebu.ow.server.event.OwEventManager getEventManager()
get the history manager instance

Specified by:
getEventManager in interface com.wewebu.ow.server.ecm.OwRepository

refreshStaticClassdescriptions

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

Specified by:
refreshStaticClassdescriptions in interface com.wewebu.ow.server.ecm.OwRepository
Throws:
Exception

canRefreshStaticClassdescriptions

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

Specified by:
canRefreshStaticClassdescriptions in interface com.wewebu.ow.server.ecm.OwRepository
Returns:
boolean true = refresh is supported and should be done, false = refresh is not supported and not necessary.
Throws:
Exception

getCredentials

public com.wewebu.ow.server.ecm.OwCredentials getCredentials()
                                                      throws Exception
get the credentials of the logged in user

Specified by:
getCredentials in interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
Returns:
the valid credentials of the logged in user, or null if not logged on
Throws:
Exception

getUserFromID

public com.wewebu.ow.server.ecm.OwUserInfo getUserFromID(String strID_p)
                                                  throws Exception
get the user information form a User ID NOTE: The length of the user ID MUST NOT EXCEED 32 Characters

Specified by:
getUserFromID in interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
Parameters:
strID_p - the ID of the searched user
Returns:
the user information object of a user
Throws:
Exception

getRoleDisplayName

public String getRoleDisplayName(String strRoleName_p)
                          throws Exception
get the display name for a role name

Specified by:
getRoleDisplayName in interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
Parameters:
strRoleName_p - to retrieve the display name for
Returns:
the display name for the role
Throws:
Exception

doLogin

public void doLogin(String strUserName_p,
                    String strPassword_p)
             throws Exception
perform logon process authenticate user

Parameters:
strUserName_p -
strPassword_p -
Throws:
Exception

getLoginSubModul

public com.wewebu.ow.server.ecm.ui.OwUILoginModul getLoginSubModul()
                                                            throws Exception
get an instance of the login UI submodule for user authentication Login is very specific to the DMS System and can not be handled generically

Specified by:
getLoginSubModul in interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
Returns:
OwUILoginModul OwView derived module
Throws:
Exception

logout

public void logout()
            throws Exception
log off and reset credentials

Specified by:
logout in interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
Throws:
Exception

loginDefault

public void loginDefault(String strUser_p,
                         String strPassword_p)
                  throws Exception
log on to the network with default configuration NOTE: The behavior of the function depends on the configuration of the ECM adapter. For a determined login use the OwUILoginModul Screen (getLoginSubModul())

Specified by:
loginDefault in interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
Parameters:
strUser_p - String user name or name of function user or null to use a default login if available
strPassword_p - String the password for the user or null if not required
Throws:
Exception

getEditAccessRightsSubModul

public com.wewebu.ow.server.ecm.ui.OwUIAccessRightsModul getEditAccessRightsSubModul(com.wewebu.ow.server.ecm.OwObject object_p)
                                                                              throws Exception
get an instance of the edit access rights UI submodule for editing document access rights Access rights are very specific to the DMS System and can not be handled generically

Specified by:
getEditAccessRightsSubModul in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
object_p - OwObject to edit the access rights
Returns:
OwUIAccessRightsModul OwView derived module
Throws:
Exception

canEditAccessRights

public boolean canEditAccessRights(com.wewebu.ow.server.ecm.OwObject object_p)
                            throws Exception
check if access rights can be edited on the Object. I.e. if a AccessRightsSubModul can be obtained

Specified by:
canEditAccessRights in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
object_p - OwObject to edit access rights for
Returns:
true if access rights can be edited
Throws:
Exception

getUserSelectSubModul

public com.wewebu.ow.server.ecm.ui.OwUIUserSelectModul getUserSelectSubModul(String strID_p,
                                                                             int[] types_p)
                                                                      throws Exception
get an instance of the user select UI submodule for selecting a user or group User selection is very specific to the DMS System and can not be handled generically

Specified by:
getUserSelectSubModul in interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
Parameters:
strID_p - the ID of the currently set user or null if no user is selected
types_p - array of type identifiers as defined in OwUIUserSelectModul
Returns:
OwUIUserSelectModul OwView derived module
Throws:
Exception

canUserSelect

public boolean canUserSelect()
                      throws Exception
check if the user select module is supported i.e. getUserSelectSubModul is implemented

Specified by:
canUserSelect in interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
Returns:
true if access rights can be edited
Throws:
Exception

getApplicationObjects

public Collection getApplicationObjects(int iTyp_p,
                                        String strName_p,
                                        boolean fForceUserSpecificObject_p)
                                 throws Exception
get a list of Objects for the application to work, like search templates, preferences...

Specified by:
getApplicationObjects in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
iTyp_p - type as defined in OwNetwork.APPLICATION_OBJECT_TYPE_...
strName_p - Name of the object to retrieve e.g. "userprefs"
fForceUserSpecificObject_p - if true, the object must be specific to the logged in user, otherwise the ECM Adapter determines if it is common to a site or specific to a group or a user.
Returns:
Collection, which elements need to be cast to the appropriate type according to iTyp_p
Throws:
Exception

createVirtualFolder

protected com.wewebu.ow.server.ecm.OwObject createVirtualFolder(Node xmlVirtualFolderDescriptionNode_p,
                                                                String strName_p,
                                                                String strDmsIDPart_p)
                                                         throws Exception
(overridable) create a virtual folder object from the given XML description

Parameters:
xmlVirtualFolderDescriptionNode_p - XML Node describing the virtual folder
strName_p - String name identifying the virtual folder structure
Returns:
OwObject
Throws:
Exception

getApplicationObject

public Object getApplicationObject(int iTyp_p,
                                   String strName_p,
                                   boolean fForceUserSpecificObject_p,
                                   boolean fCreateIfNotExist_p)
                            throws Exception
get a Objects for the application to work, like search templates, preferences...

Specified by:
getApplicationObject in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
iTyp_p - type as defined in OwNetwork.APPLICATION_OBJECT_TYPE_...
strName_p - Name of the object to retrieve e.g. "userprefs"
fForceUserSpecificObject_p - if true, the object must be specific to the logged in user, otherwise the ECM Adapter determines if it is common to a site or specific to a group or a user.
fCreateIfNotExist_p - boolean true = create if not exist
Returns:
Object, which needs to be cast to the appropriate type according to iTyp_p
Throws:
Exception

getApplicationObject

public Object getApplicationObject(int iTyp_p,
                                   String strName_p,
                                   Object param_p,
                                   boolean fForceUserSpecificObject_p,
                                   boolean fCreateIfNotExist_p)
                            throws Exception
get a Objects for the application to work, like search templates, preferences...

Specified by:
getApplicationObject in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
iTyp_p - type as defined in OwNetwork.APPLICATION_OBJECT_TYPE_...
strName_p - Name of the object to retrieve e.g. "userprefs"
param_p - optional Object, can be null
fForceUserSpecificObject_p - if true, the object must be specific to the logged in user, otherwise the ECM Adapter determines if it is common to a site or specific to a group or a user.
fCreateIfNotExist_p - boolean true = create if not exist
Returns:
Object, which needs to be cast to the appropriate type according to iTyp_p
Throws:
Exception

getObjectFromDMSID

public com.wewebu.ow.server.ecm.OwObject getObjectFromDMSID(String strDMSID_p,
                                                            boolean fRefresh_p)
                                                     throws Exception
reconstructs an Object from DMS Id, see OwObject.getDMSID for details.

Specified by:
getObjectFromDMSID in interface com.wewebu.ow.server.ecm.OwRepository
Parameters:
strDMSID_p - DMSID for the requested object
fRefresh_p - true = force refresh of object from DMS System, false = may use cached object
Throws:
Exception

getArchiveBaseDir

public String getArchiveBaseDir()
get the base directory of the dummy archive

Returns:
String base dir of the archive without ending backslash

doSearch

public com.wewebu.ow.server.ecm.OwObjectCollection doSearch(com.wewebu.ow.server.field.OwSearchNode searchNode_p,
                                                            com.wewebu.ow.server.field.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

Specified by:
doSearch in interface com.wewebu.ow.server.ecm.OwRepository
Parameters:
searchNode_p - list of search criteria
sortCriteria_p - optional list of sort criteria
propertyNames_p - a optional list of properties to retrieve with the documents, can be null
iMaxSize_p - int value to specify the maximum size of the OwObjectCollection
iVersionSelection_p - int Selects the versions as defined in OwSearchTemplate.VERSION_SELECT_... or 0 to use default version
Returns:
list of found objects
Throws:
Exception

createNewObject

public String createNewObject(com.wewebu.ow.server.ecm.OwResource resource_p,
                              String strObjectClassName_p,
                              com.wewebu.ow.server.ecm.OwPropertyCollection properties_p,
                              com.wewebu.ow.server.ecm.OwPermissionCollection permissions_p,
                              com.wewebu.ow.server.ecm.OwContentCollection content_p,
                              com.wewebu.ow.server.ecm.OwObject parent_p,
                              String strMimeType_p,
                              String strMimeParameter_p)
                       throws Exception
creates a new object on the ECM System using the given parameters

Specified by:
createNewObject in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
strObjectClassName_p - requested class name of the new object
properties_p - OwPropertyCollection with new properties to set, or null to use defaults
permissions_p - OwPermissionCollection ECM specific permissions or null to use defaults
content_p - OwContentCollection the new content to set, null to create an empty object
parent_p - OwObject the parent object to use as a container, e.g. a folder or a ECM root, can be null if no parent is required
Returns:
String the DMSID of the new created object
Throws:
Exception

createNewObject

public String createNewObject(boolean fPromote_p,
                              Object mode_p,
                              com.wewebu.ow.server.ecm.OwResource resource_p,
                              String strObjectClassName_p,
                              com.wewebu.ow.server.ecm.OwPropertyCollection properties_p,
                              com.wewebu.ow.server.ecm.OwPermissionCollection permissions_p,
                              com.wewebu.ow.server.ecm.OwContentCollection content_p,
                              com.wewebu.ow.server.ecm.OwObject parent_p,
                              String strMimeType_p,
                              String strMimeParameter_p)
                       throws Exception
creates a new object on the ECM System using the given parameters has additional promote and checkin mode parameters for versionable objects

Specified by:
createNewObject in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
fPromote_p - boolean true = create a released version right away
mode_p - Object checkin mode for objects, see getCheckinModes, or null to use default
resource_p - OwResource to add to
strObjectClassName_p - requested class name of the new object
properties_p - OwPropertyCollection with new properties to set, or null to use defaults
permissions_p - OwPermissionCollection ECM specific permissions or null to use defaults
content_p - OwContentCollection the new content to set, null to create an empty object
parent_p - OwObject the parent object to use as a container, e.g. a folder or a ECM root, can be null if no parent is required
strMimeType_p - String MIME Types of the new object content
strMimeParameter_p - extra info to the MIME type
Returns:
String the ECM ID of the new created object
Throws:
Exception

createNewObject

public String createNewObject(boolean fPromote_p,
                              Object mode_p,
                              com.wewebu.ow.server.ecm.OwResource resource_p,
                              String strObjectClassName_p,
                              com.wewebu.ow.server.ecm.OwPropertyCollection properties_p,
                              com.wewebu.ow.server.ecm.OwPermissionCollection permissions_p,
                              com.wewebu.ow.server.ecm.OwContentCollection content_p,
                              com.wewebu.ow.server.ecm.OwObject parent_p,
                              String strMimeType_p,
                              String strMimeParameter_p,
                              boolean fKeepCheckedOut_p)
                       throws Exception
Creates a new object on the ECM System using the given parameters.
Has additional promote and checkin mode parameters for versionable objects and the extra parameter fKeepCheckedOut_p to control whether the new objects are checked in automatically or not.

Specified by:
createNewObject in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
fPromote_p - boolean true = create a released version right away
mode_p - Object checkin mode for objects, see getCheckinModes, or null to use default
resource_p - OwResource to add to
strObjectClassName_p - requested class name of the new object
properties_p - OwPropertyCollection with new properties to set, or null to use defaults
permissions_p - OwPermissionCollection ECM specific permissions or null to use defaults
content_p - OwContentCollection the new content to set, null to create an empty object
parent_p - OwObject the parent object to use as a container, e.g. a folder or a ECM root, can be null if no parent is required
strMimeType_p - String MIME type of the new object content
strMimeParameter_p - extra info to the MIME type
fKeepCheckedOut_p - true = create a new object that is checked out
Returns:
String the ECM ID of the new created object
Throws:
Exception
Since:
2.5

canCreateNewObject

public boolean canCreateNewObject(com.wewebu.ow.server.ecm.OwResource resource_p,
                                  com.wewebu.ow.server.ecm.OwObject parent_p,
                                  int iContext_p)
                           throws Exception
check, if adaptor can create a new object

Specified by:
canCreateNewObject in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
parent_p - OwObject the parent object to use as a container, e.g. a folder or a ECM root, can be null if no parent is required
Returns:
true, if object can be created
Throws:
Exception

createObjectCopy

public String createObjectCopy(com.wewebu.ow.server.ecm.OwObject obj_p,
                               com.wewebu.ow.server.ecm.OwPropertyCollection properties_p,
                               com.wewebu.ow.server.ecm.OwPermissionCollection permissions_p,
                               com.wewebu.ow.server.ecm.OwObject parent_p,
                               int[] childTypes_p)
                        throws Exception
creates a cloned object with new properties on the ECM system copies the content as well

Specified by:
createObjectCopy in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
obj_p - OwObject to create a copy of
properties_p - OwPropertyCollection of OwProperties to set, or null to keep properties
permissions_p - OwPermissionCollection of OwPermissions to set, or null to keep permissions
parent_p - OwObject the parent object to use as a container, e.g. a folder or a ECM root, can be null if no parent is required
childTypes_p - int types of the child objects to copy with the object, can be null if no children should be copied
Returns:
String DMSID of created copy
Throws:
Exception

canCreateObjectCopy

public boolean canCreateObjectCopy(com.wewebu.ow.server.ecm.OwObject parent_p,
                                   int[] childTypes_p,
                                   int iContext_p)
                            throws Exception
creates a cloned object with new properties on the DMS system

Specified by:
canCreateObjectCopy in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
parent_p - OwObject the parent object to use as a container, e.g. a folder or a ECM root, can be null if no parent is required
childTypes_p - int types of the child objects to copy with the object, can be null if no children should be copied
Returns:
true, if clone can be created
Throws:
Exception

getObjectClass

public com.wewebu.ow.server.ecm.OwObjectClass getObjectClass(String strClassName_p,
                                                             com.wewebu.ow.server.ecm.OwResource resource_p)
                                                      throws Exception
get a Object class description of the available object class descriptions

Specified by:
getObjectClass in interface com.wewebu.ow.server.ecm.OwRepository
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

public Map getObjectClassNames(int[] iTypes_p,
                               boolean fExcludeHiddenAndNonInstantiable_p,
                               boolean fRootOnly_p,
                               com.wewebu.ow.server.ecm.OwResource resource_p)
                        throws Exception
get a list of the available object class descriptions names

Specified by:
getObjectClassNames in interface com.wewebu.ow.server.ecm.OwRepository
Parameters:
iTypes_p - int Object type as defined in OwObject
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:
string array of OwObjectClass Names
Throws:
Exception

getUnsafePropertyClass

public com.wewebu.ow.server.ecm.OwPropertyClass getUnsafePropertyClass(String strClassName_p,
                                                                       com.wewebu.ow.server.ecm.OwResource resource_p)
                                                                throws Exception
get a property class description of the available object class descriptions NOTE: This function gets the next available property class for the given name. The resulting property class is undetermined, if there are more possible property descriptions for different object classes, ==> Use this function with care. If possible retrieve property classes from object classes.

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

getResource

public com.wewebu.ow.server.ecm.OwResource getResource(String strID_p)
                                                throws Exception
get the resource with the specified key

Specified by:
getResource in interface com.wewebu.ow.server.ecm.OwRepository
Parameters:
strID_p - String resource ID, if strID_p is null, returns the default resource
Throws:
Exception

getResourceIDs

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

Specified by:
getResourceIDs in interface com.wewebu.ow.server.ecm.OwRepository
Returns:
Iterator of resource IDs used in getResource, or null if no resources are available
Throws:
Exception

getObjectFromPath

public com.wewebu.ow.server.ecm.OwObject getObjectFromPath(String strPath_p,
                                                           boolean fRefresh_p)
                                                    throws Exception
get object from given path

Specified by:
getObjectFromPath in interface com.wewebu.ow.server.ecm.OwRepository
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

canDo

public boolean canDo(com.wewebu.ow.server.ecm.OwObject obj_p,
                     int iFunctionCode_p,
                     int iContext_p)
              throws Exception
check if a extended function like print can be performed on the given object compared to the OwRoleManager.isAllowed function the canDo function works on objects and is more faster due to the iContext parameter

Specified by:
canDo in interface com.wewebu.ow.server.ecm.OwNetwork
Parameters:
obj_p - OwObjet where function should be performed, or null if function does not require a object
iContext_p - as defined by OwStatusContextDefinitions
iFunctionCode_p - int code of requested function as defined in OwExtendedFunctions
Throws:
Exception

getFieldDefinition

public com.wewebu.ow.server.field.OwFieldDefinition getFieldDefinition(String strFieldDefinitionName_p,
                                                                       String strResourceName_p)
                                                                throws Exception,
                                                                       com.wewebu.ow.server.exceptions.OwObjectNotFoundException
implementation of OwFieldDefinitionProvider: get a field definition for the given name and resource

Specified by:
getFieldDefinition in interface com.wewebu.ow.server.field.OwFieldDefinitionProvider
Parameters:
strFieldDefinitionName_p - Name of the field definition class
strResourceName_p - optional name of the resource if there are several different resources for field definitions, can be null
Returns:
OwFieldDefinition or throws OwObjectNotFoundException
Throws:
Exception
com.wewebu.ow.server.exceptions.OwObjectNotFoundException

getDMSPrefix

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

Specified by:
getDMSPrefix in interface com.wewebu.ow.server.ecm.OwRepository

releaseResources

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

Specified by:
releaseResources in interface com.wewebu.ow.server.ecm.OwRepository
Throws:
Exception

attributeBagSupportSetup

protected void attributeBagSupportSetup()
Return Attributebag support to be used.

Since:
3.1.0.0

getWildCardDefinitions

public Collection getWildCardDefinitions(String strFieldDefinitionName_p,
                                         String strResourceName_p,
                                         int iOp_p)
                                  throws Exception
get a collection of wild card definitions that are allowed for the given field, resource and search operator

Specified by:
getWildCardDefinitions in interface com.wewebu.ow.server.field.OwFieldDefinitionProvider
Parameters:
strFieldDefinitionName_p - Name of the field definition class
strResourceName_p - optional name of the resource if there are several different resources for field definitions, can be null
iOp_p - search operator as defined in OwSearchOperator CRIT_OP_...
Returns:
Collection of OwWildCardDefinition, or null if no wildcards are defined
Throws:
Exception

canBatch

public boolean canBatch()
Specified by:
canBatch in interface com.wewebu.ow.server.ecm.OwRepository

closeBatch

public void closeBatch(com.wewebu.ow.server.ecm.OwBatch batch_p)
                throws com.wewebu.ow.server.exceptions.OwInvalidOperationException
Specified by:
closeBatch in interface com.wewebu.ow.server.ecm.OwRepository
Throws:
com.wewebu.ow.server.exceptions.OwInvalidOperationException

openBatch

public com.wewebu.ow.server.ecm.OwBatch openBatch()
                                           throws com.wewebu.ow.server.exceptions.OwInvalidOperationException
Specified by:
openBatch in interface com.wewebu.ow.server.ecm.OwRepository
Throws:
com.wewebu.ow.server.exceptions.OwInvalidOperationException

createObjectSkeleton

public com.wewebu.ow.server.ecm.OwObjectSkeleton createObjectSkeleton(com.wewebu.ow.server.ecm.OwObjectClass objectclass_p,
                                                                      com.wewebu.ow.server.ecm.OwResource resource_p)
                                                               throws Exception
Specified by:
createObjectSkeleton in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.