-
1. Re: How to overwrite a class methods (UserACL) in my portal extension
trong.tran Jun 23, 2010 1:23 PM (in response to andre.winkler)Create a sub java class org.gatein.ExtendedUserACL for instance which extends from UserACL. The class would contains what you want to overwrite from the original UserACL.
Then re-configure the implementation of the UserACL component service in your portal extension like :
<component> <key>org.exoplatform.portal.config.UserACL</key> <type>org.gatein.ExtendedUserACL</type> <init-params> <value-param> <name>super.user</name> <description>administrator</description> <value>root</value> </value-param> <value-param> <name>portal.administrator.groups</name> <description>administrator</description> <value>/platform/administrators</value> </value-param> ... </init-params> </component>
Make sure that your portal extension has been defined in the last of dependencies list of the your portal definition configuration
-
2. Re: How to overwrite a class methods (UserACL) in my portal extension
andre.winkler Jun 24, 2010 2:11 AM (in response to trong.tran)Thank you for your great answer, but a few detail questions.
Can I create the subclass in my portal extension war or it is needed to create this class in a separate jar that I have to put in the tomcat lib directory?
In which configuration file of my portal extension can I add the component reconfiguration?
My portal extension is the last in the dependency list.
-
3. Re: How to overwrite a class methods (UserACL) in my portal extension
trong.tran Jun 25, 2010 3:42 AM (in response to andre.winkler)Can I create the subclass in my portal extension war or it is needed to create this class in a separate jar that I have to put in the tomcat lib directory?
I suggest to use a separated jar file
In which configuration file of my portal extension can I add the component reconfiguration?
it should be in YourPortalExtenstion.war/WEB-INF/conf/configuration.xml