Search in sources :

Example 31 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("records", new PluginPropertyField("records", "", "string", false, false));
    return new PluginClass(RealtimeSource.PLUGIN_TYPE, "Mock", "", MockSource.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 32 with PluginPropertyField

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

the class LookupSource method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("fields", new PluginPropertyField("fields", "", "string", true, false));
    properties.put("lookupName", new PluginPropertyField("lookupName", "", "string", true, false));
    return new PluginClass(RealtimeSource.PLUGIN_TYPE, "Lookup", "", LookupSource.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 33 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("dir", new PluginPropertyField("dir", "", "string", false, false));
    return new PluginClass(RealtimeSink.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 34 with PluginPropertyField

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

the class MockRuntimeDatasetSource method getPluginClass.

private static PluginClass getPluginClass() {
    Map<String, PluginPropertyField> properties = new HashMap<>();
    properties.put("tableName", new PluginPropertyField("tableName", "", "string", true, false));
    properties.put("runtimeDatasetName", new PluginPropertyField("runtimeDatasetName", "", "string", true, true));
    return new PluginClass(BatchSource.PLUGIN_TYPE, "MockRuntime", "", MockRuntimeDatasetSource.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 35 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(BatchSink.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)

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