org.glite.voms

Class SigningPolicy


public class SigningPolicy
extends java.lang.Object

The purpose of this class is to represent a *.signing_policy file.

Constructor Summary

SigningPolicy(File f)
Loads a *.signing_policy file.

Method Summary

int
findIssuer(String issuer)
Finds the record in the signing policy which deals with the specified issuer.
int
findIssuer(String issuer, int previous)
Finds the record in the signing policy which deals with the specified issuer, starting from a specified record.
String
getAccessIDCA()
Gets the AccessIDCA from the current record.
Vector
getCondSubjects()
Gets the CondSubjects from the current record.
String
getName()
Gets the basename of the file from which this was loaded.
String
getPosRights()
Gets the PosRights from the current record.
void
setCurrent(int index)
Sets the indicate record as the current record.

Constructor Details

SigningPolicy

public SigningPolicy(File f)
            throws IOException
Loads a *.signing_policy file.
Parameters:
f - the File from which to load the Signing Policy.

Method Details

findIssuer

public int findIssuer(String issuer)
Finds the record in the signing policy which deals with the specified issuer.
Parameters:
issuer - an OpenSSL-style representation of the issuer.
Returns:
the record number, or -1 if none is found.

findIssuer

public int findIssuer(String issuer,
                      int previous)
Finds the record in the signing policy which deals with the specified issuer, starting from a specified record.
Parameters:
issuer - an OpenSSL-style representation of the issuer.
previous - the previous match, or -1 if ther was no previous match.
Returns:
the record number, or -1 if none is found.

getAccessIDCA

public String getAccessIDCA()
Gets the AccessIDCA from the current record.
Returns:
the AccessIDCA.

getCondSubjects

public Vector getCondSubjects()
Gets the CondSubjects from the current record.
Returns:
a Vector of CondSubjects. Each element is a String.

getName

public String getName()
Gets the basename of the file from which this was loaded.
Returns:
the basename or null if nothign was loaded.

getPosRights

public String getPosRights()
Gets the PosRights from the current record.
Returns:
the PosRight

setCurrent

public void setCurrent(int index)
Sets the indicate record as the current record.
Parameters:
index - the record number