本文整理汇总了Java中org.pentaho.di.job.entry.JobEntryCopy类的典型用法代码示例。如果您正苦于以下问题:Java JobEntryCopy类的具体用法?Java JobEntryCopy怎么用?Java JobEntryCopy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JobEntryCopy类属于org.pentaho.di.job.entry包,在下文中一共展示了JobEntryCopy类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: jobStopAll
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
/**
* 停止作业,包含子作业和转换 <br/>
* @author jingma
* @param job
*/
public static void jobStopAll(Job job){
job.stopAll();
JobMeta jobMeta = job.getJobMeta();
for(JobEntryCopy jec:jobMeta.getJobCopies()){
if(jec.isTransformation()){
JobEntryTrans jet = (JobEntryTrans)jec.getEntry();
if(jet.getTrans()!=null){
jet.getTrans().stopAll();
}
}else if(jec.isJob()){
JobEntryJob jej = (JobEntryJob)jec.getEntry();
if(jej.getJob()!=null){
jobStopAll(jej.getJob());
}
}
}
}
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:23,代码来源:KettleUtils.java
示例2: jobKillAll
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
/**
* 结束作业,包含子作业和转换 <br/>
* @author jingma
* @param job
*/
@SuppressWarnings("deprecation")
public static void jobKillAll(Job job){
job.stopAll();
JobMeta jobMeta = job.getJobMeta();
for(JobEntryCopy jec:jobMeta.getJobCopies()){
if(jec.isTransformation()){
JobEntryTrans jet = (JobEntryTrans)jec.getEntry();
if(jet.getTrans()!=null){
jet.getTrans().killAll();
}
}else if(jec.isJob()){
JobEntryJob jej = (JobEntryJob)jec.getEntry();
if(jej.getJob()!=null){
jobKillAll(jej.getJob());
}
}
}
//采用线程中断结束卡住的线程
if(job.getState().equals(State.BLOCKED)||job.getState().equals(State.TIMED_WAITING)){
job.stop();
}else{
job.interrupt();
}
}
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:30,代码来源:KettleUtils.java
示例3: jobCopy
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
/**
* 将指定job复制到KettleUtils中的资源库 <br/>
* @author jingma
* @param jobName job名称
* @param jobPath job路径
* @param fromRepository 来源资源库
* @param toRepository 目标资源库
* @throws KettleException
*/
public static void jobCopy(String jobName,String jobPath,Repository fromRepository,
Repository toRepository) throws KettleException {
JobMeta jobMeta = KettleUtils.loadJob(jobName,jobPath,fromRepository);
for(JobEntryCopy jec:jobMeta.getJobCopies()){
if(jec.isTransformation()){
JobEntryTrans jet = (JobEntryTrans)jec.getEntry();
transCopy(jet.getObjectName(), jet.getDirectory(),fromRepository,toRepository);
}else if(jec.isJob()){
JobEntryJob jej = (JobEntryJob)jec.getEntry();
jobCopy(jej.getObjectName(),jej.getDirectory(),fromRepository,toRepository);
}
}
jobMeta.setRepository(toRepository);
jobMeta.setMetaStore(toRepository.getMetaStore());
if(!isDirectoryExist(toRepository,jobPath)){
//所在目录不存在则创建
toRepository.createRepositoryDirectory(toRepository.findDirectory("/"), jobPath);
}
KettleUtils.saveJob(toRepository,jobMeta);
}
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:30,代码来源:KettleUtils.java
示例4: generateJobImage
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
/**
* 生成作业图 <br/>
* @author jingma
* @param jobMeta
* @return
* @throws Exception
*/
public static BufferedImage generateJobImage( JobMeta jobMeta ) throws Exception {
float magnification = 1.0f;
Point maximum = jobMeta.getMaximum();
maximum.multiply( magnification );
SwingGC gc = new SwingGC( null, maximum, 32, 0, 0 );
JobPainter jobPainter =
new JobPainter(
gc, jobMeta, maximum, null, null, null, null, null, new ArrayList<AreaOwner>(),
new ArrayList<JobEntryCopy>(), 32, 1, 0, 0, true, "Arial", 10 );
jobPainter.setMagnification( magnification );
jobPainter.drawJob();
BufferedImage image = (BufferedImage) gc.getImage();
return image;
}
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:25,代码来源:KettleUtils.java
示例5: 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);
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:27,代码来源:SWTGC.java
示例6: getJobEntryCopy
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
public JobEntryCopy getJobEntryCopy(int x, int y, int iconsize) {
int i, s;
s = nrJobEntries();
for (i = s - 1; i >= 0; i--) // Back to front because drawing goes
// from start to end
{
JobEntryCopy je = getJobEntry(i);
Point p = je.getLocation();
if (p != null) {
if (x >= p.x && x <= p.x + iconsize && y >= p.y && y <= p.y + iconsize) {
return je;
}
}
}
return null;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:JobMeta.java
示例7: clearChanged
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
public void clearChanged() {
changedEntries = false;
changedHops = false;
changedNotes = false;
changedDatabases = false;
for (int i = 0; i < nrJobEntries(); i++) {
JobEntryCopy entry = getJobEntry(i);
entry.setChanged(false);
}
for (JobHopMeta hi : jobhops) // Look at all the hops
{
hi.setChanged(false);
}
for (int i = 0; i < nrDatabases(); i++) {
DatabaseMeta db = getDatabase(i);
db.setChanged(false);
}
for (int i = 0; i < nrNotes(); i++) {
NotePadMeta note = getNote(i);
note.setChanged(false);
}
super.clearChanged();
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:25,代码来源:JobMeta.java
示例8: isDatabaseConnectionUsed
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
/**
* This method asks all steps in the transformation whether or not the
* specified database connection is used. The connection is used in the
* transformation if any of the steps uses it or if it is being used to log
* to.
*
* @param databaseMeta
* The connection to check
* @return true if the connection is used in this transformation.
*/
public boolean isDatabaseConnectionUsed(DatabaseMeta databaseMeta) {
for (int i = 0; i < nrJobEntries(); i++) {
JobEntryCopy jobEntry = getJobEntry(i);
DatabaseMeta dbs[] = jobEntry.getEntry().getUsedDatabaseConnections();
for (int d = 0; d < dbs.length; d++) {
if (dbs[d] != null && dbs[d].equals(databaseMeta))
return true;
}
}
if (logConnection != null && logConnection.equals(databaseMeta))
return true;
return false;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:26,代码来源:JobMeta.java
示例9: addEntryMouseOverDelayTimer
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
private synchronized void addEntryMouseOverDelayTimer(final JobEntryCopy jobEntryCopy) {
// Don't add the same mouse over delay timer twice...
//
if (mouseOverEntries.contains(jobEntryCopy)) return;
mouseOverEntries.add(jobEntryCopy);
DelayTimer delayTimer = new DelayTimer(2500, new DelayListener() {
public void expired() {
mouseOverEntries.remove(jobEntryCopy);
delayTimers.remove(jobEntryCopy);
asyncRedraw();
}
});
new Thread(delayTimer).start();
delayTimers.put(jobEntryCopy, delayTimer);
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:JobGraph.java
示例10: findJobEntryResult
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
private JobEntryResult findJobEntryResult(JobEntryCopy jobEntryCopy) {
if (jobEntryResults==null) return null;
Iterator<JobEntryResult> iterator = jobEntryResults.iterator();
while (iterator.hasNext()) {
JobEntryResult jobEntryResult = iterator.next();
if (jobEntryResult.getJobEntryName().equals(jobEntryCopy.getName()) &&
jobEntryResult.getJobEntryNr() == jobEntryCopy.getNr()
) {
return jobEntryResult;
}
}
return null;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:JobPainter.java
示例11: JobHopMeta
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
public JobHopMeta(Repository rep, long id_job_hop, JobMeta job, List<JobEntryCopy> jobcopies) throws KettleException
{
try
{
long id_jobentry_copy_from;
long id_jobentry_copy_to;
RowMetaAndData r = rep.getJobHop(id_job_hop);
if (r!=null)
{
id_jobentry_copy_from = r.getInteger("ID_JOBENTRY_COPY_FROM", -1L);
id_jobentry_copy_to = r.getInteger("ID_JOBENTRY_COPY_TO", -1L);
enabled = r.getBoolean("ENABLED", true);
evaluation = r.getBoolean("EVALUATION", true);
unconditional = r.getBoolean("UNCONDITIONAL", !evaluation);
from_entry = JobMeta.findJobEntryCopy(jobcopies, id_jobentry_copy_from);
to_entry = JobMeta.findJobEntryCopy(jobcopies, id_jobentry_copy_to);
}
}
catch(KettleDatabaseException dbe)
{
throw new KettleException(Messages.getString("JobHopMeta.Exception.UnableToLoadHopInfoRep",""+id_job_hop) , dbe);
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:27,代码来源:JobHopMeta.java
示例12: findHop
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
/**
* See if location (x,y) is on a line between two steps: the hop!
* @param x
* @param y
* @param exclude the step to exclude from the hops (from or to location). Specify null if no step is to be excluded.
* @return the transformation hop on the specified location, otherwise: null
*/
private JobHopMeta findHop(int x, int y, JobEntryCopy exclude) {
int i;
JobHopMeta online = null;
for (i = 0; i < jobMeta.nrJobHops(); i++) {
JobHopMeta hi = jobMeta.getJobHop(i);
JobEntryCopy fs = hi.getFromEntry();
JobEntryCopy ts = hi.getToEntry();
if (fs == null || ts == null)
return null;
// If either the "from" or "to" step is excluded, skip this hop.
//
if (exclude != null && (exclude.equals(fs) || exclude.equals(ts)))
continue;
int line[] = getLine(fs, ts);
if (pointOnLine(x, y, line))
online = hi;
}
return online;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:31,代码来源:JobGraph.java
示例13: selectInRect
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
public void selectInRect(JobMeta jobMeta, org.pentaho.di.core.gui.Rectangle rect) {
int i;
for (i = 0; i < jobMeta.nrJobEntries(); i++) {
JobEntryCopy je = jobMeta.getJobEntry(i);
Point p = je.getLocation();
if (((p.x >= rect.x && p.x <= rect.x + rect.width) || (p.x >= rect.x + rect.width && p.x <= rect.x))
&& ((p.y >= rect.y && p.y <= rect.y + rect.height) || (p.y >= rect.y + rect.height && p.y <= rect.y)))
je.setSelected(true);
}
for (i = 0; i < jobMeta.nrNotes(); i++) {
NotePadMeta ni = jobMeta.getNote(i);
Point a = ni.getLocation();
Point b = new Point(a.x + ni.width, a.y + ni.height);
if (rect.contains(a.x, a.y) && rect.contains(b.x, b.y))
ni.setSelected(true);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:18,代码来源:JobGraph.java
示例14: findJobTracker
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
/**
* Finds the JobTracker for the job entry specified.
* Use this to
* @param jobEntryCopy The entry to search the job tracker for
* @return The JobTracker of null if none could be found...
*/
public JobTracker findJobTracker(JobEntryCopy jobEntryCopy)
{
for (int i=0;i<jobTrackers.size();i++)
{
JobTracker tracker = getJobTracker(i);
JobEntryResult result = tracker.getJobEntryResult();
if (result!=null)
{
JobEntryCopy jobEntry = result.getJobEntry();
if (jobEntry!=null)
{
if (jobEntry.equals(jobEntryCopy)) return tracker;
}
}
}
return null;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:24,代码来源:JobTracker.java
示例15: delSelected
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
public void delSelected() {
JobEntryCopy[] copies = jobMeta.getSelectedEntries();
int nrsels = copies.length;
if (nrsels == 0)
return;
// Load the list of steps
List<String> stepList = new ArrayList<String>();
for (int i = 0; i < copies.length; ++i) {
stepList.add(copies[i].toString());
}
// Display the delete confirmation message box
MessageBox mb = new DeleteMessageBox(shell, Messages.getString("Spoon.Dialog.DeletionConfirm.Message"), //$NON-NLS-1$
stepList);
int answer = mb.open();
if (answer == SWT.YES) {
// Perform the delete
for (int i = 0; i < copies.length; i++) {
spoon.deleteJobEntryCopies(jobMeta, copies[i]);
}
spoon.refreshTree();
spoon.refreshGraph();
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:26,代码来源:JobGraph.java
示例16: enableHopsBetweenSelectedEntries
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
/**
* This method enables or disables all the hops between the selected Entries.
*
**/
public void enableHopsBetweenSelectedEntries(boolean enabled) {
List<JobEntryCopy> list = jobMeta.getSelectedEntries();
for (int i=0;i<jobMeta.nrJobHops();i++) {
JobHopMeta hop = jobMeta.getJobHop(i);
if (list.contains(hop.getFromEntry()) && list.contains(hop.getToEntry())) {
JobHopMeta before = (JobHopMeta) hop.clone();
hop.setEnabled(enabled);
JobHopMeta after = (JobHopMeta) hop.clone();
spoon.addUndoChange(jobMeta, new JobHopMeta[] { before }, new JobHopMeta[] { after }, new int[] { jobMeta.indexOfJobHop(hop) });
}
}
spoon.refreshGraph();
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:JobGraph.java
示例17: 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;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:21,代码来源:JobGraph.java
示例18: delSelected
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
public void delSelected() {
List<JobEntryCopy> copies = jobMeta.getSelectedEntries();
int nrsels = copies.size();
if (nrsels == 0)
return;
// Load the list of steps
//
List<String> stepList = new ArrayList<String>();
for (int i = 0; i < copies.size(); ++i) {
stepList.add(copies.get(i).toString());
}
// Display the delete confirmation message box
MessageBox mb = new DeleteMessageBox(shell, BaseMessages.getString(PKG, "Spoon.Dialog.DeletionConfirm.Message"), //$NON-NLS-1$
stepList);
int answer = mb.open();
if (answer == SWT.YES) {
// Perform the delete
for (int i = 0; i < copies.size(); i++) {
spoon.deleteJobEntryCopies(jobMeta, copies.get(i));
}
spoon.refreshTree();
spoon.refreshGraph();
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:27,代码来源:JobGraph.java
示例19: init
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
public void init() {
jobListeners = new ArrayList<JobListener>();
jobEntryListeners = new ArrayList<JobEntryListener>();
activeJobEntryTransformations = new HashMap<JobEntryCopy, JobEntryTrans>();
activeJobEntryJobs = new HashMap<JobEntryCopy, JobEntryJob>();
active = new AtomicBoolean(false);
stopped = new AtomicBoolean(false);
jobTracker = new JobTracker(jobMeta);
jobEntryResults = new ArrayList<JobEntryResult>();
initialized = new AtomicBoolean(false);
finished = new AtomicBoolean(false);
errors = new AtomicInteger(0);
batchId = -1;
passedBatchId = -1;
maxJobEntriesLogged = Const.toInt(EnvUtil.getSystemProperty(Const.KETTLE_MAX_JOB_ENTRIES_LOGGED), 1000);
result = null;
this.setDefaultLogCommitSize();
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:Job.java
示例20: findStart
import org.pentaho.di.job.entry.JobEntryCopy; //导入依赖的package包/类
/**
* 查找JOB的开始控件 <br/>
* @author jingma
* @param jobMeta JOB元数据
* @return 开始控件
*/
public static JobEntrySpecial findStart(JobMeta jobMeta) {
for (int i = 0; i < jobMeta.nrJobEntries(); i++) {
JobEntryCopy jec = jobMeta.getJobEntry(i);
JobEntryInterface je = jec.getEntry();
if (je.getPluginId().equals("SPECIAL")) {
return (JobEntrySpecial) je;
}
}
return null;
}
开发者ID:majinju,项目名称:KettleEasyExpand,代码行数:17,代码来源:KettleUtils.java
注:本文中的org.pentaho.di.job.entry.JobEntryCopy类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论