org.glite.security.util.namespace
Class NamespaceFormat

java.lang.Object
  extended by org.glite.security.util.namespace.NamespaceFormat
Direct Known Subclasses:
EUGridNamespaceFormat, LegacyNamespaceFormat

public abstract class NamespaceFormat
extends java.lang.Object

Represents a namespaces file format. Ex: TO Issuer"/CN=SWITCH CA/emailAddress=switch.ca@switch.ch/O=Switch - Teleinformatikdienste fuer Lehre und Forschung/C=CH" PERMIT Subject "/C=CH/O=.*"

Author:
alyu

Constructor Summary
NamespaceFormat()
          A constructor to create an empty policy.
 
Method Summary
 java.util.List<NamespacePolicy> getPolices()
          Returns a list of issuer, access and subject pairs.
 java.lang.String getVersion()
          Returns the namespaces version format.
abstract  void parse(java.lang.String fileName)
          Parses a namespaces file.
 void setVersion(java.lang.String version)
          Sets the namespaces format version.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceFormat

public NamespaceFormat()
A constructor to create an empty policy.

Method Detail

parse

public abstract void parse(java.lang.String fileName)
                    throws java.io.IOException,
                           java.text.ParseException
Parses a namespaces file.

Parameters:
fileName - fileName of the namespaces file
Throws:
java.io.IOException - if unsuccessful
java.text.ParseException - if the namespaces file format is incorrect

getPolices

public java.util.List<NamespacePolicy> getPolices()
Returns a list of issuer, access and subject pairs.

Returns:
a list of policies

getVersion

public java.lang.String getVersion()
Returns the namespaces version format.

Returns:
namespaces version format.

setVersion

public void setVersion(java.lang.String version)
Sets the namespaces format version.

Parameters:
version - the format version.