X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.management%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fmanagement%2FISessionContextProviderSource.java;h=903cf08182327899cc34cfb8ed7e0bfdd0f97576;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=6c0337861b37b98822886f9b2fc0ada63cf40fa9;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.management/src/org/simantics/db/management/ISessionContextProviderSource.java b/bundles/org.simantics.db.management/src/org/simantics/db/management/ISessionContextProviderSource.java index 6c0337861..903cf0818 100644 --- a/bundles/org.simantics.db.management/src/org/simantics/db/management/ISessionContextProviderSource.java +++ b/bundles/org.simantics.db.management/src/org/simantics/db/management/ISessionContextProviderSource.java @@ -1,62 +1,62 @@ -/******************************************************************************* - * Copyright (c) 2007, 2011 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.management; - - -/** - * @author Tuukka Lehtonen - */ -public interface ISessionContextProviderSource { - - /** - * @param context the context object of the requested ISessionContextProvider - * @return null if there is no provider for the specified context - */ - ISessionContextProvider get(Object context); - - /** - * @return the currently active session context provider. Must always return - * a valid provider. - */ - ISessionContextProvider getActive(); - - /** - * @return all currently existing session context providers - */ - ISessionContextProvider[] getAll(); - - /** - * Used for manually installing ISessionContextProvider for a specified - * context handle object. - * - * @param context the context handle to associate the session context - * provider to. This same argument needs to be used with - * {@link #get(Object)} when retrieving your session context - * provider. - * @param provider the session context provider to associate with the - * specified context - */ - void put(Object context, ISessionContextProvider provider); - - /** - * Used for manually removing an (context, provider) association from this - * source. Only associations created with - * {@link #put(Object, ISessionContextProvider)} can be removed with this - * method. - * - * @param context the context handle to associate the session context - * provider to. - * @return the dissociated session context provider - */ - ISessionContextProvider remove(Object context); - -} +/******************************************************************************* + * Copyright (c) 2007, 2011 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.management; + + +/** + * @author Tuukka Lehtonen + */ +public interface ISessionContextProviderSource { + + /** + * @param context the context object of the requested ISessionContextProvider + * @return null if there is no provider for the specified context + */ + ISessionContextProvider get(Object context); + + /** + * @return the currently active session context provider. Must always return + * a valid provider. + */ + ISessionContextProvider getActive(); + + /** + * @return all currently existing session context providers + */ + ISessionContextProvider[] getAll(); + + /** + * Used for manually installing ISessionContextProvider for a specified + * context handle object. + * + * @param context the context handle to associate the session context + * provider to. This same argument needs to be used with + * {@link #get(Object)} when retrieving your session context + * provider. + * @param provider the session context provider to associate with the + * specified context + */ + void put(Object context, ISessionContextProvider provider); + + /** + * Used for manually removing an (context, provider) association from this + * source. Only associations created with + * {@link #put(Object, ISessionContextProvider)} can be removed with this + * method. + * + * @param context the context handle to associate the session context + * provider to. + * @return the dissociated session context provider + */ + ISessionContextProvider remove(Object context); + +}