List of usage examples for com.liferay.portal.kernel.image ImageMagickUtil reset
public static void reset()
From source file:com.liferay.server.admin.web.internal.portlet.action.EditServerMVCActionCommand.java
License:Open Source License
protected void updateExternalServices(ActionRequest actionRequest, PortletPreferences portletPreferences) throws Exception { boolean imageMagickEnabled = ParamUtil.getBoolean(actionRequest, "imageMagickEnabled"); String imageMagickPath = ParamUtil.getString(actionRequest, "imageMagickPath"); boolean xugglerEnabled = ParamUtil.getBoolean(actionRequest, "xugglerEnabled"); portletPreferences.setValue(PropsKeys.IMAGEMAGICK_ENABLED, String.valueOf(imageMagickEnabled)); portletPreferences.setValue(PropsKeys.IMAGEMAGICK_GLOBAL_SEARCH_PATH, imageMagickPath); portletPreferences.setValue(PropsKeys.XUGGLER_ENABLED, String.valueOf(xugglerEnabled)); Enumeration<String> enu = actionRequest.getParameterNames(); while (enu.hasMoreElements()) { String name = enu.nextElement(); if (name.startsWith("imageMagickLimit")) { String key = StringUtil.toLowerCase(name.substring(16)); String value = ParamUtil.getString(actionRequest, name); portletPreferences.setValue(PropsKeys.IMAGEMAGICK_RESOURCE_LIMIT + key, value); }//ww w . j ava2 s.co m } portletPreferences.store(); GhostscriptUtil.reset(); ImageMagickUtil.reset(); }