本文整理匯總了Java中org.pentaho.di.trans.Trans.getResult方法的典型用法代碼示例。如果您正苦於以下問題:Java Trans.getResult方法的具體用法?Java Trans.getResult怎麽用?Java Trans.getResult使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.pentaho.di.trans.Trans
的用法示例。
在下文中一共展示了Trans.getResult方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
private void preview() {
CassandraInputMeta oneMeta = new CassandraInputMeta();
getInfo(oneMeta, true);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(this.transMeta, oneMeta, this.wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(this.shell, this.props.getDefaultPreviewSize(),
BaseMessages.getString(PKG, "AutSoftCassandraInputDialog.EnterPreviewSize"),
BaseMessages.getString(PKG, "AutSoftCassandraInputDialog.NumberOfRowsToPreview"));
int previewSize = numberDialog.open();
if (previewSize > 0) {
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(this.shell, previewMeta,
new String[]{this.wStepname.getText()}, new int[]{previewSize});
progressDialog.open();
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (!progressDialog.isCancelled()) {
if ((trans.getResult() != null) && (trans.getResult().getNrErrors() > 0L)) {
EnterTextDialog etd = new EnterTextDialog(this.shell,
BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),
BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true);
etd.setReadOnly();
etd.open();
} else {
PreviewRowsDialog prd = new PreviewRowsDialog(this.shell, this.transMeta, 0, this.wStepname.getText(),
progressDialog.getPreviewRowsMeta(this.wStepname.getText()),
progressDialog.getPreviewRows(this.wStepname.getText()), loggingText);
prd.open();
}
}
}
}
示例2: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
private void preview()
{
// Create the XML input step
GaInputStepMeta oneMeta = new GaInputStepMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "GoogleAnalyticsDialog.PreviewSize.DialogTitle"), BaseMessages.getString(PKG, "GoogleAnalyticsDialog.PreviewSize.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize>0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (!progressDialog.isCancelled())
{
if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
{
EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),
BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true );
etd.setReadOnly();
etd.open();
}
}
PreviewRowsDialog prd =new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
示例3: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
/**
* Preview the data generated by this step.
* This generates a transformation using this step & a dummy and previews it.
*
*/
private void preview()
{
// Create the table input reader step...
DataGridMeta oneMeta = new DataGridMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "DataGridDialog.EnterPreviewSize.Title"), BaseMessages.getString(PKG, "DataGridDialog.EnterPreviewSize.Message")); //$NON-NLS-1$ //$NON-NLS-2$
int previewSize = numberDialog.open();
if (previewSize>0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (!progressDialog.isCancelled())
{
if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
{
EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),
BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true );
etd.setReadOnly();
etd.open();
}
}
PreviewRowsDialog prd =new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
示例4: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
private void preview()
{
// Create the XML input step
GetFileNamesMeta oneMeta = new GetFileNamesMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname
.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "GetFileNamesDialog.PreviewSize.DialogTitle"), BaseMessages.getString(PKG, "GetFileNamesDialog.PreviewSize.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize > 0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta,
new String[] { wStepname.getText() }, new int[] { previewSize });
progressDialog.open();
if (!progressDialog.isCancelled())
{
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (trans.getResult() != null && trans.getResult().getNrErrors() > 0)
{
EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.Error.Title"), BaseMessages.getString(PKG, "GetFileNamesDialog.ErrorInPreview.DialogMessage"), loggingText, true);
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),progressDialog.getPreviewRowsMeta(wStepname.getText()),
progressDialog.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
}
示例5: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
private void preview()
{
// Create the XML input step
GetFileNamesMeta oneMeta = new GetFileNamesMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname
.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), Messages.getString("GetFileNamesDialog.PreviewSize.DialogTitle"), Messages.getString("GetFileNamesDialog.PreviewSize.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize > 0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta,
new String[] { wStepname.getText() }, new int[] { previewSize });
progressDialog.open();
if (!progressDialog.isCancelled())
{
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (trans.getResult() != null && trans.getResult().getNrErrors() > 0)
{
EnterTextDialog etd = new EnterTextDialog(shell, Messages.getString("System.Dialog.Error.Title"), Messages.getString("GetFileNamesDialog.ErrorInPreview.DialogMessage"), loggingText, true);
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),progressDialog.getPreviewRowsMeta(wStepname.getText()),
progressDialog.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
}
示例6: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
private void preview()
{
// Create the XML input step
CsvInputMeta oneMeta = new CsvInputMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
transMeta.getVariable("Internal.Transformation.Filename.Directory");
previewMeta.getVariable("Internal.Transformation.Filename.Directory");
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "CsvInputDialog.PreviewSize.DialogTitle"), BaseMessages.getString(PKG, "CsvInputDialog.PreviewSize.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize>0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (!progressDialog.isCancelled())
{
if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
{
EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),
BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true );
etd.setReadOnly();
etd.open();
}
}
PreviewRowsDialog prd =new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
示例7: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
/**
* Preview the data generated by this step.
* This generates a transformation using this step & a dummy and previews it.
*
*/
private void preview()
{
// Create the table input reader step...
TableInputMeta oneMeta = new TableInputMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), Messages.getString("TableInputDialog.EnterPreviewSize"), Messages.getString("TableInputDialog.NumberOfRowsToPreview")); //$NON-NLS-1$ //$NON-NLS-2$
int previewSize = numberDialog.open();
if (previewSize>0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (!progressDialog.isCancelled())
{
if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
{
EnterTextDialog etd = new EnterTextDialog(shell, Messages.getString("System.Dialog.PreviewError.Title"),
Messages.getString("System.Dialog.PreviewError.Message"), loggingText, true );
etd.setReadOnly();
etd.open();
}
}
PreviewRowsDialog prd =new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
示例8: copyResult
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
private void copyResult(Trans trans) {
Result result = trans.getResult();
setLinesInput(result.getNrLinesInput());
setLinesOutput(result.getNrLinesOutput());
setLinesRead(result.getNrLinesRead());
setLinesWritten(result.getNrLinesWritten());
setLinesUpdated(result.getNrLinesUpdated());
setLinesRejected(result.getNrLinesRejected());
setErrors(result.getNrErrors());
}
示例9: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
private void preview() {
try {
FastJsonInputMeta oneMeta = new FastJsonInputMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory
.generatePreviewTransformation(transMeta, oneMeta,
wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell,
props.getDefaultPreviewSize(), BaseMessages.getString(PKG,
"FastJsonInputDialog.NumberRows.DialogTitle"),
BaseMessages.getString(PKG,
"FastJsonInputDialog.NumberRows.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize > 0) {
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(
shell, previewMeta,
new String[] { wStepname.getText() },
new int[] { previewSize });
progressDialog.open();
if (!progressDialog.isCancelled()) {
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (trans.getResult() != null
&& trans.getResult().getNrErrors() > 0) {
EnterTextDialog etd = new EnterTextDialog(shell,
BaseMessages.getString(PKG,
"System.Dialog.PreviewError.Title"),
BaseMessages.getString(PKG,
"System.Dialog.PreviewError.Message"),
loggingText, true);
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd = new PreviewRowsDialog(shell,
transMeta, SWT.NONE, wStepname.getText(),
progressDialog.getPreviewRowsMeta(wStepname
.getText()),
progressDialog.getPreviewRows(wStepname.getText()),
loggingText);
prd.open();
}
}
} catch (KettleException e) {
new ErrorDialog(
shell,
BaseMessages
.getString(PKG,
"FastJsonInputDialog.ErrorPreviewingData.DialogTitle"),
BaseMessages
.getString(PKG,
"FastJsonInputDialog.ErrorPreviewingData.DialogMessage"),
e);
}
}
示例10: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
private void preview() {
try {
SharepointListInputMeta oneMeta = new SharepointListInputMeta();
getInfo( oneMeta );
TransMeta previewMeta =
TransPreviewFactory.generatePreviewTransformation( transMeta, oneMeta, wStepname.getText() );
EnterNumberDialog numberDialog = new EnterNumberDialog( shell, props.getDefaultPreviewSize(),
BaseMessages.getString( PKG, "SharepointListInputDialog.NumberRows.DialogTitle" ),
BaseMessages.getString( PKG, "SharepointListInputDialog.NumberRows.DialogMessage" ) );
int previewSize = numberDialog.open();
if ( previewSize > 0 ) {
input.setChanged();
TransPreviewProgressDialog progressDialog =
new TransPreviewProgressDialog(
shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
if ( !progressDialog.isCancelled() ) {
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if ( trans.getResult() != null && trans.getResult().getNrErrors() > 0 ) {
EnterTextDialog etd =
new EnterTextDialog(
shell, BaseMessages.getString( PKG, "System.Dialog.PreviewError.Title" ), BaseMessages
.getString( PKG, "System.Dialog.PreviewError.Message" ), loggingText, true );
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd =
new PreviewRowsDialog(
shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta( wStepname
.getText() ), progressDialog.getPreviewRows( wStepname.getText() ), loggingText );
prd.open();
}
}
} catch ( KettleException e ) {
new ErrorDialog(
shell, BaseMessages.getString( PKG, "SharepointListInputDialog.ErrorPreviewingData.DialogTitle" ), BaseMessages
.getString( PKG, "SharepointListInputDialog.ErrorPreviewingData.DialogMessage" ), e );
}
}
示例11: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
/**
* Preview the data generated by this step.
* This generates a transformation using this step & a dummy and previews it.
*
*/
private void preview()
{
try
{
// Create the Access input step
SSHMeta oneMeta = new SSHMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, 1,
BaseMessages.getString(PKG, "SSHDialog.NumberRows.DialogTitle"),
BaseMessages.getString(PKG, "SSHDialog.NumberRows.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize>0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
if (!progressDialog.isCancelled())
{
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
{
EnterTextDialog etd = new EnterTextDialog(shell,
BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),
BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true );
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),
progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog
.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
}
catch(KettleException e)
{
new ErrorDialog(shell, "Error", "Error while previewing data", e);
}
}
示例12: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
private void preview()
{
try
{
// Create the RandomCCNumberGeneratorMeta input step
RandomCCNumberGeneratorMeta oneMeta = new RandomCCNumberGeneratorMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "RandomCCNumberGeneratorDialog.NumberRows.DialogTitle"), BaseMessages.getString(PKG, "RandomCCNumberGeneratorDialog.NumberRows.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize>0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
if (!progressDialog.isCancelled())
{
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
{
EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),
BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true );
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),
progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog
.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
}
catch(KettleException e)
{
new ErrorDialog(shell, BaseMessages.getString(PKG, "RandomCCNumberGeneratorDialog.ErrorPreviewingData.DialogTitle"), BaseMessages.getString(PKG, "RandomCCNumberGeneratorDialog.ErrorPreviewingData.DialogMessage"), e);
}
}
示例13: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
private void preview()
{
try
{
// Create the XML input step
RssInputMeta oneMeta = new RssInputMeta();
getInfo(oneMeta);
// check if the path is given
//if (!checkLoopXPath(oneMeta)) return;
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "getXMLDataDialog.NumberRows.DialogTitle"), BaseMessages.getString(PKG, "getXMLDataDialog.NumberRows.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize>0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
if (!progressDialog.isCancelled())
{
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
{
EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),
BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true );
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),
progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog
.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
}
catch(KettleException e)
{
new ErrorDialog(shell, BaseMessages.getString(PKG, "RssInputDialog.ErrorPreviewingData.DialogTitle"), BaseMessages.getString(PKG, "RssInputDialog.ErrorPreviewingData.DialogMessage"), e);
}
}
示例14: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
private void preview() {
try {
// Create the LDIF input step
LDIFInputMeta oneMeta = new LDIFInputMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(
shell,
500,
Messages
.getString("LDIFInputDialog.NumberRows.DialogTitle"),
Messages
.getString("LDIFInputDialog.NumberRows.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize > 0) {
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(
shell, previewMeta,
new String[] { wStepname.getText() },
new int[] { previewSize });
progressDialog.open();
if (!progressDialog.isCancelled()) {
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (trans.getResult() != null
&& trans.getResult().getNrErrors() > 0) {
EnterTextDialog etd = new EnterTextDialog(
shell,
Messages.getString("System.Dialog.PreviewError.Title"),
Messages.getString("System.Dialog.PreviewError.Message"),
loggingText, true);
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),
progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog
.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
} catch (KettleException e) {
new ErrorDialog(
shell,
Messages.getString("LDIFInputDialog.ErrorPreviewingData.DialogTitle"),
Messages.getString("LDIFInputDialog.ErrorPreviewingData.DialogMessage"),e);
}
}
示例15: preview
import org.pentaho.di.trans.Trans; //導入方法依賴的package包/類
private void preview(){
try{
GISFileInputMeta oneMeta = new GISFileInputMeta();
getInfo(oneMeta);
if (oneMeta.isFileNameInField()){
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_INFORMATION);
mb.setMessage(Messages.getString("GISFileInputDialog.Dialog.SpecifyASampleFile.Message")); // Nothing found that matches your criteria
mb.setText(Messages.getString("GISFileInputDialog.Dialog.SpecifyASampleFile.Title")); // Sorry!
mb.open();
return;
}
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), Messages.getString("GISFileInputDialog.PreviewSize.DialogTitle"), Messages.getString("GISFileInputDialog.PreviewSize.DialogMessage")); //$NON-NLS-1$ //$NON-NLS-2$
int previewSize = numberDialog.open();
if (previewSize>0){
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (!progressDialog.isCancelled()){
if (trans.getResult()!=null && trans.getResult().getNrErrors()>0){
EnterTextDialog etd = new EnterTextDialog(shell, Messages.getString("System.Dialog.PreviewError.Title"), //$NON-NLS-1$
Messages.getString("System.Dialog.PreviewError.Message"), loggingText, true ); //$NON-NLS-1$
etd.setReadOnly();
etd.open();
}
}
PreviewRowsDialog prd =new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta(wStepname.getText()), progressDialog.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}catch(Exception e){
new ErrorDialog(shell, Messages.getString("System.Dialog.PreviewError.Title"), //$NON-NLS-1$
Messages.getString("System.Dialog.PreviewError.Message"), e); //$NON-NLS-1$
}
}