org.italiangrid.voms.ac.impl
Class VOMSAttributesImpl

java.lang.Object
  extended by org.italiangrid.voms.ac.impl.VOMSAttributesImpl
All Implemented Interfaces:
VOMSAttribute

public class VOMSAttributesImpl
extends Object
implements VOMSAttribute

The default implementation for voms attributes

Author:
andreaceccanti

Field Summary
static int DEFAULT_CLOCK_SKEW_IN_MINUTES
           
 
Constructor Summary
VOMSAttributesImpl()
           
 
Method Summary
 X509Certificate[] getAACertificates()
           
 List<String> getFQANs()
           
 List<VOMSGenericAttribute> getGenericAttributes()
           
 X500Principal getHolder()
           
 BigInteger getHolderSerialNumber()
           
 String getHost()
           
 X500Principal getIssuer()
           
 Date getNotAfter()
           
 Date getNotBefore()
           
 int getPort()
           
 String getPrimaryFQAN()
           
 byte[] getSignature()
           
 List<String> getTargets()
           
 String getVO()
           
 org.bouncycastle.cert.X509AttributeCertificateHolder getVOMSAC()
           
 boolean isValid()
          This method checks whether the attributes are valid in the current instant of time.
 void setAACertificates(X509Certificate[] aaCerts)
           
 void setFQANs(List<String> fQANs)
           
 void setGenericAttributes(List<VOMSGenericAttribute> genericAttributes)
           
 void setHolder(X500Principal holder)
           
 void setHolderSerialNumber(BigInteger holderSerialNumber)
           
 void setHost(String host)
           
 void setIssuer(X500Principal issuer)
           
 void setNotAfter(Date notAfter)
           
 void setNotBefore(Date notBefore)
           
 void setPort(int port)
           
 void setSignature(byte[] signature)
           
 void setTargets(List<String> targets)
           
 void setVO(String vO)
           
 void setVOMSAC(org.bouncycastle.cert.X509AttributeCertificateHolder ac)
           
 String toString()
           
 boolean validAt(Date date)
          This method checks whether the attributes are valid in a given time passed as argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_CLOCK_SKEW_IN_MINUTES

public static final int DEFAULT_CLOCK_SKEW_IN_MINUTES
See Also:
Constant Field Values
Constructor Detail

VOMSAttributesImpl

public VOMSAttributesImpl()
Method Detail

getIssuer

public X500Principal getIssuer()
Specified by:
getIssuer in interface VOMSAttribute
Returns:
The subject of the VOMS AA that signed these attributes

getPrimaryFQAN

public String getPrimaryFQAN()
Specified by:
getPrimaryFQAN in interface VOMSAttribute
Returns:
The primary VOMS fully qualified attribute name

getVO

public String getVO()
Specified by:
getVO in interface VOMSAttribute
Returns:
The name of the VO this VOMS attributes are about

setIssuer

public void setIssuer(X500Principal issuer)

setVO

public void setVO(String vO)

getFQANs

public List<String> getFQANs()
Specified by:
getFQANs in interface VOMSAttribute
Returns:
The List of VOMS fully qualified attribute names

setFQANs

public void setFQANs(List<String> fQANs)

getHost

public String getHost()
Specified by:
getHost in interface VOMSAttribute
Returns:
The name of the host where the VOMS AA that signed these attributes lives

getPort

public int getPort()
Specified by:
getPort in interface VOMSAttribute
Returns:
The port on which the VOMS AA that signed these attributes listens for requests

getHolder

public X500Principal getHolder()
Specified by:
getHolder in interface VOMSAttribute
Returns:
The subject of the holder of these VOMS attributes

getNotBefore

public Date getNotBefore()
Specified by:
getNotBefore in interface VOMSAttribute
Returns:
The attributes' validity start time

getNotAfter

public Date getNotAfter()
Specified by:
getNotAfter in interface VOMSAttribute
Returns:
The attributes' validity end time

getSignature

public byte[] getSignature()
Specified by:
getSignature in interface VOMSAttribute
Returns:
The signature of this VOMS attributes

setHost

public void setHost(String host)

setPort

public void setPort(int port)

setHolder

public void setHolder(X500Principal holder)

setNotAfter

public void setNotAfter(Date notAfter)

setNotBefore

public void setNotBefore(Date notBefore)

setSignature

public void setSignature(byte[] signature)

toString

public String toString()
Overrides:
toString in class Object

getGenericAttributes

public List<VOMSGenericAttribute> getGenericAttributes()
Specified by:
getGenericAttributes in interface VOMSAttribute
Returns:
The VOMS generic attributes

setGenericAttributes

public void setGenericAttributes(List<VOMSGenericAttribute> genericAttributes)

getTargets

public List<String> getTargets()
Specified by:
getTargets in interface VOMSAttribute
Returns:
The targets for this VOMS attributes

setTargets

public void setTargets(List<String> targets)

getAACertificates

public X509Certificate[] getAACertificates()
Specified by:
getAACertificates in interface VOMSAttribute
Returns:
The VOMS AA certificate chain

setAACertificates

public void setAACertificates(X509Certificate[] aaCerts)

isValid

public boolean isValid()
Description copied from interface: VOMSAttribute
This method checks whether the attributes are valid in the current instant of time. No validation is performed on the attributes.

Specified by:
isValid in interface VOMSAttribute
Returns:
true if valid, false otherwise

validAt

public boolean validAt(Date date)
Description copied from interface: VOMSAttribute
This method checks whether the attributes are valid in a given time passed as argument. No validation is performed on the attributes.

Specified by:
validAt in interface VOMSAttribute
Returns:
true if valid, false otherwise

getVOMSAC

public org.bouncycastle.cert.X509AttributeCertificateHolder getVOMSAC()
Specified by:
getVOMSAC in interface VOMSAttribute
Returns:
the underlying bouncycastle object for the VOMS attribute certificate.

setVOMSAC

public void setVOMSAC(org.bouncycastle.cert.X509AttributeCertificateHolder ac)

getHolderSerialNumber

public BigInteger getHolderSerialNumber()
Specified by:
getHolderSerialNumber in interface VOMSAttribute
Returns:
The serial number of the holder certificate

setHolderSerialNumber

public void setHolderSerialNumber(BigInteger holderSerialNumber)


Copyright © 2013. All Rights Reserved.