Package com.highdeal.hci
Class InvalidPasswordException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.highdeal.hci.OperationFailureException
com.highdeal.hci.InvalidPasswordException
- All Implemented Interfaces:
OperationResult,XMLMarshallable,Serializable
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant for thecomplexityerrorstatic final intConstant for thecontains_loginerrorstatic final intConstant for theemptyerrorstatic final intConstant for theminimum_lengtherrorstatic final intConstant for themininum_ageerrorstatic final intConstant for thereuse_cycleerrorstatic final intConstant for thereuse_delayerror -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty exception.InvalidPasswordException(int reason, String message) Constructs an exception with a reason and a message. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String data) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Returns the message of the exception.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 isnull.intReturns the reason of the exception.static intgetReasonInteger(String reasonString) Gets the integer code for an exception reason from its string code.static StringgetReasonString(int reasonInteger) Gets the string code for an exception reason from its integer code.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetMessage(String message) Sets the message of the exception.voidsetReason(int reason) Sets the reason of the exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
EMPTY
public static final int EMPTYConstant for theemptyerror- See Also:
-
CONTAINS_LOGIN
public static final int CONTAINS_LOGINConstant for thecontains_loginerror- See Also:
-
MINIMUM_LENGTH
public static final int MINIMUM_LENGTHConstant for theminimum_lengtherror- See Also:
-
COMPLEXITY
public static final int COMPLEXITYConstant for thecomplexityerror- See Also:
-
MININUM_AGE
public static final int MININUM_AGEConstant for themininum_ageerror- See Also:
-
REUSE_DELAY
public static final int REUSE_DELAYConstant for thereuse_delayerror- See Also:
-
REUSE_CYCLE
public static final int REUSE_CYCLEConstant for thereuse_cycleerror- See Also:
-
-
Constructor Details
-
InvalidPasswordException
public InvalidPasswordException()Constructs an empty exception. -
InvalidPasswordException
Constructs an exception with a reason and a message.- Parameters:
reason- The reason of the exceptionmessage- The message of the exception
-
-
Method Details
-
getReason
public int getReason()Returns the reason of the exception.- Returns:
- The reason of the exception
-
getMessage
Returns the message of the exception.- Overrides:
getMessagein classThrowable- 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
Sets the message of the exception.- Parameters:
message- The message of the exception
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Parameters:
atts- TheXML attributesof the current element
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Parameters:
data- The character data to be added
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Parameters:
output- TheXML outputto marshal the object into
-
getOperandReference
Description copied from interface:OperationResultGets 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 isnull.- Specified by:
getOperandReferencein interfaceOperationResult- Overrides:
getOperandReferencein classOperationFailureException- Returns:
- The operand reference of the operation result
-
getReasonInteger
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
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
-