gov.bnl.gums
Class GridUser

java.lang.Object
  extended by gov.bnl.gums.GridUser

public class GridUser
extends Object

Represent a GRID Identity in GUMS, which is a certificate with its DN and FQAN.

Author:
Gabriele Carcassi, Jay Packard

Constructor Summary
GridUser()
          Creates a GRID credentail with no DN and FQAN.
GridUser(String userDN)
          Creates a GRID credential with DN.
GridUser(String userDN, String fqan)
          Creates a GRID credential with DN and FQAN.
GridUser(String userDN, String fqan, boolean enforceFqanWellFormedness)
          Creates a GRID credential with DN and FQAN.
GridUser(String userDN, String fqan, String email)
          Creates a new object representing a Grid credential.
GridUser(String userDN, String fqan, String email, boolean enforceFqanWellFormedness)
          Creates a new object representing a Grid credential.
 
Method Summary
 int compareDn(GridUser user)
           
 int compareDn(String userDn)
           
 boolean equals(Object obj)
          A GridUser will be equal only to another GridUser with the same DN and FQAN.
 String getCertificateDN()
          Retrieve the certificate DN of the user.
 String getEmail()
          Retrieve the email of the user.
 FQAN getVoFQAN()
          Retrieve the VOMS Fully Qualified Attribute name.
 int hashCode()
          Changed to reflect the change in equals, as in Object contract.
 void setCertificateDN(String certificateDN)
          Changes the certificate DN for the Grid credential.
 void setEmail(String email)
          Changes the email.
 void setVoFQAN(FQAN voFQAN)
          Sets the VOMS Fully Qualified Attribute name for the credential.
 String toString()
          Returns a legible String representation for the credentail.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridUser

public GridUser()
Creates a GRID credentail with no DN and FQAN.


GridUser

public GridUser(String userDN)
Creates a GRID credential with DN.


GridUser

public GridUser(String userDN,
                String fqan)
Creates a GRID credential with DN and FQAN.


GridUser

public GridUser(String userDN,
                String fqan,
                boolean enforceFqanWellFormedness)
Creates a GRID credential with DN and FQAN.


GridUser

public GridUser(String userDN,
                String fqan,
                String email)
Creates a new object representing a Grid credential.

Parameters:
userDN - the DN of the user certificate (i.e. "/DC=org/DC=doegrids/OU=People/CN=John Smith")
fqan - The Fully Qualified Attribute name (i.e. "/atlas/production/Role=Leader")
email -

GridUser

public GridUser(String userDN,
                String fqan,
                String email,
                boolean enforceFqanWellFormedness)
Creates a new object representing a Grid credential.

Parameters:
userDN - the DN of the user certificate (i.e. "/DC=org/DC=doegrids/OU=People/CN=John Smith")
fqan - The Fully Qualified Attribute name (i.e. "/atlas/production/Role=Leader")
email -
Method Detail

compareDn

public int compareDn(GridUser user)
Parameters:
user -
Returns:
true if user DN element matches

compareDn

public int compareDn(String userDn)
Parameters:
userDn -
Returns:
true if user DN element matches

equals

public boolean equals(Object obj)
A GridUser will be equal only to another GridUser with the same DN and FQAN.

Overrides:
equals in class Object
Parameters:
obj - another object
Returns:
true if the object was a GridUser with equivalent credentials

getCertificateDN

public String getCertificateDN()
Retrieve the certificate DN of the user.

Returns:
The certificate DN (i.e. "/DC=org/DC=doegrids/OU=People/CN=John Smith")

getEmail

public String getEmail()
Retrieve the email of the user.

Returns:
The email

getVoFQAN

public FQAN getVoFQAN()
Retrieve the VOMS Fully Qualified Attribute name.

Returns:
The VOMS FQAN selected with voms-proxy-init (i.e. "/atlas/production/Role=Leader")

hashCode

public int hashCode()
Changed to reflect the change in equals, as in Object contract.

Overrides:
hashCode in class Object
Returns:
A hash created from the DN and FQAN.

setCertificateDN

public void setCertificateDN(String certificateDN)
Changes the certificate DN for the Grid credential.

Parameters:
certificateDN - A GRID certificate DN (i.e. "/DC=org/DC=doegrids/OU=People/CN=Gabriele Carcassi")

setEmail

public void setEmail(String email)
Changes the email.

Parameters:
email -

setVoFQAN

public void setVoFQAN(FQAN voFQAN)
Sets the VOMS Fully Qualified Attribute name for the credential.

Parameters:
voFQAN - The VOMS FQAN selected with voms-proxy-init (i.e. "/atlas/production/Role=Leader")

toString

public String toString()
Returns a legible String representation for the credentail.

Overrides:
toString in class Object
Returns:
String reprentation of the credential (i.e. "GridID[/DC=org/DC=doegrids/OU=People/CN=Gabriele Carcassi]")


Copyright © 2004-2009. All Rights Reserved.