diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-12-22 19:12:57 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-12-22 19:12:57 +0000 |
commit | e8fdc7a09f6356dbcec4a8fd1ab157b0e2097c39 (patch) | |
tree | 1b1c2fc961e20087a7dc5ddb9530ec2c2b7b8344 /sonar-plugin-api/src | |
parent | da01fe793bd8d7b542e358e0a1a98b4313e60b5d (diff) | |
download | sonarqube-e8fdc7a09f6356dbcec4a8fd1ab157b0e2097c39.tar.gz sonarqube-e8fdc7a09f6356dbcec4a8fd1ab157b0e2097c39.zip |
add the server-side component ServerUpgradeStatus to know the database version before starting the server
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java new file mode 100644 index 00000000000..68f5c2bab6d --- /dev/null +++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java @@ -0,0 +1,44 @@ +/* + * Sonar, open source software quality management tool. + * Copyright (C) 2009 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * Sonar 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. + * + * Sonar 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 Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.platform; + +import org.sonar.api.ServerComponent; + +/** + * @since 2.5 + */ +public interface ServerUpgradeStatus extends ServerComponent { + + /** + * Has the database been upgraded during the current startup ? Return false if isInstalledFromScratch() is true. + */ + boolean isUpgraded(); + + /** + * Has the database been created during the current startup ? + */ + boolean isInstalledFromScratch(); + + /** + * The database version before the server startup. Returns <=0 if db created from scratch. + */ + int getInitialDbVersion(); + +} |