//# 0 errors, 229 messages
//#
/*
    //#FolderEdit.java:1:1: class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
 * 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.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.weblogger.WebloggerException;
import org.apache.roller.weblogger.business.BookmarkManager;
import org.apache.roller.weblogger.business.WebloggerFactory;
import org.apache.roller.weblogger.pojos.WeblogBookmarkFolder;
import org.apache.roller.weblogger.pojos.WeblogPermission;
import org.apache.roller.weblogger.ui.struts2.util.UIAction;
import org.apache.roller.weblogger.util.cache.CacheManager;
import org.apache.struts2.interceptor.validation.SkipValidation;


/**
 * Edit an existing folder.
 */
public class FolderEdit extends UIAction {
    
    private static Log log = LogFactory.getLog(FolderEdit.class);
    //#FolderEdit.java:39: method: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init
    //#FolderEdit.java:39: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/FolderEdit]
    //#output(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.execute()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.getBean()Lorg/apache/roller/weblogger/ui/struts2/editor/FolderBean;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.getFolder()Lorg/apache/roller/weblogger/pojos/WeblogBookmarkFolder;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.myPrepare()V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.myValidate()V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.requiredWeblogPermissions()S
    //#output(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.save()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.setBean(Lorg/apache/roller/weblogger/ui/struts2/editor/FolderBean;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.setFolder(Lorg/apache/roller/weblogger/pojos/WeblogBookmarkFolder;)V
    //#output(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): log
    //#post(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/FolderEdit] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.execute()Ljava/lang/String; == &execute
    //#post(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.getBean()Lorg/apache/roller/weblogger/ui/struts2/editor/FolderBean; == &getBean
    //#post(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.getFolder()Lorg/apache/roller/weblogger/pojos/WeblogBookmarkFolder; == &getFolder
    //#post(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.myPrepare()V == &myPrepare
    //#post(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.myValidate()V == &myValidate
    //#post(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.requiredWeblogPermissions()S == &requiredWeblogPermissions
    //#post(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.save()Ljava/lang/String; == &save
    //#post(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.setBean(Lorg/apache/roller/weblogger/ui/struts2/editor/FolderBean;)V == &setBean
    //#post(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): __Dispatch_Table.setFolder(Lorg/apache/roller/weblogger/pojos/WeblogBookmarkFolder;)V == &setFolder
    //#post(org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init): init'ed(log)
    //#FolderEdit.java:39: end of method: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.org.apache.roller.weblogger.ui.struts2.editor.FolderEdit__static_init
    
    // the folder we are editing
    private WeblogBookmarkFolder folder = null;
    
    // bean for managing form data
    private FolderBean bean = new FolderBean();
    
    
    public FolderEdit() {
    //#FolderEdit.java:48: method: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()
    //#FolderEdit.java:48: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.util.UIAction()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.util.UIAction()
    //#input(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): new FolderBean(FolderEdit#1) num objects
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.bean.__Tag
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.bean.description
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.bean.id
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.bean.name
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.actionName
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.bean
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.desiredMenu
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.folder
    //#output(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.pageTitle
    //#new obj(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): new FolderBean(FolderEdit#1)
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.actionName == &"folderEdit"
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.bean == &new FolderBean(FolderEdit#1)
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.desiredMenu == &"editor"
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.folder == null
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.bean.description == null
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.bean.id == null
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.bean.name == null
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.pageTitle == &"folderForm.edit.title"
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): new FolderBean(FolderEdit#1) num objects == 1
    //#post(void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()): this.bean.__Tag == org/apache/roller/weblogger/ui/struts2/editor/FolderBean
        this.actionName = "folderEdit";
        this.desiredMenu = "editor";
        this.pageTitle = "folderForm.edit.title";
    }
    //#FolderEdit.java:52: end of method: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.org.apache.roller.weblogger.ui.struts2.editor.FolderEdit()
    
    
    // author perms required
    public short requiredWeblogPermissions() {
        return WeblogPermission.AUTHOR;
    //#FolderEdit.java:57: method: short org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.requiredWeblogPermissions()
    //#input(short requiredWeblogPermissions()): org.apache.roller.weblogger.pojos.WeblogPermission.AUTHOR
    //#output(short requiredWeblogPermissions()): return_value
    //#presumption(short requiredWeblogPermissions()): init'ed(org.apache.roller.weblogger.pojos.WeblogPermission.AUTHOR)
    //#post(short requiredWeblogPermissions()): return_value == org.apache.roller.weblogger.pojos.WeblogPermission.AUTHOR
    //#post(short requiredWeblogPermissions()): (soft) init'ed(return_value)
    //#FolderEdit.java:57: end of method: short org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.requiredWeblogPermissions()
    }
    
    
    // load folder to edit
    public void myPrepare() {
        try {
            BookmarkManager bmgr = WebloggerFactory.getWeblogger().getBookmarkManager();
    //#FolderEdit.java:64: method: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.myPrepare()
    //#FolderEdit.java:64: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: void myPrepare()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#FolderEdit.java:64: Warning: method not available
    //#    -- call on BookmarkManager org.apache.roller.weblogger.business.Weblogger:getBookmarkManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: void myPrepare()
    //#    unanalyzed callee: BookmarkManager org.apache.roller.weblogger.business.Weblogger:getBookmarkManager()
    //#input(void myPrepare()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/FolderEdit]
    //#input(void myPrepare()): __Descendant_Table[others]
    //#input(void myPrepare()): __Dispatch_Table.getBean()Lorg/apache/roller/weblogger/ui/struts2/editor/FolderBean;
    //#input(void myPrepare()): __Dispatch_Table.setFolder(Lorg/apache/roller/weblogger/pojos/WeblogBookmarkFolder;)V
    //#input(void myPrepare()): log
    //#input(void myPrepare()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/FolderBean]
    //#input(void myPrepare()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Descendant_Table[others]
    //#input(void myPrepare()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Dispatch_Table.getId()Ljava/lang/String;
    //#input(void myPrepare()): this
    //#input(void myPrepare()): this.__Tag
    //#input(void myPrepare()): this.bean
    //#input(void myPrepare()): this.bean.__Tag
    //#input(void myPrepare()): this.bean.id
    //#output(void myPrepare()): this.folder
    //#pre[1] (void myPrepare()): (soft) log != null
    //#pre[4] (void myPrepare()): (soft) this.__Tag == org/apache/roller/weblogger/ui/struts2/editor/FolderEdit
    //#pre[5] (void myPrepare()): (soft) this.bean != null
    //#pre[6] (void myPrepare()): (soft) this.bean.__Tag == org/apache/roller/weblogger/ui/struts2/editor/FolderBean
    //#pre[7] (void myPrepare()): (soft) init'ed(this.bean.id)
    //#presumption(void myPrepare()): org.apache.roller.weblogger.business.Weblogger:getBookmarkManager(...)@64 != null
    //#presumption(void myPrepare()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@64 != null
    //#post(void myPrepare()): possibly_updated(this.folder)
    //#test_vector(void myPrepare()): org.apache.commons.lang.StringUtils:isEmpty(...)@65: {1}, {0}
            if(!StringUtils.isEmpty(getBean().getId())) {
    //#FolderEdit.java:65: Warning: method not available
    //#    -- call on bool org.apache.commons.lang.StringUtils:isEmpty(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: void myPrepare()
    //#    unanalyzed callee: bool org.apache.commons.lang.StringUtils:isEmpty(String)
                setFolder(bmgr.getFolder(getBean().getId()));
    //#FolderEdit.java:66: Warning: method not available
    //#    -- call on WeblogBookmarkFolder org.apache.roller.weblogger.business.BookmarkManager:getFolder(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: void myPrepare()
    //#    unanalyzed callee: WeblogBookmarkFolder org.apache.roller.weblogger.business.BookmarkManager:getFolder(String)
            }
        } catch (WebloggerException ex) {
            log.error("Error looking up folder", ex);
    //#FolderEdit.java:69: 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.FolderEdit
    //#    method: void myPrepare()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
        }
    }
    //#FolderEdit.java:71: end of method: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.myPrepare()
    
    
    /**
     * Show folder edit page.
     */
    @SkipValidation
    public String execute() {
        
        if(getFolder() == null) {
    //#FolderEdit.java:80: method: String org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.execute()
    //#input(String execute()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/FolderEdit]
    //#input(String execute()): __Descendant_Table[others]
    //#input(String execute()): __Dispatch_Table.getBean()Lorg/apache/roller/weblogger/ui/struts2/editor/FolderBean;
    //#input(String execute()): __Dispatch_Table.getFolder()Lorg/apache/roller/weblogger/pojos/WeblogBookmarkFolder;
    //#input(String execute()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/FolderBean]
    //#input(String execute()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Descendant_Table[others]
    //#input(String execute()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Dispatch_Table.copyFrom(Lorg/apache/roller/weblogger/pojos/WeblogBookmarkFolder;)V
    //#input(String execute()): this
    //#input(String execute()): this.__Tag
    //#input(String execute()): this.bean
    //#input(String execute()): this.bean.__Tag
    //#input(String execute()): this.folder
    //#output(String execute()): return_value
    //#output(String execute()): this.bean.description
    //#output(String execute()): this.bean.id
    //#output(String execute()): this.bean.name
    //#pre[5] (String execute()): this.__Tag == org/apache/roller/weblogger/ui/struts2/editor/FolderEdit
    //#pre[8] (String execute()): init'ed(this.folder)
    //#pre[6] (String execute()): (soft) this.bean != null
    //#pre[7] (String execute()): (soft) this.bean.__Tag == org/apache/roller/weblogger/ui/struts2/editor/FolderBean
    //#post(String execute()): return_value in Addr_Set{&"input",&"error"}
    //#post(String execute()): possibly_updated(this.bean.description)
    //#post(String execute()): possibly_updated(this.bean.id)
    //#post(String execute()): possibly_updated(this.bean.name)
    //#unanalyzed(String execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:getName
    //#unanalyzed(String execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:getId
    //#unanalyzed(String execute()): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:getDescription
    //#test_vector(String execute()): this.folder: Inverse{null}, Addr_Set{null}
            // TODO: i18n
            addError("Cannot edit null folder");
    //#FolderEdit.java:82: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: String execute()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:addError(String)
            return ERROR;
        }
        
        // make sure bean is properly loaded from pojo data
        getBean().copyFrom(getFolder());
        
        return INPUT;
    //#FolderEdit.java:89: end of method: String org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.execute()
    }

    
    /**
     * Save updated folder data.
     */
    public String save() {
        
        if(getFolder() == null) {
    //#FolderEdit.java:98: method: String org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.save()
    //#input(String save()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/FolderEdit]
    //#input(String save()): __Descendant_Table[others]
    //#input(String save()): __Dispatch_Table.getBean()Lorg/apache/roller/weblogger/ui/struts2/editor/FolderBean;
    //#input(String save()): __Dispatch_Table.getFolder()Lorg/apache/roller/weblogger/pojos/WeblogBookmarkFolder;
    //#input(String save()): __Dispatch_Table.myValidate()V
    //#input(String save()): log
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/FolderBean]
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Descendant_Table[others]
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Dispatch_Table.copyTo(Lorg/apache/roller/weblogger/pojos/WeblogBookmarkFolder;)V
    //#input(String save()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Dispatch_Table.getName()Ljava/lang/String;
    //#input(String save()): this
    //#input(String save()): this.__Tag
    //#input(String save()): this.bean
    //#input(String save()): this.bean.__Tag
    //#input(String save()): this.bean.description
    //#input(String save()): this.bean.name
    //#input(String save()): this.folder
    //#output(String save()): return_value
    //#pre[3] (String save()): this.__Tag == org/apache/roller/weblogger/ui/struts2/editor/FolderEdit
    //#pre[8] (String save()): init'ed(this.folder)
    //#pre[1] (String save()): (soft) log != null
    //#pre[4] (String save()): (soft) this.bean != null
    //#pre[5] (String save()): (soft) this.bean.__Tag == org/apache/roller/weblogger/ui/struts2/editor/FolderBean
    //#pre[6] (String save()): (soft) init'ed(this.bean.description)
    //#pre[7] (String save()): (soft) init'ed(this.bean.name)
    //#presumption(String save()): org.apache.roller.weblogger.business.Weblogger:getBookmarkManager(...)@113 != null
    //#presumption(String save()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@113 != null
    //#presumption(String save()): org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger(...)@115 != null
    //#post(String save()): return_value in Addr_Set{&"input",&"error"}
    //#unanalyzed(String save()): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:getName
    //#unanalyzed(String save()): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(String save()): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:updateName
    //#unanalyzed(String save()): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:setDescription
    //#unanalyzed(String save()): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:getParent
    //#unanalyzed(String save()): Effects-of-calling:org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:hasFolder
    //#unanalyzed(String save()): Effects-of-calling:org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:addError
    //#test_vector(String save()): this.folder: Inverse{null}, Addr_Set{null}
    //#test_vector(String save()): org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:hasActionErrors(...)@107: {1}, {0}
            // TODO: i18n
            addError("Cannot edit null folder");
    //#FolderEdit.java:100: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:addError(String)
            return ERROR;
        }
        
        // validation
        myValidate();
        
        if(!hasActionErrors()) try {
    //#FolderEdit.java:107: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:hasActionErrors()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: String save()
    //#    unanalyzed callee: bool org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:hasActionErrors()
            
            // copy updated attributes
            getBean().copyTo(getFolder());
            
            // save changes
            BookmarkManager bmgr = WebloggerFactory.getWeblogger().getBookmarkManager();
    //#FolderEdit.java:113: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: String save()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#FolderEdit.java:113: Warning: method not available
    //#    -- call on BookmarkManager org.apache.roller.weblogger.business.Weblogger:getBookmarkManager()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: String save()
    //#    unanalyzed callee: BookmarkManager org.apache.roller.weblogger.business.Weblogger:getBookmarkManager()
            bmgr.saveFolder(getFolder());
    //#FolderEdit.java:114: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.BookmarkManager:saveFolder(WeblogBookmarkFolder)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.BookmarkManager:saveFolder(WeblogBookmarkFolder)
            WebloggerFactory.getWeblogger().flush();
    //#FolderEdit.java:115: Warning: method not available
    //#    -- call on Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: String save()
    //#    unanalyzed callee: Weblogger org.apache.roller.weblogger.business.WebloggerFactory:getWeblogger()
    //#FolderEdit.java:115: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.business.Weblogger:flush()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.business.Weblogger:flush()
            
            // notify caches
            CacheManager.invalidate(getFolder());
    //#FolderEdit.java:118: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.util.cache.CacheManager:invalidate(WeblogBookmarkFolder)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.util.cache.CacheManager:invalidate(WeblogBookmarkFolder)
            
            // TODO: i18n
            addMessage("folder updated");
    //#FolderEdit.java:121: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:addMessage(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:addMessage(String)
            
        } catch(Exception ex) {
            log.error("Error saving folder", ex);
    //#FolderEdit.java:124: 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.FolderEdit
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.commons.logging.Log:error(Object, Throwable)
            // TODO: i18n
            addError("Error saving folder");
    //#FolderEdit.java:126: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:addError(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: String save()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:addError(String)
        }
        
        return INPUT;
    //#FolderEdit.java:129: end of method: String org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.save()
    }

    
    // TODO: validation
    public void myValidate() {
        
        // name is required, has max length, no html
        
        // make sure new name is not a duplicate of an existing folder
        if(!getFolder().getName().equals(getBean().getName())) {
    //#FolderEdit.java:139: method: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.myValidate()
    //#FolderEdit.java:139: Warning: method not available
    //#    -- call on String org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:getName()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: void myValidate()
    //#    unanalyzed callee: String org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:getName()
    //#input(void myValidate()): __Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/FolderEdit]
    //#input(void myValidate()): __Descendant_Table[others]
    //#input(void myValidate()): __Dispatch_Table.getBean()Lorg/apache/roller/weblogger/ui/struts2/editor/FolderBean;
    //#input(void myValidate()): __Dispatch_Table.getFolder()Lorg/apache/roller/weblogger/pojos/WeblogBookmarkFolder;
    //#input(void myValidate()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Descendant_Table[org/apache/roller/weblogger/ui/struts2/editor/FolderBean]
    //#input(void myValidate()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Descendant_Table[others]
    //#input(void myValidate()): org/apache/roller/weblogger/ui/struts2/editor/FolderBean.__Dispatch_Table.getName()Ljava/lang/String;
    //#input(void myValidate()): this
    //#input(void myValidate()): this.__Tag
    //#input(void myValidate()): this.bean
    //#input(void myValidate()): this.bean.__Tag
    //#input(void myValidate()): this.bean.name
    //#input(void myValidate()): this.folder
    //#pre[2] (void myValidate()): this.__Tag == org/apache/roller/weblogger/ui/struts2/editor/FolderEdit
    //#pre[3] (void myValidate()): this.bean != null
    //#pre[4] (void myValidate()): this.bean.__Tag == org/apache/roller/weblogger/ui/struts2/editor/FolderBean
    //#pre[5] (void myValidate()): init'ed(this.bean.name)
    //#pre[6] (void myValidate()): this.folder != null
    //#presumption(void myValidate()): org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:getName(...)@139 != null
    //#test_vector(void myValidate()): java.lang.String:equals(...)@139: {1}, {0}
    //#test_vector(void myValidate()): org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:getParent(...)@140: Addr_Set{null}, Inverse{null}
    //#test_vector(void myValidate()): org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:hasFolder(...)@141: {0}, {1}
            WeblogBookmarkFolder parent = getFolder().getParent();
    //#FolderEdit.java:140: Warning: method not available
    //#    -- call on WeblogBookmarkFolder org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:getParent()
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: void myValidate()
    //#    unanalyzed callee: WeblogBookmarkFolder org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:getParent()
            if(parent != null && parent.hasFolder(getBean().getName())) {
    //#FolderEdit.java:141: Warning: method not available
    //#    -- call on bool org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:hasFolder(String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: void myValidate()
    //#    unanalyzed callee: bool org.apache.roller.weblogger.pojos.WeblogBookmarkFolder:hasFolder(String)
                addError("folderForm.error.duplicateName", getBean().getName());
    //#FolderEdit.java:142: Warning: method not available
    //#    -- call on void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:addError(String, String)
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
    //#    method: void myValidate()
    //#    unanalyzed callee: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit:addError(String, String)
            }
        }
    }
    //#FolderEdit.java:145: end of method: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.myValidate()
    

    public WeblogBookmarkFolder getFolder() {
        return folder;
    //#FolderEdit.java:149: method: WeblogBookmarkFolder org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.getFolder()
    //#input(WeblogBookmarkFolder getFolder()): this
    //#input(WeblogBookmarkFolder getFolder()): this.folder
    //#output(WeblogBookmarkFolder getFolder()): return_value
    //#pre[2] (WeblogBookmarkFolder getFolder()): init'ed(this.folder)
    //#post(WeblogBookmarkFolder getFolder()): return_value == this.folder
    //#post(WeblogBookmarkFolder getFolder()): init'ed(return_value)
    //#FolderEdit.java:149: end of method: WeblogBookmarkFolder org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.getFolder()
    }

    public void setFolder(WeblogBookmarkFolder folder) {
        this.folder = folder;
    //#FolderEdit.java:153: method: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.setFolder(WeblogBookmarkFolder)
    //#input(void setFolder(WeblogBookmarkFolder)): folder
    //#input(void setFolder(WeblogBookmarkFolder)): this
    //#output(void setFolder(WeblogBookmarkFolder)): this.folder
    //#post(void setFolder(WeblogBookmarkFolder)): this.folder == folder
    //#post(void setFolder(WeblogBookmarkFolder)): init'ed(this.folder)
    }
    //#FolderEdit.java:154: end of method: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.setFolder(WeblogBookmarkFolder)

    public FolderBean getBean() {
        return bean;
    //#FolderEdit.java:157: method: FolderBean org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.getBean()
    //#input(FolderBean getBean()): this
    //#input(FolderBean getBean()): this.bean
    //#output(FolderBean getBean()): return_value
    //#pre[2] (FolderBean getBean()): init'ed(this.bean)
    //#post(FolderBean getBean()): return_value == this.bean
    //#post(FolderBean getBean()): init'ed(return_value)
    //#FolderEdit.java:157: end of method: FolderBean org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.getBean()
    }

    public void setBean(FolderBean bean) {
        this.bean = bean;
    //#FolderEdit.java:161: method: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.setBean(FolderBean)
    //#input(void setBean(FolderBean)): bean
    //#input(void setBean(FolderBean)): this
    //#output(void setBean(FolderBean)): this.bean
    //#post(void setBean(FolderBean)): this.bean == bean
    //#post(void setBean(FolderBean)): init'ed(this.bean)
    }
    //#FolderEdit.java:162: end of method: void org.apache.roller.weblogger.ui.struts2.editor.FolderEdit.setBean(FolderBean)
    
}
    //#FolderEdit.java:: end of class: org.apache.roller.weblogger.ui.struts2.editor.FolderEdit
