Skip to content
Snippets Groups Projects
Verified Commit 29c2ccaa authored by Timm Fitschen's avatar Timm Fitschen
Browse files

DOC: add CHANGELOG, remove unused classes

parent 8f048c91
No related branches found
No related tags found
2 merge requests!21Release v0.4.0,!18fix importance bug
Pipeline #8879 passed
......@@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
* Related to #146, a new flag for entities and complete transactions:
`force-missing-obligatory=[ignore|warn|error]`. The flag overrides the
default behavior of the server (throwing an error when an obligatory property
is missing). `ignore` just discards the consistency check, `warn` only issues
a warning when obligatory properties are missing and `error` throws an error
in that case. The flag can be set for the complete transaction and each
single entity, while the entity flag takes precedence.
* New EntityState plug-in. The plug-in disabled by default and can be enabled
by setting the server property `EXT_ENTITY_STATE=ENABLED`. See
[!62](https://gitlab.com/caosdb/caosdb-server/-/merge_requests/62) for more
......@@ -31,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
* #146 - Default behavior for missing obligatory properties
* #131 - CQL Parsing error when white space characters before some units.
* #134 - CQL Parsing error when multiple white space characters after `FROM`.
* #130 - Error during `FIND ENTITY` when
......
/// *
// * ** header v3.0
// * This file is a part of the CaosDB Project.
// *
// * Copyright (C) 2018 Research Group Biomedical Physics,
// * Max-Planck-Institute for Dynamics and Self-Organization Göttingen
// *
// * This program is free software: you can redistribute it and/or modify
// * it under the terms of the GNU Affero 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 Affero General Public License for more details.
// *
// * You should have received a copy of the GNU Affero General Public License
// * along with this program. If not, see <https://www.gnu.org/licenses/>.
// *
// * ** end header
// */
// package org.caosdb.server.database.backend.implementation.MySQL;
//
// import static org.caosdb.server.database.DatabaseUtils.bytes2UTF8;
//
// import java.sql.PreparedStatement;
// import java.sql.ResultSet;
// import java.sql.SQLException;
// import java.util.ArrayList;
// import org.caosdb.server.database.access.Access;
// import org.caosdb.server.database.backend.interfaces.RuleLoaderImpl;
// import org.caosdb.server.database.exceptions.TransactionException;
// import org.caosdb.server.database.proto.Rule;
// import org.caosdb.server.jobs.core.Mode;
//
// public class MySQLRuleLoader extends MySQLTransaction implements RuleLoaderImpl {
//
// public MySQLRuleLoader(final Access access) {
// super(access);
// }
//
// public static final String STMT_GET_RULES =
// "SELECT rules.transaction, rules.criterion, rules.modus from rules where rules.domain_id=?
// AND rules.entity_id=? AND rules.transaction=?";
//
// @Override
// public ArrayList<Rule> executeNoCache(
// final Integer domain, final Integer entity, final String transaction)
// throws TransactionException {
// try {
// final PreparedStatement stmt = prepareStatement(STMT_GET_RULES);
//
// stmt.setInt(1, domain);
// stmt.setInt(2, entity);
// stmt.setString(3, transaction);
// stmt.execute();
//
// final ResultSet rs = stmt.executeQuery();
// try {
// final ArrayList<Rule> ret = new ArrayList<Rule>();
// while (rs.next()) {
// final Rule r = new Rule();
// r.mode = Mode.valueOf(bytes2UTF8(rs.getBytes("modus")));
// r.job = bytes2UTF8(rs.getBytes("criterion"));
// r.domain = domain;
// r.entity = entity;
// r.transaction = transaction;
// ret.add(r);
// }
// return ret;
// } finally {
// rs.close();
// }
// } catch (final SQLException e) {
// throw new TransactionException(e);
// } catch (final ConnectionException e) {
// throw new TransactionException(e);
// }
// }
// }
/// *
// * ** header v3.0
// * This file is a part of the CaosDB Project.
// *
// * Copyright (C) 2018 Research Group Biomedical Physics,
// * Max-Planck-Institute for Dynamics and Self-Organization Göttingen
// *
// * This program is free software: you can redistribute it and/or modify
// * it under the terms of the GNU Affero 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 Affero General Public License for more details.
// *
// * You should have received a copy of the GNU Affero General Public License
// * along with this program. If not, see <https://www.gnu.org/licenses/>.
// *
// * ** end header
// */
// package org.caosdb.server.database.backend.interfaces;
//
// import java.util.ArrayList;
// import org.caosdb.server.database.exceptions.TransactionException;
// import org.caosdb.server.database.proto.Rule;
//
// public interface RuleLoaderImpl extends BackendTransactionImpl {
//
// public ArrayList<Rule> executeNoCache(Integer domain, Integer entity, String transaction)
// throws TransactionException;
// }
/// *
// * ** header v3.0
// * This file is a part of the CaosDB Project.
// *
// * Copyright (C) 2018 Research Group Biomedical Physics,
// * Max-Planck-Institute for Dynamics and Self-Organization Göttingen
// * Copyright (C) 2019 IndiScale GmbH
// * Copyright (C) 2019 Timm Fitschen (t.fitschen@indiscale.com)
// *
// * This program is free software: you can redistribute it and/or modify
// * it under the terms of the GNU Affero 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 Affero General Public License for more details.
// *
// * You should have received a copy of the GNU Affero General Public License
// * along with this program. If not, see <https://www.gnu.org/licenses/>.
// *
// * ** end header
// */
// package org.caosdb.server.database.backend.transaction;
//
// import java.util.ArrayList;
// import org.apache.commons.jcs.access.behavior.ICacheAccess;
// import org.caosdb.server.caching.Cache;
// import org.caosdb.server.database.CacheableBackendTransaction;
// import org.caosdb.server.database.backend.interfaces.RuleLoaderImpl;
// import org.caosdb.server.database.exceptions.TransactionException;
// import org.caosdb.server.database.proto.Rule;
// import org.caosdb.server.entity.EntityInterface;
// import org.caosdb.server.entity.container.TransactionContainer;
// import org.caosdb.server.entity.wrapper.Property;
// import org.caosdb.server.jobs.Job;
// import org.caosdb.server.transaction.Transaction;
//
/// **
// * Load transaction rules (e.g. "Referenced entities must always exist") and their configuration
// * from the back-end.
// *
// * @author Timm Fitschen (t.fitschen@indiscale.com)
// */
// public class RuleLoader extends CacheableBackendTransaction<String, ArrayList<Rule>> {
//
// private static final ICacheAccess<String, ArrayList<Rule>> cache =
// Cache.getCache("BACKEND_JobRules");
// private final Transaction<? extends TransactionContainer> transaction;
// private final EntityInterface e;
// private final Integer entity;
// private final Integer domain;
// private ArrayList<Job> jobs;
// private String transactionType;
//
// public RuleLoader(
// final Integer domain,
// final Integer entity,
// final EntityInterface e,
// final Transaction<? extends TransactionContainer> transaction) {
// super(cache);
// this.domain = domain;
// this.entity = entity;
// this.e = e;
// if (e instanceof Property) {
// this.transactionType = getTransactionType(((Property) e).getDomainEntity());
// } else {
// this.transactionType = getTransactionType(e);
// }
// this.transaction = transaction;
// }
//
// @Override
// protected String getKey() {
// return "<" + this.domain + "," + this.entity + "," + this.transactionType + ">";
// }
//
// public ArrayList<Job> getJobs() {
// return this.jobs;
// }
//
// @Override
// public ArrayList<Rule> executeNoCache() throws TransactionException {
// final RuleLoaderImpl t = getImplementation(RuleLoaderImpl.class);
// return t.executeNoCache(this.domain, this.entity, this.transactionType);
// }
//
// @Override
// protected void process(final ArrayList<Rule> t) throws TransactionException {
// this.jobs = new ArrayList<Job>();
// for (final Rule r : t) {
// this.jobs.add(Job.getJob(r.job, r.mode, this.e, this.transaction));
// }
// }
// }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment