Class InvalidPasswordException

All Implemented Interfaces:
OperationResult, XMLMarshallable, Serializable

public class InvalidPasswordException extends OperationFailureException
Exception thrown when an error occurs during the modification of the password of an SAP CC user.

The possible reasons are:

  • The password is empty
  • The password contains the login of the SAP CC user
  • The password is too short
  • The password does not contain all the required types of characters
  • The password has already been changed recently
  • The password has already been used recently

Note

The SAP CC system throws this exception only when the advanced password management feature is enabled by the system administrator.

See Also:

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="invalidPasswordFault">
   <xs:complexType>
     <xs:attribute name="reason" type="invalidPasswordReason"/>
     <xs:attribute name="message" type="xs:string"/>
   </xs:complexType>
 </xs:element>

 <xs:simpleType name="invalidPasswordReason">
   <xs:restriction base="xs:string">
     <xs:enumeration value="empty"/>
     <xs:enumeration value="contains_login"/>
     <xs:enumeration value="minimum_length"/>
     <xs:enumeration value="complexity"/>
     <xs:enumeration value="mininum_age"/>
     <xs:enumeration value="reuse_delay"/>
     <xs:enumeration value="reuse_cycle"/>
   </xs:restriction>
 </xs:simpleType>

  • Field Details

    • EMPTY

      public static final int EMPTY
      Constant for the empty error
      See Also:
    • CONTAINS_LOGIN

      public static final int CONTAINS_LOGIN
      Constant for the contains_login error
      See Also:
    • MINIMUM_LENGTH

      public static final int MINIMUM_LENGTH
      Constant for the minimum_length error
      See Also:
    • COMPLEXITY

      public static final int COMPLEXITY
      Constant for the complexity error
      See Also:
    • MININUM_AGE

      public static final int MININUM_AGE
      Constant for the mininum_age error
      See Also:
    • REUSE_DELAY

      public static final int REUSE_DELAY
      Constant for the reuse_delay error
      See Also:
    • REUSE_CYCLE

      public static final int REUSE_CYCLE
      Constant for the reuse_cycle error
      See Also:
  • Constructor Details

    • InvalidPasswordException

      public InvalidPasswordException()
      Constructs an empty exception.
    • InvalidPasswordException

      public InvalidPasswordException(int reason, String message)
      Constructs an exception with a reason and a message.
      Parameters:
      reason - The reason of the exception
      message - The message of the exception
  • Method Details

    • getReason

      public int getReason()
      Returns the reason of the exception.
      Returns:
      The reason of the exception
    • getMessage

      public String getMessage()
      Returns the message of the exception.
      Overrides:
      getMessage in class Throwable
      Returns:
      The message of the exception
    • setReason

      public void setReason(int reason)
      Sets the reason of the exception.
      Parameters:
      reason - The reason of the exception
    • setMessage

      public void setMessage(String message)
      Sets the message of the exception.
      Parameters:
      message - The message of the exception
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Parameters:
      atts - The XML attributes of the current element
    • addCharacterData

      public void addCharacterData(String data)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Parameters:
      data - The character data to be added
    • addChild

      public void addChild(String tagName, XMLMarshallable child)
      Description copied from interface: XMLMarshallable
      Adds a child to the object, the child representing the marshallable object which must be added to the element.
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Parameters:
      output - The XML output to marshal the object into
    • getOperandReference

      public String getOperandReference()
      Description copied from interface: OperationResult
      Gets the code or the reference (if no code exists) that identifies the operand of the operation request; If the operation is not auditable, the operand reference is null.
      Specified by:
      getOperandReference in interface OperationResult
      Overrides:
      getOperandReference in class OperationFailureException
      Returns:
      The operand reference of the operation result
    • getReasonInteger

      public static int getReasonInteger(String reasonString)
      Gets the integer code for an exception reason from its string code.
      Parameters:
      reasonString - The string code of the exception reason
      Returns:
      The integer code of the exception reason
    • getReasonString

      public static String getReasonString(int reasonInteger)
      Gets the string code for an exception reason from its integer code.
      Parameters:
      reasonInteger - The integer code of the exception reason
      Returns:
      The string code of the exception reason