public class ProgramContentGenerator extends ODFContentGenerator
Modifier and Type | Field and Description |
---|---|
protected SourceResolver |
_srcResolver
The source resolver
|
_resolver
_contentHelper, _contentTypeExtensionPoint, _cTypesHelper, _DC_DATE_FORMAT, _languageManager, _metadataManager, _userHelper, _userProvider, _workflowProvider, _worklflowHelper
manager
objectModel, parameters, resolver, source
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
Constructor and Description |
---|
ProgramContentGenerator() |
Modifier and Type | Method and Description |
---|---|
protected void |
_addAttrIfNotEmpty(AttributesImpl attrs,
String attrName,
String attrValue)
Add an attribute if its not null or empty.
|
private Set<String> |
_getContentIds(CompositeMetadata metadataHolder,
MetadataDefinitionHolder metadataDefHolder,
String contentType) |
protected void |
_saxOtherData(Content content,
Locale defaultLocale)
SAX any other data needed by the view.
|
protected Set<String> |
getLinkedContents(Content content,
String linkedContentType)
Get the linked contents of the defined content type.
|
protected void |
saxChildProgramPart(AbstractProgram program,
Locale defaultLocale)
SAX the referenced
ProgramPart s |
protected void |
saxContainer(Container container,
String parentPath,
Locale defaultLocale)
SAX a container
|
protected void |
saxContent(Content content,
String metadataSetName)
SAX the HTML content of a
Content |
protected void |
saxContent(Content content,
String metadataSetName,
String format,
boolean withContentRoot,
boolean ignoreChildren)
SAX a
Content to given format |
protected void |
saxCourse(Course course,
String parentPath,
Locale defaultLocale)
SAX a course
|
protected void |
saxCourseList(CourseList courseList,
String parentPath,
Locale defaultLocale)
SAX a course list
|
protected void |
saxCoursePart(CoursePart coursePart,
Locale defaultLocale)
SAX a course part
|
protected void |
saxLinkedContents(Content content,
String tagName,
String linkedContentType,
String metadataSet)
SAX the referenced content types.
|
protected void |
saxOrgUnits(Content content)
SAX the referenced
OrgUnit s |
protected void |
saxPersons(Content content)
SAX the referenced
Person s |
protected void |
saxSubProgram(SubProgram subProgram,
String parentPath)
SAX a sub program
|
protected void |
saxTranslation(Content content)
SAX the existing translation
|
void |
service(ServiceManager serviceManager) |
_saxSkill, _saxSkills, _saxSkillSets, _saxSkillSets, saxSkillSets, saxTranslations
_addAttributeIfNotNull, _generateContent, _getCurrentStep, _getMetadataSet, _saxComment, _saxComments, _saxContent, _saxContentComments, _saxContentReactions, _saxDublinCoreMetadata, _saxIfNotNull, _saxIfNotNull, _saxIfNotNull, _saxLanguage, _saxMetadata, _saxMetadataComments, _saxOtherData, _saxWorkflowStep, generate, getDefaultLocale
dispose
recycle, setup
setConsumer, setContentHandler, setLexicalHandler
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setConsumer
protected SourceResolver _srcResolver
public ProgramContentGenerator()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ODFContentGenerator
ServiceException
protected void _saxOtherData(Content content, Locale defaultLocale) throws SAXException, ProcessingException, IOException
ContentGenerator
Default implementation does nothing.
_saxOtherData
in class ContentGenerator
content
- the content.defaultLocale
- The default localeSAXException
- if an error occurs while SAXing.ProcessingException
- if an error occurs.IOException
- if an error occurs.protected void saxPersons(Content content) throws SAXException
Person
scontent
- The content to analyzeSAXException
- if an error occurs while saxingprotected void saxOrgUnits(Content content) throws SAXException
OrgUnit
scontent
- The content to analyzeSAXException
- if an error occurs while saxingprotected void saxChildProgramPart(AbstractProgram program, Locale defaultLocale) throws SAXException, ProcessingException, IOException
ProgramPart
sprogram
- The program or subprogramdefaultLocale
- The default localeSAXException
- if an error occurs while saxingIOException
- if an error occursProcessingException
- if an error occursprotected void saxTranslation(Content content) throws SAXException
content
- The contentSAXException
- if an error occurs while saxingprotected void saxLinkedContents(Content content, String tagName, String linkedContentType, String metadataSet) throws SAXException
content
- The content to analyzetagName
- The root tagNamelinkedContentType
- The content type to searchmetadataSet
- The metadata set to parse the found contentsSAXException
- if an error occurs while saxingprotected Set<String> getLinkedContents(Content content, String linkedContentType)
content
- The content to analyzelinkedContentType
- The content type to searchSet
of content idsprivate Set<String> _getContentIds(CompositeMetadata metadataHolder, MetadataDefinitionHolder metadataDefHolder, String contentType)
protected void saxContainer(Container container, String parentPath, Locale defaultLocale) throws SAXException, ProcessingException, IOException
container
- the container to SAXparentPath
- the parent pathdefaultLocale
- The default localeSAXException
- if an error occursIOException
- if an error occursProcessingException
- if an error occursprotected void saxSubProgram(SubProgram subProgram, String parentPath) throws SAXException
subProgram
- the sub program to SAXparentPath
- the parent pathSAXException
- if an error occursprotected void saxCourseList(CourseList courseList, String parentPath, Locale defaultLocale) throws SAXException, ProcessingException, IOException
courseList
- The course list to SAXparentPath
- the parent pathdefaultLocale
- The default localeSAXException
- if an error occursIOException
- if an error occursProcessingException
- if an error occursprotected void saxCourse(Course course, String parentPath, Locale defaultLocale) throws SAXException, ProcessingException, IOException
course
- the course to SAXparentPath
- the parent pathdefaultLocale
- The default localeSAXException
- if an error occursIOException
- if an error occursProcessingException
- if an error occursprotected void saxContent(Content content, String metadataSetName) throws SAXException, IOException
Content
content
- the contentmetadataSetName
- the metadata set nameSAXException
- If an error occurred saxing the contentIOException
- If an error occurred resolving the contentprotected void saxContent(Content content, String metadataSetName, String format, boolean withContentRoot, boolean ignoreChildren) throws SAXException, IOException
Content
to given formatcontent
- the contentmetadataSetName
- the metadata set nameformat
- the output formatwithContentRoot
- true to wrap content stream into a root content tagignoreChildren
- true to not SAX sub contentsSAXException
- If an error occurred saxing the contentIOException
- If an error occurred resolving the contentprotected void _addAttrIfNotEmpty(AttributesImpl attrs, String attrName, String attrValue)
attrs
- The attributesattrName
- The attribute nameattrValue
- The attribute valueprotected void saxCoursePart(CoursePart coursePart, Locale defaultLocale) throws SAXException, ProcessingException, IOException
coursePart
- The course part to SAXdefaultLocale
- The default localeSAXException
- if an error occursIOException
- if an error occursProcessingException
- if an error occurs