org.glite.security.authz
Class PIPAttribute

java.lang.Object
  extended byorg.glite.security.authz.PIPAttribute
Direct Known Subclasses:
LocalUserPIPAttribute

public class PIPAttribute
extends java.lang.Object

This class represents an attribute that is collected by a ServicePIP implementation, and put into the javax.security.auth.Subject public or private credentials, in order to later be read by ServicePDP implementations It is recommended to subclass this class for faster lookups of attributes of a specific type. The name of the PIPAttribute object should be unique within a javax.security.auth.Subject instance to distinguish between different attribute values.

See Also:
ServicePDP, ServicePIP

Constructor Summary
PIPAttribute(java.lang.String attributeName, java.lang.Object attributeValue)
          Constructor.
 
Method Summary
 void addPrivate(javax.security.auth.Subject subject)
          adds this attribute to the private credentials of specified subject.
 void addPublic(javax.security.auth.Subject subject)
          adds this attribute to the public credentials of specified subject.
 java.lang.String getName()
          gets the name of the attribute.
 java.lang.Object getValue()
          gets the value of the attribute.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PIPAttribute

public PIPAttribute(java.lang.String attributeName,
                    java.lang.Object attributeValue)
Constructor.

Parameters:
attributeName - name of attribute
attributeValue - value of attribute
Method Detail

getValue

public java.lang.Object getValue()
gets the value of the attribute.

Returns:
atrtibute value

getName

public java.lang.String getName()
gets the name of the attribute.

Returns:
atrtibute name

addPublic

public void addPublic(javax.security.auth.Subject subject)
adds this attribute to the public credentials of specified subject.

Parameters:
subject - subject to add attribute to

addPrivate

public void addPrivate(javax.security.auth.Subject subject)
adds this attribute to the private credentials of specified subject.

Parameters:
subject - subject to add attribute to