com.wewebu.ow.server.ecm
Interface OwNetwork

All Superinterfaces:
OwAuthenticationProvider, OwFieldDefinitionProvider, OwRepository

public interface OwNetwork
extends OwRepository, OwAuthenticationProvider

Base interface for the network access. Covers access to all objects in the ECM system. Covers access to the authentication provider as well.
NOTE: There is one instance of this class in each user session.

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


Field Summary
static int APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG
          object type for the attribute bags (Type: OwAttributeBag)
static int APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG_ITERATOR
          object type for the attribute bags (Type: OwAttributeBagIterator)
static int APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG_WRITABLE
          object type for the writable attribute bags like databases (Type: OwAttributeBagWritable)
static int APPLICATION_OBJECT_TYPE_ENTRY_TEMPLATE
          object type representing an entry template
static int APPLICATION_OBJECT_TYPE_ENUM_COLLECTION
          object type for the enum collections for choicelists (Type: OwEnumCollection)
static int APPLICATION_OBJECT_TYPE_INVERTED_ATTRIBUTE_BAG
          object type for the read only attribute bags like databases (Type: OwAttributeBagWritable), i.e.: the attributenames of the bag represent the users
static int APPLICATION_OBJECT_TYPE_PREFERENCES
          object type for the preferences, which can be user or application defined, like user settings, recent file list...
static int APPLICATION_OBJECT_TYPE_SEARCHTEMPLATE
          object type for the search templates (Type: OwSearchTemplate)
static int APPLICATION_OBJECT_TYPE_USER_START
          user defined object types start here
static int APPLICATION_OBJECT_TYPE_VIRTUAL_FOLDER
          object type for the virtual folders (Type: OwVirtualFolderObjectFactory)
static int APPLICATION_OBJECT_TYPE_XML_DOCUMENT
          object type for the XML streams (Type: org.w3c.dom.Node)
static int CAN_DO_FUNCTIONCODE_ACL_TO_MODIFY_ANNOTATION
          function code used in canDo(...) method to check if user has the ACL to modify annotations, @since 3.2.0.1
static int CAN_DO_FUNCTIONCODE_CREATE_ANNOTATION
          function code used in canDo(...) method to check if user can create annotations
static int CAN_DO_FUNCTIONCODE_DELETE_ANNOTATION
          function code used in canDo(...) method to check if user can delete annotations
static int CAN_DO_FUNCTIONCODE_EDIT_ANNOTATION
          function code used in canDo(...) method to check if user can edit annotations
static int CAN_DO_FUNCTIONCODE_PRINT
          function code used in canDo(...) method to check if user can print the given object
static int CAN_DO_FUNCTIONCODE_SAVE_CONTENT_TO_DISK
          function code used in canDo(...) method to check if user can save the content to disk
static int CAN_DO_FUNCTIONCODE_USER_START
          user defined function codes start here
 
Method Summary
 boolean canCreateNewObject(OwResource resource_p, OwObject parent_p, int iContext_p)
          check, if Adapter can create a new objects
 boolean canCreateObjectCopy(OwObject parent_p, int[] childTypes_p, int iContext_p)
          creates a cloned object with new properties on the ECM system
 boolean canDo(OwObject obj_p, int iFunctionCode_p, int iContext_p)
          check if a extended function like print can be performed on the given object
 boolean canEditAccessRights(OwObject object_p)
          check if access rights can be edited on the Object.
 String createNewObject(boolean fPromote_p, Object mode_p, OwResource resource_p, String strObjectClassName_p, OwPropertyCollection properties_p, OwPermissionCollection permissions_p, OwContentCollection content_p, 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, OwResource resource_p, String strObjectClassName_p, OwPropertyCollection properties_p, OwPermissionCollection permissions_p, OwContentCollection content_p, 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(OwResource resource_p, String strObjectClassName_p, OwPropertyCollection properties_p, OwPermissionCollection permissions_p, OwContentCollection content_p, OwObject parent_p, String strMimeType_p, String strMimeParameter_p)
          creates a new object on the ECM System using the given parameters
 String createObjectCopy(OwObject obj_p, OwPropertyCollection properties_p, OwPermissionCollection permissions_p, OwObject parent_p, int[] childTypes_p)
          creates a cloned object with new properties on the ECM system copies the content as well
 OwObjectSkeleton createObjectSkeleton(OwObjectClass objectclass_p, OwResource resource_p)
          creates a new empty object which can be used to set properties and then submitted to the createNewObject function
 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...
 OwNetworkContext getContext()
          return the network context that was past during initialization
 OwUIAccessRightsModul getEditAccessRightsSubModul(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 ECM System and can not be handled generically
 Object getInterface(String strInterfaceName_p, Object oObject_p)
          get an additional interface, e.g.
 Locale getLocale()
          get current locale
 boolean hasInterface(String strInterfaceName_p)
          check if an additional interface is available, e.g.
 void init(OwNetworkContext context_p, OwXMLUtil networkSettings_p)
          initialize the network Adapter
 void setEventManager(OwEventManager eventManager_p)
          set the rolemanager to use
 void setRoleManager(OwRoleManager roleManager_p)
          set the rolemanager to use
 
Methods inherited from interface com.wewebu.ow.server.ecm.OwRepository
canBatch, canRefreshStaticClassdescriptions, closeBatch, doSearch, getDMSPrefix, getEventManager, getObjectClass, getObjectClassNames, getObjectFromDMSID, getObjectFromPath, getResource, getResourceIDs, openBatch, refreshStaticClassdescriptions, releaseResources
 
Methods inherited from interface com.wewebu.ow.server.field.OwFieldDefinitionProvider
getFieldDefinition, getWildCardDefinitions
 
Methods inherited from interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
canUserSelect, getCredentials, getLoginSubModul, getRoleDisplayName, getUserFromID, getUserSelectSubModul, loginDefault, logout
 

Field Detail

APPLICATION_OBJECT_TYPE_VIRTUAL_FOLDER

static final int APPLICATION_OBJECT_TYPE_VIRTUAL_FOLDER
object type for the virtual folders (Type: OwVirtualFolderObjectFactory)

See Also:
Constant Field Values

APPLICATION_OBJECT_TYPE_PREFERENCES

static final int APPLICATION_OBJECT_TYPE_PREFERENCES
object type for the preferences, which can be user or application defined, like user settings, recent file list... (Type: OwObject)

See Also:
Constant Field Values

APPLICATION_OBJECT_TYPE_SEARCHTEMPLATE

static final int APPLICATION_OBJECT_TYPE_SEARCHTEMPLATE
object type for the search templates (Type: OwSearchTemplate)

See Also:
Constant Field Values

APPLICATION_OBJECT_TYPE_XML_DOCUMENT

static final int APPLICATION_OBJECT_TYPE_XML_DOCUMENT
object type for the XML streams (Type: org.w3c.dom.Node)

See Also:
Constant Field Values

APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG

static final int APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG
object type for the attribute bags (Type: OwAttributeBag)

See Also:
Constant Field Values

APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG_ITERATOR

static final int APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG_ITERATOR
object type for the attribute bags (Type: OwAttributeBagIterator)

See Also:
Constant Field Values

APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG_WRITABLE

static final int APPLICATION_OBJECT_TYPE_ATTRIBUTE_BAG_WRITABLE
object type for the writable attribute bags like databases (Type: OwAttributeBagWritable)

See Also:
Constant Field Values

APPLICATION_OBJECT_TYPE_ENUM_COLLECTION

static final int APPLICATION_OBJECT_TYPE_ENUM_COLLECTION
object type for the enum collections for choicelists (Type: OwEnumCollection)

See Also:
Constant Field Values

APPLICATION_OBJECT_TYPE_INVERTED_ATTRIBUTE_BAG

static final int APPLICATION_OBJECT_TYPE_INVERTED_ATTRIBUTE_BAG
object type for the read only attribute bags like databases (Type: OwAttributeBagWritable), i.e.: the attributenames of the bag represent the users

See Also:
Constant Field Values

APPLICATION_OBJECT_TYPE_ENTRY_TEMPLATE

static final int APPLICATION_OBJECT_TYPE_ENTRY_TEMPLATE
object type representing an entry template

Since:
3.2.0.0
See Also:
Constant Field Values

APPLICATION_OBJECT_TYPE_USER_START

static final int APPLICATION_OBJECT_TYPE_USER_START
user defined object types start here

See Also:
Constant Field Values

CAN_DO_FUNCTIONCODE_PRINT

static final int CAN_DO_FUNCTIONCODE_PRINT
function code used in canDo(...) method to check if user can print the given object

See Also:
Constant Field Values

CAN_DO_FUNCTIONCODE_CREATE_ANNOTATION

static final int CAN_DO_FUNCTIONCODE_CREATE_ANNOTATION
function code used in canDo(...) method to check if user can create annotations

See Also:
Constant Field Values

CAN_DO_FUNCTIONCODE_EDIT_ANNOTATION

static final int CAN_DO_FUNCTIONCODE_EDIT_ANNOTATION
function code used in canDo(...) method to check if user can edit annotations

See Also:
Constant Field Values

CAN_DO_FUNCTIONCODE_DELETE_ANNOTATION

static final int CAN_DO_FUNCTIONCODE_DELETE_ANNOTATION
function code used in canDo(...) method to check if user can delete annotations

See Also:
Constant Field Values

CAN_DO_FUNCTIONCODE_SAVE_CONTENT_TO_DISK

static final int CAN_DO_FUNCTIONCODE_SAVE_CONTENT_TO_DISK
function code used in canDo(...) method to check if user can save the content to disk

See Also:
Constant Field Values

CAN_DO_FUNCTIONCODE_ACL_TO_MODIFY_ANNOTATION

static final int CAN_DO_FUNCTIONCODE_ACL_TO_MODIFY_ANNOTATION
function code used in canDo(...) method to check if user has the ACL to modify annotations, @since 3.2.0.1

See Also:
Constant Field Values

CAN_DO_FUNCTIONCODE_USER_START

static final int CAN_DO_FUNCTIONCODE_USER_START
user defined function codes start here

See Also:
Constant Field Values
Method Detail

getInterface

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

Parameters:
strInterfaceName_p - Name of the interface
oObject_p - optional object to be wrapped
Returns:
a reference to the interface
Throws:
Exception

hasInterface

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

Parameters:
strInterfaceName_p - Name of the interface
Returns:
true, if interface is available

getLocale

Locale getLocale()
get current locale


init

void init(OwNetworkContext context_p,
          OwXMLUtil networkSettings_p)
          throws Exception
initialize the network Adapter

Parameters:
context_p - OwNetworkContext
networkSettings_p - Settings DOM Node wrapped by OwXMLUtil
Throws:
Exception

getContext

OwNetworkContext getContext()
return the network context that was past during initialization

Returns:
OwNetworkContext
Since:
3.1.0.0

setRoleManager

void setRoleManager(OwRoleManager roleManager_p)
set the rolemanager to use

Parameters:
roleManager_p - OwRoleManager

setEventManager

void setEventManager(OwEventManager eventManager_p)
set the rolemanager to use

Parameters:
eventManager_p - OwHistoryManager to write history to, only if ECM system does not write its own history

getEditAccessRightsSubModul

OwUIAccessRightsModul getEditAccessRightsSubModul(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 ECM System and can not be handled generically

Parameters:
object_p - OwObject to edit the access rights
Returns:
OwUIAccessRightsModul OwView derived module
Throws:
Exception

canEditAccessRights

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

Parameters:
object_p - OwObject to edit access rights for
Returns:
true if access rights can be edited
Throws:
Exception

getApplicationObjects

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...

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

getApplicationObject

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...

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

getApplicationObject

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...

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

createNewObject

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

Parameters:
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

String createNewObject(boolean fPromote_p,
                       Object mode_p,
                       OwResource resource_p,
                       String strObjectClassName_p,
                       OwPropertyCollection properties_p,
                       OwPermissionCollection permissions_p,
                       OwContentCollection content_p,
                       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

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

String createNewObject(boolean fPromote_p,
                       Object mode_p,
                       OwResource resource_p,
                       String strObjectClassName_p,
                       OwPropertyCollection properties_p,
                       OwPermissionCollection permissions_p,
                       OwContentCollection content_p,
                       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.

ATTENTION: If keepCheckedOut is true, the promote flag (major/minor versioning) is ignored.

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
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.0

canCreateNewObject

boolean canCreateNewObject(OwResource resource_p,
                           OwObject parent_p,
                           int iContext_p)
                           throws Exception
check, if Adapter can create a new objects

Parameters:
resource_p - OwResource to add to
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
iContext_p - int as defined in OwStatusContextDefinitions
Returns:
true, if object can be created
Throws:
Exception

createObjectSkeleton

OwObjectSkeleton createObjectSkeleton(OwObjectClass objectclass_p,
                                      OwResource resource_p)
                                      throws Exception
creates a new empty object which can be used to set properties and then submitted to the createNewObject function

Parameters:
objectclass_p - OwObjectClass to create object from
resource_p - OwResource
Returns:
OwObjectSkeleton
Throws:
Exception
Since:
2.5.0

createObjectCopy

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

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

boolean canCreateObjectCopy(OwObject parent_p,
                            int[] childTypes_p,
                            int iContext_p)
                            throws Exception
creates a cloned object with new properties on the ECM system

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
iContext_p - int as defined in OwStatusContextDefinitions
Returns:
true, if clone can be created
Throws:
Exception

canDo

boolean canDo(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

Parameters:
obj_p - OwObject where function should be performed, or null if function does not require a object
iContext_p - int as defined in OwStatusContextDefinitions
iFunctionCode_p - int code of requested function as defined in CAN_DO_FUNCTIONCODE_...
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.