X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fadapter%2Fimpl%2FFailingRemover.java;h=04a740e2c419b86a33a93768d114b33a1c4fc18d;hp=9df49660a12f40b5cacb5edbd625be88d4f779db;hb=refs%2Fchanges%2F38%2F238%2F2;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/impl/FailingRemover.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/impl/FailingRemover.java index 9df49660a..04a740e2c 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/impl/FailingRemover.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/impl/FailingRemover.java @@ -1,42 +1,42 @@ -/******************************************************************************* - * Copyright (c) 2013 Association for Decentralized Information Management in - * Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Semantum Oy - initial API and implementation - *******************************************************************************/ -package org.simantics.db.layer0.adapter.impl; - -import org.simantics.db.ReadGraph; -import org.simantics.db.WriteGraph; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.layer0.adapter.Remover; - -/** - * A {@link Remover} implementation that never allows removal. It uses the - * provided String as a reason for not allowing removal in - * {@link #canRemove(ReadGraph, java.util.Map)} - * - * @author Tuukka Lehtonen - */ -public class FailingRemover implements Remover { - - String reason; - - public FailingRemover(String reason) throws DatabaseException { - this.reason = reason; - } - - public String canRemove(ReadGraph graph, java.util.Map aux) { - return reason; - }; - - @Override - public void remove(WriteGraph graph) throws DatabaseException { - } - -} +/******************************************************************************* + * Copyright (c) 2013 Association for Decentralized Information Management in + * Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Semantum Oy - initial API and implementation + *******************************************************************************/ +package org.simantics.db.layer0.adapter.impl; + +import org.simantics.db.ReadGraph; +import org.simantics.db.WriteGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.adapter.Remover; + +/** + * A {@link Remover} implementation that never allows removal. It uses the + * provided String as a reason for not allowing removal in + * {@link #canRemove(ReadGraph, java.util.Map)} + * + * @author Tuukka Lehtonen + */ +public class FailingRemover implements Remover { + + String reason; + + public FailingRemover(String reason) throws DatabaseException { + this.reason = reason; + } + + public String canRemove(ReadGraph graph, java.util.Map aux) { + return reason; + }; + + @Override + public void remove(WriteGraph graph) throws DatabaseException { + } + +}