Search in sources :

Example 21 with ApplicationFileBuilder

use of org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder in project mule by mulesoft.

the class ApplicationPolicyDeploymentTestCase method redeployPolicyWithSecurityManagerDefined.

@Test
public void redeployPolicyWithSecurityManagerDefined() throws Exception {
    ArtifactPluginFileBuilder simpleExtensionPlugin = createSingleExtensionPlugin();
    policyManager.registerPolicyTemplate(policyWithPluginAndResource().getArtifactFile());
    ApplicationFileBuilder applicationFileBuilder = createExtensionApplicationWithServices(APP_WITH_SIMPLE_EXTENSION_CONFIG, simpleExtensionPlugin);
    addPackedAppFromBuilder(applicationFileBuilder);
    startDeployment();
    assertApplicationDeploymentSuccess(applicationDeploymentListener, applicationFileBuilder.getId());
    PolicyParametrization policy = new PolicyParametrization(BAR_POLICY_ID, s -> true, 1, emptyMap(), getResourceFile("/policy-using-security-manager.xml"), emptyList());
    policyManager.addPolicy(applicationFileBuilder.getId(), policyIncludingPluginFileBuilder.getArtifactId(), policy);
    executeApplicationFlow("main");
    assertThat(invocationCount, equalTo(1));
    policyManager.removePolicy(applicationFileBuilder.getId(), BAR_POLICY_ID);
    policyManager.addPolicy(applicationFileBuilder.getId(), policyIncludingPluginFileBuilder.getArtifactId(), policy);
    executeApplicationFlow("main");
    assertThat(invocationCount, equalTo(2));
}
Also used : ArtifactPluginFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ArtifactPluginFileBuilder) ApplicationFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder) PolicyParametrization(org.mule.runtime.core.api.policy.PolicyParametrization) Test(org.junit.Test)

Example 22 with ApplicationFileBuilder

use of org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder in project mule by mulesoft.

the class ApplicationPolicyDeploymentTestCase method appliesMultipleApplicationPolicies.

@Test
public void appliesMultipleApplicationPolicies() throws Exception {
    policyManager.registerPolicyTemplate(fooPolicyFileBuilder.getArtifactFile());
    policyManager.registerPolicyTemplate(barPolicyFileBuilder.getArtifactFile());
    ApplicationFileBuilder applicationFileBuilder = createExtensionApplicationWithServices(APP_WITH_EXTENSION_PLUGIN_CONFIG, helloExtensionV1Plugin);
    addPackedAppFromBuilder(applicationFileBuilder);
    startDeployment();
    assertApplicationDeploymentSuccess(applicationDeploymentListener, applicationFileBuilder.getId());
    policyManager.addPolicy(applicationFileBuilder.getId(), fooPolicyFileBuilder.getArtifactId(), new PolicyParametrization(FOO_POLICY_ID, pointparameters -> true, 1, singletonMap(POLICY_PROPERTY_KEY, POLICY_PROPERTY_VALUE), getResourceFile("/fooPolicy.xml"), emptyList()));
    policyManager.addPolicy(applicationFileBuilder.getId(), barPolicyFileBuilder.getArtifactId(), new PolicyParametrization(BAR_POLICY_ID, poinparameters -> true, 2, emptyMap(), getResourceFile("/barPolicy.xml"), emptyList()));
    executeApplicationFlow("main");
    assertThat(invocationCount, equalTo(2));
}
Also used : URISyntaxException(java.net.URISyntaxException) ArtifactPluginFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ArtifactPluginFileBuilder) Matchers.hasItems(org.hamcrest.Matchers.hasItems) PollingProber(org.mule.tck.probe.PollingProber) Collections.singletonList(java.util.Collections.singletonList) BEFORE_NEXT(org.mule.runtime.api.notification.PolicyNotification.BEFORE_NEXT) PROCESS_END(org.mule.runtime.api.notification.PolicyNotification.PROCESS_END) TestPolicyProcessor.policyParametrization(org.mule.runtime.module.deployment.internal.TestPolicyProcessor.policyParametrization) Arrays.asList(java.util.Arrays.asList) Is.is(org.hamcrest.core.Is.is) AbstractSecurityProvider(org.mule.runtime.core.api.security.AbstractSecurityProvider) Assert.fail(org.junit.Assert.fail) PolicyFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.PolicyFileBuilder) JUnitProbe(org.mule.tck.probe.JUnitProbe) AFTER_NEXT(org.mule.runtime.api.notification.PolicyNotification.AFTER_NEXT) PolicyPointcut(org.mule.runtime.core.api.policy.PolicyPointcut) MulePluginModel(org.mule.runtime.api.deployment.meta.MulePluginModel) EXPORTED_RESOURCE_PROPERTY(org.mule.runtime.container.internal.ClasspathModuleDiscoverer.EXPORTED_RESOURCE_PROPERTY) MULE_LOADER_ID(org.mule.runtime.deployment.model.api.artifact.ArtifactDescriptorConstants.MULE_LOADER_ID) Collections.emptyList(java.util.Collections.emptyList) PolicyNotification(org.mule.runtime.api.notification.PolicyNotification) PolicyNotificationListener(org.mule.runtime.api.notification.PolicyNotificationListener) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) ApplicationFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder) CompilerUtils(org.mule.tck.util.CompilerUtils) PolicyRegistrationException(org.mule.runtime.deployment.model.api.policy.PolicyRegistrationException) JAVA_LOADER_ID(org.mule.runtime.module.extension.api.loader.java.DefaultJavaExtensionModelLoader.JAVA_LOADER_ID) List(java.util.List) Matchers.equalTo(org.hamcrest.Matchers.equalTo) MULE(org.mule.runtime.api.deployment.meta.Product.MULE) PROCESS_START(org.mule.runtime.api.notification.PolicyNotification.PROCESS_START) MuleArtifactLoaderDescriptor(org.mule.runtime.api.deployment.meta.MuleArtifactLoaderDescriptor) EXPORTED_RESOURCES(org.mule.runtime.deployment.model.api.artifact.ArtifactDescriptorConstants.EXPORTED_RESOURCES) BeforeClass(org.junit.BeforeClass) MulePolicyModel(org.mule.runtime.api.deployment.meta.MulePolicyModel) ArrayList(java.util.ArrayList) PROPERTIES_BUNDLE_DESCRIPTOR_LOADER_ID(org.mule.runtime.module.deployment.impl.internal.policy.PropertiesBundleDescriptorLoader.PROPERTIES_BUNDLE_DESCRIPTOR_LOADER_ID) Matchers.hasSize(org.hamcrest.Matchers.hasSize) Collections.singletonMap(java.util.Collections.singletonMap) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) TestPolicyProcessor.invocationCount(org.mule.runtime.module.deployment.internal.TestPolicyProcessor.invocationCount) Collections.emptyMap(java.util.Collections.emptyMap) SecurityException(org.mule.runtime.api.security.SecurityException) XmlExtensionModelLoader(org.mule.runtime.extension.api.loader.xml.XmlExtensionModelLoader) PolicyParametrization(org.mule.runtime.core.api.policy.PolicyParametrization) JarFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.JarFileBuilder) Test(org.junit.Test) File(java.io.File) BOOTSTRAP_PROPERTIES(org.mule.runtime.core.internal.config.bootstrap.ClassLoaderRegistryBootstrapDiscoverer.BOOTSTRAP_PROPERTIES) Authentication(org.mule.runtime.api.security.Authentication) EXPORTED_PACKAGES(org.mule.runtime.deployment.model.api.artifact.ArtifactDescriptorConstants.EXPORTED_PACKAGES) RESOURCE_XML(org.mule.runtime.extension.api.loader.xml.XmlExtensionModelLoader.RESOURCE_XML) MuleArtifactLoaderDescriptorBuilder(org.mule.runtime.api.deployment.meta.MuleArtifactLoaderDescriptorBuilder) Product(org.mule.runtime.api.deployment.meta.Product) ApplicationFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder) PolicyParametrization(org.mule.runtime.core.api.policy.PolicyParametrization) Test(org.junit.Test)

Example 23 with ApplicationFileBuilder

use of org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder in project mule by mulesoft.

the class ApplicationPolicyDeploymentTestCase method appliesApplicationPolicyDuplicatingPluginOnDomain.

@Test
public void appliesApplicationPolicyDuplicatingPluginOnDomain() throws Exception {
    addPackedDomainFromBuilder(exceptionThrowingPluginImportingDomain);
    policyManager.registerPolicyTemplate(exceptionThrowingPluginImportingPolicyFileBuilder.getArtifactFile());
    ApplicationFileBuilder applicationFileBuilder = createExtensionApplicationWithServices(APP_WITH_EXTENSION_PLUGIN_CONFIG, helloExtensionV1Plugin).dependingOn(exceptionThrowingPluginImportingDomain);
    addPackedAppFromBuilder(applicationFileBuilder);
    startDeployment();
    assertApplicationDeploymentSuccess(applicationDeploymentListener, applicationFileBuilder.getId());
    policyManager.addPolicy(applicationFileBuilder.getId(), exceptionThrowingPluginImportingPolicyFileBuilder.getArtifactId(), new PolicyParametrization(EXCEPTION_POLICY_NAME, s -> true, 1, emptyMap(), getResourceFile("/exceptionThrowingPolicy.xml"), emptyList()));
    try {
        executeApplicationFlow("main");
        fail("Flow execution was expected to throw an exception");
    } catch (MuleRuntimeException expected) {
        assertThat(expected.getCause().getCause().getClass().getName(), is(equalTo("org.exception.CustomException")));
    }
}
Also used : URISyntaxException(java.net.URISyntaxException) ArtifactPluginFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ArtifactPluginFileBuilder) Matchers.hasItems(org.hamcrest.Matchers.hasItems) PollingProber(org.mule.tck.probe.PollingProber) Collections.singletonList(java.util.Collections.singletonList) BEFORE_NEXT(org.mule.runtime.api.notification.PolicyNotification.BEFORE_NEXT) PROCESS_END(org.mule.runtime.api.notification.PolicyNotification.PROCESS_END) TestPolicyProcessor.policyParametrization(org.mule.runtime.module.deployment.internal.TestPolicyProcessor.policyParametrization) Arrays.asList(java.util.Arrays.asList) Is.is(org.hamcrest.core.Is.is) AbstractSecurityProvider(org.mule.runtime.core.api.security.AbstractSecurityProvider) Assert.fail(org.junit.Assert.fail) PolicyFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.PolicyFileBuilder) JUnitProbe(org.mule.tck.probe.JUnitProbe) AFTER_NEXT(org.mule.runtime.api.notification.PolicyNotification.AFTER_NEXT) PolicyPointcut(org.mule.runtime.core.api.policy.PolicyPointcut) MulePluginModel(org.mule.runtime.api.deployment.meta.MulePluginModel) EXPORTED_RESOURCE_PROPERTY(org.mule.runtime.container.internal.ClasspathModuleDiscoverer.EXPORTED_RESOURCE_PROPERTY) MULE_LOADER_ID(org.mule.runtime.deployment.model.api.artifact.ArtifactDescriptorConstants.MULE_LOADER_ID) Collections.emptyList(java.util.Collections.emptyList) PolicyNotification(org.mule.runtime.api.notification.PolicyNotification) PolicyNotificationListener(org.mule.runtime.api.notification.PolicyNotificationListener) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) ApplicationFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder) CompilerUtils(org.mule.tck.util.CompilerUtils) PolicyRegistrationException(org.mule.runtime.deployment.model.api.policy.PolicyRegistrationException) JAVA_LOADER_ID(org.mule.runtime.module.extension.api.loader.java.DefaultJavaExtensionModelLoader.JAVA_LOADER_ID) List(java.util.List) Matchers.equalTo(org.hamcrest.Matchers.equalTo) MULE(org.mule.runtime.api.deployment.meta.Product.MULE) PROCESS_START(org.mule.runtime.api.notification.PolicyNotification.PROCESS_START) MuleArtifactLoaderDescriptor(org.mule.runtime.api.deployment.meta.MuleArtifactLoaderDescriptor) EXPORTED_RESOURCES(org.mule.runtime.deployment.model.api.artifact.ArtifactDescriptorConstants.EXPORTED_RESOURCES) BeforeClass(org.junit.BeforeClass) MulePolicyModel(org.mule.runtime.api.deployment.meta.MulePolicyModel) ArrayList(java.util.ArrayList) PROPERTIES_BUNDLE_DESCRIPTOR_LOADER_ID(org.mule.runtime.module.deployment.impl.internal.policy.PropertiesBundleDescriptorLoader.PROPERTIES_BUNDLE_DESCRIPTOR_LOADER_ID) Matchers.hasSize(org.hamcrest.Matchers.hasSize) Collections.singletonMap(java.util.Collections.singletonMap) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) TestPolicyProcessor.invocationCount(org.mule.runtime.module.deployment.internal.TestPolicyProcessor.invocationCount) Collections.emptyMap(java.util.Collections.emptyMap) SecurityException(org.mule.runtime.api.security.SecurityException) XmlExtensionModelLoader(org.mule.runtime.extension.api.loader.xml.XmlExtensionModelLoader) PolicyParametrization(org.mule.runtime.core.api.policy.PolicyParametrization) JarFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.JarFileBuilder) Test(org.junit.Test) File(java.io.File) BOOTSTRAP_PROPERTIES(org.mule.runtime.core.internal.config.bootstrap.ClassLoaderRegistryBootstrapDiscoverer.BOOTSTRAP_PROPERTIES) Authentication(org.mule.runtime.api.security.Authentication) EXPORTED_PACKAGES(org.mule.runtime.deployment.model.api.artifact.ArtifactDescriptorConstants.EXPORTED_PACKAGES) RESOURCE_XML(org.mule.runtime.extension.api.loader.xml.XmlExtensionModelLoader.RESOURCE_XML) MuleArtifactLoaderDescriptorBuilder(org.mule.runtime.api.deployment.meta.MuleArtifactLoaderDescriptorBuilder) Product(org.mule.runtime.api.deployment.meta.Product) ApplicationFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) PolicyParametrization(org.mule.runtime.core.api.policy.PolicyParametrization) Test(org.junit.Test)

Example 24 with ApplicationFileBuilder

use of org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder in project mule by mulesoft.

the class ApplicationPolicyDeploymentTestCase method removesApplicationPolicy.

@Test
public void removesApplicationPolicy() throws Exception {
    policyManager.registerPolicyTemplate(fooPolicyFileBuilder.getArtifactFile());
    ApplicationFileBuilder applicationFileBuilder = createExtensionApplicationWithServices(APP_WITH_EXTENSION_PLUGIN_CONFIG, helloExtensionV1Plugin);
    addPackedAppFromBuilder(applicationFileBuilder);
    startDeployment();
    assertApplicationDeploymentSuccess(applicationDeploymentListener, applicationFileBuilder.getId());
    policyManager.addPolicy(applicationFileBuilder.getId(), fooPolicyFileBuilder.getArtifactId(), new PolicyParametrization(FOO_POLICY_ID, parameters -> true, 1, singletonMap(POLICY_PROPERTY_KEY, POLICY_PROPERTY_VALUE), getResourceFile("/fooPolicy.xml"), emptyList()));
    executeApplicationFlow("main");
    assertThat(invocationCount, equalTo(1));
    policyManager.removePolicy(applicationFileBuilder.getId(), FOO_POLICY_ID);
    executeApplicationFlow("main");
    assertThat("Policy is still applied on the application", invocationCount, equalTo(1));
}
Also used : URISyntaxException(java.net.URISyntaxException) ArtifactPluginFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ArtifactPluginFileBuilder) Matchers.hasItems(org.hamcrest.Matchers.hasItems) PollingProber(org.mule.tck.probe.PollingProber) Collections.singletonList(java.util.Collections.singletonList) BEFORE_NEXT(org.mule.runtime.api.notification.PolicyNotification.BEFORE_NEXT) PROCESS_END(org.mule.runtime.api.notification.PolicyNotification.PROCESS_END) TestPolicyProcessor.policyParametrization(org.mule.runtime.module.deployment.internal.TestPolicyProcessor.policyParametrization) Arrays.asList(java.util.Arrays.asList) Is.is(org.hamcrest.core.Is.is) AbstractSecurityProvider(org.mule.runtime.core.api.security.AbstractSecurityProvider) Assert.fail(org.junit.Assert.fail) PolicyFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.PolicyFileBuilder) JUnitProbe(org.mule.tck.probe.JUnitProbe) AFTER_NEXT(org.mule.runtime.api.notification.PolicyNotification.AFTER_NEXT) PolicyPointcut(org.mule.runtime.core.api.policy.PolicyPointcut) MulePluginModel(org.mule.runtime.api.deployment.meta.MulePluginModel) EXPORTED_RESOURCE_PROPERTY(org.mule.runtime.container.internal.ClasspathModuleDiscoverer.EXPORTED_RESOURCE_PROPERTY) MULE_LOADER_ID(org.mule.runtime.deployment.model.api.artifact.ArtifactDescriptorConstants.MULE_LOADER_ID) Collections.emptyList(java.util.Collections.emptyList) PolicyNotification(org.mule.runtime.api.notification.PolicyNotification) PolicyNotificationListener(org.mule.runtime.api.notification.PolicyNotificationListener) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) ApplicationFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder) CompilerUtils(org.mule.tck.util.CompilerUtils) PolicyRegistrationException(org.mule.runtime.deployment.model.api.policy.PolicyRegistrationException) JAVA_LOADER_ID(org.mule.runtime.module.extension.api.loader.java.DefaultJavaExtensionModelLoader.JAVA_LOADER_ID) List(java.util.List) Matchers.equalTo(org.hamcrest.Matchers.equalTo) MULE(org.mule.runtime.api.deployment.meta.Product.MULE) PROCESS_START(org.mule.runtime.api.notification.PolicyNotification.PROCESS_START) MuleArtifactLoaderDescriptor(org.mule.runtime.api.deployment.meta.MuleArtifactLoaderDescriptor) EXPORTED_RESOURCES(org.mule.runtime.deployment.model.api.artifact.ArtifactDescriptorConstants.EXPORTED_RESOURCES) BeforeClass(org.junit.BeforeClass) MulePolicyModel(org.mule.runtime.api.deployment.meta.MulePolicyModel) ArrayList(java.util.ArrayList) PROPERTIES_BUNDLE_DESCRIPTOR_LOADER_ID(org.mule.runtime.module.deployment.impl.internal.policy.PropertiesBundleDescriptorLoader.PROPERTIES_BUNDLE_DESCRIPTOR_LOADER_ID) Matchers.hasSize(org.hamcrest.Matchers.hasSize) Collections.singletonMap(java.util.Collections.singletonMap) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) TestPolicyProcessor.invocationCount(org.mule.runtime.module.deployment.internal.TestPolicyProcessor.invocationCount) Collections.emptyMap(java.util.Collections.emptyMap) SecurityException(org.mule.runtime.api.security.SecurityException) XmlExtensionModelLoader(org.mule.runtime.extension.api.loader.xml.XmlExtensionModelLoader) PolicyParametrization(org.mule.runtime.core.api.policy.PolicyParametrization) JarFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.JarFileBuilder) Test(org.junit.Test) File(java.io.File) BOOTSTRAP_PROPERTIES(org.mule.runtime.core.internal.config.bootstrap.ClassLoaderRegistryBootstrapDiscoverer.BOOTSTRAP_PROPERTIES) Authentication(org.mule.runtime.api.security.Authentication) EXPORTED_PACKAGES(org.mule.runtime.deployment.model.api.artifact.ArtifactDescriptorConstants.EXPORTED_PACKAGES) RESOURCE_XML(org.mule.runtime.extension.api.loader.xml.XmlExtensionModelLoader.RESOURCE_XML) MuleArtifactLoaderDescriptorBuilder(org.mule.runtime.api.deployment.meta.MuleArtifactLoaderDescriptorBuilder) Product(org.mule.runtime.api.deployment.meta.Product) ApplicationFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder) PolicyParametrization(org.mule.runtime.core.api.policy.PolicyParametrization) Test(org.junit.Test)

Example 25 with ApplicationFileBuilder

use of org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder in project mule by mulesoft.

the class ApplicationPolicyDeploymentTestCase method appliesPolicyThatUsesPolicyClassOnExpression.

@Test
public void appliesPolicyThatUsesPolicyClassOnExpression() throws Exception {
    ArtifactPluginFileBuilder simpleExtensionPlugin = createSingleExtensionPlugin();
    policyManager.registerPolicyTemplate(policyWithPluginAndResource().getArtifactFile());
    ApplicationFileBuilder applicationFileBuilder = createExtensionApplicationWithServices(APP_WITH_SIMPLE_EXTENSION_CONFIG, simpleExtensionPlugin);
    addPackedAppFromBuilder(applicationFileBuilder);
    startDeployment();
    assertApplicationDeploymentSuccess(applicationDeploymentListener, applicationFileBuilder.getId());
    policyManager.addPolicy(applicationFileBuilder.getId(), policyIncludingPluginFileBuilder.getArtifactId(), new PolicyParametrization(BAR_POLICY_ID, s -> true, 1, emptyMap(), getResourceFile("/policy-using-policy-class-in-expression.xml"), emptyList()));
    executeApplicationFlow("main");
    assertThat(invocationCount, equalTo(1));
}
Also used : ArtifactPluginFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ArtifactPluginFileBuilder) URISyntaxException(java.net.URISyntaxException) ArtifactPluginFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ArtifactPluginFileBuilder) Matchers.hasItems(org.hamcrest.Matchers.hasItems) PollingProber(org.mule.tck.probe.PollingProber) Collections.singletonList(java.util.Collections.singletonList) BEFORE_NEXT(org.mule.runtime.api.notification.PolicyNotification.BEFORE_NEXT) PROCESS_END(org.mule.runtime.api.notification.PolicyNotification.PROCESS_END) TestPolicyProcessor.policyParametrization(org.mule.runtime.module.deployment.internal.TestPolicyProcessor.policyParametrization) Arrays.asList(java.util.Arrays.asList) Is.is(org.hamcrest.core.Is.is) AbstractSecurityProvider(org.mule.runtime.core.api.security.AbstractSecurityProvider) Assert.fail(org.junit.Assert.fail) PolicyFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.PolicyFileBuilder) JUnitProbe(org.mule.tck.probe.JUnitProbe) AFTER_NEXT(org.mule.runtime.api.notification.PolicyNotification.AFTER_NEXT) PolicyPointcut(org.mule.runtime.core.api.policy.PolicyPointcut) MulePluginModel(org.mule.runtime.api.deployment.meta.MulePluginModel) EXPORTED_RESOURCE_PROPERTY(org.mule.runtime.container.internal.ClasspathModuleDiscoverer.EXPORTED_RESOURCE_PROPERTY) MULE_LOADER_ID(org.mule.runtime.deployment.model.api.artifact.ArtifactDescriptorConstants.MULE_LOADER_ID) Collections.emptyList(java.util.Collections.emptyList) PolicyNotification(org.mule.runtime.api.notification.PolicyNotification) PolicyNotificationListener(org.mule.runtime.api.notification.PolicyNotificationListener) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) ApplicationFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder) CompilerUtils(org.mule.tck.util.CompilerUtils) PolicyRegistrationException(org.mule.runtime.deployment.model.api.policy.PolicyRegistrationException) JAVA_LOADER_ID(org.mule.runtime.module.extension.api.loader.java.DefaultJavaExtensionModelLoader.JAVA_LOADER_ID) List(java.util.List) Matchers.equalTo(org.hamcrest.Matchers.equalTo) MULE(org.mule.runtime.api.deployment.meta.Product.MULE) PROCESS_START(org.mule.runtime.api.notification.PolicyNotification.PROCESS_START) MuleArtifactLoaderDescriptor(org.mule.runtime.api.deployment.meta.MuleArtifactLoaderDescriptor) EXPORTED_RESOURCES(org.mule.runtime.deployment.model.api.artifact.ArtifactDescriptorConstants.EXPORTED_RESOURCES) BeforeClass(org.junit.BeforeClass) MulePolicyModel(org.mule.runtime.api.deployment.meta.MulePolicyModel) ArrayList(java.util.ArrayList) PROPERTIES_BUNDLE_DESCRIPTOR_LOADER_ID(org.mule.runtime.module.deployment.impl.internal.policy.PropertiesBundleDescriptorLoader.PROPERTIES_BUNDLE_DESCRIPTOR_LOADER_ID) Matchers.hasSize(org.hamcrest.Matchers.hasSize) Collections.singletonMap(java.util.Collections.singletonMap) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) TestPolicyProcessor.invocationCount(org.mule.runtime.module.deployment.internal.TestPolicyProcessor.invocationCount) Collections.emptyMap(java.util.Collections.emptyMap) SecurityException(org.mule.runtime.api.security.SecurityException) XmlExtensionModelLoader(org.mule.runtime.extension.api.loader.xml.XmlExtensionModelLoader) PolicyParametrization(org.mule.runtime.core.api.policy.PolicyParametrization) JarFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.JarFileBuilder) Test(org.junit.Test) File(java.io.File) BOOTSTRAP_PROPERTIES(org.mule.runtime.core.internal.config.bootstrap.ClassLoaderRegistryBootstrapDiscoverer.BOOTSTRAP_PROPERTIES) Authentication(org.mule.runtime.api.security.Authentication) EXPORTED_PACKAGES(org.mule.runtime.deployment.model.api.artifact.ArtifactDescriptorConstants.EXPORTED_PACKAGES) RESOURCE_XML(org.mule.runtime.extension.api.loader.xml.XmlExtensionModelLoader.RESOURCE_XML) MuleArtifactLoaderDescriptorBuilder(org.mule.runtime.api.deployment.meta.MuleArtifactLoaderDescriptorBuilder) Product(org.mule.runtime.api.deployment.meta.Product) ApplicationFileBuilder(org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder) PolicyParametrization(org.mule.runtime.core.api.policy.PolicyParametrization) Test(org.junit.Test)

Aggregations

ApplicationFileBuilder (org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder)74 Test (org.junit.Test)72 ArtifactPluginFileBuilder (org.mule.runtime.module.deployment.impl.internal.builder.ArtifactPluginFileBuilder)43 JarFileBuilder (org.mule.runtime.module.deployment.impl.internal.builder.JarFileBuilder)32 File (java.io.File)25 PolicyParametrization (org.mule.runtime.core.api.policy.PolicyParametrization)21 CompilerUtils (org.mule.tck.util.CompilerUtils)21 MuleRuntimeException (org.mule.runtime.api.exception.MuleRuntimeException)20 URISyntaxException (java.net.URISyntaxException)19 Collections.emptyList (java.util.Collections.emptyList)19 Collections.emptyMap (java.util.Collections.emptyMap)19 MatcherAssert.assertThat (org.hamcrest.MatcherAssert.assertThat)19 Matchers.equalTo (org.hamcrest.Matchers.equalTo)19 Is.is (org.hamcrest.core.Is.is)19 Assert.fail (org.junit.Assert.fail)19 PolicyRegistrationException (org.mule.runtime.deployment.model.api.policy.PolicyRegistrationException)19 TestPolicyProcessor.invocationCount (org.mule.runtime.module.deployment.internal.TestPolicyProcessor.invocationCount)19 MulePluginModel (org.mule.runtime.api.deployment.meta.MulePluginModel)18 MuleArtifactLoaderDescriptorBuilder (org.mule.runtime.api.deployment.meta.MuleArtifactLoaderDescriptorBuilder)17 MuleArtifactLoaderDescriptor (org.mule.runtime.api.deployment.meta.MuleArtifactLoaderDescriptor)16