Tabnine Logo
DummyAccount.replaceAttributeValue
Code IndexAdd Tabnine to your IDE (free)

How to use
replaceAttributeValue
method
in
com.evolveum.icf.dummy.resource.DummyAccount

Best Java code snippets using com.evolveum.icf.dummy.resource.DummyAccount.replaceAttributeValue (Showing top 20 results out of 315)

origin: Evolveum/midpoint

public void changeDescriptionIfNeeded(DummyAccount account) throws SchemaViolationException, ConflictException {
  if (generateAccountDescriptionOnCreate) {
    try {
      account.replaceAttributeValue(DummyAccount.ATTR_DESCRIPTION_NAME, "Updated description of " + account.getName());
    } catch (SchemaViolationException|ConnectException|FileNotFoundException|InterruptedException e) {
      throw new SystemException("Couldn't replace the 'description' attribute value", e);
    }
  }
}
origin: Evolveum/midpoint

accountWill.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_SHIP_NAME, "Flying Dutchman");
accountWill.replaceAttributeValues(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_TITLE_NAME);
accountWill.setEnabled(true);
origin: Evolveum/midpoint

/**
 * Set a null value to the (native) dummy attribute. The UCF layer should filter that out.
 */
@Test
public void test129NullAttributeValue() throws Exception {
  final String TEST_NAME = "test129NullAttributeValue";
  displayTestTitle(TEST_NAME);
  Task task = createTask(TEST_NAME);
  OperationResult result = task.getResult();
  syncServiceMock.reset();
  DummyAccount willDummyAccount = getDummyAccountAssert(transformNameFromResource(ACCOUNT_WILL_USERNAME), willIcfUid);
  willDummyAccount.replaceAttributeValue(DUMMY_ACCOUNT_ATTRIBUTE_TITLE_NAME, null);
  // WHEN
  displayWhen(TEST_NAME);
  PrismObject<ShadowType> accountWill = provisioningService.getObject(ShadowType.class, ACCOUNT_WILL_OID, null, task, result);
  // THEN
  displayThen(TEST_NAME);
  assertSuccess(result);
  ResourceAttributeContainer attributesContainer = ShadowUtil.getAttributesContainer(accountWill);
  ResourceAttribute<Object> titleAttribute = attributesContainer.findAttribute(new QName(ResourceTypeUtil.getResourceNamespace(resourceType), DUMMY_ACCOUNT_ATTRIBUTE_TITLE_NAME));
  assertNull("Title attribute sneaked in", titleAttribute);
  accountWill.checkConsistence();
  assertSteadyResource();
}
origin: Evolveum/midpoint

@Test
public void test720DarkVioletModifyShinetopLocation() throws Exception {
  final String TEST_NAME = "test720DarkVioletModifyShinetopLocation";
  displayTestTitle(TEST_NAME);
  // GIVEN
  Task task = createTask(TEST_NAME);
  OperationResult result = task.getResult();
  dummyAuditService.clear();
  DummyAccount account = getDummyResource(RESOURCE_DUMMY_DARK_VIOLET_NAME).getAccountByUsername(ACCOUNT_SHINETOP_USERNAME);
  // WHEN
  displayWhen(TEST_NAME);
  account.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_LOCATION_NAME, "Monkey Island");
  waitForTaskNextRunAssertSuccess(TASK_LIVE_SYNC_DUMMY_DARK_VIOLET_OID, true);
  // THEN
  displayThen(TEST_NAME);
  displayAllUsers();
  assertUserNick(ACCOUNT_LECHUCK_USERNAME, LECHUCK_FULLNAME, LECHUCK_FULLNAME);
  assertNoUserNick(ACCOUNT_CHARLES_USERNAME, LECHUCK_FULLNAME, LECHUCK_FULLNAME+".1");
  assertUserNick(ACCOUNT_SHINETOP_USERNAME, LECHUCK_FULLNAME, LECHUCK_FULLNAME+".2", "Monkey Island");
}
origin: Evolveum/midpoint

@Test
public void test760DarkVioletModifyMillonarioLocation() throws Exception {
  final String TEST_NAME = "test760DarkVioletModifyMillonarioLocation";
  displayTestTitle(TEST_NAME);
  // GIVEN
  Task task = createTask(TEST_NAME);
  OperationResult result = task.getResult();
  dummyAuditService.clear();
  DummyAccount account = getDummyResource(RESOURCE_DUMMY_DARK_VIOLET_NAME).getAccountByUsername(ACCOUNT_MILLONARIO_USERNAME);
  // WHEN
  displayWhen(TEST_NAME);
  account.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_LOCATION_NAME, "Northern Peru");
  waitForTaskNextRunAssertSuccess(TASK_LIVE_SYNC_DUMMY_DARK_VIOLET_OID, true);
  // THEN
  displayThen(TEST_NAME);
  displayAllUsers();
  assertUserNick(ACCOUNT_MATUSALEM_USERNAME, RUM_FULLNAME, RUM_FULLNAME);
  assertNoUserNick(ACCOUNT_DIPLOMATICO_USERNAME, RUM_FULLNAME, RUM_FULLNAME+iterationTokenDiplomatico);
  assertUserNick(ACCOUNT_MILLONARIO_USERNAME, RUM_FULLNAME, RUM_FULLNAME+iterationTokenMillonario, "Northern Peru");
}
origin: Evolveum/midpoint

@Test
public void test890LiveSyncModifyProtectedAccount() throws Exception {
  final String TEST_NAME = "test890LiveSyncModifyProtectedAccount";
  displayTestTitle(TEST_NAME);
  // GIVEN
  Task syncTask = taskManager.createTaskInstance(TestDummy.class.getName() + "." + TEST_NAME);
  OperationResult result = syncTask.getResult();
  syncServiceMock.reset();
  DummyAccount dummyAccount = getDummyAccountAssert(ACCOUNT_DAEMON_USERNAME, daemonIcfUid);
  dummyAccount.replaceAttributeValue("fullname", "Maxwell deamon");
  ResourceShadowDiscriminator coords = new ResourceShadowDiscriminator(RESOURCE_DUMMY_OID,
      ProvisioningTestUtil.getDefaultAccountObjectClass(resourceType));
  // WHEN
  displayWhen(TEST_NAME);
  provisioningService.synchronize(coords, syncTokenTask, result);
  // THEN
  displayThen(TEST_NAME);
  display("Synchronization result", result);
  assertSuccess(result);
  ResourceObjectShadowChangeDescription lastChange = syncServiceMock.getLastChange();
  display("The change", lastChange);
  syncServiceMock.assertNoNotifyChange();
  checkAllShadows();
  assertSteadyResource();
}
origin: Evolveum/midpoint

/**
 * Destroy the value of account location attribute. Recompute should fix it.
 * This is a "control group" for MID-4236
 */
@Test
public void test141DestroyAndRecompute() throws Exception {
  final String TEST_NAME = "test141DestroyAndRecompute";
  displayTestTitle(TEST_NAME);
  // GIVEN
  Task task = createTask(TEST_NAME);
  OperationResult result = task.getResult();
  
  DummyAccount dummyAccountBefore = getDummyAccount(RESOURCE_DUMMY_COBALT_NAME, ACCOUNT_JACK_DUMMY_USERNAME);
  dummyAccountBefore.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_LOCATION_NAME,
      "Wrongland");
  display("Account before", dummyAccountBefore);
  // WHEN
  recomputeUser(USER_JACK_OID, task, result);
  // THEN
  assertSuccess(result);
  PrismObject<UserType> userAfter = getUser(USER_JACK_OID);
  display("User after", userAfter);
  assertUserJack(userAfter);
  DummyAccount dummyAccountAfter = assertDummyAccount(RESOURCE_DUMMY_COBALT_NAME, ACCOUNT_JACK_DUMMY_USERNAME, USER_JACK_FULL_NAME, true);
  display("Account after", dummyAccountAfter);
  assertDummyAccountAttribute(RESOURCE_DUMMY_COBALT_NAME, ACCOUNT_JACK_DUMMY_USERNAME, 
      DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_LOCATION_NAME, USER_JACK_LOCALITY);
}

origin: Evolveum/midpoint

@Test
public void test722DarkVioletModifyShinetopFullName() throws Exception {
  final String TEST_NAME = "test722DarkVioletModifyShinetopFullName";
  displayTestTitle(TEST_NAME);
  // GIVEN
  Task task = createTask(TEST_NAME);
  OperationResult result = task.getResult();
  dummyAuditService.clear();
  DummyAccount account = getDummyResource(RESOURCE_DUMMY_DARK_VIOLET_NAME).getAccountByUsername(ACCOUNT_SHINETOP_USERNAME);
  // WHEN
  displayWhen(TEST_NAME);
  account.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_FULLNAME_NAME, CHUCKIE_FULLNAME);
  waitForTaskNextRunAssertSuccess(TASK_LIVE_SYNC_DUMMY_DARK_VIOLET_OID, true);
  // THEN
  displayThen(TEST_NAME);
  displayAllUsers();
  assertUserNick(ACCOUNT_LECHUCK_USERNAME, LECHUCK_FULLNAME, LECHUCK_FULLNAME);
  assertNoUserNick(ACCOUNT_CHARLES_USERNAME, LECHUCK_FULLNAME, LECHUCK_FULLNAME+".1");
  assertUserNick(ACCOUNT_SHINETOP_USERNAME, CHUCKIE_FULLNAME, CHUCKIE_FULLNAME, "Monkey Island");
  assertNoUserNick(ACCOUNT_SHINETOP_USERNAME, LECHUCK_FULLNAME, LECHUCK_FULLNAME+".2");
}
origin: Evolveum/midpoint

/**
 * Rename to an identifier that is free. Empty iterationToken is expected.
 */
@Test
public void test762DarkVioletModifyMillonarioFullName() throws Exception {
  final String TEST_NAME = "test762DarkVioletModifyMillonarioFullName";
  displayTestTitle(TEST_NAME);
  // GIVEN
  Task task = createTask(TEST_NAME);
  OperationResult result = task.getResult();
  dummyAuditService.clear();
  DummyAccount account = getDummyResource(RESOURCE_DUMMY_DARK_VIOLET_NAME).getAccountByUsername(ACCOUNT_MILLONARIO_USERNAME);
  // WHEN
  displayWhen(TEST_NAME);
  account.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_FULLNAME_NAME, RON_FULLNAME);
  waitForTaskNextRunAssertSuccess(TASK_LIVE_SYNC_DUMMY_DARK_VIOLET_OID, true);
  // THEN
  displayThen(TEST_NAME);
  displayAllUsers();
  assertUserNick(ACCOUNT_MATUSALEM_USERNAME, RUM_FULLNAME, RUM_FULLNAME);
  assertNoUserNick(ACCOUNT_DIPLOMATICO_USERNAME, RUM_FULLNAME, RUM_FULLNAME+iterationTokenDiplomatico);
  assertUserNick(ACCOUNT_MILLONARIO_USERNAME, RON_FULLNAME, RON_FULLNAME, "Northern Peru");
  assertNoUserNick(ACCOUNT_MILLONARIO_USERNAME, RUM_FULLNAME, RUM_FULLNAME+iterationTokenMillonario);
}
origin: Evolveum/midpoint

/**
 * Destroy the value of account location attribute. Reconcile should fix it.
 * This is a "control group" for MID-4236
 */
@Test
public void test142DestroyAndReconcile() throws Exception {
  final String TEST_NAME = "test142DestroyAndReconcile";
  displayTestTitle(TEST_NAME);
  // GIVEN
  Task task = createTask(TEST_NAME);
  OperationResult result = task.getResult();
  
  DummyAccount dummyAccountBefore = getDummyAccount(RESOURCE_DUMMY_COBALT_NAME, ACCOUNT_JACK_DUMMY_USERNAME);
  dummyAccountBefore.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_LOCATION_NAME,
      "Wrongland");
  display("Account before", dummyAccountBefore);
  // WHEN
  reconcileUser(USER_JACK_OID, task, result);
  // THEN
  assertSuccess(result);
  PrismObject<UserType> userAfter = getUser(USER_JACK_OID);
  display("User after", userAfter);
  assertUserJack(userAfter);
  DummyAccount dummyAccountAfter = assertDummyAccount(RESOURCE_DUMMY_COBALT_NAME, ACCOUNT_JACK_DUMMY_USERNAME, USER_JACK_FULL_NAME, true);
  display("Account after", dummyAccountAfter);
  assertDummyAccountAttribute(RESOURCE_DUMMY_COBALT_NAME, ACCOUNT_JACK_DUMMY_USERNAME, 
      DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_LOCATION_NAME, USER_JACK_LOCALITY);
}

origin: Evolveum/midpoint

/**
 * Destroy the value of account location attribute. Recompute should fix it.
 * MID-4236 (this is where it is really reproduced)
 */
@Test
public void test155DestroyAndRecompute() throws Exception {
  final String TEST_NAME = "test155DestroyAndRecompute";
  displayTestTitle(TEST_NAME);
  // GIVEN
  Task task = createTask(TEST_NAME);
  OperationResult result = task.getResult();
  
  DummyAccount dummyAccountBefore = getDummyAccount(RESOURCE_DUMMY_COBALT_NAME, ACCOUNT_JACK_DUMMY_USERNAME);
  dummyAccountBefore.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_LOCATION_NAME,
      "Wrongland");
  display("Account before", dummyAccountBefore);
  // WHEN
  recomputeUser(USER_JACK_OID, task, result);
  // THEN
  assertSuccess(result);
  PrismObject<UserType> userAfter = getUser(USER_JACK_OID);
  display("User after", userAfter);
  assertUserJack(userAfter);
  DummyAccount dummyAccountAfter = assertDummyAccount(RESOURCE_DUMMY_COBALT_NAME, ACCOUNT_JACK_DUMMY_USERNAME, USER_JACK_FULL_NAME, true);
  display("Account after", dummyAccountAfter);
  assertDummyAccountAttribute(RESOURCE_DUMMY_COBALT_NAME, ACCOUNT_JACK_DUMMY_USERNAME, 
      DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_LOCATION_NAME, USER_JACK_LOCALITY);
}

origin: Evolveum/midpoint

dummyAccountBefore.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_FULLNAME_NAME,
    ACCOUNT_STAN_FULLNAME);
dummyAccountBefore.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_LOCATION_NAME,
    "Melee Island");
dummyResourceEmerald.addAccount(dummyAccountBefore);
origin: Evolveum/midpoint

/**
 * Rename to an identifier that is taken. New random iterationToken is expected.
 */
@Test
public void test764DarkVioletModifyMatusalemFullName() throws Exception {
  final String TEST_NAME = "test764DarkVioletModifyMatusalemFullName";
  displayTestTitle(TEST_NAME);
  // GIVEN
  Task task = createTask(TEST_NAME);
  OperationResult result = task.getResult();
  dummyAuditService.clear();
  DummyAccount account = getDummyResource(RESOURCE_DUMMY_DARK_VIOLET_NAME).getAccountByUsername(ACCOUNT_MATUSALEM_USERNAME);
  // WHEN
  displayWhen(TEST_NAME);
  account.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_FULLNAME_NAME, RON_FULLNAME);
  waitForTaskNextRunAssertSuccess(TASK_LIVE_SYNC_DUMMY_DARK_VIOLET_OID, true);
  // THEN
  displayThen(TEST_NAME);
  displayAllUsers();
  assertNoUserNick(ACCOUNT_MATUSALEM_USERNAME, RUM_FULLNAME, RUM_FULLNAME);
  String iterationTokenMatusalem = lookupIterationTokenByAdditionalName(ACCOUNT_MATUSALEM_USERNAME);
  assertUserNick(ACCOUNT_MATUSALEM_USERNAME, RON_FULLNAME, RON_FULLNAME+iterationTokenMatusalem);
  assertNoUserNick(ACCOUNT_DIPLOMATICO_USERNAME, RUM_FULLNAME, RUM_FULLNAME+iterationTokenDiplomatico);
  assertUserNick(ACCOUNT_MILLONARIO_USERNAME, RON_FULLNAME, RON_FULLNAME, "Northern Peru");
  assertNoUserNick(ACCOUNT_MILLONARIO_USERNAME, RUM_FULLNAME, RUM_FULLNAME+iterationTokenMillonario);
}
origin: Evolveum/midpoint

accountWill.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_TITLE_NAME, "Very Nice Pirate");
accountWill.setEnabled(true);
origin: Evolveum/midpoint

dummyAccountBefore.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_GOSSIP_NAME,
    ROLE_THIEF_OID);
display("Account orange before", dummyAccountBefore);
origin: Evolveum/midpoint

account.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_POSIX_UID_NUMBER, 1002);
origin: Evolveum/midpoint

dummyAccountBefore.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_LOCATION_NAME,
    "Booty Island");
origin: Evolveum/midpoint

account.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_FULLNAME_NAME, "Mancomb Seepgood");
origin: Evolveum/midpoint

accountKate.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_DRINK_NAME, "rum");
origin: Evolveum/midpoint

accountKate.replaceAttributeValue(DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_DRINK_NAME, "");
com.evolveum.icf.dummy.resourceDummyAccountreplaceAttributeValue

Popular methods of DummyAccount

  • <init>
  • addAttributeValues
  • setEnabled
  • setPassword
  • getAttributeValue
  • getAttributeValues
  • getName
  • getPassword
  • replaceAttributeValues
  • addAttributeValue
  • debugDump
  • getId
  • debugDump,
  • getId,
  • isEnabled,
  • isLockout,
  • setLockout,
  • getValidFrom,
  • getValidTo,
  • removeAttributeValues,
  • setValidFrom

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now