com.wewebu.ow.server.ecm
Class OwStandardCrossMappings

java.lang.Object
  extended by com.wewebu.ow.server.ecm.OwStandardCrossMappings
All Implemented Interfaces:
OwCrossMappings, OwExtendedCrossMappings

public class OwStandardCrossMappings
extends Object
implements OwExtendedCrossMappings

Implements a configurable mapping of user's and properties for federated cross adapter scenarios.

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


Nested Class Summary
static class OwStandardCrossMappings.OwCrossDecoratorSearchNode
           Wrapper class to map the property names.
static class OwStandardCrossMappings.OwCrossSort
           
 
Constructor Summary
OwStandardCrossMappings(OwXMLUtil config_p)
          creates a mapping with given configuration
 
Method Summary
 Object convert(Object value_p, OwFieldDefinition from_p, OwFieldDefinition to_p)
           
 void doXLogin(OwNetwork xnetwork_p, OwNetwork parentnetwork_p, String parentuser_p, String parentpassword_p)
          Login to the X network.
protected  OwXMLUtil getConfigNode()
           
protected  com.wewebu.ow.server.ecm.OwStandardCrossMappings.OwCrossLogin getDefaultlogin()
          the default login for all unmapped users, groups
protected  Map getGroupmappings()
          get the group mappings from configuration
 String getIClass(String className_p)
          maps the given classes to their configured I peers
protected  Map<String,String> getIClassMappings()
          map of class names
protected  Map getInternalPropertyMappings()
           
 Collection getIProperties(Collection propertyNames_p)
          maps the given X classes to their configured I(nternal) peers
 String getIProperty(String xPropertyName_p)
          maps the given X classes to their configured I(nternal) peers
protected  Map getPropertyMappings()
          map of property names
protected  Map getUsermappings()
          get the user mappings from configuration
 String getXClass(String className_p)
          maps the given classes to their configured X peers
 OwClass[] getXClasses(OwClass[] classes_p)
          maps the given classes to their configured X peers
protected  Map<String,String> getXClassMappings()
          map of class names
 Collection getXProperties(Collection propertyNames_p)
          map the given property names
 String getXProperty(String name_p)
          map the given property name
 OwSearchNode getXSearch(OwSearchNode searchNode_p, String xRepositoryID_p, OwNetwork xNetwork_p)
          map the given search
 OwSort getXSort(OwSort sort_p)
          map the given search
 void mapXObjectCollection(OwObjectCollection objects_p)
          replace the objects of the given collection with mapped wrapper objects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwStandardCrossMappings

public OwStandardCrossMappings(OwXMLUtil config_p)
creates a mapping with given configuration

Parameters:
config_p -
Method Detail

getConfigNode

protected OwXMLUtil getConfigNode()

getDefaultlogin

protected com.wewebu.ow.server.ecm.OwStandardCrossMappings.OwCrossLogin getDefaultlogin()
the default login for all unmapped users, groups

Returns:
an OwStandardCrossMappings.OwCrossLogin

getUsermappings

protected Map getUsermappings()
get the user mappings from configuration

Returns:
Map of user names to x-user name and x-password tuple

getGroupmappings

protected Map getGroupmappings()
                        throws Exception
get the group mappings from configuration

Returns:
Map of group names to x-user name and x-password tuple
Throws:
Exception

getPropertyMappings

protected Map getPropertyMappings()
                           throws OwConfigurationException
map of property names

Returns:
a Map
Throws:
OwConfigurationException

getXProperties

public Collection getXProperties(Collection propertyNames_p)
                          throws OwConfigurationException
map the given property names

Specified by:
getXProperties in interface OwCrossMappings
Parameters:
propertyNames_p -
Returns:
a Collection
Throws:
OwConfigurationException

doXLogin

public void doXLogin(OwNetwork xnetwork_p,
                     OwNetwork parentnetwork_p,
                     String parentuser_p,
                     String parentpassword_p)
              throws OwAuthenticationException,
                     OwServerException
Login to the X network. Checking first the definition of user to user mapping for x-Network login, if no user to user mapping could be found the configuration of user group to user is searched.

Specified by:
doXLogin in interface OwCrossMappings
Parameters:
xnetwork_p - OwNetwork reference where should be logged in, using the mappings
parentnetwork_p - OwNetwork where to retrieve additional information about the user
parentuser_p - String representing the user
parentpassword_p - String containing the user password
Throws:
OwAuthenticationException
OwServerException

getXProperty

public String getXProperty(String name_p)
                    throws OwConfigurationException
map the given property name

Specified by:
getXProperty in interface OwCrossMappings
Parameters:
name_p -
Returns:
a String
Throws:
OwConfigurationException

mapXObjectCollection

public void mapXObjectCollection(OwObjectCollection objects_p)
replace the objects of the given collection with mapped wrapper objects

Specified by:
mapXObjectCollection in interface OwCrossMappings
Parameters:
objects_p -

getXSearch

public OwSearchNode getXSearch(OwSearchNode searchNode_p,
                               String xRepositoryID_p,
                               OwNetwork xNetwork_p)
                        throws CloneNotSupportedException
map the given search

Specified by:
getXSearch in interface OwCrossMappings
Parameters:
searchNode_p -
Returns:
an OwSearchNode
Throws:
CloneNotSupportedException

getXSort

public OwSort getXSort(OwSort sort_p)
                throws CloneNotSupportedException,
                       OwConfigurationException
Description copied from interface: OwCrossMappings
map the given search

Specified by:
getXSort in interface OwCrossMappings
Returns:
an OwSearchNode
Throws:
CloneNotSupportedException
OwConfigurationException

getInternalPropertyMappings

protected Map getInternalPropertyMappings()
                                   throws OwConfigurationException
Throws:
OwConfigurationException

getXClassMappings

protected Map<String,String> getXClassMappings()
                                        throws OwConfigurationException
map of class names

Returns:
a Map
Throws:
OwConfigurationException
Since:
4.0.0.0

getIClassMappings

protected Map<String,String> getIClassMappings()
                                        throws OwConfigurationException
map of class names

Returns:
a Map
Throws:
OwConfigurationException
Since:
4.0.0.0

getXClasses

public OwClass[] getXClasses(OwClass[] classes_p)
                      throws OwConfigurationException
Description copied from interface: OwExtendedCrossMappings
maps the given classes to their configured X peers

Specified by:
getXClasses in interface OwExtendedCrossMappings
Returns:
a OwClass
Throws:
OwConfigurationException

getXClass

public String getXClass(String className_p)
                 throws OwConfigurationException
Description copied from interface: OwExtendedCrossMappings
maps the given classes to their configured X peers

Specified by:
getXClass in interface OwExtendedCrossMappings
Returns:
an X object class name
Throws:
OwConfigurationException

getIClass

public String getIClass(String className_p)
                 throws OwConfigurationException
Description copied from interface: OwExtendedCrossMappings
maps the given classes to their configured I peers

Specified by:
getIClass in interface OwExtendedCrossMappings
Returns:
an I object class name
Throws:
OwConfigurationException

getIProperties

public Collection getIProperties(Collection propertyNames_p)
                          throws OwConfigurationException
maps the given X classes to their configured I(nternal) peers

Specified by:
getIProperties in interface OwExtendedCrossMappings
Parameters:
propertyNames_p -
Returns:
a Collection
Throws:
OwConfigurationException
Since:
3.1.0.0

getIProperty

public String getIProperty(String xPropertyName_p)
                    throws OwConfigurationException
maps the given X classes to their configured I(nternal) peers

Specified by:
getIProperty in interface OwExtendedCrossMappings
Parameters:
xPropertyName_p -
Returns:
a String
Throws:
OwConfigurationException
Since:
3.1.0.0

convert

public Object convert(Object value_p,
                      OwFieldDefinition from_p,
                      OwFieldDefinition to_p)
               throws OwException
Specified by:
convert in interface OwCrossMappings
Throws:
OwException


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.