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 TypeMethodDescriptionboolean
apply
(org.lsc.LscModifications lm) Apply directory modifications.void
close()
org.lsc.beans.IBean
The simple object getter according to its identifier.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(String pivotName, org.lsc.LscDatasets pivotAttributes, boolean fromSameService) throws org.lsc.exception.LscServiceException The simple object getter according to its identifier.- Specified by:
getBean
in interfaceorg.lsc.service.IService
- Overrides:
getBean
in classAbstractExecutableLdifService
- Parameters:
pivotName
- Name of the entry to be returned, which is the name returned bygetListPivots()
(used for display only)pivotAttributes
- Map of attribute names and values, which is the data identifier in the source such as returned bygetListPivots()
. It must identify a unique entry in the source.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 aNamingException
if the object is not found in the directory, or if more than one object would be returned.
-
getListPivots
Returns a list of all the objects' identifiers.- Specified by:
getListPivots
in interfaceorg.lsc.service.IService
- Overrides:
getListPivots
in 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:
getWriteDatasetIds
in interfaceorg.lsc.service.IWritableService
-
apply
public boolean apply(org.lsc.LscModifications lm) Apply directory modifications.- Specified by:
apply
in interfaceorg.lsc.service.IWritableService
- Parameters:
lm
- Modifications to apply in aJndiModifications
object.- 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:
getSupportedConnectionType
in interfaceorg.lsc.service.IService
- Overrides:
getSupportedConnectionType
in classAbstractExecutableLdifService
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-