本文整理汇总了Java中org.pentaho.di.job.entry.JobEntryCopy.isStart方法的典型用法代码示例。如果您正苦于以下问题:Java JobEntryCopy.isStart方法的具体用法?Java JobEntryCopy.isStart怎么用?Java JobEntryCopy.isStart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.job.entry.JobEntryCopy
的用法示例。
在下文中一共展示了JobEntryCopy.isStart方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIcon
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public Image getIcon(JobEntryCopy je) {
Image im = null;
if (je == null)
return null;
switch (je.getJobEntryType()) {
case SPECIAL:
if (je.isStart())
im = GUIResource.getInstance().getImageStart();
if (je.isDummy())
im = GUIResource.getInstance().getImageDummy();
break;
default:
String configId = je.getEntry().getConfigId();
if (configId != null) {
im = (Image) GUIResource.getInstance().getImagesJobentries().get(configId);
}
}
return im;
}
示例2: drawJobEntryIcon
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public void drawJobEntryIcon(int x, int y, JobEntryCopy jobEntryCopy) {
if (jobEntryCopy == null)
return; // Don't draw anything
Image image = null;
if (jobEntryCopy.isSpecial()) {
if (jobEntryCopy.isStart()) {
image = GUIResource.getInstance().getImageStart();
}
if (jobEntryCopy.isDummy()) {
image = GUIResource.getInstance().getImageDummy();
}
} else {
String configId = jobEntryCopy.getEntry().getPluginId();
if (configId != null) {
image = GUIResource.getInstance().getImagesJobentries().get(configId);
}
}
if (image==null) {
return;
}
org.eclipse.swt.graphics.Rectangle bounds = image.getBounds();
gc.drawImage(image, 0, 0, bounds.width, bounds.height, x, y, iconsize, iconsize);
}
示例3: drawJobEntryIcon
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public void drawJobEntryIcon(int x, int y, JobEntryCopy jobEntryCopy) {
if (jobEntryCopy == null)
return; // Don't draw anything
BufferedImage image = null;
if (jobEntryCopy.isSpecial()) {
if (jobEntryCopy.isStart()) {
image = imageStart;
}
if (jobEntryCopy.isDummy()) {
image = imageDummy;
}
} else {
String configId = jobEntryCopy.getEntry().getPluginId();
if (configId != null) {
image = entryImages.get(configId);
}
}
if (image==null) {
return;
}
drawPixelatedImage(image, x + xOffset, y + xOffset);
// gc.drawImage(image, x+xOffset, y+yOffset, observer);
}
示例4: getStart
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public JobEntryCopy getStart() {
for (int i = 0; i < nrJobEntries(); i++) {
JobEntryCopy cge = getJobEntry(i);
if (cge.isStart())
return cge;
}
return null;
}
示例5: JobHopMeta
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public JobHopMeta(JobEntryCopy from, JobEntryCopy to)
{
from_entry = from;
to_entry = to;
enabled = true;
split = false;
evaluation = true;
unconditional = false;
id = -1L;
if (from.isStart()) setUnconditional();
}
示例6: dupeJobEntry
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public void dupeJobEntry(JobMeta jobMeta, JobEntryCopy jobEntry)
{
if (jobEntry==null)
return;
if (jobEntry.isStart())
{
MessageBox mb = new MessageBox(spoon.getShell(), SWT.OK | SWT.ICON_INFORMATION);
mb.setMessage(Messages.getString("Spoon.Dialog.OnlyUseStartOnce.Message"));
mb.setText(Messages.getString("Spoon.Dialog.OnlyUseStartOnce.Title"));
mb.open();
return;
}
JobEntryCopy dupejge = (JobEntryCopy) jobEntry.clone();
dupejge.setNr(jobMeta.findUnusedNr(dupejge.getName()));
if (dupejge.isDrawn())
{
Point p = jobEntry.getLocation();
dupejge.setLocation(p.x + 10, p.y + 10);
}
jobMeta.addJobEntry(dupejge);
spoon.refreshGraph();
spoon.refreshTree();
spoon.setShellText();
}
示例7: JobHopMeta
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public JobHopMeta(JobEntryCopy from, JobEntryCopy to)
{
from_entry = from;
to_entry = to;
enabled = true;
split = false;
evaluation = true;
unconditional = false;
id = null;
if (from!=null && from.isStart()) {
setUnconditional();
}
}
示例8: dupeJobEntry
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public void dupeJobEntry(JobMeta jobMeta, JobEntryCopy jobEntry)
{
if (jobEntry==null)
return;
if (jobEntry.isStart())
{
MessageBox mb = new MessageBox(spoon.getShell(), SWT.OK | SWT.ICON_INFORMATION);
mb.setMessage(BaseMessages.getString(PKG, "Spoon.Dialog.OnlyUseStartOnce.Message")); //$NON-NLS-1$
mb.setText(BaseMessages.getString(PKG, "Spoon.Dialog.OnlyUseStartOnce.Title")); //$NON-NLS-1$
mb.open();
return;
}
JobEntryCopy dupejge = (JobEntryCopy) jobEntry.clone();
dupejge.setNr(jobMeta.findUnusedNr(dupejge.getName()));
if (dupejge.isDrawn())
{
Point p = jobEntry.getLocation();
dupejge.setLocation(p.x + 10, p.y + 10);
}
jobMeta.addJobEntry(dupejge);
spoon.refreshGraph();
spoon.refreshTree();
spoon.setShellText();
}
示例9: canDup
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
private boolean canDup(JobEntryCopy entry) {
return !entry.isStart();
}
示例10: execute
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
/**
* Execute a job without previous results. This is a job entry point (not recursive)<br>
* <br>
* @return the result of the execution
*
* @throws KettleException
*/
private Result execute() throws KettleException
{
finished.set(false);
stopped.set(false);
log.logMinimal(BaseMessages.getString(PKG, "Job.Comment.JobStarted"));
// Start the tracking...
JobEntryResult jerStart = new JobEntryResult(null, null, BaseMessages.getString(PKG, "Job.Comment.JobStarted"), BaseMessages.getString(PKG, "Job.Reason.Started"), null, 0, null);
jobTracker.addJobTracker(new JobTracker(jobMeta, jerStart));
active.set(true);
// Where do we start?
JobEntryCopy startpoint;
// synchronize this to a parent job if needed.
//
Object syncObject=this;
if (parentJob!=null) syncObject=parentJob; // parallel execution in a job
synchronized(syncObject) {
beginProcessing();
}
if (startJobEntryCopy==null) {
startpoint = jobMeta.findJobEntry(JobMeta.STRING_SPECIAL_START, 0, false);
} else {
startpoint = startJobEntryCopy;
}
if (startpoint == null) { throw new KettleJobException(BaseMessages.getString(PKG, "Job.Log.CounldNotFindStartingPoint")); }
Result res = null;
JobEntryResult jerEnd = null;
if (startpoint.isStart()) {
// Perform optional looping in the special Start job entry...
//
long iteration=0;
boolean isFirst = true;
JobEntrySpecial jes = (JobEntrySpecial) startpoint.getEntry();
while ( (jes.isRepeat() || isFirst) && !isStopped()) {
isFirst = false;
res = execute(0, null, startpoint, null, BaseMessages.getString(PKG, "Job.Reason.Started"));
if (iteration>0 && (iteration%500)==0) {
System.out.println("other 500 iterations: "+iteration);
}
iteration++;
}
jerEnd = new JobEntryResult(res, jes.getLogChannelId(), BaseMessages.getString(PKG, "Job.Comment.JobFinished"), BaseMessages.getString(PKG, "Job.Reason.Finished"), null, 0, null);
} else {
// 递归执行Job中的节点,获得最终结果
res = execute(0, null, startpoint, null, BaseMessages.getString(PKG, "Job.Reason.Started"));
jerEnd = new JobEntryResult(res, startpoint.getEntry().getLogChannel().getLogChannelId(), BaseMessages.getString(PKG, "Job.Comment.JobFinished"), BaseMessages.getString(PKG, "Job.Reason.Finished"), null, 0, null);
}
// Save this result...
jobTracker.addJobTracker(new JobTracker(jobMeta, jerEnd));
log.logMinimal(BaseMessages.getString(PKG, "Job.Comment.JobFinished"));
active.set(false);
finished.set(true);
return res;
}