net.redhogs.cronparser.format
Class CronExpressionFormatter

java.lang.Object
  extended by net.redhogs.cronparser.format.CronExpressionFormatter
All Implemented Interfaces:
org.springframework.format.Formatter<org.quartz.CronExpression>, org.springframework.format.Parser<org.quartz.CronExpression>, org.springframework.format.Printer<org.quartz.CronExpression>

public class CronExpressionFormatter
extends Object
implements org.springframework.format.Formatter<org.quartz.CronExpression>

A Spring formatter that can be used to format a Quartz cron expression.

It can be used like

<bean id="conversionService" class="org.springframework.format.support.FormattingConversionServiceFactoryBean"> <property name="formatters"> <set> <bean class="net.redhogs.cronparser.format.CronExpressionFormatter"/> </set> </property> </bean>
In ThymeLeaf, a cron expression can be displayed as ${{cronExpression}}.


Constructor Summary
CronExpressionFormatter()
           
CronExpressionFormatter(Options options)
           
 
Method Summary
 org.quartz.CronExpression parse(String text, Locale locale)
           
 String print(org.quartz.CronExpression cron, Locale locale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CronExpressionFormatter

public CronExpressionFormatter()

CronExpressionFormatter

public CronExpressionFormatter(Options options)
Method Detail

print

public String print(org.quartz.CronExpression cron,
                    Locale locale)
Specified by:
print in interface org.springframework.format.Printer<org.quartz.CronExpression>

parse

public org.quartz.CronExpression parse(String text,
                                       Locale locale)
                                throws ParseException
Specified by:
parse in interface org.springframework.format.Parser<org.quartz.CronExpression>
Throws:
ParseException


Copyright © 2015 RedHogs. All Rights Reserved.