1 /**
2 * Copyright 2005-2006 the original author or authors.
3 *
4 * Licensed under the Gnu General Pubic License, Version 2.0 (the
5 * "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/gpl-license.php
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the Gnu General Public License for more details.
14 */
15 package org.figure8.join.services.remoting.beans;
16
17 import java.util.List;
18 import java.util.ArrayList;
19 import java.io.Serializable;
20 /**
21 * This is a thin bean used for remotely representing a <code>QuartzCronInfo</code>
22 * domain object. This remote bean if lighter than domain one.
23 * @author <a href="mailto:jerome.evrard@gmail.com">Jerome Evrard</a>
24 * @version $Revision: 1.2 $
25 */
26 public class RemoteQuartzCronInfo implements Serializable {
27
28
29
30 /** <code>name</code>: The cron name */
31 private String name;
32 /** <code>cronExpression</code>: The cron expression that schedules job */
33 private String cronExpression;
34 /** <code>jobType</code>: The job type name */
35 private String jobType;
36 /** <code>jobClass</code>: The job class name to instanciate on job execution */
37 private String jobClass;
38 /** A list of <code>RemoteParameter</code>s */
39 private List jobParameters = new ArrayList();
40 /** A list of <code>RemoteParameter</code>s */
41 private List userParameters = new ArrayList();
42
43
44
45
46 /**
47 * Build a new instance.
48 * @param name The cron name
49 * @param cronExpression The cron expression
50 * @param jobType The job type
51 * @param jobClass The job class.
52 */
53 public RemoteQuartzCronInfo(String name, String cronExpression, String jobType, String jobClass){
54 this.name = name;
55 this.cronExpression = cronExpression;
56 this.jobType = jobType;
57 this.jobClass = jobClass;
58 }
59
60
61
62
63 /** @return Returns the name. */
64 public String getName(){
65 return name;
66 }
67 /** @param name The name to set. */
68 public void setName(String name){
69 this.name = name;
70 }
71
72 /** @return Returns the cronExpression.*/
73 public String getCronExpression(){
74 return cronExpression;
75 }
76 /** @param cronExpression The cronExpression to set. */
77 public void setCronExpression(String cronExpression){
78 this.cronExpression = cronExpression;
79 }
80
81 /** @return Returns the jobClass. */
82 public String getJobClass(){
83 return jobClass;
84 }
85 /** @param jobClass The jobClass to set. */
86 public void setJobClass(String jobClass){
87 this.jobClass = jobClass;
88 }
89
90 /** @return Returns the jobType. */
91 public String getJobType(){
92 return jobType;
93 }
94 /** @param jobType The jobType to set. */
95 public void setJobType(String jobType){
96 this.jobType = jobType;
97 }
98
99 /** @return Returns the jobParameters. */
100 public List getJobParameters(){
101 return jobParameters;
102 }
103 /**
104 * Add a job cron parameter.
105 * @param parameter The parameter to add.
106 */
107 public void addCronJobParameter(RemoteParameter parameter){
108 jobParameters.add(parameter);
109 }
110
111 /** @return Returns the userParameters. */
112 public List getUserParameters(){
113 return userParameters;
114 }
115 /**
116 * Add a user cron parameter.
117 * @param parameter The parameter to add.
118 */
119 public void addCronUserParameter(RemoteParameter parameter){
120 userParameters.add(parameter);
121 }
122 }