001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (C) Alkacon Software (http://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software, please see the
018 * company website: http://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: http://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.gwt.shared;
029
030import org.opencms.util.CmsUUID;
031
032import com.google.gwt.user.client.rpc.IsSerializable;
033
034/**
035 * Bean class which represents a resource which is related to another resource.<p>
036 */
037public class CmsResourceStatusRelationBean implements IsSerializable {
038
039    /** The info bean for the resource. */
040    private CmsListInfoBean m_infoBean;
041
042    /** True if the resource is an xml content. */
043    private boolean m_isXmlContent;
044
045    /** A link to the resource. */
046    private String m_link;
047
048    /** The permission info. */
049    private CmsPermissionInfo m_permissionInfo;
050
051    /** The site path of the resource. */
052    private String m_sitePath;
053
054    /** The site root. */
055    private String m_siteRoot;
056
057    /** The structure id of the resource. */
058    private CmsUUID m_structureId;
059
060    /**
061     * Creates a new instance.<p>
062     *
063     * @param infoBean the list info bean
064     * @param link the link to the resource
065     * @param structureId the structure id of the resource
066     * @param permissionInfo the permission info
067     */
068    public CmsResourceStatusRelationBean(
069        CmsListInfoBean infoBean,
070        String link,
071        CmsUUID structureId,
072        CmsPermissionInfo permissionInfo) {
073
074        m_infoBean = infoBean;
075        m_link = link;
076        m_structureId = structureId;
077        m_permissionInfo = permissionInfo;
078    }
079
080    /**
081     * Default constructor for serialization.<p>
082     */
083    protected CmsResourceStatusRelationBean() {
084
085        // do nothing
086    }
087
088    /**
089     * Gets the list info bean.<p>
090     *
091     * @return the list info bean
092     */
093    public CmsListInfoBean getInfoBean() {
094
095        return m_infoBean;
096    }
097
098    /**
099     * Gets the link to the resource.<p>
100     *
101     * @return the link to the resource
102     */
103    public String getLink() {
104
105        return m_link;
106    }
107
108    /**
109     * Returns the permission info.<p>
110     *
111     * @return the permission info
112     */
113    public CmsPermissionInfo getPermissionInfo() {
114
115        return m_permissionInfo;
116    }
117
118    /**
119     * Gets the site path of the resource.<p>
120     *
121     * @return the site path of the resource
122     */
123    public String getSitePath() {
124
125        return m_sitePath;
126    }
127
128    /**
129     * Returns the siteRoot.<p>
130     *
131     * @return the siteRoot
132     */
133    public String getSiteRoot() {
134
135        return m_siteRoot;
136    }
137
138    /**
139     * Returns the structure id of the resource.<p>
140     *
141     * @return the structure id of the resource
142     */
143    public CmsUUID getStructureId() {
144
145        return m_structureId;
146    }
147
148    /**
149     * Returns true if the resource is an XML content.<p>
150     *
151     * @return true if the resource is an XML content
152     */
153    public boolean isXmlContent() {
154
155        return m_isXmlContent;
156    }
157
158    /**
159     * Sets the list info bean.<p>
160     *
161     * @param infoBean the new list info bean
162     */
163    public void setInfoBean(CmsListInfoBean infoBean) {
164
165        m_infoBean = infoBean;
166    }
167
168    /**
169     * Marks this bean as belonging to an XML content resource.<p>
170     *
171     * @param isXmlContent if the resource is an XML content
172     */
173    public void setIsXmlContent(boolean isXmlContent) {
174
175        m_isXmlContent = isXmlContent;
176
177    }
178
179    /**
180     * Sets the link for the resource.<p>
181     *
182     * @param link the link for the resource
183     */
184    public void setLink(String link) {
185
186        m_link = link;
187    }
188
189    /**
190     * Sets the site path for the resource.<p>
191     *
192     * @param path the new site path
193     */
194    public void setSitePath(String path) {
195
196        m_sitePath = path;
197    }
198
199    /**
200     * Sets the siteRoot.<p>
201     *
202     * @param siteRoot the siteRoot to set
203     */
204    public void setSiteRoot(String siteRoot) {
205
206        m_siteRoot = siteRoot;
207    }
208
209    /**
210     * Sets the structure id for the resource.<p>
211     *
212     * @param structureId the new structure id
213     */
214    public void setStructureId(CmsUUID structureId) {
215
216        m_structureId = structureId;
217    }
218
219}