[ 
https://issues.apache.org/jira/browse/VELOCITY-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604106#action_12604106
 ] 

Sergiu Dumitriu commented on VELOCITY-588:
------------------------------------------

The patch is outdated, a better source is in the XWiki repository, at 
http://svn.xwiki.org/svnroot/xwiki/xwiki-platform/core/trunk/xwiki-velocity/src/main/java/org/xwiki/velocity/introspection/

Yes, it works pretty well until now. I also have Chainable Introspectors 
locally, but the code requires some cleaning before committing. Here is a 
proposed architecture for how we're planning to use custom 
introspectors/uberspectors in XWiki: 
http://www.nabble.com/Deprecating-all-the-APIs-in-favor-of-a-Velocity-uberspecting-chain-td17208816.html#a17208816

Your idea is good, too. As a pro, it keeps things simple. As a con, it isn't as 
flexible as the chainable one, basically because it allows enhancing the list 
of returned methods, but doesn't allow restricting that list, or performing 
additional tasks with the methods found by previous introspectors/uberspectors. 
For example, we can't block access to methods that don't meet the access rights 
restrictions (see RightsCheckingIntrospector in the XWiki proposal), and we 
can't implement DeprecatedCheckIntrospector that relies entirely on the results 
of the previous introspectors.

I guess I could write a different Uberspector that uses simple linking, instead 
of chaining, and the user (application developer) can choose the one that 
better suits his needs.

> Provide a an ubespector that allows chaining other uberspectors
> ---------------------------------------------------------------
>
>                 Key: VELOCITY-588
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-588
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.5
>            Reporter: Vincent Massol
>            Priority: Minor
>         Attachments: ChainableUberspectorsXWiki.patch
>
>
> In XWiki project we're using Velocity and have a need to write several 
> uberspectors that we'd like to chain (see 
> http://jira.xwiki.org/jira/browse/XWIKI-2182). We're writing a custom 
> uberspector that'll allow chaining other uberspectors but we think that 
> uberspector should best be located in the Velocity project if you're 
> interested.
> Let us know what you think and if you agree we can donate it to you or you 
> could create one from scratch if you agree with the use case.
> Thanks

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to