org.glite.security.util.namespace
Class NamespacePolicy

java.lang.Object
  extended by org.glite.security.util.namespace.NamespacePolicy

public class NamespacePolicy
extends java.lang.Object

Encapsulates the policy statement; issuer DN, access rights and subject DN.


Constructor Summary
NamespacePolicy()
          Creates an empty policy object.
NamespacePolicy(DN issuerDN, java.lang.String subjectDN)
          Creates a new policy with the specified issuer and subject DN.
NamespacePolicy(DN issuerDN, java.lang.String accessRights, java.lang.String subjectDN)
          Creates a new policy with the specified issuer, access rights and subject DN.
NamespacePolicy(DN issuerDN, java.lang.String accessRights, java.lang.String subjectDN, java.lang.String policyStatement, int lineNumber, java.lang.String filename)
          Creates a new policy with the specified issuer, access rights, subject DN, the actual policy statement, line number of the policy and file name.
 
Method Summary
 java.lang.String getAccessRights()
          Returns the access right for the DN.
 java.lang.String getFilename()
          Returns the policy filename.
 DN getIssuerDN()
          Returns the issuer DN.
 int getLineNumber()
          Returns the line number of this policy line.
 java.lang.String getPolicyStatement()
          Returns the actual policy statement.
 java.lang.String getSubjectDN()
          Returns the subject DN.
 boolean isSubjectDNPermitted()
          Returns true if the subject DN is permitted
 void setAccessRights(java.lang.String accessRights)
          The access rights for the DN.
 void setFilename(java.lang.String filename)
          Sets the policy filename.
 void setIssuerDN(DN issuerDN)
          Sets the issuer DN.
 void setLineNumber(int lineNumber)
          Sets the line number of this policy line.
 void setPolicyStatement(java.lang.String policyStatement)
          Sets the policy statement.
 void setSubjectDN(java.lang.String subjectDN)
          Sets the subject DN.
 void subjectDNPermitted(boolean isPermitted)
          Set to true if subject DN is permitted.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamespacePolicy

public NamespacePolicy()
Creates an empty policy object.


NamespacePolicy

public NamespacePolicy(DN issuerDN,
                       java.lang.String subjectDN)
Creates a new policy with the specified issuer and subject DN.

Parameters:
issuerDN - the issuer DN
subjectDN - the subject DN

NamespacePolicy

public NamespacePolicy(DN issuerDN,
                       java.lang.String accessRights,
                       java.lang.String subjectDN)
Creates a new policy with the specified issuer, access rights and subject DN.

Parameters:
issuerDN - the issuer DN
accessRights - the access rights for the subject DN
subjectDN - the subject DN

NamespacePolicy

public NamespacePolicy(DN issuerDN,
                       java.lang.String accessRights,
                       java.lang.String subjectDN,
                       java.lang.String policyStatement,
                       int lineNumber,
                       java.lang.String filename)
Creates a new policy with the specified issuer, access rights, subject DN, the actual policy statement, line number of the policy and file name.

Parameters:
issuerDN - the issuer DN
accessRights - the access rights for the subject DN
subjectDN - the subject DN
policyStatement - the actual policy statement
lineNumber - the policy line number
filename - the policy filename
Method Detail

getIssuerDN

public DN getIssuerDN()
Returns the issuer DN.

Returns:
the issuer DN

setIssuerDN

public void setIssuerDN(DN issuerDN)
Sets the issuer DN.

Parameters:
issuerDN - the issuer DN to set

getSubjectDN

public java.lang.String getSubjectDN()
Returns the subject DN.

Returns:
the subject DN

setSubjectDN

public void setSubjectDN(java.lang.String subjectDN)
Sets the subject DN.

Parameters:
subjectDN - the subject DN to set

getAccessRights

public java.lang.String getAccessRights()
Returns the access right for the DN.

Returns:
the access right

setAccessRights

public void setAccessRights(java.lang.String accessRights)
The access rights for the DN.

Parameters:
accessRights - the access rights to set

isSubjectDNPermitted

public boolean isSubjectDNPermitted()
Returns true if the subject DN is permitted

Returns:
true if subject DN is permitted

subjectDNPermitted

public void subjectDNPermitted(boolean isPermitted)
Set to true if subject DN is permitted.

Parameters:
isPermitted - true if permitted

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPolicyStatement

public java.lang.String getPolicyStatement()
Returns the actual policy statement.

Returns:
the policy statement

setPolicyStatement

public void setPolicyStatement(java.lang.String policyStatement)
Sets the policy statement.

Parameters:
policyStatement - the policy statement

getLineNumber

public int getLineNumber()
Returns the line number of this policy line.

Returns:
the line number

setLineNumber

public void setLineNumber(int lineNumber)
Sets the line number of this policy line.

Parameters:
lineNumber - the line number

getFilename

public java.lang.String getFilename()
Returns the policy filename.

Returns:
the policy filename

setFilename

public void setFilename(java.lang.String filename)
Sets the policy filename.

Parameters:
filename - the policy filename