1 8 9 package org.roller.presentation.website.actions; 10 11 import org.apache.commons.logging.Log; 12 import org.apache.commons.logging.LogFactory; 13 import org.roller.RollerException; 14 import org.roller.model.PingTargetManager; 15 import org.roller.pojos.PingTargetData; 16 import org.roller.presentation.RollerRequest; 17 import org.roller.presentation.forms.PingTargetForm; 18 import org.roller.presentation.weblog.actions.BasePingTargetsAction; 19 20 import java.util.List ; 21 22 30 public class CommonPingTargetsAction extends BasePingTargetsAction 31 { 32 private static Log mLogger = 33 LogFactory.getFactory().getInstance(CommonPingTargetsAction.class); 34 35 protected Log getLogger() { 36 return mLogger; 37 } 38 39 43 protected List getPingTargets(RollerRequest rreq) throws RollerException 44 { 45 PingTargetManager pingTargetMgr = rreq.getRoller().getPingTargetManager(); 46 return pingTargetMgr.getCommonPingTargets(); 47 } 48 49 52 protected PingTargetData createPingTarget(RollerRequest rreq, PingTargetForm pingTargetForm) 53 throws RollerException 54 { 55 PingTargetManager pingTargetMgr = rreq.getRoller().getPingTargetManager(); 56 return pingTargetMgr.createCommonPingTarget( 57 pingTargetForm.getName(), pingTargetForm.getPingUrl()); 58 } 59 60 61 64 protected boolean hasRequiredRights(RollerRequest rreq) throws RollerException 65 { 66 return (rreq.isUserAuthorizedToEdit() && rreq.isAdminUser()); 68 } 69 } 70 | Popular Tags |