[quote]1) isMultipleWrapEnabled --> returns true, otherwise, decorated nodes
can not be more decorated (e.g.: QueryUtil)[/quote]
Not sure, depends on your requirements. E.g. we return true for inheritance
wrapper because you can inherit multiple times (extend node that extends
another node), but false for html wrapper since you don't want to wrap (and
encode) already wrapped (and encoded) html content.
[quote]2) wrapSession --> not sure if I have to explicit re-wrap this session.
I guess it implies the Node.getSession() method, right? In that case,
overridden is mandatory.
3) wrapWorkspace --> afaik, this is the only method used by QueryUtil
(session.getWorkspace().getQueryManager(). Overridden required.
4) wrapNode --> must be overridden, because of node.getChildren() methods..
5) wrapNodeIterator --> I guess this need to be overridden too.
7) wrapProperties --> No need. If the node is visible, all its properties are
visible too.
8) wrapPropertyIterator --> No need, same reason of 7
[/quote]
All of the above have to be implemented if you don't want to allow escaping of
unwrapped nodes, e.g. via
myNode.getWorkspace().getSession().getNodeByIdentifier(myNode.getIdentifier())
or even simpler by myNode.getProperty("x").getParent().
However if you extend info.magnolia.jcr.decoration.AbstractContentDecorator all
of the above methods are already implemented and you don't need to do
absolutely anything with them.
If your decorator extends info.magnolia.jcr.decoration.AbstractContentDecorator
and doesn't override any of the above mentioned wrap* methods, the decorator
will wrap session, workspace, nodes and properties in appropriate instances of
info.magnolia.jcr.decoration.ContentDecorator*Wrapper
[quote]6) evaluateNode --> I don't know who exactly calls this method and why.
(!!)[/quote]
ContentDecorator*Wrapper will call this method then for every call to it that
will return node to ask whether this node evaluates true and should be returned
by the wrapper or evaluates false and should be hidden.
[quote]9) evaluateProperty --> returns true (or super). Same reason of
7.[/quote]
This one you don't need to override, since you don't hide any properties so it
can always return true which is the default behaviour.
HTH,
Jan
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=0f30a282-75c7-42ed-a73c-9379248d173b
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------