/** * Saves the passed {@link IBusinessContextDefinition}. * * @param businessContextDefinition * {@link IBusinessContextDefinition} to save * @throws IOException * If {@link IOException} occurs. * @throws JAXBException * If {@link JAXBException} occurs. If saving fails. */ private void saveBusinessContext(BusinessContextDefinition businessContextDefinition) throws JAXBException, IOException { businessContextDefinitionReference.set(businessContextDefinition); transformator.marshall(pathResolver.getBusinessContextFilePath(), businessContextDefinition, getRelativeToSchemaPath(pathResolver.getDefaultCiPath()).toString(), ISchemaVersionAware.ConfigurationInterface.SCHEMA_VERSION); }
/** * Save the given {@link AlertingDefinition}. * * @param alertingDefinition * the {@link AlertingDefinition} to save * @throws IOException * if {@link IOException} occurs * @throws JAXBException * if {@link JAXBException} occurs. If saving fails */ private void saveAlertingDefinition(AlertingDefinition alertingDefinition) throws JAXBException, IOException { transformator.marshall(pathResolver.getAlertingDefinitionFilePath(alertingDefinition), alertingDefinition, getRelativeToSchemaPath(pathResolver.getDefaultCiPath()).toString(), ISchemaVersionAware.ConfigurationInterface.SCHEMA_VERSION); }
/** * 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); }
/** * Saves agent mapping. * * @param agentMappings * To save * @throws IOException * If {@link IOException} occurs. * @throws JAXBException * If {@link JAXBException} occurs. If saving fails. */ private void saveAgentMapping(AgentMappings agentMappings) throws JAXBException, IOException { transformator.marshall(pathResolver.getAgentMappingFilePath(), agentMappings, getRelativeToSchemaPath(pathResolver.getDefaultCiPath()).toString(), ISchemaVersionAware.ConfigurationInterface.SCHEMA_VERSION); }
/** * Saves profile and persists it to the list. * * @param profile * Profile to be saved. * @throws IOException * If {@link IOException} occurs during save. * @throws JAXBException * If {@link JAXBException} occurs during save. * @throws BusinessException * If saving of the common profile is requested. */ private void saveProfile(Profile profile) throws BusinessException, JAXBException, IOException { if (profile.isCommonProfile()) { throw new BusinessException("Save the profile '" + profile.getName() + " to disk.", ConfigurationInterfaceErrorCodeEnum.COMMON_PROFILE_CAN_NOT_BE_ALTERED); } transformator.marshall(pathResolver.getProfileFilePath(profile), profile, getRelativeToSchemaPath(pathResolver.getProfilesPath()).toString(), ISchemaVersionAware.ConfigurationInterface.SCHEMA_VERSION); }