1 31 32 package org.opencms.workplace.tools.link; 33 34 import org.opencms.jsp.CmsJspActionElement; 35 import org.opencms.workplace.CmsReport; 36 import org.opencms.workplace.CmsWorkplaceSettings; 37 import org.opencms.workplace.threads.CmsXmlDocumentLinkValidatorThread; 38 39 import javax.servlet.http.HttpServletRequest ; 40 import javax.servlet.http.HttpServletResponse ; 41 import javax.servlet.jsp.JspException ; 42 import javax.servlet.jsp.PageContext ; 43 44 53 public class CmsXmlDocumentLinkValidatorReport extends CmsReport { 54 55 56 public static final String DIALOG_TYPE = "html_link_validator"; 57 58 63 public CmsXmlDocumentLinkValidatorReport(CmsJspActionElement jsp) { 64 65 super(jsp); 66 } 67 68 75 public CmsXmlDocumentLinkValidatorReport(PageContext context, HttpServletRequest req, HttpServletResponse res) { 76 77 this(new CmsJspActionElement(context, req, res)); 78 } 79 80 85 public void actionReport() throws JspException { 86 87 getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); 89 switch (getAction()) { 90 case ACTION_REPORT_UPDATE: 91 setParamAction(REPORT_UPDATE); 92 getJsp().include(FILE_REPORT_OUTPUT); 93 break; 94 case ACTION_REPORT_BEGIN: 95 case ACTION_CONFIRMED: 96 default: 97 CmsXmlDocumentLinkValidatorThread thread = new CmsXmlDocumentLinkValidatorThread(getCms()); 98 setParamAction(REPORT_BEGIN); 99 setParamThread(thread.getUUID().toString()); 100 getJsp().include(FILE_REPORT_OUTPUT); 101 break; 102 } 103 } 104 105 108 protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) { 109 110 fillParamValues(request); 112 setParamDialogtype(DIALOG_TYPE); 114 if (DIALOG_CONFIRMED.equals(getParamAction())) { 116 setAction(ACTION_CONFIRMED); 117 } else if (REPORT_UPDATE.equals(getParamAction())) { 118 setAction(ACTION_REPORT_UPDATE); 119 } else if (REPORT_BEGIN.equals(getParamAction())) { 120 setAction(ACTION_REPORT_BEGIN); 121 } else if (REPORT_END.equals(getParamAction())) { 122 setAction(ACTION_REPORT_END); 123 } else if (DIALOG_CANCEL.equals(getParamAction())) { 124 setAction(ACTION_CANCEL); 125 } else { 126 setAction(ACTION_DEFAULT); 127 setParamTitle(Messages.get().getBundle(getLocale()).key(Messages.GUI_TITLE_HTML_LINK_VALIDATOR_0)); 129 } 130 } 131 132 } 133 | Popular Tags |