Search in sources :

Example 41 with PluginPropertyField

use of co.cask.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class MockCondition method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("name", new PluginPropertyField("name", "", "string", true, false));
    properties.put("tableName", new PluginPropertyField("tableName", "", "string", false, false));
    return new PluginClass(Condition.PLUGIN_TYPE, "Mock", "", MockCondition.class.getName(), "config", properties);
}
Also used : HashMap(java.util.HashMap) PluginClass(co.cask.cdap.api.plugin.PluginClass) PluginPropertyField(co.cask.cdap.api.plugin.PluginPropertyField)

Example 42 with PluginPropertyField

use of co.cask.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class StringValueFilterCompute method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("field", new PluginPropertyField("field", "", "string", true, true));
    properties.put("value", new PluginPropertyField("value", "", "string", true, true));
    return new PluginClass(SparkCompute.PLUGIN_TYPE, "StringValueFilterCompute", "", StringValueFilterCompute.class.getName(), "conf", properties);
}
Also used : HashMap(java.util.HashMap) PluginClass(co.cask.cdap.api.plugin.PluginClass) PluginPropertyField(co.cask.cdap.api.plugin.PluginPropertyField)

Example 43 with PluginPropertyField

use of co.cask.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class MockSource method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("schema", new PluginPropertyField("schema", "", "string", true, false));
    properties.put("records", new PluginPropertyField("records", "", "string", true, false));
    properties.put("intervalMillis", new PluginPropertyField("intervalMillis", "", "long", false, false));
    return new PluginClass(StreamingSource.PLUGIN_TYPE, "Mock", "", MockSource.class.getName(), "conf", properties);
}
Also used : HashMap(java.util.HashMap) PluginClass(co.cask.cdap.api.plugin.PluginClass) PluginPropertyField(co.cask.cdap.api.plugin.PluginPropertyField)

Example 44 with PluginPropertyField

use of co.cask.cdap.api.plugin.PluginPropertyField in project cdap by caskdata.

the class MockSink method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("tableName", new PluginPropertyField("tableName", "", "string", true, true));
    return new PluginClass(SparkSink.PLUGIN_TYPE, "Mock", "", MockSink.class.getName(), "config", properties);
}
Also used : HashMap(java.util.HashMap) PluginClass(co.cask.cdap.api.plugin.PluginClass) PluginPropertyField(co.cask.cdap.api.plugin.PluginPropertyField)

Example 45 with PluginPropertyField

use of co.cask.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 new PluginClass(Action.PLUGIN_TYPE, "TableWriterAction", "", MockAction.class.getName(), "config", properties);
}
Also used : HashMap(java.util.HashMap) PluginClass(co.cask.cdap.api.plugin.PluginClass) PluginPropertyField(co.cask.cdap.api.plugin.PluginPropertyField)

Aggregations

PluginPropertyField (co.cask.cdap.api.plugin.PluginPropertyField)53 PluginClass (co.cask.cdap.api.plugin.PluginClass)45 HashMap (java.util.HashMap)32 Test (org.junit.Test)14 ArtifactRange (co.cask.cdap.api.artifact.ArtifactRange)12 ArtifactVersion (co.cask.cdap.api.artifact.ArtifactVersion)12 ArtifactId (co.cask.cdap.proto.id.ArtifactId)11 Id (co.cask.cdap.common.id.Id)10 NamespaceId (co.cask.cdap.proto.id.NamespaceId)10 ImmutableSet (com.google.common.collect.ImmutableSet)5 Set (java.util.Set)5 Manifest (java.util.jar.Manifest)5 ApplicationClass (co.cask.cdap.api.artifact.ApplicationClass)4 ArtifactNotFoundException (co.cask.cdap.common.ArtifactNotFoundException)4 ReflectionSchemaGenerator (co.cask.cdap.internal.io.ReflectionSchemaGenerator)4 IOException (java.io.IOException)4 ArtifactClasses (co.cask.cdap.api.artifact.ArtifactClasses)3 ArtifactId (co.cask.cdap.api.artifact.ArtifactId)3 ArtifactSummary (co.cask.cdap.api.artifact.ArtifactSummary)3 HashSet (java.util.HashSet)3