
org.sonar.ce.db.ReadOnlyPropertiesDao Maven / Gradle / Ivy
/*
* 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.ce.db;
import java.util.Map;
import org.sonar.core.properties.PropertiesDao;
import org.sonar.db.DbSession;
import org.sonar.db.MyBatis;
import org.sonar.db.property.PropertyDto;
/**
* Compute Engine specific override of {@link PropertiesDao} and {@link org.sonar.db.property.PropertiesDao} which
* implements no write method (ie. insert/update/delete) because updating the Properties is the Web Server responsibility
* alone.
*
* This ugly trick is required because licensed plugin bundle {@link com.sonarsource.license.api.internal.ServerLicenseVerifierImpl}
* which update license properties by calling {@link PropertiesDao} directly and this can not be disabled.
*
*/
public class ReadOnlyPropertiesDao extends PropertiesDao {
public ReadOnlyPropertiesDao(MyBatis mybatis) {
super(mybatis);
}
@Override
public void insertProperty(DbSession session, PropertyDto property) {
// do nothing
}
@Override
public void insertProperty(PropertyDto property) {
// do nothing
}
@Override
public void deleteProjectProperty(String key, Long projectId) {
// do nothing
}
@Override
public void deleteProjectProperty(String key, Long projectId, DbSession session) {
// do nothing
}
@Override
public void deleteProjectProperties(String key, String value, DbSession session) {
// do nothing
}
@Override
public void deleteProjectProperties(String key, String value) {
// do nothing
}
@Override
public void deleteGlobalProperties() {
// do nothing
}
@Override
public void deleteGlobalProperty(String key, DbSession session) {
// do nothing
}
@Override
public void deleteGlobalProperty(String key) {
// do nothing
}
@Override
public void deleteAllProperties(String key) {
// do nothing
}
@Override
public void insertGlobalProperties(Map properties) {
// do nothing
}
@Override
public void renamePropertyKey(String oldKey, String newKey) {
// do nothing
}
@Override
public void updateProperties(String key, String oldValue, String newValue) {
// do nothing
}
@Override
public void updateProperties(String key, String oldValue, String newValue, DbSession session) {
// do nothing
}
@Override
public void setProperty(org.sonar.core.properties.PropertyDto property) {
// do nothing
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy