Skip to content
Browse files

Version for Kettle 4.3

  • Loading branch information...
1 parent bad30da commit be2073b34b60dc9d22e61d385916d0034daec2e7 Bertrand Paquet committed Jul 6, 2012
View
4 Readme.markdown
@@ -22,4 +22,6 @@ It's an advanced http connector.
# For which version
-Created and tested for Kettle 3.2.0
+Created and tested for Kettle 3.2.0
+
+The 4.3_0.94 and upper version should be compatible with Kettle 4.3, but I do not test all features.
View
BIN advanced_http.4.3_0.94.zip
Binary file not shown.
View
2 build.xml
@@ -15,7 +15,7 @@
</fileset>
<filelist>
<file name="${pdi_home}/libswt/osx/swt.jar" />
- <file name="${pdi_home}/libext/commons/commons-httpclient-3.0.1.jar" />
+ <file name="${pdi_home}/libext/commons/commons-httpclient-3.1.jar" />
</filelist>
</path>
View
540 src/com/bpa/pentaho/plugins/AdvancedHTTP.java
@@ -13,9 +13,7 @@
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.StringRequestEntity;
import org.apache.commons.httpclient.params.HttpConnectionParams;
-import org.apache.commons.httpclient.params.HttpParams;
import org.apache.commons.httpclient.protocol.Protocol;
-import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
import org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory;
import org.apache.commons.httpclient.util.URIUtil;
import org.pentaho.di.core.Const;
@@ -33,312 +31,318 @@
import org.pentaho.di.trans.step.StepMeta;
import org.pentaho.di.trans.step.StepMetaInterface;
-public class AdvancedHTTP extends BaseStep implements StepInterface
-{
+public class AdvancedHTTP extends BaseStep implements StepInterface {
private AdvancedHTTPMeta meta;
private AdvancedHTTPData data;
-
- public AdvancedHTTP(StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta, Trans trans)
- {
+
+ public AdvancedHTTP(StepMeta stepMeta, StepDataInterface stepDataInterface,
+ int copyNr, TransMeta transMeta, Trans trans) {
super(stepMeta, stepDataInterface, copyNr, transMeta, trans);
}
-
- private Object[] execHttp(RowMetaInterface rowMeta, Object[] row) throws KettleException
- {
- if (first)
- {
- first=false;
- data.argnrs=new int[meta.getArgumentField().length];
-
- for (int i=0;i<meta.getArgumentField().length;i++)
- {
- data.argnrs[i]=rowMeta.indexOfValue(meta.getArgumentField()[i]);
- if (data.argnrs[i]<0)
- {
- logError(Messages.getString("AdvancedHTTP.Log.ErrorFindingField")+meta.getArgumentField()[i]+"]"); //$NON-NLS-1$ //$NON-NLS-2$
- throw new KettleStepException(Messages.getString("AdvancedHTTP.Exception.CouldnotFindField",meta.getArgumentField()[i])); //$NON-NLS-1$ //$NON-NLS-2$
+
+ private Object[] execHttp(RowMetaInterface rowMeta, Object[] row)
+ throws KettleException {
+ if (first) {
+ first = false;
+ data.argnrs = new int[meta.getArgumentField().length];
+
+ for (int i = 0; i < meta.getArgumentField().length; i++) {
+ data.argnrs[i] = rowMeta
+ .indexOfValue(meta.getArgumentField()[i]);
+ if (data.argnrs[i] < 0) {
+ logError(Messages
+ .getString("AdvancedHTTP.Log.ErrorFindingField") + meta.getArgumentField()[i] + "]"); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new KettleStepException(
+ Messages.getString(
+ "AdvancedHTTP.Exception.CouldnotFindField", meta.getArgumentField()[i])); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
- return callHttpService(rowMeta, row);
+ return callHttpService(rowMeta, row);
}
-
- private Object[] makeResponse(RowMetaInterface rowMeta, Object[] rowData, String body, int code, long startTime, long requestTime) {
- Object [] tmp = rowData;
+
+ private Object[] makeResponse(RowMetaInterface rowMeta, Object[] rowData,
+ String body, int code, long startTime, long requestTime) {
+ Object[] tmp = rowData;
tmp = RowDataUtil.addValueData(tmp, rowMeta.size(), body);
tmp = RowDataUtil.addValueData(tmp, rowMeta.size() + 1, new Long(code));
- tmp = RowDataUtil.addValueData(tmp, rowMeta.size() + 2, new Date(startTime));
- tmp = RowDataUtil.addValueData(tmp, rowMeta.size() + 3, new Long(requestTime));
+ tmp = RowDataUtil.addValueData(tmp, rowMeta.size() + 2, new Date(
+ startTime));
+ tmp = RowDataUtil.addValueData(tmp, rowMeta.size() + 3, new Long(
+ requestTime));
return tmp;
}
-
- private Object[] callHttpService(RowMetaInterface rowMeta, Object[] rowData) throws KettleException
- {
- String url = initUrl(rowMeta, rowData);
- long start = System.currentTimeMillis();
- try
- {
- if(log.isDetailed()) logDetailed(Messages.getString("AdvancedHTTP.Log.Connecting",url));
-
- Protocol protocol = new Protocol("https", meta.isOnlySSLv3() ? new SSLV3ProctocolSocketFactory() : new SSLProtocolSocketFactory(), 443);
- Protocol.registerProtocol("https", protocol);
-
- // Prepare HTTP get
- //
- HttpClient httpclient = new HttpClient();
- if (meta.getHttpConnectionTimeout() != -1) {
- httpclient.getParams().setParameter(HttpConnectionParams.CONNECTION_TIMEOUT, meta.getHttpConnectionTimeout());
- }
- if (meta.getHttpTimeout() != -1) {
- httpclient.getParams().setParameter(HttpConnectionParams.SO_TIMEOUT, meta.getHttpTimeout());
- }
-
- // Basic auth
- if (meta.isUseBasicAuth()) {
- AuthScope authScope = new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT);
- Credentials credentials = new UsernamePasswordCredentials(environmentSubstitute(meta.getBasicAuthLogin()), environmentSubstitute(meta.getBasicAuthPassword()));
- httpclient.getState().setCredentials(authScope, credentials);
- }
-
- // ssl force check
- if (!meta.isStrictSSLCheck()) {
- SSL.disableSSLCheck();
- }
-
- HttpMethod method = null;
- if (AdvancedHTTPMeta.HTTP_CALL_TYPE_GET.equals(meta.getHttpCallType())) {
- String suffix = getParams(rowMeta, rowData);
- String getUrl = url;
- if (suffix.length() > 0) {
- if (getUrl.indexOf("?")<0)
- {
- getUrl += "?" + suffix;
- }
- else
- {
- getUrl += "&" + suffix;
- }
- }
- if(log.isDetailed()) logDetailed(Messages.getString("AdvancedHTTP.Log.GetUrl",getUrl));
- method = new GetMethod(getUrl);
- }
- else if (AdvancedHTTPMeta.HTTP_CALL_TYPE_POST_FORM.equals(meta.getHttpCallType())) {
- PostMethod postMethod = new PostMethod(url);
- if(log.isDetailed()) logDetailed(Messages.getString("AdvancedHTTP.Log.PostUrl",url));
- String body = getParams(rowMeta, rowData);
- if(log.isDetailed()) logDetailed(Messages.getString("AdvancedHTTP.Log.PostBody",body));
- postMethod.addRequestHeader(new Header("Content-Type", "application/x-www-form-urlencoded"));
- postMethod.setRequestEntity(new StringRequestEntity(body));
- method = postMethod;
- }
- else {
- throw new KettleException("Unknown http call type " + meta.getHttpCallType());
- }
-
- // Execute request
- //
- try
- {
- int result = httpclient.executeMethod(method);
-
- // The status code
- if (log.isDebug()) log.logDebug(toString(), Messages.getString("AdvancedHTTP.Log.ResponseStatusCode", ""+result));
-
- // the response
- InputStream inputStream = method.getResponseBodyAsStream();
- StringBuffer bodyBuffer = new StringBuffer();
- int c;
- while ( (c=inputStream.read())!=-1) bodyBuffer.append((char)c);
- inputStream.close();
-
- long stop = System.currentTimeMillis();
-
- String body = bodyBuffer.toString();
- if (log.isDebug()) log.logDebug(toString(), "Response body: "+body);
-
- return makeResponse(rowMeta, rowData, body, result, start, stop-start);
- }
- finally
- {
- // Release current connection to the connection pool once you are done
- method.releaseConnection();
- }
- }
- catch(Exception e)
- {
- if (meta.isFailOnError()) {
- throw new KettleException(Messages.getString("AdvancedHTTP.Log.UnableGetResult",url), e);
- }
- else {
- return makeResponse(rowMeta, rowData, e.getMessage(), -1, start, -1);
- }
- }
- }
-
- private String initUrl(RowMetaInterface outputRowMeta, Object[] row) throws KettleValueException, KettleException {
- try
- {
- if(meta.isUrlInField())
- {
- // get dynamic url
- data.realUrl=outputRowMeta.getString(row,data.indexOfUrlField);
- }
- return data.realUrl;
- }
- catch(Exception e)
- {
- throw new KettleException(Messages.getString("AdvancedHTTP.Log.UnableCreateUrl"), e);
- }
+
+ private Object[] callHttpService(RowMetaInterface rowMeta, Object[] rowData)
+ throws KettleException {
+ String url = initUrl(rowMeta, rowData);
+ long start = System.currentTimeMillis();
+ try {
+ if (log.isDetailed())
+ logDetailed(Messages.getString("AdvancedHTTP.Log.Connecting",
+ url));
+
+ Protocol protocol = new Protocol("https",
+ meta.isOnlySSLv3() ? new SSLV3ProctocolSocketFactory()
+ : new SSLProtocolSocketFactory(), 443);
+ Protocol.registerProtocol("https", protocol);
+
+ // Prepare HTTP get
+ //
+ HttpClient httpclient = new HttpClient();
+ if (meta.getHttpConnectionTimeout() != -1) {
+ httpclient.getParams().setParameter(
+ HttpConnectionParams.CONNECTION_TIMEOUT,
+ meta.getHttpConnectionTimeout());
+ }
+ if (meta.getHttpTimeout() != -1) {
+ httpclient.getParams().setParameter(
+ HttpConnectionParams.SO_TIMEOUT, meta.getHttpTimeout());
+ }
+
+ // Basic auth
+ if (meta.isUseBasicAuth()) {
+ AuthScope authScope = new AuthScope(AuthScope.ANY_HOST,
+ AuthScope.ANY_PORT);
+ Credentials credentials = new UsernamePasswordCredentials(
+ environmentSubstitute(meta.getBasicAuthLogin()),
+ environmentSubstitute(meta.getBasicAuthPassword()));
+ httpclient.getState().setCredentials(authScope, credentials);
+ }
+
+ // ssl force check
+ if (!meta.isStrictSSLCheck()) {
+ SSL.disableSSLCheck();
+ }
+
+ HttpMethod method = null;
+ if (AdvancedHTTPMeta.HTTP_CALL_TYPE_GET.equals(meta
+ .getHttpCallType())) {
+ String suffix = getParams(rowMeta, rowData);
+ String getUrl = url;
+ if (suffix.length() > 0) {
+ if (getUrl.indexOf("?") < 0) {
+ getUrl += "?" + suffix;
+ } else {
+ getUrl += "&" + suffix;
+ }
+ }
+ if (log.isDetailed())
+ logDetailed(Messages.getString("AdvancedHTTP.Log.GetUrl",
+ getUrl));
+ method = new GetMethod(getUrl);
+ } else if (AdvancedHTTPMeta.HTTP_CALL_TYPE_POST_FORM.equals(meta
+ .getHttpCallType())) {
+ PostMethod postMethod = new PostMethod(url);
+ if (log.isDetailed())
+ logDetailed(Messages.getString("AdvancedHTTP.Log.PostUrl",
+ url));
+ String body = getParams(rowMeta, rowData);
+ if (log.isDetailed())
+ logDetailed(Messages.getString("AdvancedHTTP.Log.PostBody",
+ body));
+ postMethod.addRequestHeader(new Header("Content-Type",
+ "application/x-www-form-urlencoded"));
+ postMethod.setRequestEntity(new StringRequestEntity(body));
+ method = postMethod;
+ } else {
+ throw new KettleException("Unknown http call type "
+ + meta.getHttpCallType());
+ }
+
+ // Execute request
+ //
+ try {
+ int result = httpclient.executeMethod(method);
+
+ // The status code
+ if (log.isDebug())
+ log.logDebug(toString(), Messages.getString(
+ "AdvancedHTTP.Log.ResponseStatusCode", "" + result));
+
+ // the response
+ InputStream inputStream = method.getResponseBodyAsStream();
+ StringBuffer bodyBuffer = new StringBuffer();
+ int c;
+ while ((c = inputStream.read()) != -1)
+ bodyBuffer.append((char) c);
+ inputStream.close();
+
+ long stop = System.currentTimeMillis();
+
+ String body = bodyBuffer.toString();
+ if (log.isDebug())
+ log.logDebug(toString(), "Response body: " + body);
+
+ return makeResponse(rowMeta, rowData, body, result, start, stop
+ - start);
+ } finally {
+ // Release current connection to the connection pool once you
+ // are done
+ method.releaseConnection();
+ }
+ } catch (Exception e) {
+ if (meta.isFailOnError()) {
+ throw new KettleException(Messages.getString(
+ "AdvancedHTTP.Log.UnableGetResult", url), e);
+ } else {
+ return makeResponse(rowMeta, rowData, e.getMessage(), -1,
+ start, -1);
+ }
+ }
+ }
+
+ private String initUrl(RowMetaInterface outputRowMeta, Object[] row)
+ throws KettleValueException, KettleException {
+ try {
+ if (meta.isUrlInField()) {
+ // get dynamic url
+ data.realUrl = outputRowMeta.getString(row,
+ data.indexOfUrlField);
+ }
+ return data.realUrl;
+ } catch (Exception e) {
+ throw new KettleException(
+ Messages.getString("AdvancedHTTP.Log.UnableCreateUrl"), e);
+ }
+ }
+
+ private String getParams(RowMetaInterface outputRowMeta, Object[] row)
+ throws KettleValueException, KettleException {
+ try {
+ StringBuffer url = new StringBuffer("");
+
+ for (int i = 0; i < data.argnrs.length; i++) {
+ if (i != 0) {
+ url.append('&');
+ }
+
+ url.append(URIUtil.encodeWithinQuery(meta
+ .getArgumentParameter()[i]));
+ url.append('=');
+ String s = null;
+ if (outputRowMeta.getValueMeta(data.argnrs[i]).getType() == ValueMeta.TYPE_STRING) {
+ s = outputRowMeta.getString(row, data.argnrs[i]);
+ } else if (outputRowMeta.getValueMeta(data.argnrs[i]).getType() == ValueMeta.TYPE_INTEGER) {
+ s = outputRowMeta.getInteger(row, data.argnrs[i])
+ .toString();
+ } else {
+ throw new KettleException(Messages.getString(
+ "AdvancedHTTP.Log.NotManagedParameterType",
+ outputRowMeta.getValueMeta(data.argnrs[i])
+ .toString()));
+ }
+ s = URIUtil.encodeWithinQuery(s);
+ url.append(s);
+ }
+
+ return url.toString();
+ } catch (Exception e) {
+ throw new KettleException(
+ Messages.getString("AdvancedHTTP.Log.UnableCreateUrl"), e);
+ }
}
-
- private String getParams(RowMetaInterface outputRowMeta, Object[] row) throws KettleValueException, KettleException
- {
- try
- {
- StringBuffer url = new StringBuffer("");
-
- for (int i=0;i<data.argnrs.length;i++)
- {
- if (i!=0)
- {
- url.append('&');
- }
-
- url.append(URIUtil.encodeWithinQuery(meta.getArgumentParameter()[i]));
- url.append('=');
- String s = null;
- if (outputRowMeta.getValueMeta(data.argnrs[i]).getType() == ValueMeta.TYPE_STRING) {
- s = outputRowMeta.getString(row, data.argnrs[i]);
- }
- else if (outputRowMeta.getValueMeta(data.argnrs[i]).getType() == ValueMeta.TYPE_INTEGER) {
- s = outputRowMeta.getInteger(row, data.argnrs[i]).toString();
- }
- else {
- throw new KettleException(Messages.getString("AdvancedHTTP.Log.NotManagedParameterType", outputRowMeta.getValueMeta(data.argnrs[i]).toString()));
- }
- s = URIUtil.encodeWithinQuery(s);
- url.append(s);
- }
-
- return url.toString();
- }
- catch(Exception e)
- {
- throw new KettleException(Messages.getString("AdvancedHTTP.Log.UnableCreateUrl"), e);
- }
- }
-
- public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
- {
- meta=(AdvancedHTTPMeta)smi;
- data=(AdvancedHTTPData)sdi;
-
- boolean sendToErrorRow=false;
- String errorMessage = null;
-
- Object[] r=getRow(); // Get row from input rowset & set row busy!
- if (r==null) // no more input to be expected...
+
+ public boolean processRow(StepMetaInterface smi, StepDataInterface sdi)
+ throws KettleException {
+ meta = (AdvancedHTTPMeta) smi;
+ data = (AdvancedHTTPData) sdi;
+
+ boolean sendToErrorRow = false;
+ String errorMessage = null;
+
+ Object[] r = getRow(); // Get row from input rowset & set row busy!
+ if (r == null) // no more input to be expected...
{
setOutputDone();
return false;
}
-
- if ( first )
- {
+
+ if (first) {
data.outputRowMeta = getInputRowMeta().clone();
meta.getFields(data.outputRowMeta, getStepname(), null, null, this);
-
- if(meta.isUrlInField())
- {
- if(Const.isEmpty(meta.getUrlField()))
- {
+
+ if (meta.isUrlInField()) {
+ if (Const.isEmpty(meta.getUrlField())) {
logError(Messages.getString("AdvancedHTTP.Log.NoField"));
- throw new KettleException(Messages.getString("AdvancedHTTP.Log.NoField"));
+ throw new KettleException(
+ Messages.getString("AdvancedHTTP.Log.NoField"));
}
-
- // cache the position of the field
- if (data.indexOfUrlField<0)
- {
- String realUrlfieldName=environmentSubstitute(meta.getUrlField());
- data.indexOfUrlField =getInputRowMeta().indexOfValue(realUrlfieldName);
- if (data.indexOfUrlField<0)
- {
+
+ // cache the position of the field
+ if (data.indexOfUrlField < 0) {
+ String realUrlfieldName = environmentSubstitute(meta
+ .getUrlField());
+ data.indexOfUrlField = getInputRowMeta().indexOfValue(
+ realUrlfieldName);
+ if (data.indexOfUrlField < 0) {
// The field is unreachable !
- logError(Messages.getString("AdvancedHTTP.Log.ErrorFindingField",realUrlfieldName));
- throw new KettleException(Messages.getString("AdvancedHTTP.Exception.ErrorFindingField",realUrlfieldName));
+ logError(Messages.getString(
+ "AdvancedHTTP.Log.ErrorFindingField",
+ realUrlfieldName));
+ throw new KettleException(Messages.getString(
+ "AdvancedHTTP.Exception.ErrorFindingField",
+ realUrlfieldName));
}
}
- }else
- {
- data.realUrl=environmentSubstitute(meta.getUrl());
+ } else {
+ data.realUrl = environmentSubstitute(meta.getUrl());
}
}
-
- try
- {
- Object[] outputRowData = execHttp(getInputRowMeta(), r); // add new values to the row
- putRow(data.outputRowMeta, outputRowData); // copy row to output rowset(s);
-
- if (checkFeedback(getLinesRead()))
- {
- if(log.isDetailed()) logDetailed(Messages.getString("AdvancedHTTP.LineNumber")+getLinesRead()); //$NON-NLS-1$
- }
- }
- catch(KettleException e)
- {
- if (getStepMeta().isDoingErrorHandling())
- {
- sendToErrorRow = true;
- errorMessage = e.toString();
- }
- else
- {
- logError(Messages.getString("AdvancedHTTP.ErrorInStepRunning")+e.getMessage()); //$NON-NLS-1$
+
+ try {
+ Object[] outputRowData = execHttp(getInputRowMeta(), r); // add new
+ // values
+ // to
+ // the
+ // row
+ putRow(data.outputRowMeta, outputRowData); // copy row to output
+ // rowset(s);
+
+ if (checkFeedback(getLinesRead())) {
+ if (log.isDetailed())
+ logDetailed(Messages.getString("AdvancedHTTP.LineNumber") + getLinesRead()); //$NON-NLS-1$
+ }
+ } catch (KettleException e) {
+ if (getStepMeta().isDoingErrorHandling()) {
+ sendToErrorRow = true;
+ errorMessage = e.toString();
+ } else {
+ logError(Messages.getString("AdvancedHTTP.ErrorInStepRunning") + e.getMessage()); //$NON-NLS-1$
setErrors(1);
stopAll();
- setOutputDone(); // signal end to receiver(s)
+ setOutputDone(); // signal end to receiver(s)
return false;
}
- if (sendToErrorRow)
- {
- // Simply add this row to the error row
+ if (sendToErrorRow) {
+ // Simply add this row to the error row
putError(getInputRowMeta(), r, 1, errorMessage, null, "HTTP001");
- }
+ }
}
-
+
return true;
}
-
- public boolean init(StepMetaInterface smi, StepDataInterface sdi)
- {
- meta=(AdvancedHTTPMeta)smi;
- data=(AdvancedHTTPData)sdi;
- if (super.init(smi, sdi))
- {
- return true;
+ public boolean init(StepMetaInterface smi, StepDataInterface sdi) {
+ meta = (AdvancedHTTPMeta) smi;
+ data = (AdvancedHTTPData) sdi;
+
+ if (super.init(smi, sdi)) {
+ return true;
}
return false;
}
-
- public void dispose(StepMetaInterface smi, StepDataInterface sdi)
- {
- meta = (AdvancedHTTPMeta)smi;
- data = (AdvancedHTTPData)sdi;
-
- super.dispose(smi, sdi);
+
+ public void dispose(StepMetaInterface smi, StepDataInterface sdi) {
+ meta = (AdvancedHTTPMeta) smi;
+ data = (AdvancedHTTPData) sdi;
+
+ super.dispose(smi, sdi);
}
-
- public String toString()
- {
+
+ public String toString() {
return this.getClass().getName();
}
-
- //
- // Run is were the action happens!
- public void run()
- {
- BaseStep.runStepThread(this, meta, data);
- }
+
}
View
6 src/com/bpa/pentaho/plugins/AdvancedHTTPDialog.java
@@ -578,7 +578,7 @@ public void run()
}
catch(KettleException e)
{
- log.logError(toString(), Messages.getString("System.Dialog.GetFieldsFailed.Message"));
+ logError(toString(), Messages.getString("System.Dialog.GetFieldsFailed.Message"));
}
}
}
@@ -684,7 +684,7 @@ private void activeBasicAuthFields() {
public void getData()
{
int i;
- log.logDebug(toString(), Messages.getString("AdvancedHTTPDialog.Log.GettingKeyInfo")); //$NON-NLS-1$
+ logDebug(toString(), Messages.getString("AdvancedHTTPDialog.Log.GettingKeyInfo")); //$NON-NLS-1$
if (input.getArgumentField()!=null)
for (i=0;i<input.getArgumentField().length;i++)
@@ -734,7 +734,7 @@ private void ok()
input.allocate(nrargs);
- log.logDebug(toString(), Messages.getString("AdvancedHTTPDialog.Log.FoundArguments",String.valueOf(nrargs))); //$NON-NLS-1$ //$NON-NLS-2$
+ logDebug(toString(), Messages.getString("AdvancedHTTPDialog.Log.FoundArguments",String.valueOf(nrargs))); //$NON-NLS-1$ //$NON-NLS-2$
for (int i=0;i<nrargs;i++)
{
TableItem item = wFields.getNonEmpty(i);
View
5 src/com/bpa/pentaho/plugins/AdvancedHTTPMeta.java
@@ -16,6 +16,7 @@
import org.pentaho.di.core.row.ValueMetaInterface;
import org.pentaho.di.core.variables.VariableSpace;
import org.pentaho.di.core.xml.XMLHandler;
+import org.pentaho.di.repository.ObjectId;
import org.pentaho.di.repository.Repository;
import org.pentaho.di.shared.SharedObjectInterface;
import org.pentaho.di.trans.Trans;
@@ -507,7 +508,7 @@ private void readData(Node stepnode, List<? extends SharedObjectInterface> datab
}
}
- public void readRep(Repository rep, long id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException
+ public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException
{
try
{
@@ -552,7 +553,7 @@ public void readRep(Repository rep, long id_step, List<DatabaseMeta> databases,
}
}
- public void saveRep(Repository rep, long id_transformation, long id_step) throws KettleException
+ public void saveRep(Repository rep, ObjectId id_transformation, ObjectId id_step) throws KettleException
{
try
{
View
16 src/com/bpa/pentaho/plugins/Messages.java
@@ -4,40 +4,40 @@
public class Messages
{
- public static final String packageName = Messages.class.getPackage().getName();
+ public static final Class<?> clazz = Messages.class;
public static String getString(String key)
{
- return BaseMessages.getString(packageName, key);
+ return BaseMessages.getString(clazz, key);
}
public static String getString(String key, String param1)
{
- return BaseMessages.getString(packageName, key, param1);
+ return BaseMessages.getString(clazz, key, param1);
}
public static String getString(String key, String param1, String param2)
{
- return BaseMessages.getString(packageName, key, param1, param2);
+ return BaseMessages.getString(clazz, key, param1, param2);
}
public static String getString(String key, String param1, String param2, String param3)
{
- return BaseMessages.getString(packageName, key, param1, param2, param3);
+ return BaseMessages.getString(clazz, key, param1, param2, param3);
}
public static String getString(String key, String param1, String param2, String param3, String param4)
{
- return BaseMessages.getString(packageName, key, param1, param2, param3, param4);
+ return BaseMessages.getString(clazz, key, param1, param2, param3, param4);
}
public static String getString(String key, String param1, String param2, String param3, String param4, String param5)
{
- return BaseMessages.getString(packageName, key, param1, param2, param3, param4, param5);
+ return BaseMessages.getString(clazz, key, param1, param2, param3, param4, param5);
}
public static String getString(String key, String param1, String param2, String param3, String param4, String param5, String param6)
{
- return BaseMessages.getString(packageName, key, param1, param2, param3, param4, param5, param6);
+ return BaseMessages.getString(clazz, key, param1, param2, param3, param4, param5, param6);
}
}

0 comments on commit be2073b

Please sign in to comment.
Something went wrong with that request. Please try again.