Skip to content

Commit

Permalink
[BACKLOG-39033] - Merge branch 'scheduler-plugin' of github.com:penta…
Browse files Browse the repository at this point in the history
…ho/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
  • Loading branch information
wseyler committed Jan 4, 2024
2 parents 8288fe5 + c354129 commit 576e423
Show file tree
Hide file tree
Showing 198 changed files with 1,871 additions and 22,716 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,6 @@ public enum ClassLoaderType {
*/
public Map<String, String> getStaticResourceMap();

/**
* Returns the fully qualified name of the lifecycle listener class defined by this plugin. The class must be a
* {@link IPluginLifecycleListener}.
*
* @return lifecycle listener class name
*/
public String getLifecycleListenerClassname();

/**
* Returns the list of fully qualified name of the lifecycle listener class defined by this plugin. The class must be a
* {@link IPluginLifecycleListener}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// Generated on: 2013.07.25 at 11:25:28 AM EDT
//

package org.pentaho.platform.plugin.services.importexport.exportManifest.bindings;
package org.pentaho.platform.api.scheduler;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
Expand Down Expand Up @@ -116,6 +116,10 @@ public List<String> getStringValue() {
return this.stringValue;
}

public void setStringValue( List<String> stringValue ) {
this.stringValue = stringValue;
}

/**
* Gets the value of the type property.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,26 @@
* See the GNU Lesser General Public License for more details.
*
*
* Copyright (c) 2002-2018 Hitachi Vantara. All rights reserved.
* Copyright (c) 2023 Hitachi Vantara. All rights reserved.
*
*/

package org.pentaho.platform.api.scheduler2;

import javax.xml.bind.annotation.adapters.XmlAdapter;

import org.pentaho.platform.scheduler2.quartz.QuartzScheduler;

public class JobTriggerAdapter extends XmlAdapter<JobTrigger, JobTrigger> {

public JobTrigger marshal( JobTrigger v ) throws Exception {
return v instanceof ComplexJobTrigger ? new CronJobTrigger( v.toString() ) : v;
}

public JobTrigger unmarshal( JobTrigger v ) throws Exception {
return v instanceof CronJobTrigger ? QuartzScheduler.createComplexTrigger( v.toString() ) : v;
}
/**
* This interface is used register and resolve action class name
*/
public interface IActionClassResolver {
/**
* This method is used to resolve a action class name and returns a bean id that is registered with this class name
* @param className
* @return bean id
*/
String resolve( String className );

/**
* This method provides a component way to register a bean id matching a action class name
* @param className
* @param beanId
*/
void register( String className, String beanId );
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,9 @@

public interface IBackgroundExecutionStreamProvider extends Serializable {
String getMimeType();

String getOutputPath();

OutputStream getOutputStream() throws Exception;

InputStream getInputStream() throws Exception;

void setStreamingAction( IStreamingAction streamingAction );

void setOutputFilePath( String filePath );
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,39 +36,22 @@ public interface IBlockoutManager {

public static final String SCHEDULED_FIRE_TIME = "scheduledFireTime";

/**
* @param blockOutJobId
* @return a IBlockOutTrigger that represents the blockOut with the name blockOutName
* @throws SchedulerException
*/
IJobTrigger getBlockOut( String blockOutJobId );

/**
* @return a list of jobs essentially should be used instead of getBlockOuts which is deprecated
*/
List<Job> getBlockOutJobs();

List<IJob> getBlockOutJobs();
/**
* @param scheduleJobTrigger
* {@link IJobTrigger}
* @return whether the {@link IJobTrigger} will fire, at least once, given the current list of {@link IJobTrigger}s
* @throws SchedulerException
*/
boolean willFire( IJobTrigger scheduleJobTrigger );

/**
* @return true if there are no current blockOuts active at the moment this method is called
* @throws SchedulerException
*/
boolean shouldFireNow();

/**
* @param testBlockOutJobTrigger
* @return the {@link List} of {@link IJobTrigger}s which would be blocked by the {@link IJobTrigger}
* @throws SchedulerException
*/
List<IJobTrigger> willBlockSchedules( IJobTrigger testBlockOutJobTrigger );

/**
* @param scheduleJobTrigger
* {@link IJobTrigger}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package org.pentaho.platform.api.scheduler2;

import org.pentaho.platform.api.scheduler2.wrappers.DayOfMonthWrapper;
import org.pentaho.platform.api.scheduler2.wrappers.DayOfWeekWrapper;
import org.pentaho.platform.api.scheduler2.wrappers.MonthlyWrapper;
import org.pentaho.platform.api.scheduler2.wrappers.YearlyWrapper;
import org.pentaho.platform.scheduler2.recur.ITimeRecurrence;

public interface IComplexJobTrigger extends IJobTrigger {
static int SUNDAY = 1;

long getRepeatInterval();

void setRepeatInterval( long repeatIntervalSeconds );

void addYearlyRecurrence( Integer... recurrence );

void addMonthlyRecurrence( Integer... recurrence );

void addDayOfMonthRecurrence( Integer... recurrence );

void addDayOfWeekRecurrence( ITimeRecurrence recurrence );

void addDayOfWeekRecurrence( Integer... recurrence );

void setHourlyRecurrence( Integer... recurrence );

void addMinuteRecurrence( Integer... recurrence );

void setCronString( String cronString );

DayOfMonthWrapper getDayOfMonthRecurrences();

MonthlyWrapper getMonthlyRecurrences();

YearlyWrapper getYearlyRecurrences();

DayOfWeekWrapper getDayOfWeekRecurrences();
void setMinuteRecurrence( Integer... recurrence );

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@

package org.pentaho.platform.api.scheduler2;

import javax.xml.bind.annotation.XmlElement;
public interface ICronJobTrigger extends IJobTrigger{
String getCronString();

public class JobParam {
@XmlElement
String name;
@XmlElement
String value;
void setCronString( String crongString );
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package org.pentaho.platform.api.scheduler2;

import java.util.List;

public interface IEmailGroupResolver {

String resolve( String param );
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,23 @@
* See the GNU Lesser General Public License for more details.
*
*
* Copyright (c) 2002-2018 Hitachi Vantara. All rights reserved.
* Copyright (c) 2002-2023 Hitachi Vantara. All rights reserved.
*
*/

package org.pentaho.platform.scheduler2.ws;
package org.pentaho.platform.api.scheduler2;

import java.util.HashMap;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;

@SuppressWarnings( "serial" )
@XmlRootElement
public class MapParamValue extends HashMap<String, String> implements ParamValue {
public interface IJob {
IJobTrigger getJobTrigger();
Map<String, Serializable> getJobParams();
String getJobId();
String getJobName();
JobState getState();
String getUserName();
Date getNextRun();
Date getLastRun();
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ public interface IJobFilter {
* the job to decide to accept or reject
* @return <code>true</code> if the job should be accepted as part of the filtered results
*/
public boolean accept( Job job );
boolean accept( IJob job );
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@
* See the GNU Lesser General Public License for more details.
*
*
* Copyright (c) 2002-2018 Hitachi Vantara. All rights reserved.
* Copyright (c) 2002-2023 Hitachi Vantara. All rights reserved.
*
*/

package org.pentaho.platform.api.scheduler2;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
public interface IJobRequest {

@XmlRootElement
public class JobParams {
@XmlElement
JobParam[] jobParams;
String getJobId();

void setJobId( String jobId );
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,6 @@ public interface IJobResult {
*
* @return a unique id of the job run
*/
public String getId();
String getId();

/**
* The job parameters used during this job run.
*
* @return set of parameters used during job run
*/
public Map<String, Serializable> getJobParams();

/**
* The start date/time of the job run
*
* @return start date/time of the job run
*/
public Date getStartDate();

/**
* The end date/time of the job run
*
* @return end date/time of the job run
*/
public Date getCompletionDate();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.pentaho.platform.api.scheduler2;

import java.io.Serializable;
import java.util.List;

public interface IJobScheduleParam {
String getName();

void setName( String name );

String getType();
void setType( String type );

Serializable getValue();

void setStringValue( List<String> value );

List<String> getStringValue();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package org.pentaho.platform.api.scheduler2;

import java.util.List;
import java.util.Map;

public interface IJobScheduleRequest {

void setJobId( String jobId );

String getJobId();

void setJobName( String jobName );

void setDuration( long duration );

void setJobState( JobState state );

void setInputFile( String inputFilePath );

void setOutputFile( String outputFilePath );

Map<String, String> getPdiParameters();

void setPdiParameters( Map<String, String> stringStringHashMap );

void setActionClass( String value );

String getActionClass();

void setTimeZone( String value );

String getTimeZone();

void setSimpleJobTrigger( ISimpleJobTrigger jobTrigger );

ISimpleJobTrigger getSimpleJobTrigger();

void setCronJobTrigger( ICronJobTrigger cron );

String getInputFile();

String getJobName();

String getOutputFile();

List<IJobScheduleParam> getJobParameters();

void setJobParameters( List<IJobScheduleParam> parameters );

long getDuration();

JobState getJobState();

ICronJobTrigger getCronJobTrigger();
}

Loading

0 comments on commit 576e423

Please sign in to comment.