"/plugins/" + plugin.getName());
getDao().getPluginDao().remove(plugin.getId());
}
private void removePluginResources(PluginEntity plugin) {
PluginResourceEntity listResource = getDao().getPluginResourceDao()
.getByUrl(plugin.getName(), plugin.getName() + RESOURCE_LIST);
if (listResource == null) {
return;
}
List<Long> ids = new ArrayList<Long>();
ids.add(listResource.getId());
if (listResource.getContent() != null && listResource.getContent().length > 0) {
try {
String list = new String(listResource.getContent(), "UTF-8");
String[] resources = list.split(",");
for (String id : resources) {
ids.add(Long.valueOf(id));
}
} catch (UnsupportedEncodingException e) {