From 024f648300c92781c9673be3e52341c4594ebe49 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Wed, 30 Nov 2016 15:21:26 +0100 Subject: SONAR-8449 Create some constants into WebConstants --- .../sonar/core/config/CorePropertyDefinitions.java | 8 ++--- .../java/org/sonar/core/config/WebConstants.java | 36 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 sonar-core/src/main/java/org/sonar/core/config/WebConstants.java (limited to 'sonar-core') diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java index 32e595df780..f896ae44ddd 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java +++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java @@ -168,21 +168,21 @@ public class CorePropertyDefinitions { .build(), // WEB LOOK&FEEL - PropertyDefinition.builder("sonar.lf.logoUrl") + PropertyDefinition.builder(WebConstants.SONAR_LF_LOGO_URL) .deprecatedKey("sonar.branding.image") .name("Logo URL") .description("URL to logo image. Any standard format is accepted.") .category(CoreProperties.CATEGORY_GENERAL) .subCategory(CoreProperties.SUBCATEGORY_LOOKNFEEL) .build(), - PropertyDefinition.builder("sonar.lf.logoWidthPx") + PropertyDefinition.builder(WebConstants.SONAR_LF_LOGO_WIDTH_PX) .deprecatedKey("sonar.branding.image.width") .name("Width of image in pixels") .description("Width in pixels, given that the height of the the image is constrained to 30px") .category(CoreProperties.CATEGORY_GENERAL) .subCategory(CoreProperties.SUBCATEGORY_LOOKNFEEL) .build(), - PropertyDefinition.builder("sonar.lf.enableGravatar") + PropertyDefinition.builder(WebConstants.SONAR_LF_ENABLE_GRAVATAR) .name("Enable support of gravatars") .description("Gravatars are profile pictures of users based on their email.") .type(PropertyType.BOOLEAN) @@ -190,7 +190,7 @@ public class CorePropertyDefinitions { .category(CoreProperties.CATEGORY_GENERAL) .subCategory(CoreProperties.SUBCATEGORY_LOOKNFEEL) .build(), - PropertyDefinition.builder("sonar.lf.gravatarServerUrl") + PropertyDefinition.builder(WebConstants.SONAR_LF_GRAVATAR_SERVER_URL) .name("Gravatar URL") .description("Optional URL of custom Gravatar service. Accepted variables are {EMAIL_MD5} for MD5 hash of email and {SIZE} for the picture size in pixels.") .defaultValue("https://secure.gravatar.com/avatar/{EMAIL_MD5}.jpg?s={SIZE}&d=identicon") diff --git a/sonar-core/src/main/java/org/sonar/core/config/WebConstants.java b/sonar-core/src/main/java/org/sonar/core/config/WebConstants.java new file mode 100644 index 00000000000..b8a2c5df455 --- /dev/null +++ b/sonar-core/src/main/java/org/sonar/core/config/WebConstants.java @@ -0,0 +1,36 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.sonar.core.config; + +/** + * List of web setting keys not defined in {@link org.sonar.api.CoreProperties} + */ +public final class WebConstants { + + private WebConstants() { + } + + public static final String SONAR_LF_ENABLE_GRAVATAR = "sonar.lf.enableGravatar"; + public static final String SONAR_LF_GRAVATAR_SERVER_URL = "sonar.lf.gravatarServerUrl"; + public static final String SONAR_LF_LOGO_URL = "sonar.lf.logoUrl"; + public static final String SONAR_LF_LOGO_WIDTH_PX = "sonar.lf.logoWidthPx"; + public static final String SONAR_UPDATECENTER_ACTIVATE = "sonar.updatecenter.activate"; +} -- cgit v1.2.3