Author: nfilotto
Date: 2010-09-22 13:28:19 -0400 (Wed, 22 Sep 2010)
New Revision: 3177
Modified:
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/definition/PortalContainerConfig.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestPortalContainer.java
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/definition/TestPortalContainerConfig.java
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/definition/portal-container-config-with-default-values-and-with-portal-def-with-default-portal-def.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/definition/portal-container-config-with-default-values-and-with-portal-def.xml
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/definition/portal-container-config-with-default-values-and-with-portal-def2.xml
Log:
EXOJCR-974: Apply changes for JCR-1.12.3-CP01 and adapt it to remain compatible with
EXOJCR-842
Modified:
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/definition/PortalContainerConfig.java
===================================================================
---
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/definition/PortalContainerConfig.java 2010-09-22
11:37:48 UTC (rev 3176)
+++
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/definition/PortalContainerConfig.java 2010-09-22
17:28:19 UTC (rev 3177)
@@ -41,7 +41,6 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -109,9 +108,9 @@
private volatile boolean initialized;
/**
- * The set of all the portal containers
+ * The list of all the portal containers
*/
- private Set<String> portalContainerNames = Collections.unmodifiableSet(new
HashSet<String>());
+ private List<String> portalContainerNames = Collections.unmodifiableList(new
ArrayList<String>());
/**
* The set of all the portal containers that have been disabled
@@ -423,12 +422,12 @@
*/
public synchronized void registerPortalContainerName(String name)
{
- if (!portalContainerNames.contains(name))
+ if (!portalContainerNames.contains(name) &&
!portalContainerNamesDisabled.contains(name))
{
- final Set<String> lPortalContainerNames = new
LinkedHashSet<String>(portalContainerNames.size() + 1);
+ final List<String> lPortalContainerNames = new
ArrayList<String>(portalContainerNames.size() + 1);
lPortalContainerNames.add(name);
lPortalContainerNames.addAll(portalContainerNames);
- this.portalContainerNames = Collections.unmodifiableSet(lPortalContainerNames);
+ this.portalContainerNames =
Collections.unmodifiableList(lPortalContainerNames);
}
}
@@ -440,9 +439,9 @@
{
if (portalContainerNames.contains(name))
{
- final Set<String> lPortalContainerNames = new
LinkedHashSet<String>(portalContainerNames);
+ final List<String> lPortalContainerNames = new
ArrayList<String>(portalContainerNames);
lPortalContainerNames.remove(name);
- this.portalContainerNames = Collections.unmodifiableSet(lPortalContainerNames);
+ this.portalContainerNames =
Collections.unmodifiableList(lPortalContainerNames);
if (hasDefinition())
{
// The new behavior is expected
@@ -490,7 +489,13 @@
// The given context is a portal container
return Collections.singletonList(contextName);
}
- return Collections.emptyList();
+ else if (portalContainerNamesDisabled.contains(contextName))
+ {
+ // The given context name is a context name of a disabled portal container
+ return Collections.emptyList();
+ }
+ // By default we scope it to all the portal containers
+ return portalContainerNames;
}
return result;
}
@@ -521,12 +526,18 @@
if (result == null || result.isEmpty())
{
// This context has not been added as dependency of any portal containers
+ if (portalContainerNamesDisabled.contains(contextName))
+ {
+ // The given context name is a context name of a disabled portal container
+ return null;
+ }
if (PropertyManager.isDevelopping())
{
- log.info("The context '" + contextName + "' has not
been added as " +
+ log.debug("The context '" + contextName + "' has not
been added as " +
"dependency of any portal containers");
}
- return null;
+ // by default we will return the default portal container
+ return defaultDefinition.getName();
}
return result.get(0);
}
@@ -1086,7 +1097,13 @@
*/
private void initialize(Map<String, PortalContainerDefinition> mDefinitions)
{
- final Set<String> lPortalContainerNames = new
LinkedHashSet<String>(mDefinitions.size() + 1);
+ final List<String> lPortalContainerNames = new
ArrayList<String>(mDefinitions.size() + 1);
+ boolean isDefaultPortalDisabled =
isPortalContainerNameDisabled(defaultDefinition.getName());
+ if (mDefinitions.isEmpty() || !isDefaultPortalDisabled)
+ {
+ // Add the default portal container name if not disabled
+ lPortalContainerNames.add(defaultDefinition.getName());
+ }
final Map<String, List<String>> mScopes = new HashMap<String,
List<String>>();
boolean first = true;
for (Map.Entry<String, PortalContainerDefinition> entry :
mDefinitions.entrySet())
@@ -1100,24 +1117,27 @@
continue;
}
boolean hasChanged = false;
- lPortalContainerNames.add(name);
+ if (!lPortalContainerNames.contains(name))
+ {
+ lPortalContainerNames.add(name);
+ }
if (first)
{
first = false;
// Initialize the main fields thanks to the data found in the first portal
container
- if (defaultDefinition.getName() == DEFAULT_PORTAL_CONTAINER_NAME)
+ if (defaultDefinition.getName() == DEFAULT_PORTAL_CONTAINER_NAME ||
isDefaultPortalDisabled)
{
defaultDefinition.setName(name);
hasChanged = true;
}
- if (defaultDefinition.getRestContextName() == DEFAULT_REST_CONTEXT_NAME
+ if ((defaultDefinition.getRestContextName() == DEFAULT_REST_CONTEXT_NAME ||
isDefaultPortalDisabled)
&& definition.getRestContextName() != null &&
definition.getRestContextName().trim().length() > 0)
{
defaultDefinition.setRestContextName(definition.getRestContextName().trim());
hasChanged = true;
}
- if (defaultDefinition.getRealmName() == DEFAULT_REALM_NAME &&
definition.getRealmName() != null
- && definition.getRealmName().trim().length() > 0)
+ if ((defaultDefinition.getRealmName() == DEFAULT_REALM_NAME ||
isDefaultPortalDisabled)
+ && definition.getRealmName() != null &&
definition.getRealmName().trim().length() > 0)
{
defaultDefinition.setRealmName(definition.getRealmName().trim());
hasChanged = true;
@@ -1132,10 +1152,8 @@
}
initializeSettings(definition, true);
}
- if (mDefinitions.isEmpty())
+ if (!mDefinitions.containsKey(defaultDefinition.getName()))
{
- // Add the default portal container name
- lPortalContainerNames.add(defaultDefinition.getName());
// Apply the changes corresponding to the default definition
applyChanges(defaultDefinition);
initializeSettings(defaultDefinition, false);
@@ -1145,7 +1163,7 @@
// dependencies have been defined
registerDependencies(defaultDefinition, mScopes);
}
- if (!portalContainerNamesDisabled.isEmpty())
+ if (mDefinitions.isEmpty() && !portalContainerNamesDisabled.isEmpty())
{
if (PropertyManager.isDevelopping())
{
@@ -1156,7 +1174,7 @@
portalContainerNamesDisabled = Collections.unmodifiableSet(new
HashSet<String>());
}
}
- this.portalContainerNames = Collections.unmodifiableSet(lPortalContainerNames);
+ this.portalContainerNames = Collections.unmodifiableList(lPortalContainerNames);
this.scopes = Collections.unmodifiableMap(mScopes);
// clear the changes
changes.clear();
Modified:
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestPortalContainer.java
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestPortalContainer.java 2010-09-22
11:37:48 UTC (rev 3176)
+++
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/TestPortalContainer.java 2010-09-22
17:28:19 UTC (rev 3177)
@@ -27,7 +27,7 @@
* Created by The eXo Platform SAS
* Author : Nicolas Filotto
* nicolas.filotto(a)exoplatform.com
- * 18 f�vr. 2010
+ * 18 fホvr. 2010
*/
public class TestPortalContainer extends AbstractTestContainer
{
@@ -43,7 +43,7 @@
assertEquals("myRest", portal.getRestContextName());
assertEquals("my-exo-domain", portal.getRealmName());
- assertFalse(PortalContainer.isPortalContainerName("myPortal"));
+ assertTrue(PortalContainer.isPortalContainerName("myPortal"));
assertTrue(PortalContainer.isPortalContainerName("portal"));
assertFalse(PortalContainer.isPortalContainerName("foo"));
@@ -73,7 +73,7 @@
assertEquals("myRest",
PortalContainer.getRestContextName("foo"));
assertEquals("my-exo-domain",
PortalContainer.getRealmName("foo"));
- assertFalse(PortalContainer.isPortalContainerName("myPortal"));
+ assertTrue(PortalContainer.isPortalContainerName("myPortal"));
assertTrue(PortalContainer.isPortalContainerName("portal"));
assertFalse(PortalContainer.isPortalContainerName("foo"));
@@ -84,7 +84,7 @@
assertEquals("myRest", PortalContainer.getCurrentRestContextName());
assertEquals("my-exo-domain", PortalContainer.getCurrentRealmName());
- assertFalse(PortalContainer.isPortalContainerName("myPortal"));
+ assertTrue(PortalContainer.isPortalContainerName("myPortal"));
assertTrue(PortalContainer.isPortalContainerName("portal"));
assertFalse(PortalContainer.isPortalContainerName("foo"));
}
Modified:
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/definition/TestPortalContainerConfig.java
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/definition/TestPortalContainerConfig.java 2010-09-22
11:37:48 UTC (rev 3176)
+++
kernel/trunk/exo.kernel.container/src/test/java/org/exoplatform/container/definition/TestPortalContainerConfig.java 2010-09-22
17:28:19 UTC (rev 3177)
@@ -30,7 +30,7 @@
* Created by The eXo Platform SAS
* Author : Nicolas Filotto
* nicolas.filotto(a)exoplatform.com
- * 18 f�vr. 2010
+ * 18 fホvr. 2010
*/
public class TestPortalContainerConfig extends AbstractTestContainer
{
@@ -214,7 +214,6 @@
assertFalse(config.isPortalContainerName("myPortal"));
assertFalse(config.isPortalContainerName("myPortal-pcdef"));
assertTrue(config.isPortalContainerName(PortalContainerConfig.DEFAULT_PORTAL_CONTAINER_NAME));
-
// Needed for backward compatibility
assertTrue(config.isScopeValid(PortalContainerConfig.DEFAULT_PORTAL_CONTAINER_NAME,
"foo"));
assertFalse(config.isScopeValid("foo", "foo"));
@@ -296,14 +295,18 @@
assertNull(config.getDependencies("myPortal"));
assertNull(config.getDependencies("myPortal-pcdef"));
names = config.getPortalContainerNames("foo");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(2, names.size());
+ assertTrue(names.contains("myPortal"));
+ assertTrue(names.contains("myPortal-pcdef"));
names = config.getPortalContainerNames("myPortal");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals("myPortal", names.get(0));
names = config.getPortalContainerNames("myPortal-pcdef");
assertTrue(names != null && !names.isEmpty());
assertEquals("myPortal-pcdef", names.get(0));
- assertNull(config.getPortalContainerName("foo"));
- assertNull(config.getPortalContainerName("myPortal"));
+ assertEquals("myPortal",
config.getPortalContainerName("foo"));
+ assertEquals("myPortal",
config.getPortalContainerName("myPortal"));
assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal-pcdef"));
assertEquals("myRest", config.getRestContextName("foo"));
assertEquals("myRest", config.getRestContextName("myPortal"));
@@ -312,23 +315,75 @@
assertEquals("my-exo-domain",
config.getRealmName("myPortal"));
assertEquals("my-exo-domain-pcdef",
config.getRealmName("myPortal-pcdef"));
assertFalse(config.isPortalContainerName("foo"));
- assertFalse(config.isPortalContainerName("myPortal"));
+ assertTrue(config.isPortalContainerName("myPortal"));
assertTrue(config.isPortalContainerName("myPortal-pcdef"));
// Needed for backward compatibility
assertFalse(config.isScopeValid("foo", "foo"));
- assertFalse(config.isScopeValid("myPortal", "foo"));
- assertFalse(config.isScopeValid("myPortal-pcdef", "foo"));
- assertFalse(config.isScopeValid("myPortal", "myPortal"));
+ assertTrue(config.isScopeValid("myPortal", "foo"));
+ assertTrue(config.isScopeValid("myPortal-pcdef", "foo"));
+ assertTrue(config.isScopeValid("myPortal", "myPortal"));
assertTrue(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
assertTrue(config.hasDefinition());
// Unregister the portal container
rootContainer =
createRootContainer("portal-container-config-with-default-values-and-with-portal-def.xml",
"disable-pc");
config =
(PortalContainerConfig)rootContainer.getComponentInstanceOfType(PortalContainerConfig.class);
assertNull(config.getPortalContainerName("myPortal-pcdef"));
+ assertEquals("myPortal",
config.getPortalContainerName("myPortal"));
assertFalse(config.isPortalContainerName("myPortal-pcdef"));
+ assertTrue(config.isPortalContainerName("myPortal"));
assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
+ assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal"));
+ assertFalse(config.isScopeValid("myPortal",
"myPortal-pcdef"));
+ assertTrue(config.isScopeValid("myPortal", "myPortal"));
names = config.getPortalContainerNames("myPortal-pcdef");
assertTrue(names != null && names.isEmpty());
+ names = config.getPortalContainerNames("myPortal");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal"));
+ // Unregister the default portal container
+ rootContainer =
createRootContainer("portal-container-config-with-default-values-and-with-portal-def.xml",
"disable-pc2");
+ config =
(PortalContainerConfig)rootContainer.getComponentInstanceOfType(PortalContainerConfig.class);
+ assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal-pcdef"));
+ assertNull(config.getPortalContainerName("myPortal"));
+ assertTrue(config.isPortalContainerName("myPortal-pcdef"));
+ assertFalse(config.isPortalContainerName("myPortal"));
+ assertTrue(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
+ assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal"));
+ assertFalse(config.isScopeValid("myPortal",
"myPortal-pcdef"));
+ assertFalse(config.isScopeValid("myPortal", "myPortal"));
+ names = config.getPortalContainerNames("myPortal-pcdef");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-pcdef"));
+ names = config.getPortalContainerNames("myPortal");
+ assertTrue(names != null && names.isEmpty());
+ config.disablePortalContainer("myPortal-pcdef");
+ assertNull(config.getPortalContainerName("myPortal-pcdef"));
+ assertNull(config.getPortalContainerName("myPortal"));
+ assertFalse(config.isPortalContainerName("myPortal-pcdef"));
+ assertFalse(config.isPortalContainerName("myPortal"));
+ assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
+ assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal"));
+ assertFalse(config.isScopeValid("myPortal",
"myPortal-pcdef"));
+ assertFalse(config.isScopeValid("myPortal", "myPortal"));
+ names = config.getPortalContainerNames("myPortal-pcdef");
+ assertTrue(names != null && names.isEmpty());
+ names = config.getPortalContainerNames("myPortal");
+ assertTrue(names != null && names.isEmpty());
+ config.registerPortalContainerName("myPortal-pcdef");
+ assertNull(config.getPortalContainerName("myPortal-pcdef"));
+ assertNull(config.getPortalContainerName("myPortal"));
+ assertFalse(config.isPortalContainerName("myPortal-pcdef"));
+ assertFalse(config.isPortalContainerName("myPortal"));
+ assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
+ assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal"));
+ assertFalse(config.isScopeValid("myPortal",
"myPortal-pcdef"));
+ assertFalse(config.isScopeValid("myPortal", "myPortal"));
+ names = config.getPortalContainerNames("myPortal-pcdef");
+ assertTrue(names != null && names.isEmpty());
+ names = config.getPortalContainerNames("myPortal");
+ assertTrue(names != null && names.isEmpty());
// Without dependencies and with no portal container name
rootContainer =
createRootContainer("portal-container-config-with-default-values-and-with-empty-portal-def.xml");
@@ -374,14 +429,18 @@
assertNull(config.getDependencies("myPortal"));
assertNull(config.getDependencies("myPortal-pcdef"));
names = config.getPortalContainerNames("foo");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(2, names.size());
+ assertTrue(names.contains("myPortal"));
+ assertTrue(names.contains("myPortal-pcdef"));
names = config.getPortalContainerNames("myPortal");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals("myPortal", names.get(0));
names = config.getPortalContainerNames("myPortal-pcdef");
assertTrue(names != null && !names.isEmpty());
assertEquals("myPortal-pcdef", names.get(0));
- assertNull(config.getPortalContainerName("foo"));
- assertNull(config.getPortalContainerName("myPortal"));
+ assertEquals("myPortal",
config.getPortalContainerName("foo"));
+ assertEquals("myPortal",
config.getPortalContainerName("myPortal"));
assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal-pcdef"));
assertEquals("myRest", config.getRestContextName("foo"));
assertEquals("myRest", config.getRestContextName("myPortal"));
@@ -390,13 +449,13 @@
assertEquals("my-exo-domain",
config.getRealmName("myPortal"));
assertEquals("my-exo-domain",
config.getRealmName("myPortal-pcdef"));
assertFalse(config.isPortalContainerName("foo"));
- assertFalse(config.isPortalContainerName("myPortal"));
+ assertTrue(config.isPortalContainerName("myPortal"));
assertTrue(config.isPortalContainerName("myPortal-pcdef"));
// Needed for backward compatibility
assertFalse(config.isScopeValid("foo", "foo"));
- assertFalse(config.isScopeValid("myPortal", "foo"));
- assertFalse(config.isScopeValid("myPortal-pcdef", "foo"));
- assertFalse(config.isScopeValid("myPortal", "myPortal"));
+ assertTrue(config.isScopeValid("myPortal", "foo"));
+ assertTrue(config.isScopeValid("myPortal-pcdef", "foo"));
+ assertTrue(config.isScopeValid("myPortal", "myPortal"));
assertTrue(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
assertTrue(config.hasDefinition());
// Unregister the portal container
@@ -420,17 +479,24 @@
assertTrue(deps != null && deps.size() == 1 &&
deps.contains("fooX"));
names = config.getPortalContainerNames("fooX");
assertTrue(names != null && !names.isEmpty());
- assertEquals(1, names.size());
+ assertEquals(2, names.size());
+ assertTrue(names.contains("myPortal-dpcdef"));
assertTrue(names.contains("myPortal-pcdef"));
names = config.getPortalContainerNames("foo");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(2, names.size());
+ assertTrue(names.contains("myPortal-dpcdef"));
+ assertTrue(names.contains("myPortal-pcdef"));
names = config.getPortalContainerNames("myPortal");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(2, names.size());
+ assertTrue(names.contains("myPortal-dpcdef"));
+ assertTrue(names.contains("myPortal-pcdef"));
names = config.getPortalContainerNames("myPortal-pcdef");
assertTrue(names != null && !names.isEmpty());
assertEquals("myPortal-pcdef", names.get(0));
- assertNull(config.getPortalContainerName("foo"));
- assertNull(config.getPortalContainerName("myPortal"));
+ assertEquals("myPortal-dpcdef",
config.getPortalContainerName("foo"));
+ assertEquals("myPortal-dpcdef",
config.getPortalContainerName("myPortal"));
assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal-pcdef"));
assertEquals("myRest-dpcdef",
config.getRestContextName("foo"));
assertEquals("myRest-dpcdef",
config.getRestContextName("myPortal"));
@@ -440,23 +506,68 @@
assertEquals("my-exo-domain-pcdef",
config.getRealmName("myPortal-pcdef"));
assertFalse(config.isPortalContainerName("foo"));
assertFalse(config.isPortalContainerName("myPortal"));
+ assertTrue(config.isPortalContainerName("myPortal-dpcdef"));
assertTrue(config.isPortalContainerName("myPortal-pcdef"));
assertFalse(config.isScopeValid("foo", "fooX"));
assertFalse(config.isScopeValid("myPortal", "fooX"));
+ assertTrue(config.isScopeValid("myPortal-dpcdef", "fooX"));
assertTrue(config.isScopeValid("myPortal-pcdef", "fooX"));
assertTrue(config.hasDefinition());
// Unregister the portal container
rootContainer =
createRootContainer("portal-container-config-with-default-values-and-with-portal-def-with-default-portal-def.xml",
"disable-pc");
config =
(PortalContainerConfig)rootContainer.getComponentInstanceOfType(PortalContainerConfig.class);
+ assertEquals("myPortal-dpcdef",
config.getPortalContainerName("foo"));
+ assertEquals("myPortal-dpcdef",
config.getPortalContainerName("myPortal"));
+ assertEquals("myPortal-dpcdef",
config.getPortalContainerName("myPortal-dpcdef"));
assertNull(config.getPortalContainerName("myPortal-pcdef"));
+ assertFalse(config.isPortalContainerName("foo"));
+ assertFalse(config.isPortalContainerName("myPortal"));
+ assertTrue(config.isPortalContainerName("myPortal-dpcdef"));
assertFalse(config.isPortalContainerName("myPortal-pcdef"));
+ assertFalse(config.isScopeValid("foo", "fooX"));
+ assertFalse(config.isScopeValid("myPortal", "fooX"));
+ assertTrue(config.isScopeValid("myPortal-dpcdef", "fooX"));
+ assertFalse(config.isScopeValid("myPortal-pcdef", "fooX"));
+ assertTrue(config.isScopeValid("myPortal-dpcdef",
"myPortal-dpcdef"));
assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
names = config.getPortalContainerNames("myPortal-pcdef");
assertTrue(names != null && names.isEmpty());
- assertFalse(config.isScopeValid("myPortal-pcdef", "fooX"));
+ names = config.getPortalContainerNames("myPortal-dpcdef");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-dpcdef"));
names = config.getPortalContainerNames("fooX");
- assertTrue(names != null && names.isEmpty());
-
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-dpcdef"));
+ // Unregister the default portal container
+ rootContainer =
createRootContainer("portal-container-config-with-default-values-and-with-portal-def-with-default-portal-def.xml",
"disable-pc2");
+ config =
(PortalContainerConfig)rootContainer.getComponentInstanceOfType(PortalContainerConfig.class);
+ assertEquals("myPortal-pcdef",
config.getPortalContainerName("foo"));
+ assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal"));
+ assertNull(config.getPortalContainerName("myPortal-dpcdef"));
+ assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal-pcdef"));
+ assertFalse(config.isPortalContainerName("foo"));
+ assertFalse(config.isPortalContainerName("myPortal"));
+ assertFalse(config.isPortalContainerName("myPortal-dpcdef"));
+ assertTrue(config.isPortalContainerName("myPortal-pcdef"));
+ assertFalse(config.isScopeValid("foo", "fooX"));
+ assertFalse(config.isScopeValid("myPortal", "fooX"));
+ assertFalse(config.isScopeValid("myPortal-dpcdef", "fooX"));
+ assertTrue(config.isScopeValid("myPortal-pcdef", "fooX"));
+ assertFalse(config.isScopeValid("myPortal-dpcdef",
"myPortal-dpcdef"));
+ assertTrue(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
+ names = config.getPortalContainerNames("myPortal-pcdef");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-pcdef"));
+ names = config.getPortalContainerNames("myPortal-dpcdef");
+ assertTrue(names != null && names.isEmpty());
+ names = config.getPortalContainerNames("fooX");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-pcdef"));
+
profiles =
new String[]{"AddDependencies",
"AddDependenciesBefore-No-Target",
"AddDependenciesBefore-With-Fake-Target",
"AddDependenciesBefore-With-Target",
"AddDependenciesAfter-No-Target",
@@ -488,19 +599,24 @@
}
names = config.getPortalContainerNames("fooX");
assertTrue(names != null && !names.isEmpty());
- assertEquals(1, names.size());
+ assertEquals(2, names.size());
+ assertTrue(names.contains("myPortal-dpcdef"));
assertTrue(names.contains("myPortal-pcdef"));
names = config.getPortalContainerNames("foo");
assertTrue(names != null && !names.isEmpty());
- assertEquals(1, names.size());
- assertEquals("myPortal-pcdef", names.get(0));
+ assertEquals(2, names.size());
+ assertTrue(names.contains("myPortal-dpcdef"));
+ assertTrue(names.contains("myPortal-pcdef"));
names = config.getPortalContainerNames("myPortal");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(2, names.size());
+ assertTrue(names.contains("myPortal-dpcdef"));
+ assertTrue(names.contains("myPortal-pcdef"));
names = config.getPortalContainerNames("myPortal-pcdef");
assertTrue(names != null && !names.isEmpty());
assertEquals("myPortal-pcdef", names.get(0));
assertEquals("myPortal-pcdef",
config.getPortalContainerName("foo"));
- assertNull(config.getPortalContainerName("myPortal"));
+ assertEquals("myPortal-dpcdef",
config.getPortalContainerName("myPortal"));
assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal-pcdef"));
assertEquals("myRest-dpcdef",
config.getRestContextName("foo"));
assertEquals("myRest-dpcdef",
config.getRestContextName("myPortal"));
@@ -519,18 +635,68 @@
rootContainer = createRootContainer(
"portal-container-config-with-default-values-and-with-portal-def-with-default-portal-def.xml",
"with-profiles", profile, "disable-pc");
- config =
(PortalContainerConfig)rootContainer.getComponentInstanceOfType(PortalContainerConfig.class);
- assertNull(config.getPortalContainerName("foo"));
+ config =
(PortalContainerConfig)rootContainer.getComponentInstanceOfType(PortalContainerConfig.class);
+ assertEquals("myPortal-dpcdef",
config.getPortalContainerName("foo"));
+ assertEquals("myPortal-dpcdef",
config.getPortalContainerName("myPortal"));
+ assertEquals("myPortal-dpcdef",
config.getPortalContainerName("myPortal-dpcdef"));
assertNull(config.getPortalContainerName("myPortal-pcdef"));
+ assertFalse(config.isPortalContainerName("foo"));
+ assertFalse(config.isPortalContainerName("myPortal"));
+ assertTrue(config.isPortalContainerName("myPortal-dpcdef"));
assertFalse(config.isPortalContainerName("myPortal-pcdef"));
+ assertFalse(config.isScopeValid("foo", "fooX"));
+ assertFalse(config.isScopeValid("myPortal", "fooX"));
+ assertTrue(config.isScopeValid("myPortal-dpcdef", "fooX"));
+ assertFalse(config.isScopeValid("myPortal-pcdef", "fooX"));
+ assertTrue(config.isScopeValid("myPortal-dpcdef",
"myPortal-dpcdef"));
assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
names = config.getPortalContainerNames("myPortal-pcdef");
assertTrue(names != null && names.isEmpty());
- assertFalse(config.isScopeValid("myPortal-pcdef", "fooX"));
+ names = config.getPortalContainerNames("myPortal-dpcdef");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-dpcdef"));
names = config.getPortalContainerNames("foo");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-dpcdef"));
names = config.getPortalContainerNames("fooX");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-dpcdef"));
+ // Unregister the default portal container
+ rootContainer = createRootContainer(
+
"portal-container-config-with-default-values-and-with-portal-def-with-default-portal-def.xml",
+ "with-profiles", profile, "disable-pc2");
+ config =
(PortalContainerConfig)rootContainer.getComponentInstanceOfType(PortalContainerConfig.class);
+ assertEquals("myPortal-pcdef",
config.getPortalContainerName("foo"));
+ assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal"));
+ assertNull(config.getPortalContainerName("myPortal-dpcdef"));
+ assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal-pcdef"));
+ assertFalse(config.isPortalContainerName("foo"));
+ assertFalse(config.isPortalContainerName("myPortal"));
+ assertFalse(config.isPortalContainerName("myPortal-dpcdef"));
+ assertTrue(config.isPortalContainerName("myPortal-pcdef"));
+ assertFalse(config.isScopeValid("foo", "fooX"));
+ assertFalse(config.isScopeValid("myPortal", "fooX"));
+ assertFalse(config.isScopeValid("myPortal-dpcdef",
"fooX"));
+ assertTrue(config.isScopeValid("myPortal-pcdef", "fooX"));
+ assertFalse(config.isScopeValid("myPortal-dpcdef",
"myPortal-dpcdef"));
+ assertTrue(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
+ names = config.getPortalContainerNames("myPortal-pcdef");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-pcdef"));
+ names = config.getPortalContainerNames("myPortal-dpcdef");
+ assertTrue(names != null && names.isEmpty());
+ names = config.getPortalContainerNames("foo");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-pcdef"));
+ names = config.getPortalContainerNames("fooX");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-pcdef"));
}
// With dependencies
@@ -544,12 +710,13 @@
assertTrue(names != null && !names.isEmpty());
assertEquals("myPortal-pcdef", names.get(0));
names = config.getPortalContainerNames("myPortal");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals("myPortal", names.get(0));
names = config.getPortalContainerNames("myPortal-pcdef");
assertTrue(names != null && !names.isEmpty());
assertEquals("myPortal-pcdef", names.get(0));
assertEquals("myPortal-pcdef",
config.getPortalContainerName("foo"));
- assertNull(config.getPortalContainerName("myPortal"));
+ assertEquals("myPortal",
config.getPortalContainerName("myPortal"));
assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal-pcdef"));
assertEquals("myRest", config.getRestContextName("foo"));
assertEquals("myRest", config.getRestContextName("myPortal"));
@@ -558,27 +725,65 @@
assertEquals("my-exo-domain",
config.getRealmName("myPortal"));
assertEquals("my-exo-domain-pcdef",
config.getRealmName("myPortal-pcdef"));
assertFalse(config.isPortalContainerName("foo"));
- assertFalse(config.isPortalContainerName("myPortal"));
+ assertTrue(config.isPortalContainerName("myPortal"));
assertTrue(config.isPortalContainerName("myPortal-pcdef"));
assertFalse(config.isScopeValid("foo", "foo"));
assertFalse(config.isScopeValid("myPortal", "foo"));
assertTrue(config.isScopeValid("myPortal-pcdef", "foo"));
assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal"));
- assertFalse(config.isScopeValid("myPortal-pcdef", "fooY"));
+ assertTrue(config.isScopeValid("myPortal-pcdef", "fooY"));
assertTrue(config.hasDefinition());
// Unregister the portal container
rootContainer =
createRootContainer("portal-container-config-with-default-values-and-with-portal-def2.xml",
"disable-pc");
config =
(PortalContainerConfig)rootContainer.getComponentInstanceOfType(PortalContainerConfig.class);
- assertNull(config.getPortalContainerName("foo"));
+ assertEquals("myPortal",
config.getPortalContainerName("foo"));
+ assertEquals("myPortal",
config.getPortalContainerName("myPortal"));
assertNull(config.getPortalContainerName("myPortal-pcdef"));
+ assertTrue(config.isPortalContainerName("myPortal"));
assertFalse(config.isPortalContainerName("myPortal-pcdef"));
assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
+ assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal"));
+ assertFalse(config.isScopeValid("myPortal-pcdef", "foo"));
+ assertFalse(config.isScopeValid("myPortal",
"myPortal-pcdef"));
+ assertTrue(config.isScopeValid("myPortal", "myPortal"));
+ assertTrue(config.isScopeValid("myPortal", "foo"));
names = config.getPortalContainerNames("myPortal-pcdef");
assertTrue(names != null && names.isEmpty());
- assertFalse(config.isScopeValid("myPortal-pcdef", "foo"));
+ names = config.getPortalContainerNames("myPortal");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal"));
names = config.getPortalContainerNames("foo");
- assertTrue(names != null && names.isEmpty());
-
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal"));
+ // Unregister the default portal container
+ rootContainer =
createRootContainer("portal-container-config-with-default-values-and-with-portal-def2.xml",
"disable-pc2");
+ config =
(PortalContainerConfig)rootContainer.getComponentInstanceOfType(PortalContainerConfig.class);
+ assertEquals("myPortal-pcdef",
config.getPortalContainerName("foo"));
+ assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal"));
+ assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal-pcdef"));
+ assertFalse(config.isPortalContainerName("myPortal"));
+ assertTrue(config.isPortalContainerName("myPortal-pcdef"));
+ assertTrue(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
+ assertTrue(config.isScopeValid("myPortal-pcdef", "myPortal"));
+ assertTrue(config.isScopeValid("myPortal-pcdef", "foo"));
+ assertFalse(config.isScopeValid("myPortal",
"myPortal-pcdef"));
+ assertFalse(config.isScopeValid("myPortal", "myPortal"));
+ assertFalse(config.isScopeValid("myPortal", "foo"));
+ names = config.getPortalContainerNames("myPortal-pcdef");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-pcdef"));
+ names = config.getPortalContainerNames("myPortal");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-pcdef"));
+ names = config.getPortalContainerNames("foo");
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal-pcdef"));
+
for (String profile : profiles)
{
rootContainer =
@@ -612,12 +817,13 @@
assertTrue(names != null && !names.isEmpty());
assertEquals("myPortal-pcdef", names.get(0));
names = config.getPortalContainerNames("myPortal");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals("myPortal", names.get(0));
names = config.getPortalContainerNames("myPortal-pcdef");
assertTrue(names != null && !names.isEmpty());
assertEquals("myPortal-pcdef", names.get(0));
assertEquals("myPortal-pcdef",
config.getPortalContainerName("foo"));
- assertNull(config.getPortalContainerName("myPortal"));
+ assertEquals("myPortal",
config.getPortalContainerName("myPortal"));
assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal-pcdef"));
assertEquals("myRest", config.getRestContextName("foo"));
assertEquals("myRest",
config.getRestContextName("myPortal"));
@@ -626,7 +832,7 @@
assertEquals("my-exo-domain",
config.getRealmName("myPortal"));
assertEquals("my-exo-domain-pcdef",
config.getRealmName("myPortal-pcdef"));
assertFalse(config.isPortalContainerName("foo"));
- assertFalse(config.isPortalContainerName("myPortal"));
+ assertTrue(config.isPortalContainerName("myPortal"));
assertTrue(config.isPortalContainerName("myPortal-pcdef"));
assertFalse(config.isScopeValid("foo", "foo"));
assertFalse(config.isScopeValid("myPortal", "foo"));
@@ -636,7 +842,7 @@
rootContainer =
createRootContainer("portal-container-config-with-default-values-and-with-portal-def2.xml",
"with-profiles", profile, "disable-pc");
config =
(PortalContainerConfig)rootContainer.getComponentInstanceOfType(PortalContainerConfig.class);
- assertNull(config.getPortalContainerName("foo"));
+ assertEquals("myPortal",
config.getPortalContainerName("foo"));
assertNull(config.getPortalContainerName("myPortal-pcdef"));
assertFalse(config.isPortalContainerName("myPortal-pcdef"));
assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
@@ -644,7 +850,9 @@
assertTrue(names != null && names.isEmpty());
assertFalse(config.isScopeValid("myPortal-pcdef", "foo"));
names = config.getPortalContainerNames("foo");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal"));
}
// With dependencies and with default portal container definition
@@ -658,18 +866,21 @@
deps = config.getDependencies("myPortal-pcdef");
assertTrue(deps != null && deps.size() == 3);
names = config.getPortalContainerNames("fooX");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertEquals("myPortal", names.get(0));
names = config.getPortalContainerNames("foo");
assertTrue(names != null && !names.isEmpty());
assertEquals(1, names.size());
assertEquals("myPortal-pcdef", names.get(0));
names = config.getPortalContainerNames("myPortal");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals("myPortal", names.get(0));
names = config.getPortalContainerNames("myPortal-pcdef");
assertTrue(names != null && !names.isEmpty());
assertEquals("myPortal-pcdef", names.get(0));
assertEquals("myPortal-pcdef",
config.getPortalContainerName("foo"));
- assertNull(config.getPortalContainerName("myPortal"));
+ assertEquals("myPortal",
config.getPortalContainerName("myPortal"));
assertEquals("myPortal-pcdef",
config.getPortalContainerName("myPortal-pcdef"));
assertEquals("myRest", config.getRestContextName("foo"));
assertEquals("myRest", config.getRestContextName("myPortal"));
@@ -678,7 +889,7 @@
assertEquals("my-exo-domain",
config.getRealmName("myPortal"));
assertEquals("my-exo-domain-pcdef",
config.getRealmName("myPortal-pcdef"));
assertFalse(config.isPortalContainerName("foo"));
- assertFalse(config.isPortalContainerName("myPortal"));
+ assertTrue(config.isPortalContainerName("myPortal"));
assertTrue(config.isPortalContainerName("myPortal-pcdef"));
assertFalse(config.isScopeValid("foo", "foo"));
assertFalse(config.isScopeValid("myPortal", "foo"));
@@ -687,7 +898,7 @@
// Unregister the portal container
rootContainer =
createRootContainer("portal-container-config-with-default-values-and-with-portal-def-with-default-portal-def2.xml",
"disable-pc");
config =
(PortalContainerConfig)rootContainer.getComponentInstanceOfType(PortalContainerConfig.class);
- assertNull(config.getPortalContainerName("foo"));
+ assertEquals("myPortal",
config.getPortalContainerName("foo"));
assertNull(config.getPortalContainerName("myPortal-pcdef"));
assertFalse(config.isPortalContainerName("myPortal-pcdef"));
assertFalse(config.isScopeValid("myPortal-pcdef",
"myPortal-pcdef"));
@@ -695,7 +906,9 @@
assertTrue(names != null && names.isEmpty());
assertFalse(config.isScopeValid("myPortal-pcdef", "foo"));
names = config.getPortalContainerNames("foo");
- assertTrue(names != null && names.isEmpty());
+ assertTrue(names != null && !names.isEmpty());
+ assertEquals(1, names.size());
+ assertTrue(names.contains("myPortal"));
}
public void testSettings()
Modified:
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/definition/portal-container-config-with-default-values-and-with-portal-def-with-default-portal-def.xml
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/definition/portal-container-config-with-default-values-and-with-portal-def-with-default-portal-def.xml 2010-09-22
11:37:48 UTC (rev 3176)
+++
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/definition/portal-container-config-with-default-values-and-with-portal-def-with-default-portal-def.xml 2010-09-22
17:28:19 UTC (rev 3177)
@@ -237,5 +237,24 @@
</values-param>
</init-params>
</component-plugin>
- </external-component-plugins>
+ </external-component-plugins>
+ <external-component-plugins>
+ <!-- The full qualified name of the PortalContainerConfig -->
+ <target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
+ <component-plugin profiles="disable-pc2">
+ <!-- The name of the plugin -->
+ <name>Disable a PortalContainer</name>
+ <!-- The name of the method to call on the PortalContainerConfig in order to
register the changes on the PortalContainerDefinitions -->
+ <set-method>registerDisablePlugin</set-method>
+ <!-- The full qualified name of the PortalContainerDefinitionDisablePlugin -->
+ <type>org.exoplatform.container.definition.PortalContainerDefinitionDisablePlugin</type>
+ <init-params>
+ <!-- The list of the name of the portal containers to disable -->
+ <values-param>
+ <name>names</name>
+ <value>myPortal-dpcdef</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
</configuration>
\ No newline at end of file
Modified:
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/definition/portal-container-config-with-default-values-and-with-portal-def.xml
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/definition/portal-container-config-with-default-values-and-with-portal-def.xml 2010-09-22
11:37:48 UTC (rev 3176)
+++
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/definition/portal-container-config-with-default-values-and-with-portal-def.xml 2010-09-22
17:28:19 UTC (rev 3177)
@@ -79,5 +79,24 @@
</values-param>
</init-params>
</component-plugin>
- </external-component-plugins>
+ </external-component-plugins>
+ <external-component-plugins>
+ <!-- The full qualified name of the PortalContainerConfig -->
+ <target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
+ <component-plugin profiles="disable-pc2">
+ <!-- The name of the plugin -->
+ <name>Disable a PortalContainer</name>
+ <!-- The name of the method to call on the PortalContainerConfig in order to
register the changes on the PortalContainerDefinitions -->
+ <set-method>registerDisablePlugin</set-method>
+ <!-- The full qualified name of the PortalContainerDefinitionDisablePlugin -->
+ <type>org.exoplatform.container.definition.PortalContainerDefinitionDisablePlugin</type>
+ <init-params>
+ <!-- The list of the name of the portal containers to disable -->
+ <values-param>
+ <name>names</name>
+ <value>myPortal</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
</configuration>
\ No newline at end of file
Modified:
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/definition/portal-container-config-with-default-values-and-with-portal-def2.xml
===================================================================
---
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/definition/portal-container-config-with-default-values-and-with-portal-def2.xml 2010-09-22
11:37:48 UTC (rev 3176)
+++
kernel/trunk/exo.kernel.container/src/test/resources/org/exoplatform/container/definition/portal-container-config-with-default-values-and-with-portal-def2.xml 2010-09-22
17:28:19 UTC (rev 3177)
@@ -68,6 +68,9 @@
<value>
<string>foo3</string>
</value>
+ <value profiles="disable-pc2">
+ <string>myPortal</string>
+ </value>
</collection>
</field>
</object>
@@ -214,5 +217,24 @@
</values-param>
</init-params>
</component-plugin>
- </external-component-plugins>
+ </external-component-plugins>
+ <external-component-plugins>
+ <!-- The full qualified name of the PortalContainerConfig -->
+ <target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
+ <component-plugin profiles="disable-pc2">
+ <!-- The name of the plugin -->
+ <name>Disable a PortalContainer</name>
+ <!-- The name of the method to call on the PortalContainerConfig in order to
register the changes on the PortalContainerDefinitions -->
+ <set-method>registerDisablePlugin</set-method>
+ <!-- The full qualified name of the PortalContainerDefinitionDisablePlugin -->
+ <type>org.exoplatform.container.definition.PortalContainerDefinitionDisablePlugin</type>
+ <init-params>
+ <!-- The list of the name of the portal containers to disable -->
+ <values-param>
+ <name>names</name>
+ <value>myPortal</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
</configuration>
\ No newline at end of file