All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opencms.xml.containerpage.I_CmsADEConfiguration Maven / Gradle / Ivy

Go to download

OpenCms is an enterprise-ready, easy to use website content management system based on Java and XML technology. Offering a complete set of features, OpenCms helps content managers worldwide to create and maintain beautiful websites fast and efficiently.

There is a newer version: 18.0
Show newest version
/*
 * 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.xml.containerpage;

import org.opencms.file.CmsObject;
import org.opencms.file.CmsResource;
import org.opencms.main.CmsException;

import java.util.Collection;
import java.util.Locale;

import javax.servlet.ServletRequest;

/**
 * Configurable & expandable configuration.

* * @since 7.6 */ public interface I_CmsADEConfiguration { /** * Creates a new element of a given type at the configured location.

* * @param cms the current opencms context * @param cntPageUri the container page uri * @param request the current request * @param type the type of the element to be created * @param locale the content locale * * @return the CmsResource representing the newly created element * * @throws CmsException if something goes wrong */ CmsResource createNewElement(CmsObject cms, String cntPageUri, ServletRequest request, String type, Locale locale) throws CmsException; /** * Returns the list of creatable elements.

* * @param cms the current opencms context * @param cntPageUri the container page uri * @param request the current request * * @return the list of creatable elements * * @throws CmsException if something goes wrong */ Collection getCreatableElements(CmsObject cms, String cntPageUri, ServletRequest request) throws CmsException; /** * Returns the maximal size of the favorite list.

* * @param cms the current opencms context * * @return the maximal size of the favorite list * * @throws CmsException if something goes wrong */ int getFavoriteListMaxSize(CmsObject cms) throws CmsException; /** * Returns the formatter configuration for a given resource.

* * @param cms the OpenCms user context * @param containerPageRootPath the root path to the container page that includes the element resource * @param res the container page element resource * * @return the formatter configuration for a given resource * * @throws CmsException if something goes wrong */ CmsFormatterConfiguration getFormattersForResource(CmsObject cms, String containerPageRootPath, CmsResource res) throws CmsException; /** * Returns the name of the next new file of the given type to be created.

* * @param cms the current opencms context * @param cntPageUri the container page uri * @param request the current request * @param type the resource type name * * @return the name of the next new file of the given type to be created * * @throws CmsException if something goes wrong */ String getNextNewFileName(CmsObject cms, String cntPageUri, ServletRequest request, String type) throws CmsException; /** * Returns the maximal size of the recent list.

* * @param cms the current opencms context * * @return the maximal size of the recent list * * @throws CmsException if something goes wrong */ int getRecentListMaxSize(CmsObject cms) throws CmsException; /** * Returns the list of searchable resource types.

* * @param cms the current opencms context * @param cntPageUri the container page uri * @param request the current request * * @return the list of searchable resource types, identified by a sample resource * * @throws CmsException if something goes wrong */ Collection getSearchableResourceTypes(CmsObject cms, String cntPageUri, ServletRequest request) throws CmsException; /** * Initializes the configuration.

* * @param cms the CMS object */ void init(CmsObject cms); /** * Returns if the given type has a valid configuration to be created.

* * @param cms the CMS context * @param currentUri the current URI * @param typeName the resource type name * * @return true if the type can be created as new * * @throws CmsException if something goes wrong */ boolean isCreatableType(CmsObject cms, String currentUri, String typeName) throws CmsException; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy