Package org.ametys.odf
Class OdfXSLTHelper
java.lang.Object
org.ametys.odf.OdfXSLTHelper
- All Implemented Interfaces:
Serviceable
- Direct Known Subclasses:
OdfXSLTHelper
Helper component to be used from XSL stylesheets.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static AmetysObjectResolver
The Ametys resolverprotected static ODFHelper
The ODF helperprotected static OdfReferenceTableHelper
The ODF reference helperprotected static RootOrgUnitProvider
The orgunit root provider -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
degreeLabel
(String cdmValue) Get the label associated with the degree keystatic String
degreeLabel
(String cdmValue, String lang) Get the label associated with the degree keystatic String
getCertificationLabel
(String abstractProgramId) Get the certification label of aAbstractProgram
.static String
Get the code associated with the given reference table's entrystatic Double
getCumulatedHours
(String contentId) Count the hours accumulation in theProgramItem
static AmetysNodeList
getEducationalBooklet
(String subProgramId) Get the more recent educational booklet for one subprogramstatic String
getEntryId
(String tableRefId, String code) Get the id of reference table's entrystatic String
getOrgUnitIdByUAICode
(String uaiCode) Get the id of the first orgunit matching the given UAI codestatic NodeList
getParentProgram
(String subprogramId) Get the parent program informationstatic NodeList
getParentProgramStructure
(String subprogramId, int depth) Get the structure of a parent programs, including the structure of child subprograms until the given depth.static Node
getProgram
(String programId) Get the program informationstatic Node
getProgramStructure
(String programId, int depth) Get the structure of a program until the given depth.static String
Get the id of root orgunitstatic Node
getSubProgramStructure
(String subprogramId) Get the whole structure of a subprogram, including the structure of child subprogramsstatic Node
getSubProgramStructure
(String subprogramId, int depth) Get the structure of a subprogram, including the structure of child subprograms until the given depthstatic Node
getTableRefItems
(String tableRefId, String lang) Get the items of a reference tablestatic Node
getTableRefItems
(String tableRefId, String lang, boolean ordered) Get the items of a reference tablevoid
service
(ServiceManager smanager)
-
Field Details
-
_odfHelper
The ODF helper -
_odfRefTableHelper
The ODF reference helper -
_ametysObjectResolver
The Ametys resolver -
_rootOrgUnitProvider
The orgunit root provider
-
-
Constructor Details
-
OdfXSLTHelper
public OdfXSLTHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
degreeLabel
Get the label associated with the degree key- Parameters:
cdmValue
- The code of degree- Returns:
- The label of degree or code if not found
-
getCode
Get the code associated with the given reference table's entry- Parameters:
tableRefEntryId
- The id of entry- Returns:
- the code or
null
if not found
-
getEntryId
Get the id of reference table's entry- Parameters:
tableRefId
- The id of content typecode
- The code- Returns:
- the id or
null
if not found
-
degreeLabel
Get the label associated with the degree key- Parameters:
cdmValue
- The cdm value of degreelang
- The language- Returns:
- The label of degree or empty string if not found
-
getSubProgramStructure
Get the whole structure of a subprogram, including the structure of child subprograms- Parameters:
subprogramId
- The id of subprogram- Returns:
- Node with the subprogram structure
-
getSubProgramStructure
Get the structure of a subprogram, including the structure of child subprograms until the given depth- Parameters:
subprogramId
- The id of subprogramdepth
- Set a positive number to get structure of child subprograms until given depth. Set a negative number to get the whole structure recursively, including the structure of child subprograms. This parameter concerns only subprograms.- Returns:
- Node with the subprogram structure
-
getParentProgram
Get the parent program information- Parameters:
subprogramId
- The id of subprogram- Returns:
- a node for each program's information
-
getCertificationLabel
Get the certification label of aAbstractProgram
. Returns null if the program is not certified.- Parameters:
abstractProgramId
- the id of program or subprogram- Returns:
- the certification label
-
getProgram
Get the program information- Parameters:
programId
- The id of program- Returns:
- Node with the program's information
-
getParentProgramStructure
Get the structure of a parent programs, including the structure of child subprograms until the given depth.- Parameters:
subprogramId
- The id of subprogramdepth
- Set a positive number to get structure of child subprograms until given depth. Set a negative number to get the whole structure recursively, including the structure of child subprograms. This parameter concerns only subprograms.- Returns:
- a node for each program's structure
-
getProgramStructure
Get the structure of a program until the given depth.- Parameters:
programId
- The id of programdepth
- Set a positive number to get structure of child subprograms until given depth. Set a negative number to get the whole structure recursively, including the structure of child subprograms. This parameter concerns only subprograms.- Returns:
- Node with the program structure
-
getTableRefItems
Get the items of a reference table- Parameters:
tableRefId
- the id of reference tablelang
- the language to use for labels- Returns:
- the items
-
getTableRefItems
Get the items of a reference table- Parameters:
tableRefId
- the id of reference tablelang
- the language to use for labelsordered
- true to sort items by 'order' attribute- Returns:
- the items
-
getRootOrgUnitId
Get the id of root orgunit- Returns:
- The id of root
-
getOrgUnitIdByUAICode
Get the id of the first orgunit matching the given UAI code- Parameters:
uaiCode
- the UAI code- Returns:
- the id of orgunit or null if not found
-
getEducationalBooklet
Get the more recent educational booklet for one subprogram- Parameters:
subProgramId
- the subprogram id- Returns:
- the pdf as an ametys node list
-
getCumulatedHours
Count the hours accumulation in theProgramItem
- Parameters:
contentId
- The id of theProgramItem
- Returns:
- The hours accumulation
-