"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/main/java/com/openkm/servlet/admin/PluginServlet.java" between
OpenKM-document-management-system-6.3.10.tar.gz and OpenKM-document-management-system-6.3.11.tar.gz

About: OpenKM (Knowledge Management) is a document management system that allows easy management of documents, users, roles and finding your enterprise documents and records. Community version (source code).

PluginServlet.java  (OpenKM-document-management-system-6.3.10):PluginServlet.java  (OpenKM-document-management-system-6.3.11)
skipping to change at line 46 skipping to change at line 46
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.openkm.automation.Action; import com.openkm.automation.Action;
import com.openkm.automation.Validation; import com.openkm.automation.Validation;
import com.openkm.core.DatabaseException; import com.openkm.core.DatabaseException;
import com.openkm.dao.AutomationDAO; import com.openkm.dao.AutomationDAO;
import com.openkm.dao.PluginDAO; import com.openkm.dao.PluginDAO;
import com.openkm.extractor.RegisteredExtractors;
import com.openkm.extractor.TextExtractor;
import com.openkm.util.PluginUtils; import com.openkm.util.PluginUtils;
import com.openkm.util.WebUtils; import com.openkm.util.WebUtils;
import net.xeoh.plugins.base.Plugin; import net.xeoh.plugins.base.Plugin;
/** /**
* Plugin servlet * Plugin servlet
*/ */
@WebServlet("/admin/Plugin") @WebServlet("/admin/Plugin")
public class PluginServlet extends BaseServlet { public class PluginServlet extends BaseServlet {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static Logger log = LoggerFactory.getLogger(PluginServlet.class); private static Logger log = LoggerFactory.getLogger(PluginServlet.class);
private String[] pluginList = { Action.class.getCanonicalName(), Validati on.class.getCanonicalName()}; private String[] pluginList = { Action.class.getCanonicalName(), Validati on.class.getCanonicalName(), TextExtractor.class.getCanonicalName()};
/** /**
* *
*/ */
@Override @Override
public void doGet(HttpServletRequest request, HttpServletResponse respons e) throws IOException, ServletException { public void doGet(HttpServletRequest request, HttpServletResponse respons e) throws IOException, ServletException {
log.debug("doGet({}, {})", request, response); log.debug("doGet({}, {})", request, response);
String action = WebUtils.getString(request, "action"); String action = WebUtils.getString(request, "action");
updateSessionManager(request); updateSessionManager(request);
skipping to change at line 103 skipping to change at line 105
private void reloadPluginList(String pluginSelected) private void reloadPluginList(String pluginSelected)
throws ServletException, IOException, DatabaseException, URISyntaxException { throws ServletException, IOException, DatabaseException, URISyntaxException {
log.debug("reloadPluginList({})", pluginSelected); log.debug("reloadPluginList({})", pluginSelected);
if (null == pluginSelected || pluginSelected.isEmpty()) { if (null == pluginSelected || pluginSelected.isEmpty()) {
pluginSelected = Action.class.getCanonicalName(); pluginSelected = Action.class.getCanonicalName();
} }
if (Validation.class.getCanonicalName().equalsIgnoreCase(pluginSe lected)) { if (Validation.class.getCanonicalName().equalsIgnoreCase(pluginSe lected)) {
AutomationDAO.getInstance().findValidations(true); AutomationDAO.getInstance().findValidations(true);
} else if (TextExtractor.class.getCanonicalName().equalsIgnoreCas
e(pluginSelected)) {
RegisteredExtractors.findExtractors(true);
} else { } else {
AutomationDAO.getInstance().findActions(true); AutomationDAO.getInstance().findActions(true);
} }
log.debug("reloadPluginList: void"); log.debug("reloadPluginList: void");
} }
/** /**
* Plugin list * Plugin list
*/ */
skipping to change at line 130 skipping to change at line 134
if (null == pluginSelected || pluginSelected.isEmpty()) { if (null == pluginSelected || pluginSelected.isEmpty()) {
pluginSelected = Action.class.getCanonicalName(); pluginSelected = Action.class.getCanonicalName();
} }
if (Validation.class.getCanonicalName().equalsIgnoreCase(pluginSe lected)) { if (Validation.class.getCanonicalName().equalsIgnoreCase(pluginSe lected)) {
plugins = (List<Plugin>) (List<?>) PluginUtils.getAllPlug ins(new URI(AutomationDAO.PLUGIN_URI), plugins = (List<Plugin>) (List<?>) PluginUtils.getAllPlug ins(new URI(AutomationDAO.PLUGIN_URI),
Validation.class); Validation.class);
pluginsLoaded = (List<Plugin>) (List<?>) AutomationDAO.ge tInstance().findValidations(false); pluginsLoaded = (List<Plugin>) (List<?>) AutomationDAO.ge tInstance().findValidations(false);
Collections.sort(plugins, OrderByClassName.getInstance()) ; Collections.sort(plugins, OrderByClassName.getInstance()) ;
} else if (TextExtractor.class.getCanonicalName().equalsIgnoreCas
e(pluginSelected)) {
plugins = (List<Plugin>) (List<?>) PluginUtils.getAllPlug
ins(new URI(RegisteredExtractors.PLUGIN_URI), TextExtractor.class);
pluginsLoaded = (List<Plugin>) (List<?>) RegisteredExtrac
tors.findExtractors(false);
Collections.sort(plugins, OrderByClassName.getInstance())
;
} else { } else {
plugins = (List<Plugin>) (List<?>) PluginUtils.getAllPlug ins(new URI(AutomationDAO.PLUGIN_URI), plugins = (List<Plugin>) (List<?>) PluginUtils.getAllPlug ins(new URI(AutomationDAO.PLUGIN_URI),
Action.class); Action.class);
pluginsLoaded = (List<Plugin>) (List<?>) AutomationDAO.ge tInstance().findActions(false); pluginsLoaded = (List<Plugin>) (List<?>) AutomationDAO.ge tInstance().findActions(false);
Collections.sort(plugins, OrderByClassName.getInstance()) ; Collections.sort(plugins, OrderByClassName.getInstance()) ;
} }
List<LoadedPlugin> loadedPlugins = calculateLoadedPlugins(plugins , pluginsLoaded); List<LoadedPlugin> loadedPlugins = calculateLoadedPlugins(plugins , pluginsLoaded);
sc.setAttribute("showReloadButton", showReloadButton(loadedPlugin s)); sc.setAttribute("showReloadButton", showReloadButton(loadedPlugin s));
sc.setAttribute("plugins", loadedPlugins); sc.setAttribute("plugins", loadedPlugins);
 End of changes. 4 change blocks. 
1 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)