forked from neil/plugin-external-background
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
932 B
31 lines
932 B
5 years ago
|
package com.fr.plugin.external.web;
|
||
|
|
||
|
import com.fr.plugin.external.ImageManager;
|
||
|
import com.fr.stable.fun.impl.AbstractRequestInterceptor;
|
||
|
import com.fr.web.utils.WebUtils;
|
||
|
|
||
|
import javax.servlet.http.HttpServletRequest;
|
||
|
import javax.servlet.http.HttpServletResponse;
|
||
|
import java.util.HashMap;
|
||
|
|
||
|
public class UpdateImageAction extends AbstractRequestInterceptor {
|
||
|
|
||
|
@Override
|
||
|
public String getCMD() {
|
||
|
return "update";
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void actionCMD(HttpServletRequest req, HttpServletResponse res) throws Exception {
|
||
|
actionCMD(req, res, null);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void actionCMD(HttpServletRequest req, HttpServletResponse res, String sessionID) throws Exception {
|
||
|
ImageManager.getInstance().updateImageFromDisk();
|
||
|
String errorTemplate = "/com/fr/plugin/external/web/ui/im/manager.html";
|
||
|
WebUtils.writeOutTemplate(errorTemplate, res, new HashMap());
|
||
|
}
|
||
|
|
||
|
}
|