2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed with
4
* this work for additional information regarding copyright ownership.
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
* (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
9
* http://www.apache.org/licenses/LICENSE-2.0
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
18
// This source code implements specifications defined by the Java
19
// Community Process. In order to remain compliant with the specification
20
// DO NOT add / change / or delete method signatures!
24
import java.io.Serializable;
25
import java.util.Date;
27
public class ScheduleExpression implements Serializable {
29
private static final long serialVersionUID = -3813254457230997879L;
31
private String dayOfMonth = "*";
32
private String dayOfWeek = "*";
33
private String hour = "0";
34
private String minute = "0";
35
private String month = "*";
36
private String second = "0";
37
private String year = "*";
38
private String timezone;
42
public ScheduleExpression dayOfMonth(int d) {
43
dayOfMonth = Integer.toString(d);
47
public ScheduleExpression dayOfMonth(String d) {
52
public ScheduleExpression dayOfWeek(int d) {
53
dayOfWeek = Integer.toString(d);
57
public ScheduleExpression dayOfWeek(String d) {
62
public ScheduleExpression end(Date e) {
67
public String getDayOfMonth() {
71
public String getDayOfWeek() {
75
public Date getEnd() {
79
public String getHour() {
83
public String getMinute() {
87
public String getMonth() {
91
public String getSecond() {
95
public Date getStart() {
99
public String getYear() {
103
public String getTimezone() {
107
public ScheduleExpression hour(int h) {
108
hour = Integer.toString(h);
112
public ScheduleExpression hour(String h) {
117
public ScheduleExpression minute(int m) {
118
minute = Integer.toString(m);
122
public ScheduleExpression minute(String m) {
127
public ScheduleExpression month(int m) {
128
month = Integer.toString(m);
132
public ScheduleExpression month(String m) {
137
public ScheduleExpression second(int s) {
138
second = Integer.toString(s);
142
public ScheduleExpression second(String s) {
147
public ScheduleExpression start(Date s) {
152
public ScheduleExpression year(int y) {
153
year = Integer.toString(y);
157
public ScheduleExpression year(String y) {
163
* See http://en.wikipedia.org/wiki/List_of_zoneinfo_timezones for valid timezones
167
public ScheduleExpression timezone(String t) {