kaos.kpat.applet
Class GuardManagerBuilder

java.lang.Object
  extended by kaos.kpat.applet.GuardManagerBuilder

public class GuardManagerBuilder
extends java.lang.Object

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


Nested Class Summary
 class GuardManagerBuilder.EventTableCellRenderer
          Table Cell Renderer for displaying a short name and tip text for each result.
 class GuardManagerBuilder.TableRepSelectionHandler
           
 
Field Summary
protected  javax.swing.JComboBox _actionComboBox
           
protected  javax.swing.JList _actionList
           
protected  javax.swing.DefaultListModel _actionListModel
           
protected  javax.swing.DefaultComboBoxModel _actionModel
           
protected  java.lang.String _actionStr
           
protected  javax.swing.JList _actorClassList
           
protected  javax.swing.DefaultListModel _actorClassListModel
           
protected  javax.swing.JComboBox _actorComboBox
           
protected  javax.swing.JList _actorInstList
           
protected  javax.swing.DefaultListModel _actorInstListModel
           
protected  javax.swing.DefaultComboBoxModel _actorModel
           
protected  java.lang.String _actorStr
           
protected  javax.swing.JButton _addButton
           
protected static java.lang.String _configPath
           
protected  javax.swing.JTable _configTable
           
protected  kaos.kpat.applet.GuardManagerBuilder.ConfigTableModel _confTableModel
           
protected  SortableTreeNode _currentNode
           
protected  javax.swing.JButton _editButton
           
protected  javax.swing.JTextField _endField
           
protected  java.util.Vector _eventListVector
           
protected  javax.swing.JTable _eventTable
           
protected  javax.swing.JPanel _guardConfPanel
           
protected  java.util.Hashtable _guardDescriptionTable
           
protected  javax.swing.JLabel _guardExEnTextLabel
           
protected  java.lang.String _guardId
           
protected  javax.swing.JLabel _guardIdTextLabel
           
protected  javax.swing.JLabel _guardNameTextLabel
           
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.applet.GuardManagerBuilder.LoggerTableModel _model
           
protected  ModelPolicyList _modelPolicyList
           
protected  javax.swing.JButton _policyButton
           
protected  java.lang.String _policyId
           
protected  java.util.Vector _policyListVector
           
protected  java.util.Vector _policySelectionVector
           
protected  kaos.kpat.applet.GuardManagerBuilder.SubjectButton _refreshButton
           
protected  java.lang.String _refreshCacheStr
           
protected  javax.swing.JButton _removeButton
           
protected  javax.swing.JButton _removeRepButton
           
protected  javax.swing.JList _repList
           
protected  javax.swing.DefaultListModel _repListModel
           
protected  kaos.kpat.applet.GuardManagerBuilder.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.JButton _saveButton
           
protected  javax.swing.JTextField _startField
           
protected  javax.swing.JPopupMenu _subjectMenu
           
protected  java.util.Vector _tableVector
           
protected  javax.swing.JTabbedPane _tabPane
           
protected  java.lang.String _timeStr
           
protected  javax.swing.tree.DefaultTreeModel _treeModel
           
 
Constructor Summary
GuardManagerBuilder(TunnelClient tunnelClient, javax.swing.tree.DefaultTreeModel domainTreeModel)
           
 
Method Summary
protected  void buildGuardConfPanel()
           
protected  void buildLoggerPanel()
           
protected  void buildRepositoryPanel()
           
protected  void clearTable()
          Remove elements from a table
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()
           
protected  void getGuardAllLogs(java.util.Vector logsVector)
          Get all logs related to this guard Id and return a vector.
 javax.swing.JPanel getGuardRightPanel()
           
 javax.swing.JPanel getGuardTab()
           
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.
protected  java.lang.String parseTime(java.lang.String timeStr)
          Parse the time string to get the time in miliseconds.
protected  void saveSnapshotToFile(GuardState gs)
           
protected  void setListModels(DefaultKAoSGuardDescription dkd)
           
 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

_actionListModel

protected javax.swing.DefaultListModel _actionListModel

_actorClassListModel

protected javax.swing.DefaultListModel _actorClassListModel

_actorInstListModel

protected javax.swing.DefaultListModel _actorInstListModel

_repListModel

protected javax.swing.DefaultListModel _repListModel

_confTableModel

protected kaos.kpat.applet.GuardManagerBuilder.ConfigTableModel _confTableModel

_model

protected kaos.kpat.applet.GuardManagerBuilder.LoggerTableModel _model

_treeModel

protected javax.swing.tree.DefaultTreeModel _treeModel

_addButton

protected javax.swing.JButton _addButton

_editButton

protected javax.swing.JButton _editButton

_policyButton

protected javax.swing.JButton _policyButton

_removeButton

protected javax.swing.JButton _removeButton

_removeRepButton

protected javax.swing.JButton _removeRepButton

_saveButton

protected javax.swing.JButton _saveButton

_logCheckBox

protected javax.swing.JCheckBox _logCheckBox

_actionComboBox

protected javax.swing.JComboBox _actionComboBox

_actorComboBox

protected javax.swing.JComboBox _actorComboBox

_guardConfPanel

protected javax.swing.JPanel _guardConfPanel

_guardRightPanel

protected javax.swing.JPanel _guardRightPanel

_guardTab

protected javax.swing.JPanel _guardTab

_loggerPanel

protected javax.swing.JPanel _loggerPanel

_repositoryPanel

protected javax.swing.JPanel _repositoryPanel

_guardNameTextLabel

protected javax.swing.JLabel _guardNameTextLabel

_guardIdTextLabel

protected javax.swing.JLabel _guardIdTextLabel

_guardExEnTextLabel

protected javax.swing.JLabel _guardExEnTextLabel

_actionList

protected javax.swing.JList _actionList

_actorClassList

protected javax.swing.JList _actorClassList

_actorInstList

protected javax.swing.JList _actorInstList

_repList

protected javax.swing.JList _repList

_subjectMenu

protected javax.swing.JPopupMenu _subjectMenu

_tabPane

protected javax.swing.JTabbedPane _tabPane

_configTable

protected javax.swing.JTable _configTable

_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.applet.GuardManagerBuilder.RepositoryTableModel _repModel

_currentNode

protected SortableTreeNode _currentNode

_refreshButton

protected kaos.kpat.applet.GuardManagerBuilder.SubjectButton _refreshButton

_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

_configPath

protected static java.lang.String _configPath
Constructor Detail

GuardManagerBuilder

public GuardManagerBuilder(TunnelClient tunnelClient,
                           javax.swing.tree.DefaultTreeModel domainTreeModel)
Method Detail

createGui

protected void createGui()

createTreeForGuard

protected SortableTreeNode createTreeForGuard(ModelDomain modelDomain)

updateTree

public void updateTree(ModelDomain modelDomain)

buildGuardConfPanel

protected void buildGuardConfPanel()

buildLoggerPanel

protected void buildLoggerPanel()

getPolicyActions

protected void getPolicyActions()

getActorsList

protected void getActorsList()

saveSnapshotToFile

protected void saveSnapshotToFile(GuardState gs)

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()

getRefreshCacheOptions

protected java.util.Vector getRefreshCacheOptions()

setListModels

protected void setListModels(DefaultKAoSGuardDescription dkd)

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.


getShortName

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


getGuardAllLogs

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


updateGuardTab

public void updateGuardTab()
Update the Guard Tab.


clearTable

protected void clearTable()
Remove elements from a table