jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Launay (JIRA) <j...@apache.org>
Subject [jira] Commented: (JCR-2224) Change access levels in SearchIndex and NodeIndexer for better inherance
Date Thu, 23 Jul 2009 12:31:15 GMT

    [ https://issues.apache.org/jira/browse/JCR-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734577#action_12734577

Sébastien Launay commented on JCR-2224:

This is ok for a subclass but my CustomSearchIndex is unable to invoke CustomNodeIndexer#createDoc(...).
Another solution is to change the access level to public while overriding this method:
    public Document createDoc() throws RepositoryException
        return super.createDoc();
otherwise i have the error "The method createDoc() from the type NodeIndexer is not visible"
for this kind of code:
public class CustomSearchIndex extends SearchIndex
    protected Document createDocument(NodeState node, NamespaceMappings nsMappings, IndexFormatVersion
indexFormatVersion) throws RepositoryException
        CustomNodeIndexer indexer = ...
        Document doc = indexer.createDoc();

> Change access levels in SearchIndex and NodeIndexer for better inherance
> ------------------------------------------------------------------------
>                 Key: JCR-2224
>                 URL: https://issues.apache.org/jira/browse/JCR-2224
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-core
>    Affects Versions: 1.5.6, 2.0-alpha4
>            Reporter: Sébastien Launay
>            Priority: Trivial
>         Attachments: JCR-2224-2009-07-23.patch
> I want to change NodeIndexer#addBinaryValue logic in JR 1.5.6, therefore i needed to:
> * create a custom class extending NodeIndexer for changing binary field indexation
> * create a custom class extending SearchIndex for using this custom NodeIndexer
> I was obliged to:
> * override SearchIndex#createTextExtractor in order to store created TextExtractor because
of private attribute
> * put both classes into package org.apache.jackrabbit.core.query.lucene because NodeIndexer#createDoc(...)
is protected
> In trunk TextExtractor has now a getter but there are still some private attributes.
> And NodeIndexer#createDoc(...) is still protected and there are some private methods.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message