File Source: CustomPingTargetEdit.java

     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one or more
     3   * contributor license agreements.  The ASF licenses this file to You
     4   * under the Apache License, Version 2.0 (the "License"); you may not
     5   * use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *   http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.  For additional information regarding
    15   * copyright in this work, please see the NOTICE file in the top level
    16   * directory of this distribution.
    17   */
    18  
    19  package org.apache.roller.weblogger.ui.struts2.editor;
    20  
    21  import org.apache.commons.logging.Log;
    22  import org.apache.commons.logging.LogFactory;
    23  import org.apache.roller.weblogger.pojos.WeblogPermission;
    24  import org.apache.roller.weblogger.ui.struts2.common.PingTargetEditBase;
    25  
    26  
    27  /**
    28   * Action for modifying a weblog custom ping target.
    29   */
    30  public class CustomPingTargetEdit extends PingTargetEditBase {
    31      
             /* 
    P/P       *  Method: org.apache.roller.weblogger.ui.struts2.editor.CustomPingTargetEdit__static_init
              * 
              *  Postconditions:
              *    init'ed(log)
              */
    32      private static Log log = LogFactory.getLog(CustomPingTargetEdit.class);
    33      
    34      
             /* 
    P/P       *  Method: void org.apache.roller.weblogger.ui.struts2.editor.CustomPingTargetEdit()
              * 
              *  Postconditions:
              *    this.actionName == &"customPingTargetEdit"
              *    this.bean == &new PingTargetFormBean(PingTargetEditBase#1)
              *    this.desiredMenu == &"editor"
              *    this.pageTitle == &"pingTarget.pingTarget"
              *    this.pingTarget == null
              *    new PingTargetFormBean(PingTargetEditBase#1).id == null
              *    new PingTargetFormBean(PingTargetEditBase#1).name == null
              *    new PingTargetFormBean(PingTargetEditBase#1).pingUrl == null
              *    new PingTargetFormBean(PingTargetEditBase#1) num objects == 1
              */
    35      public CustomPingTargetEdit() {
    36          this.actionName = "customPingTargetEdit";
    37          this.desiredMenu = "editor";
    38          this.pageTitle = "pingTarget.pingTarget";
    39      }
    40      
    41      
    42      // admin perms required
    43      public short requiredWeblogPermissions() {
                 /* 
    P/P           *  Method: short requiredWeblogPermissions()
                  * 
                  *  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)
                  */
    44          return WeblogPermission.ADMIN;
    45      }
    46      
    47      
    48      protected Log getLogger() {
                 /* 
    P/P           *  Method: Log getLogger()
                  * 
                  *  Preconditions:
                  *    init'ed(log)
                  * 
                  *  Postconditions:
                  *    return_value == log
                  *    init'ed(return_value)
                  */
    49          return log;
    50      }
    51      
    52  }








SofCheck Inspector Build Version : 2.18479
CustomPingTargetEdit.java 2009-Jan-02 14:25:28
CustomPingTargetEdit.class 2009-Sep-04 03:12:45