org.openpermis.editor.policy.presenter
Class PolicyPresenter

java.lang.Object
  extended by org.openpermis.editor.policy.presenter.Presenter<M>
      extended by org.openpermis.editor.policy.presenter.PartPresenter<org.openpermis.policy.bean.PolicyBean>
          extended by org.openpermis.editor.policy.presenter.PolicyPresenter
All Implemented Interfaces:
PolicyContext

public class PolicyPresenter
extends PartPresenter<org.openpermis.policy.bean.PolicyBean>
implements PolicyContext

Presenter for a PolicyBean.

Since:
0.1.0

Field Summary
private  CommandManager commandManager
          The command dispatcher of the policy of this presenter.
private  String filename
          The filename of the current policy.
private static org.slf4j.Logger LOGGER
          The logger object of this class.
private  org.openpermis.policy.bean.PartBeanFactory policyFactory
          The factory of this presenter.
private  PolicyPool policyPool
          A pool of this presenter.
private  PolicyProblemReporter policyProblemReporter
          A pool of this presenter.
 
Constructor Summary
PolicyPresenter(org.openpermis.policy.bean.PolicyBean model, org.openpermis.policy.bean.PartBeanFactory policyFactory)
          Creates a new presenter for the specified policy.
 
Method Summary
protected  void execute(Command command)
          Executes a command using the built-in dispatcher.
 PolicyPartPool<org.openpermis.policy.bean.ActionBean> getActionPool()
          Returns the policy pool.
 PolicyPartPool<org.openpermis.policy.bean.AuthorityBean> getAuthorityPool()
          Returns the policy pool for authorities.
 CommandDispatcher getCommandDispatcher()
          Returns the dispatcher for commands that operate on the policy.
 CommandManager getCommandManager()
          Returns the command manager of this policy presenter.
 String getFilename()
           
 PolicyPartPool<org.openpermis.policy.bean.ObligationBean> getObligationPool()
          Returns the policy pool.
 org.openpermis.policy.bean.PartBeanFactory getPartBeanFactory()
          Returns the part bean factory to use when creating new parts.
 org.openpermis.policy.bean.PolicyBean getPolicy()
          Returns the policy of this policy presenter.
 org.openpermis.policy.bean.PolicyBean getPolicyBean()
          Returns the policy bean.
 String getPolicyProblems(org.jdesktop.application.ResourceMap resourceMap)
          Returns the policy pool.
 PolicyPartPool<org.openpermis.policy.bean.DomainBean> getResourceDomainPool()
          Returns the policy pool.
 PolicyRoleRefPool getRolePool()
          Returns the policy pool.
 PolicyPartPool<org.openpermis.policy.bean.DomainBean> getSubjectDomainPool()
          Returns the subject domain pool.
 PolicyPartPool<org.openpermis.policy.bean.TargetBean> getTargetPool()
          Returns the policy pool.
 boolean policyIsValid()
          Returns the policy pool.
 void roleAssignmentRulesChanged(org.openpermis.policy.bean.PolicyBean source)
          Handles property changes of roleAssignmentRules.
 void roleHierarchiesChanged(org.openpermis.policy.bean.PolicyBean source)
          Handles property changes of roleHierarchies.
 void setFilename(String filename)
           
 void targetAccessRulesChanged(org.openpermis.policy.bean.PolicyBean source)
          Handles property changes of targetAccessRules.
 
Methods inherited from class org.openpermis.editor.policy.presenter.PartPresenter
change, change, containsSerial, createChangeCommand, createCollectionAtPresenter, dispose, getContext, getModelSerialNumber, indexOfBySerial, sameSerial, updateCollectionAtPresenter
 
Methods inherited from class org.openpermis.editor.policy.presenter.Presenter
addPropertyChangeListener, firePropertyChange, getModel, getTitleParameters, removePropertyChangeListener, setTitleParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final org.slf4j.Logger LOGGER
The logger object of this class.

Since:
0.1.0

filename

private String filename
The filename of the current policy.

Since:
0.1.0

commandManager

private final CommandManager commandManager
The command dispatcher of the policy of this presenter.

Since:
0.1.0

policyFactory

private final org.openpermis.policy.bean.PartBeanFactory policyFactory
The factory of this presenter.

Since:
0.1.0

policyPool

private final PolicyPool policyPool
A pool of this presenter.

Since:
0.1.0

policyProblemReporter

private final PolicyProblemReporter policyProblemReporter
A pool of this presenter.

Since:
0.1.0
Constructor Detail

PolicyPresenter

public PolicyPresenter(org.openpermis.policy.bean.PolicyBean model,
                       org.openpermis.policy.bean.PartBeanFactory policyFactory)
Creates a new presenter for the specified policy.

Parameters:
model - the policy to create the presenter for, must not be null.
policyFactory - the factory that created the policy bean specified.
Since:
0.1.0
Method Detail

getPolicy

public org.openpermis.policy.bean.PolicyBean getPolicy()
Returns the policy of this policy presenter.

Returns:
the policy of this policy presenter.
Since:
0.1.0

getCommandManager

public CommandManager getCommandManager()
Returns the command manager of this policy presenter.

Returns:
the command manager of this policy presenter, never null.
Since:
0.1.0

getFilename

public String getFilename()
Returns:
the filename.
Since:
0.1.0

setFilename

public void setFilename(String filename)
Parameters:
filename - filename to set. the filename to set.
Since:
0.1.0

policyIsValid

public boolean policyIsValid()
Returns the policy pool.

Returns:
Returns the policy pool.
Since:
0.1.0

getPolicyProblems

public String getPolicyProblems(org.jdesktop.application.ResourceMap resourceMap)
Returns the policy pool.

Returns:
Returns the policy pool.
Since:
0.1.0

getPolicyBean

public org.openpermis.policy.bean.PolicyBean getPolicyBean()
Description copied from interface: PolicyContext
Returns the policy bean.

Specified by:
getPolicyBean in interface PolicyContext
Returns:
returns the policy bean.
Since:
0.1.0

getPartBeanFactory

public org.openpermis.policy.bean.PartBeanFactory getPartBeanFactory()
Description copied from class: PartPresenter
Returns the part bean factory to use when creating new parts.

Specified by:
getPartBeanFactory in interface PolicyContext
Overrides:
getPartBeanFactory in class PartPresenter<org.openpermis.policy.bean.PolicyBean>
Returns:
the part bean factory to use when creating new parts.
Since:
0.1.0

getCommandDispatcher

public CommandDispatcher getCommandDispatcher()
Description copied from interface: PolicyContext
Returns the dispatcher for commands that operate on the policy.

Specified by:
getCommandDispatcher in interface PolicyContext
Returns:
returns the command dispatcher, never null.
Since:
0.1.0

getActionPool

public PolicyPartPool<org.openpermis.policy.bean.ActionBean> getActionPool()
Returns the policy pool.

Specified by:
getActionPool in interface PolicyContext
Overrides:
getActionPool in class PartPresenter<org.openpermis.policy.bean.PolicyBean>
Returns:
Returns the policy pool.
Since:
0.1.0

getAuthorityPool

public PolicyPartPool<org.openpermis.policy.bean.AuthorityBean> getAuthorityPool()
Description copied from class: PartPresenter
Returns the policy pool for authorities.

Specified by:
getAuthorityPool in interface PolicyContext
Overrides:
getAuthorityPool in class PartPresenter<org.openpermis.policy.bean.PolicyBean>
Returns:
the policy pool for authorities.
Since:
0.3.0

getResourceDomainPool

public PolicyPartPool<org.openpermis.policy.bean.DomainBean> getResourceDomainPool()
Returns the policy pool.

Specified by:
getResourceDomainPool in interface PolicyContext
Overrides:
getResourceDomainPool in class PartPresenter<org.openpermis.policy.bean.PolicyBean>
Returns:
Returns the policy pool.
Since:
0.1.0

getSubjectDomainPool

public PolicyPartPool<org.openpermis.policy.bean.DomainBean> getSubjectDomainPool()
Returns the subject domain pool.

Specified by:
getSubjectDomainPool in interface PolicyContext
Overrides:
getSubjectDomainPool in class PartPresenter<org.openpermis.policy.bean.PolicyBean>
Returns:
Returns the subject domain pool.
Since:
0.3.0

getTargetPool

public PolicyPartPool<org.openpermis.policy.bean.TargetBean> getTargetPool()
Returns the policy pool.

Specified by:
getTargetPool in interface PolicyContext
Overrides:
getTargetPool in class PartPresenter<org.openpermis.policy.bean.PolicyBean>
Returns:
Returns the policy pool.
Since:
0.1.0

getObligationPool

public PolicyPartPool<org.openpermis.policy.bean.ObligationBean> getObligationPool()
Returns the policy pool.

Specified by:
getObligationPool in interface PolicyContext
Overrides:
getObligationPool in class PartPresenter<org.openpermis.policy.bean.PolicyBean>
Returns:
Returns the policy pool.
Since:
0.3.0

getRolePool

public PolicyRoleRefPool getRolePool()
Returns the policy pool.

Specified by:
getRolePool in interface PolicyContext
Overrides:
getRolePool in class PartPresenter<org.openpermis.policy.bean.PolicyBean>
Returns:
Returns the policy pool.
Since:
0.3.0

roleAssignmentRulesChanged

public void roleAssignmentRulesChanged(org.openpermis.policy.bean.PolicyBean source)
Handles property changes of roleAssignmentRules.

Parameters:
source - the policy that has changed.
Since:
0.1.0

targetAccessRulesChanged

public void targetAccessRulesChanged(org.openpermis.policy.bean.PolicyBean source)
Handles property changes of targetAccessRules.

Parameters:
source - the policy that has changed.
Since:
0.1.0

roleHierarchiesChanged

public void roleHierarchiesChanged(org.openpermis.policy.bean.PolicyBean source)
Handles property changes of roleHierarchies.

Parameters:
source - the policy that has changed.
Since:
0.3.0

execute

protected void execute(Command command)
Description copied from class: PartPresenter
Executes a command using the built-in dispatcher.

Overrides:
execute in class PartPresenter<org.openpermis.policy.bean.PolicyBean>
Parameters:
command - the command to execute.
Since:
0.1.0


PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:48
Copyright (c) 2002-2007 Ergon Informatik AG