LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control
Class LyMultiClassImportController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.LyAreaController
          extended by leon.control.LyPanelController
              extended by leon.control.LySimpleTableController
                  extended by leon.control.LyTableController
                      extended by leon.control.LyMultiPageTableController
                          extended by leon.control.LyImportTableController
                              extended by leon.control.LyMultiClassImportController
All Implemented Interfaces:
java.lang.Runnable, LyGetSessionInterface, LyContextInterface, LyControllerContextInterface, LyControllerContextInterface2, LyFastFilterEndInterface, LyFilterEndInterface, LyFindInterface, LyGetActionInterface, LySelectFileListenerInterface, LySortEndInterface, LyAdvancedWorkSpaceListener, LyGuiListener, LyWorkSpaceListener, LyGetClassInfoInterface, LyInfoListener, LyEvaluator, LyDemandListener, LyPrintListenerInterface, LyAnswerInterface, LyQuestionAnswerInterface, LySetPrintModeInterface

public class LyMultiClassImportController
extends LyImportTableController

This class implements an export controller (no GUI) to xporta set of data from multiple classInfos into XML (only XML is available).

See Also:
LyExportController

Field Summary
static java.lang.String __VERSION
          File Version
 
Fields inherited from class leon.control.LyImportTableController
DEFAULT_ROW_IMAGE_SIZE, DEMAND_IMPORT_ALL, DEMAND_IMPORT_SELECT_ALL, DEMAND_IMPORT_SELECTION, DEMAND_VIEW_IMPORTED, OLD_IMPORT
 
Fields inherited from class leon.control.LyMultiPageTableController
IMPACT_OUTSIDE_OF_CURRENT_VIEW, SELECT_PAGE
 
Fields inherited from class leon.control.LyTableController
MAX_OBJECTS_COUNT_FOR_CONTEXT_FILTER
 
Fields inherited from class leon.control.LySimpleTableController
DEMAND_CHOOSE_COLUMNS, DEMAND_COPY_CELL_CONTENT, DEMAND_FIX_COLUMN, DEMAND_GROUP_BY, DEMAND_INVERT_STATUS_SORT, DEMAND_LIST_DISPLAY, DEMAND_NEXT_PAGE, DEMAND_PREVIOUS_PAGE, DEMAND_PRINT_TABLE, DEMAND_REVERSE, DEMAND_ROW_TOOL, DEMAND_SORT_BY, DEMAND_SORT_DEFAULT, DEMAND_SORT_EXTEND, DEMAND_SORT_REVERSE, DEMAND_SORT_WIZARD, DEMAND_STATUS_SORT, DEMAND_SUB_TOOL_ACTION, DEMAND_UNFIX_COLUMN, EMPTY_CELL, FOOTER_ROW_PREFIX, MESSAGE_OBJECTS_COUNT, SECTION_ROW_PREFIX
 
Fields inherited from class leon.control.LyPanelController
DEMAND_DEFAULT_FOR_MOBILE_PREFERENCE, DEMAND_DEFAULT_PREFERENCE, DEMAND_PREFERENCE_TARGET, DEMAND_SAVE_PREFERENCE, DEMAND_SELECT_ALL, DEMAND_SHARED_PREFERENCE, DEMAND_UNSELECT_ALL, EXTEND_SIMPLE_FILTER, EXTENDED_FILTER_NEW, FAST_FILTER, FILTER_ACTIVE, FILTER_SET, PREFERENCE_TARGET_ACTION, PREFERENCE_TARGET_CLASS, SIMPLE_FILTER_NEW
 
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
LyMultiClassImportController(LySession session, LyAction action)
          Constructor.
LyMultiClassImportController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects)
          Constructor.
 
Method Summary
 void free()
          Free this controller.
 LyInfoList<LyClassInfo> getClassInfos()
          Get the list of class infos to be imported (null if all the classes found in file should be imported).
 LyViewController getViewController()
          Accessor to the view controller (Frame or dialog controller) which is the container of this view.
 void hideView(boolean free)
          Hide the view.
 void importObjects(LyObjectList objects, boolean importErrors)
          Do the final import operation : this will commit the import context for the specified objects.
 void importObjects(LyObjectList objects, boolean importErrors, boolean allClassInfos)
          Do the final import operation : this will commit the import context for the specified objects.
 LyInfoList<LyFieldInfo> isSameObject(LyObject importObject)
          Indicates if the real object corresponding to the imported object has exactly the same values or not.
 boolean loadClassInfos()
          Import objects from an XML file for given class infos.
 boolean loadData()
          Import objects from an XML file for given class infos.
 void reset(boolean full)
          Reset component.
 void setClassInfos(LyInfoList<LyClassInfo> classInfos)
          Set the list of class infos to be imported (null if all the classes found in file should be imported).
 void showView()
          Make the view visible to the user.
 
Methods inherited from class leon.control.LyImportTableController
actionDemand, allowOperations, buildRow, checkFields, checkRealFieldInfo, commit, completeMenuBar, completeMessages, createObjectFromImportedObject, fixColumn, free, getBehaviorInterface, getBuilder, getClassInfo, getComponent, getControllerContext, getControllerContext, getFields, getImportAction, getImportBehavior, getImportControllerParent, getImportedObjects, getLastErrorMessage, getLocalFieldInfo, getObjectsToDelete, getPanelComponent, getRealClassInfo, getRealImportedObjects, getRealObject, getTableComponent, getTemporaryImportedObjects, getView, importContentXmlFactory, importObjects, isDeletedObject, isNewObject, isStatusColumn, loadData, menuDemand, objectChanged, rollback, selectionDemand, selectObject, selectRow, setAllowOperations, setBuffer, setFields, setFieldSep, setFile, setImportBehavior, setImportType, setOperations, setStartLine, setValueSep, setViewController, showError, showWarning, updatePreferencesMenu, updateTitleBar, updateViewFromValues, workSpaceEventsGrouped
 
Methods inherited from class leon.control.LyMultiPageTableController
getLastPage, getPage, hasViewLimit, isDisplayNextPreviousTools, isDisplayPagesNumber, isPaginated, loadPage, setClassFilter, setContext, setLastModified, setPage, setPrintMode, setSort
 
Methods inherited from class leon.control.LyTableController
print, selectObjects
 
Methods inherited from class leon.control.LySimpleTableController
allowSortOnField, clearTranslatedStringMap, clearViewCache, dragDropDemand, enablesMultiSelection, endFastFilter, endSort, findObject, getClassFilter, getColsNumberListDisplay, getColumnSize, getComplexFields, getContent, getFastFilterFieldInfo, getFastFilterValue, getFieldMarks, getLimit, getRealFields, getSelection, getSelection, getSort, getStatusFieldInfos, getTableComponentFields, getTableComponentFields, hasDisplayListToggleButton, hasPrintMode, isDisplayList, isDisplayListShowFields, isFastFilterExtended, isFastFilterSet, isFopMode, isImageColumn, objectAdded, objectRemoved, objectStateChanged, printList, questionAnswer, run, selectAllObjects, selectObject, setFieldMarks, setFopMode, setPreference, showObject, translate
 
Methods inherited from class leon.control.LyPanelController
buildFilter, closeBorderPanel, endFilter, getFilter, getFilterController, getFilterEditorController, getPreference, getRefreshTime, isFilterActive, isHorizontal, objectUserEvent, setFilter, setIdle, setRefreshTime
 
Methods inherited from class leon.control.LyAreaController
canClose, canFree, getAction, getAreaStackController, getBehavior, getContext, getContextClient, getContextTitle, getDefaultAction, getEnvironment, getFastEditionAction, getHelpFile, getImage, getImageTooltip, getInfoLabel, getInfoLabel, getKeyValue, getLabel, getLastModified, getMenuItemImage, getName, getParameter, getParameter, getParameterMarks, getParent, getParent, getParentAreaController, getShortLabel, getTarget, getTitle, getViewController, hasMark, hasNotMark, hasViewController, infoEvent, initialize, isInitialized, isOutlined, isViewResizable, reset, selectFileDemand, setContext, setContextClient, showView, testParameter, toString, update
 
Methods inherited from class leon.control.LyController
activateViewDemand, demandPerformed, getApplication, getClassInfo, getId, getImage, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getName, getObjectId, getSession, getUserData, getViewManager, helpDemand, hideView, isFreed, isIdle, setBuilder, setBuilderClass, setName, setUserData, showError
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface leon.control.LyContextInterface
getContext
 
Methods inherited from interface leon.data.LyAdvancedWorkSpaceListener
objectUserEvent
 
Methods inherited from interface leon.control.LyFilterEndInterface
endFilter, getFilter
 
Methods inherited from interface leon.control.LyFastFilterEndInterface
getFilter
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File Version

See Also:
Constant Field Values
Constructor Detail

LyMultiClassImportController

public LyMultiClassImportController(LySession session,
                                    LyAction action)
Constructor.

Parameters:
session - current session associated to the controller. The controller automatically registers on the specified session.
action - related action. If an action is specified, the controller uses action parameters (action name, action specific XML view description ...)

LyMultiClassImportController

public LyMultiClassImportController(LySession session,
                                    LyController parent,
                                    LyAction action,
                                    LyClassInfo classInfo,
                                    LyObjectList objects)
Constructor.

Parameters:
session - current session associated to the controller. The controller automatically registers on the specified session.
parent - parent controller (or null for 'root' controller).
action - related action. If an action is specified, the controller uses action parameters (action name, action specific XML view description ...)
classInfo - kept for compatibility. This parameter is *NOT* used.
objects - list of objects that should be saved.
Method Detail

loadClassInfos

public boolean loadClassInfos()
Import objects from an XML file for given class infos.

Returns:
true if successfull

loadData

public boolean loadData()
Import objects from an XML file for given class infos.

Overrides:
loadData in class LyImportTableController
Returns:
true if sucessfull

importObjects

public void importObjects(LyObjectList objects,
                          boolean importErrors,
                          boolean allClassInfos)
Do the final import operation : this will commit the import context for the specified objects. The result is STILL in the cancellable context of this controller. Only subcontext are commited.

Parameters:
objects - the temporary object list
importErrors - indicates if we accept to import objects in error.
allClassInfos - indicates if we import all classInfos
See Also:
LyImportTableController.createRealObject(leon.data.LyObject), LyImportTableController.setRealObject(leon.data.LyObject, leon.data.LyObject)

importObjects

public void importObjects(LyObjectList objects,
                          boolean importErrors)
Do the final import operation : this will commit the import context for the specified objects. The result is STILL in the cancellable context of this controller. Only subcontext are commited.

Overrides:
importObjects in class LyImportTableController
Parameters:
objects - the temporary object list
importErrors - indicates if we accept to import objects in error.
See Also:
LyImportTableController.createRealObject(leon.data.LyObject), LyImportTableController.setRealObject(leon.data.LyObject, leon.data.LyObject)

isSameObject

public LyInfoList<LyFieldInfo> isSameObject(LyObject importObject)
Indicates if the real object corresponding to the imported object has exactly the same values or not.

Overrides:
isSameObject in class LyImportTableController
Parameters:
importObject - the 'real' object instance for content comparizon
Returns:
null if all values are identical, the list of fields with different values or an empty list.

setClassInfos

public void setClassInfos(LyInfoList<LyClassInfo> classInfos)
Set the list of class infos to be imported (null if all the classes found in file should be imported).

Parameters:
classInfos - list of class infos to be imported

getClassInfos

public LyInfoList<LyClassInfo> getClassInfos()
Get the list of class infos to be imported (null if all the classes found in file should be imported).

Returns:
classInfos list of class infos to be imported

reset

public void reset(boolean full)
Reset component.

Overrides:
reset in class LyImportTableController
Parameters:
full - Boolean indicating if a full reset (including reset of datas) is requiered or not (only reset graphical area).

hideView

public void hideView(boolean free)
Hide the view. The effect of this command depends on the nature of the application. If the display is a fat client for example (windows (awt) / swing) this methods should close the window or hide the view.

This method should consider that the page is closed and should disappear.

Overrides:
hideView in class LyImportTableController
Parameters:
free - Indicates if only HIDDEN, not FREED (true).

getViewController

public LyViewController getViewController()
Accessor to the view controller (Frame or dialog controller) which is the container of this view. This method must be implemented in subclasses depending on the nature of the component.

Overrides:
getViewController in class LyImportTableController
Returns:
the reference to a view controller, never returns null if the controller is associated to a view.

free

public void free()
Free this controller.

Overrides:
free in class LyAreaController
See Also:
LyAreaController.free(LyController)

showView

public void showView()
Make the view visible to the user. The effect of this command depends on the nature of the application. If the display is a fat client (windows (awt) / swing) this methods should open a window and show the view. In the case of thin client (html), this prepares the pages which will be returned and displayed in the client browser.

For any display, this method should consider that the page is ready to be shown and should be displayed.

Overrides:
showView in class LyImportTableController

(c) January 2013 - W4 S.A.

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