Package org.ametys.odf.tree
Class ODFContentsTreeHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.contentstree.ContentsTreeHelper
org.ametys.odf.tree.ODFContentsTreeHelper
- All Implemented Interfaces:
LogEnabled,Component,Serviceable
- Direct Known Subclasses:
ContentsWithViewTreeGridHelper,CostComputationTreeHelper,CoursePartsTreeHelper
Helper ODF contents tree adding indicators
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ODFTreeIndicatorExtensionPointExtension point for indicatorsstatic final StringThe Avalon roleFields inherited from class org.ametys.plugins.contentstree.ContentsTreeHelper
_ametysResolver, _contentTypesEP, _contentTypesHelper, _treeExtensionPoint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontent2Json(Content content) Get the default JSON representation of a content of the treegetIndicatorData(Content content) Get the indicator data to JSON format<T extends ProgramItem & Content>
StringgetProgramItemDisplayCode(T programItem) Get the ProgramItem code we want to display.protected booleanisContentMatching(Content content, String value) Determines if content matches the filter regexpvoidservice(ServiceManager smanager) Methods inherited from class org.ametys.plugins.contentstree.ContentsTreeHelper
_addChildren, _getParentContent, _getTreeConfiguration, childContent2Json, filterChildrenContentByRegExp, getChildrenContent, getChildrenContent, getNodeInformations, getRootNodeInformations, hasAutoExpandTargets, hasChildrenContent, isAnAutoExpandTargetMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role -
_odfTreeIndicatorEP
Extension point for indicators
-
-
Constructor Details
-
ODFContentsTreeHelper
public ODFContentsTreeHelper()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classContentsTreeHelper- Throws:
ServiceException
-
content2Json
Description copied from class:ContentsTreeHelperGet the default JSON representation of a content of the tree- Overrides:
content2Jsonin classContentsTreeHelper- Parameters:
content- the content- Returns:
- the content as JSON
-
getIndicatorData
Get the indicator data to JSON format- Parameters:
content- the contet- Returns:
- the indicator data to JSON format
-
getProgramItemDisplayCode
Get the ProgramItem code we want to display.- Type Parameters:
T- The type of the program element, should be a subclasse ofProgramItemandContent- Parameters:
programItem- The program item- Returns:
- The code to display
-
isContentMatching
Description copied from class:ContentsTreeHelperDetermines if content matches the filter regexp- Overrides:
isContentMatchingin classContentsTreeHelper- Parameters:
content- the contentvalue- the value to match- Returns:
- true if the content match
-