1 46 47 package org.opencms.workplace.tools.searchindex; 48 49 import org.opencms.jsp.CmsJspActionElement; 50 import org.opencms.workplace.CmsReport; 51 import org.opencms.workplace.CmsWorkplaceSettings; 52 53 import javax.servlet.http.HttpServletRequest ; 54 import javax.servlet.http.HttpServletResponse ; 55 import javax.servlet.jsp.JspException ; 56 import javax.servlet.jsp.PageContext ; 57 58 67 public class CmsIndexingReport extends CmsReport { 68 69 70 public static final String DIALOG_TYPE = "indexing"; 71 72 77 public CmsIndexingReport(CmsJspActionElement jsp) { 78 79 super(jsp); 80 } 81 82 89 public CmsIndexingReport(PageContext context, HttpServletRequest req, HttpServletResponse res) { 90 91 this(new CmsJspActionElement(context, req, res)); 92 } 93 94 99 public void actionReport() throws JspException { 100 101 getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); 103 switch (getAction()) { 104 case ACTION_REPORT_UPDATE: 105 setParamAction(REPORT_UPDATE); 106 getJsp().include(FILE_REPORT_OUTPUT); 107 break; 108 case ACTION_REPORT_BEGIN: 109 case ACTION_CONFIRMED: 110 default: 111 112 CmsIndexingReportThread thread = new CmsIndexingReportThread(getCms(), null); 113 setParamAction(REPORT_BEGIN); 114 setParamThread(thread.getUUID().toString()); 115 getJsp().include(FILE_REPORT_OUTPUT); 116 break; 117 } 118 } 119 120 123 protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) { 124 125 fillParamValues(request); 127 setParamDialogtype(DIALOG_TYPE); 129 if (DIALOG_CONFIRMED.equals(getParamAction())) { 131 setAction(ACTION_CONFIRMED); 132 } else if (REPORT_UPDATE.equals(getParamAction())) { 133 setAction(ACTION_REPORT_UPDATE); 134 } else if (REPORT_BEGIN.equals(getParamAction())) { 135 setAction(ACTION_REPORT_BEGIN); 136 } else if (REPORT_END.equals(getParamAction())) { 137 setAction(ACTION_REPORT_END); 138 } else if (DIALOG_CANCEL.equals(getParamAction())) { 139 setAction(ACTION_CANCEL); 140 } else { 141 setAction(ACTION_DEFAULT); 142 setParamTitle(key("title." + getParamDialogtype())); 144 } 145 } 146 147 } | Popular Tags |