gov.bnl.gums
Class GridUser

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

public class GridUser
extends java.lang.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(java.lang.String userDN, java.lang.String fqan)
          Creates a new object representing a Grid credential.
 
Method Summary
 int compareDn(GridUser user)
           
 int compareDn(java.lang.String userDn)
           
 boolean equals(java.lang.Object obj)
          A GridUser will be equal only to another GridUser with the same DN and FQAN.
 java.lang.String getCertificateDN()
          Retrieve the certificate DN 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(java.lang.String certificateDN)
          Changes the certificate DN for the Grid credential.
 void setVoFQAN(FQAN voFQAN)
          Sets the VOMS Fully Qualified Attribute name for the credential.
 java.lang.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(java.lang.String userDN,
                java.lang.String fqan)
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 String representation (i.e. "/atlas/production/Role=Leader")
Method Detail

compareDn

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

compareDn

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

equals

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

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

getCertificateDN

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

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

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 java.lang.Object
Returns:
A hash created from the DN and FQAN.

setCertificateDN

public void setCertificateDN(java.lang.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")

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 java.lang.String toString()
Returns a legible String representation for the credentail.

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


Copyright © 2004-2008. All Rights Reserved.