File Source: ThemeMetadata.java
/*
P/P * Method: org.apache.roller.weblogger.business.themes.ThemeMetadata__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.util.HashSet;
22 import java.util.Set;
23
24
25 /**
26 * Represents a parsed version of a theme xml metadata descriptor.
27 */
28 public class ThemeMetadata {
29
30 private String id = null;
31 private String name = null;
32 private String author = null;
33 private String previewImage = null;
34 private ThemeMetadataTemplate stylesheet = null;
35 private Set templates = new HashSet();
36 private Set resources = new HashSet();
37
38
/*
P/P * Method: void org.apache.roller.weblogger.business.themes.ThemeMetadata()
*
* Postconditions:
* this.author == null
* this.id == null
* this.name == null
* this.previewImage == null
* this.stylesheet == null
* this.resources == &new HashSet(ThemeMetadata#2)
* this.templates == &new HashSet(ThemeMetadata#1)
* new HashSet(ThemeMetadata#1) num objects == 1
* new HashSet(ThemeMetadata#2) num objects == 1
*/
39 public ThemeMetadata() {}
40
41
42 public void addTemplate(ThemeMetadataTemplate template) {
/*
P/P * Method: void addTemplate(ThemeMetadataTemplate)
*
* Preconditions:
* this.templates != null
*/
43 this.templates.add(template);
44 }
45
46 public void addResource(String resource) {
/*
P/P * Method: void addResource(String)
*
* Preconditions:
* this.resources != null
*/
47 this.resources.add(resource);
48 }
49
50
51 public String getId() {
/*
P/P * Method: String getId()
*
* Preconditions:
* init'ed(this.id)
*
* Postconditions:
* return_value == this.id
* init'ed(return_value)
*/
52 return id;
53 }
54
55 public void setId(String id) {
/*
P/P * Method: void setId(String)
*
* Postconditions:
* this.id == id
* init'ed(this.id)
*/
56 this.id = id;
57 }
58
59 public String getName() {
/*
P/P * Method: String getName()
*
* Preconditions:
* init'ed(this.name)
*
* Postconditions:
* return_value == this.name
* init'ed(return_value)
*/
60 return name;
61 }
62
63 public void setName(String name) {
/*
P/P * Method: void setName(String)
*
* Postconditions:
* this.name == name
* init'ed(this.name)
*/
64 this.name = name;
65 }
66
67 public String getPreviewImage() {
/*
P/P * Method: String getPreviewImage()
*
* Preconditions:
* init'ed(this.previewImage)
*
* Postconditions:
* return_value == this.previewImage
* init'ed(return_value)
*/
68 return previewImage;
69 }
70
71 public void setPreviewImage(String previewImage) {
/*
P/P * Method: void setPreviewImage(String)
*
* Postconditions:
* this.previewImage == previewImage
* init'ed(this.previewImage)
*/
72 this.previewImage = previewImage;
73 }
74
75 public Set getTemplates() {
/*
P/P * Method: Set getTemplates()
*
* Preconditions:
* init'ed(this.templates)
*
* Postconditions:
* return_value == this.templates
* init'ed(return_value)
*/
76 return templates;
77 }
78
79 public void setTemplates(Set templates) {
/*
P/P * Method: void setTemplates(Set)
*
* Postconditions:
* this.templates == templates
* init'ed(this.templates)
*/
80 this.templates = templates;
81 }
82
83 public Set getResources() {
/*
P/P * Method: Set getResources()
*
* Preconditions:
* init'ed(this.resources)
*
* Postconditions:
* return_value == this.resources
* init'ed(return_value)
*/
84 return resources;
85 }
86
87 public void setResources(Set resources) {
/*
P/P * Method: void setResources(Set)
*
* Postconditions:
* this.resources == resources
* init'ed(this.resources)
*/
88 this.resources = resources;
89 }
90
91 public String getAuthor() {
/*
P/P * Method: String getAuthor()
*
* Preconditions:
* init'ed(this.author)
*
* Postconditions:
* return_value == this.author
* init'ed(return_value)
*/
92 return author;
93 }
94
95 public void setAuthor(String author) {
/*
P/P * Method: void setAuthor(String)
*
* Postconditions:
* this.author == author
* init'ed(this.author)
*/
96 this.author = author;
97 }
98
99 public ThemeMetadataTemplate getStylesheet() {
/*
P/P * Method: ThemeMetadataTemplate getStylesheet()
*
* Preconditions:
* init'ed(this.stylesheet)
*
* Postconditions:
* return_value == this.stylesheet
* init'ed(return_value)
*/
100 return stylesheet;
101 }
102
103 public void setStylesheet(ThemeMetadataTemplate stylesheet) {
/*
P/P * Method: void setStylesheet(ThemeMetadataTemplate)
*
* Postconditions:
* this.stylesheet == stylesheet
* init'ed(this.stylesheet)
*/
104 this.stylesheet = stylesheet;
105 }
106
107 }
SofCheck Inspector Build Version : 2.18479
| ThemeMetadata.java |
2009-Jan-02 14:25:44 |
| ThemeMetadata.class |
2009-Sep-04 03:12:31 |