1 /*******************************************************************************
2 * Copyright (c) 2013 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Semantum Oy - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db.layer0.adapter.impl;
14 import org.simantics.db.ReadGraph;
15 import org.simantics.db.WriteGraph;
16 import org.simantics.db.exception.DatabaseException;
17 import org.simantics.db.layer0.adapter.Remover;
20 * A {@link Remover} implementation that never allows removal. It uses the
21 * provided String as a reason for not allowing removal in
22 * {@link #canRemove(ReadGraph, java.util.Map)}
24 * @author Tuukka Lehtonen
26 public class FailingRemover implements Remover {
30 public FailingRemover(String reason) throws DatabaseException {
34 public String canRemove(ReadGraph graph, java.util.Map<Object,Object> aux) {
39 public void remove(WriteGraph graph) throws DatabaseException {