public class

CronEditorWebComponent

extends AbstractWebComponent
java.lang.Object
   ↳ com.atlassian.jira.web.component.AbstractWebComponent
     ↳ com.atlassian.jira.web.component.cron.CronEditorWebComponent

Class Overview

Used to display and process a cron-style HTML editor. This generates the inputs that can be placed into a form. You can get a handle on the form HTML by using the getHtml(CronEditorBean, String) method.

Once the form has been submitted you can attain a cron string by processing the input parameters with the getCronExpressionFromInput(CronEditorBean) method.

Summary

[Expand]
Inherited Fields
From class com.atlassian.jira.web.component.AbstractWebComponent
Public Constructors
CronEditorWebComponent()
CronEditorWebComponent(VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties)
Public Methods
String getCronExpressionFromInput(CronEditorBean cronEditorBean)
This is a utility method that will process the parameters that the view put into the form and create a cron string from the inputs.
String getHtml(CronEditorBean cronEditorBean, I18nHelper i18n, String paramPrefix, String errorMessage)
Will produce HTML inputs for selecting a time period that will be represented by a cron string.
String getHtml(CronEditorBean cronEditorBean, String paramPrefix, String errorMessage)
Will produce HTML inputs for selecting a time period that will be represented by a cron string.
String getHtml(CronEditorBean cronEditorBean, String paramPrefix)
Will produce HTML inputs for selecting a time period that will be represented by a cron string.
ErrorCollection validateInput(CronEditorBean cronEditorBean, String fieldName)
[Expand]
Inherited Methods
From class com.atlassian.jira.web.component.AbstractWebComponent
From class java.lang.Object

Public Constructors

public CronEditorWebComponent ()

public CronEditorWebComponent (VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties)

Public Methods

public String getCronExpressionFromInput (CronEditorBean cronEditorBean)

This is a utility method that will process the parameters that the view put into the form and create a cron string from the inputs. This cron string must be validated, there is no guarantee that this output is a valid cron string.

Parameters
cronEditorBean holds the state of the submitted form
Returns
  • a cron string that represents the user inputs in cron format.

public String getHtml (CronEditorBean cronEditorBean, I18nHelper i18n, String paramPrefix, String errorMessage)

Will produce HTML inputs for selecting a time period that will be represented by a cron string. The incoming expression will populate the values of the form.

Parameters
cronEditorBean defines how the form inputs will be intialized.
i18n used to resolve the i18n labeles.
paramPrefix prefixes the input names so that you can render multiple versions of this component on one page.
errorMessage the error message that was associated with the last cron expression. Can be null to indicate that there was no error.
Returns
  • HTML that represents the cron editor inputs.

public String getHtml (CronEditorBean cronEditorBean, String paramPrefix, String errorMessage)

Will produce HTML inputs for selecting a time period that will be represented by a cron string. The incoming expression will populate the values of the form. This uses the default i18n bean to resolve i18n properties.

Parameters
cronEditorBean defines how the form inputs will be intialized.
paramPrefix prefix's the input names so that you can render multiple versions of this component on one page.
errorMessage the error message that was associated with the last cron expression. Can be null to indicate that there was no error.
Returns
  • HTML that represents the cron editor inputs.

public String getHtml (CronEditorBean cronEditorBean, String paramPrefix)

Will produce HTML inputs for selecting a time period that will be represented by a cron string. The incoming expression will populate the values of the form. This uses the default i18n bean to resolve i18n properties.

Parameters
cronEditorBean defines how the form inputs will be intialized.
paramPrefix prefix's the input names so that you can render multiple versions of this component on one page.
Returns
  • HTML that represents the cron editor inputs.

public ErrorCollection validateInput (CronEditorBean cronEditorBean, String fieldName)