public class UnlockChargingContractException extends OperationFailureException
The following reasons are defined:
DOES_NOT_EXIST , which means that the provider contract does not exist INVALID , which means that the operation is invalid (provider contract ID is missing) NOT_LOCKED , which means that the provider contract is not locked The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="unlockChargingContractFault">
<xs:complexType>
<xs:attribute name="reason" type="UnlockChargingContractFaultReasonType"/>
<xs:attribute name="message" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="UnlockChargingContractFaultReasonType">
<xs:restriction base="xs:string">
<xs:enumeration value="does_not_exist"/>
<xs:enumeration value="invalid"/>
<xs:enumeration value="not_locked"/>
</xs:restriction>
</xs:simpleType>
| Modifier and Type | Field and Description |
|---|---|
static int |
DOES_NOT_EXIST
0: Constant indicating that the provider contract does not exist
|
static int |
INVALID
1: Constant indicating that the operation is invalid (provider contract ID is missing)
|
static int |
NOT_LOCKED
2: Constant indicating that the provider contract is not locked
|
static String |
OPERATION_NAME
The XML tag name of this exception: "unlockChargingContractFault"
|
| Constructor and Description |
|---|
UnlockChargingContractException()
Constructs an empty exception.
|
UnlockChargingContractException(int reason,
String message)
Constructs an exception with a message.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
String |
getMessage() |
String |
getName()
Gets the name of the operation.
|
int |
getReason() |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
getOperandReferenceaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static final int DOES_NOT_EXIST
public static final int INVALID
public static final int NOT_LOCKED
public static final String OPERATION_NAME
public UnlockChargingContractException()
public UnlockChargingContractException(int reason,
String message)
reason - the reason.message - the message.public String getName()
public int getReason()
public String getMessage()
getMessage in class Throwablepublic void setAttributes(XMLAttributes atts)
XMLMarshallableatts - The XML attributes of the current elementpublic void addCharacterData(String cData)
XMLMarshallablecData - The character data to be addedpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.tagName - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallableoutput - The XML output to marshal the object into