Package org.opencms.ui.apps.scheduler
Class CmsJobManagerApp
- java.lang.Object
-
- org.opencms.ui.apps.A_CmsWorkplaceApp
-
- org.opencms.ui.apps.scheduler.CmsJobManagerApp
-
- All Implemented Interfaces:
I_CmsCRUDApp<CmsScheduledJobInfo>
,I_CmsWorkplaceApp
public class CmsJobManagerApp extends A_CmsWorkplaceApp implements I_CmsCRUDApp<CmsScheduledJobInfo>
The scheduled jobs manager app.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opencms.ui.apps.A_CmsWorkplaceApp
A_CmsWorkplaceApp.NavEntry
-
-
Field Summary
Fields Modifier and Type Field Description protected com.vaadin.ui.Window
m_dialogWindow
The current dialog window.protected CmsJobTable
m_jobTable
Table containing the jobs.static java.lang.String
PARAM_COPY
Parameter copy.static java.lang.String
PARAM_JOB_ID
Parameter job id.static java.lang.String
PATH_NAME_EDIT
Path name edit.-
Fields inherited from class org.opencms.ui.apps.A_CmsWorkplaceApp
m_infoLayout, m_rootLayout, m_uiContext, PARAM_ASSIGN, PARAM_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description CmsJobManagerApp()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeDialogWindow(boolean updateTable)
Closes the currently opened window.void
createElement(CmsScheduledJobInfo element)
Creates the element of type T in the system.void
defaultAction(java.lang.String elelemntId)
Performs a default action.void
deleteElements(java.util.List<java.lang.String> jobIds)
Delete the given List of elements.java.util.List<CmsScheduledJobInfo>
getAllElements()
Get all Elements.protected java.util.LinkedHashMap<java.lang.String,java.lang.String>
getBreadCrumbForState(java.lang.String state)
Returns the current bread crumb entries in an ordered map.protected com.vaadin.ui.Component
getComponentForState(java.lang.String state)
Returns the app component for the given state.CmsScheduledJobInfo
getElement(java.lang.String elementId)
Reads out an element.protected CmsJobTable
getJobTable()
Returns the job table instance.protected java.util.List<A_CmsWorkplaceApp.NavEntry>
getSubNavEntries(java.lang.String state)
Returns the sub navigation entries.CmsJobEditView
openEditDialog(java.lang.String jobId, boolean copy)
Creates the edit view for the given job id.void
restoreMainView()
Restores the main view after leaving the editing mode.void
runJob(CmsScheduledJobInfo job)
Executes the given schedule job.void
writeElement(CmsScheduledJobInfo jobInfo)
Writes a changed element to the system which already exists.-
Methods inherited from class org.opencms.ui.apps.A_CmsWorkplaceApp
addParamToState, addSubNavEntry, getLastPathLevel, getOfflineCmsObject, getParamFromState, getParamsFromState, initUI, onStateChange, openSubView, removeParamsFromState, setBreadCrumbEntries, updateBreadCrumb, updateSubNav
-
-
-
-
Field Detail
-
PARAM_COPY
public static final java.lang.String PARAM_COPY
Parameter copy.- See Also:
- Constant Field Values
-
PARAM_JOB_ID
public static final java.lang.String PARAM_JOB_ID
Parameter job id.- See Also:
- Constant Field Values
-
PATH_NAME_EDIT
public static final java.lang.String PATH_NAME_EDIT
Path name edit.- See Also:
- Constant Field Values
-
m_jobTable
protected CmsJobTable m_jobTable
Table containing the jobs.
-
m_dialogWindow
protected com.vaadin.ui.Window m_dialogWindow
The current dialog window.
-
-
Constructor Detail
-
CmsJobManagerApp
public CmsJobManagerApp()
-
-
Method Detail
-
closeDialogWindow
public void closeDialogWindow(boolean updateTable)
Closes the currently opened window.- Parameters:
updateTable
-true
to update the jobs table
-
createElement
public void createElement(CmsScheduledJobInfo element)
Description copied from interface:I_CmsCRUDApp
Creates the element of type T in the system.- Specified by:
createElement
in interfaceI_CmsCRUDApp<CmsScheduledJobInfo>
- Parameters:
element
- to be saved- See Also:
I_CmsCRUDApp.createElement(java.lang.Object)
-
defaultAction
public void defaultAction(java.lang.String elelemntId)
Description copied from interface:I_CmsCRUDApp
Performs a default action.- Specified by:
defaultAction
in interfaceI_CmsCRUDApp<CmsScheduledJobInfo>
- Parameters:
elelemntId
- id of element- See Also:
I_CmsCRUDApp.defaultAction(java.lang.String)
-
deleteElements
public void deleteElements(java.util.List<java.lang.String> jobIds)
Description copied from interface:I_CmsCRUDApp
Delete the given List of elements.- Specified by:
deleteElements
in interfaceI_CmsCRUDApp<CmsScheduledJobInfo>
- Parameters:
jobIds
- of elements to be deleted- See Also:
I_CmsCRUDApp.deleteElements(java.util.List)
-
getAllElements
public java.util.List<CmsScheduledJobInfo> getAllElements()
Description copied from interface:I_CmsCRUDApp
Get all Elements.- Specified by:
getAllElements
in interfaceI_CmsCRUDApp<CmsScheduledJobInfo>
- Returns:
- a list of all elements
- See Also:
I_CmsCRUDApp.getAllElements()
-
getElement
public CmsScheduledJobInfo getElement(java.lang.String elementId)
Description copied from interface:I_CmsCRUDApp
Reads out an element.- Specified by:
getElement
in interfaceI_CmsCRUDApp<CmsScheduledJobInfo>
- Parameters:
elementId
- of the object- Returns:
- the object of type T
- See Also:
I_CmsCRUDApp.getElement(java.lang.String)
-
openEditDialog
public CmsJobEditView openEditDialog(java.lang.String jobId, boolean copy)
Creates the edit view for the given job id.- Parameters:
jobId
- the id of the job to edit, or null to create a new jobcopy
-true
to create a copy of the given job- Returns:
- the edit view
-
restoreMainView
public void restoreMainView()
Restores the main view after leaving the editing mode.
-
runJob
public void runJob(CmsScheduledJobInfo job)
Executes the given schedule job.- Parameters:
job
- to be executed
-
writeElement
public void writeElement(CmsScheduledJobInfo jobInfo)
Description copied from interface:I_CmsCRUDApp
Writes a changed element to the system which already exists.- Specified by:
writeElement
in interfaceI_CmsCRUDApp<CmsScheduledJobInfo>
- Parameters:
jobInfo
- to be saved- See Also:
I_CmsCRUDApp.writeElement(java.lang.Object)
-
getBreadCrumbForState
protected java.util.LinkedHashMap<java.lang.String,java.lang.String> getBreadCrumbForState(java.lang.String state)
Description copied from class:A_CmsWorkplaceApp
Returns the current bread crumb entries in an ordered map.- Specified by:
getBreadCrumbForState
in classA_CmsWorkplaceApp
- Parameters:
state
- the current state- Returns:
- bread crumb entry name by state, in case the state is empty, the entry will be disabled
- See Also:
A_CmsWorkplaceApp.getBreadCrumbForState(java.lang.String)
-
getComponentForState
protected com.vaadin.ui.Component getComponentForState(java.lang.String state)
Description copied from class:A_CmsWorkplaceApp
Returns the app component for the given state.- Specified by:
getComponentForState
in classA_CmsWorkplaceApp
- Parameters:
state
- the state to render- Returns:
- the app component
- See Also:
A_CmsWorkplaceApp.getComponentForState(java.lang.String)
-
getJobTable
protected CmsJobTable getJobTable()
Returns the job table instance.- Returns:
- the job table instance
-
getSubNavEntries
protected java.util.List<A_CmsWorkplaceApp.NavEntry> getSubNavEntries(java.lang.String state)
Description copied from class:A_CmsWorkplaceApp
Returns the sub navigation entries.- Specified by:
getSubNavEntries
in classA_CmsWorkplaceApp
- Parameters:
state
- the state- Returns:
- the sub navigation entries
- See Also:
A_CmsWorkplaceApp.getSubNavEntries(java.lang.String)
-
-