|
![]() |
||||||||
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.ContextView
org.openpermis.editor.policy.view.PolicyView
public class PolicyView
View for a complete PolicyBean
.
The PolicyView
describes the toplevel view including menubar and toolbar for a
complete policy editor. This view will serve as a view manager for all other views used to edit
the policy attached to the PolicyView
.
Constructor Summary | |
---|---|
PolicyView(Application application,
org.jdesktop.swingx.JXFrame frame,
PolicyIconRegistry iconRegistry,
AdapterTrader trader)
Creates a policy view for the specified application context. |
Method Summary | |
---|---|
void |
actionsFromWsdlImport()
Import the actions from a wsdl file. |
boolean |
canClose()
Prompts the view to save unsaved changes before closing. |
boolean |
canEditPart(org.openpermis.policy.bean.PartBean part)
Tests if the part specified can be edited. |
org.jdesktop.application.FrameView |
configure(org.jdesktop.application.FrameView frameView)
Configures the specified frame view for displaying this view. |
Editor |
editPart(org.openpermis.policy.bean.PartBean part)
Opens an editor for the specified part. |
void |
editRedo()
Redo one action. |
void |
editUndo()
Undo one action. |
void |
fileClose()
Closes the currently edited policy. |
void |
fileNew()
Creates a new policy. |
void |
fileOpen()
Opens an existing policy. |
void |
fileQuit()
Quits the policy editor. |
void |
fileRoleAssignment()
Creates an attribute certificate assigning roles to a subject. |
void |
fileSave()
Saves the policy editor. |
void |
fileSaveAs()
Saves the policy editor. |
void |
fileSignedExport()
Signs a policy. |
void |
fileSignedImport()
Imports a signed policy. |
void |
fileValidate()
Validates a policy. |
void |
loadPolicy()
Opens a file chooser to load a policy. |
void |
loadPolicy(File file)
Loads the specified policy from a file. |
void |
loadSignedPolicy()
|
void |
redoChanged(CommandManager commandManager,
String property,
boolean oldValue,
boolean newValue)
Called if the command manager changes. |
protected void |
refresh(org.openpermis.policy.bean.PolicyBean policy,
PolicyContext context)
Notifies all registered tools that the policy and the dispatcher have changed. |
void |
savePolicy()
Saves the current policy to a file. |
void |
savePolicy(File file)
Saves the policy to given file. |
void |
savePolicyAs()
Saves the current policy to a file. |
void |
setPresenter(PolicyPresenter presenter)
Sets the policy presenter of this view. |
void |
showStatusError(String message)
Shows an error message. |
void |
undoChanged(CommandManager commandManager,
String property,
boolean oldValue,
boolean newValue)
Called if the command manager changes. |
Methods inherited from class org.openpermis.editor.policy.view.ContextView |
---|
activateEditor, addViewContextListener, closeView, createContentPane, getEditorViews, openView, removeViewContextListener, updateViewTitle, viewActivated, viewClosed, viewDeactivated, viewOpened |
Methods inherited from class org.openpermis.editor.policy.view.AbstractView |
---|
attach, contentPaneCreated, detach, getActionMap, getAdapteeTrader, getContentPane, getIcon, getResourceMap, getTitle, getTitleParameters, getViewContext, label, toolBar, updateTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PolicyView(Application application, org.jdesktop.swingx.JXFrame frame, PolicyIconRegistry iconRegistry, AdapterTrader trader)
application
- the application that this policy view belongs to.frame
- the frame to attach this policy view to.iconRegistry
- the icon registry to use.Method Detail |
---|
public org.jdesktop.application.FrameView configure(org.jdesktop.application.FrameView frameView)
frameView
- the frame view to configure.
public void setPresenter(PolicyPresenter presenter)
presenter
- the presenter to set.@Action public void fileValidate()
@Action public void editRedo()
@Action public void editUndo()
@Action public void fileClose()
@Action public void fileOpen()
@Action public void fileQuit()
@Action public void fileSave()
@Action public void fileSaveAs()
@Action public void fileSignedImport()
@Action public void fileSignedExport()
@Action public void fileRoleAssignment()
@Action public void actionsFromWsdlImport()
@Action public void fileNew()
public Editor editPart(org.openpermis.policy.bean.PartBean part)
ViewContext
If there is already an editor open, the editor will be shown.
editPart
in interface ViewContext
editPart
in class ContextView
part
- the part to edit.
null
if the part cannot be edited.public boolean canEditPart(org.openpermis.policy.bean.PartBean part)
ViewContext
There are part types for which there may be no editor type registered, in such a case
the part is not editable and calling ViewContext.editPart(PartBean)
will yield a null
editor. Use this method if you want to test prior to actually creating the editor.
canEditPart
in interface ViewContext
canEditPart
in class ContextView
part
- the part to test.
true
if the part can be edited, false
otherwise.protected void refresh(org.openpermis.policy.bean.PolicyBean policy, PolicyContext context)
In contrast to the superclass version this method will update the tools regardless if they are showing or not.
refresh
in class ContextView
policy
- the new policy that is active.context
- the policy context to use.public void showStatusError(String message)
ErrorReporter
showStatusError
in interface ErrorReporter
showStatusError
in class AbstractView
message
- the message to display.public boolean canClose()
View
canClose
in interface View
canClose
in class AbstractView
true
if the view may be closed, false
otherwise.public void loadPolicy(File file)
PolicyLoader
loadPolicy
in interface PolicyLoader
file
- the file to load the policy from.public void loadPolicy()
PolicyLoader
loadPolicy
in interface PolicyLoader
public void loadSignedPolicy()
public void savePolicy()
savePolicy
in interface PolicySaver
public void savePolicyAs()
savePolicyAs
in interface PolicySaver
public void savePolicy(File file)
PolicySaver
savePolicy
in interface PolicySaver
file
- the file to store the policy to.public void undoChanged(CommandManager commandManager, String property, boolean oldValue, boolean newValue)
public void redoChanged(CommandManager commandManager, String property, boolean oldValue, boolean newValue)
|
![]() |
||||||||
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