content: /*
   * This library is part of OpenCms -
   * the Open Source Content Management System
   *
   * Copyright (c) Alkacon Software GmbH & Co. KG (https://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: https://www.alkacon.com
   *
   * For further information about OpenCms, please see the
   * project website: https://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.gwt.shared.CmsListInfoBean;
  import org.opencms.util.CmsUUID;
  
  /**
   * A bean representing a resource type for use in the detail page creation menu.<p>
   *
   * @since 8.0.0
   */
  public class CmsNewResourceInfo extends CmsListInfoBean {
  
      /** The navigation level create parameter. */
      public static final String NAVIGATION_LEVEL_PARAMETER = "new_navigation_level";
  
      /** 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;
  
      /** 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) {
          super(title, subTitle, null);
          setResourceType(typeName);
          m_id = id;
          m_copyResourceId = copyResourceId;
          m_description = description;
          m_editable = editable;
      }
  
      /**
       * Empty default constructor for serialization.<p>
       */
      protected CmsNewResourceInfo() {
  
          // do nothing
      }
  
      /**
       * Returns the structure id of the copy resource.<p>
       *
       * @return the structure id of the copy resource
       */
      public CmsUUID getCopyResourceId() {
  
          return m_copyResourceId;
      }
  
      /**
       * Gets the additional parameter for creating new resources.<p>
       *
       * @return the additional parameter for creating new resources
       */
      public String getCreateParameter() {
  
          return m_createParameter;
      }
  
      /**
       * Returns the date to display.<p>
       *
       * @return the date to display
       */
      public String getDate() {
  
          return m_date;
      }
  
      /**
       * Returns the description.<p>
       *
       * @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).<p>
       *
       * @return the navigation position
       */
      public Float getNavPos() {
  
          return m_navPos;
      }
  
      /**
       * Gets the VFS path.<p>
       *
       * @return the VFS path
       */
      public String getVfsPath() {
  
          return m_vfsPath;
      }
  
      /**
       * Returns the default flag.<p>
       *
       * @return the default flag
       */
      public boolean isDefault() {
  
          return m_isDefault;
      }
  
      /**
       * Returns true if the model resource is editable.<p>
       *
       * @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.<p>
       *
       * @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.<p>
       *
       * @param createParameter the create parameter used for new pages
       */
      public void setCreateParameter(String createParameter) {
  
          m_createParameter = createParameter;
      }
  
      /**
       * Sets the modification date string.<p>
       *
       * @param date the modification date string
       */
      public void setDate(String date) {
  
          m_date = date;
      }
  
      /**
       * Sets the default flag.<p>
       *
       * @param isDefault the default flag to set
       */
      public void setDefault(boolean isDefault) {
  
          m_isDefault = isDefault;
      }
  
      /**
       * Sets the "function page" flag.<p>
       *
       * @param isFunction the new value for the function page flag
       */
      public void setIsFunction(boolean isFunction) {
  
          m_isFunction = isFunction;
      }
  
      /**
       * Sets the navigation position.<p>
       *
       * @param navPos the navigation position
       */
      public void setNavPos(Float navPos) {
  
          m_navPos = navPos;
      }
  
      /**
       * Sets the VFS path.<p>
       *
       * @param vfsPath the VFS path
       */
      public void setVfsPath(String vfsPath) {
  
          m_vfsPath = vfsPath;
      }
  }
  