|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.view.AbstractView
org.openpermis.editor.policy.view.AbstractEditor<TargetAccessRulePresenter>
org.openpermis.editor.policy.view.TargetAccessRuleEditor
public class TargetAccessRuleEditor
Tool view that displays all target access rules in a policy.
Field Summary | |
---|---|
private static Object[] |
BOOLEAN_TERM_TYPES
|
private static Object[] |
CONDITION_TERM_TYPES
|
private JTree |
conditionTree
The tree representing the condition. |
private static org.slf4j.Logger |
LOGGER
The logger object of this class. |
private CheckList<org.openpermis.policy.bean.ObligationBean> |
obligationList
The list of obligations in the target access rule. |
private PropertyChangeListener |
propertyChangeListener
|
private static Class<?>[] |
RELATION_SUPPORTED_TYPES
An array of parameter types allowed in the relations. |
private CheckList<org.openpermis.policy.Role> |
roleList
The list of actions in the target access rule. |
private static Class<?>[] |
SUPPORTED_TYPES
An array of allowed parameter types. |
private CheckList<org.openpermis.policy.bean.TargetBean> |
targetList
The list of targets in the target access rule. |
Constructor Summary | |
---|---|
TargetAccessRuleEditor(org.jdesktop.application.ApplicationContext context,
AdapterTrader trader,
TargetAccessRulePresenter presenter)
Creates an target access rules tool view. |
Method Summary | |
---|---|
private Object |
add(Object subTreeRoot,
Object parentOfAdded)
|
void |
addObligation()
|
void |
addTarget()
|
void |
addTerm()
Adds a new term to the condition. |
void |
ancestorAdded(AncestorEvent event)
|
void |
ancestorMoved(AncestorEvent event)
|
void |
ancestorRemoved(AncestorEvent event)
|
protected void |
bind(org.jdesktop.beansbinding.BindingGroup bindings)
Binds all components to the presenter. |
private org.openpermis.policy.Predicate |
createAFalse()
|
private org.openpermis.policy.Predicate |
createATrue()
|
private void |
createNewTerm(Object[] newTerm)
|
private Object |
edit(Object root,
Object toBeEdited)
|
void |
editObligation()
|
void |
editTarget()
|
void |
editTerm()
Edits a term from the condition. |
void |
fillContentPane(JPanel panel)
|
private String |
getFromMap(String key)
|
private String[] |
getNamesOfArgumentsOfGivenType(Class<?> givenType)
|
private DefaultTableModel |
makeASetTableModel(List<org.openpermis.policy.predicate.Value<?>> firstSetValuesList)
|
private JComponent |
obligationList()
|
private JComponent |
predicateTree()
|
private JComponent |
predicateXml()
|
private Object |
recreatePredicate(Object root,
Object[] operands)
|
private Object |
remove(Object root,
Object toBeDeleted)
|
void |
removeObligation()
|
void |
removeTarget()
|
void |
removeTerm()
Remove a term from the condition. |
private JComponent |
roleList()
|
private void |
showAValueDialog(org.openpermis.policy.predicate.Value[] newValue,
JComboBox typeCombo,
boolean argumentOnly)
|
private JComponent |
targetList()
|
void |
updateState()
Updater for changes of the presenter. |
Methods inherited from class org.openpermis.editor.policy.view.AbstractEditor |
---|
adjustTitleParameters, canClose, contentPaneCreated, createContentPane, dispose, getModelSerialNumber, getPresenter, getTitleParameters, showYesNoDialog |
Methods inherited from class org.openpermis.editor.policy.view.AbstractView |
---|
attach, canEditPart, closeView, detach, editPart, getActionMap, getAdapteeTrader, getContentPane, getIcon, getResourceMap, getTitle, getViewContext, label, openView, showStatusError, toolBar, updateTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openpermis.editor.policy.view.View |
---|
attach, detach, getContentPane, getIcon, getTitle |
Field Detail |
---|
private static final org.slf4j.Logger LOGGER
private static final Class<?>[] SUPPORTED_TYPES
private static final Class<?>[] RELATION_SUPPORTED_TYPES
private static final Object[] CONDITION_TERM_TYPES
private static final Object[] BOOLEAN_TERM_TYPES
private CheckList<org.openpermis.policy.bean.TargetBean> targetList
private CheckList<org.openpermis.policy.Role> roleList
private CheckList<org.openpermis.policy.bean.ObligationBean> obligationList
private JTree conditionTree
private PropertyChangeListener propertyChangeListener
Constructor Detail |
---|
public TargetAccessRuleEditor(org.jdesktop.application.ApplicationContext context, AdapterTrader trader, TargetAccessRulePresenter presenter)
context
- the application context used to lookup the action and resource map.presenter
- the presenter of this view.Method Detail |
---|
private Object add(Object subTreeRoot, Object parentOfAdded)
private Object remove(Object root, Object toBeDeleted)
private Object edit(Object root, Object toBeEdited)
private Object recreatePredicate(Object root, Object[] operands)
private void createNewTerm(Object[] newTerm)
private String[] getNamesOfArgumentsOfGivenType(Class<?> givenType)
private DefaultTableModel makeASetTableModel(List<org.openpermis.policy.predicate.Value<?>> firstSetValuesList)
private void showAValueDialog(org.openpermis.policy.predicate.Value[] newValue, JComboBox typeCombo, boolean argumentOnly)
private String getFromMap(String key)
private org.openpermis.policy.Predicate createATrue()
private org.openpermis.policy.Predicate createAFalse()
@Action public void addTarget()
@Action public void removeTarget()
@Action public void editTarget()
@Action public void addObligation()
@Action public void removeObligation()
@Action public void editObligation()
@Action public void addTerm()
@Action public void removeTerm()
@Action public void editTerm()
public void updateState()
protected void bind(org.jdesktop.beansbinding.BindingGroup bindings)
AbstractEditor
This method is called after creation of the content pane.
bind
in class AbstractEditor<TargetAccessRulePresenter>
bindings
- the binding group to add bindings to.private JComponent roleList()
private JComponent targetList()
private JComponent obligationList()
private JComponent predicateXml()
private JComponent predicateTree()
public void fillContentPane(JPanel panel)
fillContentPane
in class AbstractEditor<TargetAccessRulePresenter>
public void ancestorAdded(AncestorEvent event)
ancestorAdded
in interface AncestorListener
public void ancestorMoved(AncestorEvent event)
ancestorMoved
in interface AncestorListener
public void ancestorRemoved(AncestorEvent event)
ancestorRemoved
in interface AncestorListener
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:22
Copyright (c) 2002-2007 Ergon Informatik AG