congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ConfigurationInterfacePathResolver.getEnvironmentFilePath
Code IndexAdd Tabnine to your IDE (free)

How to use
getEnvironmentFilePath
method
in
rocks.inspectit.server.ci.ConfigurationInterfacePathResolver

Best Java code snippets using rocks.inspectit.server.ci.ConfigurationInterfacePathResolver.getEnvironmentFilePath (Showing top 6 results out of 315)

origin: inspectIT/inspectIT

/**
 * Deletes the existing environment.
 *
 * @param environment
 *            Environment to delete.
 * @throws IOException
 *             If {@link IOException} occurs during delete.
 */
public void deleteEnvironment(Environment environment) throws IOException {
  String id = environment.getId();
  Environment local = existingEnvironments.remove(id);
  if (null != local) {
    Files.deleteIfExists(pathResolver.getEnvironmentFilePath(local));
    AgentMappings agentMappings = agentMappingsReference.get();
    if (checkEnvironments(agentMappings)) {
      try {
        saveAgentMappings(agentMappings, false);
      } catch (Exception e) {
        log.error("Update of the agent mappings on the environment deletion failed.", e);
      }
    }
  }
}
origin: inspectIT/inspectIT

/**
 * Saves {@link Environment} to the disk.
 *
 * @param environment
 *            {@link Environment} to save.
 * @throws IOException
 *             If {@link IOException} occurs.
 * @throws JAXBException
 *             If {@link JAXBException} occurs. If saving fails.
 */
private void saveEnvironment(Environment environment) throws JAXBException, IOException {
  transformator.marshall(pathResolver.getEnvironmentFilePath(environment), environment, getRelativeToSchemaPath(pathResolver.getEnvironmentPath()).toString(),
      ISchemaVersionAware.ConfigurationInterface.SCHEMA_VERSION);
}
origin: inspectIT/inspectIT

  @Override
  public Path answer(InvocationOnMock invocation) throws Throwable {
    return Paths.get(TEST_FOLDER).resolve(EXT_RESOURCES_PATH.relativize(resolverHelper.getEnvironmentPath()))
        .resolve(EXT_RESOURCES_PATH.relativize(resolverHelper.getEnvironmentFilePath((Environment) invocation.getArguments()[0])));
  }
}).when(pathResolver).getEnvironmentFilePath(Matchers.<Environment> any());
origin: inspectIT/inspectIT

/**
 * Imports the environment. Note that if environment with the same id already exists it will be
 * overwritten.
 *
 * @param environment
 *            Environment.
 * @return Returns created/updated environment depending if the overwrite was executed.
 * @throws BusinessException
 *             If attempt is made to import environment without the id.
 * @throws IOException
 *             If {@link IOException} occurs during save.
 * @throws JAXBException
 *             If {@link JAXBException} occurs during save.
 */
public Environment importEnvironment(Environment environment) throws BusinessException, JAXBException, IOException {
  if (null == environment.getId()) {
    throw new BusinessException("Import the environment '" + environment.getName() + "'.", ConfigurationInterfaceErrorCodeEnum.IMPORT_DATA_NOT_VALID);
  }
  environment.setImportDate(new Date());
  if (existingEnvironments.containsKey(environment.getId())) {
    Environment old = existingEnvironments.replace(environment.getId(), environment);
    Files.deleteIfExists(pathResolver.getEnvironmentFilePath(old));
  } else {
    existingEnvironments.put(environment.getId(), environment);
  }
  checkProfiles(environment);
  saveEnvironment(environment);
  return environment;
}
origin: inspectIT/inspectIT

        .resolve(EXT_RESOURCES_PATH.relativize(resolverHelper.getEnvironmentFilePath((Environment) invocation.getArguments()[0])));
}).when(pathResolver).getEnvironmentFilePath(Matchers.<Environment> any());
doAnswer(new Answer<Path>() {
  @Override
origin: inspectIT/inspectIT

Files.deleteIfExists(pathResolver.getEnvironmentFilePath(local));
rocks.inspectit.server.ciConfigurationInterfacePathResolvergetEnvironmentFilePath

Javadoc

Returns path pointing to the environment file.

Popular methods of ConfigurationInterfacePathResolver

  • getAgentMappingFilePath
    Returns path pointing to the agent mapping file.
  • getAlertingDefinitionFilePath
    Returns path pointing to the alerting definition file.
  • getAlertingDefinitionsPath
    Returns the directory where alert thresholds are saved.
  • getBusinessContextFilePath
    Returns path pointing to the business context file.
  • getDefaultCiPath
    Returns the default CI folder.
  • getEnvironmentPath
    Returns the directory where environments are saved.
  • getProfileFilePath
    Returns path pointing to the profile file.
  • getProfilesPath
    Returns the directory where profiles are saved.
  • getSchemaPath
    Returns the schema path.
  • <init>
  • getMigrationPath
    Returns the schema path.
  • init
    Initializes #configDirFile.
  • getMigrationPath,
  • init,
  • removeIllegalFilenameCharacters

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
  • notifyDataSetChanged (ArrayAdapter)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Join (org.hibernate.mapping)
  • 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