Class CronScheduleEditorPanel
- java.lang.Object
-
- org.apache.wicket.Component
-
- org.apache.wicket.MarkupContainer
-
- org.apache.wicket.markup.html.WebMarkupContainer
-
- org.apache.wicket.markup.html.panel.Panel
-
- com.inductiveautomation.ignition.gateway.web.components.CronScheduleEditorPanel
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<org.apache.wicket.Component>
,org.apache.wicket.event.IEventSink
,org.apache.wicket.event.IEventSource
,org.apache.wicket.IConverterLocator
,org.apache.wicket.markup.html.IHeaderContributor
,org.apache.wicket.request.component.IRequestableComponent
,org.apache.wicket.util.IHierarchical<org.apache.wicket.Component>
,org.apache.wicket.util.io.IClusterable
public class CronScheduleEditorPanel extends org.apache.wicket.markup.html.panel.Panel implements java.io.Serializable
The CronScheduleEditor allows a user to construct a cron string by entering the component parts as text or choosing them from dropdowns. Individual parts are validated, and the dropdowns listen to the text fields to see if there's a value they recognize. Ported from CronScheduleEditor.java. Created on 5/11/15.- Since:
- 1.8.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
commonSelection
static int
DAYS
protected java.lang.String
daysInput
protected java.lang.String
daysSelection
protected java.lang.String
descriptorText
static int
HOURS
protected java.lang.String
hoursInput
protected java.lang.String
hoursSelection
static int
MINUTES
protected java.lang.String
minutesInput
protected java.lang.String
minutesSelection
static int
MONTHS
protected java.lang.String
monthsInput
protected java.lang.String
monthsSelection
static int
WEEKDAYS
protected java.lang.String
weekdaysInput
protected java.lang.String
weekdaysSelection
-
Constructor Summary
Constructors Constructor Description CronScheduleEditorPanel(java.lang.String id, org.apache.wicket.model.IModel<java.lang.String> model)
Instantiates a new Cron Schedule Editor panel.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getCronDescriptor(java.lang.String cronString)
Takes a cron String and converts it into a human-readable form.-
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebPage, getWebRequest, getWebResponse, getWebSession
-
Methods inherited from class org.apache.wicket.MarkupContainer
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
-
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap
-
-
-
-
Field Detail
-
MINUTES
public static final int MINUTES
- See Also:
- Constant Field Values
-
HOURS
public static final int HOURS
- See Also:
- Constant Field Values
-
DAYS
public static final int DAYS
- See Also:
- Constant Field Values
-
MONTHS
public static final int MONTHS
- See Also:
- Constant Field Values
-
WEEKDAYS
public static final int WEEKDAYS
- See Also:
- Constant Field Values
-
commonSelection
protected java.lang.String commonSelection
-
minutesSelection
protected java.lang.String minutesSelection
-
hoursSelection
protected java.lang.String hoursSelection
-
daysSelection
protected java.lang.String daysSelection
-
monthsSelection
protected java.lang.String monthsSelection
-
weekdaysSelection
protected java.lang.String weekdaysSelection
-
minutesInput
protected java.lang.String minutesInput
-
hoursInput
protected java.lang.String hoursInput
-
daysInput
protected java.lang.String daysInput
-
monthsInput
protected java.lang.String monthsInput
-
weekdaysInput
protected java.lang.String weekdaysInput
-
descriptorText
protected java.lang.String descriptorText
-
-
Constructor Detail
-
CronScheduleEditorPanel
public CronScheduleEditorPanel(java.lang.String id, org.apache.wicket.model.IModel<java.lang.String> model)
Instantiates a new Cron Schedule Editor panel.- Parameters:
id
- the component idmodel
- the String model. The cron string is written to this model's object.
-
-
Method Detail
-
getCronDescriptor
public static java.lang.String getCronDescriptor(java.lang.String cronString) throws java.text.ParseException
Takes a cron String and converts it into a human-readable form. Example: '0 * * 3 *' will convert to 'Every hour, only in March (0 * * 3 *)'- Throws:
java.text.ParseException
-
-