|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.policy.io.xml.PermisXmlWriter
public final class PermisXmlWriter
Policy writer implementation for Permis XML policies.
Field Summary | |
---|---|
private static String |
DEFAULT_ENCODING
The default output encoding written to the XML file. |
private String |
encoding
The output encoding to write. |
private int |
id
The id counter. |
private static String |
PERMIS_DOCTYPE
The DOCTYPE of Permis XML files. |
private Writer |
writer
The underlying writer used by this policy writer. |
Constructor Summary | |
---|---|
PermisXmlWriter(Writer writer)
Creates a new policy writer that uses the specified writer. |
|
PermisXmlWriter(Writer writer,
String encoding)
Creates a new policy writer that uses the specified writer and output encoding. |
Method Summary | |
---|---|
protected Map<ActionBean,String> |
buildActionIdMap(TargetAccessRuleBeanCollection targetAccessRules)
|
protected Map<String,String> |
buildDomainIdMap(TargetAccessRuleBeanCollection targetAccessRules)
|
protected Map<RoleHierarchyBean,String> |
buildHierachyIdMap(RoleHierarchyBeanCollection roleHierarchies)
|
protected Map<Obligation,String> |
buildObligationIdMap(TargetAccessRuleBeanCollection targetAccessRules)
|
protected Map<String,String> |
buildSoaIdMap(RoleAssignmentRuleBeanCollection roleAssignmentRules)
|
protected Map<String,String> |
buildSubjectDomainIdMap(RoleAssignmentRuleBeanCollection roleAssignmentRules)
|
protected Map<TargetBean,String> |
buildTargetIdMap(TargetAccessRuleBeanCollection targetAccessRules)
|
protected void |
writeActionPolicy(Map<ActionBean,String> actionIdMap,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
void |
writeCondition(Predicate condition,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
protected void |
writeDomainPolicy(Map<String,String> targetDomainIDMap,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
protected void |
writeObligationPolicy(Map<Obligation,String> obligationIdMap,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
void |
writePolicy(PolicyBean policy)
Writes the specified policy. |
protected void |
writeRoleAssignmentPolicy(RoleAssignmentRuleBeanCollection roleAssignmentRules,
Map<String,String> subjectDomainIdsMap,
Map<String,String> soaIdMap,
Map<RoleHierarchyBean,String> hierarchyIdMap,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
protected void |
writeRoleHierarchyPolicy(Map<RoleHierarchyBean,String> hierarchyIdMap,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
protected void |
writeSoaPolicy(RoleAssignmentRuleBeanCollection roleAssignmentRules,
Map<String,String> soaIdMap,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
protected void |
writeSubjectPolicy(RoleAssignmentRuleBeanCollection roleAssignmentRules,
Map<String,String> subjectDomainIdMap,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
protected void |
writeTargetAccessPolicy(TargetAccessRuleBeanCollection targetAccessRules,
Map<String,String> targetDomainIDMap,
Map<ActionBean,String> actionIdMap,
Map<TargetBean,String> targetIdMap,
Map<RoleHierarchyBean,String> hierarchyIdMap,
Map<Obligation,String> obligationIdMap,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
protected void |
writeTargetPolicy(Map<String,String> domainIdMap,
Map<ActionBean,String> actionIdMap,
Map<TargetBean,String> targetIdMap,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
protected void |
writeValidity(TimePeriodConstraint validity,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
private void |
writeValues(List<Value<?>> values,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
private void |
writeValueSets(List<ValueSet> valuesets,
com.generationjava.io.xml.XmlWriter xmlWriter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String DEFAULT_ENCODING
"UTF-8"
private static final String PERMIS_DOCTYPE
"\n"
private final Writer writer
private final String encoding
private int id
Constructor Detail |
---|
public PermisXmlWriter(Writer writer)
UTF-8
.writer
- the writer to write the policy to.public PermisXmlWriter(Writer writer, String encoding)
writer
- the writer to write the policy to.encoding
- the encoding to write to the generated XML output.Method Detail |
---|
protected Map<String,String> buildSubjectDomainIdMap(RoleAssignmentRuleBeanCollection roleAssignmentRules)
protected Map<String,String> buildSoaIdMap(RoleAssignmentRuleBeanCollection roleAssignmentRules)
protected Map<String,String> buildDomainIdMap(TargetAccessRuleBeanCollection targetAccessRules)
protected Map<Obligation,String> buildObligationIdMap(TargetAccessRuleBeanCollection targetAccessRules)
protected Map<ActionBean,String> buildActionIdMap(TargetAccessRuleBeanCollection targetAccessRules)
protected Map<TargetBean,String> buildTargetIdMap(TargetAccessRuleBeanCollection targetAccessRules)
protected Map<RoleHierarchyBean,String> buildHierachyIdMap(RoleHierarchyBeanCollection roleHierarchies)
protected void writeSubjectPolicy(RoleAssignmentRuleBeanCollection roleAssignmentRules, Map<String,String> subjectDomainIdMap, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
protected void writeRoleHierarchyPolicy(Map<RoleHierarchyBean,String> hierarchyIdMap, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
protected void writeSoaPolicy(RoleAssignmentRuleBeanCollection roleAssignmentRules, Map<String,String> soaIdMap, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
protected void writeRoleAssignmentPolicy(RoleAssignmentRuleBeanCollection roleAssignmentRules, Map<String,String> subjectDomainIdsMap, Map<String,String> soaIdMap, Map<RoleHierarchyBean,String> hierarchyIdMap, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
protected void writeDomainPolicy(Map<String,String> targetDomainIDMap, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
protected void writeActionPolicy(Map<ActionBean,String> actionIdMap, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
protected void writeObligationPolicy(Map<Obligation,String> obligationIdMap, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
protected void writeTargetPolicy(Map<String,String> domainIdMap, Map<ActionBean,String> actionIdMap, Map<TargetBean,String> targetIdMap, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
protected void writeTargetAccessPolicy(TargetAccessRuleBeanCollection targetAccessRules, Map<String,String> targetDomainIDMap, Map<ActionBean,String> actionIdMap, Map<TargetBean,String> targetIdMap, Map<RoleHierarchyBean,String> hierarchyIdMap, Map<Obligation,String> obligationIdMap, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
protected void writeValidity(TimePeriodConstraint validity, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
public void writeCondition(Predicate condition, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
private void writeValueSets(List<ValueSet> valuesets, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
private void writeValues(List<Value<?>> values, com.generationjava.io.xml.XmlWriter xmlWriter) throws IOException
IOException
public void writePolicy(PolicyBean policy) throws PolicyException
PolicyWriter
writePolicy
in interface PolicyWriter
policy
- the policy to write.
PolicyException
- if there is an error writing the policy.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:22
Copyright (c) 2002-2007 Ergon Informatik AG