File Source: CategoryBean.java
/*
P/P * Method: org.apache.roller.weblogger.ui.struts2.editor.CategoryBean__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.ui.struts2.editor;
20
21 import org.apache.roller.weblogger.WebloggerException;
22 import org.apache.roller.weblogger.pojos.WeblogCategory;
23
24
25 /**
26 * Bean for managing category data.
27 */
/*
P/P * Method: void org.apache.roller.weblogger.ui.struts2.editor.CategoryBean()
*
* Postconditions:
* this.description == null
* this.id == null
* this.image == null
* this.name == null
*/
28 public class CategoryBean {
29
30 private String id = null;
31 private String name = null;
32 private String description = null;
33 private String image = null;
34
35
36 public String getId() {
/*
P/P * Method: String getId()
*
* Preconditions:
* init'ed(this.id)
*
* Postconditions:
* return_value == this.id
* init'ed(return_value)
*/
37 return this.id;
38 }
39
40 public void setId( String id ) {
/*
P/P * Method: void setId(String)
*
* Postconditions:
* this.id == id
* init'ed(this.id)
*/
41 this.id = id;
42 }
43
44 public String getName() {
/*
P/P * Method: String getName()
*
* Preconditions:
* init'ed(this.name)
*
* Postconditions:
* return_value == this.name
* init'ed(return_value)
*/
45 return this.name;
46 }
47
48 public void setName( String name ) {
/*
P/P * Method: void setName(String)
*
* Postconditions:
* this.name == name
* init'ed(this.name)
*/
49 this.name = name;
50 }
51
52 public String getDescription() {
/*
P/P * Method: String getDescription()
*
* Preconditions:
* init'ed(this.description)
*
* Postconditions:
* return_value == this.description
* init'ed(return_value)
*/
53 return this.description;
54 }
55
56 public void setDescription( String description ) {
/*
P/P * Method: void setDescription(String)
*
* Postconditions:
* this.description == description
* init'ed(this.description)
*/
57 this.description = description;
58 }
59
60 public String getImage() {
/*
P/P * Method: String getImage()
*
* Preconditions:
* init'ed(this.image)
*
* Postconditions:
* return_value == this.image
* init'ed(return_value)
*/
61 return image;
62 }
63
64 public void setImage(String image) {
/*
P/P * Method: void setImage(String)
*
* Postconditions:
* this.image == image
* init'ed(this.image)
*/
65 this.image = image;
66 }
67
68
69 public void copyTo(WeblogCategory dataHolder) throws WebloggerException {
70
/*
P/P * Method: void copyTo(WeblogCategory)
*
* Preconditions:
* dataHolder != null
* init'ed(this.description)
* init'ed(this.image)
* init'ed(this.name)
*
* Presumptions:
* org.apache.roller.weblogger.pojos.WeblogCategory:getName(...)@71 != null
*
* Test Vectors:
* java.lang.String:equals(...)@71: {1}, {0}
*/
71 if(!dataHolder.getName().equals(this.name)) {
72 dataHolder.updateName(this.name);
73 }
74
75 dataHolder.setDescription(this.description);
76 dataHolder.setImage(this.image);
77 }
78
79
80 public void copyFrom(WeblogCategory dataHolder) {
/*
P/P * Method: void copyFrom(WeblogCategory)
*
* Preconditions:
* dataHolder != null
*
* Postconditions:
* init'ed(this.description)
* init'ed(this.id)
* init'ed(this.image)
* init'ed(this.name)
*/
81 this.id = dataHolder.getId();
82 this.name = dataHolder.getName();
83 this.description = dataHolder.getDescription();
84 this.image = dataHolder.getImage();
85 }
86
87 }
SofCheck Inspector Build Version : 2.18479
| CategoryBean.java |
2009-Jan-02 14:25:38 |
| CategoryBean.class |
2009-Sep-04 03:12:45 |