se.entra.phantom.server.rconsole
Class AdminConfigFileManager

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

public class AdminConfigFileManager
extends VirtualComponentAdapter
implements SelectionInterface

This class handles the configuration of the File Manager dialog box.


Field Summary
 
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
AdminConfigFileManager(VirtualPanel vp)
          Creates the ports instance.
 
Method Summary
 boolean applySelection(String path, VirtualControl control)
          Method that lets the class implementing this interface handle the inserting of the new path, instead of letting the AdminConfigSelectDirectory or the AdminConfigSelectFile class insert it directly to the VirtualControl.
static void checkAccessRights(String fileOrDir)
          Checks for access rights of a file or directory name.
 void initialize(VirtualPanel vp)
          Initilizes the list box.
 boolean isSelectionValid(String path, VirtualControl control, VirtualPanel vp)
          Method that lets the class implementing this interface handle the validation of a new selected path.
 boolean onPanelClosing(VirtualPanel vp)
          Called when the close button of a panel is pressed, but before any other processing has been done.
 void onPanelDestroy(VirtualPanel panel)
          Called to inform the listener that the panel is destroyed.
 void onPropertyChange(VirtualPanel vp, VirtualControl control, String controlID, String propertyName, Object property)
          A control notifies the listener using this event when custom properties needs to be handled.
 String retreiveSelection(VirtualControl control)
          Method that lets the class implementing this interface manipulate the initial path before it is retreived by the directory/file chooser.
 void serverTreeSelection(VirtualPanel vp, String text)
          A tree selection has been done.
 
Methods inherited from class se.entra.phantom.server.VirtualComponentAdapter
onAction, onAction, onAction, onCheckedChange, onContentChanged, onContentChanged, onControlEvent, onFocusGained, onFocusLost, onMenuAction, onSelectionChanged
 
Methods inherited from class se.entra.phantom.server.VirtualPanelAdapter
onModalPanelCreate, onModalPanelProcessing, onPageActivated, onPanelClose, onPanelCreate
 
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, onPanelCreate
 

Constructor Detail

AdminConfigFileManager

public AdminConfigFileManager(VirtualPanel vp)
Creates the ports instance.

Method Detail

checkAccessRights

public static void checkAccessRights(String fileOrDir)
                              throws IOException
Checks for access rights of a file or directory name.

Throws:
IOException - for failure.

initialize

public void initialize(VirtualPanel vp)
Initilizes the list box.


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)

onPanelDestroy

public void onPanelDestroy(VirtualPanel panel)
Called to inform the listener that the panel is destroyed.

Closes any currently opened file transfer.

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

serverTreeSelection

public void serverTreeSelection(VirtualPanel vp,
                                String text)
A tree selection has been done.


onPropertyChange

public void onPropertyChange(VirtualPanel vp,
                             VirtualControl control,
                             String controlID,
                             String propertyName,
                             Object property)
A control notifies the listener using this event when custom properties needs to be handled.

The object is in general dependant of the property change event string.

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

retreiveSelection

public String retreiveSelection(VirtualControl control)
Method that lets the class implementing this interface manipulate the initial path before it is retreived by the directory/file chooser.

For example, if the path to be retreived is relative, but not relative to the current directory, then this method could build up a path relative to the current directory, or an absolute path, before passing it along to the chooser.

Specified by:
retreiveSelection in interface SelectionInterface

isSelectionValid

public boolean isSelectionValid(String path,
                                VirtualControl control,
                                VirtualPanel vp)
Method that lets the class implementing this interface handle the validation of a new selected path.

Specified by:
isSelectionValid in interface SelectionInterface
Parameters:
path - The new path to insert.
control - The VirtualControl to insert it into.
vp - 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)
Method that lets the class implementing this interface handle the inserting of the new path, instead of letting the AdminConfigSelectDirectory or the AdminConfigSelectFile class insert it directly to the VirtualControl.

This enables the implementing class to manipulate the path before it is inserted.

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


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