本文整理汇总了Java中org.pentaho.di.job.entry.JobEntryCopy.getName方法的典型用法代码示例。如果您正苦于以下问题:Java JobEntryCopy.getName方法的具体用法?Java JobEntryCopy.getName怎么用?Java JobEntryCopy.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.job.entry.JobEntryCopy
的用法示例。
在下文中一共展示了JobEntryCopy.getName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renameJobEntryIfNameCollides
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
/**
* See if the name of the supplied job entry copy doesn't collide with any
* other job entry copy in the job.
*
* @param je
* The job entry copy to verify the name for.
*/
public void renameJobEntryIfNameCollides(JobEntryCopy je) {
// First see if the name changed.
// If so, we need to verify that the name is not already used in the
// job.
//
String newname = je.getName();
// See if this name exists in the other job entries
//
boolean found;
int nr = 1;
do {
found = false;
for (JobEntryCopy copy : jobcopies) {
if (copy != je && copy.getName().equalsIgnoreCase(newname) && copy.getNr() == 0)
found = true;
}
if (found) {
nr++;
newname = je.getName() + " (" + nr + ")";
}
} while (found);
// Rename if required.
//
je.setName(newname);
}
示例2: deleteJobEntryCopies
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public void deleteJobEntryCopies(JobMeta jobMeta, JobEntryCopy jobEntry)
{
String name = jobEntry.getName();
// TODO Show warning "Are you sure? This operation can't be undone." +
// clear undo buffer.
// First delete all the hops using entry with name:
JobHopMeta hi[] = jobMeta.getAllJobHopsUsing(name);
if (hi.length > 0)
{
int hix[] = new int[hi.length];
for (int i = 0; i < hi.length; i++)
hix[i] = jobMeta.indexOfJobHop(hi[i]);
spoon.addUndoDelete(jobMeta, hi, hix);
for (int i = hix.length - 1; i >= 0; i--)
jobMeta.removeJobHop(hix[i]);
}
// Then delete all the entries with name:
JobEntryCopy je[] = jobMeta.getAllJobGraphEntries(name);
int jex[] = new int[je.length];
for (int i = 0; i < je.length; i++)
jex[i] = jobMeta.indexOfJobEntry(je[i]);
if (je.length > 0)
spoon.addUndoDelete(jobMeta, je, jex);
for (int i = jex.length - 1; i >= 0; i--)
jobMeta.removeJobEntry(jex[i]);
jobMeta.clearUndo();
spoon.setUndoMenu(jobMeta);
spoon.refreshGraph();
spoon.refreshTree();
}
示例3: 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 = jobTrackers.size() - 1; i >= 0; i--) {
JobTracker tracker = getJobTracker(i);
JobEntryResult result = tracker.getJobEntryResult();
if (result != null) {
if (jobEntryCopy.getName() != null && jobEntryCopy.getName().equals(result.getJobEntryName()) && jobEntryCopy.getNr() == result.getJobEntryNr()) {
return tracker;
}
}
}
return null;
}
示例4: drawJobEntryCopy
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
protected void drawJobEntryCopy(GC gc, JobEntryCopy je) {
if (!je.isDrawn())
return;
Point pt = je.getLocation();
int x, y;
if (pt != null) {
x = pt.x;
y = pt.y;
} else {
x = 50;
y = 50;
}
String name = je.getName();
if (je.isSelected())
gc.setLineWidth(3);
else
gc.setLineWidth(1);
Image im = getIcon(je);
if (im != null) // Draw the icon!
{
Rectangle bounds = new Rectangle(im.getBounds().x, im.getBounds().y, im.getBounds().width, im.getBounds().height);
gc.drawImage(im, 0, 0, bounds.width, bounds.height, offset.x + x, offset.y + y, iconsize, iconsize);
}
gc.setBackground(GUIResource.getInstance().getColorWhite());
gc.drawRectangle(offset.x + x - 1, offset.y + y - 1, iconsize + 1, iconsize + 1);
//gc.setXORMode(true);
Point textsize = new Point(gc.textExtent("" + name).x, gc.textExtent("" + name).y);
gc.setBackground(GUIResource.getInstance().getColorBackground());
gc.setLineWidth(1);
int xpos = offset.x + x + (iconsize / 2) - (textsize.x / 2);
int ypos = offset.y + y + iconsize + 5;
gc.setForeground(GUIResource.getInstance().getColorBlack());
gc.drawText(name, xpos, ypos, true);
}
示例5: JobEntryResult
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
@Deprecated
public JobEntryResult(Result result, String comment, String reason, JobEntryCopy copy) {
this(result, copy.getEntry().getLogChannel().getLogChannelId(), comment, reason, copy!=null ? copy.getName() : null, copy!=null ? copy.getNr() : 0, copy==null ? null : ( copy.getEntry()!=null ? copy.getEntry().getFilename() : null) );
}
示例6: getJobEntryCopyName
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
private String getJobEntryCopyName(JobEntryCopy copy) {
return copy.getName()+(copy.getNr()>0 ? copy.getNr() : "");
}
示例7: getInfo
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public void getInfo()
{
try
{
configuration.setExecutingLocally(wExecLocal.getSelection());
configuration.setExecutingRemotely(wExecRemote.getSelection());
// Remote data
//
if (wExecRemote.getSelection())
{
String serverName = wRemoteHost.getText();
configuration.setRemoteServer(jobMeta.findSlaveServer(serverName));
}
configuration.setPassingExport(wPassExport.getSelection());
// various settings
//
if (!Const.isEmpty(wReplayDate.getText()))
{
configuration.setReplayDate(simpleDateFormat.parse(wReplayDate.getText()));
}
else
{
configuration.setReplayDate(null);
}
configuration.setSafeModeEnabled(wSafeMode.getSelection() );
configuration.setClearingLog(wClearLog.getSelection());
configuration.setLogLevel( LogLevel.values()[wLogLevel.getSelectionIndex()] );
String startCopyName = null;
int startCopyNr = 0;
if (!Const.isEmpty(wStartCopy.getText())) {
if (wStartCopy.getSelectionIndex()>=0) {
JobEntryCopy copy = jobMeta.getJobCopies().get(wStartCopy.getSelectionIndex());
startCopyName = copy.getName();
startCopyNr = copy.getNr();
}
}
configuration.setStartCopyName(startCopyName);
configuration.setStartCopyNr(startCopyNr);
// The lower part of the dialog...
getInfoParameters();
getInfoVariables();
getInfoArguments();
}
catch(Exception e)
{
new ErrorDialog(shell, "Error in settings", "There is an error in the dialog settings", e);
}
}