Package com.netflix.genie.common.model

Examples of com.netflix.genie.common.model.Application


            final String id,
            final Set<String> configs) throws GenieException {
        if (StringUtils.isBlank(id)) {
            throw new GeniePreconditionException("No application id entered. Unable to update configurations.");
        }
        final Application app = this.applicationRepo.findOne(id);
        if (app != null) {
            app.setConfigs(configs);
            return app.getConfigs();
        } else {
            throw new GenieNotFoundException("No application with id " + id + " exists.");
        }
    }
View Full Code Here


    public Set<String> getConfigsForApplication(
            final String id) throws GenieException {
        if (StringUtils.isBlank(id)) {
            throw new GeniePreconditionException("No application id entered. Unable to get configs.");
        }
        final Application app = this.applicationRepo.findOne(id);
        if (app != null) {
            return app.getConfigs();
        } else {
            throw new GenieNotFoundException("No application with id " + id + " exists.");
        }
    }
View Full Code Here

    public Set<String> removeAllConfigsForApplication(
            final String id) throws GenieException {
        if (StringUtils.isBlank(id)) {
            throw new GeniePreconditionException("No application id entered. Unable to remove jars.");
        }
        final Application app = this.applicationRepo.findOne(id);
        if (app != null) {
            app.getConfigs().clear();
            return app.getConfigs();
        } else {
            throw new GenieNotFoundException("No application with id " + id + " exists.");
        }
    }
View Full Code Here

            final String id,
            final String config) throws GenieException {
        if (StringUtils.isBlank(id)) {
            throw new GeniePreconditionException("No application id entered. Unable to remove configuration.");
        }
        final Application app = this.applicationRepo.findOne(id);
        if (app != null) {
            if (StringUtils.isNotBlank(config)) {
                app.getConfigs().remove(config);
            }
            return app.getConfigs();
        } else {
            throw new GenieNotFoundException("No application with id " + id + " exists.");
        }
    }
View Full Code Here

            throw new GeniePreconditionException("No application id entered. Unable to add jar.");
        }
        if (jars == null) {
            throw new GeniePreconditionException("No jar entered. Unable to add jars.");
        }
        final Application app = this.applicationRepo.findOne(id);
        if (app != null) {
            app.getJars().addAll(jars);
            return app.getJars();
        } else {
            throw new GenieNotFoundException("No application with id " + id + " exists.");
        }
    }
View Full Code Here

    public Set<String> getJarsForApplication(
            final String id) throws GenieException {
        if (StringUtils.isBlank(id)) {
            throw new GeniePreconditionException("No application id entered. Unable to get jars.");
        }
        final Application app = this.applicationRepo.findOne(id);
        if (app != null) {
            return app.getJars();
        } else {
            throw new GenieNotFoundException("No application with id " + id + " exists.");
        }
    }
View Full Code Here

            final String id,
            final Set<String> jars) throws GenieException {
        if (StringUtils.isBlank(id)) {
            throw new GeniePreconditionException("No application id entered. Unable to update jars.");
        }
        final Application app = this.applicationRepo.findOne(id);
        if (app != null) {
            app.setJars(jars);
            return app.getJars();
        } else {
            throw new GenieNotFoundException("No application with id " + id + " exists.");
        }
    }
View Full Code Here

    public Set<String> removeAllJarsForApplication(
            final String id) throws GenieException {
        if (StringUtils.isBlank(id)) {
            throw new GeniePreconditionException("No application id entered. Unable to remove jars.");
        }
        final Application app = this.applicationRepo.findOne(id);
        if (app != null) {
            app.getJars().clear();
            return app.getJars();
        } else {
            throw new GenieNotFoundException("No application with id " + id + " exists.");
        }
    }
View Full Code Here

            final String id,
            final String jar) throws GenieException {
        if (StringUtils.isBlank(id)) {
            throw new GeniePreconditionException("No application id entered. Unable to remove jar.");
        }
        final Application app = this.applicationRepo.findOne(id);
        if (app != null) {
            if (StringUtils.isNotBlank(jar)) {
                app.getJars().remove(jar);
            }
            return app.getJars();
        } else {
            throw new GenieNotFoundException("No application with id " + id + " exists.");
        }
    }
View Full Code Here

            throw new GeniePreconditionException("No application id entered. Unable to add tags.");
        }
        if (tags == null) {
            throw new GeniePreconditionException("No tags entered.");
        }
        final Application application = this.applicationRepo.findOne(id);
        if (application != null) {
            application.getTags().addAll(tags);
            return application.getTags();
        } else {
            throw new GenieNotFoundException("No application with id " + id + " exists.");
        }
    }
View Full Code Here

TOP

Related Classes of com.netflix.genie.common.model.Application

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.