Class DefaultConnectorManager
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.DefaultConnectorManager
-
- All Implemented Interfaces:
ConnectorManager
public class DefaultConnectorManager extends Object implements ConnectorManager
-
-
Field Summary
Fields Modifier and Type Field Description protected AsyncConnectorFacade
asyncFacade
protected ConnIdBundleManager
connIdBundleManager
protected ConnInstanceDataBinder
connInstanceDataBinder
protected EntityFactory
entityFactory
protected static Logger
LOG
protected RealmDAO
realmDAO
protected ExternalResourceDAO
resourceDAO
-
Constructor Summary
Constructors Constructor Description DefaultConnectorManager(ConnIdBundleManager connIdBundleManager, RealmDAO realmDAO, ExternalResourceDAO resourceDAO, ConnInstanceDataBinder connInstanceDataBinder, AsyncConnectorFacade asyncFacade, EntityFactory entityFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnInstance
buildConnInstanceOverride(ConnInstanceTO connInstance, Collection<ConnConfProperty> confOverride, Optional<Collection<ConnectorCapability>> capabilitiesOverride)
Builds connector instance override over base connector instance, configuration and capabilities.Connector
createConnector(ConnInstance connInstance)
Create connector from given connector instance.protected static String
getBeanName(ExternalResource resource)
Connector
getConnector(ExternalResource resource)
Get existing connector bean for the given resource or create if not found.void
load()
Load connectors for all existing resources.Optional<Connector>
readConnector(ExternalResource resource)
void
registerConnector(ExternalResource resource)
Create and register into Spring context a bean for the given resource.void
unload()
Unload connectors for all existing resources.protected void
unregisterConnector(String id)
void
unregisterConnector(ExternalResource resource)
Removes the Spring bean for the given resource from the context.
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
connIdBundleManager
protected final ConnIdBundleManager connIdBundleManager
-
realmDAO
protected final RealmDAO realmDAO
-
resourceDAO
protected final ExternalResourceDAO resourceDAO
-
connInstanceDataBinder
protected final ConnInstanceDataBinder connInstanceDataBinder
-
asyncFacade
protected final AsyncConnectorFacade asyncFacade
-
entityFactory
protected final EntityFactory entityFactory
-
-
Constructor Detail
-
DefaultConnectorManager
public DefaultConnectorManager(ConnIdBundleManager connIdBundleManager, RealmDAO realmDAO, ExternalResourceDAO resourceDAO, ConnInstanceDataBinder connInstanceDataBinder, AsyncConnectorFacade asyncFacade, EntityFactory entityFactory)
-
-
Method Detail
-
getBeanName
protected static String getBeanName(ExternalResource resource)
-
readConnector
public Optional<Connector> readConnector(ExternalResource resource)
- Specified by:
readConnector
in interfaceConnectorManager
-
getConnector
public Connector getConnector(ExternalResource resource)
Description copied from interface:ConnectorManager
Get existing connector bean for the given resource or create if not found.- Specified by:
getConnector
in interfaceConnectorManager
- Parameters:
resource
- the resource- Returns:
- live connector bean for given resource
-
buildConnInstanceOverride
public ConnInstance buildConnInstanceOverride(ConnInstanceTO connInstance, Collection<ConnConfProperty> confOverride, Optional<Collection<ConnectorCapability>> capabilitiesOverride)
Description copied from interface:ConnectorManager
Builds connector instance override over base connector instance, configuration and capabilities.- Specified by:
buildConnInstanceOverride
in interfaceConnectorManager
- Parameters:
connInstance
- base connector instanceconfOverride
- configuration overridecapabilitiesOverride
- capabilities override- Returns:
- connector instance override over base connector instance, configuration and capabilities
-
createConnector
public Connector createConnector(ConnInstance connInstance)
Description copied from interface:ConnectorManager
Create connector from given connector instance.- Specified by:
createConnector
in interfaceConnectorManager
- Parameters:
connInstance
- connector instance- Returns:
- connector
-
registerConnector
public void registerConnector(ExternalResource resource)
Description copied from interface:ConnectorManager
Create and register into Spring context a bean for the given resource.- Specified by:
registerConnector
in interfaceConnectorManager
- Parameters:
resource
- external resource
-
unregisterConnector
protected void unregisterConnector(String id)
-
unregisterConnector
public void unregisterConnector(ExternalResource resource)
Description copied from interface:ConnectorManager
Removes the Spring bean for the given resource from the context.- Specified by:
unregisterConnector
in interfaceConnectorManager
- Parameters:
resource
- external resource
-
load
@Transactional(readOnly=true) public void load()
Description copied from interface:ConnectorManager
Load connectors for all existing resources.- Specified by:
load
in interfaceConnectorManager
- See Also:
ExternalResource
-
unload
@Transactional(readOnly=true) public void unload()
Description copied from interface:ConnectorManager
Unload connectors for all existing resources.- Specified by:
unload
in interfaceConnectorManager
- See Also:
ExternalResource
-
-