it.eng.rdlab.soa3.pm.connector.javaapi.engine
Interface PolicyEngine


public interface PolicyEngine

This interface provides methods for managing rules

Author:
Ciro Formisano (ENG)

Method Summary
 ResponseBean createRule(RuleBean bean)
          Creates a new rule
 boolean deleteAll()
          Deletes the complete repository
 boolean deleteRule(String ruleId)
           
 RuleBean getRule(String ruleId)
          gets a policy
 String getRuleId(RuleBean ruleBean)
           
 List<RuleBean> listRules()
          Returns all the rules
 List<RuleBean> listRulesByAction(String action)
          Returns a list of rules with given action
 List<RuleBean> listRulesByResource(String resource)
          Returns a list of rules with given resource
 List<RuleBean> listRulesBySubjects(List<Attribute> subjects)
          Returns a list of rules with given attributes map
 ResponseBean updateRule(String ruleId, RuleBean ruleBean)
          Update rule
 

Method Detail

createRule

ResponseBean createRule(RuleBean bean)
Creates a new rule

Parameters:
bean - the rule
Returns:
a ResponseBean with the response status and, if ok, the rule id

getRule

RuleBean getRule(String ruleId)
gets a policy

Parameters:
policyId - the id of the rule
Returns:
the rule

updateRule

ResponseBean updateRule(String ruleId,
                        RuleBean ruleBean)
Update rule

Parameters:
ruleId - the id of the policy to be updated
RuleBean - the new rule
Returns:
a ResponseBean with the response status and, if ok, the new rule id

getRuleId

String getRuleId(RuleBean ruleBean)
Parameters:
ruleBean -
Returns:

deleteRule

boolean deleteRule(String ruleId)
Parameters:
ruleId -
Returns:
true if the creation succeeded, false otherwise

listRulesBySubjects

List<RuleBean> listRulesBySubjects(List<Attribute> subjects)
Returns a list of rules with given attributes map

Parameters:
subjects - the subject attributes
Returns:
the rules

listRulesByAction

List<RuleBean> listRulesByAction(String action)
Returns a list of rules with given action

Parameters:
action - the action
Returns:
the rules

deleteAll

boolean deleteAll()
Deletes the complete repository

Returns:

listRulesByResource

List<RuleBean> listRulesByResource(String resource)
Returns a list of rules with given resource

Parameters:
respurce - the resource
Returns:
the rules

listRules

List<RuleBean> listRules()
Returns all the rules

Returns:
the rules


Copyright © 2013. All Rights Reserved.