congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
DummyAccount.getName
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using com.evolveum.icf.dummy.resource.DummyAccount.getName (Showing top 12 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

public String addAccount(DummyAccount newAccount) throws ObjectAlreadyExistsException, ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException {
  if (generateAccountDescriptionOnCreate && newAccount.getAttributeValue(DummyAccount.ATTR_DESCRIPTION_NAME) == null) {
    newAccount.addAttributeValue(DummyAccount.ATTR_DESCRIPTION_NAME, "Description of " + newAccount.getName());
  }
  return addObject(accounts, newAccount);
}
origin: Evolveum/midpoint

protected void applyModifyMetadata(DummyObject object, OperationOptions options) throws ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException {
  String runAsUser = options.getRunAsUser();
  if (runAsUser != null) {
    if (!configuration.getSupportRunAs()) {
      throw new UnsupportedOperationException("runAsUser option is not supported");
    }
    DummyAccount runAsAccount = resource.getAccountByUsername(runAsUser);
    if (runAsAccount == null) {
      new ConfigurationException("No runAsUser "+runAsUser);
    }
    GuardedString runWithPassword = options.getRunWithPassword();
    if (runWithPassword != null) {
      runWithPassword.access((clearChars) -> {
        if (!runAsAccount.getPassword().equals(new String(clearChars))) {
          throw new InvalidPasswordException("Wrong runWithPassword");
        }
      });
    } else {
      throw new InvalidPasswordException("No runWithPassword");
    }
    object.setLastModifier(runAsAccount.getName());
  } else {
    object.setLastModifier(null);
  }
}

origin: Evolveum/midpoint

protected DummyAccount getDummyAccountAssert(String icfName, String icfUid) throws ConnectException, FileNotFoundException, SchemaViolationException, ConflictException, InterruptedException {
  if (isIcfNameUidSame()) {
    return dummyResource.getAccountByUsername(icfName);
  } else {
     DummyAccount account = dummyResource.getAccountById(icfUid);
     assertNotNull("No dummy account with ICF UID "+icfUid+" (expected name "+icfName+")", account);
     assertEquals("Unexpected name in "+account, icfName, account.getName());
     return account;
  }
}

origin: Evolveum/midpoint

@Test
public void test040AddAccount() throws Exception {
  final String TEST_NAME = "test040AddAccount";
  TestUtil.displayTestTitle(this, TEST_NAME);
  OperationResult result = new OperationResult(this.getClass().getName() + "." + TEST_NAME);
  ObjectClassComplexTypeDefinition defaultAccountDefinition = resourceSchema.findDefaultObjectClassDefinition(ShadowKindType.ACCOUNT);
  ShadowType shadowType = new ShadowType();
  PrismTestUtil.getPrismContext().adopt(shadowType);
  shadowType.setName(PrismTestUtil.createPolyStringType(ACCOUNT_JACK_USERNAME));
  ObjectReferenceType resourceRef = new ObjectReferenceType();
  resourceRef.setOid(resource.getOid());
  shadowType.setResourceRef(resourceRef);
  shadowType.setObjectClass(defaultAccountDefinition.getTypeName());
  PrismObject<ShadowType> shadow = shadowType.asPrismObject();
  ResourceAttributeContainer attributesContainer = ShadowUtil.getOrCreateAttributesContainer(shadow, defaultAccountDefinition);
  ResourceAttribute<String> icfsNameProp = attributesContainer.findOrCreateAttribute(SchemaConstants.ICFS_NAME);
  icfsNameProp.setRealValue(ACCOUNT_JACK_USERNAME);
  // WHEN
  cc.addObject(shadow, null, null, result);
  // THEN
  DummyAccount dummyAccount = dummyResource.getAccountByUsername(ACCOUNT_JACK_USERNAME);
  assertNotNull("Account "+ACCOUNT_JACK_USERNAME+" was not created", dummyAccount);
  assertNotNull("Account "+ACCOUNT_JACK_USERNAME+" has no username", dummyAccount.getName());
}
origin: Evolveum/midpoint

@Test
public void test100AddAccount() throws Exception {
  final String TEST_NAME = "test100AddAccount";
  TestUtil.displayTestTitle(this, TEST_NAME);
  OperationResult result = new OperationResult(this.getClass().getName() + "." + TEST_NAME);
  ObjectClassComplexTypeDefinition defaultAccountDefinition = resourceSchema.findDefaultObjectClassDefinition(ShadowKindType.ACCOUNT);
  ShadowType shadowType = new ShadowType();
  PrismTestUtil.getPrismContext().adopt(shadowType);
  shadowType.setName(PrismTestUtil.createPolyStringType(ACCOUNT_JACK_USERNAME));
  ObjectReferenceType resourceRef = new ObjectReferenceType();
  resourceRef.setOid(resource.getOid());
  shadowType.setResourceRef(resourceRef);
  shadowType.setObjectClass(defaultAccountDefinition.getTypeName());
  PrismObject<ShadowType> shadow = shadowType.asPrismObject();
  ResourceAttributeContainer attributesContainer = ShadowUtil.getOrCreateAttributesContainer(shadow, defaultAccountDefinition);
  ResourceAttribute<String> icfsNameProp = attributesContainer.findOrCreateAttribute(SchemaConstants.ICFS_NAME);
  icfsNameProp.setRealValue(ACCOUNT_JACK_USERNAME);
  // WHEN
  cc.addObject(shadow, null, null, result);
  // THEN
  DummyAccount dummyAccount = dummyResource.getAccountByUsername(ACCOUNT_JACK_USERNAME);
  assertNotNull("Account "+ACCOUNT_JACK_USERNAME+" was not created", dummyAccount);
  assertNotNull("Account "+ACCOUNT_JACK_USERNAME+" has no username", dummyAccount.getName());
}
origin: Evolveum/midpoint

String newName = (String)attr.getValue().get(0);
try {
  resource.renameAccount(account.getId(), account.getName(), newName);
} catch (ObjectDoesNotExistException e) {
  throw new org.identityconnectors.framework.common.exceptions.UnknownUidException(e.getMessage(), e);
origin: Evolveum/midpoint

String newName = getSingleReplaceValueMandatory(delta, String.class);
try {
  resource.renameAccount(account.getId(), account.getName(), newName);
} catch (ObjectDoesNotExistException e) {
  throw new org.identityconnectors.framework.common.exceptions.UnknownUidException(e.getMessage(), e);
origin: Evolveum/midpoint

assertEquals("Username is wrong", ACCOUNT_WILL_USERNAME, dummyAccount.getName());
assertEquals("Fullname is wrong", "Will Turner", dummyAccount.getAttributeValue("fullname"));
assertTrue("The account is not enabled", dummyAccount.isEnabled());
origin: Evolveum/midpoint

assertEquals("Username is wrong", transformNameFromResource(ACCOUNT_WILL_USERNAME), dummyAccount.getName());
assertEquals("Fullname is wrong", "Will Turner", dummyAccount.getAttributeValue("fullname"));
assertTrue("The account is not enabled", dummyAccount.isEnabled());
origin: Evolveum/midpoint

assertEquals("Username is wrong", transformNameFromResource(ACCOUNT_WILL_USERNAME), dummyAccount.getName());
assertEquals("Fullname is wrong", "Will Turner", dummyAccount.getAttributeValue("fullname"));
assertTrue("The account is not enabled", dummyAccount.isEnabled());
origin: Evolveum/midpoint

assertEquals("Username is wrong", transformNameFromResource(ACCOUNT_WILL_USERNAME), dummyAccount.getName());
assertEquals("Fullname is wrong", "Will Turner", dummyAccount.getAttributeValue("fullname"));
assertTrue("The account is not enabled", dummyAccount.isEnabled());
com.evolveum.icf.dummy.resourceDummyAccountgetName

Popular methods of DummyAccount

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

Popular in Java

  • Reading from database using SQL prepared statement
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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