org.openpermis.policy.bean.basic
Class BasicPartBeanFactory

java.lang.Object
  extended by org.openpermis.policy.bean.basic.BasicPartBeanFactory
All Implemented Interfaces:
PartBeanFactory, PartFactory

public class BasicPartBeanFactory
extends Object
implements PartBeanFactory

Factory for policy parts.

Since:
0.1.0

Field Summary
private  SerialNumber serialNumber
           
 
Constructor Summary
BasicPartBeanFactory()
           
 
Method Summary
 ActionBean createAction(String name, ParameterList parameterList)
          Creates a new action bean.
 ActionBeanCollection createActionCollection(Collection<? extends Action> collection)
          Creates a action bean collection.
 AuthorityBean createAuthority(URI identity)
          Creates a new authority bean.
 DomainBean createDomain(URI uri)
          Creates a new domain.
 ObligationBean createObligation(String text)
          Creates a new obligation.
 ObligationBeanCollection createObligationCollection(Collection<? extends Obligation> collection)
          Creates a obligation bean collection.
 PolicyBean createPolicy()
          Create a new policy bean.
 PolicyBean createPolicy(org.joda.time.DateTimeZone zone, RoleHierarchyCollection hierarchies, TargetAccessRuleCollection targetAccessRules, RoleAssignmentRuleCollection roleAssignmentRules)
          Creates a new policy.
 RoleAssignmentRuleBean createRoleAssignmentRule(Authority authority, DomainBean subjectDomain, Collection<Role> roles, TimePeriodConstraint constraint, int delegationDepth)
          Create a role assignment rule bean.
 RoleAssignmentRuleBeanCollection createRoleAssignmentRuleCollection(Collection<? extends RoleAssignmentRule> collection)
          Creates a role assignment rule bean collection.
 RoleHierarchyBean createRoleHierarchy(URI uri)
          Create a new role hierarchy bean.
 RoleHierarchyBeanCollection createRoleHierarchyCollection(Collection<? extends RoleHierarchy> collection)
          Creates a new role hierarchy bean collection.
 TargetBean createTarget(Domain domain, ActionCollection actions)
          Creates a target bean.
 TargetAccessRuleBean createTargetAccessRule(TargetCollection targets, Collection<Role> roles, Predicate condition, ObligationCollection obligations)
          Creates a target access rule bean.
 TargetAccessRuleBeanCollection createTargetAccessRuleCollection(Collection<? extends TargetAccessRule> collection)
          Creates a target access rule bean collection.
 TargetBeanCollection createTargetCollection(Collection<? extends Target> collection)
          Creates a target bean collection.
 SerialNumber getSerialNumber()
           
protected  SerialNumber nextSerial()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialNumber

private final SerialNumber serialNumber
Since:
0.1.0
Constructor Detail

BasicPartBeanFactory

public BasicPartBeanFactory()
Since:
0.1.0
Method Detail

nextSerial

protected final SerialNumber nextSerial()
Since:
0.1.0
0.3.0 protected to allow use in extensions.

getSerialNumber

public SerialNumber getSerialNumber()
Specified by:
getSerialNumber in interface PartBeanFactory
Since:
0.1.0

createAction

public ActionBean createAction(String name,
                               ParameterList parameterList)
Description copied from interface: PartBeanFactory
Creates a new action bean.

Specified by:
createAction in interface PartBeanFactory
Specified by:
createAction in interface PartFactory
Parameters:
name - the name that the created action will have.
parameterList - a ParameterList that defines the arguments for this action.
Returns:
an ActionBean instance.
Since:
0.1.0

createActionCollection

public ActionBeanCollection createActionCollection(Collection<? extends Action> collection)
Description copied from interface: PartBeanFactory
Creates a action bean collection.

Specified by:
createActionCollection in interface PartBeanFactory
Specified by:
createActionCollection in interface PartFactory
Parameters:
collection - of ActionBean's.
Returns:
a ActionBeanCollection instance.
Since:
0.3.0

createAuthority

public AuthorityBean createAuthority(URI identity)
Description copied from interface: PartBeanFactory
Creates a new authority bean.

Specified by:
createAuthority in interface PartBeanFactory
Specified by:
createAuthority in interface PartFactory
Parameters:
identity - the URI identifying the authority.
Returns:
an AuthorityBean instance.
Since:
0.1.0

createDomain

public DomainBean createDomain(URI uri)
Description copied from interface: PartBeanFactory
Creates a new domain.

Specified by:
createDomain in interface PartBeanFactory
Specified by:
createDomain in interface PartFactory
Parameters:
uri - the URI identifying the domain.
Returns:
a DomainBean instance.
Since:
0.1.0

createObligation

public ObligationBean createObligation(String text)
Description copied from interface: PartBeanFactory
Creates a new obligation.

Specified by:
createObligation in interface PartBeanFactory
Specified by:
createObligation in interface PartFactory
Parameters:
text - the String describing the obligation.
Returns:
a ObligationBean instance.
Since:
0.3.0

createObligationCollection

public ObligationBeanCollection createObligationCollection(Collection<? extends Obligation> collection)
Description copied from interface: PartBeanFactory
Creates a obligation bean collection.

Specified by:
createObligationCollection in interface PartBeanFactory
Specified by:
createObligationCollection in interface PartFactory
Parameters:
collection - of ObligationBean's.
Returns:
a ObligationBeanCollection instance.
Since:
0.3.0

createPolicy

public PolicyBean createPolicy()
Description copied from interface: PartBeanFactory
Create a new policy bean.

Specified by:
createPolicy in interface PartBeanFactory
Specified by:
createPolicy in interface PartFactory
Returns:
a PolicyBean instance.
Since:
0.1.0

createPolicy

public PolicyBean createPolicy(org.joda.time.DateTimeZone zone,
                               RoleHierarchyCollection hierarchies,
                               TargetAccessRuleCollection targetAccessRules,
                               RoleAssignmentRuleCollection roleAssignmentRules)
Creates a new policy.

Specified by:
createPolicy in interface PartBeanFactory
Specified by:
createPolicy in interface PartFactory
Parameters:
zone - a DateTimeZone the time zone of this policy,
hierarchies - a RoleHierarchyCollection.
targetAccessRules - a TargetAccessRuleCollection.
roleAssignmentRules - a RoleAssignmentRuleCollection.
Returns:
a PolicyBean instance.
Since:
0.3.0

createRoleHierarchy

public RoleHierarchyBean createRoleHierarchy(URI uri)
Description copied from interface: PartBeanFactory
Create a new role hierarchy bean.

Specified by:
createRoleHierarchy in interface PartBeanFactory
Specified by:
createRoleHierarchy in interface PartFactory
Parameters:
uri - an URI uniquely identifying the role hierarchy.
Returns:
a RoleHierarchyBean instance.
Since:
0.3.0

createRoleHierarchyCollection

public RoleHierarchyBeanCollection createRoleHierarchyCollection(Collection<? extends RoleHierarchy> collection)
Description copied from interface: PartBeanFactory
Creates a new role hierarchy bean collection.

Specified by:
createRoleHierarchyCollection in interface PartBeanFactory
Specified by:
createRoleHierarchyCollection in interface PartFactory
Parameters:
collection - of RoleHierarchyBean's.
Returns:
a RoleHierarchyBeanCollection instance.
Since:
0.3.0

createRoleAssignmentRule

public RoleAssignmentRuleBean createRoleAssignmentRule(Authority authority,
                                                       DomainBean subjectDomain,
                                                       Collection<Role> roles,
                                                       TimePeriodConstraint constraint,
                                                       int delegationDepth)
Description copied from interface: PartBeanFactory
Create a role assignment rule bean.

Specified by:
createRoleAssignmentRule in interface PartBeanFactory
Specified by:
createRoleAssignmentRule in interface PartFactory
Parameters:
authority - the Authority granting the right to delegate roles.
subjectDomain - the Domain of subjects to which this role applies.
roles - the Roles that the rule allows to be delegated.
constraint - the TimePeriodConstraint of this rule.
delegationDepth - the number of times a role may be delegated to somebody else.
Returns:
a RoleAssignmentRuleBean instance.
Since:
0.1.0

createRoleAssignmentRuleCollection

public RoleAssignmentRuleBeanCollection createRoleAssignmentRuleCollection(Collection<? extends RoleAssignmentRule> collection)
Description copied from interface: PartBeanFactory
Creates a role assignment rule bean collection.

Specified by:
createRoleAssignmentRuleCollection in interface PartBeanFactory
Specified by:
createRoleAssignmentRuleCollection in interface PartFactory
Parameters:
collection - of RoleAssignmentRuleBean's.
Returns:
a RoleAssignmentRuleBeanCollection instance.
Since:
0.3.0

createTarget

public TargetBean createTarget(Domain domain,
                               ActionCollection actions)
Description copied from interface: PartBeanFactory
Creates a target bean.

Specified by:
createTarget in interface PartBeanFactory
Specified by:
createTarget in interface PartFactory
Parameters:
domain - the DomainBean identifying the resources of this target
actions - the ActionBeanCollection that can be performed on the resources.
Returns:
a TargetBean instance.
Since:
0.3.0

createTargetCollection

public TargetBeanCollection createTargetCollection(Collection<? extends Target> collection)
Description copied from interface: PartBeanFactory
Creates a target bean collection.

Specified by:
createTargetCollection in interface PartBeanFactory
Specified by:
createTargetCollection in interface PartFactory
Parameters:
collection - of TargetBean's.
Returns:
a TargetBeanCollection instance.
Since:
0.3.0

createTargetAccessRule

public TargetAccessRuleBean createTargetAccessRule(TargetCollection targets,
                                                   Collection<Role> roles,
                                                   Predicate condition,
                                                   ObligationCollection obligations)
Description copied from interface: PartBeanFactory
Creates a target access rule bean.

Specified by:
createTargetAccessRule in interface PartBeanFactory
Specified by:
createTargetAccessRule in interface PartFactory
Parameters:
targets - a TargetBeanCollection for which this rule applies.
roles - the Roles that a subject needs to get access to this target.
condition - the predicate that must evaluate to true in order for the rule to grant access.
obligations - the ObligationCollections for this rule.
Returns:
a TargetAccessRuleBean instance.
Since:
0.3.0

createTargetAccessRuleCollection

public TargetAccessRuleBeanCollection createTargetAccessRuleCollection(Collection<? extends TargetAccessRule> collection)
Description copied from interface: PartBeanFactory
Creates a target access rule bean collection.

Specified by:
createTargetAccessRuleCollection in interface PartBeanFactory
Specified by:
createTargetAccessRuleCollection in interface PartFactory
Parameters:
collection - of TargetAccessRuleBean's.
Returns:
a TargetAccessRuleBeanCollection instance.
Since:
0.3.0


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:14:59
Copyright (c) 2002-2007 Ergon Informatik AG