com.dtolabs.rundeck.core.authorization.providers
Class PoliciesDocument

java.lang.Object
  extended by com.dtolabs.rundeck.core.authorization.providers.PoliciesDocument
All Implemented Interfaces:
PolicyCollection

public class PoliciesDocument
extends java.lang.Object
implements PolicyCollection

PoliciesDocument implements a policy collection defined by a XML Document.


Nested Class Summary
static class PoliciesDocument.Context
           
 
Field Summary
static javax.xml.xpath.XPathExpression allGroups
           
static javax.xml.xpath.XPathExpression allPolicies
           
static javax.xml.xpath.XPathExpression countXpath
           
static javax.xml.xpath.XPathExpression policyByGroup
           
static javax.xml.xpath.XPathExpression policyByUserName
           
 
Constructor Summary
PoliciesDocument(org.w3c.dom.Document document, java.io.File file)
           
 
Method Summary
 long countPolicies()
           
 java.util.Collection<java.lang.String> groupNames()
          For a given policy collection, return all the group names associated with it.
 java.util.Collection<AclContext> matchedContexts(javax.security.auth.Subject subject, java.util.Set<Attribute> environment)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

countXpath

public static final javax.xml.xpath.XPathExpression countXpath

allPolicies

public static final javax.xml.xpath.XPathExpression allPolicies

policyByUserName

public static final javax.xml.xpath.XPathExpression policyByUserName

policyByGroup

public static final javax.xml.xpath.XPathExpression policyByGroup

allGroups

public static final javax.xml.xpath.XPathExpression allGroups
Constructor Detail

PoliciesDocument

public PoliciesDocument(org.w3c.dom.Document document,
                        java.io.File file)
Method Detail

groupNames

public java.util.Collection<java.lang.String> groupNames()
                                                  throws InvalidCollection
Description copied from interface: PolicyCollection
For a given policy collection, return all the group names associated with it.

Specified by:
groupNames in interface PolicyCollection
Returns:
collection of group names.
Throws:
InvalidCollection
See Also:
PolicyCollection.groupNames()

countPolicies

public long countPolicies()
                   throws InvalidCollection
Specified by:
countPolicies in interface PolicyCollection
Throws:
InvalidCollection
See Also:
PolicyCollection.countPolicies()

matchedContexts

public java.util.Collection<AclContext> matchedContexts(javax.security.auth.Subject subject,
                                                        java.util.Set<Attribute> environment)
                                                 throws InvalidCollection
Specified by:
matchedContexts in interface PolicyCollection
Throws:
InvalidCollection
See Also:
PolicyCollection.matchedContexts(javax.security.auth.Subject, java.util.Set)

toString

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