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 private String_baseURLURL to update DOCX propertiesprotected SourceResolver_srcResolverThe source resolverprivate static StringRNCP_DIRstatic 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
- 
RNCP_DIR
private static final String RNCP_DIR
- See Also:
 - Constant Field Values
 
 
- 
_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
 
 - 
 
 -