[
https://issues.jboss.org/browse/GTNPORTAL-2196?page=com.atlassian.jira.pl...
]
Khoi Nguyen resolved GTNPORTAL-2196.
------------------------------------
Fix Version/s: 3.2.0-M02
Resolution: Done
Set UserPortalConfigService templates and portals definition easily
ereasable
-----------------------------------------------------------------------------
Key: GTNPORTAL-2196
URL:
https://issues.jboss.org/browse/GTNPORTAL-2196
Project: GateIn Portal
Issue Type: Enhancement
Security Level: Public(Everyone can see)
Reporter: Khoi Nguyen
Assignee: Khoi Nguyen
Labels: portal-s63, sync
Fix For: 3.2.0-M02
We couldn't delete by configuration, the sites defined in
*portal.war/WEB-INF/conf/portal/portal-configuration.xml* (unless with overriding the
whole file).
I 've attached a patch to do it easily by configuration:
h3. Description of the proposed solution:
By using the attached patch, we can easily erase a portal definition, or even a portal
template definition. Here is an example of "how to use it", simply define this
component plugin:
{code:xml}
<external-component-plugins>
<target-component>org.exoplatform.portal.config.UserPortalConfigService</target-component>
<component-plugin>
<name>new.portal.config.user.listener</name>
<set-method>deleteListenerElements</set-method>
<type>org.exoplatform.portal.config.NewPortalConfigListener</type>
<description>this listener delete some predefined portal and templates
configuration</description>
<init-params>
<object-param>
<name>site.templates.location</name>
<description>description</description>
<object type="org.exoplatform.portal.config.SiteConfigTemplates">
<field name="portalTemplates">
<collection type="java.util.HashSet">
<value>
<string>basic</string>
</value>
<value>
<string>classic</string>
</value>
</collection>
</field>
</object>
</object-param>
<object-param>
<name>portal.configuration</name>
<description>description</description>
<object type="org.exoplatform.portal.config.NewPortalConfig">
<field name="predefinedOwner">
<collection type="java.util.HashSet">
<value><string>classic</string></value>
</collection>
</field>
<field
name="ownerType"><string>portal</string></field>
</object>
</object-param>
</init-params>
</component-plugin>
</external-component-plugins>
{code}
It's the same as we add portals and templates configurations, but with a different
*set-method* = *deleteListenerElements*
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira