Search in sources :

Example 21 with PluginPropertyField

use of io.cdap.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class MockAction method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("tableName", new PluginPropertyField("tableName", "", "string", true, false));
    properties.put("rowKey", new PluginPropertyField("rowKey", "", "string", true, false));
    properties.put("columnKey", new PluginPropertyField("columnKey", "", "string", true, false));
    properties.put("value", new PluginPropertyField("value", "", "string", true, true));
    properties.put("argumentKey", new PluginPropertyField("argumentKey", "", "string", false, false));
    properties.put("argumentValue", new PluginPropertyField("argumentValue", "", "string", false, false));
    return PluginClass.builder().setName("TableWriterAction").setType(Action.PLUGIN_TYPE).setDescription("").setClassName(MockAction.class.getName()).setProperties(properties).setConfigFieldName("config").build();
}
Also used : HashMap(java.util.HashMap) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField)

Example 22 with PluginPropertyField

use of io.cdap.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class LookupTransform method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("lookupKey", new PluginPropertyField("lookupKey", "", "string", true, false));
    properties.put("destinationField", new PluginPropertyField("destinationField", "", "string", true, false));
    properties.put("lookupName", new PluginPropertyField("lookupName", "", "string", true, false));
    return PluginClass.builder().setName(NAME).setType(Transform.PLUGIN_TYPE).setDescription("").setClassName(LookupTransform.class.getName()).setProperties(properties).setConfigFieldName("config").build();
}
Also used : HashMap(java.util.HashMap) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField)

Example 23 with PluginPropertyField

use of io.cdap.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class MockExternalSource method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("name", new PluginPropertyField("name", "", "string", true, false));
    properties.put("dirName", new PluginPropertyField("dirName", "", "string", true, false));
    return PluginClass.builder().setName(PLUGIN_NAME).setType(BatchSource.PLUGIN_TYPE).setDescription("").setClassName(MockExternalSource.class.getName()).setProperties(properties).setConfigFieldName("config").build();
}
Also used : HashMap(java.util.HashMap) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField)

Example 24 with PluginPropertyField

use of io.cdap.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class Window method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("width", new PluginPropertyField("width", "", "long", true, false));
    properties.put("slideInterval", new PluginPropertyField("slideInterval", "", "long", true, false));
    return PluginClass.builder().setName("Window").setType(Windower.PLUGIN_TYPE).setDescription("").setClassName(Window.class.getName()).setProperties(properties).setConfigFieldName("conf").build();
}
Also used : HashMap(java.util.HashMap) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField)

Example 25 with PluginPropertyField

use of io.cdap.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class NullAlertTransform method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("field", new PluginPropertyField("field", "", "string", true, false));
    return PluginClass.builder().setName(NAME).setType(Transform.PLUGIN_TYPE).setDescription("").setClassName(NullAlertTransform.class.getName()).setProperties(properties).setConfigFieldName("conf").build();
}
Also used : HashMap(java.util.HashMap) PluginPropertyField(io.cdap.cdap.api.plugin.PluginPropertyField)

Aggregations

PluginPropertyField (io.cdap.cdap.api.plugin.PluginPropertyField)54 HashMap (java.util.HashMap)43 PluginClass (io.cdap.cdap.api.plugin.PluginClass)11 Test (org.junit.Test)8 ArtifactRange (io.cdap.cdap.api.artifact.ArtifactRange)6 ArtifactVersion (io.cdap.cdap.api.artifact.ArtifactVersion)6 Id (io.cdap.cdap.common.id.Id)6 File (java.io.File)5 ArtifactClasses (io.cdap.cdap.api.artifact.ArtifactClasses)4 ArtifactId (io.cdap.cdap.proto.id.ArtifactId)4 NamespaceId (io.cdap.cdap.proto.id.NamespaceId)4 Location (org.apache.twill.filesystem.Location)4 ImmutableMap (com.google.common.collect.ImmutableMap)3 ImmutableSet (com.google.common.collect.ImmutableSet)3 ApplicationClass (io.cdap.cdap.api.artifact.ApplicationClass)3 ArtifactId (io.cdap.cdap.api.artifact.ArtifactId)3 Requirements (io.cdap.cdap.api.plugin.Requirements)3 ArtifactNotFoundException (io.cdap.cdap.common.ArtifactNotFoundException)3 ReflectionSchemaGenerator (io.cdap.cdap.internal.io.ReflectionSchemaGenerator)3 ArrayList (java.util.ArrayList)3