congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ValuePolicyType.getLifetime
Code IndexAdd Tabnine to your IDE (free)

How to use
getLifetime
method
in
com.evolveum.midpoint.xml.ns._public.common.common_3.ValuePolicyType

Best Java code snippets using com.evolveum.midpoint.xml.ns._public.common.common_3.ValuePolicyType.getLifetime (Showing top 2 results out of 315)

origin: Evolveum/midpoint

/**
 * add defined default values
 */
private void normalize(ValuePolicyType pp) {
  if (null == pp) {
    throw new IllegalArgumentException("Password policy cannot be null");
  }
  if (null == pp.getStringPolicy()) {
    StringPolicyType sp = new StringPolicyType();
    pp.setStringPolicy(StringPolicyUtils.normalize(sp));
  } else {
    pp.setStringPolicy(StringPolicyUtils.normalize(pp.getStringPolicy()));
  }
  if (null == pp.getLifetime()) {
    PasswordLifeTimeType lt = new PasswordLifeTimeType();
    lt.setExpiration(-1);
    lt.setWarnBeforeExpiration(0);
    lt.setLockAfterExpiration(0);
    lt.setMinPasswordAge(0);
    lt.setPasswordHistoryLength(0);
  }
}
 
origin: Evolveum/midpoint

private void setDeprecatedPasswordPolicyProperties(ValuePolicyType passwordPolicyType,
    PasswordCredentialsPolicyType passwd) {
  PasswordLifeTimeType lifetime = passwordPolicyType.getLifetime();
  if (lifetime != null) {
    Integer expiration = lifetime.getExpiration();
    if (expiration != null && expiration != 0 && passwd.getMaxAge() == null) {
      passwd.setMaxAge(daysToDuration(expiration));
    }
    Integer minPasswordAge = lifetime.getMinPasswordAge();
    if (minPasswordAge != null && minPasswordAge != 0 && passwd.getMinAge() == null) {
      passwd.setMinAge(daysToDuration(minPasswordAge));
    }
    Integer passwordHistoryLength = lifetime.getPasswordHistoryLength();
    if (passwordHistoryLength != null && passwd.getHistoryLength() == null) {
      passwd.setHistoryLength(passwordHistoryLength);
    }
  }
  String minOccurs = passwordPolicyType.getMinOccurs();
  if (minOccurs != null && passwd.getMinOccurs() == null) {
    passwd.setMinOccurs(minOccurs);
  }
}
com.evolveum.midpoint.xml.ns._public.common.common_3ValuePolicyTypegetLifetime

Popular methods of ValuePolicyType

    Popular in Java

    • Parsing JSON documents to java classes using gson
    • startActivity (Activity)
    • getContentResolver (Context)
    • getSystemService (Context)
    • FileInputStream (java.io)
      An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
    • Path (java.nio.file)
    • Collection (java.util)
      Collection is the root of the collection hierarchy. It defines operations on data collections and t
    • LinkedHashMap (java.util)
      LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
    • ZipFile (java.util.zip)
      This class provides random read access to a zip file. You pay more to read the zip file's central di
    • Project (org.apache.tools.ant)
      Central representation of an Ant project. This class defines an Ant project with all of its targets,
    • Sublime Text for Python
    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