|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.presenter.Presenter<M>
org.openpermis.editor.policy.presenter.PartPresenter<org.openpermis.policy.bean.TargetBean>
org.openpermis.editor.policy.presenter.TargetPresenter
public class TargetPresenter
Presenter for a single TargetBean
.
Field Summary | |
---|---|
private org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.ActionBean> |
actions
The actions of this target as observable collection. |
private org.jdesktop.observablecollections.ObservableListListener |
actionsUpdater
Updater that keeps the model in sync with the observable actions list. |
private org.openpermis.policy.bean.DomainBean |
activeResourceDomain
The currently active target access rule. |
private static org.slf4j.Logger |
LOGGER
The logger object of this class. |
Constructor Summary | |
---|---|
TargetPresenter(org.openpermis.policy.bean.TargetBean model,
CommandDispatcher dispatcher,
PolicyContext context)
Creates a new target presenter. |
Method Summary | |
---|---|
void |
addAction(EditPartCommand<org.openpermis.policy.bean.ActionBean> editPartCommand)
|
void |
addResourceDomain(EditPartCommand<org.openpermis.policy.bean.DomainBean> editPartCommand)
|
private org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.ActionBean> |
createActionList(org.openpermis.policy.bean.TargetBean model)
Creates the initial action list for the specified model. |
org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.ActionBean> |
getActions()
The list of actions of this target. |
org.openpermis.policy.bean.DomainBean |
getActiveResourceDomain()
Returns the active resource domain of this model. |
private String |
getIdentity(org.openpermis.policy.bean.DomainBean domain)
Returns the identity string representation of the specified domain. |
void |
removeActiveAction(org.openpermis.policy.bean.ActionBean activeAction)
Removes the active target in the whole policy. |
void |
removeActiveResourceDomain(org.openpermis.policy.bean.DomainBean resourceDomain)
Removes the active resource domain in the whole policy. |
void |
setActiveResourceDomain(org.openpermis.policy.bean.DomainBean activeResourceDomainBean)
Sets the active resource domain of the target of this model. |
void |
updateActions()
Handler for changes in the actions of a target. |
private void |
updateActionsAtModel()
Writes the actions in the model according to the presenter. |
private void |
updateActionsAtPresenter()
Writes the actions in the presenter according to the model. |
private void |
updateActiveResourceDomain(org.openpermis.policy.bean.DomainBean activeResourceDomainBean)
Forwards model changes to the listeners of this presenter. |
void |
updateResourceDomain()
Handler for resource domain changes in a target. |
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 |
---|
private static final org.slf4j.Logger LOGGER
private org.openpermis.policy.bean.DomainBean activeResourceDomain
private final org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.ActionBean> actions
private final org.jdesktop.observablecollections.ObservableListListener actionsUpdater
Constructor Detail |
---|
public TargetPresenter(org.openpermis.policy.bean.TargetBean model, CommandDispatcher dispatcher, PolicyContext context)
model
- the target to work on, must not be null
.context
- policy context that provides additional information.dispatcher
- the dispatcher for commands that change the policy.Method Detail |
---|
private org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.ActionBean> createActionList(org.openpermis.policy.bean.TargetBean model)
model
- the model to create the list for.
null
.private void updateActionsAtModel()
private void updateActionsAtPresenter()
public org.jdesktop.observablecollections.ObservableList<org.openpermis.policy.bean.ActionBean> getActions()
public org.openpermis.policy.bean.DomainBean getActiveResourceDomain()
public void setActiveResourceDomain(org.openpermis.policy.bean.DomainBean activeResourceDomainBean)
activeResourceDomainBean
- the new resource domain.private void updateActiveResourceDomain(org.openpermis.policy.bean.DomainBean activeResourceDomainBean)
activeResourceDomainBean
- the active resource domain to set.public void removeActiveResourceDomain(org.openpermis.policy.bean.DomainBean resourceDomain)
public void removeActiveAction(org.openpermis.policy.bean.ActionBean activeAction)
public void addResourceDomain(EditPartCommand<org.openpermis.policy.bean.DomainBean> editPartCommand)
private String getIdentity(org.openpermis.policy.bean.DomainBean domain)
domain
- the resource domain for which to retrieve the identity.
public void addAction(EditPartCommand<org.openpermis.policy.bean.ActionBean> editPartCommand)
public void updateResourceDomain()
public void updateActions()
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:48
Copyright (c) 2002-2007 Ergon Informatik AG