當前位置: 首頁>>代碼示例>>Java>>正文


Java StepMetaInterface.getDialogClassName方法代碼示例

本文整理匯總了Java中org.pentaho.di.trans.step.StepMetaInterface.getDialogClassName方法的典型用法代碼示例。如果您正苦於以下問題:Java StepMetaInterface.getDialogClassName方法的具體用法?Java StepMetaInterface.getDialogClassName怎麽用?Java StepMetaInterface.getDialogClassName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.pentaho.di.trans.step.StepMetaInterface的用法示例。


在下文中一共展示了StepMetaInterface.getDialogClassName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getStepEntryDialog

import org.pentaho.di.trans.step.StepMetaInterface; //導入方法依賴的package包/類
public StepDialogInterface getStepEntryDialog(StepMetaInterface stepMeta, TransMeta transMeta,
		String stepName)
{

	String dialogClassName = stepMeta.getDialogClassName();
	try
	{
		Class<?> dialogClass;
		Class<?>[] paramClasses = new Class[] { spoon.getShell().getClass(), Object.class,
				TransMeta.class, String.class };
		Object[] paramArgs = new Object[] { spoon.getShell(), stepMeta, transMeta, stepName };
		Constructor<?> dialogConstructor;
		dialogClass = stepMeta.getClass().getClassLoader().loadClass(dialogClassName);
		dialogConstructor = dialogClass.getConstructor(paramClasses);
		return (StepDialogInterface) dialogConstructor.newInstance(paramArgs);
	} catch (Throwable t)
	{
		spoon.getLog().logError(spoon.toString(), "Could not create dialog for " + dialogClassName, t);
	}
	return null;
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:22,代碼來源:SpoonJobDelegate.java

示例2: getStepEntryDialog

import org.pentaho.di.trans.step.StepMetaInterface; //導入方法依賴的package包/類
public StepDialogInterface getStepEntryDialog(StepMetaInterface stepMeta, TransMeta transMeta,
		String stepName) throws KettleException
{

	String dialogClassName = stepMeta.getDialogClassName();

	Class<?> dialogClass;
	Class<?>[] paramClasses = new Class[] { Shell.class, Object.class, TransMeta.class, String.class };
	Object[] paramArgs = new Object[] { spoon.getShell(), stepMeta, transMeta, stepName };
	Constructor<?> dialogConstructor;
	try
	{
		dialogClass = stepMeta.getClass().getClassLoader().loadClass(dialogClassName);
		dialogConstructor = dialogClass.getConstructor(paramClasses);
		return (StepDialogInterface) dialogConstructor.newInstance(paramArgs);
	} catch (Exception e)
	{
		// try the old way for compatibility 
		Method method = null;
			try {
				Class<?> sig[] = new Class[] {Shell.class, StepMetaInterface.class, TransMeta.class, String.class};
				method = stepMeta.getClass().getDeclaredMethod( "getDialog", sig );
				if( method != null ) {
					return (StepDialogInterface) method.invoke( stepMeta, new Object[] { spoon.getShell(), stepMeta, transMeta, stepName } );
				}
			} catch (Throwable t) {
			}

		throw new KettleException(e);
	}

}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:33,代碼來源:SpoonStepsDelegate.java

示例3: getStepEntryDialog

import org.pentaho.di.trans.step.StepMetaInterface; //導入方法依賴的package包/類
public StepDialogInterface getStepEntryDialog(StepMetaInterface stepMeta, TransMeta transMeta,
		String stepName) throws KettleException
{
	String dialogClassName = stepMeta.getDialogClassName();

	Class<?> dialogClass;
	Class<?>[] paramClasses = new Class[] { Shell.class, Object.class, TransMeta.class, String.class };
	Object[] paramArgs = new Object[] { spoon.getShell(), stepMeta, transMeta, stepName };
	Constructor<?> dialogConstructor;
	try
	{
		dialogClass = stepMeta.getClass().getClassLoader().loadClass(dialogClassName);
		dialogConstructor = dialogClass.getConstructor(paramClasses);
		return (StepDialogInterface) dialogConstructor.newInstance(paramArgs);
	} catch (Exception e)
	{
		// try the old way for compatibility 
		Method method = null;
			try {
				Class<?> sig[] = new Class[] {Shell.class, StepMetaInterface.class, TransMeta.class, String.class};
				method = stepMeta.getClass().getDeclaredMethod( "getDialog", sig );
				if( method != null ) {
					return (StepDialogInterface) method.invoke( stepMeta, new Object[] { spoon.getShell(), stepMeta, transMeta, stepName } );
				}
			} catch (Throwable t) {
			}

		throw new KettleException(e);
	}

}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:32,代碼來源:SpoonStepsDelegate.java


注:本文中的org.pentaho.di.trans.step.StepMetaInterface.getDialogClassName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。