LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control
Class LyCommonServiceController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.LyAreaController
          extended by leon.control.LyUserInputController
              extended by leon.control.LyCommonServiceController
All Implemented Interfaces:
LyGetSessionInterface, LyContextInterface, LyGetActionInterface, LySelectFileListenerInterface, LyGuiListener, LyInfoListener, LyEvaluator, LyDemandListener

public class LyCommonServiceController
extends LyUserInputController

The common service controller


Field Summary
static java.lang.String __VERSION
          File version
 java.util.List<java.lang.String> _allServices
          A list of all services
 eu.w4.service.Service _currentService
          The current service
 eu.w4.service.ServiceInfo _currentServiceInfo
          The current service informations
 java.lang.String _currentServiceName
          The current service name
static boolean _isDebug
          Indicates if we are debugging this controller
 LyController _parent
          Parent controller
 
Fields inherited from class leon.control.LyAreaController
DEFAULT_MENU_ITEM_IMAGE_SIZE, DEMAND_APPLY, DEMAND_CANCEL, DEMAND_CLOSE, DEMAND_CREATE_CHART, DEMAND_DELETE_CHART, DEMAND_DELETE_OBJECTINFOS, DEMAND_DELETE_PREFERENCE, DEMAND_UPDATE_VIEW, DEMAND_VALIDATE
 
Fields inherited from class leon.control.LyController
_nbControllers, _nextId, CONTROLLER_ID_SEP, DEFAULT_IMAGE_FORMAT, DEMAND_HELP, ID_SEP
 
Constructor Summary
LyCommonServiceController(LySession session, LyController parent, LyAction action)
          Default constructor.
LyCommonServiceController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects)
          Default constructor.
 
Method Summary
 void cleanParameters()
          Clean the parameters list
 void clearParameters()
          Clear the parameter list
 java.util.List<java.lang.String> getClasseNamesInPackage()
          get all services name looking in W4Components.jar.
 java.lang.Object getParam(java.lang.String name)
          Get a paramter by its name
 java.lang.Object getParameter(java.lang.String name, boolean unknown_value)
          Gets value corresponding to the given parameter.
 eu.w4.service.Service getServiceFromName(java.lang.String className)
          Get the service object, according to its name.
 eu.w4.service.ServiceInfo getServiceInfoFromName(java.lang.String className)
          Get the serviceInfo object, according its the service name+"Info"
 eu.w4.service.ServiceInfo getServiceInfoType()
          Get the serviceInfo object, according to the service name+"Info"
 eu.w4.service.Service getServiceType()
          Get the service object, according to its name.
 java.lang.Class<?> getType(java.lang.String param)
          get the type of a named parameter.
 boolean hasUI()
           
 boolean invoke(eu.w4.service.Service service, eu.w4.service.ServiceInfo serviceInfo)
          Initializes and calls the service, using setted parameters.
 boolean isParameterHardCoded(java.lang.String parameter)
           
 void set_displayUI(boolean _displayUI)
           
 void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
          set this CommonServiceController parameters.
 void showView()
          Make the view visible to the user.
 
Methods inherited from class leon.control.LyUserInputController
actionDemand, addBoolean, addBoolean, addChoice, addChoice, addDate, addDate, addFile, addFile, addLabel, addLabel, addList, addList, addNumber, addNumber, addRelation, addRelation, addText, addText, addText, getBehaviorInterface, getClassInfo, getComponent, getFormComponent, getImage, getInputId, getTitleBar, getViewController, isDialog, isViewResizable, reset, setBehavior, setBuilder, setDialog, setImage, setInputId, setTitleBar
 
Methods inherited from class leon.control.LyAreaController
canClose, canFree, clearViewCache, completeMenuBar, completeMessages, free, free, getAction, getAreaStackController, getBehavior, getBuilder, getContent, getContext, getContextClient, getContextTitle, getDefaultAction, getEnvironment, getFastEditionAction, getHelpFile, getImageTooltip, getInfoLabel, getInfoLabel, getKeyValue, getLabel, getLastModified, getMenuItemImage, getName, getParameter, getParameterMarks, getParent, getParent, getParentAreaController, getRefreshTime, getSelection, getShortLabel, getTarget, getTitle, getViewController, hasMark, hasNotMark, hasViewController, hideView, infoEvent, initialize, isInitialized, isOutlined, menuDemand, reset, selectFileDemand, setContext, setContext, setContextClient, setIdle, setPreference, setViewController, showView, testParameter, toString, update, updateTitleBar
 
Methods inherited from class leon.control.LyController
activateViewDemand, demandPerformed, dragDropDemand, getApplication, getClassInfo, getId, getImage, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getName, getObjectId, getSession, getUserData, getView, getViewManager, helpDemand, hideView, isFreed, isIdle, selectionDemand, setBuilderClass, setLastModified, setName, setUserData, showError, showError, showWarning, updateViewFromValues
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values

_isDebug

public static boolean _isDebug
Indicates if we are debugging this controller


_allServices

public java.util.List<java.lang.String> _allServices
A list of all services


_parent

public LyController _parent
Parent controller


_currentService

public eu.w4.service.Service _currentService
The current service


_currentServiceName

public java.lang.String _currentServiceName
The current service name


_currentServiceInfo

public eu.w4.service.ServiceInfo _currentServiceInfo
The current service informations

Constructor Detail

LyCommonServiceController

public LyCommonServiceController(LySession session,
                                 LyController parent,
                                 LyAction action)
Default constructor.

Parameters:
session -
parent -
action -

LyCommonServiceController

public LyCommonServiceController(LySession session,
                                 LyController parent,
                                 LyAction action,
                                 LyClassInfo classInfo,
                                 LyObjectList objects)
Default constructor.

Parameters:
session - the current session
parent - the parent controller
action - the associated action
classInfo - the associated classInfo
objects - a list of object
Method Detail

hasUI

public final boolean hasUI()
Returns:
the _displayUI

set_displayUI

public final void set_displayUI(boolean _displayUI)
Parameters:
_displayUI - the _displayUI to set

showView

public void showView()
Description copied from class: LyAreaController
Make the view visible to the user.

Overrides:
showView in class LyAreaController

getParameter

public java.lang.Object getParameter(java.lang.String name,
                                     boolean unknown_value)
Description copied from class: LyAreaController
Gets value corresponding to the given parameter.

Overrides:
getParameter in class LyAreaController
Parameters:
name - Parameter name.
unknown_value - Boolean indicating if an exception is raised if this parameter doesn't exist on the controller action.
Returns:
untyped value of the parameter if found. Returns null if no parameter with the given name is found on this action and allowUnkownValue is set to true otherwise exceptions are thrown.

clearParameters

public void clearParameters()
Clear the parameter list


setParameters

public void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
set this CommonServiceController parameters.

Parameters:
parameters -

invoke

public boolean invoke(eu.w4.service.Service service,
                      eu.w4.service.ServiceInfo serviceInfo)
Initializes and calls the service, using setted parameters.

Parameters:
service - The called service
serviceInfo - The associated serviceInfo
Returns:
true if the service was correctly invoked

cleanParameters

public void cleanParameters()
Clean the parameters list


getParam

public java.lang.Object getParam(java.lang.String name)
Get a paramter by its name

Parameters:
name - the name of the parameter
Returns:
the parameter if found

getServiceType

public eu.w4.service.Service getServiceType()
Get the service object, according to its name.

Returns:
a new service

getServiceInfoType

public eu.w4.service.ServiceInfo getServiceInfoType()
Get the serviceInfo object, according to the service name+"Info"

Returns:
a new serviceInfo

getServiceFromName

public eu.w4.service.Service getServiceFromName(java.lang.String className)
Get the service object, according to its name.

Parameters:
className - the class name of a service
Returns:
a new service

getServiceInfoFromName

public eu.w4.service.ServiceInfo getServiceInfoFromName(java.lang.String className)
Get the serviceInfo object, according its the service name+"Info"

Parameters:
className - the class name of a service
Returns:
a new serviceInfo

getType

public java.lang.Class<?> getType(java.lang.String param)
get the type of a named parameter.

Parameters:
param - : the name of the parameter
Returns:
the type of the parameter

getClasseNamesInPackage

public java.util.List<java.lang.String> getClasseNamesInPackage()
get all services name looking in W4Components.jar.

Returns:
a list of service name

isParameterHardCoded

public boolean isParameterHardCoded(java.lang.String parameter)

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com