File Source: CustomPingTargetAdd.java
1 /*
2 * CustomPingTargetAdd.java
3 *
4 * Created on April 30, 2007, 9:52 AM
5 *
6 * To change this template, choose Tools | Template Manager
7 * and open the template in the editor.
8 */
9
10 package org.apache.roller.weblogger.ui.struts2.editor;
11
12 import org.apache.commons.logging.Log;
13 import org.apache.commons.logging.LogFactory;
14 import org.apache.roller.weblogger.pojos.WeblogPermission;
15 import org.apache.roller.weblogger.pojos.PingTarget;
16 import org.apache.roller.weblogger.ui.struts2.common.PingTargetAddBase;
17
18
19 /**
20 * Action for adding a custom weblog ping target.
21 */
22 public class CustomPingTargetAdd extends PingTargetAddBase {
23
/*
P/P * Method: org.apache.roller.weblogger.ui.struts2.editor.CustomPingTargetAdd__static_init
*
* Postconditions:
* init'ed(log)
*/
24 private static Log log = LogFactory.getLog(CustomPingTargetAdd.class);
25
26
/*
P/P * Method: void org.apache.roller.weblogger.ui.struts2.editor.CustomPingTargetAdd()
*
* Postconditions:
* this.actionName == &"customPingTargetAdd"
* this.bean == &new PingTargetFormBean(PingTargetAddBase#1)
* this.desiredMenu == &"editor"
* this.pageTitle == &"pingTarget.pingTarget"
* new PingTargetFormBean(PingTargetAddBase#1) num objects == 1
* new PingTargetFormBean(PingTargetAddBase#1).id == null
* new PingTargetFormBean(PingTargetAddBase#1).name == null
* new PingTargetFormBean(PingTargetAddBase#1).pingUrl == null
*/
27 public CustomPingTargetAdd() {
28 this.actionName = "customPingTargetAdd";
29 this.desiredMenu = "editor";
30 this.pageTitle = "pingTarget.pingTarget";
31 }
32
33
34 // admin perms required
35 public short requiredWeblogPermission() {
/*
P/P * Method: short requiredWeblogPermission()
*
* Presumptions:
* init'ed(org.apache.roller.weblogger.pojos.WeblogPermission.ADMIN)
*
* Postconditions:
* return_value == org.apache.roller.weblogger.pojos.WeblogPermission.ADMIN
* (soft) init'ed(return_value)
*/
36 return WeblogPermission.ADMIN;
37 }
38
39
40 protected Log getLogger() {
/*
P/P * Method: Log getLogger()
*
* Preconditions:
* init'ed(log)
*
* Postconditions:
* return_value == log
* init'ed(return_value)
*/
41 return log;
42 }
43
44
45 protected PingTarget createPingTarget() {
46
/*
P/P * Method: PingTarget createPingTarget()
*
* Preconditions:
* this.bean != null
* init'ed(this.bean.name)
* init'ed(this.bean.pingUrl)
*
* Postconditions:
* return_value == &new PingTarget(createPingTarget#1)
* new PingTarget(createPingTarget#1) num objects == 1
*/
47 return new PingTarget(
48 null,
49 getBean().getName(),
50 getBean().getPingUrl(),
51 getActionWeblog(),
52 false);
53 }
54
55 }
SofCheck Inspector Build Version : 2.18479
| CustomPingTargetAdd.java |
2009-Jan-02 14:25:36 |
| CustomPingTargetAdd.class |
2009-Sep-04 03:12:45 |