Search in sources :

Example 31 with Configuration

use of org.exoplatform.container.xml.Configuration in project kernel by exoplatform.

the class TestContainerLifecyclePluginProfile method testFooBarProfiles.

public void testFooBarProfiles() throws Exception {
    Configuration config = getConfiguration("container-lifecycle-plugin.xml", "foo", "bar");
    assertEquals(3, config.getContainerLifecyclePlugins().size());
}
Also used : Configuration(org.exoplatform.container.xml.Configuration)

Example 32 with Configuration

use of org.exoplatform.container.xml.Configuration in project kernel by exoplatform.

the class TestContainerLifecyclePluginProfile method testNoProfile.

public void testNoProfile() throws Exception {
    Configuration config = getConfiguration("container-lifecycle-plugin.xml");
    assertEquals(1, config.getContainerLifecyclePlugins().size());
}
Also used : Configuration(org.exoplatform.container.xml.Configuration)

Example 33 with Configuration

use of org.exoplatform.container.xml.Configuration in project kernel by exoplatform.

the class TestExternalComponentPluginsProfile method testNoProfile.

public void testNoProfile() throws Exception {
    Configuration config = getConfiguration("external-component-plugins.xml");
    int size = 0;
    for (Iterator<ExternalComponentPlugins> it = config.getExternalComponentPluginsIterator(); it.hasNext(); ) {
        ExternalComponentPlugins ecp = it.next();
        assertEquals(1, ecp.getComponentPlugins().size());
        size++;
    }
    assertEquals(1, size);
}
Also used : Configuration(org.exoplatform.container.xml.Configuration) ExternalComponentPlugins(org.exoplatform.container.xml.ExternalComponentPlugins)

Example 34 with Configuration

use of org.exoplatform.container.xml.Configuration in project kernel by exoplatform.

the class TestExternalComponentPluginsProfile method testFooBarProfiles.

public void testFooBarProfiles() throws Exception {
    Configuration config = getConfiguration("external-component-plugins.xml", "foo", "bar");
    int size = 0;
    for (Iterator<ExternalComponentPlugins> it = config.getExternalComponentPluginsIterator(); it.hasNext(); ) {
        ExternalComponentPlugins ecp = it.next();
        assertEquals(3, ecp.getComponentPlugins().size());
        size++;
    }
    assertEquals(3, size);
}
Also used : Configuration(org.exoplatform.container.xml.Configuration) ExternalComponentPlugins(org.exoplatform.container.xml.ExternalComponentPlugins)

Example 35 with Configuration

use of org.exoplatform.container.xml.Configuration in project kernel by exoplatform.

the class TestField method getConfiguredCollection.

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();
}
Also used : XMLField(org.exoplatform.xml.object.XMLField) Configuration(org.exoplatform.container.xml.Configuration) ObjectParameter(org.exoplatform.container.xml.ObjectParameter) XMLObject(org.exoplatform.xml.object.XMLObject) Component(org.exoplatform.container.xml.Component)

Aggregations

Configuration (org.exoplatform.container.xml.Configuration)37 Component (org.exoplatform.container.xml.Component)9 ExternalComponentPlugins (org.exoplatform.container.xml.ExternalComponentPlugins)5 ObjectParameter (org.exoplatform.container.xml.ObjectParameter)4 InitParams (org.exoplatform.container.xml.InitParams)3 ValueParam (org.exoplatform.container.xml.ValueParam)3 IBindingFactory (org.jibx.runtime.IBindingFactory)3 IUnmarshallingContext (org.jibx.runtime.IUnmarshallingContext)3 File (java.io.File)2 IOException (java.io.IOException)2 URL (java.net.URL)2 PrivilegedActionException (java.security.PrivilegedActionException)2 InputStream (java.io.InputStream)1 StringReader (java.io.StringReader)1 StringWriter (java.io.StringWriter)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 Method (java.lang.reflect.Method)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Properties (java.util.Properties)1