org.glite.security.util
Interface DN

All Known Implementing Classes:
DNImpl, DNImplRFC2253

public interface DN

An interface representing a DN, used in conjunction with DNHandler to manage the DNs in an uniform way.

Author:
Joni Hahkala Created on September 8, 2003, 2:09 PM

Method Summary
 java.lang.String getCanon()
          Used to get the DN in canonical (small case) format.
 java.lang.String getLastCNValue()
          Returns the value of the last CN value in the DN.
 java.lang.String getRFC2253()
          Deprecated. use the getRFCDN() instead, it produces proper reversed RFC2253 DN, e.g "CN=Nerd Nerdsten,O=Nerd Heaven,C=US".
 java.lang.String getRFC2253v2()
          Deprecated. use the getRFCDNv2() instead, it produces proper reversed RFC2253 DN, e.g "CN=Nerd Nerdsten,O=Nerd Heaven,C=US".
 java.lang.String getRFCDN()
          Used to get the DN in RFC2253 format.
 java.lang.String getRFCDNv2()
          Used to get the DN in RFC2253 format.
 java.lang.String getX500()
          Used to get the DN in X500 format.
 boolean isEmpty()
          Method to check if the DN is empty.
 DN withoutLastCN(boolean checkProxy)
          Used to get a DN instance of the DN without the last CN.
 

Method Detail

getX500

java.lang.String getX500()
Used to get the DN in X500 format. E.g. /C=US/O=Nerd Heaven/CN=Nerd Nerdsten

Returns:
String The DN in X500 format

getRFC2253

java.lang.String getRFC2253()
Deprecated. use the getRFCDN() instead, it produces proper reversed RFC2253 DN, e.g "CN=Nerd Nerdsten,O=Nerd Heaven,C=US".

Used to get the DN in RFC2253 format. E.g. "C=US,O=Nerd Heaven,CN=Nerd Nerdsten", emailaddress is showed as "Email"

Returns:
String the DN in RFC2253 format

getRFC2253v2

java.lang.String getRFC2253v2()
Deprecated. use the getRFCDNv2() instead, it produces proper reversed RFC2253 DN, e.g "CN=Nerd Nerdsten,O=Nerd Heaven,C=US".

Used to get the DN in RFC2253 format. E.g. "CN=Nerd Nerdsten,O=Nerd Heaven,C=US" (reverse=true) or "C=US,O=Nerd Heaven,CN=Nerd Nerdsten" (reverse=false), emailaddress is showed as "Email"

Returns:
String the DN in RFC2253 format

getRFCDN

java.lang.String getRFCDN()
Used to get the DN in RFC2253 format. E.g. "CN=Nerd Nerdsten,O=Nerd Heaven,C=US", emailaddress is showed as "Email". Also serialnumber supported.

Returns:
String the DN in RFC2253 format

getRFCDNv2

java.lang.String getRFCDNv2()
Used to get the DN in RFC2253 format. E.g. "CN=Nerd Nerdsten,O=Nerd Heaven,C=US", emailaddress is showed as "emailAddress" and non supported RDN identifiers like serialnumber as an OID.

Returns:
String the DN in RFC2253 format

getCanon

java.lang.String getCanon()
Used to get the DN in canonical (small case) format. E.g. cn=nerd nerdsten,o=nerd heaven,c=us

Returns:
String the DN in canonical format

withoutLastCN

DN withoutLastCN(boolean checkProxy)
Used to get a DN instance of the DN without the last CN. E.g. from CN=proxy,CN=Nerd Nerdsten,O=Nerd Heaven,C=US to CN=Nerd Nerdsten,O=Nerd Heaven,C=US Useful for Grid applications to get the DN that is supposed to be in the previous certificate in the chain

Parameters:
checkProxy - a switch to define whether to check that the removed part is proxy identifier
Returns:
DN the DN without the last proxy

getLastCNValue

java.lang.String getLastCNValue()
Returns the value of the last CN value in the DN. For example for the DN "C=CH, O=CERN, OU=Organic units, CN=John Doe, SN=1234" method would return "John Doe".

Returns:
The value of the last CN.

isEmpty

boolean isEmpty()
Method to check if the DN is empty.

Returns:
returns true if the DN fields are empty.