Package org.ametys.odf.rncp
Class RNCPModelHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.rncp.RNCPModelHelper
- All Implemented Interfaces:
LogEnabled
,Initializable
,Component
,Serviceable
public class RNCPModelHelper
extends AbstractLogEnabled
implements Component, Serviceable, Initializable
Helper for RNCP models.
-
Field Summary
Modifier and TypeFieldDescriptionprotected SourceResolver
The source resolverstatic final String
The component role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the list of RNCP models.void
void
service
(ServiceManager smanager) void
updateAbstractProgramRNCPSheet
(String modelId, String programId, String subProgramId, OutputStream out) Update the RNCP model with the good properties.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The component role -
_srcResolver
The source resolver
-
-
Constructor Details
-
RNCPModelHelper
public RNCPModelHelper()
-
-
Method Details
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getModels
public List<Map<String,Object>> getModels() throws ConfigurationException, SAXException, IOExceptionGet the list of RNCP models.- Returns:
- A JSON list with id and label of each available RNCP model
- Throws:
ConfigurationException
- if an error occursSAXException
- if an error occursIOException
- if an error occurs
-
updateAbstractProgramRNCPSheet
public void updateAbstractProgramRNCPSheet(String modelId, String programId, String subProgramId, OutputStream out) throws MalformedURLException, IOException Update the RNCP model with the good properties.- Parameters:
modelId
- The model ID, shouldn't be nullprogramId
- The mention IDsubProgramId
- The subprogram IDout
- TheOutputStream
- Throws:
MalformedURLException
- if an error occursIOException
- if an error occurs
-