Skip to content

Commit 576e423

Browse files
committed
[BACKLOG-39033] - Merge branch 'scheduler-plugin' of github.com:pentaho/pentaho-platform into master-merge-scheduler-plugin
# Conflicts: # THESE CONFLICTING FILES WERE MOVE TO THE SCHEDULER-PLUGIN PROJECT AND WERE # REMOVED FROM THIS PROJECT # scheduler/src/main/java/org/pentaho/platform/scheduler2/quartz/QuartzScheduler.java # scheduler/src/test/java/org/pentaho/platform/scheduler2/quartz/test/ComplexTriggerTest.java # user-console/src/main/java/org/pentaho/mantle/client/workspace/SchedulesPanel.java
2 parents 8288fe5 + c354129 commit 576e423

File tree

198 files changed

+1871
-22716
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+1871
-22716
lines changed

api/src/main/java/org/pentaho/platform/api/engine/IPlatformPlugin.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,6 @@ public enum ClassLoaderType {
9999
*/
100100
public Map<String, String> getStaticResourceMap();
101101

102-
/**
103-
* Returns the fully qualified name of the lifecycle listener class defined by this plugin. The class must be a
104-
* {@link IPluginLifecycleListener}.
105-
*
106-
* @return lifecycle listener class name
107-
*/
108-
public String getLifecycleListenerClassname();
109-
110102
/**
111103
* Returns the list of fully qualified name of the lifecycle listener class defined by this plugin. The class must be a
112104
* {@link IPluginLifecycleListener}.
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// Generated on: 2013.07.25 at 11:25:28 AM EDT
2626
//
2727

28-
package org.pentaho.platform.plugin.services.importexport.exportManifest.bindings;
28+
package org.pentaho.platform.api.scheduler;
2929

3030
import javax.xml.bind.annotation.XmlAccessType;
3131
import javax.xml.bind.annotation.XmlAccessorType;
@@ -116,6 +116,10 @@ public List<String> getStringValue() {
116116
return this.stringValue;
117117
}
118118

119+
public void setStringValue( List<String> stringValue ) {
120+
this.stringValue = stringValue;
121+
}
122+
119123
/**
120124
* Gets the value of the type property.
121125
*

scheduler/src/main/java/org/pentaho/platform/api/scheduler2/JobTriggerAdapter.java renamed to api/src/main/java/org/pentaho/platform/api/scheduler2/IActionClassResolver.java

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,26 @@
1414
* See the GNU Lesser General Public License for more details.
1515
*
1616
*
17-
* Copyright (c) 2002-2018 Hitachi Vantara. All rights reserved.
17+
* Copyright (c) 2023 Hitachi Vantara. All rights reserved.
1818
*
1919
*/
20-
2120
package org.pentaho.platform.api.scheduler2;
2221

23-
import javax.xml.bind.annotation.adapters.XmlAdapter;
24-
25-
import org.pentaho.platform.scheduler2.quartz.QuartzScheduler;
26-
27-
public class JobTriggerAdapter extends XmlAdapter<JobTrigger, JobTrigger> {
28-
29-
public JobTrigger marshal( JobTrigger v ) throws Exception {
30-
return v instanceof ComplexJobTrigger ? new CronJobTrigger( v.toString() ) : v;
31-
}
32-
33-
public JobTrigger unmarshal( JobTrigger v ) throws Exception {
34-
return v instanceof CronJobTrigger ? QuartzScheduler.createComplexTrigger( v.toString() ) : v;
35-
}
22+
/**
23+
* This interface is used register and resolve action class name
24+
*/
25+
public interface IActionClassResolver {
26+
/**
27+
* This method is used to resolve a action class name and returns a bean id that is registered with this class name
28+
* @param className
29+
* @return bean id
30+
*/
31+
String resolve( String className );
3632

33+
/**
34+
* This method provides a component way to register a bean id matching a action class name
35+
* @param className
36+
* @param beanId
37+
*/
38+
void register( String className, String beanId );
3739
}
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,9 @@
3535

3636
public interface IBackgroundExecutionStreamProvider extends Serializable {
3737
String getMimeType();
38-
3938
String getOutputPath();
40-
4139
OutputStream getOutputStream() throws Exception;
42-
4340
InputStream getInputStream() throws Exception;
44-
4541
void setStreamingAction( IStreamingAction streamingAction );
46-
4742
void setOutputFilePath( String filePath );
4843
}

scheduler/src/main/java/org/pentaho/platform/api/scheduler2/IBlockoutManager.java renamed to api/src/main/java/org/pentaho/platform/api/scheduler2/IBlockoutManager.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,39 +36,22 @@ public interface IBlockoutManager {
3636

3737
public static final String SCHEDULED_FIRE_TIME = "scheduledFireTime";
3838

39-
/**
40-
* @param blockOutJobId
41-
* @return a IBlockOutTrigger that represents the blockOut with the name blockOutName
42-
* @throws SchedulerException
43-
*/
44-
IJobTrigger getBlockOut( String blockOutJobId );
45-
4639
/**
4740
* @return a list of jobs essentially should be used instead of getBlockOuts which is deprecated
4841
*/
49-
List<Job> getBlockOutJobs();
50-
42+
List<IJob> getBlockOutJobs();
5143
/**
5244
* @param scheduleJobTrigger
5345
* {@link IJobTrigger}
5446
* @return whether the {@link IJobTrigger} will fire, at least once, given the current list of {@link IJobTrigger}s
5547
* @throws SchedulerException
5648
*/
5749
boolean willFire( IJobTrigger scheduleJobTrigger );
58-
5950
/**
6051
* @return true if there are no current blockOuts active at the moment this method is called
6152
* @throws SchedulerException
6253
*/
6354
boolean shouldFireNow();
64-
65-
/**
66-
* @param testBlockOutJobTrigger
67-
* @return the {@link List} of {@link IJobTrigger}s which would be blocked by the {@link IJobTrigger}
68-
* @throws SchedulerException
69-
*/
70-
List<IJobTrigger> willBlockSchedules( IJobTrigger testBlockOutJobTrigger );
71-
7255
/**
7356
* @param scheduleJobTrigger
7457
* {@link IJobTrigger}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package org.pentaho.platform.api.scheduler2;
2+
3+
import org.pentaho.platform.api.scheduler2.wrappers.DayOfMonthWrapper;
4+
import org.pentaho.platform.api.scheduler2.wrappers.DayOfWeekWrapper;
5+
import org.pentaho.platform.api.scheduler2.wrappers.MonthlyWrapper;
6+
import org.pentaho.platform.api.scheduler2.wrappers.YearlyWrapper;
7+
import org.pentaho.platform.scheduler2.recur.ITimeRecurrence;
8+
9+
public interface IComplexJobTrigger extends IJobTrigger {
10+
static int SUNDAY = 1;
11+
12+
long getRepeatInterval();
13+
14+
void setRepeatInterval( long repeatIntervalSeconds );
15+
16+
void addYearlyRecurrence( Integer... recurrence );
17+
18+
void addMonthlyRecurrence( Integer... recurrence );
19+
20+
void addDayOfMonthRecurrence( Integer... recurrence );
21+
22+
void addDayOfWeekRecurrence( ITimeRecurrence recurrence );
23+
24+
void addDayOfWeekRecurrence( Integer... recurrence );
25+
26+
void setHourlyRecurrence( Integer... recurrence );
27+
28+
void addMinuteRecurrence( Integer... recurrence );
29+
30+
void setCronString( String cronString );
31+
32+
DayOfMonthWrapper getDayOfMonthRecurrences();
33+
34+
MonthlyWrapper getMonthlyRecurrences();
35+
36+
YearlyWrapper getYearlyRecurrences();
37+
38+
DayOfWeekWrapper getDayOfWeekRecurrences();
39+
void setMinuteRecurrence( Integer... recurrence );
40+
41+
}

scheduler/src/main/java/org/pentaho/platform/api/scheduler2/JobParam.java renamed to api/src/main/java/org/pentaho/platform/api/scheduler2/ICronJobTrigger.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020

2121
package org.pentaho.platform.api.scheduler2;
2222

23-
import javax.xml.bind.annotation.XmlElement;
23+
public interface ICronJobTrigger extends IJobTrigger{
24+
String getCronString();
2425

25-
public class JobParam {
26-
@XmlElement
27-
String name;
28-
@XmlElement
29-
String value;
26+
void setCronString( String crongString );
3027
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package org.pentaho.platform.api.scheduler2;
2+
3+
import java.util.List;
4+
5+
public interface IEmailGroupResolver {
6+
7+
String resolve( String param );
8+
}

scheduler/src/main/java/org/pentaho/platform/scheduler2/ws/MapParamValue.java renamed to api/src/main/java/org/pentaho/platform/api/scheduler2/IJob.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,23 @@
1414
* See the GNU Lesser General Public License for more details.
1515
*
1616
*
17-
* Copyright (c) 2002-2018 Hitachi Vantara. All rights reserved.
17+
* Copyright (c) 2002-2023 Hitachi Vantara. All rights reserved.
1818
*
1919
*/
2020

21-
package org.pentaho.platform.scheduler2.ws;
21+
package org.pentaho.platform.api.scheduler2;
2222

23-
import java.util.HashMap;
24-
import javax.xml.bind.annotation.XmlRootElement;
23+
import java.io.Serializable;
24+
import java.util.Date;
25+
import java.util.Map;
2526

26-
@SuppressWarnings( "serial" )
27-
@XmlRootElement
28-
public class MapParamValue extends HashMap<String, String> implements ParamValue {
27+
public interface IJob {
28+
IJobTrigger getJobTrigger();
29+
Map<String, Serializable> getJobParams();
30+
String getJobId();
31+
String getJobName();
32+
JobState getState();
33+
String getUserName();
34+
Date getNextRun();
35+
Date getLastRun();
2936
}

scheduler/src/main/java/org/pentaho/platform/api/scheduler2/IJobFilter.java renamed to api/src/main/java/org/pentaho/platform/api/scheduler2/IJobFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ public interface IJobFilter {
3333
* the job to decide to accept or reject
3434
* @return <code>true</code> if the job should be accepted as part of the filtered results
3535
*/
36-
public boolean accept( Job job );
36+
boolean accept( IJob job );
3737
}

0 commit comments

Comments
 (0)