se.entra.phantom.server.rconsole
Class AdminConfigWebServer

java.lang.Object
  extended by se.entra.phantom.server.VirtualPanelAdapter
      extended by se.entra.phantom.server.VirtualComponentAdapter
          extended by se.entra.phantom.server.rconsole.AdminConfigWebServer
All Implemented Interfaces:
SelectionInterface, VirtualComponentListener, VirtualPanelListener

public class AdminConfigWebServer
extends VirtualComponentAdapter
implements SelectionInterface

Handles a user definition.


Field Summary
static String NOACCESS
          The text for no access.
 
Fields inherited from interface se.entra.phantom.server.VirtualPanelListener
ICON_CRITICAL, ICON_INFORMATION, ICON_NOICON, ICON_QUERY, ICON_QUESTION, ICON_WARNING, MB_ABORTRETRYIGNORE, MB_CANCEL, MB_ENTER, MB_ENTERCANCEL, MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_YESNO, MB_YESNOCANCEL, MBID_CANCEL, MBID_DEFAULT, MBID_ENTER, MBID_IGNORE, MBID_NO, MBID_OK, MBID_RETRY, MBID_YES
 
Constructor Summary
AdminConfigWebServer()
          Starts editing the dialog box.
AdminConfigWebServer(VirtualPanel vp)
          Starts editing the dialog box.
 
Method Summary
 boolean applySelection(String path, VirtualControl control)
          Applies the selection chosen (using the browse buttons) for directory/filename.
static AdminConfigProtection getAccessControl(String id)
          Gets an access control (protection) definition from an ID.
static Enumeration<String> getAccessControlIDs()
          Gets an the list of available access control IDs (protections) as a String enumeration.
static AdminConfigResource getCGIResource(String name)
          Gets a CGI resource from a name.
static Vector<String> getClientCertAccessControlNames()
          Gets a list of all the access control names (vector of strings in lower case) used to load the client certificates by SSL.
static AdminConfigResource getFileOrCGIResource(String name)
          Gets a file or CGI resource from a name (file before CGI).
static AdminConfigResource getFileResource(String name)
          Gets a file resource from a name.
static AdminConfigResource getResource(String name)
          Gets the resource from a name.
static Enumeration<AdminConfigResource> getResources()
          Gets all the resources.
static Vector<String> getRevokedCertAccessControlNames()
          Gets a list of all the access control names (vector of strings in lower case) used to load the revoked certificates by SSL.
 boolean isSelectionValid(String path, VirtualControl control, VirtualPanel vpChooser)
          Checks if a selection for a directory/filename is valid (for the browse buttons).
static void loadResources(boolean isCaseSensitive)
          Loads the resources from the 'resources.ini' file.
 void onAction(VirtualPanel vp, String controlID)
          Push buttons and menu items generates this event when selected.
 void onCheckedChange(VirtualPanel vp, VirtualControl control, String controlID, int state)
          Check boxes and radio buttons generates this event when state is changed on the client side.
 void onContentChanged(VirtualPanel vp, VirtualControl control, String controlID, String text, int line)
          Combination boxes and spin buttons generates this message.
 boolean onPanelClosing(VirtualPanel vp)
          Called when the close button of a panel is pressed, but before any other processing has been done.
 void onPanelCreate(VirtualPanel vp)
          Starts editing the dialog box.
 void onSelectionChanged(VirtualPanel vp, VirtualCListBox list, String controlID, int line, int column)
          List boxes generates this message.
 void performWebServerRestart(VirtualPanel vp)
          Restarts the web server.
 String retreiveSelection(VirtualControl control)
          Gets the selection of a directory/filename for the browse buttons.
 
Methods inherited from class se.entra.phantom.server.VirtualComponentAdapter
onAction, onAction, onContentChanged, onControlEvent, onFocusGained, onFocusLost, onMenuAction, onPropertyChange
 
Methods inherited from class se.entra.phantom.server.VirtualPanelAdapter
onModalPanelCreate, onModalPanelProcessing, onPageActivated, onPanelClose, onPanelDestroy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface se.entra.phantom.server.VirtualPanelListener
onPageActivated, onPanelClose, onPanelDestroy
 

Field Detail

NOACCESS

public static final String NOACCESS
The text for no access.

See Also:
Constant Field Values
Constructor Detail

AdminConfigWebServer

public AdminConfigWebServer()
Starts editing the dialog box.


AdminConfigWebServer

public AdminConfigWebServer(VirtualPanel vp)
Starts editing the dialog box.

Method Detail

loadResources

public static void loadResources(boolean isCaseSensitive)
                          throws IOException
Loads the resources from the 'resources.ini' file.

Throws:
IOException - when an error occurs.

getClientCertAccessControlNames

public static Vector<String> getClientCertAccessControlNames()
Gets a list of all the access control names (vector of strings in lower case) used to load the client certificates by SSL.


getRevokedCertAccessControlNames

public static Vector<String> getRevokedCertAccessControlNames()
Gets a list of all the access control names (vector of strings in lower case) used to load the revoked certificates by SSL.


getResources

public static Enumeration<AdminConfigResource> getResources()
Gets all the resources. The resources are AdminConfigResource objects.


getResource

public static AdminConfigResource getResource(String name)
Gets the resource from a name. The name is checked case insentively if the file system is case insensitive.

Returns:
null if not found.

getFileResource

public static AdminConfigResource getFileResource(String name)
Gets a file resource from a name. The name is checked case insentively if the file system is case insensitive.

Returns:
null if not found.

getFileOrCGIResource

public static AdminConfigResource getFileOrCGIResource(String name)
Gets a file or CGI resource from a name (file before CGI). The name is checked case insentively if the file system is case insensitive.

Returns:
null if not found.

getCGIResource

public static AdminConfigResource getCGIResource(String name)
Gets a CGI resource from a name. The name is checked case insentively if the file system is case insensitive.

Returns:
null if not found.

onPanelCreate

public void onPanelCreate(VirtualPanel vp)
Starts editing the dialog box.

Specified by:
onPanelCreate in interface VirtualPanelListener
Overrides:
onPanelCreate in class VirtualPanelAdapter

onContentChanged

public void onContentChanged(VirtualPanel vp,
                             VirtualControl control,
                             String controlID,
                             String text,
                             int line)
Combination boxes and spin buttons generates this message. The line parameter is set to -1 if no line is selected.

Specified by:
onContentChanged in interface VirtualComponentListener
Overrides:
onContentChanged in class VirtualComponentAdapter

onSelectionChanged

public void onSelectionChanged(VirtualPanel vp,
                               VirtualCListBox list,
                               String controlID,
                               int line,
                               int column)
List boxes generates this message. The line and column parameter are individually set to -1 if no line or column is selected respectively.

Specified by:
onSelectionChanged in interface VirtualComponentListener
Overrides:
onSelectionChanged in class VirtualComponentAdapter

onPanelClosing

public boolean onPanelClosing(VirtualPanel vp)
Called when the close button of a panel is pressed, but before any other processing has been done. If this function returns false, the application close object will be called (if defined), otherwise a faked keypress of the Escape key is performed. If these two actions failed (because there is no close object or no button or menu item is connected to the Escape key), then the function onPanelClose is called.

Specified by:
onPanelClosing in interface VirtualPanelListener
Overrides:
onPanelClosing in class VirtualPanelAdapter
Returns:
true to cancel all default processing.
See Also:
VirtualPanelAdapter.onPanelClose(se.entra.phantom.server.VirtualPanel)

performWebServerRestart

public void performWebServerRestart(VirtualPanel vp)
Restarts the web server.


onAction

public void onAction(VirtualPanel vp,
                     String controlID)
Push buttons and menu items generates this event when selected.

Overrides:
onAction in class VirtualComponentAdapter

onCheckedChange

public void onCheckedChange(VirtualPanel vp,
                            VirtualControl control,
                            String controlID,
                            int state)
Check boxes and radio buttons generates this event when state is changed on the client side.

The state is 0=unchecked, 1=checked and 2=third state (only for check boxes, or PhantomCCheckBox.STATE_UNDETERMINED).

Specified by:
onCheckedChange in interface VirtualComponentListener
Overrides:
onCheckedChange in class VirtualComponentAdapter

retreiveSelection

public String retreiveSelection(VirtualControl control)
Gets the selection of a directory/filename for the browse buttons.

Specified by:
retreiveSelection in interface SelectionInterface

isSelectionValid

public boolean isSelectionValid(String path,
                                VirtualControl control,
                                VirtualPanel vpChooser)
Checks if a selection for a directory/filename is valid (for the browse buttons).

Specified by:
isSelectionValid in interface SelectionInterface
Parameters:
path - The new path to insert.
control - The VirtualControl to insert it into.
vpChooser - The chooser dialogs virtual panel. This is passed along to enable the class implementing this interface to create a dialog for a message, with the chooser dialog as its parent.

applySelection

public boolean applySelection(String path,
                              VirtualControl control)
Applies the selection chosen (using the browse buttons) for directory/filename.

Specified by:
applySelection in interface SelectionInterface
Parameters:
path - The new path to insert.
control - The VirtualControl to insert it into.

getAccessControlIDs

public static Enumeration<String> getAccessControlIDs()
Gets an the list of available access control IDs (protections) as a String enumeration.


getAccessControl

public static AdminConfigProtection getAccessControl(String id)
Gets an access control (protection) definition from an ID.

Returns:
null if none is found.


Phantom® and NetPhantom® are registered trademarks of Codectica Systems SARL.
© Copyright Codectica Systems SARL, 2008. All rights reserved.