|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lenya.ac.impl.PolicyBuilder
public class PolicyBuilder
Builds policies from input streams.
Field Summary | |
---|---|
protected static java.lang.String |
GROUP_ELEMENT
|
protected static java.lang.String |
ID_ATTRIBUTE
|
protected static java.lang.String |
IP_RANGE_ELEMENT
|
protected static java.lang.String |
POLICY_ELEMENT
|
protected static java.lang.String |
ROLE_ELEMENT
|
protected static java.lang.String |
SSL_ATTRIBUTE
|
protected static java.lang.String |
USER_ELEMENT
|
protected static java.lang.String |
WORLD_ELEMENT
|
Constructor Summary | |
---|---|
PolicyBuilder(AccreditableManager accreditableManager)
Ctor. |
Method Summary | |
---|---|
java.lang.Object |
build(java.io.InputStream stream)
Builds an object from an input stream. |
DefaultPolicy |
buildPolicy(org.w3c.dom.Document document)
Builds a policy from an XML document. |
DefaultPolicy |
buildPolicy(java.io.InputStream stream)
Builds a policy from an input stream. |
protected Accreditable |
getAccreditable(java.lang.String elementName,
java.lang.String id)
Creates an accredtiable for an element. |
AccreditableManager |
getAccreditableManager()
Returns the accreditable manager. |
protected static org.w3c.dom.Element |
save(Accreditable accreditable,
NamespaceHelper helper)
Saves an accreditable to an XML element. |
static org.w3c.dom.Document |
savePolicy(DefaultPolicy policy)
Saves a policy to an XML document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String POLICY_ELEMENT
protected static final java.lang.String GROUP_ELEMENT
protected static final java.lang.String USER_ELEMENT
protected static final java.lang.String ROLE_ELEMENT
protected static final java.lang.String WORLD_ELEMENT
protected static final java.lang.String IP_RANGE_ELEMENT
protected static final java.lang.String ID_ATTRIBUTE
protected static final java.lang.String SSL_ATTRIBUTE
Constructor Detail |
---|
public PolicyBuilder(AccreditableManager accreditableManager)
accreditableManager
- An accreditable manager.Method Detail |
---|
public AccreditableManager getAccreditableManager()
public DefaultPolicy buildPolicy(java.io.InputStream stream) throws AccessControlException
stream
- The input stream to read the policy from.
AccessControlException
- when something went wrong.public DefaultPolicy buildPolicy(org.w3c.dom.Document document) throws AccessControlException
document
- The XML document.
AccessControlException
- when something went wrong.protected Accreditable getAccreditable(java.lang.String elementName, java.lang.String id) throws AccessControlException
elementName
- The elment name.id
- The ID of the accreditable.
AccessControlException
- when something went wrong.public static org.w3c.dom.Document savePolicy(DefaultPolicy policy) throws AccessControlException
policy
- The policy to save.
AccessControlException
- when something went wrong.protected static org.w3c.dom.Element save(Accreditable accreditable, NamespaceHelper helper) throws AccessControlException
accreditable
- The accreditable.helper
- The namespace helper to be used.
AccessControlException
- when something went wrong.public java.lang.Object build(java.io.InputStream stream) throws BuildException
InputStreamBuilder
build
in interface InputStreamBuilder
stream
- An input stream.
BuildException
- when building the object failed.InputStreamBuilder.build(java.io.InputStream)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |