anon.infoservice
Class ServiceOperator

java.lang.Object
  extended by anon.infoservice.AbstractDatabaseEntry
      extended by anon.infoservice.ServiceOperator

public class ServiceOperator
extends AbstractDatabaseEntry

Holds the information about the operator of a service.


Field Summary
private static java.lang.String AT_SUBSTITUTE
           
private static java.lang.String DOT_SUBSTITUTE
           
private  MultiCertPath m_certPath
          The operators certificate
private  java.lang.String m_commonName
           
private  java.lang.String m_countryCode
           
private  long m_lastUpdate
          The last update time.
private  java.lang.String m_strEmail
          This is the EMail address of the operator.
private  java.lang.String m_strID
           
private  java.lang.String m_strOrganization
          This is the name of the operator or organization.
private  java.lang.String m_strOrgUnit
           
private  java.lang.String m_strUrl
          This is the URL of the operators home page.
private static boolean SPAM_SAFE
           
static java.lang.String XML_ELEMENT_COUNTRYCODE
           
static java.lang.String XML_ELEMENT_EMAIL
           
static java.lang.String XML_ELEMENT_EMAIL_SPAMSAFE
           
static java.lang.String XML_ELEMENT_NAME
           
static java.lang.String XML_ELEMENT_ORG_UNIT
           
static java.lang.String XML_ELEMENT_ORGANISATION
           
static java.lang.String XML_ELEMENT_URL
           
 
Fields inherited from class anon.infoservice.AbstractDatabaseEntry
XML_ATTR_LAST_UPDATE, XML_LAST_UPDATE
 
Constructor Summary
ServiceOperator(JAPCertificate operatorCertificate)
          Creates a ServiceOperator just by his Certificate
ServiceOperator(org.w3c.dom.Node a_node, MultiCertPath a_certPath, long a_lastUpdate)
          Creates a new ServiceOperator an operator certificate or from an XML description (Operator node).
 
Method Summary
 boolean equals(java.lang.Object a_obj)
           
 JAPCertificate getCertificate()
          Returns the operator certificate.
 MultiCertPath getCertPath()
           
 java.lang.String getCommonName()
           
 java.lang.String getCountryCode()
           
 java.lang.String getEMail()
          Return the EMail address of the operator.
 java.lang.String getEMailSpamSafe()
           
 java.lang.String getId()
          Returns a unique ID for a database entry.
 long getLastUpdate()
          Returns the time in milliseconds when this db entry was created from the origin instance.
 java.lang.String getOrganization()
          Returns the name of the operator or organization.
 java.lang.String getOrganizationUnit()
           
 java.lang.String getUrl()
          Returns the URL of the operators home page.
 long getVersionNumber()
          Returns version number which is used to determine the more recent infoservice entry, if two entries are compared (higher version number -> more recent entry).
 int hashCode()
           
 boolean hasTermsAndConditions()
           
 org.w3c.dom.Element toXMLElement(org.w3c.dom.Document ownerDocument)
           
 org.w3c.dom.Element toXMLElement(org.w3c.dom.Document ownerDocument, boolean spamSafe)
           
 org.w3c.dom.Element toXMLElement(org.w3c.dom.Document ownerDocument, OperatorAddress address, boolean spamSafe)
           
 
Methods inherited from class anon.infoservice.AbstractDatabaseEntry
deletePersistence, getCreationTime, getExpireTime, isNewerThan, isPersistanceDeletionAllowed, isUserDefined, resetCreationTime
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_ELEMENT_NAME

public static final java.lang.String XML_ELEMENT_NAME
See Also:
Constant Field Values

XML_ELEMENT_ORGANISATION

public static final java.lang.String XML_ELEMENT_ORGANISATION
See Also:
Constant Field Values

XML_ELEMENT_COUNTRYCODE

public static final java.lang.String XML_ELEMENT_COUNTRYCODE
See Also:
Constant Field Values

XML_ELEMENT_URL

public static final java.lang.String XML_ELEMENT_URL
See Also:
Constant Field Values

XML_ELEMENT_ORG_UNIT

public static final java.lang.String XML_ELEMENT_ORG_UNIT
See Also:
Constant Field Values

XML_ELEMENT_EMAIL

public static final java.lang.String XML_ELEMENT_EMAIL
See Also:
Constant Field Values

XML_ELEMENT_EMAIL_SPAMSAFE

public static final java.lang.String XML_ELEMENT_EMAIL_SPAMSAFE
See Also:
Constant Field Values

AT_SUBSTITUTE

private static final java.lang.String AT_SUBSTITUTE
See Also:
Constant Field Values

DOT_SUBSTITUTE

private static final java.lang.String DOT_SUBSTITUTE
See Also:
Constant Field Values

SPAM_SAFE

private static final boolean SPAM_SAFE
See Also:
Constant Field Values

m_strOrganization

private java.lang.String m_strOrganization
This is the name of the operator or organization.


m_strOrgUnit

private java.lang.String m_strOrgUnit

m_strUrl

private java.lang.String m_strUrl
This is the URL of the operators home page.


m_strEmail

private java.lang.String m_strEmail
This is the EMail address of the operator.


m_countryCode

private java.lang.String m_countryCode

m_commonName

private java.lang.String m_commonName

m_lastUpdate

private long m_lastUpdate
The last update time.


m_strID

private java.lang.String m_strID

m_certPath

private MultiCertPath m_certPath
The operators certificate

Constructor Detail

ServiceOperator

public ServiceOperator(JAPCertificate operatorCertificate)
Creates a ServiceOperator just by his Certificate

Parameters:
operatorCertificate - the opeartors certificate

ServiceOperator

public ServiceOperator(org.w3c.dom.Node a_node,
                       MultiCertPath a_certPath,
                       long a_lastUpdate)
Creates a new ServiceOperator an operator certificate or from an XML description (Operator node).

Parameters:
a_node - The operator node from an XML document.
a_certificate - The operator certificate
a_lastUpdate - Last update time.
Method Detail

getVersionNumber

public long getVersionNumber()
Returns version number which is used to determine the more recent infoservice entry, if two entries are compared (higher version number -> more recent entry).

Specified by:
getVersionNumber in class AbstractDatabaseEntry
Returns:
The version number for this entry.

getLastUpdate

public long getLastUpdate()
Returns the time in milliseconds when this db entry was created from the origin instance.

Specified by:
getLastUpdate in class AbstractDatabaseEntry
Returns:
the time in milliseconds when this db entry was created from the origin instance

getId

public java.lang.String getId()
Returns a unique ID for a database entry.

Specified by:
getId in class AbstractDatabaseEntry
Returns:
The ID of this database entry.

getEMail

public java.lang.String getEMail()
Return the EMail address of the operator.

Returns:
The EMail address of the operator.

getEMailSpamSafe

public java.lang.String getEMailSpamSafe()

getOrganization

public java.lang.String getOrganization()
Returns the name of the operator or organization.

Returns:
The name of the operator or organization.

getCommonName

public java.lang.String getCommonName()

getOrganizationUnit

public java.lang.String getOrganizationUnit()

getCertPath

public MultiCertPath getCertPath()

getCertificate

public JAPCertificate getCertificate()
Returns the operator certificate. TODO return the first certificate that is found; instead, only the cert path should be used to get the operator data, as this may also return an unverified certificate...

Returns:
The operator certificate.

getUrl

public java.lang.String getUrl()
Returns the URL of the operators home page.

Returns:
The URL of the operators home page.

getCountryCode

public java.lang.String getCountryCode()

toXMLElement

public org.w3c.dom.Element toXMLElement(org.w3c.dom.Document ownerDocument)

hasTermsAndConditions

public boolean hasTermsAndConditions()

toXMLElement

public org.w3c.dom.Element toXMLElement(org.w3c.dom.Document ownerDocument,
                                        boolean spamSafe)

toXMLElement

public org.w3c.dom.Element toXMLElement(org.w3c.dom.Document ownerDocument,
                                        OperatorAddress address,
                                        boolean spamSafe)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object a_obj)
Overrides:
equals in class java.lang.Object