use of org.codelibs.fess.helper.PluginHelper.Artifact in project fess by codelibs.
the class PluginHelperTest method test_getArtifactFromFileName2.
public void test_getArtifactFromFileName2() {
Artifact artifact = pluginHelper.getArtifactFromFileName(ArtifactType.DATA_STORE, "fess-ds-atlassian-13.2.1-20190708.212247-1.jar");
assertEquals("fess-ds-atlassian", artifact.getName());
assertEquals("13.2.1-20190708.212247-1", artifact.getVersion());
}
use of org.codelibs.fess.helper.PluginHelper.Artifact in project fess by codelibs.
the class PluginHelperTest method test_getArtifactFromFileName1.
public void test_getArtifactFromFileName1() {
Artifact artifact = pluginHelper.getArtifactFromFileName(ArtifactType.DATA_STORE, "fess-ds-atlassian-13.2.0.jar");
assertEquals("fess-ds-atlassian", artifact.getName());
assertEquals("13.2.0", artifact.getVersion());
}
use of org.codelibs.fess.helper.PluginHelper.Artifact in project fess by codelibs.
the class PluginHelperTest method test_getArtifactFromFileName3.
public void test_getArtifactFromFileName3() {
Artifact artifact = pluginHelper.getArtifactFromFileName(ArtifactType.UNKNOWN, "mysql-connector-java-8.0.17.jar");
assertEquals("mysql-connector-java", artifact.getName());
assertEquals("8.0.17", artifact.getVersion());
}
use of org.codelibs.fess.helper.PluginHelper.Artifact in project fess by codelibs.
the class AdminPluginAction method delete.
@Execute
@Secured({ ROLE })
public HtmlResponse delete(final DeleteForm form) {
validate(form, messages -> {
}, () -> asHtml(path_AdminPlugin_AdminPluginJsp));
verifyToken(() -> asHtml(path_AdminPlugin_AdminPluginJsp));
final Artifact artifact = new Artifact(form.name, form.version, null);
deleteArtifact(artifact);
saveInfo(messages -> messages.addSuccessDeletePlugin(GLOBAL, artifact.getFileName()));
return redirect(getClass());
}
Aggregations