Tabnine Logo
MuleFoldersUtil.getExecutionFolder
Code IndexAdd Tabnine to your IDE (free)

How to use
getExecutionFolder
method
in
org.mule.runtime.container.api.MuleFoldersUtil

Best Java code snippets using org.mule.runtime.container.api.MuleFoldersUtil.getExecutionFolder (Showing top 16 results out of 315)

origin: mulesoft/mule

/**
 * @return a {@link File} pointing to the container folder used to temporarily store services on deployment
 */
public static File getServicesTempFolder() {
 return new File(getExecutionFolder(), SERVICES_FOLDER);
}
origin: mulesoft/mule

/**
 * @return a {@link File} pointing to the container folder used to temporarily store the exported module services for SPI.
 */
public static File getModulesTempFolder() {
 return new File(getExecutionFolder(), MODULES_FOLDER);
}
origin: mulesoft/mule

private File getToolingWorkingDir() {
 return new File(getExecutionFolder(), TOOLING_FOLDER);
}
origin: mulesoft/mule

public static File getAppDataFolder(String appDataFolder) {
 return new File(getExecutionFolder(), appDataFolder);
}
origin: mulesoft/mule

private void createExecutionMuleFolder() {
 File executionFolder = MuleFoldersUtil.getExecutionFolder();
 if (!executionFolder.exists()) {
  if (!executionFolder.mkdirs()) {
   throw new MuleRuntimeException(CoreMessages.createStaticMessage(format(
                                       "Could not create folder %s, validate that the process has permissions over that directory",
                                       executionFolder.getAbsolutePath())));
  }
 }
}
origin: mulesoft/mule

private File getPoliciesTempFolder() {
 return new File(getExecutionFolder(), "policies");
}
origin: mulesoft/mule

/**
 * This method resolves the deploymentProperties for a new deploy/redeploy considering the new deployment properties passed by
 * the user as parameter and the deployment properties persisted in a previous deploy. In case no new deployment properties are
 * passed, the previous persisted properties are returned. Otherwise, the new deployment properties are used and persisted in
 * .mule/app/deployment-properties/deployment.properties There is one deployment.properties file for each artifact (domain/app).
 * 
 * @param artifactName name of the artifact.
 * @param deploymentProperties deployment properties set in the new deploy/redeploy as parameters.
 * 
 * @return deployment properties
 * @throws IOException
 */
public static Properties resolveDeploymentProperties(String artifactName, Optional<Properties> deploymentProperties)
  throws IOException {
 File file = new File(getExecutionFolder(), artifactName);
 String workingDirectory = file.getAbsolutePath();
 String deploymentPropertiesPath = workingDirectory + separator + DEPLOYTMENT_PROPERTIES_DIRECTORY;
 if (!deploymentProperties.isPresent()) {
  return getDeploymentProperties(deploymentPropertiesPath);
 }
 initDeploymentPropertiesDirectory(deploymentPropertiesPath);
 persistDeploymentPropertiesFile(deploymentPropertiesPath, deploymentProperties.get());
 return deploymentProperties.get();
}
origin: mulesoft/mule

@Before
public void setUp() throws Exception {
 coreExtensionManager = mock(MuleCoreExtensionManagerServer.class);
 container = createMuleContainer();
 FileUtils.deleteDirectory(getExecutionFolder());
}
origin: mulesoft/mule

@Test
public void onStartAndExecutionFolderExistsDoNotFail() throws Exception {
 assertThat(getExecutionFolder().mkdirs(), is(true));
 container.start(false);
}
origin: mulesoft/mule

@Test
public void onStartCreateExecutionFolderIfDoesNotExists() throws Exception {
 container.start(false);
 assertThat(getExecutionFolder().exists(), is(true));
}
origin: mulesoft/mule

private void testWithMuleHome(CheckedConsumer<ClasspathModuleDiscoverer> testCallback) throws Exception {
 testWithSystemProperty(MULE_HOME_DIRECTORY_PROPERTY, muleHome.getRoot().getAbsolutePath(), () -> {
  MuleFoldersUtil.getExecutionFolder().mkdir();
  ClasspathModuleDiscoverer moduleDiscoverer = new ClasspathModuleDiscoverer(classLoader);
  testCallback.accept(moduleDiscoverer);
 });
}
origin: mulesoft/mule

/**
 * {@inheritDoc}
 */
@Override
public ConnectivityTestingService build() {
 checkState(artifactDeclaration != null, "artifact configuration cannot be null");
 return new TemporaryArtifactConnectivityTestingService(() -> {
  String applicationName = UUID.getUUID() + "-connectivity-testing-temp-app";
  File applicationFolder = new File(getExecutionFolder(), applicationName);
  ApplicationDescriptor applicationDescriptor = new ApplicationDescriptor(applicationName);
  applicationDescriptor.setArtifactDeclaration(artifactDeclaration);
  applicationDescriptor.setConfigResources(emptySet());
  applicationDescriptor.setArtifactLocation(applicationFolder);
  createDeployablePomFile(applicationFolder, model);
  updateArtifactPom(applicationFolder, model);
  MavenClientProvider mavenClientProvider =
    MavenClientProvider.discoverProvider(DefaultConnectivityTestingServiceBuilder.class.getClassLoader());
  applicationDescriptor
    .setClassLoaderModel(new DeployableMavenClassLoaderModelLoader(mavenClientProvider
      .createMavenClient(GlobalConfigLoader.getMavenConfig()))
        .load(applicationFolder, emptyMap(), ArtifactType.APP));
  return defaultApplicationFactory.createArtifact(applicationDescriptor);
 });
}
origin: org.mule.runtime/mule-module-launcher

private void createExecutionMuleFolder() {
 File executionFolder = MuleFoldersUtil.getExecutionFolder();
 if (!executionFolder.exists()) {
  if (!executionFolder.mkdirs()) {
   throw new MuleRuntimeException(CoreMessages.createStaticMessage(String.format(
                                          "Could not create folder %s, validate that the process has permissions over that directory",
                                          executionFolder.getAbsolutePath())));
  }
 }
}
origin: org.mule.runtime/mule-module-deployment

private File getPoliciesTempFolder() {
 return new File(getExecutionFolder(), "policies");
}
origin: org.mule.runtime/mule-module-deployment-model-impl

/**
 * This method resolves the deploymentProperties for a new deploy/redeploy considering the new deployment properties passed by
 * the user as parameter and the deployment properties persisted in a previous deploy. In case no new deployment properties are
 * passed, the previous persisted properties are returned. Otherwise, the new deployment properties are used and persisted in
 * .mule/app/deployment-properties/deployment.properties There is one deployment.properties file for each artifact (domain/app).
 * 
 * @param artifactName name of the artifact.
 * @param deploymentProperties deployment properties set in the new deploy/redeploy as parameters.
 * 
 * @return deployment properties
 * @throws IOException
 */
public static Properties resolveDeploymentProperties(String artifactName, Optional<Properties> deploymentProperties)
  throws IOException {
 File file = new File(getExecutionFolder(), artifactName);
 String workingDirectory = file.getAbsolutePath();
 String deploymentPropertiesPath = workingDirectory + separator + DEPLOYTMENT_PROPERTIES_DIRECTORY;
 if (!deploymentProperties.isPresent()) {
  return getDeploymentProperties(deploymentPropertiesPath);
 }
 initDeploymentPropertiesDirectory(deploymentPropertiesPath);
 persistDeploymentPropertiesFile(deploymentPropertiesPath, deploymentProperties.get());
 return deploymentProperties.get();
}
origin: org.mule.runtime/mule-module-tooling-support

/**
 * {@inheritDoc}
 */
@Override
public ConnectivityTestingService build() {
 checkState(artifactDeclaration != null, "artifact configuration cannot be null");
 return new TemporaryArtifactConnectivityTestingService(() -> {
  String applicationName = UUID.getUUID() + "-connectivity-testing-temp-app";
  File applicationFolder = new File(getExecutionFolder(), applicationName);
  ApplicationDescriptor applicationDescriptor = new ApplicationDescriptor(applicationName);
  applicationDescriptor.setArtifactDeclaration(artifactDeclaration);
  applicationDescriptor.setConfigResources(emptySet());
  applicationDescriptor.setArtifactLocation(applicationFolder);
  createDeployablePomFile(applicationFolder, model);
  updateArtifactPom(applicationFolder, model);
  MavenClientProvider mavenClientProvider =
    MavenClientProvider.discoverProvider(DefaultConnectivityTestingServiceBuilder.class.getClassLoader());
  applicationDescriptor
    .setClassLoaderModel(new DeployableMavenClassLoaderModelLoader(mavenClientProvider
      .createMavenClient(GlobalConfigLoader.getMavenConfig()), mavenClientProvider.getLocalRepositorySuppliers())
        .load(applicationFolder, emptyMap(), ArtifactType.APP));
  return defaultApplicationFactory.createArtifact(applicationDescriptor);
 });
}
org.mule.runtime.container.apiMuleFoldersUtilgetExecutionFolder

Popular methods of MuleFoldersUtil

  • getServicesFolder
  • getDomainFolder
  • getAppDataFolder
  • getDomainsFolder
  • getMuleBaseFolder
  • getAppFolder
  • getAppsFolder
  • getMuleHomeFolder
  • getModulesTempFolder
  • getMuleLibFolder
  • getServerPluginsFolder
  • getServicesTempFolder
  • getServerPluginsFolder,
  • getServicesTempFolder,
  • getAppLibFolder,
  • getAppLibsFolderPath,
  • getAppPluginsFolderPath,
  • getAppSharedLibsFolderPath,
  • getConfFolder,
  • getDomainLibFolder,
  • getPatchesLibFolder

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Kernel (java.awt.image)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now