public class ContentTypesGraphGenerator extends ServiceableGenerator
Modifier and Type | Field and Description |
---|---|
private ContentTypeExtensionPoint |
_contentTypeEP |
private I18nUtils |
_i18nUtils |
static String |
PARAMETER_CONTENTTYPE_ALL
The request parameter name for export all content types
|
static String |
PARAMETER_CONTENTTYPE_IDS
The request parameter name for content ids
|
static String |
PARAMETER_CONTENTTYPE_ISHIERARCHICALVIEW
The request parameter name for tree view
|
manager
objectModel, parameters, resolver, source
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
Constructor and Description |
---|
ContentTypesGraphGenerator() |
Modifier and Type | Method and Description |
---|---|
private void |
_addAssociations(ContentType contentType,
Set<String> contentTypesIds) |
private void |
_addAttributesContentType(ContentType contentType) |
private void |
_addMetadata(MetadataDefinition metadataDefinition,
ContentType contentType) |
private void |
_addMetadatas(ContentType contentType) |
private void |
_addParents(Set<ContentType> parentsContentTypes) |
private void |
_exportContentTypes(Set<String> contentTypesIds,
boolean addAssociations,
boolean addParents)
Export content types
|
private String |
_getContentTypeName(I18nizableText labelContentType) |
private String |
_getIdForGraph(String text) |
private String |
_getInvert(MetadataDefinition metadataDefinition) |
private boolean |
_isMandatoryMetadata(MetadataDefinition metadataDefinition) |
private void |
_retrieveChildrenContentTypesIds(String contentTypeId,
Set<String> childrenContentTypesIds)
Retrieve content types ids for all children of content type with contentTypeId id
|
private void |
_retrieveLinkedContents(MetadataDefinition metadataDefinition,
Set<String> contentTypesIds,
Map<ContentType,String> linkedContents) |
void |
generate() |
private String |
getCardinality(MetadataDefinition metadataDefinition) |
void |
service(ServiceManager serviceManager) |
dispose
recycle, setup
setConsumer, setContentHandler, setLexicalHandler
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setConsumer
public static final String PARAMETER_CONTENTTYPE_IDS
public static final String PARAMETER_CONTENTTYPE_ISHIERARCHICALVIEW
public static final String PARAMETER_CONTENTTYPE_ALL
private ContentTypeExtensionPoint _contentTypeEP
private I18nUtils _i18nUtils
public ContentTypesGraphGenerator()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableGenerator
ServiceException
public void generate() throws IOException, SAXException, ProcessingException
private void _retrieveChildrenContentTypesIds(String contentTypeId, Set<String> childrenContentTypesIds)
contentTypeId
- The content type id of content type that we want to retrieves all children content types idschildrenContentTypesIds
- All children content types ids retrievedprivate void _exportContentTypes(Set<String> contentTypesIds, boolean addAssociations, boolean addParents) throws SAXException
contentTypesIds
- The content types ids to exportaddAssociations
- Allow to create a link association when a content type contains a Content metadata typeaddParents
- Allow to add all parents of content type even if the parent content type wasn't selectedSAXException
- If an error occured while saxingprivate void _addAttributesContentType(ContentType contentType) throws SAXException
SAXException
private void _addMetadatas(ContentType contentType) throws SAXException
SAXException
private void _addMetadata(MetadataDefinition metadataDefinition, ContentType contentType) throws SAXException
SAXException
private void _addParents(Set<ContentType> parentsContentTypes) throws SAXException
SAXException
private void _addAssociations(ContentType contentType, Set<String> contentTypesIds) throws SAXException
SAXException
private void _retrieveLinkedContents(MetadataDefinition metadataDefinition, Set<String> contentTypesIds, Map<ContentType,String> linkedContents)
private String getCardinality(MetadataDefinition metadataDefinition)
private String _getInvert(MetadataDefinition metadataDefinition)
private String _getContentTypeName(I18nizableText labelContentType)
private String _getIdForGraph(String text)
private boolean _isMandatoryMetadata(MetadataDefinition metadataDefinition)