Search in sources :

Example 11 with DummyObjectClass

use of com.evolveum.icf.dummy.resource.DummyObjectClass in project midpoint by Evolveum.

the class TestTrafo method initSystem.

@Override
public void initSystem(Task initTask, OperationResult initResult) throws Exception {
    super.initSystem(initTask, initResult);
    // Roles
    repoAddObjectFromFile(ROLE_EMPLOYEE_FILE, initResult);
    // Resources
    dummyResourceCtlAd = DummyResourceContoller.create(RESOURCE_DUMMY_AD_ID, resourceDummyAd);
    dummyResourceCtlAd.extendSchemaAd();
    dummyResourceAd = dummyResourceCtlAd.getDummyResource();
    resourceDummyAd = importAndGetObjectFromFile(ResourceType.class, RESOURCE_DUMMY_AD_FILE, RESOURCE_DUMMY_AD_OID, initTask, initResult);
    resourceDummyAdType = resourceDummyAd.asObjectable();
    dummyResourceCtlAd.setResource(resourceDummyAd);
    dummyResourceCtlMail = DummyResourceContoller.create(RESOURCE_DUMMY_MAIL_ID, resourceDummyMail);
    dummyResourceCtlMail.populateWithDefaultSchema();
    DummyObjectClass dummyAdAccountObjectClass = dummyResourceCtlMail.getDummyResource().getAccountObjectClass();
    dummyResourceCtlMail.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_MAIL_FIRST_NAME_NAME, String.class, false, false);
    dummyResourceCtlMail.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_MAIL_LAST_NAME_NAME, String.class, false, false);
    dummyResourceCtlMail.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_MAIL_SHORT_NAME_NAME, String.class, false, true);
    dummyResourceCtlMail.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_MAIL_ID_FILE_NAME, String.class, false, false);
    dummyResourceCtlMail.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_MAIL_MAIL_TEMPLATE_NAME_NAME, String.class, false, false);
    dummyResourceCtlMail.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_MAIL_MAIL_FILE_NAME_NAME, String.class, false, false);
    dummyResourceCtlMail.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_MAIL_MAIL_SYSTEM_NAME, String.class, false, false);
    dummyResourceCtlMail.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_MAIL_MAIL_DOMAIN_NAME, String.class, false, false);
    dummyResourceCtlMail.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_MAIL_MAIL_SERVER_NAME, String.class, false, false);
    dummyResourceCtlMail.addAttrDef(dummyAdAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_MAIL_INTERNET_ADDRESS_NAME, String.class, false, false);
    dummyResourceMail = dummyResourceCtlMail.getDummyResource();
    resourceDummyMail = importAndGetObjectFromFile(ResourceType.class, RESOURCE_DUMMY_MAIL_FILE, RESOURCE_DUMMY_MAIL_OID, initTask, initResult);
    resourceDummyMailType = resourceDummyMail.asObjectable();
    dummyResourceCtlMail.setResource(resourceDummyMail);
}
Also used : DummyObjectClass(com.evolveum.icf.dummy.resource.DummyObjectClass) ResourceType(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType)

Example 12 with DummyObjectClass

use of com.evolveum.icf.dummy.resource.DummyObjectClass in project midpoint by Evolveum.

the class TestScience method initSystem.

@Override
public void initSystem(Task initTask, OperationResult initResult) throws Exception {
    super.initSystem(initTask, initResult);
    // Roles
    repoAddObjectFromFile(ROLE_STATISTICS_FILE, initResult);
    //		repoAddObjectFromFile(ROLE_MATH_FILE, RoleType.class, initResult);
    resourceOpenDj = importAndGetObjectFromFile(ResourceType.class, RESOURCE_OPENDJ_AD_SIMULATION_FILE, RESOURCE_OPENDJ_AD_SIMULATION_OID, initTask, initResult);
    resourceOpenDjType = resourceOpenDj.asObjectable();
    openDJController.setResource(resourceOpenDj);
    openDJController.addEntryFromLdifFile(GROUP_STATS_USERS_LDIF_FILE);
    // Resources
    dummyResourceCtlUnix = DummyResourceContoller.create(RESOURCE_DUMMY_UNIX_ID, resourceDummyUnix);
    dummyResourceCtlUnix.populateWithDefaultSchema();
    DummyObjectClass dummyUnixAccountObjectClass = dummyResourceCtlUnix.getDummyResource().getAccountObjectClass();
    dummyResourceCtlUnix.addAttrDef(dummyUnixAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_UNIX_DESCRIPTION_NAME, String.class, false, false);
    dummyResourceCtlUnix.addAttrDef(dummyUnixAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_UNIX_DIR_NAME, String.class, false, false);
    dummyResourceCtlUnix.addAttrDef(dummyUnixAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_UNIX_SHELL_NAME, String.class, false, false);
    dummyResourceCtlUnix.addAttrDef(dummyUnixAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_UNIX_SYSTEM_NAME, String.class, false, false);
    dummyResourceCtlUnix.addAttrDef(dummyUnixAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_UNIX_UID_NAME, Integer.class, false, false);
    //		dummyResourceCtlUnix.extendSchemaAd();;
    dummyResourceUnix = dummyResourceCtlUnix.getDummyResource();
    resourceDummyUnix = importAndGetObjectFromFile(ResourceType.class, RESOURCE_DUMMY_UNIX_FILE, RESOURCE_DUMMY_UNIX_OID, initTask, initResult);
    resourceDummyUnixType = resourceDummyUnix.asObjectable();
    dummyResourceCtlUnix.setResource(resourceDummyUnix);
    dummyResourceCtlStats = DummyResourceContoller.create(RESOURCE_DUMMY_STATS_ID, resourceDummyStats);
    dummyResourceCtlStats.populateWithDefaultSchema();
    DummyObjectClass dummyStatsAccountObjectClass = dummyResourceCtlStats.getDummyResource().getAccountObjectClass();
    dummyResourceCtlStats.addAttrDef(dummyStatsAccountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_STATS_DESC_NAME, String.class, false, false);
    dummyResourceStats = dummyResourceCtlStats.getDummyResource();
    resourceDummyStats = importAndGetObjectFromFile(ResourceType.class, RESOURCE_DUMMY_STATS_FILE, RESOURCE_DUMMY_STATS_OID, initTask, initResult);
    resourceDummyStatsType = resourceDummyStats.asObjectable();
    dummyResourceCtlStats.setResource(resourceDummyStats);
}
Also used : DummyObjectClass(com.evolveum.icf.dummy.resource.DummyObjectClass) ResourceType(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType)

Example 13 with DummyObjectClass

use of com.evolveum.icf.dummy.resource.DummyObjectClass in project midpoint by Evolveum.

the class TestActivation method initSystem.

@Override
public void initSystem(Task initTask, OperationResult initResult) throws Exception {
    super.initSystem(initTask, initResult);
    dummyResourceCtlKhaki = DummyResourceContoller.create(RESOURCE_DUMMY_KHAKI_NAME, resourceDummyKhaki);
    dummyResourceCtlKhaki.extendSchemaPirate();
    dummyResourceKhaki = dummyResourceCtlKhaki.getDummyResource();
    resourceDummyKhaki = importAndGetObjectFromFile(ResourceType.class, RESOURCE_DUMMY_KHAKI_FILE, RESOURCE_DUMMY_KHAKI_OID, initTask, initResult);
    resourceDummyKhakiType = resourceDummyKhaki.asObjectable();
    dummyResourceCtlKhaki.setResource(resourceDummyKhaki);
    dummyResourceCtlCoral = DummyResourceContoller.create(RESOURCE_DUMMY_CORAL_NAME, resourceDummyCoral);
    DummyObjectClass accountObjectClass = dummyResourceCtlCoral.getDummyResource().getAccountObjectClass();
    dummyResourceCtlCoral.addAttrDef(accountObjectClass, SUSPENDED_ATTRIBUTE_NAME, Boolean.class, false, false);
    dummyResourceCoral = dummyResourceCtlCoral.getDummyResource();
    resourceDummyCoral = importAndGetObjectFromFile(ResourceType.class, RESOURCE_DUMMY_CORAL_FILE, RESOURCE_DUMMY_CORAL_OID, initTask, initResult);
    resourceDummyCoralType = resourceDummyCoral.asObjectable();
    dummyResourceCtlCoral.setResource(resourceDummyCoral);
}
Also used : DummyObjectClass(com.evolveum.icf.dummy.resource.DummyObjectClass) ResourceType(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType)

Example 14 with DummyObjectClass

use of com.evolveum.icf.dummy.resource.DummyObjectClass in project midpoint by Evolveum.

the class TestDummyExtra method extraDummyResourceInit.

@Override
protected void extraDummyResourceInit() throws Exception {
    DummyObjectClass accountObjectClass = dummyResource.getAccountObjectClass();
    dummyResourceCtl.addAttrDef(accountObjectClass, DUMMY_ACCOUNT_ATTRIBUTE_MATE_NAME, String.class, false, true);
}
Also used : DummyObjectClass(com.evolveum.icf.dummy.resource.DummyObjectClass)

Aggregations

DummyObjectClass (com.evolveum.icf.dummy.resource.DummyObjectClass)14 ResourceType (com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType)6 DebugReconciliationTaskResultListener (com.evolveum.midpoint.model.impl.util.DebugReconciliationTaskResultListener)2 FileNotFoundException (java.io.FileNotFoundException)2 ConnectException (java.net.ConnectException)2 ConnectionFailedException (org.identityconnectors.framework.common.exceptions.ConnectionFailedException)2 ConnectorIOException (org.identityconnectors.framework.common.exceptions.ConnectorIOException)2 ConflictException (com.evolveum.icf.dummy.resource.ConflictException)1 DummyAttributeDefinition (com.evolveum.icf.dummy.resource.DummyAttributeDefinition)1 ObjectAlreadyExistsException (com.evolveum.icf.dummy.resource.ObjectAlreadyExistsException)1 RoleType (com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType)1 GuardedString (org.identityconnectors.common.security.GuardedString)1 AlreadyExistsException (org.identityconnectors.framework.common.exceptions.AlreadyExistsException)1 ConnectorException (org.identityconnectors.framework.common.exceptions.ConnectorException)1