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:
ODFContentsTreeHelper
Helper ODF contents tree
-
Field Summary
Modifier and TypeFieldDescriptionprotected ODFHelper
The ODF helperprotected ShareableCourseHelper
The shareable course helperprotected ShareableCourseStatusHelper
The shareable course status helperprotected WorkflowProvider
The workflow providerstatic final String
The Avalon roleFields inherited from class org.ametys.plugins.contentstree.ContentsTreeHelper
_ametysResolver, _contentTypesEP, _contentTypesHelper, _treeExtensionPoint
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncontent2Json
(Content content) Get the default JSON representation of a content of the treeprotected <T extends ProgramItem & Content>
ObjectgetProgramItemDisplayCode
(T programItem) Get the ProgramItem code we want to display.getRootNodeInformations
(String contentId) Get the root node informationsprotected String
getShareableStatus
(Course course) Get the shareable course status as StringgetWorkflowStep
(Content content) Get workflow step informationprotected boolean
isContentMatching
(Content content, String value) Determines if content matches the filter regexpprotected boolean
isShared
(ProgramItem programItem) Get the shared status of this program itemprotected boolean
isSharedByParents
(ProgramItem programItem) Check if the parent of a program item is sharedvoid
service
(ServiceManager smanager) Methods inherited from class org.ametys.plugins.contentstree.ContentsTreeHelper
_getParentContent, _getTreeConfiguration, childContent2Json, filterChildrenContentByRegExp, getChildrenContent, getChildrenContent, getNodeInformations, hasChildrenContent
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role -
_odfHelper
The ODF helper -
_workflowProvider
The workflow provider
-
-
Constructor Details
-
ODFContentsTreeHelper
public ODFContentsTreeHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classContentsTreeHelper
- Throws:
ServiceException
-
getRootNodeInformations
Description copied from class:ContentsTreeHelper
Get the root node informations- Overrides:
getRootNodeInformations
in classContentsTreeHelper
- Parameters:
contentId
- The content- Returns:
- The informations
-
content2Json
Description copied from class:ContentsTreeHelper
Get the default JSON representation of a content of the tree- Overrides:
content2Json
in classContentsTreeHelper
- Parameters:
content
- the content- Returns:
- the content as JSON
-
getProgramItemDisplayCode
Get the ProgramItem code we want to display.- Type Parameters:
T
- The type of the program element, should be a subclasse ofProgramItem
andContent
- Parameters:
programItem
- The program item- Returns:
- The code to display
-
isContentMatching
Description copied from class:ContentsTreeHelper
Determines if content matches the filter regexp- Overrides:
isContentMatching
in classContentsTreeHelper
- Parameters:
content
- the contentvalue
- the value to match- Returns:
- true if the content match
-
getWorkflowStep
Get workflow step information- Parameters:
content
- the content the content- Returns:
- the workflow step information
-