2.3.3.1. Delete Portals Definition by Configuration

In some cases, some portal definitions are defined but not used any more. If you want to delete them, you can add some configurations to portal.war/WEB-INF/conf/portal/portal-configuration.xml.

To delete a portal definition or a portal template definition, you need to define a component plug-in as the example below:

<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>
         
Copyright ©2012. All rights reserved. eXo Platform SAS