use of io.gravitee.rest.api.model.PluginEntity in project gravitee-management-rest-api by gravitee-io.
the class FetcherServiceImpl method convert.
private FetcherEntity convert(FetcherPlugin fetcherPlugin, boolean withPlugin) {
FetcherEntity entity = new FetcherEntity();
entity.setId(fetcherPlugin.id());
entity.setDescription(fetcherPlugin.manifest().description());
entity.setName(fetcherPlugin.manifest().name());
entity.setVersion(fetcherPlugin.manifest().version());
if (withPlugin) {
// Plugin information
Plugin plugin = fetcherPlugin;
PluginEntity pluginEntity = new PluginEntity();
pluginEntity.setPlugin(plugin.clazz());
pluginEntity.setPath(plugin.path().toString());
pluginEntity.setType(plugin.type().toString().toLowerCase());
pluginEntity.setDependencies(plugin.dependencies());
// TODO: check the purpose of this
// entity.setPlugin(pluginEntity);
}
return entity;
}
use of io.gravitee.rest.api.model.PluginEntity in project gravitee-management-rest-api by gravitee-io.
the class NotifierServiceImpl method convert.
private io.gravitee.rest.api.model.NotifierEntity convert(NotifierPlugin plugin, boolean withPlugin) {
io.gravitee.rest.api.model.NotifierEntity entity = new io.gravitee.rest.api.model.NotifierEntity();
entity.setId(plugin.id());
entity.setDescription(plugin.manifest().description());
entity.setName(plugin.manifest().name());
entity.setVersion(plugin.manifest().version());
if (withPlugin) {
// Plugin information
PluginEntity pluginEntity = new PluginEntity();
pluginEntity.setPlugin(plugin.clazz());
pluginEntity.setPath(plugin.path().toString());
pluginEntity.setType(plugin.type().toString().toLowerCase());
pluginEntity.setDependencies(plugin.dependencies());
entity.setPlugin(pluginEntity);
}
return entity;
}
use of io.gravitee.rest.api.model.PluginEntity in project gravitee-management-rest-api by gravitee-io.
the class PolicyServiceImpl method convert.
private PolicyEntity convert(PolicyPlugin policyPlugin, Boolean withPlugin) {
PolicyEntity entity = new PolicyEntity();
entity.setId(policyPlugin.id());
entity.setDescription(policyPlugin.manifest().description());
entity.setName(policyPlugin.manifest().name());
entity.setVersion(policyPlugin.manifest().version());
entity.setCategory(policyPlugin.manifest().category());
if (withPlugin) {
// Plugin information
PluginEntity pluginEntity = new PluginEntity();
pluginEntity.setPlugin(policyPlugin.clazz());
pluginEntity.setPath(policyPlugin.path().toString());
pluginEntity.setType(((Plugin) policyPlugin).type().toLowerCase());
pluginEntity.setDependencies(policyPlugin.dependencies());
entity.setPlugin(pluginEntity);
entity.setDevelopment(loadPolicy(policyPlugin));
}
return entity;
}
Aggregations