X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.browsing.ui%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2FStatePersistor.java;h=b351bbabc28d019761afac8cc2f35e65df221804;hp=49213b766a7e44eb360ed83fd9b9e2c4f1f8e743;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.browsing.ui/src/org/simantics/browsing/ui/StatePersistor.java b/bundles/org.simantics.browsing.ui/src/org/simantics/browsing/ui/StatePersistor.java index 49213b766..b351bbabc 100644 --- a/bundles/org.simantics.browsing.ui/src/org/simantics/browsing/ui/StatePersistor.java +++ b/bundles/org.simantics.browsing.ui/src/org/simantics/browsing/ui/StatePersistor.java @@ -1,54 +1,54 @@ -/******************************************************************************* - * Copyright (c) 2012 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.browsing.ui; - -import java.io.File; - -/** - * @author Antti Villberg - * @see GraphExplorer#setPersistor(StatePersistor) - */ -public interface StatePersistor { - - /** - * Deserializes a possibly stored state for the specified input from the - * specified location. The locality of the restored state is up to the - * implementation to decide (i.e. input-specific or more global). - * - * @param stateLocation - * the base location to deserialize the possible state from - * @param root - * the current input to deserialize the state for or - * null if no input is defined - * @return the deserialized state, may not be null. - * Implementations may return {@link ExplorerState#EMPTY} if there's - * no state to restore. - * @see ExplorerState#EMPTY - */ - ExplorerState deserialize(File stateLocation, NodeContext root); - - /** - * Serializes the specified explorer state for the specified input to the - * specified location. The locality of the stored state is up to the - * implementation to decide (i.e. input-specific or more global). - * - * @param stateLocation - * the base location to serialize the state to - * @param root - * the current input to serialize the state for or - * null if no input is defined - * @param state - * the state to serialize - */ - void serialize(File stateLocation, NodeContext root, ExplorerState state); - -} +/******************************************************************************* + * Copyright (c) 2012 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.browsing.ui; + +import java.io.File; + +/** + * @author Antti Villberg + * @see GraphExplorer#setPersistor(StatePersistor) + */ +public interface StatePersistor { + + /** + * Deserializes a possibly stored state for the specified input from the + * specified location. The locality of the restored state is up to the + * implementation to decide (i.e. input-specific or more global). + * + * @param stateLocation + * the base location to deserialize the possible state from + * @param root + * the current input to deserialize the state for or + * null if no input is defined + * @return the deserialized state, may not be null. + * Implementations may return {@link ExplorerState#EMPTY} if there's + * no state to restore. + * @see ExplorerState#EMPTY + */ + ExplorerState deserialize(File stateLocation, NodeContext root); + + /** + * Serializes the specified explorer state for the specified input to the + * specified location. The locality of the stored state is up to the + * implementation to decide (i.e. input-specific or more global). + * + * @param stateLocation + * the base location to serialize the state to + * @param root + * the current input to serialize the state for or + * null if no input is defined + * @param state + * the state to serialize + */ + void serialize(File stateLocation, NodeContext root, ExplorerState state); + +}