|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Panel java.applet.Applet javax.swing.JApplet kaos.kpat.applet.KPATApplet
public class KPATApplet
KAoS Policy Administration Tool
Provides a web browser-based user interface onto a KAoS Domain.
Can also be run as a stand-alone application.
Modifications by robert.e.cranfill@boeing.com
See "???" comments for problem areas, mystery code, etc
Functional Things To Do:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JApplet |
---|
javax.swing.JApplet.AccessibleJApplet |
Nested classes/interfaces inherited from class java.applet.Applet |
---|
java.applet.Applet.AccessibleApplet |
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected static java.lang.String |
_configPath
|
protected static boolean |
_doCommitNoDialog
|
protected boolean |
_isConflictingPolicy
|
protected boolean |
_isDSActive
|
protected boolean |
_isPolRedundant
|
protected boolean |
_policyListSelected
|
protected static java.lang.String |
_policyPath
|
protected static java.lang.String |
_policySetPath
|
protected java.util.List |
_redundantPolicies
|
protected ModelPolicy |
_selectedPolicyFromList
|
static java.lang.String |
DOMAIN_DESC
|
static int |
LOG_LEVEL
|
static java.awt.Color |
ONTOLOGY_TABS_COLOR
|
static int |
POLICY_TABLE_COLUMN_ATTRIBS
|
static int |
POLICY_TABLE_COLUMN_HARMONIZED
|
static int |
POLICY_TABLE_COLUMN_INFORCE
|
static int |
POLICY_TABLE_COLUMN_LEVEL
|
static int |
POLICY_TABLE_COLUMN_POLICY
|
static java.awt.Color |
POLICY_TABS_COLOR
|
static java.lang.String |
SUBDOMAINS
|
static java.lang.String |
SYMBOL_POLICY_SOURCE
|
static java.lang.String |
SYMBOL_POLICY_SOURCE_KPAT
|
static java.awt.Color |
TREE_VIEW_TABS_COLOR
|
Fields inherited from class javax.swing.JApplet |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
KPATApplet()
|
Method Summary | |
---|---|
void |
clearPolicyTarget()
|
static java.lang.String |
condPolVectToString(java.util.Vector v)
ConditionalPolicy doesn't have a toString :/ so here's a util method to do so |
static java.util.Vector |
convertModelPolicySetVector(java.util.Vector modelPolicySets)
converts a vector of model policy sets to a vector of policy set msgs |
SortableTreeNode |
createTreeForDomain(ModelDomain modelDomain)
Update the domain tree display. |
void |
doRefresh()
Called by the RMI proxy, to cause GUI to refresh. |
static void |
expandTreeNodes(javax.swing.JTree jt,
javax.swing.tree.TreeNode startNode)
Recursively expand the given node, and all its children. |
static java.util.Hashtable |
getAgentPropsForDisplay(KAoSAgentDescription desc)
|
ModelPolicy |
getCurrentNodeSelected()
Returns the current selected node in the policy list. |
java.lang.String |
getCurrentServletURL()
Returns the current URL used to connect to the servlet |
java.util.List |
getGuardList()
|
boolean |
getIsDirty()
|
ModelPolicyList |
getPolicyListModel()
|
void |
handleBBNDialog(java.lang.String selection)
|
void |
init()
Initialize the Applet. |
static java.lang.String |
listOfStringsToString(java.util.List list)
Converts a list of strings to a string with the ids separated by commas |
static java.util.Vector |
modelPolicyListToVectorOfMsgs(ModelPolicyList mpl)
Converts a model policy list to a vector of PolicyMsgs |
void |
notifyUser(java.lang.String message)
Used by KPATRMI to display a message. |
protected java.lang.String |
parseString(java.lang.String name)
Parse the string to get the short name after the hash # symbol |
void |
policyTableUpdate()
Update the JTable of polices for the currently selected node. |
void |
policyTableUpdate(SortableTreeNode node)
Update the JTable of polices for the node. |
void |
setArgs(java.lang.String[] args)
|
void |
setIsDirty(boolean isDirty)
Public method to toggle our dirty/clean state; (which affects whether the "Commit" and "Discard" buttons should be enabled) |
void |
setIsDirty(boolean isDirty,
int whatsDirty)
Version of setIsDirty for conditional policies sulcate |
void |
showDeferredMessages()
|
void |
showPolicy(java.lang.String policyId)
implements CheckPermissionPanel.PolicyViewer |
void |
startConnectionToDS()
Start a new connection to a servlet |
void |
treeViewHostCreate()
Create the intitial Host-centric tree view. |
void |
treeViewHostUpdate(ModelHost host_rootNode)
Update the Host tree. |
static void |
treeViewSetStandardOptions(javax.swing.JTree jt)
For stuff that's the same for the two tree views. |
void |
updateGeneralInfoFields(iModelObject o)
Update the 'General Info' area (not the policy table) according to selected object. |
protected void |
updateGuardList()
|
void |
updatePolicyPane(SortableTreeNode node)
Update the policy pane with info for the specified object. |
Methods inherited from class javax.swing.JApplet |
---|
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.applet.Applet |
---|
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
Methods inherited from class java.awt.Panel |
---|
addNotify |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Color TREE_VIEW_TABS_COLOR
public static final java.awt.Color POLICY_TABS_COLOR
public static final java.awt.Color ONTOLOGY_TABS_COLOR
public static final int LOG_LEVEL
public static final int POLICY_TABLE_COLUMN_POLICY
public static final int POLICY_TABLE_COLUMN_LEVEL
public static final int POLICY_TABLE_COLUMN_INFORCE
public static final int POLICY_TABLE_COLUMN_ATTRIBS
public static final int POLICY_TABLE_COLUMN_HARMONIZED
public static final java.lang.String SYMBOL_POLICY_SOURCE
public static final java.lang.String SYMBOL_POLICY_SOURCE_KPAT
public static final java.lang.String SUBDOMAINS
public static final java.lang.String DOMAIN_DESC
protected boolean _isConflictingPolicy
protected java.util.List _redundantPolicies
protected boolean _isPolRedundant
protected ModelPolicy _selectedPolicyFromList
protected static java.lang.String _policyPath
protected static java.lang.String _policySetPath
protected static java.lang.String _configPath
protected static boolean _doCommitNoDialog
protected boolean _policyListSelected
protected boolean _isDSActive
Constructor Detail |
---|
public KPATApplet()
Method Detail |
---|
public void setArgs(java.lang.String[] args)
public void showDeferredMessages()
public void init()
Connect to the tunneling client, and build the GUI.
{sulcate} Command-line args are {"CoAX" | "UltraLog"} First arg must be one of these two literals; {servletURL} 2nd arg is URL of tunnel servlet (for CoAX) or PSP_PolicyAdministrator (for UltraLog); {DMRMIName} The RMI name the Domain Manager is bound to (we will send this to the servlet so it can talk to DM); [{KPATBindName}] Only used for CoAX, the name KPAT will bind its KPATRMI object to. Note that getting args from applet params is all hosed up, which is OK, cuz we can't run as an applet anyway, can we?
init
in class java.applet.Applet
public java.lang.String getCurrentServletURL()
public SortableTreeNode createTreeForDomain(ModelDomain modelDomain)
public void startConnectionToDS()
protected void updateGuardList()
public java.util.List getGuardList()
public static java.util.Vector modelPolicyListToVectorOfMsgs(ModelPolicyList mpl)
public static java.util.Vector convertModelPolicySetVector(java.util.Vector modelPolicySets)
public static java.lang.String condPolVectToString(java.util.Vector v)
public void doRefresh()
public ModelPolicy getCurrentNodeSelected()
public ModelPolicyList getPolicyListModel()
public void treeViewHostCreate()
public void treeViewHostUpdate(ModelHost host_rootNode)
See comments for treeViewDomainUpdate.
public static void treeViewSetStandardOptions(javax.swing.JTree jt)
public static void expandTreeNodes(javax.swing.JTree jt, javax.swing.tree.TreeNode startNode)
public void updatePolicyPane(SortableTreeNode node)
o
- Specified objectnode
- The corresponding tree node of object opublic void updateGeneralInfoFields(iModelObject o)
public static java.util.Hashtable getAgentPropsForDisplay(KAoSAgentDescription desc)
protected java.lang.String parseString(java.lang.String name)
public static java.lang.String listOfStringsToString(java.util.List list)
public void policyTableUpdate()
public void policyTableUpdate(SortableTreeNode node)
public void setIsDirty(boolean isDirty)
public boolean getIsDirty()
public void setIsDirty(boolean isDirty, int whatsDirty)
public void notifyUser(java.lang.String message) throws java.rmi.RemoteException
java.rmi.RemoteException
public void clearPolicyTarget()
public void handleBBNDialog(java.lang.String selection)
public void showPolicy(java.lang.String policyId)
showPolicy
in interface CheckPermissionPanel.PolicyViewer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |