org.opencms.ade.sitemap.shared.CmsNewResourceInfo Maven / Gradle / Ivy
Show all versions of opencms-test Show documentation
/*
* This library is part of OpenCms -
* the Open Source Content Management System
*
* Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* For further information about Alkacon Software, please see the
* company website: http://www.alkacon.com
*
* For further information about OpenCms, please see the
* project website: http://www.opencms.org
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.opencms.ade.sitemap.shared;
import org.opencms.util.CmsUUID;
import java.io.Serializable;
/**
* A bean representing a resource type for use in the detail page creation menu.
*
* @since 8.0.0
*/
public class CmsNewResourceInfo implements Serializable {
/** The navigation level create parameter. */
public static final String NAVIGATION_LEVEL_PARAMETER = "new_navigation_level";
/** ID for serialization. */
private static final long serialVersionUID = -4731814848380350682L;
/** The structure id of the copy resource. */
private CmsUUID m_copyResourceId;
/** The additional parameter used for creating new resources. */
private String m_createParameter;
/** Date. */
private String m_date;
/** The description. */
private String m_description;
/** True if the user can edit the resource. */
private boolean m_editable;
/** The id. */
private int m_id;
/** If the default flag is set. */
private boolean m_isDefault;
/** The flag which determines whether this bean is for a function page or for a normal detail page. */
private boolean m_isFunction;
/** Navigation position, used for ordering. */
private Float m_navPos;
/** Subtitle. */
private String m_subtitle;
/** The title. */
private String m_title;
/** The type name. */
private String m_typeName;
/** VFS path. */
private String m_vfsPath;
/**
* Instantiates a new resource type information bean.
*
* @param id the id
* @param typeName the type name
* @param title the title
* @param description the description
* @param copyResourceId the structure id of the copy resource
* @param editable true if the model resource is editable
* @param subTitle the subtitle to display
*/
public CmsNewResourceInfo(
int id,
String typeName,
String title,
String description,
CmsUUID copyResourceId,
boolean editable,
String subTitle) {
m_id = id;
m_typeName = typeName;
m_title = title;
m_copyResourceId = copyResourceId;
m_description = description;
m_subtitle = subTitle;
m_editable = editable;
}
/**
* Empty default constructor for serialization.
*/
protected CmsNewResourceInfo() {
// do nothing
}
/**
* Returns the structure id of the copy resource.
*
* @return the structure id of the copy resource
*/
public CmsUUID getCopyResourceId() {
return m_copyResourceId;
}
/**
* Gets the additional parameter for creating new resources.
*
* @return the additional parameter for creating new resources
*/
public String getCreateParameter() {
return m_createParameter;
}
/**
* Returns the date to display.
*
* @return the date to display
*/
public String getDate() {
return m_date;
}
/**
* Returns the description.
*
* @return the description
*/
public String getDescription() {
return m_description;
}
/**
* Gets the id.
*
* @return the id
*/
public int getId() {
return m_id;
}
/**
* Gets the navigation position (used for ordering).
*
* @return the navigation position
*/
public Float getNavPos() {
return m_navPos;
}
/**
* Gets the subtitle.
*
* @return the subtitle
*/
public String getSubTitle() {
return m_subtitle;
}
/**
* Gets the title.
*
* @return the title
*/
public String getTitle() {
return m_title;
}
/**
* Gets the type name.
*
* @return the type name
*/
public String getTypeName() {
return m_typeName;
}
/**
* Gets the VFS path.
*
* @return the VFS path
*/
public String getVfsPath() {
return m_vfsPath;
}
/**
* Returns the default flag.
*
* @return the default flag
*/
public boolean isDefault() {
return m_isDefault;
}
/**
* Returns true if the model resource is editable.
*
* @return true if the model resource is editable
*/
public boolean isEditable() {
return m_editable;
}
/**
* Returns true if this is a resource info bean for a function page.
*
* @return true if this is a resource info bean for a function page
*/
public boolean isFunction() {
return m_isFunction;
}
/**
* Sets the create parameter used for new pages.
*
* @param createParameter the create parameter used for new pages
*/
public void setCreateParameter(String createParameter) {
m_createParameter = createParameter;
}
/**
* Sets the modification date string.
*
* @param date the modification date string
*/
public void setDate(String date) {
m_date = date;
}
/**
* Sets the default flag.
*
* @param isDefault the default flag to set
*/
public void setDefault(boolean isDefault) {
m_isDefault = isDefault;
}
/**
* Sets the "function page" flag.
*
* @param isFunction the new value for the function page flag
*/
public void setIsFunction(boolean isFunction) {
m_isFunction = isFunction;
}
/**
* Sets the navigation position.
*
* @param navPos the navigation position
*/
public void setNavPos(Float navPos) {
m_navPos = navPos;
}
/**
* Sets the subtitle.
*
* @param subtitle the subtitle
*/
public void setSubTitle(String subtitle) {
m_subtitle = subtitle;
}
/**
* Sets the VFS path.
*
* @param vfsPath the VFS path
*/
public void setVfsPath(String vfsPath) {
m_vfsPath = vfsPath;
}
}