@Plugin public abstract class AbstractReaderPlugin extends AbstractPlugin implements IReaderPlugin {
private static Property[] extractAnnotatedProperties(final AbstractPlugin plugin) { final Plugin pluginAnnotation = plugin.getClass().getAnnotation(Plugin.class); if (pluginAnnotation != null) { return pluginAnnotation.configuration(); } return new Property[0]; }
/** * {@inheritDoc} */ @Override public final String[] getAllOutputPortNames() { final List<String> outputNames = new LinkedList<String>(); final Plugin annotation = this.getClass().getAnnotation(Plugin.class); for (final OutputPort outputPort : annotation.outputPorts()) { outputNames.add(outputPort.name()); } return outputNames.toArray(new String[outputNames.size()]); }
this.outputPortTypes = new ConcurrentHashMap<>(); // NOCS final Plugin annotation = this.getClass().getAnnotation(Plugin.class); for (final RepositoryPort repoPort : annotation.repositoryPorts()) { if (this.repositoryPorts.put(repoPort.name(), repoPort) != null) { this.logger.error("Two RepositoryPorts use the same name: {}", repoPort.name()); for (final OutputPort outputPort : annotation.outputPorts()) { if (this.outputPorts.put(outputPort.name(), outputPort) != null) { this.logger.error("Two OutputPorts use the same name: {}", outputPort.name()); for (final OutputPort outputPort : annotation.outputPorts()) { this.logger.warn("Invalid port for visualization filter detected. Port is ignored: {}", outputPort.name()); for (final OutputPort outputPort : annotation.outputPorts()) { this.registeredMethods.put(outputPort.name(), new ArrayList<PluginInputPortReference>(1));
/** * {@inheritDoc} */ @Override public final String getPluginName() { final String pluginName = this.getClass().getAnnotation(Plugin.class).name(); if (pluginName.equals(Plugin.NO_NAME)) { return this.getClass().getSimpleName(); } else { return pluginName; } }
/** * {@inheritDoc} */ @Override public final String getPluginDescription() { return this.getClass().getAnnotation(Plugin.class).description(); }
/** * {@inheritDoc} */ @Override public final String[] getAllRepositoryPortNames() { final List<String> repositoryNames = new LinkedList<String>(); final Plugin annotation = this.getClass().getAnnotation(Plugin.class); for (final RepositoryPort repositoryPort : annotation.repositoryPorts()) { repositoryNames.add(repositoryPort.name()); } return repositoryNames.toArray(new String[repositoryNames.size()]); }
this.outputPortTypes = new ConcurrentHashMap<OutputPort, Class<?>[]>(); // NOCS final Plugin annotation = this.getClass().getAnnotation(Plugin.class); for (final RepositoryPort repoPort : annotation.repositoryPorts()) { if (this.repositoryPorts.put(repoPort.name(), repoPort) != null) { this.log.error("Two RepositoryPorts use the same name: " + repoPort.name()); for (final OutputPort outputPort : annotation.outputPorts()) { if (this.outputPorts.put(outputPort.name(), outputPort) != null) { this.log.error("Two OutputPorts use the same name: " + outputPort.name()); for (final OutputPort outputPort : annotation.outputPorts()) { this.log.warn("Invalid port for visualization filter detected. Port is ignored: " + outputPort.name()); for (final OutputPort outputPort : annotation.outputPorts()) { this.registeredMethods.put(outputPort.name(), new ArrayList<PluginInputPortReference>(1));
/** * {@inheritDoc} */ @Override public final String getPluginName() { final String pluginName = this.getClass().getAnnotation(Plugin.class).name(); if (pluginName.equals(Plugin.NO_NAME)) { return this.getClass().getSimpleName(); } else { return pluginName; } }
/** * {@inheritDoc} */ @Override public final String getPluginDescription() { return this.getClass().getAnnotation(Plugin.class).description(); }
/** * {@inheritDoc} */ @Override public final String[] getAllRepositoryPortNames() { final List<String> repositoryNames = new LinkedList<>(); final Plugin annotation = this.getClass().getAnnotation(Plugin.class); for (final RepositoryPort repositoryPort : annotation.repositoryPorts()) { repositoryNames.add(repositoryPort.name()); } return repositoryNames.toArray(new String[repositoryNames.size()]); }
@Plugin public abstract class AbstractReaderPlugin extends AbstractPlugin implements IReaderPlugin {
private static Property[] extractAnnotatedProperties(final AbstractPlugin plugin) { final Plugin pluginAnnotation = plugin.getClass().getAnnotation(Plugin.class); if (pluginAnnotation != null) { return pluginAnnotation.configuration(); } return new Property[0]; }
/** * {@inheritDoc} */ @Override public final String[] getAllOutputPortNames() { final List<String> outputNames = new LinkedList<>(); final Plugin annotation = this.getClass().getAnnotation(Plugin.class); for (final OutputPort outputPort : annotation.outputPorts()) { outputNames.add(outputPort.name()); } return outputNames.toArray(new String[outputNames.size()]); }
@Plugin public abstract class AbstractFilterPlugin extends AbstractPlugin implements IFilterPlugin {
private Property[] getExpectedProperties(final Class<?> clazz) { final Plugin pluginAnnotation = clazz.getAnnotation(Plugin.class); if (pluginAnnotation != null) { return pluginAnnotation.configuration(); } else { return new Property[0]; } }
private static boolean containsOutputPorts(final Class<?> clazz) { final Plugin annotation = clazz.getAnnotation(Plugin.class); return annotation.outputPorts().length != 0; }
@Plugin public abstract class AbstractFilterPlugin extends AbstractPlugin implements IFilterPlugin {
/** * Checks whether the property with the given name is marked as updateable. * * @param propertyName * Name of the property to check * @return true if marked as updateable, else false. */ public boolean isPropertyUpdateable(final String propertyName) { final Plugin pluginAnnotations = this.getClass().getAnnotation(Plugin.class); final Property[] properties = pluginAnnotations.configuration(); final List<Property> propertyList = Arrays.asList(properties); for (final Property p : propertyList) { if (p.name().equals(propertyName)) { return p.updateable(); } } return false; }
@Plugin public class MethodAndComponentFlowDisplayFilter extends AbstractFilterPlugin {