[Yanel-dev] policy viewer refactoring (inside "policymanager" resource-type)

Guillaume Déflache guillaume.deflache at wyona.com
Mon Mar 22 15:49:06 CET 2010


Hi!

For a project I need to implement some specific behaviour for the policy 
viewer.
So as to also reuse existing Yanel code for other unchanged things I'd 
need to be able to reuse parts of the existing Yanel implementation.


ATM alas the policy viewer is implemented by calling the sole static 
method PolicyViewer#getXHTMLView(PolicyManager pm, GroupManager gm, 
String path, String contentItemId, [other view options' parameters]) 
which does not allow any kind of overriding.


I'd like to introduce the following method in 
org.wyona.yanel.impl.resources.policymanager.PolicyManagerResource:

     protected PolicyViewer getPolicyViewer(PolicyManager pm, 
GroupManager gm, [other view options' parameters]);

with the visible API of PolicyViewer being:

     InputStream getXHTMLInputStream(String path, String contentItemId) 
throws Exception

Then I would be able to just change the used resource-type in 
$MY_SPECIFIC_REALM_DIR/src/webapp/global-resource-configs/policy-manager_yanel-rc.xml 
to one using my own PolicyViewer-based Java class!

WDYT?


Cheers,
    Guillaume



More information about the Yanel-development mailing list