org.openpermis.editor.policy.view
Interface ViewContext

All Superinterfaces:
ErrorReporter
All Known Implementing Classes:
ContextView, PolicyView

public interface ViewContext
extends ErrorReporter

Manager for tool and editor views.

The view manager provides methods to:

Since:
0.1.0

Method Summary
 void addViewContextListener(ViewContextListener listener)
          Adds a listener for view context events.
 boolean canEditPart(org.openpermis.policy.bean.PartBean part)
          Tests if the part specified can be edited.
 boolean closeView(View view, boolean force)
          Closes the specified view.
 Editor editPart(org.openpermis.policy.bean.PartBean part)
          Opens an editor for the specified part.
 void openView(View view)
          Opens the specified view.
 void removeViewContextListener(ViewContextListener listener)
          Removes a listener from this view context.
 void updateViewTitle(View view)
          Updates the title of the specified view.
 
Methods inherited from interface org.openpermis.editor.policy.gui.binding.ErrorReporter
showStatusError
 

Method Detail

addViewContextListener

void addViewContextListener(ViewContextListener listener)
Adds a listener for view context events.

The same listener object may be added more than once, and will be called as many times as it is added.

If the listener is null, no action is taken.

Parameters:
listener - the listener to add, may be null.
Since:
0.1.0

removeViewContextListener

void removeViewContextListener(ViewContextListener listener)
Removes a listener from this view context.

If the same listener was added more than once, it will be notified one less time after being removed.

If the listener is null, or was never added, no action is taken.

Parameters:
listener - the listener to be removed, may be null.

editPart

Editor editPart(org.openpermis.policy.bean.PartBean part)
Opens an editor for the specified part.

If there is already an editor open, the editor will be shown.

Parameters:
part - the part to edit.
Returns:
the editor of this part, null if the part cannot be edited.
Since:
0.1.0

canEditPart

boolean canEditPart(org.openpermis.policy.bean.PartBean part)
Tests if the part specified can be edited.

There are part types for which there may be no editor type registered, in such a case the part is not editable and calling editPart(PartBean) will yield a null editor. Use this method if you want to test prior to actually creating the editor.

Parameters:
part - the part to test.
Returns:
true if the part can be edited, false otherwise.
Since:
0.3.0

updateViewTitle

void updateViewTitle(View view)
Updates the title of the specified view.

Parameters:
view - the view for which to update the title.
Since:
0.1.0

openView

void openView(View view)
Opens the specified view.

Parameters:
view - the view to be opened.
Since:
0.1.0

closeView

boolean closeView(View view,
                  boolean force)
Closes the specified view.

Parameters:
view - the view to be closed.
force - true to force closing of the view.
Returns:
true if the view was closed, false if the view denied closing.
Since:
0.1.0


PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:33
Copyright (c) 2002-2007 Ergon Informatik AG