Package org.exoplatform.container.xml

Examples of org.exoplatform.container.xml.Configuration


   @Managed
   @ManagedDescription("The configuration of the container in XML format.")
   public String getConfigurationXML()
   {
      Configuration config = getConfiguration();
      if (config == null)
      {
         log.warn("The configuration of the RootContainer could not be found");
         return null;
      }
      return config.toXML();
   }
View Full Code Here


   @Managed
   @ManagedDescription("The configuration of the container in XML format.")
   public String getConfigurationXML()
   {
      Configuration conf = getConfiguration();
      if (conf == null)
      {
         log.warn("The configuration of the PortalContainer could not be found");
         return null;
      }
      Configuration result = Configuration.merge(((ExoContainer)parent).getConfiguration(), conf);
      if (result == null)
      {
         log.warn("The configurations could not be merged");
         return null;        
      }
      return result.toXML();
   }
View Full Code Here

   @Managed
   @ManagedDescription("The configuration of the container in XML format.")
   public String getConfigurationXML()
   {
      Configuration config = getConfiguration();
      if (config == null)
      {
         log.warn("The configuration of the StandaloneContainer could not be found");
         return null;
      }
      return config.toXML();
   }
View Full Code Here

public class TestRemoveConfigProfile extends AbstractProfileTest
{

   public void testNoProfile() throws Exception
   {
      Configuration config = getConfiguration("remove-configuration.xml");
      assertEquals(1, config.getRemoveConfiguration().size());
   }
View Full Code Here

      assertEquals(1, config.getRemoveConfiguration().size());
   }

   public void testFooProfile() throws Exception
   {
      Configuration config = getConfiguration("remove-configuration.xml", "foo");
      assertEquals(2, config.getRemoveConfiguration().size());
   }
View Full Code Here

      assertEquals(2, config.getRemoveConfiguration().size());
   }

   public void testFooBarProfiles() throws Exception
   {
      Configuration config = getConfiguration("remove-configuration.xml", "foo", "bar");
      assertEquals(3, config.getRemoveConfiguration().size());
   }
View Full Code Here

   }

   private XMLCollection getConfiguredCollection(String... profiles)
      throws Exception
   {
      Configuration config = getConfiguration("collection-configuration.xml", profiles);
      Component a = config.getComponent(InitParamsHolder.class.getName());
      ObjectParameter op = a.getInitParams().getObjectParam("test.configuration");
      XMLObject o = op.getXMLObject();
      XMLField xf = o.getField("role");
      return xf.getCollection();
   }
View Full Code Here

   }

   private XMLCollection getConfiguredCollection(String... profiles)
      throws Exception
   {
      Configuration config = getConfiguration("field-configuration.xml", profiles);
      Component a = config.getComponent(InitParamsHolder.class.getName());
      ObjectParameter op = a.getInitParams().getObjectParam("test.configuration");
      XMLObject o = op.getXMLObject();
      XMLField xf = o.getField("role");
      return xf.getCollection();
   }
View Full Code Here

public class TestInitParamProfile extends AbstractProfileTest
{

   public void testNoProfile() throws Exception
   {
      Configuration config = getConfiguration("init-param-configuration.xml");
      Component component = config.getComponent("Component");
      InitParams initParams = component.getInitParams();
      ValueParam valueParam = initParams.getValueParam("param");
      assertEquals("empty", valueParam.getValue());
   }
View Full Code Here

      assertEquals("empty", valueParam.getValue());
   }

   public void testFooProfile() throws Exception
   {
      Configuration config = getConfiguration("init-param-configuration.xml", "foo");
      Component component = config.getComponent("Component");
      InitParams initParams = component.getInitParams();
      ValueParam valueParam = initParams.getValueParam("param");
      assertEquals("foo", valueParam.getValue());
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.container.xml.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.