org.openpermis.editor.policy.presenter
Class RoleHierarchyPresenter

java.lang.Object
  extended by org.openpermis.editor.policy.presenter.Presenter<M>
      extended by org.openpermis.editor.policy.presenter.PartPresenter<org.openpermis.policy.bean.RoleHierarchyBean>
          extended by org.openpermis.editor.policy.presenter.RoleHierarchyPresenter

public class RoleHierarchyPresenter
extends PartPresenter<org.openpermis.policy.bean.RoleHierarchyBean>

Presenter for a single RoleHierarchyBean.

Since:
0.3.0

Field Summary
private  org.openpermis.policy.bean.basic.BasicPartBeanFactory basicPartBeanFactory
           
private  URI identity
           
private static org.slf4j.Logger LOGGER
          The logger object of this class.
 
Constructor Summary
RoleHierarchyPresenter(org.openpermis.policy.bean.RoleHierarchyBean model, PolicyContext context)
          Creates a new RoleHierarchyPresenter.
 
Method Summary
 void addNewRole(String subRoleName)
          Adds a new role in the hierarchy.
 void detachRole(String parentName, String subRoleName)
          Detaches a role from its parent.
 org.openpermis.policy.bean.basic.BasicPartBeanFactory getBasicPartBeanFactory()
          Gets the BasicPartBeanFactory.
 URI getIdentity()
          Gets the identity.
 org.openpermis.policy.bean.RoleHierarchyBean getRoleHierarchyBean()
          Gets the model consisting in a RoleHierarchyBean.
 void includeRole(String parentName, String subRoleName)
          Given a parent role, include a role among its children.
 void removeRole(String subRoleName)
          Removes a role from the hierarchy.
 void renameRole(String oldName, String newName)
          Renames a role.
 void setIdentity(URI identity)
          Sets the identity of the model.
 void updateIdentity()
          Handles property changes of identity.
 
Methods inherited from class org.openpermis.editor.policy.presenter.PartPresenter
change, change, containsSerial, createChangeCommand, createCollectionAtPresenter, dispose, execute, getActionPool, getAuthorityPool, getContext, getModelSerialNumber, getObligationPool, getPartBeanFactory, getResourceDomainPool, getRolePool, getSubjectDomainPool, getTargetPool, 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.3.0

identity

private URI identity
Since:
0.3.0

basicPartBeanFactory

private org.openpermis.policy.bean.basic.BasicPartBeanFactory basicPartBeanFactory
Since:
0.3.0
Constructor Detail

RoleHierarchyPresenter

public RoleHierarchyPresenter(org.openpermis.policy.bean.RoleHierarchyBean model,
                              PolicyContext context)
Creates a new RoleHierarchyPresenter.

Parameters:
model - the action to work on.
context - policy context that provides additional information.
Since:
0.3.0
Method Detail

getIdentity

public URI getIdentity()
Gets the identity.

Returns:
the identity.
Since:
0.3.0

setIdentity

public void setIdentity(URI identity)
Sets the identity of the model.

Parameters:
identity - the new identity to set.
Since:
0.3.0

includeRole

public void includeRole(String parentName,
                        String subRoleName)
Given a parent role, include a role among its children.

Parameters:
parentName - name of the role to which the sub role is added.
subRoleName - name of the added sub role.
Since:
0.3.0

detachRole

public void detachRole(String parentName,
                       String subRoleName)
Detaches a role from its parent.

Parameters:
parentName - the parent name.
subRoleName - the sub-role name.
Since:
0.3.0

addNewRole

public void addNewRole(String subRoleName)
Adds a new role in the hierarchy.

Parameters:
subRoleName - name of the added sub role.
Since:
0.3.0

removeRole

public void removeRole(String subRoleName)
Removes a role from the hierarchy.

Parameters:
subRoleName - the sub-role name.
Since:
0.3.0

renameRole

public void renameRole(String oldName,
                       String newName)
Renames a role.

Parameters:
oldName - old role name.
newName - new role name.
Since:
0.3.0

getRoleHierarchyBean

public org.openpermis.policy.bean.RoleHierarchyBean getRoleHierarchyBean()
Gets the model consisting in a RoleHierarchyBean.

Returns:
the model.
Since:
0.3.0

getBasicPartBeanFactory

public org.openpermis.policy.bean.basic.BasicPartBeanFactory getBasicPartBeanFactory()
Gets the BasicPartBeanFactory.

Returns:
the BasicPartBeanFactory.
Since:
0.3.0

updateIdentity

public void updateIdentity()
Handles property changes of identity.

Since:
0.3.0


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