webinos/webinos-api-policy — pull request #1 by smonteleone (2013-06-07 20:22:26+00:00)
Title: Webinos Policy Management API - initial version

This implementation contains the following asynchronous methods:
getPolicySet(policyset_id, successCB, errorCB)
save(policyset, successCB, errorCB)

with getPolicySet it's possible to get a policy-set that exposes

1) policy objects with constuctor policy(ps, id, combine, description) and the following methods:

getInternalPolicy()
updateRule(ruleId, key, value)
addRule(newRuleId, effect, newCondition, rulePosition)
removeRule(ruleId)
addSubject(newSubjectId, matches, policyId)
getSubjects(policyId)
removeSubject(subjectId)
updateSubject(subjectId, matches)
updateAttributes(policyId, combine, description)
toJSONString()

2) policyset objects with constructor policyset(ps ,type, basefile, fileId, id, combine, description) and the following methods:

getBaseFile()
getFileId()
removeSubject(subjectId, policyId)
getInternalPolicySet()
createPolicy(policyId, combine, description)
addPolicy(newPolicy, newPolicyPosition)
addPolicySet(policySetId, combine, description, newPolicySetPosition)
addSubject(newSubjectId, matches)
getPolicy(policyId)
getPolicySet(policySetId)
getSubjects(policyId)
updateSubject(subjectId, matches/*, policyId*/ )
removePolicy(policyId)
removePolicySet(policySetId)
removeSubject(subjectId)
updateAttributes(key, value)
toJSONString()

Jira issue: WP-932