wt.clients.administrator
Class PermissionPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bywt.clients.administrator.PermissionPanel
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class PermissionPanel
extends JPanel

PermissionPanel is an extensible permission selection component. Its purpose is to display AccessPermissions and allow a user to define the granted/not-granted permissions in an Ad Hoc access control rule or define the permissions that are granted/denied/not-defined in Policy access control rules.

Supported API: false

Extendable: false

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private static int ADHOC_ENTRY_COLUMN
           
private static int ALL_ROW
           
private  Vector disabledAndSelected
           
private  ArrayList enabledList
           
private static String IMPLIED_PERMISSIONS
           
private static Hashtable impliedPermissionsTable
           
private  boolean isAdHoc
           
private static boolean isWindowsSystem
           
private static ArrayList permissionList
           
private  DefaultTableModel permissionModel
           
private  JTable permissionTable
           
private static int POLICY_DENY_COLUMN
           
private static int POLICY_ENTRY_COLUMN
           
private static int POLICY_GRANT_COLUMN
           
private static int POLICY_LABEL_COLUMN
           
private static int POLICY_NONE_COLUMN
           
private static ResourceBundle RB
           
private static String RESOURCE
           
private  JScrollPane scrollPermit
           
private  DefaultCellEditor tabEdit
           
private  DefaultTableCellRenderer tabRender
           
 
Fields inherited from class javax.swing.JPanel
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
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
PermissionPanel(boolean isAdHoc)
          Constructor for this component
 
Method Summary
 void addMouseListener(MouseListener l)
          Adds a MouseListener to this component
 void clearPermissions()
          Clears the all selections from the table

Supported API:false
 void disableAdHocPermission(AccessPermission permission, boolean grant)
          Disables the specified Ad Hoc Permission in the Permission Table
 void disablePolicyPermission(AccessPermission permission)
          Disables the specified Policy Permission in the Permission Table
 void enablePolicyPermission(AccessPermission permission)
          Enables the specified Policy Permission in the Permission Table
 Vector getAdHocPermissions()
          Returns a Vector of AccessPermission objects for granted Ad Hoc permissions.
 void getPolicyPermissions(Vector posPermissions, Vector negPermissions)
          Returns the granted and denied Policy permissions from the Permission Table in posPermissions and negPermissions.
private  void initialize_controls()
          Creates and populates the display table with PermissionEntries also sets the renderers and the components behavior based on mode.
 void setAdHocPermissions(Vector permissionVector)
          Sets the permission signs on the Permission Table for Ad Hoc mode
 void setEnabled(boolean enabled)
          Disables/Enables the PermissionPanel component
 void setPolicyPermissions(Vector posPermissions, Vector negPermissions)
          Sets the permission signs on the Permission Table for Policy mode
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, 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

isAdHoc

private boolean isAdHoc

isWindowsSystem

private static boolean isWindowsSystem

permissionList

private static ArrayList permissionList

enabledList

private ArrayList enabledList

disabledAndSelected

private Vector disabledAndSelected

ADHOC_ENTRY_COLUMN

private static final int ADHOC_ENTRY_COLUMN
See Also:
Constant Field Values

POLICY_LABEL_COLUMN

private static final int POLICY_LABEL_COLUMN
See Also:
Constant Field Values

POLICY_GRANT_COLUMN

private static final int POLICY_GRANT_COLUMN
See Also:
Constant Field Values

POLICY_DENY_COLUMN

private static final int POLICY_DENY_COLUMN
See Also:
Constant Field Values

POLICY_NONE_COLUMN

private static final int POLICY_NONE_COLUMN
See Also:
Constant Field Values

POLICY_ENTRY_COLUMN

private static final int POLICY_ENTRY_COLUMN
See Also:
Constant Field Values

ALL_ROW

private static int ALL_ROW

RB

private static ResourceBundle RB

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

IMPLIED_PERMISSIONS

private static final String IMPLIED_PERMISSIONS
See Also:
Constant Field Values

impliedPermissionsTable

private static Hashtable impliedPermissionsTable

permissionTable

private JTable permissionTable

tabEdit

private DefaultCellEditor tabEdit

tabRender

private DefaultTableCellRenderer tabRender

scrollPermit

private JScrollPane scrollPermit

permissionModel

private DefaultTableModel permissionModel
Constructor Detail

PermissionPanel

public PermissionPanel(boolean isAdHoc)
Constructor for this component

Parameters:
isAdHoc - if the component is to be used for Ad Hoc permissions set to true otherwise set to false

Supported API:false
Method Detail

initialize_controls

private void initialize_controls()
Creates and populates the display table with PermissionEntries also sets the renderers and the components behavior based on mode.

Supported API:false


addMouseListener

public void addMouseListener(MouseListener l)
Adds a MouseListener to this component

Parameters:
l -

Supported API:false

setEnabled

public void setEnabled(boolean enabled)
Disables/Enables the PermissionPanel component

Parameters:
enabled - true if it is to be enabled, false if it is to be disabled

Supported API:false

getAdHocPermissions

public Vector getAdHocPermissions()
Returns a Vector of AccessPermission objects for granted Ad Hoc permissions.

Returns:
Vector

Supported API:false

setAdHocPermissions

public void setAdHocPermissions(Vector permissionVector)
Sets the permission signs on the Permission Table for Ad Hoc mode

Parameters:
permissionVector - a Vector of AccessPermissions that the rule grants

Supported API:false

getPolicyPermissions

public void getPolicyPermissions(Vector posPermissions,
                                 Vector negPermissions)
Returns the granted and denied Policy permissions from the Permission Table in posPermissions and negPermissions.

Parameters:
posPermissions - a Vector of AccessPermissions that the rule explicitly grants
negPermissions - a Vector of AccessPermissions that the rule explicitly denies

Supported API:false

setPolicyPermissions

public void setPolicyPermissions(Vector posPermissions,
                                 Vector negPermissions)
Sets the permission signs on the Permission Table for Policy mode

Parameters:
posPermissions - a Vector of AccessPermissions that the rule explicitly grants
negPermissions - a Vector of AccessPermissions that the rule explicitly denies

Supported API:false

disableAdHocPermission

public void disableAdHocPermission(AccessPermission permission,
                                   boolean grant)
Disables the specified Ad Hoc Permission in the Permission Table

Parameters:
permission - The permission to be disabled
grant - true to grant permission, otherwise false

Supported API:false

disablePolicyPermission

public void disablePolicyPermission(AccessPermission permission)
Disables the specified Policy Permission in the Permission Table

Parameters:
permission - The permission to be disabled

Supported API:false

enablePolicyPermission

public void enablePolicyPermission(AccessPermission permission)
Enables the specified Policy Permission in the Permission Table

Parameters:
permission - The permission to be enabled

Supported API:false

clearPermissions

public void clearPermissions()
Clears the all selections from the table

Supported API:false