[
https://issues.apache.org/jira/browse/SLING-4223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tomek Rękawek updated SLING-4223:
---------------------------------
Attachment: SLING-4223.patch
Please find the new version of the patch attached. It's less extensive in terms
of changed classes and architecture.
{quote}
create an abstract base component for {{DefaultContentImporter}} and
{{ContentLoaderService}} instead of doing an indirection with whiteboard
pattern (service holder)
{quote}
I integrated the whiteboard into {{BaseImportLoader}}. Because the
{{BaseImportLoader}} is sometimes extended by an OSGi service
({{DefaultContentImporter}}) and sometimes by a POJO ({{BundleContentLoader}})
there are two ways of setting the whiteboard service.
{quote}
decouple {{ContentLoaderService}} and ({{BundleContent}}){{Loader}} and make
({{BundleContent}}){{Loader}} a (prototype) service like
{{DefaultContentImporter}}
{quote}
It'll be hard to decouple it, as there is two-way dependency between
{{BundleContentLoader}} and the {{ContentLoaderService}}. I think this task
should be extracted to a separate JIRA, as it isn't that much related to the
extensible content readers.
{quote}
drop {{ImportProvider}}
{quote}
Done. I also renamed all variables and edited comments.
It's quite difficult to keep such a big patch up-to-date with incoming changes,
so may we can integrate it and work on the trunk (or create a branch)? It
passes all integration tests.
> Make Content Loader extensible to support new import formats
> ------------------------------------------------------------
>
> Key: SLING-4223
> URL: https://issues.apache.org/jira/browse/SLING-4223
> Project: Sling
> Issue Type: Improvement
> Components: JCR
> Affects Versions: JCR ContentLoader 2.1.10
> Reporter: Oliver Lietz
> Assignee: Tomek Rękawek
> Fix For: JCR ContentLoader 2.2.0
>
> Attachments: SLING-4223.patch
>
>
> The current Content Loader supports a basic set of import formats which are
> identified by extension: {{.xml}}, {{.jcr.xml}}, {{.json}}, {{.jar}} and
> {{.zip}}.
> There is a [user
> request|http://mail-archives.apache.org/mod_mbox/sling-users/201412.mbox/%3cd0a6198c.20fbeb%[email protected]%3e]
> to support custom formats like Adobe Folio and [some ideas how to
> implement|http://mail-archives.apache.org/mod_mbox/sling-users/201412.mbox/%[email protected]%3e]:
> * we create a new org.apache.sling.contentloader.reader package to be
> exported at version 1.0
> * move the ContentCreator (@ProviderType) and ContentReader (@ConsumerType)
> to that new package
> * convert the BaseImportLoader into a standalone ContentReader service holder
> used by the DefaultContentImporter and ContentLoaderService components.
> * For the ContentReader service interface we define service registration
> properties for the service to expose the file name extension (and maybe
> content type) the reader supports.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)