res.setString(1, projectUuid);
int index = 2;
for (String dispatcherKey : dispatcherKeys) {
- res.setString(index, "notification." + dispatcherKey + ".%");
+ res.setString(index, NOTIFICATION_PREFIX + dispatcherKey + ".%");
index++;
}
return res;
" (?,?,?,?)")) {
long now = system2.now();
insert
- .setString(1, "views.def")
+ .setString(1, VIEWS_DEFINITION_PROPERTY_KEY)
.setBoolean(2, false)
.setString(3, property)
.setLong(4, now)
private String computeBaseUrl() {
String host = config.get("sonar.web.host").orElse("");
int port = config.getInt("sonar.web.port").orElse(0);
- String context = config.get("sonar.web.context").orElse("");
+ String context = config.get(PROPERTY_CONTEXT).orElse("");
StringBuilder res = new StringBuilder();
res.append("http://");
@Override
public void define(WebService.NewController controller) {
- controller.createAction("validate")
+ controller.createAction(VALIDATE_ACTION)
.setDescription("Check credentials.")
.setSince("3.3")
.setHandler(ServletFilterHandler.INSTANCE)
SMInputFactory inputFactory = initStax();
SMHierarchicCursor rootC = inputFactory.rootElementCursor(backup);
rootC.advance(); // <profile>
- if (!"profile".equals(rootC.getLocalName())) {
+ if (!ATTRIBUTE_PROFILE.equals(rootC.getLocalName())) {
throw new IllegalArgumentException("Backup XML is not valid. Root element must be <profile>.");
}
SMInputCursor cursor = rootC.childElementCursor();
.setResponseExample(getClass().getResource("deactivate-example.json"))
.setHandler(this);
- action.createParam("login")
+ action.createParam(PARAM_LOGIN)
.setDescription("User login")
.setRequired(true)
.setExampleValue("myuser");