public abstract class SModule extends Named
Modifier and Type | Class and Description |
---|---|
static interface |
SModule.ModuleDataInit |
Constructor and Description |
---|
SModule(java.lang.String name,
java.lang.String code,
java.lang.String label,
java.lang.String moduleversion,
java.lang.String frameworkversion,
boolean frameworkfinalversion,
java.util.Date generationdate) |
Modifier and Type | Method and Description |
---|---|
void |
addObjectDefinition(DataObjectDefinition objectdefinition)
adds a DataObjectDefinition to this module
|
protected void |
addPage(SPage page)
adds a page to this module
|
abstract void |
DataUpdateStep1()
launches all the migrators of the module after checking if they have been
executed or not
|
abstract ActionExecution |
getAction(java.lang.String name)
This method allows to get an action from the name, typically when a client
requests a specific action
|
protected abstract ActionExecution |
getActionForDefaultPage() |
java.lang.String |
getCode() |
abstract DataObject |
getDataObjectBasedOnGenericId(DataObjectId genericid) |
SPage |
getDefaultPage() |
java.lang.String |
getEmailMessage() |
java.lang.String |
getFrameworkversion() |
abstract java.lang.String |
getFrontPageMessage() |
java.util.Date |
getGenerationdate() |
java.lang.String |
getLabel() |
abstract SMenu |
getModuleMenu(SPage parentaddonpage)
defines the menu for this module
|
java.lang.String |
getModuleversion() |
DataObjectDefinition |
getObjectDefinition(java.lang.String objectname)
gets the DataObjectDefinition
|
abstract SPageAddon |
getPageAddonForModule()
provides the add-on for the module.
|
abstract SPage |
getShowPageBasedOnObjectId(DataObjectId genericid)
This methods allows to generically call show page on an object.
|
abstract void |
initiateData()
This method allows a module to generate basic data for the module once the
objects have been created.
|
boolean |
isFrameworkfinalversion() |
protected void |
setEmailMessage(java.lang.String emailmessage) |
abstract void |
updateDataModelStep1()
this step should generate definition of all objects
|
abstract void |
updateDataModelStep2()
this step should generate fields for all objects
|
abstract void |
updateDataModelStep3()
this step should generate calculated fields for all objects
|
abstract void |
updateDataModelStep4()
this step should update data module for all objects
|
abstract void |
updateDataModelStep5()
generates comments
|
changeName, cleanName, equals, getName
public SModule(java.lang.String name, java.lang.String code, java.lang.String label, java.lang.String moduleversion, java.lang.String frameworkversion, boolean frameworkfinalversion, java.util.Date generationdate)
name
- unique name of the module (for the server). It
is recommended enterprises set-up a naming
convention to ensure uniquenesscode
- unique code of the module (for the server). It
is a two letters (3 letters at most) unique code
for the module. It should be kept short as it
will be added to the name of databse artifacts
(table, indexes...), and they typically have a
limited number of characters in the namelabel
- a plain language short label of the module (in
the main language)moduleversion
- version of the module version of the moduleframeworkversion
- the version of OpenLowcode framework this module
was compiled withframeworkfinalversion
- was it compiled with a released version of the
frameworkgenerationdate
- date the module was generated.public abstract java.lang.String getFrontPageMessage()
public java.lang.String getCode()
public java.lang.String getLabel()
public java.lang.String getModuleversion()
public java.lang.String getFrameworkversion()
public boolean isFrameworkfinalversion()
public java.util.Date getGenerationdate()
public java.lang.String getEmailMessage()
protected void setEmailMessage(java.lang.String emailmessage)
emailmessage
- a default e-mail message to put in all e-mails sent with
this modulepublic abstract ActionExecution getAction(java.lang.String name)
name
- name of the actionpublic abstract SPage getShowPageBasedOnObjectId(DataObjectId genericid)
public abstract DataObject getDataObjectBasedOnGenericId(DataObjectId genericid)
genericid
- a data object of unprecised typeprotected void addPage(SPage page)
page
- the page to addpublic abstract void updateDataModelStep1()
public abstract void updateDataModelStep2()
public abstract void updateDataModelStep3()
public abstract void updateDataModelStep4()
public abstract void updateDataModelStep5()
public abstract void DataUpdateStep1()
public SPage getDefaultPage()
protected abstract ActionExecution getActionForDefaultPage()
public abstract void initiateData()
public abstract SPageAddon getPageAddonForModule()
public void addObjectDefinition(DataObjectDefinition objectdefinition)
objectdefinition
- the object to addpublic DataObjectDefinition getObjectDefinition(java.lang.String objectname)
objectname
- the name of object