Skip to content

Commit

Permalink
Merge pull request apache#3672 from bamaer/master
Browse files Browse the repository at this point in the history
fixed former platform references. apache#3602
  • Loading branch information
usbrandon authored Feb 26, 2024
2 parents 7b90476 + 1a7a84b commit c761a7d
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class AwsSqsReader {
private String awsRegion;
private String awsKeySecret;
private BaseTransform baseTransform;
private PipelineMeta transMeta;
private PipelineMeta pipelineMeta;
private String awsCredChain;
private String deleteMessage;

Expand All @@ -56,7 +56,7 @@ public AwsSqsReader(SqsReaderMeta transformMeta, PipelineMeta t, BaseTransform b

this.meta = transformMeta;
this.baseTransform = bst;
this.transMeta = t;
this.pipelineMeta = t;

this.awsCredChain = this.baseTransform.resolve(meta.getAwsCredChain());
this.awsKey = this.baseTransform.resolve(meta.getAwsKey());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,27 +94,27 @@ public boolean init(){
}

/**
* Once the transformation starts executing, the processRow() method is called repeatedly
* by PDI for as long as it returns true. To indicate that a step has finished processing rows
* Once the pipeline starts executing, the processRow() method is called repeatedly
* by Hop for as long as it returns true. To indicate that a transform has finished processing rows
* this method must call setOutputDone() and return false;
*
* Steps which process incoming rows typically call getRow() to read a single row from the
* Transforms which process incoming rows typically call getRow() to read a single row from the
* input stream, change or add row content, call putRow() to pass the changed row on
* and return true. If getRow() returns null, no more rows are expected to come in,
* and the processRow() implementation calls setOutputDone() and returns false to
* indicate that it is done too.
*
* Steps which generate rows typically construct a new row Object[] using a call to
* Transforms which generate rows typically construct a new row Object[] using a call to
* RowDataUtil.allocateRowData(numberOfFields), add row content, and call putRow() to
* pass the new row on. Above process may happen in a loop to generate multiple rows,
* at the end of which processRow() would call setOutputDone() and return false;
*
* @return true to indicate that the function should be called again, false if the step is done
* @return true to indicate that the function should be called again, false if the transform is done
*/
@Override
public boolean processRow() throws HopException {

// the "first" flag is inherited from the base step implementation
// the "first" flag is inherited from the base transform implementation
// it is used to guard some processing tasks, like figuring out field indexes
// in the row structure that only need to be done once

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class SqsReaderDialog extends BaseTransformDialog implements ITransformDi
*/
private static Class<?> PKG = SqsReaderMeta.class; // for i18n purposes

// this is the object the stores the step's settings
// this is the object the stores the transform's settings
// the dialog reads the settings from it when opening
// the dialog writes the settings to it when confirmed
private SqsReaderMeta meta;
Expand Down Expand Up @@ -115,27 +115,27 @@ public class SqsReaderDialog extends BaseTransformDialog implements ITransformDi
* from/to it.
*
* @param parent the SWT shell to open the dialog in
* @param in the meta object holding the step's settings
* @param transMeta transformation description
* @param sname the step name
* @param in the meta object holding the transform's settings
* @param pipelineMeta pipeline description
* @param sname the transform name
*/
public SqsReaderDialog(Shell parent, IVariables variables, Object in, PipelineMeta transMeta, String sname) {
super(parent, variables, (BaseTransformMeta) in, transMeta, sname);
public SqsReaderDialog(Shell parent, IVariables variables, Object in, PipelineMeta pipelineMeta, String sname) {
super(parent, variables, (BaseTransformMeta) in, pipelineMeta, sname);
meta = (SqsReaderMeta) in;
}

/**
* This method is called by Spoon when the user opens the settings dialog of the step.
* This method is called by Hop Gui when the user opens the settings dialog of the transform.
* It should open the dialog and return only once the dialog has been closed by the user.
*
* If the user confirms the dialog, the meta object (passed in the constructor) must
* be updated to reflect the new step settings. The changed flag of the meta object must
* reflect whether the step configuration was changed by the dialog.
* be updated to reflect the new transform settings. The changed flag of the meta object must
* reflect whether the transform configuration was changed by the dialog.
*
* If the user cancels the dialog, the meta object must not be updated, and its changed flag
* must remain unaltered.
*
* The open() method must return the name of the step after the user has confirmed the dialog,
* The open() method must return the name of the transform after the user has confirmed the dialog,
* or null if the user cancelled the dialog.
*/
public String open() {
Expand All @@ -151,7 +151,7 @@ public String open() {

// Save the value of the changed flag on the meta object. If the user cancels
// the dialog, it will be restored to this saved value.
// The "changed" variable is inherited from BaseStepDialog
// The "changed" variable is inherited from BaseTransformDialog
changed = meta.hasChanged();

// The ModifyListener used on all controls. It will update the meta object to
Expand Down Expand Up @@ -602,7 +602,7 @@ public void modifyText(ModifyEvent arg0) {
});

// Set/Restore the dialog size based on last position on screen
// The setSize() method is inherited from BaseStepDialog
// The setSize() method is inherited from BaseTransformDialog
setSize();

// populate the dialog with the values from the meta object
Expand Down Expand Up @@ -691,7 +691,7 @@ private void populateAWSRegion(ComboVar tAWSRegion2) {
}

/**
* This helper method puts the step configuration stored in the meta object
* This helper method puts the transform configuration stored in the meta object
* and puts it into the dialog controls.
*/
private void populateDialog() {
Expand Down Expand Up @@ -732,7 +732,7 @@ private void cancel() {
*/
private void ok() {
// The "transformName" variable will be the return value for the open() method.
// Setting to step name from the dialog control
// Setting to transform name from the dialog control
transformName = wTransformName.getText();

// Setting the settings to the meta object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
image = "aws-sqs.svg",
name= "i18n::SQSReaderTransform.Name",
description = "i18n::SQSReaderTransform.TooltipDesc",
categoryDescription="i18n:org.pentaho.di.trans.step:BaseStep.Category.Input",
categoryDescription="i18n:org.apache.hop.pipeline.transform:BaseTransform.Category.Input",
keywords = "",
documentationUrl="/pipeline/transforms/aws-sqs-reader.html"
)
Expand Down Expand Up @@ -116,8 +116,8 @@ public SqsReaderMeta() {
}

/**
* This method is called every time a new step is created and should allocate/set the step configuration
* to sensible defaults. The values set here will be used by Spoon when a new step is created.
* This method is called every time a new transform is created and should allocate/set the transform configuration
* to sensible defaults. The values set here will be used by Hop Gui when a new transform is created.
*/
public void setDefault() {
// outputField = "demo_field";
Expand Down Expand Up @@ -220,11 +220,11 @@ public void setTFldMaxMessages(String tFldMaxMessages) {
}

/**
* This method is used when a step is duplicated in Spoon. It needs to return a deep copy of this
* step meta object. Be sure to create proper deep copies if the step configuration is stored in
* This method is used when a transform is duplicated in Hop Gui. It needs to return a deep copy of this
* transform meta object. Be sure to create proper deep copies if the transform configuration is stored in
* modifiable objects.
*
* See org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta.clone() for an example on creating
* See org.apache.hop.pipeline.transforms.rowgenerator.RowGeneratorMeta.clone() for an example on creating
* a deep copy.
*
* @return a deep copy of this
Expand All @@ -235,15 +235,15 @@ public Object clone() {
}

/**
* This method is called to determine the changes the step is making to the row-stream.
* This method is called to determine the changes the transform is making to the row-stream.
* To that end a RowMetaInterface object is passed in, containing the row-stream structure as it is when entering
* the step. This method must apply any changes the step makes to the row stream. Usually a step adds fields to the
* the transform. This method must apply any changes the transform makes to the row stream. Usually a transform adds fields to the
* row-stream.
*
* @param inputRowMeta the row structure coming in to the step
* @param origin the origin of the step making the changes
* @param info row structures of any info steps coming in
* @param nextTransform the description of a step this step is passing rows to
* @param inputRowMeta the row structure coming in to the transform
* @param origin the origin of the transform making the changes
* @param info row structures of any info transforms coming in
* @param nextTransform the description of a transform this transform is passing rows to
* @param variables the variable variables for resolving variables
* @param metadataProvider the metadataProvider to optionally read from
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SQSReader.Log.NoMessageFields.ERROR=Please enter fieldnames for the Message Body
SQSReader.Log.MaxMessagesNumber.ERROR=Max Messages Value is not a valid number (>= 0)

SQSReaderTransform.Name=AWS SQS Reader
SQSReaderTransform.TooltipDesc=This step is for reading messages from AWS Simple Notification Service
SQSReaderTransform.TooltipDesc=This transform is for reading messages from AWS Simple Notification Service

SQSReaderTransform.Settings.Title=AWS Settings
SQSReaderTransform.Settings.AWSCredChain.Label=Use AWS Credentials Provider Chain?
Expand Down

0 comments on commit c761a7d

Please sign in to comment.