Package org.ametys.plugins.odfweb.xslt
Class OdfXSLTHelper
java.lang.Object
org.ametys.odf.OdfXSLTHelper
org.ametys.plugins.odfweb.xslt.OdfXSLTHelper
- All Implemented Interfaces:
Contextualizable,Serviceable
Helper component to be used from XSL stylesheets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum result to determine if a path is part of the current context -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static ContextThe avalon contextprotected static OdfPageHandlerThe ODF page handlerprotected static ODFSkillsHelperThe ODF skills helperFields inherited from class org.ametys.odf.OdfXSLTHelper
_ametysObjectResolver, _odfHelper, _odfRefTableHelper, _rootOrgUnitProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanDetermines if the values of ECTS is equals for the current course's educational paths in the current contextstatic booleanareECTSEqual(String courseId) Determines if the values of ECTS is equals for the course's educational paths in the current contextstatic booleanareSkillsUnavailable(String programItemId, String programPageItemId) trueif the program item is part of an program item (program, subprogram or container) that is excluded from skillsvoidcontextualize(Context context) static doubleGet the ECTS of the current course for the current context if presentstatic doublegetCurrentEcts(String defaultValue) Get the ECTS of the current course for the current context if presentstatic NodeListGet the Skills of the current course for the current context if presentstatic StringgetMainStructureEducationalPathAsString(String educationalPath) Extract educational path of main structure that the given education path belongs to.static StringisPartOfCurrentEducationalPaths(String educationPath) Determines if a givenEducationalPathis part of the currentEducationalPaths
- TRUE_EXACTLY if the education path belongs to the current educational path and the current educational path is unique - TRUE if the education path belongs to the current educational paths - FALSE if the education path does not belong to the current educational pathsstatic StringGet the PDF url of a program or a subprogramstatic StringodfRootPage(String siteName, String language) Get the ODF root page, for a specific site, language.static StringodfRootPage(String siteName, String language, String catalog) Get the ODF root page, for a specific site, language and catalog.static StringGet the id of parent program from the current pagevoidservice(ServiceManager smanager) Methods inherited from class org.ametys.odf.OdfXSLTHelper
degreeLabel, degreeLabel, getCertificationLabel, getCode, getCumulatedHours, getEcts, getEducationalBooklet, getEducationalPathAsString, getEntryId, getOrgUnitIdByUAICode, getParentProgram, getParentProgramStructure, getProgram, getProgramPaths, getProgramStructure, getRootOrgUnitId, getSubProgramStructure, getSubProgramStructure, getTableRefItems, getTableRefItems, getTableRefItems, getValueForPath, minute2hour
-
Field Details
-
_odfPageHandler
The ODF page handler -
_odfSkillsHelper
The ODF skills helper -
_context
The avalon context
-
-
Constructor Details
-
OdfXSLTHelper
public OdfXSLTHelper()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classOdfXSLTHelper- Throws:
ServiceException
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
odfRootPage
Get the ODF root page, for a specific site, language. If there is many ODF root pages, the first page of the list is returned.- Parameters:
siteName- the desired site name.language- the sitemap language to search in.- Returns:
- the first ODF root page, or null if not found
-
odfRootPage
Get the ODF root page, for a specific site, language and catalog.- Parameters:
siteName- the desired site name.language- the sitemap language to search in.catalog- The ODF catalog- Returns:
- the ODF root page, or null if not found
-
odfPDFUrl
Get the PDF url of a program or a subprogram- Parameters:
contentId- The content idsiteName- The site name- Returns:
- the PDF url or empty string if the content is not a
ProgramorSubProgram
-
parentProgramId
Get the id of parent program from the current page- Returns:
- the id of parent program or null if not found
-
getCurrentEcts
Get the ECTS of the current course for the current context if present- Returns:
- the ECTS or 0 if not found
-
getCurrentSkills
Get the Skills of the current course for the current context if present- Returns:
- the MicroSkills by MacroSkills or null if not found
-
isPartOfCurrentEducationalPaths
Determines if a givenEducationalPathis part of the currentEducationalPaths
- TRUE_EXACTLY if the education path belongs to the current educational path and the current educational path is unique - TRUE if the education path belongs to the current educational paths - FALSE if the education path does not belong to the current educational paths- Parameters:
educationPath- the education path as string- Returns:
- the status of the entry path belonging to the current context or not
-
getMainStructureEducationalPathAsString
Extract educational path of main structure that the given education path belongs to. The path stops to the last parent container of type year or the last subprogram if the year does not exist.- Parameters:
educationalPath- the educational path as string- Returns:
- the readable education path of main structure
-
getCurrentEcts
Get the ECTS of the current course for the current context if present- Parameters:
defaultValue- The default value- Returns:
- the ECTS or 0 if not found
-
areECTSEqual
Determines if the values of ECTS is equals for the course's educational paths in the current context- Parameters:
courseId- The course id- Returns:
- true if the values of ECTS is equals in the current context
-
areECTSEqual
Determines if the values of ECTS is equals for the current course's educational paths in the current context- Returns:
- true if the values of ECTS is equals in the current context
-