Package org.opencms.xml.containerpage
Interface I_CmsADEConfiguration
public interface I_CmsADEConfiguration
Configurable & expandable configuration.
- Since:
- 7.6
-
Method Summary
Modifier and TypeMethodDescriptioncreateNewElement
(CmsObject cms, String cntPageUri, javax.servlet.ServletRequest request, String type, Locale locale) Creates a new element of a given type at the configured location.getCreatableElements
(CmsObject cms, String cntPageUri, javax.servlet.ServletRequest request) Returns the list of creatable elements.int
Returns the maximal size of the favorite list.getFormattersForResource
(CmsObject cms, String containerPageRootPath, CmsResource res) Returns the formatter configuration for a given resource.getNextNewFileName
(CmsObject cms, String cntPageUri, javax.servlet.ServletRequest request, String type) Returns the name of the next new file of the given type to be created.int
Returns the maximal size of the recent list.getSearchableResourceTypes
(CmsObject cms, String cntPageUri, javax.servlet.ServletRequest request) Returns the list of searchable resource types.void
Initializes the configuration.boolean
isCreatableType
(CmsObject cms, String currentUri, String typeName) Returns if the given type has a valid configuration to be created.
-
Method Details
-
createNewElement
CmsResource createNewElement(CmsObject cms, String cntPageUri, javax.servlet.ServletRequest request, String type, Locale locale) throws CmsException Creates a new element of a given type at the configured location.- Parameters:
cms
- the current opencms contextcntPageUri
- the container page urirequest
- the current requesttype
- the type of the element to be createdlocale
- the content locale- Returns:
- the CmsResource representing the newly created element
- Throws:
CmsException
- if something goes wrong
-
getCreatableElements
Collection<CmsResource> getCreatableElements(CmsObject cms, String cntPageUri, javax.servlet.ServletRequest request) throws CmsException Returns the list of creatable elements.- Parameters:
cms
- the current opencms contextcntPageUri
- the container page urirequest
- the current request- Returns:
- the list of creatable elements
- Throws:
CmsException
- if something goes wrong
-
getFavoriteListMaxSize
Returns the maximal size of the favorite list.- Parameters:
cms
- the current opencms context- Returns:
- the maximal size of the favorite list
- Throws:
CmsException
- if something goes wrong
-
getFormattersForResource
CmsFormatterConfiguration getFormattersForResource(CmsObject cms, String containerPageRootPath, CmsResource res) throws CmsException Returns the formatter configuration for a given resource.- Parameters:
cms
- the OpenCms user contextcontainerPageRootPath
- the root path to the container page that includes the element resourceres
- the container page element resource- Returns:
- the formatter configuration for a given resource
- Throws:
CmsException
- if something goes wrong
-
getNextNewFileName
String getNextNewFileName(CmsObject cms, String cntPageUri, javax.servlet.ServletRequest request, String type) throws CmsException Returns the name of the next new file of the given type to be created.- Parameters:
cms
- the current opencms contextcntPageUri
- the container page urirequest
- the current requesttype
- the resource type name- Returns:
- the name of the next new file of the given type to be created
- Throws:
CmsException
- if something goes wrong
-
getRecentListMaxSize
Returns the maximal size of the recent list.- Parameters:
cms
- the current opencms context- Returns:
- the maximal size of the recent list
- Throws:
CmsException
- if something goes wrong
-
getSearchableResourceTypes
Collection<CmsResource> getSearchableResourceTypes(CmsObject cms, String cntPageUri, javax.servlet.ServletRequest request) throws CmsException Returns the list of searchable resource types.- Parameters:
cms
- the current opencms contextcntPageUri
- the container page urirequest
- the current request- Returns:
- the list of searchable resource types, identified by a sample resource
- Throws:
CmsException
- if something goes wrong
-
init
Initializes the configuration.- Parameters:
cms
- the CMS object
-
isCreatableType
Returns if the given type has a valid configuration to be created.- Parameters:
cms
- the CMS contextcurrentUri
- the current URItypeName
- the resource type name- Returns:
true
if the type can be created as new- Throws:
CmsException
- if something goes wrong
-