public class HierarchicalReferenceTableClientSideElement extends StaticClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
protected ContentHelper |
_contentHelper
The content helper
|
protected ContentTypeExtensionPoint |
_contentTypeEP
The extension point for content types
|
protected ContentTypesHelper |
_cTypeHelper
The content types helper
|
protected HierarchicalReferenceTablesHelper |
_hierarchicalReferenceTableContentsHelper
The helper component for hierarchical reference tables
|
protected AmetysObjectResolver |
_resolver
The Ametys Object resolver
|
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
HierarchicalReferenceTableClientSideElement() |
Modifier and Type | Method and Description |
---|---|
boolean |
canHaveChild(String contentId)
Returns true if the given content can have a child, according to its hierarchy.
|
String |
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 type
|
List<String> |
getContentTypesForChild(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)
|
Map<String,Object> |
getLeafContentType(String contentTypeId,
String contentId)
Return the leafContentType
|
String |
getParentMetadataPath(String contentId)
Get the path of metadata holding the parent
|
String |
getParentMetadataPathForRoot(String leafContentTypeId)
Get the path of metadata when root is selected
|
Map<String,Object> |
getReferenceTableProperties(String leafContentTypeId)
Get the hierarchy properties of the content types tree
|
Map<String,Object> |
getTitleForEdition(String contentId)
Get the title's properties for edition
|
void |
service(ServiceManager smanager) |
Map<String,Object> |
validateCandidate(String contentId,
int actionId)
Validate the candidate by removing the mixin from the content
|
_configureClass, _configureParameters, _configureScript, configureInitialParameters
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
protected ContentTypeExtensionPoint _contentTypeEP
protected HierarchicalReferenceTablesHelper _hierarchicalReferenceTableContentsHelper
protected AmetysObjectResolver _resolver
protected ContentTypesHelper _cTypeHelper
protected ContentHelper _contentHelper
public HierarchicalReferenceTableClientSideElement()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class StaticFileImportsClientSideElement
ServiceException
public boolean canHaveChild(String contentId)
ContentType.getParentMetadata()
contentId
- The id of the contentpublic Map<String,Object> getReferenceTableProperties(String leafContentTypeId)
leafContentTypeId
- The id of the leaf content type, which defines the hierarchy.public List<String> getContentTypesForChild(String parentContentId)
parentContentId
- The id of the parent contentpublic String getContentTypeForRoot(String leafContentTypeId)
leafContentTypeId
- The id of the leaf content type, which defines the hierarchy.public Map<String,Object> getLeafContentType(String contentTypeId, String contentId)
contentTypeId
- the content type idcontentId
- the content id to get the leaf content type frompublic String getParentMetadataPath(String contentId)
contentId
- The id of contentpublic String getParentMetadataPathForRoot(String leafContentTypeId)
leafContentTypeId
- The id of contentpublic Map<String,Object> validateCandidate(String contentId, int actionId) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
contentId
- The id of the contentactionId
- the id of the workflow actioncom.opensymphony.workflow.WorkflowException
- The Workflow ExceptionAmetysRepositoryException
- The Ametys Repository Exceptionpublic Map<String,Object> getTitleForEdition(String contentId)
contentId
- The id of content being renamed