Package org.rhq.enterprise.agent

Examples of org.rhq.enterprise.agent.EnvironmentScriptFileUpdate


        return (script.exists()) ? AvailabilityType.UP : AvailabilityType.DOWN;
    }

    public Configuration loadResourceConfiguration() throws Exception {
        // read in the env script file and get all the env vars it defines
        EnvironmentScriptFileUpdate updater = EnvironmentScriptFileUpdate.create(script.getAbsolutePath());
        List<NameValuePair> variables = updater.loadExisting();

        // put the env var definitions in a config object
        Configuration config = new Configuration();
        PropertyList list = new PropertyList("environmentVariables");
        config.put(list);
View Full Code Here


            }

            // update the env script file so it includes the new settings.
            // note that we require the request to contain ALL settings, not a subset; any settings
            // missing in the request config that currently exist in the script will be removed from the script.
            EnvironmentScriptFileUpdate updater = EnvironmentScriptFileUpdate.create(script.getAbsolutePath());
            updater.update(newSettings, true);

            request.setStatus(ConfigurationUpdateStatus.SUCCESS);
        } catch (Exception e) {
            request.setErrorMessage(new ExceptionPackage(Severity.Severe, e).toString());
        }
View Full Code Here

        if (configFile == null || !configFile.exists()) {
            return null;
        }

        // read in the file and get all the settings it defines
        EnvironmentScriptFileUpdate updater = EnvironmentScriptFileUpdate.create(configFile.getAbsolutePath());
        List<NameValuePair> properties = updater.loadExisting();

        // put the env var definitions in a config object
        PropertyList list = new PropertyList("mainConfigurationSettings");

        for (NameValuePair prop : properties) {
View Full Code Here

        if (environmentFile == null || !environmentFile.exists()) {
            return null;
        }

        // read in the file and get all the settings it defines
        EnvironmentScriptFileUpdate updater = EnvironmentScriptFileUpdate.create(environmentFile.getAbsolutePath());
        List<NameValuePair> properties = updater.loadExisting();

        // put the env var definitions in a config object
        PropertyList list = new PropertyList("environmentSettings");

        for (NameValuePair prop : properties) {
View Full Code Here

        if (includeFile == null || !includeFile.exists()) {
            return null;
        }

        // read in the file and get all the settings it defines
        EnvironmentScriptFileUpdate updater = EnvironmentScriptFileUpdate.create(includeFile.getAbsolutePath());
        List<NameValuePair> properties = updater.loadExisting();

        // put the env var definitions in a config object
        PropertyList list = new PropertyList("includeSettings");

        for (NameValuePair prop : properties) {
View Full Code Here

            // update the env script file so it includes the new settings.
            // note that we require the request to contain ALL settings, not a subset; any settings
            // missing in the request config that currently exist in the script will be removed from the script,
            // which would be bad - but that should never occur unless something bad happens in the UI
            EnvironmentScriptFileUpdate updater = EnvironmentScriptFileUpdate.create(configFile.getAbsolutePath());
            updater.update(newSettings, true);

            request.setStatus(ConfigurationUpdateStatus.SUCCESS);
        } catch (Exception e) {
            request.setErrorMessage(new ExceptionPackage(Severity.Severe, e).toString());
        }
View Full Code Here

            // update the env script file so it includes the new settings.
            // note that we require the request to contain ALL settings, not a subset; any settings
            // missing in the request config that currently exist in the script will be removed from the script,
            // which would be bad - but that should never occur unless something bad happens in the UI
            EnvironmentScriptFileUpdate updater = EnvironmentScriptFileUpdate.create(environmentFile.getAbsolutePath());
            updater.update(newSettings, true);

            request.setStatus(ConfigurationUpdateStatus.SUCCESS);
        } catch (Exception e) {
            request.setErrorMessage(new ExceptionPackage(Severity.Severe, e).toString());
        }
View Full Code Here

            // update the env script file so it includes the new settings.
            // note that we require the request to contain ALL settings, not a subset; any settings
            // missing in the request config that currently exist in the script will be removed from the script,
            // which would be bad - but that should never occur unless something bad happens in the UI
            EnvironmentScriptFileUpdate updater = EnvironmentScriptFileUpdate.create(includeFile.getAbsolutePath());
            updater.update(newSettings, true);

            request.setStatus(ConfigurationUpdateStatus.SUCCESS);
        } catch (Exception e) {
            request.setErrorMessage(new ExceptionPackage(Severity.Severe, e).toString());
        }
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.agent.EnvironmentScriptFileUpdate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.