Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* Copyright (C) 2006-2026 Talend Inc. - www.talend.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.talend.sdk.component.test.connectors.config;

import java.io.Serializable;

import org.talend.sdk.component.api.configuration.Option;
import org.talend.sdk.component.api.configuration.ui.layout.GridLayout;
import org.talend.sdk.component.api.meta.Documentation;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@GridLayout({
@GridLayout.Row({ "dataset" }),
@GridLayout.Row({ "debug" })
})
@Documentation("Configuration used by the simple input emitter.")
public class SimpleInputConfiguration implements Serializable {

@Option
@Documentation("The simple input dataset.")
private SimpleInputDataset dataset;

@Option
@Documentation("Is it in debug mode.")
private boolean debug;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* Copyright (C) 2006-2026 Talend Inc. - www.talend.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.talend.sdk.component.test.connectors.config;

import java.io.Serializable;

import org.talend.sdk.component.api.configuration.Option;
import org.talend.sdk.component.api.configuration.type.DataSet;
import org.talend.sdk.component.api.configuration.ui.DefaultValue;
import org.talend.sdk.component.api.configuration.ui.layout.GridLayout;
import org.talend.sdk.component.api.meta.Documentation;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@DataSet("dataset")
@GridLayout({
@GridLayout.Row({ "datastore" }),
@GridLayout.Row({ "resource" })
})
@Documentation("Dataset selecting a simple resource.")
public class SimpleInputDataset implements Serializable {

@Option
@Documentation("The Simple input datastore.")
private SimpleInputDatastore datastore;

@Option
@DefaultValue("default")
@Documentation("The resource to process.")
private String resource;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/**
* Copyright (C) 2006-2026 Talend Inc. - www.talend.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.talend.sdk.component.test.connectors.config;

import java.io.Serializable;

import org.talend.sdk.component.api.configuration.Option;
import org.talend.sdk.component.api.configuration.type.DataStore;
import org.talend.sdk.component.api.configuration.ui.DefaultValue;
import org.talend.sdk.component.api.configuration.ui.layout.GridLayout;
import org.talend.sdk.component.api.configuration.ui.widget.Credential;
import org.talend.sdk.component.api.meta.Documentation;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@DataStore("simpleDSO")
@GridLayout({
@GridLayout.Row({ "url" }),
@GridLayout.Row({ "token" })
})
@Documentation("Datastore for simple input.")
public class SimpleInputDatastore implements Serializable {

@Option
@DefaultValue("http://localhost")
@Documentation("The url to call.")
private String url;

@Option
@Credential
@Documentation("The token to use.")
private String token;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/**
* Copyright (C) 2006-2026 Talend Inc. - www.talend.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.talend.sdk.component.test.connectors.simpleinput;

import java.io.Serializable;

import org.talend.sdk.component.api.component.Icon;
import org.talend.sdk.component.api.component.Version;
import org.talend.sdk.component.api.configuration.Option;
import org.talend.sdk.component.api.input.Emitter;
import org.talend.sdk.component.api.input.Producer;
import org.talend.sdk.component.api.meta.Documentation;
import org.talend.sdk.component.api.record.Record;
import org.talend.sdk.component.api.service.record.RecordBuilderFactory;
import org.talend.sdk.component.test.connectors.config.SimpleInputConfiguration;

@Version
@Icon(value = Icon.IconType.CUSTOM, custom = "mapper")
@Emitter(name = "simple-input")
@Documentation("A simple emitter that doesn't expect dynamic dependencies and generated few records.")
public class SimpleInput implements Serializable {

private RecordBuilderFactory recordBuilderFactory;

private final SimpleInputConfiguration configuration;

private boolean done = false;

public SimpleInput(@Option("configuration") final SimpleInputConfiguration configuration,
final RecordBuilderFactory recordBuilderFactory) {
this.configuration = configuration;
this.recordBuilderFactory = recordBuilderFactory;
}

@Producer
public Record next() {
if (done) {
return null;
}

done = true;

return recordBuilderFactory.newRecordBuilder()
.withString("url", configuration.getDataset().getDatastore().getUrl())
.withString("token", configuration.getDataset().getDatastore().getToken())
.withString("resource", configuration.getDataset().getResource())
.withBoolean("debug", configuration.isDebug())
.build();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ the_family.actions.connection.action_CREATE_CONNECTION_ERROR._displayName = Name
the_family.actions.user.action_USER._displayName = Name: Extension point for custom UI integrations and custom actions
the_family.actions.dataset.action_DISCOVER_DATASET._displayName = Name: Discover the datasets
the_family.actions.connection.action_BUILTIN_SUGGESTABLE._displayName = Name: BuiltInSuggestable
the_family.actions.dynamic_values.action_DYNAMIC_VALUES._displayName = Name: DynamicValues
the_family.actions.dynamic_values.action_DYNAMIC_VALUES._displayName = Name: DynamicValues

# Simple input
the_family.datastore.simpleDSO._displayName = Simple input datastore
the_family.dataset.dataset._displayName = Simple input dataset
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,15 @@ NestedConfig.stringOption2._documentation = Doc: string option 2

Auth.nbAuthRetry._placeholder =
TheDatastore.timeout._placeholder =
InputConfig.date._placeholder =
InputConfig.date._placeholder =

# The simpleInput connector configuration
SimpleInputDatastore.url._displayName = URL
SimpleInputDatastore.token._displayName = Token
SimpleInputDataset.datastore._displayName =
SimpleInputDataset.resource._displayName = Resource
SimpleInputConfiguration.dataset._displayName =
SimpleInputConfiguration.debug._displayName = Debug
SimpleInputDatastore.url._placeholder =
SimpleInputDatastore.token._placeholder =
SimpleInputDataset.resource._placeholder =
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (C) 2006-2025 Talend Inc. - www.talend.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Here you can change all your configuration display names to use more explicit labels
# You can also translate your configuration by adding one file by local Messages_fr.properties for french for example

the_family.simple-input._displayName = Simple Input
Loading
Loading