1 package org.nextime.ion.backoffice.action.search; 2 3 import java.io.IOException ; 4 5 import javax.servlet.ServletException ; 6 import javax.servlet.http.HttpServletRequest ; 7 import javax.servlet.http.HttpServletResponse ; 8 9 import org.apache.struts.action.ActionForm; 10 import org.apache.struts.action.ActionForward; 11 import org.apache.struts.action.ActionMapping; 12 import org.nextime.ion.backoffice.action.BaseAction; 13 import org.nextime.ion.framework.helper.Indexer; 14 import org.nextime.ion.framework.mapping.Mapping; 15 16 public class ReIndexAction extends BaseAction { 17 18 public ActionForward perform( 19 ActionMapping mapping, 20 ActionForm form, 21 HttpServletRequest request, 22 HttpServletResponse response) 23 throws IOException , ServletException { 24 25 checkUser(request); 27 28 try { 30 Mapping.begin(); 31 Indexer.reIndex(); 32 Mapping.rollback(); 33 } 34 catch( Exception e ) { 35 throw new ServletException (e); 36 } 37 38 return (mapping.findForward("ok")); 40 } 41 42 } 43 | Popular Tags |