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
Fields Modifier and Type Field Description protected SourceResolver_srcResolverThe source resolverstatic StringROLEThe component role
-
Constructor Summary
Constructors Constructor Description RNCPModelHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Map<String,Object>>getModels()Get the list of RNCP models.voidinitialize()voidservice(ServiceManager smanager)voidupdateAbstractProgramRNCPSheet(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 Detail
-
_srcResolver
protected SourceResolver _srcResolver
The source resolver
-
-
Constructor Detail
-
RNCPModelHelper
public RNCPModelHelper()
-
-
Method Detail
-
initialize
public void initialize() throws Exception
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getModels
public List<Map<String,Object>> getModels() throws ConfigurationException, SAXException, IOException
Get 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
-
-