Package fr.becpg.repo.helper.extractors
Class ContentDataExtractor
java.lang.Object
fr.becpg.repo.helper.extractors.AbstractNodeDataExtractor
fr.becpg.repo.helper.extractors.ContentDataExtractor
- All Implemented Interfaces:
NodeDataExtractor
ContentDataExtractor class.
- Version:
- $Id: $Id
- Author:
- matthieu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.commons.logging.Logprivate List<AttributeExtractorField> Fields inherited from class fr.becpg.repo.helper.extractors.AbstractNodeDataExtractor
attributeExtractorService, nodeService, PROP_ASPECTS, PROP_CONTAINER, PROP_CREATED, PROP_CREATOR, PROP_CREATOR_DISPLAY, PROP_DESCRIPTION, PROP_DISPLAYNAME, PROP_ITEMTYPE, PROP_METADATA, PROP_MODIFIED, PROP_MODIFIER, PROP_MODIFIER_DISPLAY, PROP_NAME, PROP_NODEDATA, PROP_NODEREF, PROP_PATH, PROP_PERMISSIONS, PROP_SHORTNAME, PROP_SITE, PROP_SIZE, PROP_TAGS, PROP_TITLE, PROP_TYPE, services -
Constructor Summary
ConstructorsConstructorDescriptionContentDataExtractor(List<AttributeExtractorField> metadataFields, org.alfresco.service.ServiceRegistry serviceRegistry, AttributeExtractorService attributeExtractorService) Constructor for ContentDataExtractor.ContentDataExtractor(org.alfresco.service.ServiceRegistry serviceRegistry, AttributeExtractorService attributeExtractorService) Constructor for ContentDataExtractor. -
Method Summary
Modifier and TypeMethodDescriptiondoExtract(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName itemType, org.alfresco.service.cmr.site.SiteInfo site) doExtract.private StringtoPrefixStringOrRaw(org.alfresco.service.namespace.QName aspect, org.alfresco.service.cmr.repository.NodeRef nodeRef) Prefixes an aspect name, without ever failing the whole search.Methods inherited from class fr.becpg.repo.helper.extractors.AbstractNodeDataExtractor
convertDateValue, extract, formatDate, getParent, getSize, getSize
-
Field Details
-
logger
private static final org.apache.commons.logging.Log logger -
metadataFields
-
-
Constructor Details
-
ContentDataExtractor
public ContentDataExtractor(org.alfresco.service.ServiceRegistry serviceRegistry, AttributeExtractorService attributeExtractorService) Constructor for ContentDataExtractor.
- Parameters:
serviceRegistry- aServiceRegistryobject.attributeExtractorService- aAttributeExtractorServiceobject.
-
ContentDataExtractor
public ContentDataExtractor(List<AttributeExtractorField> metadataFields, org.alfresco.service.ServiceRegistry serviceRegistry, AttributeExtractorService attributeExtractorService) Constructor for ContentDataExtractor.
- Parameters:
metadataFields- aListobject.serviceRegistry- aServiceRegistryobject.attributeExtractorService- aAttributeExtractorServiceobject.
-
-
Method Details
-
doExtract
protected Map<String,Object> doExtract(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName itemType, org.alfresco.service.cmr.site.SiteInfo site) doExtract.
- Specified by:
doExtractin classAbstractNodeDataExtractor- Parameters:
nodeRef- aNodeRefobject.itemType- aQNameobject.site- aSiteInfoobject.- Returns:
- a
Mapobject.
-
toPrefixStringOrRaw
private String toPrefixStringOrRaw(org.alfresco.service.namespace.QName aspect, org.alfresco.service.cmr.repository.NodeRef nodeRef) Prefixes an aspect name, without ever failing the whole search.
A node can carry an aspect coming from a model that is no longer registered - a custom model removed from an instance, typically.QName.toPrefixString()then throws a NamespaceException and, called from the search web script, that single node used to break the whole result page. Fall back on the full "{uri}localName" form and log the nodeRef, so the offending data can actually be found.- Parameters:
aspect- aQNameobjectnodeRef- aNodeRefobject- Returns:
- the prefixed name, or the full QName when its namespace is unknown
-