Package org.ametys.odf.cdmfr
Class GenericCDMfrExtension
java.lang.Object
org.ametys.odf.cdmfr.AbstractCDMfrExtension
org.ametys.odf.cdmfr.GenericCDMfrExtension
- All Implemented Interfaces:
CDMfrExtension
,Configurable
,Serviceable
public class GenericCDMfrExtension
extends AbstractCDMfrExtension
implements Configurable, Serviceable
Simple
Each attribute should be configured like:
and will be output with the following syntax:
The tag name is optional, defaulting to the attribute name.
It the attribute is of type "content", then the "cdm" view is also exported inside the attribute's XML tag if it exists.
CDMfrExtension
generating CDM-fr Ametys extension for each configured attribute.Each attribute should be configured like:
<attribute name="attributeName" tag="tagName">
and will be output with the following syntax:
<ametys-cdm:tagName>value</ametys-cdm:tagName>
The tag name is optional, defaulting to the attribute name.
It the attribute is of type "content", then the "cdm" view is also exported inside the attribute's XML tag if it exists.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
abstractProgram2CDM
(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program, Set<String> persons, Set<String> orgUnits) Send the content of an user defined ametys extension to be included in the CDM-fr representation the abstract program.void
configure
(Configuration configuration) void
container2CDM
(ContentHandler contentHandler, Container container, Set<String> persons, Set<String> orgUnits) Send the content of an user defined ametys extension to be included in the CDM-fr representation the container.void
course2CDM
(ContentHandler contentHandler, Course course, Set<String> persons, Set<String> orgUnits) Send the content of an user defined ametys extension to be included in the CDM-fr representation the course.void
orgunit2CDM
(ContentHandler contentHandler, OrgUnit orgunit) Send the content of an user defined ametys extension to be included in the CDM-fr representation the orgunit.void
person2CDM
(ContentHandler contentHandler, Person person) Send the content of an user defined ametys extension to be included in the CDM-fr representation the orgunit.void
program2CDM
(ContentHandler contentHandler, Program program, Set<String> persons, Set<String> orgUnits) Send the content of an user defined ametys extension to be included in the CDM-fr representation the program.void
service
(ServiceManager manager) void
subProgram2CDM
(ContentHandler contentHandler, SubProgram subProgram, Set<String> persons, Set<String> orgUnits) Send the content of an user defined ametys extension to be included in the CDM-fr representation the subProgram.Methods inherited from class org.ametys.odf.cdmfr.AbstractCDMfrExtension
_getFileAbsoluteUrl
-
Constructor Details
-
GenericCDMfrExtension
public GenericCDMfrExtension()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
abstractProgram2CDM
public void abstractProgram2CDM(ContentHandler contentHandler, AbstractProgram<? extends ProgramFactory> program, Set<String> persons, Set<String> orgUnits) throws SAXException Description copied from interface:CDMfrExtension
Send the content of an user defined ametys extension to be included in the CDM-fr representation the abstract program.- Specified by:
abstractProgram2CDM
in interfaceCDMfrExtension
- Parameters:
contentHandler
- the receiving contentHandler.program
- the abstract program (common for program and subprogram)persons
- collectedPerson
ids.orgUnits
- collectedOrgUnit
ids.- Throws:
SAXException
- if an error occurs during CDM processing.
-
program2CDM
public void program2CDM(ContentHandler contentHandler, Program program, Set<String> persons, Set<String> orgUnits) throws SAXException Description copied from interface:CDMfrExtension
Send the content of an user defined ametys extension to be included in the CDM-fr representation the program.- Specified by:
program2CDM
in interfaceCDMfrExtension
- Parameters:
contentHandler
- the receiving contentHandler.program
- the programpersons
- collectedPerson
ids.orgUnits
- collectedOrgUnit
ids.- Throws:
SAXException
- if an error occurs during CDM processing.
-
subProgram2CDM
public void subProgram2CDM(ContentHandler contentHandler, SubProgram subProgram, Set<String> persons, Set<String> orgUnits) throws SAXException Description copied from interface:CDMfrExtension
Send the content of an user defined ametys extension to be included in the CDM-fr representation the subProgram.- Specified by:
subProgram2CDM
in interfaceCDMfrExtension
- Parameters:
contentHandler
- the receiving contentHandler.subProgram
- the subProgrampersons
- collectedPerson
ids.orgUnits
- collectedOrgUnit
ids.- Throws:
SAXException
- if an error occurs during CDM processing.
-
course2CDM
public void course2CDM(ContentHandler contentHandler, Course course, Set<String> persons, Set<String> orgUnits) throws SAXException Description copied from interface:CDMfrExtension
Send the content of an user defined ametys extension to be included in the CDM-fr representation the course.- Specified by:
course2CDM
in interfaceCDMfrExtension
- Parameters:
contentHandler
- the receiving contentHandler.course
- the coursepersons
- collectedPerson
ids.orgUnits
- collectedOrgUnit
ids.- Throws:
SAXException
- if an error occurs during CDM processing.
-
orgunit2CDM
Description copied from interface:CDMfrExtension
Send the content of an user defined ametys extension to be included in the CDM-fr representation the orgunit.- Specified by:
orgunit2CDM
in interfaceCDMfrExtension
- Parameters:
contentHandler
- the receiving contentHandler.orgunit
- the orgunit- Throws:
SAXException
- if an error occurs during CDM processing.
-
person2CDM
Description copied from interface:CDMfrExtension
Send the content of an user defined ametys extension to be included in the CDM-fr representation the orgunit.- Specified by:
person2CDM
in interfaceCDMfrExtension
- Parameters:
contentHandler
- the receiving contentHandler.person
- the orgunit- Throws:
SAXException
- if an error occurs during CDM processing.
-
container2CDM
public void container2CDM(ContentHandler contentHandler, Container container, Set<String> persons, Set<String> orgUnits) throws SAXException Description copied from interface:CDMfrExtension
Send the content of an user defined ametys extension to be included in the CDM-fr representation the container.- Specified by:
container2CDM
in interfaceCDMfrExtension
- Parameters:
contentHandler
- the receiving contentHandler.container
- the containerpersons
- collectedPerson
ids.orgUnits
- collectedOrgUnit
ids.- Throws:
SAXException
- if an error occurs during CDM processing.
-