File Source: SharedTheme.java
/*
P/P * Method: org.apache.roller.weblogger.business.themes.SharedTheme__static_init
*/
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.business.themes;
20
21 import java.io.File;
22 import java.io.Serializable;
23 import java.util.ArrayList;
24 import java.util.Collections;
25 import java.util.Date;
26 import java.util.HashMap;
27 import java.util.Iterator;
28 import java.util.List;
29 import java.util.Map;
30 import org.apache.roller.weblogger.pojos.Theme;
31 import org.apache.roller.weblogger.pojos.ThemeResource;
32 import org.apache.roller.weblogger.pojos.ThemeTemplate;
33
34
35 /**
36 * A SharedTheme is a theme implementation which is designed to be shared by
37 * multiple weblogs using a common set of resources.
38 */
/*
P/P * Method: void org.apache.roller.weblogger.business.themes.SharedTheme()
*
* Postconditions:
* this.author == null
* this.description == null
* this.id == null
* this.lastModified == null
* this.name == null
* this.enabled == 0
*/
39 public abstract class SharedTheme implements Theme, Serializable, Comparable {
40
41 protected String id = null;
42 protected String name = null;
43 protected String description = null;
44 protected String author = null;
45 protected Date lastModified = null;
46 protected boolean enabled = false;
47
48 public abstract List getResources();
49
50 public abstract ThemeResource getPreviewImage();
51
52
53 /**
54 * @see java.lang.Comparable#compareTo(java.lang.Object)
55 */
56 public int compareTo(Object o) {
/*
P/P * Method: int compareTo(Object)
*
* Preconditions:
* o != null
* init'ed(o.name)
* this.name != null
*
* Postconditions:
* init'ed(return_value)
*/
57 SharedTheme other = (SharedTheme) o;
58 return getName().compareTo(other.getName());
59 }
60
61
62 public String getId() {
/*
P/P * Method: String getId()
*
* Preconditions:
* init'ed(this.id)
*
* Postconditions:
* return_value == this.id
* init'ed(return_value)
*/
63 return id;
64 }
65
66 public void setId(String id) {
/*
P/P * Method: void setId(String)
*
* Postconditions:
* this.id == id
* init'ed(this.id)
*/
67 this.id = id;
68 }
69
70 public String getName() {
/*
P/P * Method: String getName()
*
* Preconditions:
* init'ed(this.name)
*
* Postconditions:
* return_value == this.name
* init'ed(return_value)
*/
71 return name;
72 }
73
74 public void setName(String name) {
/*
P/P * Method: void setName(String)
*
* Postconditions:
* this.name == name
* init'ed(this.name)
*/
75 this.name = name;
76 }
77
78 public String getDescription() {
/*
P/P * Method: String getDescription()
*
* Preconditions:
* init'ed(this.description)
*
* Postconditions:
* return_value == this.description
* init'ed(return_value)
*/
79 return description;
80 }
81
82 public void setDescription(String description) {
/*
P/P * Method: void setDescription(String)
*
* Postconditions:
* this.description == description
* init'ed(this.description)
*/
83 this.description = description;
84 }
85
86 public String getAuthor() {
/*
P/P * Method: String getAuthor()
*
* Preconditions:
* init'ed(this.author)
*
* Postconditions:
* return_value == this.author
* init'ed(return_value)
*/
87 return author;
88 }
89
90 public void setAuthor(String author) {
/*
P/P * Method: void setAuthor(String)
*
* Postconditions:
* this.author == author
* init'ed(this.author)
*/
91 this.author = author;
92 }
93
94 public Date getLastModified() {
/*
P/P * Method: Date getLastModified()
*
* Preconditions:
* init'ed(this.lastModified)
*
* Postconditions:
* return_value == this.lastModified
* init'ed(return_value)
*/
95 return lastModified;
96 }
97
98 public void setLastModified(Date lastModified) {
/*
P/P * Method: void setLastModified(Date)
*
* Postconditions:
* this.lastModified == lastModified
* init'ed(this.lastModified)
*/
99 this.lastModified = lastModified;
100 }
101
102 public boolean isEnabled() {
/*
P/P * Method: bool isEnabled()
*
* Preconditions:
* init'ed(this.enabled)
*
* Postconditions:
* return_value == this.enabled
* init'ed(return_value)
*/
103 return enabled;
104 }
105
106 public void setEnabled(boolean enabled) {
/*
P/P * Method: void setEnabled(bool)
*
* Postconditions:
* this.enabled == enabled
* init'ed(this.enabled)
*/
107 this.enabled = enabled;
108 }
109
110 }
SofCheck Inspector Build Version : 2.18479
| SharedTheme.java |
2009-Jan-02 14:25:24 |
| SharedTheme.class |
2009-Sep-04 03:12:30 |