//# 0 errors, 231 messages
//#
/*
    //#TemplateRemove.java:1:1: class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
 * Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  The ASF licenses this file to You
 * under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.  For additional information regarding
 * copyright in this work, please see the NOTICE file in the top level
 * directory of this distribution.
 */

package org.apache.roller.weblogger.ui.struts2.editor;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.weblogger.WebloggerException;
import org.apache.roller.weblogger.business.WebloggerFactory;
import org.apache.roller.weblogger.business.UserManager;
import org.apache.roller.weblogger.pojos.WeblogPermission;
import org.apache.roller.weblogger.pojos.WeblogTemplate;
import org.apache.roller.weblogger.ui.struts2.util.UIAction;
import org.apache.roller.weblogger.util.cache.CacheManager;


/**
 * Remove a template.
 */
public class TemplateRemove extends UIAction {
    
    private static Log log = LogFactory.getLog(TemplateRemove.class);
    //#TemplateRemove.java:37: method: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init
    //#TemplateRemove.java:37: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove]
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.addError(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.addError(Ljava/lang/String;Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.addError(Ljava/lang/String;Ljava/util/List;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.addMessage(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.addMessage(Ljava/lang/String;Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.addMessage(Ljava/lang/String;Ljava/util/List;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.errorsExist()Z
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.execute()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getAbsoluteSiteURL()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getActionName()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getActionWeblog()Lorg/apache/roller/weblogger/pojos/Weblog;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getAuthenticatedUser()Lorg/apache/roller/weblogger/pojos/User;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getBooleanProp(Ljava/lang/String;)Z
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getCommentDaysList()Ljava/util/List;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getDesiredMenu()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getHoursList()Ljava/util/List;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getIntProp(Ljava/lang/String;)I
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getLocalesList()Ljava/util/List;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getMediumDateFormat()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getMenu()Lorg/apache/roller/weblogger/ui/core/util/menu/Menu;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getMinutesList()Ljava/util/List;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getPageTitle()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getProp(Ljava/lang/String;)Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getRemoveId()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getSecondsList()Ljava/util/List;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getShortDateFormat()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getSiteURL()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getTemplate()Lorg/apache/roller/weblogger/pojos/WeblogTemplate;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getTimeZonesList()Ljava/util/List;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getWeblog()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.isUserIsAdmin()Z
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.isUserRequired()Z
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.isWeblogRequired()Z
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.messagesExist()Z
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.myPrepare()V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.remove()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.requiredUserRole()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.requiredWeblogPermissions()S
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setActionName(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setActionWeblog(Lorg/apache/roller/weblogger/pojos/Weblog;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setAuthenticatedUser(Lorg/apache/roller/weblogger/pojos/User;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setDesiredMenu(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setPageTitle(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setRemoveId(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setTemplate(Lorg/apache/roller/weblogger/pojos/WeblogTemplate;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setWeblog(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): log
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): org/apache/roller/weblogger/ui/struts2/util/UIAction.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove]
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): org/apache/roller/weblogger/ui/struts2/util/UIActionPreparable.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove]
    //#output(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): org/apache/roller/weblogger/ui/struts2/util/UISecurityEnforced.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove]
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): org/apache/roller/weblogger/ui/struts2/util/UIAction.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): org/apache/roller/weblogger/ui/struts2/util/UIActionPreparable.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): org/apache/roller/weblogger/ui/struts2/util/UISecurityEnforced.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.addError(Ljava/lang/String;)V == &org/apache/roller/weblogger/ui/struts2/util/UIAction.addError
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.addError(Ljava/lang/String;Ljava/lang/String;)V == &org/apache/roller/weblogger/ui/struts2/util/UIAction.addError
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.addError(Ljava/lang/String;Ljava/util/List;)V == &org/apache/roller/weblogger/ui/struts2/util/UIAction.addError
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.addMessage(Ljava/lang/String;)V == &org/apache/roller/weblogger/ui/struts2/util/UIAction.addMessage
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.addMessage(Ljava/lang/String;Ljava/lang/String;)V == &org/apache/roller/weblogger/ui/struts2/util/UIAction.addMessage
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.addMessage(Ljava/lang/String;Ljava/util/List;)V == &org/apache/roller/weblogger/ui/struts2/util/UIAction.addMessage
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.errorsExist()Z == &org/apache/roller/weblogger/ui/struts2/util/UIAction.errorsExist
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.execute()Ljava/lang/String; == &execute
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getAbsoluteSiteURL()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getAbsoluteSiteURL
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getActionName()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getActionName
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getActionWeblog()Lorg/apache/roller/weblogger/pojos/Weblog; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getActionWeblog
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getAuthenticatedUser()Lorg/apache/roller/weblogger/pojos/User; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getAuthenticatedUser
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getBooleanProp(Ljava/lang/String;)Z == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getBooleanProp
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getCommentDaysList()Ljava/util/List; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getCommentDaysList
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getDesiredMenu()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getDesiredMenu
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getHoursList()Ljava/util/List; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getHoursList
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getIntProp(Ljava/lang/String;)I == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getIntProp
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getLocalesList()Ljava/util/List; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getLocalesList
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getMediumDateFormat()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getMediumDateFormat
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getMenu()Lorg/apache/roller/weblogger/ui/core/util/menu/Menu; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getMenu
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getMinutesList()Ljava/util/List; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getMinutesList
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getPageTitle()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getPageTitle
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getProp(Ljava/lang/String;)Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getProp
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getRemoveId()Ljava/lang/String; == &getRemoveId
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getSecondsList()Ljava/util/List; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getSecondsList
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getShortDateFormat()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getShortDateFormat
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getSiteURL()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getSiteURL
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getTemplate()Lorg/apache/roller/weblogger/pojos/WeblogTemplate; == &getTemplate
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getTimeZonesList()Ljava/util/List; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getTimeZonesList
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.getWeblog()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.getWeblog
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.isUserIsAdmin()Z == &org/apache/roller/weblogger/ui/struts2/util/UIAction.isUserIsAdmin
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.isUserRequired()Z == &org/apache/roller/weblogger/ui/struts2/util/UIAction.isUserRequired
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.isWeblogRequired()Z == &org/apache/roller/weblogger/ui/struts2/util/UIAction.isWeblogRequired
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.messagesExist()Z == &org/apache/roller/weblogger/ui/struts2/util/UIAction.messagesExist
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.myPrepare()V == &myPrepare
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.remove()Ljava/lang/String; == &remove
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.requiredUserRole()Ljava/lang/String; == &org/apache/roller/weblogger/ui/struts2/util/UIAction.requiredUserRole
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.requiredWeblogPermissions()S == &requiredWeblogPermissions
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setActionName(Ljava/lang/String;)V == &org/apache/roller/weblogger/ui/struts2/util/UIAction.setActionName
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setActionWeblog(Lorg/apache/roller/weblogger/pojos/Weblog;)V == &org/apache/roller/weblogger/ui/struts2/util/UIAction.setActionWeblog
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setAuthenticatedUser(Lorg/apache/roller/weblogger/pojos/User;)V == &org/apache/roller/weblogger/ui/struts2/util/UIAction.setAuthenticatedUser
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setDesiredMenu(Ljava/lang/String;)V == &org/apache/roller/weblogger/ui/struts2/util/UIAction.setDesiredMenu
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setPageTitle(Ljava/lang/String;)V == &org/apache/roller/weblogger/ui/struts2/util/UIAction.setPageTitle
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setRemoveId(Ljava/lang/String;)V == &setRemoveId
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setTemplate(Lorg/apache/roller/weblogger/pojos/WeblogTemplate;)V == &setTemplate
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): __Dispatch_Table.setWeblog(Ljava/lang/String;)V == &org/apache/roller/weblogger/ui/struts2/util/UIAction.setWeblog
    //#post(org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init): init'ed(log)
    //#TemplateRemove.java:37: end of method: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove__static_init
    
    // id of template to remove
    private String removeId = null;
    
    // template object that we will remove
    private WeblogTemplate template = null;
    
    
    public TemplateRemove() {
    //#TemplateRemove.java:46: method: void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()
    //#input(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.actionName
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.actionWeblog
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.authenticatedUser
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.desiredMenu
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.pageTitle
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.removeId
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.template
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.weblog
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.actionName == &"templateRemove"
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.actionWeblog == null
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.authenticatedUser == null
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.removeId == null
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.template == null
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.weblog == null
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.desiredMenu == &"editor"
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): this.pageTitle == &"editPages.title.removeOK"
    //#unanalyzed(void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()): Effects-of-calling:com.opensymphony.xwork2.ActionSupport
        this.actionName = "templateRemove";
        this.desiredMenu = "editor";
        this.pageTitle = "editPages.title.removeOK";
    }
    //#TemplateRemove.java:50: end of method: void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove()
    
    
    // must be a weblog admin to use this action
    public short requiredWeblogPermissions() {
        return WeblogPermission.ADMIN;
    //#TemplateRemove.java:55: method: short org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.requiredWeblogPermissions()
    //#input(short requiredWeblogPermissions()): org.apache.roller.weblogger.pojos.WeblogPermission.ADMIN
    //#output(short requiredWeblogPermissions()): return_value
    //#presumption(short requiredWeblogPermissions()): init'ed(org.apache.roller.weblogger.pojos.WeblogPermission.ADMIN)
    //#post(short requiredWeblogPermissions()): return_value == org.apache.roller.weblogger.pojos.WeblogPermission.ADMIN
    //#post(short requiredWeblogPermissions()): (soft) init'ed(return_value)
    //#TemplateRemove.java:55: end of method: short org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.requiredWeblogPermissions()
    }
    
    
    public void myPrepare() {
        if(getRemoveId() != null) try {
    //#TemplateRemove.java:60: method: void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.myPrepare()
    //#input(void myPrepare()): "Could not find template to remove - "._tainted
    //#input(void myPrepare()): "Error looking up template by id - "._tainted
    //#input(void myPrepare()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove]
    //#input(void myPrepare()): __Descendant_Table[others]
    //#input(void myPrepare()): __Dispatch_Table.addError(Ljava/lang/String;)V
    //#input(void myPrepare()): __Dispatch_Table.getRemoveId()Ljava/lang/String;
    //#input(void myPrepare()): __Dispatch_Table.setTemplate(Lorg/apache/roller/weblogger/pojos/WeblogTemplate;)V
    //#input(void myPrepare()): log
    //#input(void myPrepare()): this
    //#input(void myPrepare()): this.__Tag
    //#input(void myPrepare()): this.removeId
    //#input(void myPrepare()): this.removeId._tainted
    //#output(void myPrepare()): this.template
    //#pre[4] (void myPrepare()): this.__Tag == org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove
    //#pre[5] (void myPrepare()): init'ed(this.removeId)
    //#pre[1] (void myPrepare()): (soft) log != null
    //#presumption(void myPrepare()): org.apache.roller.weblogger.business.Weblogger:getUserManager(...)@61 != null
    //#presumption(void myPrepare()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@61 != null
    //#post(void myPrepare()): possibly_updated(this.template)
    //#unanalyzed(void myPrepare()): Effects-of-calling:org.apache.roller.weblogger.ui.struts2.util.UIAction:getText
    //#unanalyzed(void myPrepare()): Effects-of-calling:org.apache.roller.weblogger.ui.struts2.util.UIAction:addActionError
    //#test_vector(void myPrepare()): this.removeId: Addr_Set{null}, Inverse{null}
            UserManager umgr = WebloggerFactory.getWeblogger().getUserManager();
    //#TemplateRemove.java:61: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: void myPrepare()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#TemplateRemove.java:61: Warning: method not available
    //#    -- call on UserManager org.apache.roller.weblogger.business.Weblogger:getUserManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: void myPrepare()
    //#    unanalyzed callee: UserManager org.apache.roller.weblogger.business.Weblogger:getUserManager()
            setTemplate(umgr.getPage(getRemoveId()));
    //#TemplateRemove.java:62: Warning: method not available
    //#    -- call on WeblogTemplate org.apache.roller.weblogger.business.UserManager:getPage(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: void myPrepare()
    //#    unanalyzed callee: WeblogTemplate org.apache.roller.weblogger.business.UserManager:getPage(String)
        } catch (WebloggerException ex) {
            log.error("Error looking up template by id - "+getRemoveId(), ex);
    //#TemplateRemove.java:64: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: void myPrepare()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
            // TODO: i18n
            addError("Could not find template to remove - "+getRemoveId());
        }
    }
    //#TemplateRemove.java:68: end of method: void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.myPrepare()
    
    
    /**
     * Display the remove template confirmation.
     */
    public String execute() {
        return "confirm";
    //#TemplateRemove.java:75: method: String org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.execute()
    //#output(String execute()): return_value
    //#post(String execute()): return_value == &"confirm"
    //#TemplateRemove.java:75: end of method: String org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.execute()
    }
    
    
    /**
     * Remove a new template.
     */
    public String remove() {
        
        if(getTemplate() != null) try {
    //#TemplateRemove.java:84: method: String org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.remove()
    //#input(String remove()): "Error removing page - "._tainted
    //#input(String remove()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove]
    //#input(String remove()): __Descendant_Table[others]
    //#input(String remove()): __Dispatch_Table.addError(Ljava/lang/String;)V
    //#input(String remove()): __Dispatch_Table.getRemoveId()Ljava/lang/String;
    //#input(String remove()): __Dispatch_Table.getTemplate()Lorg/apache/roller/weblogger/pojos/WeblogTemplate;
    //#input(String remove()): log
    //#input(String remove()): this
    //#input(String remove()): this.__Tag
    //#input(String remove()): this.removeId
    //#input(String remove()): this.removeId._tainted
    //#input(String remove()): this.template
    //#output(String remove()): return_value
    //#pre[3] (String remove()): this.__Tag == org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove
    //#pre[6] (String remove()): init'ed(this.template)
    //#pre[1] (String remove()): (soft) log != null
    //#pre[4] (String remove()): (soft) init'ed(this.removeId)
    //#presumption(String remove()): org.apache.roller.weblogger.business.Weblogger:getUserManager(...)@86 != null
    //#presumption(String remove()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@86 != null
    //#presumption(String remove()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@92 != null
    //#post(String remove()): return_value in Addr_Set{&"success",&"confirm"}
    //#unanalyzed(String remove()): Effects-of-calling:org.apache.roller.weblogger.ui.struts2.util.UIAction:getText
    //#unanalyzed(String remove()): Effects-of-calling:org.apache.roller.weblogger.ui.struts2.util.UIAction:addActionError
    //#test_vector(String remove()): this.template: Addr_Set{null}, Inverse{null}
    //#test_vector(String remove()): org.apache.roller.weblogger.pojos.WeblogTemplate:isRequired(...)@85: {1}, {0}
            if(!getTemplate().isRequired()) {
    //#TemplateRemove.java:85: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.pojos.WeblogTemplate:isRequired()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: String remove()
    //#    unanalyzed callee: bool org.apache.roller.weblogger.pojos.WeblogTemplate:isRequired()
                UserManager umgr = WebloggerFactory.getWeblogger().getUserManager();
    //#TemplateRemove.java:86: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: String remove()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#TemplateRemove.java:86: Warning: method not available
    //#    -- call on UserManager org.apache.roller.weblogger.business.Weblogger:getUserManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: String remove()
    //#    unanalyzed callee: UserManager org.apache.roller.weblogger.business.Weblogger:getUserManager()

                // notify cache
                CacheManager.invalidate(getTemplate());
    //#TemplateRemove.java:89: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.cache.CacheManager:invalidate(WeblogTemplate)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: String remove()
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.cache.CacheManager:invalidate(WeblogTemplate)

                umgr.removePage(getTemplate());
    //#TemplateRemove.java:91: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.UserManager:removePage(WeblogTemplate)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: String remove()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.UserManager:removePage(WeblogTemplate)
                WebloggerFactory.getWeblogger().flush();
    //#TemplateRemove.java:92: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: String remove()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#TemplateRemove.java:92: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.Weblogger:flush()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: String remove()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.Weblogger:flush()
                                
                return SUCCESS;
            } else {
                // TODO: i18n
                addError("Cannot remove required template");
            }
            
        } catch(Exception ex) {
            log.error("Error removing page - "+getRemoveId(), ex);
    //#TemplateRemove.java:101: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:error(Object, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
    //#    method: String remove()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
            // TODO: i18n
            addError("Error removing page");
        }
        
        return "confirm";
    //#TemplateRemove.java:106: end of method: String org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.remove()
    }

    
    public String getRemoveId() {
        return removeId;
    //#TemplateRemove.java:111: method: String org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.getRemoveId()
    //#input(String getRemoveId()): this
    //#input(String getRemoveId()): this.removeId
    //#output(String getRemoveId()): return_value
    //#pre[2] (String getRemoveId()): init'ed(this.removeId)
    //#post(String getRemoveId()): return_value == this.removeId
    //#post(String getRemoveId()): init'ed(return_value)
    //#TemplateRemove.java:111: end of method: String org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.getRemoveId()
    }

    public void setRemoveId(String removeId) {
        this.removeId = removeId;
    //#TemplateRemove.java:115: method: void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.setRemoveId(String)
    //#input(void setRemoveId(String)): removeId
    //#input(void setRemoveId(String)): this
    //#output(void setRemoveId(String)): this.removeId
    //#post(void setRemoveId(String)): this.removeId == removeId
    //#post(void setRemoveId(String)): init'ed(this.removeId)
    }
    //#TemplateRemove.java:116: end of method: void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.setRemoveId(String)

    public WeblogTemplate getTemplate() {
        return template;
    //#TemplateRemove.java:119: method: WeblogTemplate org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.getTemplate()
    //#input(WeblogTemplate getTemplate()): this
    //#input(WeblogTemplate getTemplate()): this.template
    //#output(WeblogTemplate getTemplate()): return_value
    //#pre[2] (WeblogTemplate getTemplate()): init'ed(this.template)
    //#post(WeblogTemplate getTemplate()): return_value == this.template
    //#post(WeblogTemplate getTemplate()): init'ed(return_value)
    //#TemplateRemove.java:119: end of method: WeblogTemplate org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.getTemplate()
    }

    public void setTemplate(WeblogTemplate template) {
        this.template = template;
    //#TemplateRemove.java:123: method: void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.setTemplate(WeblogTemplate)
    //#input(void setTemplate(WeblogTemplate)): template
    //#input(void setTemplate(WeblogTemplate)): this
    //#output(void setTemplate(WeblogTemplate)): this.template
    //#post(void setTemplate(WeblogTemplate)): this.template == template
    //#post(void setTemplate(WeblogTemplate)): init'ed(this.template)
    }
    //#TemplateRemove.java:124: end of method: void org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove.setTemplate(WeblogTemplate)
    
}
    //#TemplateRemove.java:: end of class: org.apache.roller.weblogger.ui.struts2.editor.TemplateRemove
