org.olat.core.commons.modules.bc.commands
Class CmdCreateFile

java.lang.Object
  extended by org.olat.core.gui.control.DefaultController
      extended by org.olat.core.gui.control.controller.BasicController
          extended by org.olat.core.commons.modules.bc.commands.CmdCreateFile
All Implemented Interfaces:
FolderCommand, Controller, ControllerEventListener, Disposable

public class CmdCreateFile
extends BasicController
implements FolderCommand

Initial Date: 13.12.2005

Author:
Florian Gnägi Description: A panel with a FolderComponent and a CreateFileForm. TODO: LD: check status to show if an error occured.

Field Summary
 
Fields inherited from interface org.olat.core.commons.modules.bc.commands.FolderCommand
FOLDERCOMMAND_FINISHED
 
Method Summary
 void event(UserRequest ureq, Component source, Event event)
          abstract event method for subclasses.
 void event(UserRequest ureq, Controller source, Event event)
          the only method of the interface controllereventlistener.
 Controller execute(FolderComponent folderComponent, UserRequest ureq, WindowControl wControl, Translator translator)
          Execute the command.
 java.lang.String getFileName()
           
 int getStatus()
           
 boolean runsModal()
           
 
Methods inherited from class org.olat.core.gui.control.DefaultController
addControllerListener, addLoggingResourceable, dispatchEvent, dispatchEvent, dispose, getControllerCount, getInitialComponent, getUserActivityLogger, getWindowControlForDebug, isDisposed, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

execute

public Controller execute(FolderComponent folderComponent,
                          UserRequest ureq,
                          WindowControl wControl,
                          Translator translator)
Description copied from interface: FolderCommand
Execute the command. May provide a controller if the command needs to do more complex stuff. In such case, add this controller as listener and listen for FOLDERCOMMAND_FINISHED events. If no controller is provided, the command is executed right away. After executen, get any status return codes with getStatus().

Specified by:
execute in interface FolderCommand
Returns:

event

public void event(UserRequest ureq,
                  Component source,
                  Event event)
Description copied from class: DefaultController
abstract event method for subclasses. the event received from the component we are listening to are always rerouted to this method here, except when the component has been disposed, in which case the events are simply ignored.


event

public void event(UserRequest ureq,
                  Controller source,
                  Event event)
Description copied from class: DefaultController
the only method of the interface controllereventlistener. always gets called when a controller we 'subscribed' to fires an event. we provide a default implementation here since there are many controllers which are standalone and need no subcontrollers


getFileName

public java.lang.String getFileName()

getStatus

public int getStatus()
Specified by:
getStatus in interface FolderCommand

runsModal

public boolean runsModal()
Specified by:
runsModal in interface FolderCommand
Returns:
true if this command provides its own modal dialog. false if it is a normal controler that can be wrapped in a modal dialog by the parent controller