Search in sources :

Example 1 with LiveSyncCapabilityType

use of com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.LiveSyncCapabilityType in project midpoint by Evolveum.

the class ConnectorInstanceConnIdImpl method processOperationCapabilities.

private boolean processOperationCapabilities(OperationResult parentResult) {
    capabilities = new ArrayList<>();
    // Create capabilities from supported connector operations
    InternalMonitor.recordConnectorOperation("getSupportedOperations");
    Set<Class<? extends APIOperation>> supportedOperations = connIdConnectorFacade.getSupportedOperations();
    LOGGER.trace("Connector supported operations: {}", supportedOperations);
    boolean supportsSchema = false;
    if (supportedOperations.contains(SchemaApiOp.class)) {
        SchemaCapabilityType capSchema = new SchemaCapabilityType();
        capabilities.add(CAPABILITY_OBJECT_FACTORY.createSchema(capSchema));
        supportsSchema = true;
    }
    if (supportedOperations.contains(SyncApiOp.class)) {
        LiveSyncCapabilityType capSync = new LiveSyncCapabilityType();
        capabilities.add(CAPABILITY_OBJECT_FACTORY.createLiveSync(capSync));
    }
    if (supportedOperations.contains(TestApiOp.class)) {
        TestConnectionCapabilityType capTest = new TestConnectionCapabilityType();
        capabilities.add(CAPABILITY_OBJECT_FACTORY.createTestConnection(capTest));
    }
    if (supportedOperations.contains(CreateApiOp.class)) {
        CreateCapabilityType capCreate = new CreateCapabilityType();
        capabilities.add(CAPABILITY_OBJECT_FACTORY.createCreate(capCreate));
    }
    if (supportedOperations.contains(GetApiOp.class) || supportedOperations.contains(SearchApiOp.class)) {
        ReadCapabilityType capRead = new ReadCapabilityType();
        capabilities.add(CAPABILITY_OBJECT_FACTORY.createRead(capRead));
    }
    if (supportedOperations.contains(UpdateApiOp.class)) {
        UpdateCapabilityType capUpdate = new UpdateCapabilityType();
        capabilities.add(CAPABILITY_OBJECT_FACTORY.createUpdate(capUpdate));
    }
    if (supportedOperations.contains(DeleteApiOp.class)) {
        DeleteCapabilityType capDelete = new DeleteCapabilityType();
        capabilities.add(CAPABILITY_OBJECT_FACTORY.createDelete(capDelete));
    }
    if (supportedOperations.contains(ScriptOnResourceApiOp.class) || supportedOperations.contains(ScriptOnConnectorApiOp.class)) {
        ScriptCapabilityType capScript = new ScriptCapabilityType();
        if (supportedOperations.contains(ScriptOnResourceApiOp.class)) {
            Host host = new Host();
            host.setType(ProvisioningScriptHostType.RESOURCE);
            capScript.getHost().add(host);
        // language is unknown here
        }
        if (supportedOperations.contains(ScriptOnConnectorApiOp.class)) {
            Host host = new Host();
            host.setType(ProvisioningScriptHostType.CONNECTOR);
            capScript.getHost().add(host);
        // language is unknown here
        }
        capabilities.add(CAPABILITY_OBJECT_FACTORY.createScript(capScript));
    }
    return supportsSchema;
}
Also used : UpdateCapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.UpdateCapabilityType) ReadCapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ReadCapabilityType) DeleteCapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.DeleteCapabilityType) GetApiOp(org.identityconnectors.framework.api.operations.GetApiOp) SchemaCapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.SchemaCapabilityType) ScriptOnConnectorApiOp(org.identityconnectors.framework.api.operations.ScriptOnConnectorApiOp) TestConnectionCapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.TestConnectionCapabilityType) ScriptOnResourceApiOp(org.identityconnectors.framework.api.operations.ScriptOnResourceApiOp) Host(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ScriptCapabilityType.Host) CreateCapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.CreateCapabilityType) SearchApiOp(org.identityconnectors.framework.api.operations.SearchApiOp) ScriptCapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ScriptCapabilityType) LiveSyncCapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.LiveSyncCapabilityType) ObjectClass(org.identityconnectors.framework.common.objects.ObjectClass) APIOperation(org.identityconnectors.framework.api.operations.APIOperation)

Aggregations

CreateCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.CreateCapabilityType)1 DeleteCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.DeleteCapabilityType)1 LiveSyncCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.LiveSyncCapabilityType)1 ReadCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ReadCapabilityType)1 SchemaCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.SchemaCapabilityType)1 ScriptCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ScriptCapabilityType)1 Host (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.ScriptCapabilityType.Host)1 TestConnectionCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.TestConnectionCapabilityType)1 UpdateCapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.UpdateCapabilityType)1 APIOperation (org.identityconnectors.framework.api.operations.APIOperation)1 GetApiOp (org.identityconnectors.framework.api.operations.GetApiOp)1 ScriptOnConnectorApiOp (org.identityconnectors.framework.api.operations.ScriptOnConnectorApiOp)1 ScriptOnResourceApiOp (org.identityconnectors.framework.api.operations.ScriptOnResourceApiOp)1 SearchApiOp (org.identityconnectors.framework.api.operations.SearchApiOp)1 ObjectClass (org.identityconnectors.framework.common.objects.ObjectClass)1