|
![]() |
||||||||
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<M>
M
- the type of part bean of this presenter.public abstract class PartPresenter<M extends org.openpermis.policy.bean.PartBean>
Abstract base class for all presenters that work on a part bean.
Constructor Summary | |
---|---|
PartPresenter(M model,
PolicyContext context)
Creates a new part presenter for the specified model. |
Method Summary | ||
---|---|---|
protected void |
change(org.openpermis.policy.bean.PartBean part,
String property,
Object value)
Performs a change on a part. |
|
protected void |
change(String property,
Object value)
Performs a change on the model of this presenter. |
|
protected
|
containsSerial(Iterable<T> collection,
T part)
Checks if a collection contains a partbean. |
|
protected Command |
createChangeCommand(org.openpermis.policy.bean.PartBean part,
String property,
Object value)
Creates a command that performs a change on a part. |
|
protected
|
createCollectionAtPresenter(Iterable<P> modelCollection)
Creates the initial presenter list for the specified model list. |
|
void |
dispose()
Disposes this presenter. |
|
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. |
|
PolicyContext |
getContext()
Returns the policy context. |
|
org.openpermis.policy.bean.SerialNumber |
getModelSerialNumber()
Returns the serial number of the model attached to this presenter. |
|
PolicyPartPool<org.openpermis.policy.bean.ObligationBean> |
getObligationPool()
Returns the policy pool for obligations. |
|
protected org.openpermis.policy.bean.PartBeanFactory |
getPartBeanFactory()
Returns the part bean factory to use when creating new parts. |
|
PolicyPartPool<org.openpermis.policy.bean.DomainBean> |
getResourceDomainPool()
Returns the policy pool. |
|
PolicyRoleRefPool |
getRolePool()
Returns the role pool. |
|
PolicyPartPool<org.openpermis.policy.bean.DomainBean> |
getSubjectDomainPool()
Returns the policy pool. |
|
PolicyPartPool<org.openpermis.policy.bean.TargetBean> |
getTargetPool()
Returns the policy pool. |
|
protected
|
indexOfBySerial(List<T> list,
T part)
Gets index of a PartBean in a collection. |
|
protected boolean |
sameSerial(org.openpermis.policy.bean.PartBean one,
org.openpermis.policy.bean.PartBean two)
Check if the part beans are equivalent with respect to serial number. |
|
protected
|
updateCollectionAtPresenter(Iterable<P> modelCollection,
org.jdesktop.observablecollections.ObservableList<P> presenterCollection,
org.jdesktop.observablecollections.ObservableListListener listener)
Writes the parts in the presenter according to the model. |
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 |
---|
public PartPresenter(M model, PolicyContext context)
model
- the part bean that this presenter works on, must not be null
.context
- the context of the policy.Method Detail |
---|
protected boolean sameSerial(org.openpermis.policy.bean.PartBean one, org.openpermis.policy.bean.PartBean two)
one
- the first bean.two
- the second bean.
true
if they are equivalent.protected <T extends org.openpermis.policy.bean.PartBean> boolean containsSerial(Iterable<T> collection, T part)
protected <T extends org.openpermis.policy.bean.PartBean> int indexOfBySerial(List<T> list, T part)
public final org.openpermis.policy.bean.SerialNumber getModelSerialNumber()
protected org.openpermis.policy.bean.PartBeanFactory getPartBeanFactory()
public PolicyContext getContext()
public PolicyPartPool<org.openpermis.policy.bean.ActionBean> getActionPool()
public PolicyPartPool<org.openpermis.policy.bean.ObligationBean> getObligationPool()
public PolicyPartPool<org.openpermis.policy.bean.AuthorityBean> getAuthorityPool()
public PolicyPartPool<org.openpermis.policy.bean.DomainBean> getResourceDomainPool()
public PolicyPartPool<org.openpermis.policy.bean.DomainBean> getSubjectDomainPool()
public PolicyPartPool<org.openpermis.policy.bean.TargetBean> getTargetPool()
public PolicyRoleRefPool getRolePool()
protected Command createChangeCommand(org.openpermis.policy.bean.PartBean part, String property, Object value)
part
- the part to modify.property
- the property to set.value
- the value to set.protected void change(String property, Object value)
property
- the property to set.value
- the value to set.protected void change(org.openpermis.policy.bean.PartBean part, String property, Object value)
part
- the part to modify.property
- the property to set.value
- the value to set.protected void execute(Command command)
command
- the command to execute.protected <P> org.jdesktop.observablecollections.ObservableList<P> createCollectionAtPresenter(Iterable<P> modelCollection)
modelCollection
- the modelcollection to create the presenter list for.
null
.protected <P extends org.openpermis.policy.bean.PartBean> void updateCollectionAtPresenter(Iterable<P> modelCollection, org.jdesktop.observablecollections.ObservableList<P> presenterCollection, org.jdesktop.observablecollections.ObservableListListener listener)
public void dispose()
Presenter
The presenter has to remove all listeners registered.
dispose
in class Presenter<M extends org.openpermis.policy.bean.PartBean>
|
![]() |
||||||||
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:33
Copyright (c) 2002-2007 Ergon Informatik AG