public class ScheduleList_StorageHandler extends java.lang.Object implements PersistenceServiceScheduleList
| Constructor and Description |
|---|
ScheduleList_StorageHandler() |
| Modifier and Type | Method and Description |
|---|---|
static void |
convertToListSchedule(Schedule treeSchedule)
Converts the specified
Schedule, that should be a tree schedule, to a list schedule . |
static void |
convertToListScheduleList(ScheduleList treeScheduleList)
Converts the specified
ScheduleList to a list schedule list. |
static void |
convertToTreeSchedule(Schedule listSchedule)
Converts the specified
Schedule, that should be a list schedule, to a tree schedule . |
static void |
convertToTreeScheduleList(ScheduleList listScheduleList)
Converts the specified
ScheduleList to a tree schedule list. |
int |
getIndexPositionOfMenuItem()
Has to return a desired index position for the JMenuItem to be returned through the current implementation.
|
javax.swing.JMenuItem |
getJMenueItem(PersistenceHandler.PersistenceAction action)
Has to return a JMenuItem for the specified persistence action.
|
java.lang.String |
getScheduleListAsBase64String(ScheduleList treeScheduleList)
Returns a
ScheduleList instance as base64 string. |
java.lang.String |
getScheduleListAsXMLString(ScheduleList scheduleList)
Returns the model of a technical system group as XML-string.
|
ScheduleList |
getScheduleListFromBase64String(java.lang.String base64EncodedModel)
Returns a
ScheduleList from a base64 encoded string. |
ScheduleList |
getScheduleListFromCSVFile(java.io.File scheduleFile,
ScheduleController scheduleController)
Loads a
ScheduleList from a CSV file. |
ScheduleList |
getScheduleListFromSOMFile(java.io.File scheduleFile)
Returns the ScheduleList from the specified file.
|
ScheduleList |
getScheduleListFromXMLFile(java.io.File scheduleListFile)
Load model from a XML file.
|
ScheduleList |
getScheduleListFromXMLString(java.lang.String xmlString)
Gets the ScheduleList from a XML string.
|
ScheduleList |
loadScheduleList(ScheduleController sc,
java.awt.Component invoker)
Load a
ScheduleList. |
ScheduleList |
loadScheduleList(ScheduleController sc,
java.io.File fileToLoad,
java.awt.Component invoker)
Loads a ScheduleList.
|
ScheduleList |
loadScheduleListFromFile(java.io.File technicalSystemFile,
ScheduleController scheduleController)
Load ScheduleList from file.
|
boolean |
saveScheduleList(ScheduleController sc,
ScheduleList slSave,
java.awt.Component invoker)
Save the specified
ScheduleList. |
boolean |
saveScheduleListAs(ScheduleController sc,
ScheduleList slSaveAs,
java.awt.Component invoker)
Save as the specified
ScheduleList. |
boolean |
saveScheduleListAsCsvFile(java.io.File csvFile,
ScheduleList scheduleList,
ScheduleController scheduleController,
Schedule selectedSchedule)
Saves a
ScheduleList as a CSV file. |
boolean |
saveScheduleListAsFile(java.io.File scheduleListFile,
ScheduleList scheduleList,
ScheduleController scheduleController,
Schedule selectedSchedule)
Save ScheduleList as file.
|
boolean |
saveScheduleListAsSOMFile(java.io.File technicalSystemFile,
ScheduleList scheduleList)
Saves an Instance of a
ScheduleList as TXT file. |
boolean |
saveScheduleListAsXMLFile(java.io.File scheduleFile,
ScheduleList scheduleList)
Saves an Instance of a
ScheduleList as XML file. |
java.io.File |
selectFile(java.awt.Component parentComponent,
java.lang.String caption,
boolean allowNewFolder)
Select file to load or save TechnicalSystemGroup information.
|
public javax.swing.JMenuItem getJMenueItem(PersistenceHandler.PersistenceAction action)
PersistenceServiceActionListener to the menu item, since the
PersistenceHandler will manage to invoke the required actions.getJMenueItem in interface PersistenceServiceaction - the persistence action that has to be executed with the returning menu itempublic int getIndexPositionOfMenuItem()
PersistenceServicegetIndexPositionOfMenuItem in interface PersistenceService#getJMenueItem(PersistenceAction)public ScheduleList loadScheduleList(ScheduleController sc, java.awt.Component invoker)
PersistenceServiceScheduleListScheduleList.loadScheduleList in interface PersistenceServiceScheduleListsc - the current ScheduleControllerinvoker - the invoker componentpublic ScheduleList loadScheduleList(ScheduleController sc, java.io.File fileToLoad, java.awt.Component invoker)
sc - the current ScheduleControllerfileToLoad - the file to load (may be null. If file selection will be shown)invoker - the invoker componentpublic boolean saveScheduleList(ScheduleController sc, ScheduleList slSave, java.awt.Component invoker)
PersistenceServiceScheduleListScheduleList.saveScheduleList in interface PersistenceServiceScheduleListsc - the current ScheduleControllerslSave - the ScheduleList to saveinvoker - the invoker componentpublic boolean saveScheduleListAs(ScheduleController sc, ScheduleList slSaveAs, java.awt.Component invoker)
PersistenceServiceScheduleListScheduleList.saveScheduleListAs in interface PersistenceServiceScheduleListsc - the current ScheduleControllerslSaveAs - the ScheduleList to save-asinvoker - the invoker componentpublic java.io.File selectFile(java.awt.Component parentComponent,
java.lang.String caption,
boolean allowNewFolder)
parentComponent - the parent componentcaption - the captionallowNewFolder - the allow new folderpublic ScheduleList loadScheduleListFromFile(java.io.File technicalSystemFile, ScheduleController scheduleController)
technicalSystemFile - the technical system filepublic boolean saveScheduleListAsFile(java.io.File scheduleListFile,
ScheduleList scheduleList,
ScheduleController scheduleController,
Schedule selectedSchedule)
scheduleListFile - the technical system filescheduleList - the ScheduleListselectedSchedule - the currently selected schedulepublic ScheduleList getScheduleListFromXMLFile(java.io.File scheduleListFile)
scheduleListFile - the file of the schedulepublic boolean saveScheduleListAsXMLFile(java.io.File scheduleFile,
ScheduleList scheduleList)
ScheduleList as XML file.scheduleFile - the file to that the model has be savedscheduleList - the schedule listpublic ScheduleList getScheduleListFromXMLString(java.lang.String xmlString)
xmlString - the XML stringpublic java.lang.String getScheduleListAsXMLString(ScheduleList scheduleList)
scheduleList - the instance of the technical system grouppublic ScheduleList getScheduleListFromSOMFile(java.io.File scheduleFile)
scheduleFile - the file of ScheduleListpublic boolean saveScheduleListAsSOMFile(java.io.File technicalSystemFile,
ScheduleList scheduleList)
ScheduleList as TXT file.technicalSystemFile - the file to that the model has be savedscheduleList - the Schedule Listpublic java.lang.String getScheduleListAsBase64String(ScheduleList treeScheduleList)
ScheduleList instance as base64 string.treeScheduleList - the technical systempublic ScheduleList getScheduleListFromBase64String(java.lang.String base64EncodedModel)
ScheduleList from a base64 encoded string.base64EncodedModel - the base64 encoded modelpublic ScheduleList getScheduleListFromCSVFile(java.io.File scheduleFile, ScheduleController scheduleController)
ScheduleList from a CSV file.scheduleFile - The CSV fileScheduleListpublic boolean saveScheduleListAsCsvFile(java.io.File csvFile,
ScheduleList scheduleList,
ScheduleController scheduleController,
Schedule selectedSchedule)
ScheduleList as a CSV file.csvFile - The target filescheduleList - The ScheduleList instance to be savedscheduleController - The scheduleControllerselectedSchedule - The currently selected schedulepublic static void convertToTreeScheduleList(ScheduleList listScheduleList)
ScheduleList to a tree schedule list.listScheduleList - the schedule list to convertpublic static void convertToTreeSchedule(Schedule listSchedule)
Schedule, that should be a list schedule, to a tree schedule .listSchedule - the list schedulepublic static void convertToListScheduleList(ScheduleList treeScheduleList)
ScheduleList to a list schedule list.treeScheduleList - the schedule list to convert