use of eu.bcvsolutions.idm.ic.api.operation.IcCanDelete in project CzechIdMng by bcvsolutions.
the class CzechIdMIcConnectorService method deleteObject.
@Override
public void deleteObject(IcConnectorInstance connectorInstance, IcConnectorConfiguration connectorConfiguration, IcObjectClass objectClass, IcUidAttribute uid) {
Assert.notNull(connectorInstance);
Assert.notNull(connectorInstance.getConnectorKey());
Assert.notNull(connectorConfiguration);
Assert.notNull(uid);
String key = connectorInstance.getConnectorKey().toString();
LOG.debug("Delete object - CzechIdM (Uid= {} {})", uid, key);
if (objectClass == null) {
objectClass = new IcObjectClassImpl(IcObjectClassInfo.ACCOUNT);
}
IcConnector connector = this.getConnectorInstance(connectorInstance, connectorConfiguration);
if (!(connector instanceof IcCanDelete)) {
throw new IcException(MessageFormat.format("Connector [{0}] not supports delete operation!", key));
}
((IcCanDelete) connector).delete(uid, objectClass);
LOG.debug("Deleted object - CzechIdM ({}) Uid= {}", key, uid);
}
Aggregations