use of eu.bcvsolutions.idm.ic.api.operation.IcCanGenSchema in project CzechIdMng by bcvsolutions.
the class CzechIdMIcConfigurationService method getSchema.
@Override
public IcSchema getSchema(IcConnectorInstance connectorInstance, IcConnectorConfiguration connectorConfiguration) {
Assert.notNull(connectorInstance, "Connector instance is required.");
Assert.notNull(connectorInstance.getConnectorKey(), "Connector key is required.");
Assert.notNull(connectorConfiguration, "Configuration is required.");
String key = connectorInstance.getConnectorKey().toString();
LOG.debug("Generate schema - CzechIdM {}", key);
IcConnector connector = createConnectorInstance(connectorInstance);
if (!(connector instanceof IcCanGenSchema)) {
throw new IcException(MessageFormat.format("Connector [{0}] not supports generate schema operation!", key));
}
connector.init(connectorConfiguration);
IcSchema schema = ((IcCanGenSchema) connector).schema();
LOG.debug("Generated schema - CzechIdM ({}) schema = {}", key, schema);
return schema;
}
Aggregations