Search in sources :

Example 11 with IcConnector

use of eu.bcvsolutions.idm.ic.api.IcConnector 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);
}
Also used : IcCanDelete(eu.bcvsolutions.idm.ic.api.operation.IcCanDelete) IcObjectClassImpl(eu.bcvsolutions.idm.ic.impl.IcObjectClassImpl) IcConnector(eu.bcvsolutions.idm.ic.api.IcConnector) IcException(eu.bcvsolutions.idm.ic.exception.IcException) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString)

Aggregations

IcConnector (eu.bcvsolutions.idm.ic.api.IcConnector)11 IcException (eu.bcvsolutions.idm.ic.exception.IcException)9 GuardedString (eu.bcvsolutions.idm.core.security.api.domain.GuardedString)5 IcObjectClassImpl (eu.bcvsolutions.idm.ic.impl.IcObjectClassImpl)4 IcConnectorInfo (eu.bcvsolutions.idm.ic.api.IcConnectorInfo)2 IcUidAttribute (eu.bcvsolutions.idm.ic.api.IcUidAttribute)2 ConfigurationClass (eu.bcvsolutions.idm.core.api.domain.ConfigurationClass)1 CoreException (eu.bcvsolutions.idm.core.api.exception.CoreException)1 IcConnectorConfiguration (eu.bcvsolutions.idm.ic.api.IcConnectorConfiguration)1 IcConnectorInstance (eu.bcvsolutions.idm.ic.api.IcConnectorInstance)1 IcConnectorObject (eu.bcvsolutions.idm.ic.api.IcConnectorObject)1 IcSchema (eu.bcvsolutions.idm.ic.api.IcSchema)1 IcConnectorClass (eu.bcvsolutions.idm.ic.api.annotation.IcConnectorClass)1 IcCanCreate (eu.bcvsolutions.idm.ic.api.operation.IcCanCreate)1 IcCanDelete (eu.bcvsolutions.idm.ic.api.operation.IcCanDelete)1 IcCanGenSchema (eu.bcvsolutions.idm.ic.api.operation.IcCanGenSchema)1 IcCanRead (eu.bcvsolutions.idm.ic.api.operation.IcCanRead)1 IcCanSearch (eu.bcvsolutions.idm.ic.api.operation.IcCanSearch)1 IcCanUpdate (eu.bcvsolutions.idm.ic.api.operation.IcCanUpdate)1 IcConnectorInstanceImpl (eu.bcvsolutions.idm.ic.impl.IcConnectorInstanceImpl)1