Class ExecutableLdapDestinationService
java.lang.Object
org.lsc.plugins.connectors.executable.AbstractExecutableLdifService
org.lsc.plugins.connectors.executable.ExecutableLdapDestinationService
- All Implemented Interfaces:
Closeable,AutoCloseable,org.lsc.service.IService,org.lsc.service.IWritableService
public class ExecutableLdapDestinationService
extends AbstractExecutableLdifService
implements org.lsc.service.IWritableService, Closeable
This class is a generic but configurable implementation to provision data to
any referential which can be scripted. This is based on ExecutableLdifService
for updating executables and SimpleJndiDstService to retrieve data
It just requires 4 scripts to :
- add a new
- update a existing data
- rename - or change the identifier
- delete or archive an unused data
- Author:
- Sebastien Bahloul <seb@lsc-project.org>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapply(org.lsc.LscModifications lm) Apply directory modifications.voidclose()org.lsc.beans.IBeangetBean(org.lsc.Task task, String pivotName, org.lsc.LscDatasets pivotAttributes, boolean fromSameService) The simple object getter according to its identifier.getListPivots(org.lsc.Task task) Returns a list of all the objects' identifiers.Collection<Class<? extends org.lsc.configuration.ConnectionType>> Methods inherited from class org.lsc.plugins.connectors.executable.AbstractExecutableLdifService
execute, executeWithReturn, getParameters
-
Constructor Details
-
ExecutableLdapDestinationService
public ExecutableLdapDestinationService(org.lsc.configuration.TaskType task) throws org.lsc.exception.LscServiceConfigurationException - Throws:
org.lsc.exception.LscServiceConfigurationException
-
-
Method Details
-
getBean
public org.lsc.beans.IBean getBean(org.lsc.Task task, String pivotName, org.lsc.LscDatasets pivotAttributes, boolean fromSameService) throws org.lsc.exception.LscServiceException The simple object getter according to its identifier.- Specified by:
getBeanin interfaceorg.lsc.service.IService- Overrides:
getBeanin classAbstractExecutableLdifService- Parameters:
pivotName- Name of the entry to be returned, which is the name returned by(used for display only)invalid reference
#getListPivots()pivotAttributes- Map of attribute names and values, which is the data identifier in the source such as returned by. It must identify a unique entry in the source.invalid reference
#getListPivots()fromSameService- are the pivot attributes provided by the same service- Returns:
- The bean, or null if not found
- Throws:
org.lsc.exception.LscServiceException- May throw aNamingExceptionif the object is not found in the directory, or if more than one object would be returned.
-
getListPivots
public Map<String,org.lsc.LscDatasets> getListPivots(org.lsc.Task task) throws org.lsc.exception.LscServiceException Returns a list of all the objects' identifiers.- Specified by:
getListPivotsin interfaceorg.lsc.service.IService- Overrides:
getListPivotsin classAbstractExecutableLdifService- Returns:
- Map of all entries names that are returned by the directory with an associated map of attribute names and values (never null)
- Throws:
org.lsc.exception.LscServiceException
-
getWriteDatasetIds
- Specified by:
getWriteDatasetIdsin interfaceorg.lsc.service.IWritableService
-
apply
public boolean apply(org.lsc.LscModifications lm) Apply directory modifications.- Specified by:
applyin interfaceorg.lsc.service.IWritableService- Parameters:
lm- Modifications to apply in aJndiModificationsobject.- Returns:
- Operation status
- Throws:
CommunicationException- If the connection to the service is lost, and all other attempts to use this service should fail.
-
getSupportedConnectionType
public Collection<Class<? extends org.lsc.configuration.ConnectionType>> getSupportedConnectionType()- Specified by:
getSupportedConnectionTypein interfaceorg.lsc.service.IService- Overrides:
getSupportedConnectionTypein classAbstractExecutableLdifService
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-