KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jaspersoft > jasperserver > util > ContentResourceBean


1 /*
2  * Copyright (C) 2006 JasperSoft http://www.jaspersoft.com
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed WITHOUT ANY WARRANTY; and without the
10  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
15  * or write to:
16  *
17  * Free Software Foundation, Inc.,
18  * 59 Temple Place - Suite 330,
19  * Boston, MA USA 02111-1307
20  */

21 package com.jaspersoft.jasperserver.util;
22
23
24 /**
25  * @author tkavanagh
26  * @version $Id: ContentResourceBean.java 3778 2006-06-21 15:10:39Z tony $
27  */

28
29
30 public class ContentResourceBean extends ResourceBean {
31
32     private String JavaDoc fileType;
33     private String JavaDoc referenceUri;
34     private ContentResourceBean[] resources;
35     
36     /*
37      * Additional fields.
38      */

39     
40     /*
41      * Data is not stored in the bean (it's written to disk).
42      *
43      * hasData: keeps track of the status regarding data.
44      * (For instance, a "link" (isReference = true) would not have data.)
45      */

46     private boolean hasData;
47     
48     /*
49      * linkTarget: is used to store the target of a link and thus simplify
50      * export-import processing.
51      */

52     private ResourceBean linkTarget;
53     
54     
55     public String JavaDoc getFileType() {
56         return fileType;
57     }
58     
59     public void setFileType(String JavaDoc fileType) {
60         this.fileType = fileType;
61     }
62
63     public String JavaDoc getReferenceUri() {
64         return referenceUri;
65     }
66
67     public void setReferenceUri(String JavaDoc referenceUri) {
68         this.referenceUri = referenceUri;
69     }
70
71     public ContentResourceBean[] getResources() {
72         return resources;
73     }
74
75     public void setResources(ContentResourceBean[] resources) {
76         this.resources = resources;
77     }
78
79     public boolean getHasData() {
80         return hasData;
81     }
82
83     public void setHasData(boolean hasData) {
84         this.hasData = hasData;
85     }
86     
87     public boolean getIsReference() {
88         return referenceUri != null && referenceUri.length() > 0;
89     }
90     
91     public ResourceBean getLinkTarget() {
92         return linkTarget;
93     }
94
95     public void setLinkTarget(ResourceBean linkTarget) {
96         this.linkTarget = linkTarget;
97     }
98     
99 }
100
Popular Tags