it.eng.rdlab.soa3.pm.connector.interfaces
Interface PolicyAdder

All Known Implementing Classes:
PolicyAdderImpl

public interface PolicyAdder

This class provides the methods to add policies or simple rules to the Policy Manager

Author:
Ciro Formisano (ENG)

Method Summary
 Status addNewRule(String alias, Map<String,String> subjectAttributes, String action, String resource, boolean permitted, Obligation obligation, boolean moveAfter)
          Adds a new simple rule
 Status addXACMLPolicy(String alias, int index, String policySetId, String policyIdPrefix, Element xacmlPolicy)
          Adds a policy in Element format
 Status addXACMLPolicy(String alias, int index, String policySetId, String policyIdPrefix, org.opensaml.xacml.policy.PolicyType xacmlPolicy)
          Adds a policy in XACML format
 Status addXACMLPolicySet(String alias, int index, Element xacmlPolicySet)
          Adds a policy set in Element format
 Status addXACMLPolicySet(String alias, int index, org.opensaml.xacml.policy.PolicySetType xacmlPolicySet)
          Adds a policy set in XACML format
 Status updateXACMLPolicy(String alias, int version, Element policy)
          Updates a Policy in Element format
 Status updateXACMLPolicy(String alias, int version, org.opensaml.xacml.policy.PolicyType xacmlPolicy)
          Updates a Policy in XACML format
 

Method Detail

addNewRule

Status addNewRule(String alias,
                  Map<String,String> subjectAttributes,
                  String action,
                  String resource,
                  boolean permitted,
                  Obligation obligation,
                  boolean moveAfter)
Adds a new simple rule

Parameters:
alias - the PAP alias (can be null)
subjectAttributes - a map (key - value) of the subject attributes
action - action id
resource - resource id
permitted - true if it is a permit rule, false otherwise
obligation - an obligation
moveAfter - boolean value indicating if the rule must be set as last rule of the policy
Returns:
the status object representing the result of the operation

addXACMLPolicy

Status addXACMLPolicy(String alias,
                      int index,
                      String policySetId,
                      String policyIdPrefix,
                      org.opensaml.xacml.policy.PolicyType xacmlPolicy)
Adds a policy in XACML format

Parameters:
alias - the PAP alias (can be null)
index - the index of the policy in the policy set
policySetId - the policy set id
policyIdPrefix - the policy id prefix
xacmlPolicy - the policy in XACML format
Returns:
the status object representing the result of the operation

addXACMLPolicy

Status addXACMLPolicy(String alias,
                      int index,
                      String policySetId,
                      String policyIdPrefix,
                      Element xacmlPolicy)
Adds a policy in Element format

Parameters:
alias - the PAP alias (can be null)
index - the index of the policy in the policy set
policySetId - the policy set id
policyIdPrefix - the policy id prefix
xacmlPolicy - the policy in XACML format as a DOM element
Returns:
the status object representing the result of the operation

addXACMLPolicySet

Status addXACMLPolicySet(String alias,
                         int index,
                         org.opensaml.xacml.policy.PolicySetType xacmlPolicySet)
Adds a policy set in XACML format

Parameters:
alias - the PAP alias (can be null)
index - the index of the policy set
xacmlPolicySet - the policy set in XACML format
Returns:
the status object representing the result of the operation

addXACMLPolicySet

Status addXACMLPolicySet(String alias,
                         int index,
                         Element xacmlPolicySet)
Adds a policy set in Element format

Parameters:
alias - the PAP alias (can be null)
index - the index of the policy set
xacmlPolicySet - the policy set as a DOM element
Returns:
the status object representing the result of the operation

updateXACMLPolicy

Status updateXACMLPolicy(String alias,
                         int version,
                         org.opensaml.xacml.policy.PolicyType xacmlPolicy)
Updates a Policy in XACML format

Parameters:
alias - the PAP alias (can be null)
version - the version of the old policy
xacmlPolicy - the policy in XACML format
Returns:
the status object representing the result of the operation

updateXACMLPolicy

Status updateXACMLPolicy(String alias,
                         int version,
                         Element policy)
Updates a Policy in Element format

Parameters:
alias - the PAP alias (can be null)
version - the version of the old policy
xacmlPolicy - the policy as a DOM element
Returns:
the status object representing the result of the operation


Copyright © 2013. All Rights Reserved.