Tabnine Logo
ConfigurationInterfacePathResolver.getSchemaPath
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: inspectIT/inspectIT

/**
 * Returns given path relative to schema part.
 *
 * @param path
 *            path to relativize
 * @return path relative to schema part
 * @see #getSchemaPath()
 */
private Path getRelativeToSchemaPath(Path path) {
  return path.relativize(pathResolver.getSchemaPath());
}
origin: inspectIT/inspectIT

  @Override
  public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
    if (isXmlFile(file)) {
      try {
        AlertingDefinition alertingDefinition = transformator.unmarshall(file, pathResolver.getSchemaPath(), ISchemaVersionAware.ConfigurationInterface.SCHEMA_VERSION,
            pathResolver.getMigrationPath(), AlertingDefinition.class);
        existingAlertingDefinitions.put(alertingDefinition.getId(), alertingDefinition);
      } catch (JAXBException | SAXException e) {
        log.error("Error reading existing alerting definition file. File path: " + file.toString() + ".", e);
      }
    }
    return FileVisitResult.CONTINUE;
  }
});
origin: inspectIT/inspectIT

final Path schemaPath = pathResolver.getSchemaPath();
origin: inspectIT/inspectIT

/**
 * Returns the {@link ConfigurationInterfaceImportData} from the given import data bytes.
 *
 * @param importData
 *            bytes that were exported.
 * @return {@link ConfigurationInterfaceImportData}.
 * @throws SAXException
 *             IF {@link SAXException} occurs during unmarshall.
 * @throws IOException
 *             If {@link IOException} occurs during unmarshall.
 * @throws JAXBException
 *             If {@link JAXBException} occurs during unmarshall.
 */
public ConfigurationInterfaceImportData getImportData(byte[] importData) throws JAXBException, IOException, SAXException {
  return transformator.unmarshall(importData, pathResolver.getSchemaPath(), ISchemaVersionAware.ConfigurationInterface.SCHEMA_VERSION, pathResolver.getMigrationPath(),
      ConfigurationInterfaceImportData.class);
}
origin: inspectIT/inspectIT

/**
 * Loads the business context definition if it is not already loaded. If successfully loaded
 * definition will be placed in the {@link #businessContextDefinition} field.
 */
private void loadBusinessContextDefinition() {
  log.info("|-Loading the business context definition");
  Path path = pathResolver.getBusinessContextFilePath();
  BusinessContextDefinition businessContextDefinition = null;
  if (Files.exists(path)) {
    try {
      businessContextDefinition = transformator.unmarshall(path, pathResolver.getSchemaPath(), ISchemaVersionAware.ConfigurationInterface.SCHEMA_VERSION, pathResolver.getMigrationPath(),
          BusinessContextDefinition.class);
    } catch (JAXBException | IOException | SAXException e) {
      log.error("Error loading Configuration interface business context file. File path: " + path.toString() + ".", e);
    }
  }
  if (null == businessContextDefinition) {
    businessContextDefinition = new BusinessContextDefinition();
    try {
      saveBusinessContext(businessContextDefinition);
    } catch (JAXBException | IOException e) {
      log.error("Error saving Configuration interface business context file. File path: " + path.toString() + ".", e);
    }
  }
  businessContextDefinitionReference.set(businessContextDefinition);
}
origin: inspectIT/inspectIT

final Path schemaPath = pathResolver.getSchemaPath();
origin: inspectIT/inspectIT

  agentMappings = transformator.unmarshall(path, pathResolver.getSchemaPath(), ISchemaVersionAware.ConfigurationInterface.SCHEMA_VERSION, pathResolver.getMigrationPath(), AgentMappings.class);
} catch (JAXBException | IOException | SAXException e) {
  agentMappings = new AgentMappings(Collections.<AgentMapping> emptyList());
origin: inspectIT/inspectIT

when(pathResolver.getEnvironmentPath()).thenReturn(Paths.get(TEST_FOLDER).resolve(EXT_RESOURCES_PATH.relativize(resolverHelper.getEnvironmentPath())));
when(pathResolver.getProfilesPath()).thenReturn(Paths.get(TEST_FOLDER).resolve(EXT_RESOURCES_PATH.relativize(resolverHelper.getProfilesPath())));
when(pathResolver.getSchemaPath()).thenReturn(Paths.get(TEST_FOLDER).resolve(EXT_RESOURCES_PATH.relativize(resolverHelper.getSchemaPath())));
when(pathResolver.getBusinessContextFilePath()).thenReturn(Paths.get(TEST_FOLDER).resolve(EXT_RESOURCES_PATH.relativize(resolverHelper.getBusinessContextFilePath())));
when(pathResolver.getAlertingDefinitionsPath()).thenReturn(Paths.get(TEST_FOLDER).resolve(EXT_RESOURCES_PATH.relativize(resolverHelper.getAlertingDefinitionsPath())));
rocks.inspectit.server.ciConfigurationInterfacePathResolvergetSchemaPath

Javadoc

Returns the schema path.

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.
  • getEnvironmentFilePath
    Returns path pointing to the environment file.
  • getEnvironmentPath
    Returns the directory where environments are saved.
  • getProfileFilePath
    Returns path pointing to the profile file.
  • getProfilesPath
    Returns the directory where profiles are saved.
  • <init>
  • getMigrationPath
    Returns the schema path.
  • init
    Initializes #configDirFile.
  • getMigrationPath,
  • init,
  • removeIllegalFilenameCharacters

Popular in Java

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Top 17 Plugins for Android Studio
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