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%2FPasteHandler.java;fp=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fadapter%2FPasteHandler.java;h=0a99117f0ffd3d114389c64dc985f1f7aa44aef5;hp=0aaaf4c5f44b19f71ff2fcb290fa58a04add689e;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/PasteHandler.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/PasteHandler.java index 0aaaf4c5f..0a99117f0 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/PasteHandler.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/PasteHandler.java @@ -1,53 +1,53 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 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: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.db.layer0.adapter; - -import java.util.Collection; - -import org.eclipse.core.runtime.IAdaptable; -import org.simantics.db.Resource; -import org.simantics.db.WriteGraph; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.layer0.util.Layer0Utils; -import org.simantics.db.layer0.util.PasteEventHandler; -import org.simantics.db.layer0.util.SimanticsClipboard; - -public interface PasteHandler extends IAdaptable { - - /** - * Performs actions to paste data from the specified clipboard instance. The - * target of pasting generally has something to do with the graph database - * but not necessarily. The method must internally start transactions to - * either read from or write to the graph database. - * - * @param clipboard clipboard instance to paste data from - * @throws DatabaseException - */ - Collection pasteFromClipboard(SimanticsClipboard clipboard) throws DatabaseException; - - /** - * Performs actions to paste data from the specified clipboard instance - * using the specified write transaction database handle. Just as in - * {@link #pasteFromClipboard(SimanticsClipboard)} this pasting generally - * does with the graph database. This method can be used for performing - * copy/paste operations as a part of a write transaction. - * - * @param graph the write transaction handle to use for writing the data - * @param clipboard clipboard instance to paste data from - * @throws DatabaseException - * @since 1.8 - * - * @see Layer0Utils#copyTo(WriteGraph, org.simantics.db.Resource, org.simantics.db.Resource) - */ - Collection pasteFromClipboard(WriteGraph graph, SimanticsClipboard clipboard, PasteEventHandler handler) throws DatabaseException; - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 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: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.db.layer0.adapter; + +import java.util.Collection; + +import org.eclipse.core.runtime.IAdaptable; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.util.Layer0Utils; +import org.simantics.db.layer0.util.PasteEventHandler; +import org.simantics.db.layer0.util.SimanticsClipboard; + +public interface PasteHandler extends IAdaptable { + + /** + * Performs actions to paste data from the specified clipboard instance. The + * target of pasting generally has something to do with the graph database + * but not necessarily. The method must internally start transactions to + * either read from or write to the graph database. + * + * @param clipboard clipboard instance to paste data from + * @throws DatabaseException + */ + Collection pasteFromClipboard(SimanticsClipboard clipboard) throws DatabaseException; + + /** + * Performs actions to paste data from the specified clipboard instance + * using the specified write transaction database handle. Just as in + * {@link #pasteFromClipboard(SimanticsClipboard)} this pasting generally + * does with the graph database. This method can be used for performing + * copy/paste operations as a part of a write transaction. + * + * @param graph the write transaction handle to use for writing the data + * @param clipboard clipboard instance to paste data from + * @throws DatabaseException + * @since 1.8 + * + * @see Layer0Utils#copyTo(WriteGraph, org.simantics.db.Resource, org.simantics.db.Resource) + */ + Collection pasteFromClipboard(WriteGraph graph, SimanticsClipboard clipboard, PasteEventHandler handler) throws DatabaseException; + +}