//# 0 errors, 163 messages
//#
/*
    //#SharedTheme.java:1:1: class: org.apache.roller.weblogger.business.themes.SharedTheme
    //#SharedTheme.java:1:1: method: org.apache.roller.weblogger.business.themes.SharedTheme.org.apache.roller.weblogger.business.themes.SharedTheme__static_init
 * 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.business.themes;

import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.roller.weblogger.pojos.Theme;
import org.apache.roller.weblogger.pojos.ThemeResource;
import org.apache.roller.weblogger.pojos.ThemeTemplate;


/**
 * A SharedTheme is a theme implementation which is designed to be shared by
 * multiple weblogs using a common set of resources.
 */
public abstract class SharedTheme implements Theme, Serializable, Comparable {
    //#SharedTheme.java:39: method: void org.apache.roller.weblogger.business.themes.SharedTheme.org.apache.roller.weblogger.business.themes.SharedTheme()
    //#input(void org.apache.roller.weblogger.business.themes.SharedTheme()): this
    //#output(void org.apache.roller.weblogger.business.themes.SharedTheme()): this.author
    //#output(void org.apache.roller.weblogger.business.themes.SharedTheme()): this.description
    //#output(void org.apache.roller.weblogger.business.themes.SharedTheme()): this.enabled
    //#output(void org.apache.roller.weblogger.business.themes.SharedTheme()): this.id
    //#output(void org.apache.roller.weblogger.business.themes.SharedTheme()): this.lastModified
    //#output(void org.apache.roller.weblogger.business.themes.SharedTheme()): this.name
    //#post(void org.apache.roller.weblogger.business.themes.SharedTheme()): this.author == null
    //#post(void org.apache.roller.weblogger.business.themes.SharedTheme()): this.description == null
    //#post(void org.apache.roller.weblogger.business.themes.SharedTheme()): this.id == null
    //#post(void org.apache.roller.weblogger.business.themes.SharedTheme()): this.lastModified == null
    //#post(void org.apache.roller.weblogger.business.themes.SharedTheme()): this.name == null
    //#post(void org.apache.roller.weblogger.business.themes.SharedTheme()): this.enabled == 0
    
    protected String id = null;
    protected String name = null;
    protected String description = null;
    protected String author = null;
    protected Date lastModified = null;
    protected boolean enabled = false;
    //#SharedTheme.java:46: end of method: void org.apache.roller.weblogger.business.themes.SharedTheme.org.apache.roller.weblogger.business.themes.SharedTheme()
    
    public abstract List getResources();
    
    public abstract ThemeResource getPreviewImage();
    
    
    /**
     * @see java.lang.Comparable#compareTo(java.lang.Object)
     */
    public int compareTo(Object o) {
        SharedTheme other = (SharedTheme) o;
    //#SharedTheme.java:57: method: int org.apache.roller.weblogger.business.themes.SharedTheme.compareTo(Object)
    //#SharedTheme.java:57: Warning: suspicious precondition
    //#    the precondition for o.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.business.themes.SharedTheme
    //#    method: int compareTo(Object)
    //#    suspicious precondition index: [2]
    //#SharedTheme.java:57: Warning: suspicious precondition
    //#    the precondition for this.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: org.apache.roller.weblogger.business.themes.SharedTheme
    //#    method: int compareTo(Object)
    //#    suspicious precondition index: [5]
    //#input(int compareTo(Object)): __Descendant_Table[org/apache/roller/weblogger/business/themes/SharedThemeFromDir]
    //#input(int compareTo(Object)): __Descendant_Table[org/apache/roller/weblogger/business/themes/SharedTheme]
    //#input(int compareTo(Object)): __Descendant_Table[others]
    //#input(int compareTo(Object)): __Dispatch_Table.getName()Ljava/lang/String;
    //#input(int compareTo(Object)): o
    //#input(int compareTo(Object)): o.__Tag
    //#input(int compareTo(Object)): o.name
    //#input(int compareTo(Object)): org/apache/roller/weblogger/business/themes/SharedThemeFromDir.__Dispatch_Table.getName()Ljava/lang/String;
    //#input(int compareTo(Object)): this
    //#input(int compareTo(Object)): this.__Tag
    //#input(int compareTo(Object)): this.name
    //#output(int compareTo(Object)): return_value
    //#pre[1] (int compareTo(Object)): o != null
    //#pre[2] (int compareTo(Object)): o.__Tag in {org/apache/roller/weblogger/business/themes/SharedTheme, org/apache/roller/weblogger/business/themes/SharedThemeFromDir}
    //#pre[3] (int compareTo(Object)): init'ed(o.name)
    //#pre[5] (int compareTo(Object)): this.__Tag in {org/apache/roller/weblogger/business/themes/SharedTheme, org/apache/roller/weblogger/business/themes/SharedThemeFromDir}
    //#pre[6] (int compareTo(Object)): this.name != null
    //#post(int compareTo(Object)): init'ed(return_value)
        return getName().compareTo(other.getName());
    //#SharedTheme.java:58: end of method: int org.apache.roller.weblogger.business.themes.SharedTheme.compareTo(Object)
    }
    
    
    public String getId() {
        return id;
    //#SharedTheme.java:63: method: String org.apache.roller.weblogger.business.themes.SharedTheme.getId()
    //#input(String getId()): this
    //#input(String getId()): this.id
    //#output(String getId()): return_value
    //#pre[2] (String getId()): init'ed(this.id)
    //#post(String getId()): return_value == this.id
    //#post(String getId()): init'ed(return_value)
    //#SharedTheme.java:63: end of method: String org.apache.roller.weblogger.business.themes.SharedTheme.getId()
    }

    public void setId(String id) {
        this.id = id;
    //#SharedTheme.java:67: method: void org.apache.roller.weblogger.business.themes.SharedTheme.setId(String)
    //#input(void setId(String)): id
    //#input(void setId(String)): this
    //#output(void setId(String)): this.id
    //#post(void setId(String)): this.id == id
    //#post(void setId(String)): init'ed(this.id)
    }
    //#SharedTheme.java:68: end of method: void org.apache.roller.weblogger.business.themes.SharedTheme.setId(String)
    
    public String getName() {
        return name;
    //#SharedTheme.java:71: method: String org.apache.roller.weblogger.business.themes.SharedTheme.getName()
    //#input(String getName()): this
    //#input(String getName()): this.name
    //#output(String getName()): return_value
    //#pre[2] (String getName()): init'ed(this.name)
    //#post(String getName()): return_value == this.name
    //#post(String getName()): init'ed(return_value)
    //#SharedTheme.java:71: end of method: String org.apache.roller.weblogger.business.themes.SharedTheme.getName()
    }

    public void setName(String name) {
        this.name = name;
    //#SharedTheme.java:75: method: void org.apache.roller.weblogger.business.themes.SharedTheme.setName(String)
    //#input(void setName(String)): name
    //#input(void setName(String)): this
    //#output(void setName(String)): this.name
    //#post(void setName(String)): this.name == name
    //#post(void setName(String)): init'ed(this.name)
    }
    //#SharedTheme.java:76: end of method: void org.apache.roller.weblogger.business.themes.SharedTheme.setName(String)

    public String getDescription() {
        return description;
    //#SharedTheme.java:79: method: String org.apache.roller.weblogger.business.themes.SharedTheme.getDescription()
    //#input(String getDescription()): this
    //#input(String getDescription()): this.description
    //#output(String getDescription()): return_value
    //#pre[2] (String getDescription()): init'ed(this.description)
    //#post(String getDescription()): return_value == this.description
    //#post(String getDescription()): init'ed(return_value)
    //#SharedTheme.java:79: end of method: String org.apache.roller.weblogger.business.themes.SharedTheme.getDescription()
    }

    public void setDescription(String description) {
        this.description = description;
    //#SharedTheme.java:83: method: void org.apache.roller.weblogger.business.themes.SharedTheme.setDescription(String)
    //#input(void setDescription(String)): description
    //#input(void setDescription(String)): this
    //#output(void setDescription(String)): this.description
    //#post(void setDescription(String)): this.description == description
    //#post(void setDescription(String)): init'ed(this.description)
    }
    //#SharedTheme.java:84: end of method: void org.apache.roller.weblogger.business.themes.SharedTheme.setDescription(String)

    public String getAuthor() {
        return author;
    //#SharedTheme.java:87: method: String org.apache.roller.weblogger.business.themes.SharedTheme.getAuthor()
    //#input(String getAuthor()): this
    //#input(String getAuthor()): this.author
    //#output(String getAuthor()): return_value
    //#pre[2] (String getAuthor()): init'ed(this.author)
    //#post(String getAuthor()): return_value == this.author
    //#post(String getAuthor()): init'ed(return_value)
    //#SharedTheme.java:87: end of method: String org.apache.roller.weblogger.business.themes.SharedTheme.getAuthor()
    }

    public void setAuthor(String author) {
        this.author = author;
    //#SharedTheme.java:91: method: void org.apache.roller.weblogger.business.themes.SharedTheme.setAuthor(String)
    //#input(void setAuthor(String)): author
    //#input(void setAuthor(String)): this
    //#output(void setAuthor(String)): this.author
    //#post(void setAuthor(String)): this.author == author
    //#post(void setAuthor(String)): init'ed(this.author)
    }
    //#SharedTheme.java:92: end of method: void org.apache.roller.weblogger.business.themes.SharedTheme.setAuthor(String)
    
    public Date getLastModified() {
        return lastModified;
    //#SharedTheme.java:95: method: Date org.apache.roller.weblogger.business.themes.SharedTheme.getLastModified()
    //#input(Date getLastModified()): this
    //#input(Date getLastModified()): this.lastModified
    //#output(Date getLastModified()): return_value
    //#pre[2] (Date getLastModified()): init'ed(this.lastModified)
    //#post(Date getLastModified()): return_value == this.lastModified
    //#post(Date getLastModified()): init'ed(return_value)
    //#SharedTheme.java:95: end of method: Date org.apache.roller.weblogger.business.themes.SharedTheme.getLastModified()
    }

    public void setLastModified(Date lastModified) {
        this.lastModified = lastModified;
    //#SharedTheme.java:99: method: void org.apache.roller.weblogger.business.themes.SharedTheme.setLastModified(Date)
    //#input(void setLastModified(Date)): lastModified
    //#input(void setLastModified(Date)): this
    //#output(void setLastModified(Date)): this.lastModified
    //#post(void setLastModified(Date)): this.lastModified == lastModified
    //#post(void setLastModified(Date)): init'ed(this.lastModified)
    }
    //#SharedTheme.java:100: end of method: void org.apache.roller.weblogger.business.themes.SharedTheme.setLastModified(Date)
    
    public boolean isEnabled() {
        return enabled;
    //#SharedTheme.java:103: method: bool org.apache.roller.weblogger.business.themes.SharedTheme.isEnabled()
    //#input(bool isEnabled()): this
    //#input(bool isEnabled()): this.enabled
    //#output(bool isEnabled()): return_value
    //#pre[2] (bool isEnabled()): init'ed(this.enabled)
    //#post(bool isEnabled()): return_value == this.enabled
    //#post(bool isEnabled()): init'ed(return_value)
    //#SharedTheme.java:103: end of method: bool org.apache.roller.weblogger.business.themes.SharedTheme.isEnabled()
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    //#SharedTheme.java:107: method: void org.apache.roller.weblogger.business.themes.SharedTheme.setEnabled(bool)
    //#input(void setEnabled(bool)): enabled
    //#input(void setEnabled(bool)): this
    //#output(void setEnabled(bool)): this.enabled
    //#post(void setEnabled(bool)): this.enabled == enabled
    //#post(void setEnabled(bool)): init'ed(this.enabled)
    }
    //#SharedTheme.java:108: end of method: void org.apache.roller.weblogger.business.themes.SharedTheme.setEnabled(bool)

}
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Descendant_Table[org/apache/roller/weblogger/business/themes/SharedTheme]
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.compareTo(Ljava/lang/Object;)I
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getAuthor()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getDescription()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getId()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getLastModified()Ljava/util/Date;
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getName()Ljava/lang/String;
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getPreviewImage()Lorg/apache/roller/weblogger/pojos/ThemeResource;
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getResources()Ljava/util/List;
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.isEnabled()Z
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.setAuthor(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.setDescription(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.setEnabled(Z)V
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.setId(Ljava/lang/String;)V
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.setLastModified(Ljava/util/Date;)V
    //#output(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.setName(Ljava/lang/String;)V
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Descendant_Table[org/apache/roller/weblogger/business/themes/SharedTheme] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.compareTo(Ljava/lang/Object;)I == &compareTo
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getAuthor()Ljava/lang/String; == &getAuthor
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getDescription()Ljava/lang/String; == &getDescription
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getId()Ljava/lang/String; == &getId
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getLastModified()Ljava/util/Date; == &getLastModified
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getName()Ljava/lang/String; == &getName
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getPreviewImage()Lorg/apache/roller/weblogger/pojos/ThemeResource; == &getPreviewImage
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.getResources()Ljava/util/List; == &getResources
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.isEnabled()Z == &isEnabled
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.setAuthor(Ljava/lang/String;)V == &setAuthor
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.setDescription(Ljava/lang/String;)V == &setDescription
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.setEnabled(Z)V == &setEnabled
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.setId(Ljava/lang/String;)V == &setId
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.setLastModified(Ljava/util/Date;)V == &setLastModified
    //#post(org.apache.roller.weblogger.business.themes.SharedTheme__static_init): __Dispatch_Table.setName(Ljava/lang/String;)V == &setName
    //#SharedTheme.java:: end of method: org.apache.roller.weblogger.business.themes.SharedTheme.org.apache.roller.weblogger.business.themes.SharedTheme__static_init
    //#SharedTheme.java:: end of class: org.apache.roller.weblogger.business.themes.SharedTheme
