com.wewebu.ow.server.ecmimpl.owsimpleadp
Class OwSimpleNetwork

java.lang.Object
  extended by com.wewebu.ow.server.ecmimpl.owsimpleadp.OwSimpleNetwork
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 OwSimpleNetwork
extends Object
implements com.wewebu.ow.server.ecm.OwNetwork

This is the main class of the adapter.
It is declared in the owbootstrap.xml EcmAdapter section and will be instantiated for the adapter by the Workdesk core.

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  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 user settings, recent file list...
 
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
OwSimpleNetwork()
           
 
Method Summary
 boolean canBatch()
           
 boolean canCreateNewObject(com.wewebu.ow.server.ecm.OwResource resource_p, com.wewebu.ow.server.ecm.OwObject parent_p, int context_p)
           
 boolean canCreateObjectCopy(com.wewebu.ow.server.ecm.OwObject parent_p, int[] childTypes_p, int context_p)
           
 boolean canDo(com.wewebu.ow.server.ecm.OwObject obj_p, int functionCode_p, int context_p)
           
 boolean canEditAccessRights(com.wewebu.ow.server.ecm.OwObject object_p)
           
 boolean canRefreshStaticClassdescriptions()
           
 boolean canUserSelect()
           
 void closeBatch(com.wewebu.ow.server.ecm.OwBatch batch_p)
           
 String createNewObject(boolean promote_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)
           
 String createNewObject(boolean promote_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 keepCheckedOut_p)
           
 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)
           
 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)
           
 com.wewebu.ow.server.ecm.OwObjectSkeleton createObjectSkeleton(com.wewebu.ow.server.ecm.OwObjectClass objectclass_p, com.wewebu.ow.server.ecm.OwResource resource_p)
           
 com.wewebu.ow.server.ecm.OwObjectCollection doSearch(com.wewebu.ow.server.field.OwSearchNode searchCriteria_p, com.wewebu.ow.server.field.OwSort sortCriteria_p, Collection propertyNames_p, int maxSize_p, int versionSelection_p)
          perform a search
 Object getApplicationObject(int typ_p, String strName_p, boolean forceUserSpecificObject_p, boolean createIfNotExist_p)
          get application specific object's like attribute bag's or search templates
 Object getApplicationObject(int typ_p, String strName_p, Object param_p, boolean forceUserSpecificObject_p, boolean createIfNotExist_p)
           
 Collection getApplicationObjects(int typ_p, String strName_p, boolean forceUserSpecificObject_p)
          get application specific object's like attribute bag's or search templates
 com.wewebu.ow.server.util.OwXMLUtil getConfigNode()
          the configuration node where this adapter is configured in owbootstrap.xml
 com.wewebu.ow.server.ecm.OwNetworkContext getContext()
          the context for callback and environment method's into the core
 com.wewebu.ow.server.ecm.OwCredentials getCredentials()
          get the credentials of the authenticated user
 String getDMSPrefix()
          get a unique prefix for this adapter type
 com.wewebu.ow.server.ecm.ui.OwUIAccessRightsModul getEditAccessRightsSubModul(com.wewebu.ow.server.ecm.OwObject object_p)
           
 com.wewebu.ow.server.event.OwEventManager getEventManager()
          get a reference to the event manager that record's events
 com.wewebu.ow.server.field.OwFieldDefinition getFieldDefinition(String strFieldDefinitionName_p, String strResourceName_p)
          retrieve a field or property definition
 Object getInterface(String strInterfaceName_p, Object object_p)
           
 Locale getLocale()
           
 com.wewebu.ow.server.ecm.ui.OwUILoginModul getLoginSubModul()
          get a UI for the login process that will be embedded in the login page
 com.wewebu.ow.server.ecm.OwObjectClass getObjectClass(String strClassName_p, com.wewebu.ow.server.ecm.OwResource resource_p)
          get the object class for given name and resource
 Map getObjectClassNames(int[] types_p, boolean excludeHiddenAndNonInstantiable_p, boolean rootOnly_p, com.wewebu.ow.server.ecm.OwResource resource_p)
          get all available class names for the given resource
 com.wewebu.ow.server.ecm.OwObject getObjectFromDMSID(String strDMSID_p, boolean refresh_p)
          recreate an object from it's DMSID see OwSimpleObject.getDMSID
 com.wewebu.ow.server.ecm.OwObject getObjectFromPath(String strPath_p, boolean refresh_p)
          retrieve an object for the given path
 com.wewebu.ow.server.ecm.OwResource getResource(String strID_p)
           
 Iterator getResourceIDs()
           
 String getRoleDisplayName(String strRoleName_p)
           
 com.wewebu.ow.server.ecm.OwUserInfo getUserFromID(String strID_p)
           
 com.wewebu.ow.server.ecm.ui.OwUIUserSelectModul getUserSelectSubModul(String strID_p, int[] types_p)
           
 Collection getWildCardDefinitions(String strFieldDefinitionName_p, String strResourceName_p, int op_p)
           
 boolean hasInterface(String strInterfaceName_p)
           
 void init(com.wewebu.ow.server.ecm.OwNetworkContext context_p, com.wewebu.ow.server.util.OwXMLUtil confignode_p)
          init the adapter
 void loginDefault(String user_p, String password_p)
          perform login using user password combination
 void logout()
          logout user
 com.wewebu.ow.server.ecm.OwBatch openBatch()
           
 void refreshStaticClassdescriptions()
           
 void releaseResources()
           
 void setEventManager(com.wewebu.ow.server.event.OwEventManager eventManager_p)
          set the event-manager called from core
 void setRoleManager(com.wewebu.ow.server.role.OwRoleManager roleManager_p)
           
 
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

OBJECT_CATEGORY_PREFERENCES

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

See Also:
Constant Field Values

m_preferencesFolder

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

Constructor Detail

OwSimpleNetwork

public OwSimpleNetwork()
Method Detail

getObjectFromPath

public com.wewebu.ow.server.ecm.OwObject getObjectFromPath(String strPath_p,
                                                           boolean refresh_p)
                                                    throws Exception
retrieve an object for the given path

Specified by:
getObjectFromPath in interface com.wewebu.ow.server.ecm.OwRepository
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 the object class for given name and resource

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

getObjectClassNames

public Map getObjectClassNames(int[] types_p,
                               boolean excludeHiddenAndNonInstantiable_p,
                               boolean rootOnly_p,
                               com.wewebu.ow.server.ecm.OwResource resource_p)
                        throws Exception
get all available class names for the given resource

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

doSearch

public com.wewebu.ow.server.ecm.OwObjectCollection doSearch(com.wewebu.ow.server.field.OwSearchNode searchCriteria_p,
                                                            com.wewebu.ow.server.field.OwSort sortCriteria_p,
                                                            Collection propertyNames_p,
                                                            int maxSize_p,
                                                            int versionSelection_p)
                                                     throws Exception
perform a search

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

getObjectFromDMSID

public com.wewebu.ow.server.ecm.OwObject getObjectFromDMSID(String strDMSID_p,
                                                            boolean refresh_p)
                                                     throws Exception
recreate an object from it's DMSID see OwSimpleObject.getDMSID

Specified by:
getObjectFromDMSID in interface com.wewebu.ow.server.ecm.OwRepository
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
retrieve a field or property definition

Specified by:
getFieldDefinition in interface com.wewebu.ow.server.field.OwFieldDefinitionProvider
Throws:
Exception
com.wewebu.ow.server.exceptions.OwObjectNotFoundException

getApplicationObject

public Object getApplicationObject(int typ_p,
                                   String strName_p,
                                   boolean forceUserSpecificObject_p,
                                   boolean createIfNotExist_p)
                            throws Exception
get application specific object's like attribute bag's or search templates

Specified by:
getApplicationObject in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception

getApplicationObjects

public Collection getApplicationObjects(int typ_p,
                                        String strName_p,
                                        boolean forceUserSpecificObject_p)
                                 throws Exception
get application specific object's like attribute bag's or search templates

Specified by:
getApplicationObjects in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception

getCredentials

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

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

logout

public void logout()
            throws Exception
logout user

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

getDMSPrefix

public String getDMSPrefix()
get a unique prefix for this adapter type

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

loginDefault

public void loginDefault(String user_p,
                         String password_p)
                  throws Exception
perform login using user password combination

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

getLoginSubModul

public com.wewebu.ow.server.ecm.ui.OwUILoginModul getLoginSubModul()
                                                            throws Exception
get a UI for the login process that will be embedded in the login page

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

getEventManager

public com.wewebu.ow.server.event.OwEventManager getEventManager()
get a reference to the event manager that record's events

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

init

public void init(com.wewebu.ow.server.ecm.OwNetworkContext context_p,
                 com.wewebu.ow.server.util.OwXMLUtil confignode_p)
          throws Exception
init the adapter

Specified by:
init in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception

setEventManager

public void setEventManager(com.wewebu.ow.server.event.OwEventManager eventManager_p)
set the event-manager called from core

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

getContext

public com.wewebu.ow.server.ecm.OwNetworkContext getContext()
the context for callback and environment method's into the core

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

getConfigNode

public com.wewebu.ow.server.util.OwXMLUtil getConfigNode()
the configuration node where this adapter is configured in owbootstrap.xml

Returns:
OwXMLUtil

canCreateNewObject

public boolean canCreateNewObject(com.wewebu.ow.server.ecm.OwResource resource_p,
                                  com.wewebu.ow.server.ecm.OwObject parent_p,
                                  int context_p)
                           throws Exception
Specified by:
canCreateNewObject in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception

canCreateObjectCopy

public boolean canCreateObjectCopy(com.wewebu.ow.server.ecm.OwObject parent_p,
                                   int[] childTypes_p,
                                   int context_p)
                            throws Exception
Specified by:
canCreateObjectCopy in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception

canDo

public boolean canDo(com.wewebu.ow.server.ecm.OwObject obj_p,
                     int functionCode_p,
                     int context_p)
              throws Exception
Specified by:
canDo in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception

canEditAccessRights

public boolean canEditAccessRights(com.wewebu.ow.server.ecm.OwObject object_p)
                            throws Exception
Specified by:
canEditAccessRights in interface com.wewebu.ow.server.ecm.OwNetwork
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
Specified by:
createNewObject in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception

createNewObject

public String createNewObject(boolean promote_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
Specified by:
createNewObject in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception

createNewObject

public String createNewObject(boolean promote_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 keepCheckedOut_p)
                       throws Exception
Specified by:
createNewObject in interface com.wewebu.ow.server.ecm.OwNetwork
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
Specified by:
createObjectCopy in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception

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

getApplicationObject

public Object getApplicationObject(int typ_p,
                                   String strName_p,
                                   Object param_p,
                                   boolean forceUserSpecificObject_p,
                                   boolean createIfNotExist_p)
                            throws Exception
Specified by:
getApplicationObject in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception

getEditAccessRightsSubModul

public com.wewebu.ow.server.ecm.ui.OwUIAccessRightsModul getEditAccessRightsSubModul(com.wewebu.ow.server.ecm.OwObject object_p)
                                                                              throws Exception
Specified by:
getEditAccessRightsSubModul in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception

getInterface

public Object getInterface(String strInterfaceName_p,
                           Object object_p)
                    throws Exception
Specified by:
getInterface in interface com.wewebu.ow.server.ecm.OwNetwork
Throws:
Exception

getLocale

public Locale getLocale()
Specified by:
getLocale in interface com.wewebu.ow.server.ecm.OwNetwork

hasInterface

public boolean hasInterface(String strInterfaceName_p)
Specified by:
hasInterface in interface com.wewebu.ow.server.ecm.OwNetwork

setRoleManager

public void setRoleManager(com.wewebu.ow.server.role.OwRoleManager roleManager_p)
Specified by:
setRoleManager in interface com.wewebu.ow.server.ecm.OwNetwork

canBatch

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

canRefreshStaticClassdescriptions

public boolean canRefreshStaticClassdescriptions()
                                          throws Exception
Specified by:
canRefreshStaticClassdescriptions in interface com.wewebu.ow.server.ecm.OwRepository
Throws:
Exception

closeBatch

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

getResource

public com.wewebu.ow.server.ecm.OwResource getResource(String strID_p)
                                                throws Exception
Specified by:
getResource in interface com.wewebu.ow.server.ecm.OwRepository
Throws:
Exception

getResourceIDs

public Iterator getResourceIDs()
                        throws Exception
Specified by:
getResourceIDs in interface com.wewebu.ow.server.ecm.OwRepository
Throws:
Exception

openBatch

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

refreshStaticClassdescriptions

public void refreshStaticClassdescriptions()
                                    throws Exception
Specified by:
refreshStaticClassdescriptions in interface com.wewebu.ow.server.ecm.OwRepository
Throws:
Exception

releaseResources

public void releaseResources()
                      throws Exception
Specified by:
releaseResources in interface com.wewebu.ow.server.ecm.OwRepository
Throws:
Exception

getWildCardDefinitions

public Collection getWildCardDefinitions(String strFieldDefinitionName_p,
                                         String strResourceName_p,
                                         int op_p)
                                  throws Exception
Specified by:
getWildCardDefinitions in interface com.wewebu.ow.server.field.OwFieldDefinitionProvider
Throws:
Exception

canUserSelect

public boolean canUserSelect()
                      throws Exception
Specified by:
canUserSelect in interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
Throws:
Exception

getRoleDisplayName

public String getRoleDisplayName(String strRoleName_p)
                          throws Exception
Specified by:
getRoleDisplayName in interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
Throws:
Exception

getUserFromID

public com.wewebu.ow.server.ecm.OwUserInfo getUserFromID(String strID_p)
                                                  throws Exception
Specified by:
getUserFromID in interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
Throws:
Exception

getUserSelectSubModul

public com.wewebu.ow.server.ecm.ui.OwUIUserSelectModul getUserSelectSubModul(String strID_p,
                                                                             int[] types_p)
                                                                      throws Exception
Specified by:
getUserSelectSubModul in interface com.wewebu.ow.server.ecm.OwAuthenticationProvider
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.