kaos.kpat.tabs
Class GuardManagerTab

java.lang.Object
  extended by kaos.kpat.tabs.GuardManagerTab
All Implemented Interfaces:
DomainListener, PolicyListener, RefreshListener, TabPanel

public class GuardManagerTab
extends java.lang.Object
implements TabPanel, DomainListener, RefreshListener, PolicyListener

The GuardManagerTab helps to build the components of the Guard Tab in KPAT.


Nested Class Summary
 class GuardManagerTab.EventTableCellRenderer
          Table Cell Renderer for displaying a short name and tip text for each result.
 class GuardManagerTab.TableRepSelectionHandler
           
 
Field Summary
protected  javax.swing.JComboBox _actionComboBox
           
protected  javax.swing.DefaultComboBoxModel _actionModel
           
protected  java.lang.String _actionStr
           
protected  javax.swing.JComboBox _actorComboBox
           
protected  javax.swing.DefaultComboBoxModel _actorModel
           
protected  java.lang.String _actorStr
           
protected static java.lang.String _configPath
           
protected  SortableTreeNode _currentNode
           
protected  javax.swing.JTextField _endField
           
protected  java.util.Vector _eventListVector
           
protected  javax.swing.JTable _eventTable
           
protected  GuardConfigurationTab _guardConfPanel
           
protected  java.util.Hashtable _guardDescriptionTable
           
protected  java.lang.String _guardId
           
protected  javax.swing.JPanel _guardRightPanel
           
protected  javax.swing.JPanel _guardTab
           
protected  javax.swing.JTree _guardTree
           
protected  javax.swing.JCheckBox _logCheckBox
           
protected  javax.swing.JPanel _loggerPanel
           
protected  java.util.Hashtable _loggerURLTable
           
protected  kaos.kpat.tabs.GuardManagerTab.LoggerTableModel _model
           
protected  ModelPolicyList _modelPolicyList
           
protected  java.lang.String _policyId
           
protected  java.util.Vector _policyListVector
           
protected  java.util.Vector _policySelectionVector
           
protected  java.lang.String _refreshCacheStr
           
protected  javax.swing.JButton _removeRepButton
           
protected  javax.swing.JList _repList
           
protected  javax.swing.DefaultListModel _repListModel
           
protected  kaos.kpat.tabs.GuardManagerTab.RepositoryTableModel _repModel
           
protected  javax.swing.JPanel _repositoryPanel
           
protected  java.util.Vector _repositoryVector
           
protected  javax.swing.JTable _repTable
           
protected  java.util.Hashtable _repTableInfo
           
protected  javax.swing.JSplitPane _splitPane
           
protected  javax.swing.JTextField _startField
           
protected  java.util.Vector _tableVector
           
protected  javax.swing.JTabbedPane _tabPane
           
protected  java.lang.String _timeStr
           
protected  javax.swing.tree.DefaultTreeModel _treeModel
           
 
Constructor Summary
GuardManagerTab()
           
 
Method Summary
protected  void buildLoggerPanel()
           
protected  void buildRepositoryPanel()
           
protected  void createGui()
           
protected  SortableTreeNode createTreeForGuard(ModelDomain modelDomain)
           
 java.lang.String formatDate(long timeStamp)
          Covert a timestamp (TimeMillis) in a formatted string with the following schema: MM/dd/yy HH:mm:ss (NOMADS team)
protected  void getActorsList()
           
 java.awt.Component getDisplayComponent()
           
 java.util.Hashtable getGuardDescriptionTable()
           
 java.lang.String getGuardId()
           
 javax.swing.JPanel getGuardRightPanel()
           
 javax.swing.JPanel getGuardTab()
           
 java.lang.String getName()
           
protected  void getPolicyActions()
           
protected  java.util.Vector getRefreshCacheOptions()
           
protected  java.util.Vector getRepositoryInfo(java.lang.String repType)
           
protected  java.lang.String getShortName(java.lang.String name)
          Parse the url to display only the name after the # symbol.
 TunnelClient getTunnelClient()
           
 void initialize(KPATApplet applet, TunnelClient tunnelClient)
           
 void modelObjectAdded(ModelObject modelObj)
           
 void modelObjectChanged(ModelObject modelObj)
           
 void modelObjectRemoved(ModelObject modelObj)
           
 void modelRefreshed(ModelDomainList rootDomains)
           
protected  java.lang.String parseTime(java.lang.String timeStr)
          Parse the time string to get the time in miliseconds.
 void policiesRefreshed(ModelPolicyList allPolicies)
           
 void policyAdded(ModelPolicy policy)
           
 void policyChanged(ModelPolicy policy)
           
 void policyRemoved(ModelPolicy policy)
           
 void refreshOccurred()
           
protected  void updateDisplayOfPolicyDecisionLogs(java.util.Vector logsVector)
          Get all logs related to this guard Id and return a vector.
 void updateGuardTab()
          Update the Guard Tab.
 void updateTree(ModelDomain modelDomain)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_guardDescriptionTable

protected java.util.Hashtable _guardDescriptionTable

_loggerURLTable

protected java.util.Hashtable _loggerURLTable

_repTableInfo

protected java.util.Hashtable _repTableInfo

_actionModel

protected javax.swing.DefaultComboBoxModel _actionModel

_actorModel

protected javax.swing.DefaultComboBoxModel _actorModel

_repListModel

protected javax.swing.DefaultListModel _repListModel

_guardConfPanel

protected GuardConfigurationTab _guardConfPanel

_model

protected kaos.kpat.tabs.GuardManagerTab.LoggerTableModel _model

_treeModel

protected javax.swing.tree.DefaultTreeModel _treeModel

_removeRepButton

protected javax.swing.JButton _removeRepButton

_logCheckBox

protected javax.swing.JCheckBox _logCheckBox

_actionComboBox

protected javax.swing.JComboBox _actionComboBox

_actorComboBox

protected javax.swing.JComboBox _actorComboBox

_guardRightPanel

protected javax.swing.JPanel _guardRightPanel

_guardTab

protected javax.swing.JPanel _guardTab

_loggerPanel

protected javax.swing.JPanel _loggerPanel

_repositoryPanel

protected javax.swing.JPanel _repositoryPanel

_repList

protected javax.swing.JList _repList

_tabPane

protected javax.swing.JTabbedPane _tabPane

_eventTable

protected javax.swing.JTable _eventTable

_repTable

protected javax.swing.JTable _repTable

_startField

protected javax.swing.JTextField _startField

_endField

protected javax.swing.JTextField _endField

_guardTree

protected javax.swing.JTree _guardTree

_modelPolicyList

protected ModelPolicyList _modelPolicyList

_repModel

protected kaos.kpat.tabs.GuardManagerTab.RepositoryTableModel _repModel

_currentNode

protected SortableTreeNode _currentNode

_actionStr

protected java.lang.String _actionStr

_actorStr

protected java.lang.String _actorStr

_guardId

protected java.lang.String _guardId

_policyId

protected java.lang.String _policyId

_refreshCacheStr

protected java.lang.String _refreshCacheStr

_timeStr

protected java.lang.String _timeStr

_eventListVector

protected java.util.Vector _eventListVector

_policyListVector

protected java.util.Vector _policyListVector

_policySelectionVector

protected java.util.Vector _policySelectionVector

_repositoryVector

protected java.util.Vector _repositoryVector

_tableVector

protected java.util.Vector _tableVector

_splitPane

protected javax.swing.JSplitPane _splitPane

_configPath

protected static java.lang.String _configPath
Constructor Detail

GuardManagerTab

public GuardManagerTab()
Method Detail

getDisplayComponent

public java.awt.Component getDisplayComponent()
Specified by:
getDisplayComponent in interface TabPanel

getName

public java.lang.String getName()
Specified by:
getName in interface TabPanel

initialize

public void initialize(KPATApplet applet,
                       TunnelClient tunnelClient)
Specified by:
initialize in interface TabPanel

getTunnelClient

public TunnelClient getTunnelClient()

createGui

protected void createGui()

createTreeForGuard

protected SortableTreeNode createTreeForGuard(ModelDomain modelDomain)

updateTree

public void updateTree(ModelDomain modelDomain)

getGuardId

public java.lang.String getGuardId()

getGuardDescriptionTable

public java.util.Hashtable getGuardDescriptionTable()

buildLoggerPanel

protected void buildLoggerPanel()

getPolicyActions

protected void getPolicyActions()

getActorsList

protected void getActorsList()

buildRepositoryPanel

protected void buildRepositoryPanel()

getRepositoryInfo

protected java.util.Vector getRepositoryInfo(java.lang.String repType)

getGuardTab

public javax.swing.JPanel getGuardTab()

getGuardRightPanel

public javax.swing.JPanel getGuardRightPanel()

updateGuardTab

public void updateGuardTab()
Update the Guard Tab.


getRefreshCacheOptions

protected java.util.Vector getRefreshCacheOptions()

formatDate

public java.lang.String formatDate(long timeStamp)
Covert a timestamp (TimeMillis) in a formatted string with the following schema: MM/dd/yy HH:mm:ss (NOMADS team)

Parameters:
timeStamp -
Returns:
formattedString

parseTime

protected java.lang.String parseTime(java.lang.String timeStr)
Parse the time string to get the time in miliseconds.

Returns:
String time

updateDisplayOfPolicyDecisionLogs

protected void updateDisplayOfPolicyDecisionLogs(java.util.Vector logsVector)
Get all logs related to this guard Id and return a vector.


getShortName

protected java.lang.String getShortName(java.lang.String name)
Parse the url to display only the name after the # symbol.


refreshOccurred

public void refreshOccurred()
Specified by:
refreshOccurred in interface RefreshListener

modelObjectAdded

public void modelObjectAdded(ModelObject modelObj)
Specified by:
modelObjectAdded in interface DomainListener

modelObjectChanged

public void modelObjectChanged(ModelObject modelObj)
Specified by:
modelObjectChanged in interface DomainListener

modelObjectRemoved

public void modelObjectRemoved(ModelObject modelObj)
Specified by:
modelObjectRemoved in interface DomainListener

modelRefreshed

public void modelRefreshed(ModelDomainList rootDomains)
Specified by:
modelRefreshed in interface DomainListener

policyAdded

public void policyAdded(ModelPolicy policy)
Specified by:
policyAdded in interface PolicyListener

policyChanged

public void policyChanged(ModelPolicy policy)
Specified by:
policyChanged in interface PolicyListener

policyRemoved

public void policyRemoved(ModelPolicy policy)
Specified by:
policyRemoved in interface PolicyListener

policiesRefreshed

public void policiesRefreshed(ModelPolicyList allPolicies)
Specified by:
policiesRefreshed in interface PolicyListener