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