1 2 package org.roller.presentation.weblog.actions; 3 4 import java.io.BufferedReader ; 5 import java.io.IOException ; 6 import java.io.InputStreamReader ; 7 import java.io.OutputStreamWriter ; 8 import java.net.HttpURLConnection ; 9 import java.net.URL ; 10 import java.net.URLConnection ; 11 import java.net.URLEncoder ; 12 import java.sql.Timestamp ; 13 import java.util.ArrayList ; 14 import java.util.Arrays ; 15 import java.util.Date ; 16 import java.util.Iterator ; 17 import java.util.List ; 18 import java.util.ListIterator ; 19 20 import javax.servlet.ServletException ; 21 import javax.servlet.http.HttpServletRequest ; 22 import javax.servlet.http.HttpServletResponse ; 23 import javax.servlet.http.HttpSession ; 24 25 import org.apache.commons.lang.StringUtils; 26 import org.apache.commons.logging.Log; 27 import org.apache.commons.logging.LogFactory; 28 import org.apache.struts.action.ActionError; 29 import org.apache.struts.action.ActionErrors; 30 import org.apache.struts.action.ActionForm; 31 import org.apache.struts.action.ActionForward; 32 import org.apache.struts.action.ActionMapping; 33 import org.apache.struts.action.ActionMessage; 34 import org.apache.struts.action.ActionMessages; 35 import org.apache.struts.actions.DispatchAction; 36 import org.roller.RollerException; 37 import org.roller.RollerPermissionsException; 38 import org.roller.model.IndexManager; 39 import org.roller.model.Roller; 40 import org.roller.model.RollerSpellCheck; 41 import org.roller.model.UserManager; 42 import org.roller.model.WeblogManager; 43 import org.roller.pojos.CommentData; 44 import org.roller.pojos.UserData; 45 import org.roller.pojos.WeblogEntryData; 46 import org.roller.pojos.WebsiteData; 47 import org.roller.presentation.MainPageAction; 48 import org.roller.presentation.RollerContext; 49 import org.roller.presentation.RollerRequest; 50 import org.roller.presentation.pagecache.PageCacheFilter; 51 import org.roller.presentation.velocity.PageHelper; 52 import org.roller.presentation.weblog.formbeans.WeblogEntryFormEx; 53 import org.roller.util.Utilities; 54 55 import com.swabunga.spell.event.SpellCheckEvent; 56 57 58 59 69 public final class WeblogEntryFormAction extends DispatchAction 70 { 71 private static Log mLogger = 72 LogFactory.getFactory().getInstance(WeblogEntryFormAction.class); 73 74 78 public ActionForward create( 79 ActionMapping mapping, 80 ActionForm actionForm, 81 HttpServletRequest request, 82 HttpServletResponse response) 83 throws IOException , ServletException 84 { 85 ActionForward forward = mapping.findForward("weblogEdit.page"); 86 try 87 { 88 RollerRequest rreq = RollerRequest.getRollerRequest(request); 89 if ( rreq.isUserAuthorizedToEdit() ) 90 { 91 WeblogEntryFormEx form = (WeblogEntryFormEx)actionForm; 92 form.initNew(request, response); 93 94 request.setAttribute("model", 95 new WeblogEntryPageModel(request, response, mapping, 96 (WeblogEntryFormEx)actionForm, 97 WeblogEntryPageModel.EDIT_MODE)); 98 } 99 else 100 { 101 forward = mapping.findForward("access-denied"); 102 } 103 } 104 catch (Exception e) 105 { 106 request.getSession().getServletContext().log("ERROR",e); 107 throw new ServletException (e); 108 } 109 return forward; 110 } 111 112 116 public ActionForward edit( 117 ActionMapping mapping, 118 ActionForm actionForm, 119 HttpServletRequest request, 120 HttpServletResponse response) 121 throws IOException , ServletException 122 { 123 ActionForward forward = mapping.findForward("weblogEdit.page"); 124 try 125 { 126 RollerRequest rreq = RollerRequest.getRollerRequest(request); 127 if ( rreq.isUserAuthorizedToEdit() ) 128 { 129 WeblogManager wmgr = rreq.getRoller().getWeblogManager(); 130 WeblogEntryData entry = rreq.getWeblogEntry(); 131 WeblogEntryFormEx form = (WeblogEntryFormEx)actionForm; 132 if (entry == null && form.getId() != null) 133 { 134 entry= wmgr.retrieveWeblogEntry(form.getId()); 135 } 136 form.copyFrom(entry, request.getLocale()); 137 138 request.setAttribute("model", 139 new WeblogEntryPageModel(request, response, mapping, 140 form, WeblogEntryPageModel.EDIT_MODE)); 141 } 142 else 143 { 144 forward = mapping.findForward("access-denied"); 145 } 146 } 147 catch (Exception e) 148 { 149 request.getSession().getServletContext().log("ERROR",e); 150 throw new ServletException (e); 151 } 152 return forward; 153 } 154 155 public ActionForward preview( 157 ActionMapping mapping, 158 ActionForm actionForm, 159 HttpServletRequest request, 160 HttpServletResponse response) 161 throws IOException , ServletException 162 { 163 WeblogEntryFormEx form = (WeblogEntryFormEx)actionForm; 165 if (form.getId() == null) 166 { 167 save(mapping, actionForm, request, response); 168 } 169 return display(WeblogEntryPageModel.PREVIEW_MODE, 170 mapping, actionForm, request, response); 171 } 172 173 public ActionForward returnToEditMode( 175 ActionMapping mapping, 176 ActionForm actionForm, 177 HttpServletRequest request, 178 HttpServletResponse response) 179 throws IOException , ServletException 180 { 181 return display(WeblogEntryPageModel.EDIT_MODE, 182 mapping, actionForm, request, response); 183 } 184 185 private ActionForward display( 187 WeblogEntryPageModel.PageMode mode, 188 ActionMapping mapping, 189 ActionForm actionForm, 190 HttpServletRequest request, 191 HttpServletResponse response) 192 throws IOException , ServletException 193 { 194 ActionForward forward = mapping.findForward("weblogEdit.page"); 195 try 196 { 197 RollerRequest rreq = RollerRequest.getRollerRequest(request); 198 if ( rreq.isUserAuthorizedToEdit() ) 199 { 200 request.setAttribute("model", 201 new WeblogEntryPageModel(request, response, mapping, 202 (WeblogEntryFormEx)actionForm, mode)); 203 } 204 else 205 { 206 forward = mapping.findForward("access-denied"); 207 } 208 } 209 catch (Exception e) 210 { 211 request.getSession().getServletContext().log("ERROR",e); 212 throw new ServletException (e); 213 } 214 return forward; 215 } 216 217 222 public ActionForward save( 223 ActionMapping mapping, 224 ActionForm actionForm, 225 HttpServletRequest request, 226 HttpServletResponse response) 227 throws IOException , ServletException 228 { 229 ActionForward forward = mapping.findForward("weblogEdit.page"); 230 ActionMessages uiMessages = new ActionMessages(); 231 try 232 { 233 RollerRequest rreq = RollerRequest.getRollerRequest(request); 234 if ( rreq.isUserAuthorizedToEdit() ) 235 { 236 UserManager userMgr = rreq.getRoller().getUserManager(); 237 WeblogManager weblogMgr = rreq.getRoller().getWeblogManager(); 238 239 UserData user = rreq.getUser(); 240 WebsiteData site = userMgr.getWebsite( user.getUserName() ); 241 WeblogEntryFormEx wf = (WeblogEntryFormEx)actionForm; 242 243 if (wf.getAllowComments() == null) 247 { 248 wf.setAllowComments(Boolean.FALSE); 249 } 250 if (wf.getRightToLeft() == null) 251 { 252 wf.setRightToLeft(Boolean.FALSE); 253 } 254 if (wf.getPinnedToMain() == null) 255 { 256 wf.setPinnedToMain(Boolean.FALSE); 257 } 258 if (wf.getPublishEntry() == null) 259 { 260 wf.setPublishEntry(Boolean.FALSE); 261 } 262 263 WeblogEntryData entry = null; 264 if (wf.getId() == null || wf.getId().trim().length()==0) 265 { 266 entry = new WeblogEntryData(); 267 entry.setWebsite( site ); 268 } 269 else 270 { 271 entry = weblogMgr.retrieveWeblogEntry(wf.getId()); 272 entry.save(); } 274 wf.copyTo(entry, request.getLocale(), request.getParameterMap()); 275 276 mLogger.debug("Checking MediaCast attributes"); 278 if (!checkMediaCast(entry)) 279 { 280 mLogger.debug("Invalid MediaCast attributes"); 281 uiMessages.add(null, 282 new ActionMessage("weblogEdit.message.mediaCastProblem")); 283 } 284 else if (mLogger.isDebugEnabled()) 285 { 286 mLogger.debug("Invalid MediaCast attributes"); 287 } 288 289 entry.setUpdateTime(new Timestamp (new Date ().getTime())); 291 mLogger.debug("Saving entry"); 292 entry.save(); 293 rreq.getRoller().commit(); 294 295 mLogger.debug("Populating form"); 296 wf.copyFrom(entry, request.getLocale()); 297 298 reindexEntry(rreq.getRoller(), entry); 299 300 303 request.setAttribute(RollerRequest.WEBLOGENTRYID_KEY, entry.getId()); 304 305 mLogger.debug("Removing from cache"); 307 PageCacheFilter.removeFromCache(request, user); 308 309 MainPageAction.flushMainPageCache(); 311 312 HttpSession session = request.getSession(true); 314 session.removeAttribute("spellCheckEvents"); 315 session.removeAttribute("entryText"); 316 317 request.setAttribute("model", 318 new WeblogEntryPageModel(request, response, mapping, 319 (WeblogEntryFormEx)actionForm, 320 WeblogEntryPageModel.EDIT_MODE)); 321 322 uiMessages.add(null, new ActionMessage("weblogEdit.changesSaved")); 323 saveMessages(request, uiMessages); 324 325 mLogger.debug("operation complete"); 326 } 327 else 328 { 329 forward = mapping.findForward("access-denied"); 330 } 331 } 332 catch (RollerPermissionsException e) 333 { 334 ActionErrors errors = new ActionErrors(); 335 errors.add(null, new ActionError("error.permissions.deniedSave")); 336 saveErrors(request, errors); 337 forward = mapping.findForward("access-denied"); 338 } 339 catch (Exception e) 340 { 341 throw new ServletException (e); 342 } 343 return forward; 344 } 345 346 private boolean checkMediaCast(WeblogEntryData entry) 347 { 348 boolean valid = false; 349 String url = entry.findEntryAttribute("att_mediacast_url"); 350 boolean empty = (url == null) || (url.trim().length() == 0); 351 if (!empty) 352 { 353 valid = false; 355 try 356 { 357 mLogger.debug("Sending HTTP HEAD"); 358 HttpURLConnection con = (HttpURLConnection ) 359 new URL (url).openConnection(); 360 mLogger.debug("Getting response code"); 361 con.setRequestMethod("HEAD"); 362 if (con.getResponseCode() != 200) 363 { 364 mLogger.debug("Response code indicates error"); 365 mLogger.error("ERROR "+con.getResponseCode()+" return from MediaCast URL"); 366 mLogger.debug(con.getContent().toString()); 367 } 368 else if (con.getContentType()!=null && con.getContentLength()!=-1) 369 { 370 mLogger.debug("Got good reponse and content info"); 371 entry.putEntryAttribute( 372 "att_mediacast_type", con.getContentType()); 373 entry.putEntryAttribute( 374 "att_mediacast_length", ""+con.getContentLength()); 375 valid = true; 376 } 377 } 378 catch (Exception e) 379 { 380 mLogger.error("ERROR checking MediaCast URL"); 381 } 382 } 383 else 384 { 385 mLogger.debug("No MediaCast specified, but that is OK"); 386 valid = true; 387 } 388 if (!valid || empty) 389 { 390 mLogger.debug("Removing MediaCast attributes"); 391 try 392 { 393 entry.removeEntryAttribute("att_mediacast_url"); 394 entry.removeEntryAttribute("att_mediacast_type"); 395 entry.removeEntryAttribute("att_mediacast_length"); 396 } 397 catch (RollerException e) 398 { 399 mLogger.error("ERROR removing invalid MediaCast attributes"); 400 } 401 } 402 mLogger.debug("operation complete"); 403 return valid; 404 } 405 406 407 412 public ActionForward removeOk( 413 ActionMapping mapping, 414 ActionForm actionForm, 415 HttpServletRequest request, 416 HttpServletResponse response) 417 throws IOException , ServletException 418 { 419 ActionForward forward = mapping.findForward("weblogEntryRemove.page"); 420 try 421 { 422 RollerRequest rreq = RollerRequest.getRollerRequest(request); 423 if ( rreq.isUserAuthorizedToEdit() ) 424 { 425 WeblogEntryFormEx wf = (WeblogEntryFormEx)actionForm; 426 WeblogEntryData wd = 427 rreq.getRoller().getWeblogManager().retrieveWeblogEntry(wf.getId()); 428 wf.copyFrom(wd, request.getLocale()); 429 if (wd == null || wd.getId() == null) 430 { 431 throw new NullPointerException ( 432 "Unable to find WeblogEntry for " + 433 request.getParameter(RollerRequest.WEBLOGENTRYID_KEY)); 434 } 435 } 436 else 437 { 438 forward = mapping.findForward("access-denied"); 439 } 440 } 441 catch (Exception e) 442 { 443 throw new ServletException (e); 444 } 445 return forward; 446 } 447 448 453 public ActionForward remove( 454 ActionMapping mapping, 455 ActionForm actionForm, 456 HttpServletRequest request, 457 HttpServletResponse response) 458 throws IOException , ServletException 459 { 460 try 461 { 462 RollerRequest rreq = RollerRequest.getRollerRequest(request); 463 if ( rreq.isUserAuthorizedToEdit() ) 464 { 465 WeblogManager mgr = rreq.getRoller().getWeblogManager(); 466 WeblogEntryData wd = mgr.retrieveWeblogEntry(request.getParameter("id")); 467 UserData user = rreq.getUser(); 468 469 wd.setPublishEntry(Boolean.FALSE); 471 reindexEntry(rreq.getRoller(), wd); 472 473 wd.remove(); 475 rreq.getRoller().commit(); 476 477 PageCacheFilter.removeFromCache(request, user); 479 MainPageAction.flushMainPageCache(); 480 481 ActionMessages uiMessages = new ActionMessages(); 482 uiMessages.add(null, new ActionMessage("weblogEdit.entryRemoved")); 483 saveMessages(request, uiMessages); 484 } 485 else 486 { 487 return mapping.findForward("access-denied"); 488 } 489 } 490 catch (Exception e) 491 { 492 throw new ServletException (e); 493 } 494 495 actionForm = new WeblogEntryFormEx(); 497 request.setAttribute(mapping.getName(), actionForm); 498 return create(mapping, actionForm, request, response); 499 } 500 501 public ActionForward correctSpelling( 503 ActionMapping mapping, 504 ActionForm actionForm, 505 HttpServletRequest request, 506 HttpServletResponse response) 507 throws IOException , ServletException 508 { 509 try 510 { 511 RollerRequest rreq = RollerRequest.getRollerRequest(request); 512 if ( rreq.isUserAuthorizedToEdit() ) 513 { 514 HttpSession session = request.getSession(true); 515 WeblogEntryFormEx wf = (WeblogEntryFormEx)actionForm; 516 if (wf.getReplacementWords() != null && 518 wf.getReplacementWords().length > 0) 519 { 520 String [] replacementWords = wf.getReplacementWords(); 522 StringBuffer entryText = new StringBuffer (wf.getText()); 523 524 ArrayList events = 525 (ArrayList ) session.getAttribute("spellCheckEvents"); 526 SpellCheckEvent event = null; 527 String oldWord = null; 528 String newWord = null; 529 int start = -1; 530 int end = -1; 531 int count = replacementWords.length; 532 for(ListIterator it=events.listIterator(events.size()); 533 it.hasPrevious();) 534 { 535 event = (SpellCheckEvent)it.previous(); 536 oldWord = event.getInvalidWord(); 537 newWord = replacementWords[ --count ]; 538 if (!oldWord.equals(newWord)) 539 { 540 start = event.getWordContextPosition(); 541 end = start + oldWord.length(); 542 entryText.replace( start, end, newWord ); 543 } 544 } 545 wf.setText( entryText.toString() ); 546 547 return save(mapping, wf, request, response); 548 } 549 } 550 } 551 catch (Exception e) 552 { 553 throw new ServletException (e); 554 } 555 return mapping.findForward("access-denied"); 556 } 557 558 public ActionForward spellCheck( 560 ActionMapping mapping, 561 ActionForm actionForm, 562 HttpServletRequest request, 563 HttpServletResponse response) 564 throws IOException , ServletException 565 { 566 ActionForward forward = mapping.findForward("weblogEdit.page"); 567 try 568 { 569 RollerRequest rreq = RollerRequest.getRollerRequest(request); 570 if ( rreq.isUserAuthorizedToEdit() ) 571 { 572 HttpSession session = request.getSession(true); 573 WeblogEntryFormEx wf = (WeblogEntryFormEx)actionForm; 574 575 if (wf.getId() == null) 577 { 578 save(mapping, actionForm, request, response); 579 } 580 581 ArrayList words = 583 RollerSpellCheck.getSpellingErrors( wf.getText() ); 584 session.setAttribute("spellCheckEvents", words); 585 586 request.setAttribute("model", 587 new WeblogEntryPageModel( 588 request, response, mapping, 589 (WeblogEntryFormEx)actionForm, 590 WeblogEntryPageModel.SPELL_MODE, words)); 591 } 592 else 593 { 594 forward = mapping.findForward("access-denied"); 595 } 596 } 597 catch (Exception e) 598 { 599 throw new ServletException (e); 600 } 601 return forward; 602 } 603 604 608 public ActionForward updateComments( 609 ActionMapping mapping, 610 ActionForm actionForm, 611 HttpServletRequest request, 612 HttpServletResponse response) 613 throws IOException , ServletException 614 { 615 ActionForward forward = mapping.findForward("weblogEdit.page"); 616 ActionErrors errors = new ActionErrors(); 617 RollerRequest rreq = RollerRequest.getRollerRequest(request); 618 try 619 { 620 if ( rreq.isUserAuthorizedToEdit() ) 621 { 622 WeblogEntryData wd = rreq.getWeblogEntry(); 623 if (wd == null || wd.getId() == null) 624 { 625 throw new NullPointerException ("Unable to find WeblogEntry for "+ 626 request.getParameter(RollerRequest.WEBLOGENTRYID_KEY)); 627 } 628 WeblogEntryFormEx form = (WeblogEntryFormEx)actionForm; 629 630 WeblogManager mgr = rreq.getRoller().getWeblogManager(); 632 String [] deleteIds = form.getDeleteComments(); 633 if (deleteIds != null && deleteIds.length > 0) 634 { 635 mgr.removeComments( deleteIds ); 636 } 637 638 List comments = mgr.getComments( wd.getId(), false ); if (form.getSpamComments() != null) 640 { 641 List spamIds = Arrays.asList(form.getSpamComments()); 643 644 Iterator it = comments.iterator(); 647 while (it.hasNext()) 648 { 649 CommentData comment = (CommentData)it.next(); 650 if (spamIds.contains(comment.getId())) 651 { 652 comment.setSpam(Boolean.TRUE); 653 } 654 else 655 { 656 comment.setSpam(Boolean.FALSE); 657 } 658 comment.save(); 659 } 660 } 661 662 rreq.getRoller().commit(); 663 664 reindexEntry(rreq.getRoller(), wd); 665 666 request.setAttribute("model", 667 new WeblogEntryPageModel(request, response, mapping, 668 (WeblogEntryFormEx)actionForm, 669 WeblogEntryPageModel.EDIT_MODE)); 670 } 671 else 672 { 673 forward = mapping.findForward("access-denied"); 674 } 675 } 676 catch (Exception e) 677 { 678 forward = mapping.findForward("error"); 679 680 errors.add(ActionErrors.GLOBAL_ERROR, 681 new ActionError("error.edit.comment", e.toString())); 682 saveErrors(request,errors); 683 684 mLogger.error(getResources(request).getMessage("error.edit.comment") 685 + e.toString(),e); 686 } 687 return forward; 688 } 689 690 693 public ActionForward sendTrackback( 694 ActionMapping mapping, 695 ActionForm actionForm, 696 HttpServletRequest request, 697 HttpServletResponse response) throws RollerException 698 { 699 ActionForward forward = mapping.findForward("weblogEdit.page"); 700 ActionErrors errors = new ActionErrors(); 701 WeblogEntryData entry = null; 702 try 703 { 704 RollerRequest rreq = RollerRequest.getRollerRequest(request); 705 if (rreq.isUserAuthorizedToEdit()) 706 { 707 WeblogEntryFormEx form = (WeblogEntryFormEx)actionForm; 708 String entryid = form.getId(); 709 if ( entryid == null ) 710 { 711 entryid= request.getParameter(RollerRequest.WEBLOGENTRYID_KEY); 712 } 713 714 RollerContext rctx= RollerContext.getRollerContext(request); 715 WeblogManager wmgr= rreq.getRoller().getWeblogManager(); 716 entry = wmgr.retrieveWeblogEntry(entryid); 717 718 String title = entry.getTitle(); 719 720 PageHelper pageHelper = PageHelper.createPageHelper(request, response); 722 pageHelper.setSkipFlag(true); String excerpt = pageHelper.renderPlugins(entry); 724 excerpt = StringUtils.left( Utilities.removeHTML(excerpt),255 ); 725 726 String url = rctx.createEntryPermalink(entry, request, true); 727 String blog_name = entry.getWebsite().getName(); 728 729 if (form.getTrackbackUrl() != null) 730 { 731 try 732 { 733 735 String data = URLEncoder.encode("title", "UTF-8") 736 +"="+URLEncoder.encode(title, "UTF-8"); 737 738 data += ("&" + URLEncoder.encode("excerpt", "UTF-8") 739 +"="+URLEncoder.encode(excerpt,"UTF-8")); 740 741 data += ("&" + URLEncoder.encode("url", "UTF-8") 742 +"="+URLEncoder.encode(url,"UTF-8")); 743 744 data += ("&" + URLEncoder.encode("blog_name", "UTF-8") 745 +"="+URLEncoder.encode(blog_name,"UTF-8")); 746 747 URL tburl = new URL (form.getTrackbackUrl()); 749 URLConnection conn = tburl.openConnection(); 750 conn.setDoOutput(true); 751 752 OutputStreamWriter wr = 753 new OutputStreamWriter (conn.getOutputStream()); 754 BufferedReader rd = null; 755 try 756 { 757 wr.write(data); 758 wr.flush(); 759 760 rd = new BufferedReader ( 762 new InputStreamReader (conn.getInputStream())); 763 764 String line; 765 StringBuffer resultBuff = new StringBuffer (); 766 while ((line = rd.readLine()) != null) 767 { 768 resultBuff.append(Utilities.escapeHTML(line, true)); 769 resultBuff.append("<br />"); 770 } 771 772 ActionMessages resultMsg = new ActionMessages(); 773 resultMsg.add(ActionMessages.GLOBAL_MESSAGE, 774 new ActionMessage("weblogEdit.trackbackResults", 775 resultBuff)); 776 saveMessages(request, resultMsg); 777 } 778 finally 779 { 780 wr.close(); 781 rd.close(); 782 } 783 } 784 catch (IOException e) 785 { 786 errors.add(ActionErrors.GLOBAL_ERROR, 787 new ActionError("error.trackback",e)); 788 } 789 } 790 else 791 { 792 errors.add(ActionErrors.GLOBAL_ERROR, 793 new ActionError("error.noTrackbackUrlSpecified")); 794 } 795 796 form.setTrackbackUrl(null); 797 } 798 else 799 { 800 forward = mapping.findForward("access-denied"); 801 } 802 } 803 catch (Exception e) { 805 mLogger.error(e); 806 String msg = e.getMessage(); 807 if ( msg == null ) 808 { 809 msg = e.getClass().getName(); 810 } 811 errors.add(ActionErrors.GLOBAL_ERROR, 812 new ActionError("error.general",msg)); 813 } 814 815 if ( !errors.isEmpty() ) 816 { 817 saveErrors(request, errors); 818 } 819 820 request.setAttribute("model", 821 new WeblogEntryPageModel(request, response, mapping, 822 (WeblogEntryFormEx)actionForm, 823 WeblogEntryPageModel.EDIT_MODE)); 824 825 return forward; 826 } 827 828 public ActionForward cancel( 830 ActionMapping mapping, 831 ActionForm actionForm, 832 HttpServletRequest request, 833 HttpServletResponse response) 834 throws IOException , ServletException 835 { 836 return (mapping.findForward("weblogEdit")); 837 } 838 839 public ActionForward unspecified( 841 ActionMapping mapping, 842 ActionForm actionForm, 843 HttpServletRequest request, 844 HttpServletResponse response) 845 throws Exception 846 { 847 return create(mapping, actionForm, request, response); 848 } 849 850 856 private void reindexEntry(Roller roller, WeblogEntryData entry) throws RollerException 857 { 858 IndexManager manager = roller.getIndexManager(); 859 860 863 if (entry.getPublishEntry() == Boolean.TRUE) 865 { 866 manager.addEntryReIndexOperation(entry); 867 } 868 } 869 } 870 871 | Popular Tags |