/** * Constructor. * @param spec the plugin's specification * @param coordinates the plugin's coordinates * @param loader the plugin's classloader */ public Plugin(PluginSpec spec, PluginCoordinates coordinates, PluginClassLoader loader) { setSpec(spec); setCoordinates(coordinates); setLoader(loader); }
/** * @return any policy definitions found in the plugin (META-INF/apiman/policyDefs/*.json */ public List<URL> getPolicyDefinitions() { return this.loader.getPolicyDefinitionResources(); }
/** * A valid set of remove maven repository URLs. */ protected Set<URI> getMavenRepositories() { return PluginUtils.getDefaultMavenRepositories(); }
/** * Constructor. * @param groupId Maven group id * @param artifactId Maven artifact id * @param version Maven version * @param classifier Maven classifier * @param type Maven type */ public PluginCoordinates(String groupId, String artifactId, String version, String classifier, String type) { setGroupId(groupId); setArtifactId(artifactId); setVersion(version); setClassifier(classifier); if (type != null) { setType(type); } }
/** * Constructor. * @param groupId Maven group id * @param artifactId Maven artifact id * @param version Maven version */ public PluginCoordinates(String groupId, String artifactId, String version) { setGroupId(groupId); setArtifactId(artifactId); setVersion(version); }
/** * @see java.lang.Object#finalize() */ @Override protected void finalize() throws Throwable { super.finalize(); close(); }
/** * Constructor. * @param pluginArtifactFile plugin artifact * @throws IOException if an I/O error has occurred */ public PluginClassLoader(File pluginArtifactFile) throws IOException { super(); closed = false; this.pluginArtifactZip = new ZipFile(pluginArtifactFile); this.workDir = createWorkDir(pluginArtifactFile); indexPluginArtifact(); }
/** * @return the name */ public String getName() { return spec.getName(); }
/** * @return the description */ public String getDescription() { return spec.getDescription(); }
/** * Returns true if the plugin identified by the given coordinates is a * snapshot plugin. * @param coordinates the plugin coordinates * @return true if the given plugin is a snapshot */ public static boolean isSnapshot(PluginCoordinates coordinates) { return coordinates.getVersion().endsWith("-SNAPSHOT"); //$NON-NLS-1$ }
/** * Constructor. * @param groupId Maven group id * @param artifactId Maven artifact id * @param version Maven version * @param classifier Maven classifier * @param type Maven type */ public PluginCoordinates(String groupId, String artifactId, String version, String classifier, String type) { setGroupId(groupId); setArtifactId(artifactId); setVersion(version); setClassifier(classifier); if (type != null) { setType(type); } }
/** * Constructor. * @param pluginsDir the plugins directory */ public DefaultPluginRegistry(File pluginsDir) { this(pluginsDir, PluginUtils.getDefaultMavenRepositories()); }
/** * Constructor. * @param spec the plugin's specification * @param coordinates the plugin's coordinates * @param loader the plugin's classloader */ public Plugin(PluginSpec spec, PluginCoordinates coordinates, PluginClassLoader loader) { setSpec(spec); setCoordinates(coordinates); setLoader(loader); }
/** * Constructor. * @param groupId Maven group id * @param artifactId Maven artifact id * @param version Maven version */ public PluginCoordinates(String groupId, String artifactId, String version) { setGroupId(groupId); setArtifactId(artifactId); setVersion(version); }
/** * @return any policy definitions found in the plugin (META-INF/apiman/policyDefs/*.json */ public List<URL> getPolicyDefinitions() { return this.loader.getPolicyDefinitionResources(); }
/** * @return the name */ public String getName() { return spec.getName(); }
/** * @return the description */ public String getDescription() { return spec.getDescription(); }
/** * Returns true if the plugin identified by the given coordinates is a * snapshot plugin. * @param coordinates the plugin coordinates * @return true if the given plugin is a snapshot */ public static boolean isSnapshot(PluginCoordinates coordinates) { return coordinates.getVersion().endsWith("-SNAPSHOT"); //$NON-NLS-1$ }
/** * Constructor. * @param pluginsDir the plugins directory */ public DefaultPluginRegistry(File pluginsDir) { this(pluginsDir, PluginUtils.getDefaultMavenRepositories()); }
/** * Constructor. */ public DefaultPluginRegistry() { this(createTempPluginsDir(), PluginUtils.getDefaultMavenRepositories()); }