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 SummaryNested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElementClientSideElement.Script, ClientSideElement.ScriptFile
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected ContentHelperThe content helperprotected ContentTypeExtensionPointThe extension point for content typesprotected ContentTypesHelperThe content types helperprotected HierarchicalReferenceTablesHelperThe helper component for hierarchical reference tablesprotected AmetysObjectResolverThe Ametys Object resolverFields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanHaveChild(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 editionvoidservice(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, configureInitialParametersMethods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toStringMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabledgetLogger, setLogger
- 
Field Details- 
_contentTypeEPThe extension point for content types
- 
_hierarchicalReferenceTableContentsHelperThe helper component for hierarchical reference tables
- 
_resolverThe Ametys Object resolver
- 
_cTypeHelperThe content types helper
- 
_contentHelperThe content helper
 
- 
- 
Constructor Details- 
HierarchicalReferenceTableClientSideElement
 
- 
- 
Method Details- 
service- Specified by:
- servicein interface- Serviceable
- Overrides:
- servicein class- StaticFileImportsClientSideElement
- Throws:
- ServiceException
 
- 
canHaveChildReturns 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
 
- 
getReferenceTablePropertiesGet 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
 
- 
getContentTypesForChildGets 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
 
- 
getContentTypeForRootGets 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
 
- 
getLeafContentTypeReturn the leafContentType- Parameters:
- contentTypeId- the content type id
- contentId- the content id to get the leaf content type from
- Returns:
- the map containing the properties of the leaf content type
 
- 
getParentAttributePathGet the path of attribute holding the parent- Parameters:
- contentId- The id of content
- Returns:
- the path of parent attribute or null if not found
 
- 
getParentAttributePathForRootGet 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
 
- 
validateCandidatepublic 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 content
- actionId- the id of the workflow action
- Returns:
- The result in a Map
- Throws:
- com.opensymphony.workflow.WorkflowException- The Workflow Exception
- AmetysRepositoryException- The Ametys Repository Exception
 
- 
getTitleForEditionGet the title's properties for edition- Parameters:
- contentId- The id of content being renamed
- Returns:
- the title's properties
 
 
-