Package com.verisign.epp.codec.gen
Class EPPDcp
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPDcp
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPDcp extends java.lang.Object implements EPPCodecComponent
An Optional <dcp> (data collection policy) element that contains child elements used to describe the server's policy for data collection and management.Polcy elements should be disclosed to all entities directly and indirectly involved in subsequent server interactions, Child elements include the following- An access <access> element that describes the access provided by the server
- One or more statement <statement> elements that describe the data
collection purpouses supported by the server. Use methods
getAccess
andsetAccess
to get and set the Access element(s), Use methodsgetStatement
andsetStatement
to get and set the Statement elements(s).
- See Also:
EPPFactory
,EPPGreeting
,EPPService
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static short
ACCESS_ALL
Constant used with the Access attribute that means access is given to all identified data.static short
ACCESS_NONE
Constant used with the Access attribute that means No access is provided to identified data.static short
ACCESS_NULL
Constant used with the Access attribute that means data is not persistent, so no access is possible.static short
ACCESS_OTHER
Constant used with the Access attribute that means access is given to other identified data of a non- personal nature.static short
ACCESS_PERSONAL
Constant used with the Access attribute that means access is given to identified data relating to individuals and organizational entities.static short
ACCESS_PERSONAL_AND_OTHER
Constant used with the Access attribute that means access is given to identified data relating to individuals, organizational entities, and other data of a non-personal nature.static short
EXPIRY_ABSOLUTE
Constant used with the Expiry attribute that means the policy is valid from the current date and time until it expires on the specified date and time.static short
EXPIRY_NONE
No expiry specified.static short
EXPIRY_RELATIVE
Constant used with the Expiry attribute that means the policy is valid from the current date and time until the end of the specified duration.
-
Constructor Summary
Constructors Constructor Description EPPDcp()
Default constructor.EPPDcp(short aAccess, java.util.Vector aStatements)
Allocates a newEPPDcp
and sets all of the required attributes to the arguments values.EPPDcp(short aAccess, java.util.Vector aStatements, Duration aExpiryRelative)
Allocates a newEPPDcp
and sets all of the required attributes and a relative expiry duration.EPPDcp(short aAccess, java.util.Vector aStatements, java.util.Date aExpiryAbsolute)
Allocates a newEPPDcp
and sets all of the required attributes and an absolute expiry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStatement(EPPStatement aStatement)
Adds a supported/desired Statement object.java.lang.Object
clone()
CloneEPPDcp
.void
decode(org.w3c.dom.Element aElement)
decodeEPPDcp
from a DOM element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
encodeEPPDcp
into a DOM element tree.boolean
equals(java.lang.Object aObject)
implements a deepEPPDcp
compare.short
getAccess()
java.util.Date
getExpiryAbsolute()
Gets the expiry absolute date.short
getExpiryType()
Gets the expiry type by returning one of theEXPIRY_
constants.Duration
getExpiryyRelative()
Gets the expiry relative duration.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.util.Vector
getStatements()
void
setAccess(short aAccess)
Sets the Access service associated with the DataCollectionPolciy Objecatvoid
setExpiryAbsolute(java.util.Date aExpiryDate)
Sets the expiry to an absolute date.void
setExpiryRelative(Duration aDuration)
Sets the expiry to an relative duration.void
setStatements(java.util.Vector aStatements)
Sets the list of supported/desired Statement objects.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
EXPIRY_NONE
public static final short EXPIRY_NONE
No expiry specified. This is the default value.- See Also:
- Constant Field Values
-
EXPIRY_ABSOLUTE
public static final short EXPIRY_ABSOLUTE
Constant used with the Expiry attribute that means the policy is valid from the current date and time until it expires on the specified date and time.- See Also:
- Constant Field Values
-
EXPIRY_RELATIVE
public static final short EXPIRY_RELATIVE
Constant used with the Expiry attribute that means the policy is valid from the current date and time until the end of the specified duration.- See Also:
- Constant Field Values
-
ACCESS_ALL
public static final short ACCESS_ALL
Constant used with the Access attribute that means access is given to all identified data.- See Also:
- Constant Field Values
-
ACCESS_NONE
public static final short ACCESS_NONE
Constant used with the Access attribute that means No access is provided to identified data.- See Also:
- Constant Field Values
-
ACCESS_NULL
public static final short ACCESS_NULL
Constant used with the Access attribute that means data is not persistent, so no access is possible.- See Also:
- Constant Field Values
-
ACCESS_PERSONAL
public static final short ACCESS_PERSONAL
Constant used with the Access attribute that means access is given to identified data relating to individuals and organizational entities.- See Also:
- Constant Field Values
-
ACCESS_PERSONAL_AND_OTHER
public static final short ACCESS_PERSONAL_AND_OTHER
Constant used with the Access attribute that means access is given to identified data relating to individuals, organizational entities, and other data of a non-personal nature.- See Also:
- Constant Field Values
-
ACCESS_OTHER
public static final short ACCESS_OTHER
Constant used with the Access attribute that means access is given to other identified data of a non- personal nature.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPDcp
public EPPDcp()
Default constructor.
-
EPPDcp
public EPPDcp(short aAccess, java.util.Vector aStatements)
Allocates a newEPPDcp
and sets all of the required attributes to the arguments values. The expiry is set toEXPIRY_NONE
.- Parameters:
aAccess
- Using one of theACCESS_
constantsaStatements
- vector ofEPPStatement
instances
-
EPPDcp
public EPPDcp(short aAccess, java.util.Vector aStatements, java.util.Date aExpiryAbsolute)
Allocates a newEPPDcp
and sets all of the required attributes and an absolute expiry.- Parameters:
aAccess
- Using one of theACCESS_
constantsaStatements
- vector ofEPPStatement
instancesaExpiryAbsolute
- Absolute expiry date
-
EPPDcp
public EPPDcp(short aAccess, java.util.Vector aStatements, Duration aExpiryRelative)
Allocates a newEPPDcp
and sets all of the required attributes and a relative expiry duration.- Parameters:
aAccess
- Using one of theACCESS_
constantsaStatements
- vector ofEPPStatement
instancesaExpiryRelative
- Relative expiry duration
-
-
Method Detail
-
getStatements
public java.util.Vector getStatements()
-
setStatements
public void setStatements(java.util.Vector aStatements)
Sets the list of supported/desired Statement objects. An EPP Client will set the list of statement objects associated with the EPP Server.- Parameters:
aStatements
- Vector ofEPPStatement
instances.
-
addStatement
public void addStatement(EPPStatement aStatement)
Adds a supported/desired Statement object. An EPP Client will set the list of statement objects associated with the EPP Server.- Parameters:
aStatement
- Statements to add
-
getAccess
public short getAccess()
-
setAccess
public void setAccess(short aAccess)
Sets the Access service associated with the DataCollectionPolciy Objecat- Parameters:
aAccess
- Describes access provided by the server
-
getExpiryAbsolute
public java.util.Date getExpiryAbsolute()
Gets the expiry absolute date.- Returns:
- Absolute expiry date if defined;
null
otherwise.
-
setExpiryAbsolute
public void setExpiryAbsolute(java.util.Date aExpiryDate)
Sets the expiry to an absolute date. This is will set the expiry relative attribute tonull
since they are mutually exclusive.- Parameters:
aExpiryDate
- Date when DCP expires
-
getExpiryyRelative
public Duration getExpiryyRelative()
Gets the expiry relative duration.- Returns:
- Relative expiry duration if defined;
null
otherwise.
-
setExpiryRelative
public void setExpiryRelative(Duration aDuration)
Sets the expiry to an relative duration. This is will set the expiry absolute attribute tonull
since they are mutually exclusive.- Parameters:
aDuration
- Duration that the DCP is valid
-
getExpiryType
public short getExpiryType()
Gets the expiry type by returning one of theEXPIRY_
constants. Use the appropriategetExpiry
method based on the type.- Returns:
EXPIRY_
constant value.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
encodeEPPDcp
into a DOM element tree. The "dcp" element is created and theaccess
,statement
nodes are appended as children.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- DOCUMENT ME!- Returns:
- dcp root element tree.
- Throws:
EPPEncodeException
- Error encoding the DOM element tree.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
decodeEPPDcp
from a DOM element tree. TheaElement
argument needs to be the <dcp> element- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- root element tree.- Throws:
EPPDecodeException
- Error decoding the DOM element tree.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPDcp
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPDcp
instance to compare with- Returns:
- DOCUMENT ME!
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPDcp
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPDcp
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-