org.openpermis.editor.policy.presenter
Class RoleAssignmentPresenter

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.RoleAssignmentPresenter

public class RoleAssignmentPresenter
extends PartPresenter<org.openpermis.policy.bean.PolicyBean>

Presentation model for the role assignment view.

Since:
0.9.0

Nested Class Summary
static class RoleAssignmentPresenter.SubjectItem
           
 
Constructor Summary
RoleAssignmentPresenter(org.openpermis.policy.bean.PolicyBean policy, PolicyContext context)
          Creates a new presenter.
 
Method Summary
 void assignRole(RoleAssignmentPresenter.SubjectItem subjectItem)
           
 void commitChanges()
           
 org.openpermis.subject.MutableSubjectFinder getMutableSubjectFinder()
          Gets the MutableSubjectFinder.
 org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> getSelectedRoles()
          Gets the list of selected roles.
 org.jdesktop.observablecollections.ObservableList<RoleAssignmentPresenter.SubjectItem> getSubjectsWithoutRole()
          Gets the list of subjects without the selected roles.
 org.jdesktop.observablecollections.ObservableList<RoleAssignmentPresenter.SubjectItem> getSubjectsWithRole()
          Gets the list of subjects holding the selected roles.
 void policyChanged()
           
 void revokeRole(RoleAssignmentPresenter.SubjectItem subjectItem)
           
 void setIdentityFinder(org.openpermis.identity.IdentityFinder identityFinderParam)
          Sets the IdentityFinder.
 void setMutableSubjectFinder(org.openpermis.subject.MutableSubjectFinder mutableSubjectFinderParam, URI issuerIdentityParam)
          Sets the MutableSubjectFinder.
 
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
 

Constructor Detail

RoleAssignmentPresenter

public RoleAssignmentPresenter(org.openpermis.policy.bean.PolicyBean policy,
                               PolicyContext context)
Creates a new presenter.

Parameters:
policy - the policy whose assignment rules will be available for role assignment and whose role hierarchy will be available for roles to assign.
context - editor meta data for the policy.
Since:
0.9.0
Method Detail

assignRole

public void assignRole(RoleAssignmentPresenter.SubjectItem subjectItem)
Since:
0.9.0

revokeRole

public void revokeRole(RoleAssignmentPresenter.SubjectItem subjectItem)
Since:
0.9.0

commitChanges

public void commitChanges()
                   throws org.openpermis.subject.SubjectFinderException
Throws:
org.openpermis.subject.SubjectFinderException
Since:
0.9.0

setIdentityFinder

public void setIdentityFinder(org.openpermis.identity.IdentityFinder identityFinderParam)
Sets the IdentityFinder.

Parameters:
identityFinderParam - the IdentityFinder.
Since:
0.9.0

getMutableSubjectFinder

public org.openpermis.subject.MutableSubjectFinder getMutableSubjectFinder()
Gets the MutableSubjectFinder.

Returns:
the MutableSubjectFinder.
Since:
0.9.0

setMutableSubjectFinder

public void setMutableSubjectFinder(org.openpermis.subject.MutableSubjectFinder mutableSubjectFinderParam,
                                    URI issuerIdentityParam)
Sets the MutableSubjectFinder.

Parameters:
mutableSubjectFinderParam - the MutableSubjectFinder.
issuerIdentityParam - the issuer identity.
Since:
0.9.0

getSelectedRoles

public org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.Role> getSelectedRoles()
Gets the list of selected roles.

Returns:
the list of selected roles.
Since:
0.9.0

getSubjectsWithoutRole

public org.jdesktop.observablecollections.ObservableList<RoleAssignmentPresenter.SubjectItem> getSubjectsWithoutRole()
Gets the list of subjects without the selected roles.

Returns:
the list of subject identifiers.
Since:
0.9.0

getSubjectsWithRole

public org.jdesktop.observablecollections.ObservableList<RoleAssignmentPresenter.SubjectItem> getSubjectsWithRole()
Gets the list of subjects holding the selected roles.

Returns:
the list of subject identifiers.
Since:
0.9.0

policyChanged

public void policyChanged()
Since:
0.9.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG