Class HierarchicalReferenceTableClientSideElement
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.ui.StaticFileImportsClientSideElement
org.ametys.core.ui.StaticClientSideElement
org.ametys.cms.content.referencetable.HierarchicalReferenceTableClientSideElement
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
This element creates a button enabling to do operation on reference table contents which can have a child.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
Field Summary
Modifier and TypeFieldDescriptionprotected ContentHelper
The content helperprotected ContentTypeExtensionPoint
The extension point for content typesprotected ContentTypesHelper
The content types helperprotected HierarchicalReferenceTablesHelper
The helper component for hierarchical reference tablesprotected AmetysObjectResolver
The Ametys Object resolverFields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canHaveChild
(String contentId) Returns true if the given content can have a child, according to its hierarchy.getContentTypeForRoot
(String leafContentTypeId) Gets the content type id and the default title for a child of the root node of the hierarchy of reference table contents, defined by the given leaf content typegetContentTypesForChild
(String parentContentId) Gets the content types ids for a child of the given content (must be non-leaf in a hierarchy of reference tables contents)getLeafContentType
(String contentTypeId, String contentId) Return the leafContentTypegetParentAttributePath
(String contentId) Get the path of attribute holding the parentgetParentAttributePathForRoot
(String leafContentTypeId) Get the path of attribute when root is selectedgetReferenceTableProperties
(String leafContentTypeId) Get the hierarchy properties of the content types treegetTitleForEdition
(String contentId) Get the title's properties for editionvoid
service
(ServiceManager smanager) validateCandidate
(String contentId, int actionId) Validate the candidate by removing the mixin from the contentMethods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_contentTypeEP
The extension point for content types -
_hierarchicalReferenceTableContentsHelper
The helper component for hierarchical reference tables -
_resolver
The Ametys Object resolver -
_cTypeHelper
The content types helper -
_contentHelper
The content helper
-
-
Constructor Details
-
HierarchicalReferenceTableClientSideElement
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
canHaveChild
Returns true if the given content can have a child, according to its hierarchy. SeeContentType.getParentAttributeDefinition()
- Parameters:
contentId
- The id of the content- Returns:
- true if the given content can have a child, according to its hierarchy
-
getReferenceTableProperties
Get the hierarchy properties of the content types tree- Parameters:
leafContentTypeId
- The id of the leaf content type, which defines the hierarchy.- Returns:
- the hierarchy properties
-
getContentTypesForChild
Gets the content types ids for a child of the given content (must be non-leaf in a hierarchy of reference tables contents)- Parameters:
parentContentId
- The id of the parent content- Returns:
- the content types ids
-
getContentTypeForRoot
Gets the content type id and the default title for a child of the root node of the hierarchy of reference table contents, defined by the given leaf content type- Parameters:
leafContentTypeId
- The id of the leaf content type, which defines the hierarchy.- Returns:
- the content type id for the root node of the hierarchy of reference table contents
-
getLeafContentType
Return the leafContentType- Parameters:
contentTypeId
- the content type idcontentId
- the content id to get the leaf content type from- Returns:
- the map containing the properties of the leaf content type
-
getParentAttributePath
Get the path of attribute holding the parent- Parameters:
contentId
- The id of content- Returns:
- the path of parent attribute or null if not found
-
getParentAttributePathForRoot
Get the path of attribute when root is selected- Parameters:
leafContentTypeId
- The id of content- Returns:
- the path of parent attribute or null if not found
-
validateCandidate
public Map<String,Object> validateCandidate(String contentId, int actionId) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException Validate the candidate by removing the mixin from the content- Parameters:
contentId
- The id of the contentactionId
- the id of the workflow action- Returns:
- The result in a Map
- Throws:
com.opensymphony.workflow.WorkflowException
- The Workflow ExceptionAmetysRepositoryException
- The Ametys Repository Exception
-
getTitleForEdition
Get the title's properties for edition- Parameters:
contentId
- The id of content being renamed- Returns:
- the title's properties
-