Class EPPDcp

java.lang.Object
com.verisign.epp.codec.gen.EPPDcp
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPDcp extends 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 and setAccess to get and set the Access element(s), Use methods getStatement and setStatement to get and set the Statement elements(s).
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final short
    Constant used with the Access attribute that means access is given to all identified data.
    static final short
    Constant used with the Access attribute that means No access is provided to identified data.
    static final short
    Constant used with the Access attribute that means data is not persistent, so no access is possible.
    static final short
    Constant used with the Access attribute that means access is given to other identified data of a non- personal nature.
    static final short
    Constant used with the Access attribute that means access is given to identified data relating to individuals and organizational entities.
    static final short
    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 final short
    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 final short
    No expiry specified.
    static final short
    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
    Default constructor.
    EPPDcp(short aAccess, Vector<EPPStatement> aStatements)
    Allocates a new EPPDcp and sets all of the required attributes to the arguments values.
    EPPDcp(short aAccess, Vector<EPPStatement> aStatements, Duration aExpiryRelative)
    Allocates a new EPPDcp and sets all of the required attributes and a relative expiry duration.
    EPPDcp(short aAccess, Vector<EPPStatement> aStatements, Date aExpiryAbsolute)
    Allocates a new EPPDcp and sets all of the required attributes and an absolute expiry.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a supported/desired Statement object.
    Clone EPPDcp.
    void
    decode(Element aElement)
    decode EPPDcp from a DOM element tree.
    encode(Document aDocument)
    encode EPPDcp into a DOM element tree.
    boolean
    equals(Object aObject)
    implements a deep EPPDcp compare.
    short
     
    Gets the expiry absolute date.
    short
    Gets the expiry type by returning one of the EXPIRY_ constants.
    Gets the expiry relative duration.
    Returns the XML namespace associated with the EPPCodecComponent.
     
    void
    setAccess(short aAccess)
    Sets the Access service associated with the DataCollectionPolciy Objecat
    void
    setExpiryAbsolute(Date aExpiryDate)
    Sets the expiry to an absolute date.
    void
    Sets the expiry to an relative duration.
    void
    Sets the list of supported/desired Statement objects.
    Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • EXPIRY_NONE

      public static final short EXPIRY_NONE
      No expiry specified. This is the default value.
      See Also:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
  • Constructor Details

    • EPPDcp

      public EPPDcp()
      Default constructor.
    • EPPDcp

      public EPPDcp(short aAccess, Vector<EPPStatement> aStatements)
      Allocates a new EPPDcp and sets all of the required attributes to the arguments values. The expiry is set to EXPIRY_NONE.
      Parameters:
      aAccess - Using one of the ACCESS_ constants
      aStatements - vector of EPPStatement instances
    • EPPDcp

      public EPPDcp(short aAccess, Vector<EPPStatement> aStatements, Date aExpiryAbsolute)
      Allocates a new EPPDcp and sets all of the required attributes and an absolute expiry.
      Parameters:
      aAccess - Using one of the ACCESS_ constants
      aStatements - vector of EPPStatement instances
      aExpiryAbsolute - Absolute expiry date
    • EPPDcp

      public EPPDcp(short aAccess, Vector<EPPStatement> aStatements, Duration aExpiryRelative)
      Allocates a new EPPDcp and sets all of the required attributes and a relative expiry duration.
      Parameters:
      aAccess - Using one of the ACCESS_ constants
      aStatements - vector of EPPStatement instances
      aExpiryRelative - Relative expiry duration
  • Method Details

    • getStatements

      public Vector<EPPStatement> getStatements()
    • setStatements

      public void setStatements(Vector<EPPStatement> 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 of EPPStatement 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 Date getExpiryAbsolute()
      Gets the expiry absolute date.
      Returns:
      Absolute expiry date if defined; null otherwise.
    • setExpiryAbsolute

      public void setExpiryAbsolute(Date aExpiryDate)
      Sets the expiry to an absolute date. This is will set the expiry relative attribute to null 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 to null 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 the EXPIRY_ constants. Use the appropriate getExpiry method based on the type.
      Returns:
      EXPIRY_ constant value.
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      encode EPPDcp into a DOM element tree. The "dcp" element is created and the access,statement nodes are appended as children.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - DOCUMENT ME!
      Returns:
      dcp root element tree.
      Throws:
      EPPEncodeException - Error encoding the DOM element tree.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      decode EPPDcp from a DOM element tree. The aElement argument needs to be the <dcp> element
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - root element tree.
      Throws:
      EPPDecodeException - Error decoding the DOM element tree.
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPDcp compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPDcp instance to compare with
      Returns:
      DOCUMENT ME!
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPDcp.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class Object
      Returns:
      clone of EPPDcp
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.