Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Licensed to Marvelution under one or more contributor license 
   * agreements.  See the NOTICE file distributed with this work 
   * for additional information regarding copyright ownership.
   * Marvelution licenses this file to you under the Apache License,
   * Version 2.0 (the "License"); you may not use this file except
   * in compliance with the License.
   * You may obtain a copy of the License at
   *
  *  http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
 
 package com.marvelution.bamboo.plugins.sonar.ww2.actions.admin.sonar;
 
 import  com.atlassian.bamboo.configuration.AdministrationConfiguration;
 import  com.atlassian.bamboo.configuration.GlobalAdminAction;
GlobalAdminAction to update Sonar Global Configuration

Author(s):
Mark Rekveld
 
 public class ConfigureSonarGlobals extends GlobalAdminAction {
 
 	private static final long serialVersionUID = 1L;
 
 	private boolean skipOnBuildFailure;
 
 	private boolean skipOnManualBuild;
 
 	private boolean skipOnNoCodeChanges;

 
 	public String doDefault() throws Exception {
 		final AdministrationConfiguration adminConfig =
 			administrationConfigurationManager.getAdministrationConfiguration();
 		setSkipOnBuildFailure(Boolean.parseBoolean(adminConfig.getSystemProperty(.)));
 		setSkipOnManualBuild(Boolean.parseBoolean(adminConfig.getSystemProperty(.)));
 		setSkipOnNoCodeChanges(Boolean.parseBoolean(adminConfig
 			.getSystemProperty(.)));
 		return INPUT;
 	}

 
 	public String execute() throws Exception {
 		final AdministrationConfiguration adminConfig =
 			administrationConfigurationManager.getAdministrationConfiguration();
 		adminConfig.setSystemProperty(., String.valueOf(isSkipOnBuildFailure()));
 		adminConfig.setSystemProperty(., String.valueOf(isSkipOnManualBuild()));
 		adminConfig.setSystemProperty(., String.valueOf(isSkipOnNoCodeChanges()));
 		administrationConfigurationManager.saveAdministrationConfiguration(adminConfig);
 		addActionMessage(getText("sonar.global.config.updated"));
 		return SUCCESS;
 	}

Get Skip Sonar on build failure

Returns:
Skip Sonar on build failure
 
 	public boolean isSkipOnBuildFailure() {
 	}

Set Skip Sonar on build failure

Parameters:
skipOnBuildFailure Skip Sonar on build failure
 
 	public void setSkipOnBuildFailure(boolean skipOnBuildFailure) {
 		this. = skipOnBuildFailure;
 	}

Get Skip on manual build

Returns:
Skip on manual build
 
 	public boolean isSkipOnManualBuild() {
 	}

Set Skip on manual build

Parameters:
skipOnManualBuild Skip on manual build
	public void setSkipOnManualBuild(boolean skipOnManualBuild) {
		this. = skipOnManualBuild;
	}


Get Skip on no code changes

Returns:
the skipOnNoCodeChanges Skip on no code changes
	public boolean isSkipOnNoCodeChanges() {
	}


Set Skip on no code changes

Parameters:
skipOnNoCodeChanges Skip on no code changes
	public void setSkipOnNoCodeChanges(boolean skipOnNoCodeChanges) {
		this. = skipOnNoCodeChanges;
	}
New to GrepCode? Check out our FAQ X