org.gcube.datatransformation.datatransformationlibrary.security
Class DTSSManager

java.lang.Object
  extended by org.gcube.datatransformation.datatransformationlibrary.security.DTSSManager

public class DTSSManager
extends Object

Author:
Dimitris Katris, NKUA Helper class which maintains scope and credentials in the context of the transformationUnit.

Field Summary
protected static HashMap<org.gcube.common.core.scope.GCUBEScope,DTSCore> dCoreMap
           
 
Constructor Summary
DTSSManager()
           
 
Method Summary
static DTSCore getDTSCore()
          Returns the DTSCore instance which is used in this scope.
static org.gcube.common.core.scope.GCUBEScope getScope()
          Returns the scope in which the transformationUnit operates.
static org.gcube.common.core.security.GCUBESecurityManager getSecurityManager()
          Returns the security manager after setting to it the thread local credentials.
static void init(org.gcube.common.core.contexts.GCUBEServiceContext serviceContext)
          Initializes the DTSSManager.
static void setScope(String scope)
          Sets the scope in which the transformationUnit operates.
static void setSecurityManager(org.gcube.common.core.security.GCUBESecurityManager manager)
          Sets the security manager which will be used by the service.
static void useCredentials(org.gcube.common.core.security.SecurityCredentials credentials)
          Uses the credentials in the current thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dCoreMap

protected static volatile HashMap<org.gcube.common.core.scope.GCUBEScope,DTSCore> dCoreMap
Constructor Detail

DTSSManager

public DTSSManager()
Method Detail

setSecurityManager

public static void setSecurityManager(org.gcube.common.core.security.GCUBESecurityManager manager)
Sets the security manager which will be used by the service.

Parameters:
manager - The security manager.

getSecurityManager

public static org.gcube.common.core.security.GCUBESecurityManager getSecurityManager()
Returns the security manager after setting to it the thread local credentials.

Returns:
The security manager.

useCredentials

public static void useCredentials(org.gcube.common.core.security.SecurityCredentials credentials)
Uses the credentials in the current thread.

Parameters:
credentials - The credentials which will be used.

getScope

public static org.gcube.common.core.scope.GCUBEScope getScope()
Returns the scope in which the transformationUnit operates.

Returns:
The scope in which the transformationUnit operates.

setScope

public static void setScope(String scope)
Sets the scope in which the transformationUnit operates.

Parameters:
scope - the scope in which the transformationUnit operates.

getDTSCore

public static DTSCore getDTSCore()
                          throws org.gcube.common.core.faults.GCUBEFault
Returns the DTSCore instance which is used in this scope.

Returns:
The DTSCore instance which is used in this scope.
Throws:
org.gcube.common.core.faults.GCUBEFault - If the service is not deployed in the scope in which the request is maid.

init

public static void init(org.gcube.common.core.contexts.GCUBEServiceContext serviceContext)
                 throws Exception
Initializes the DTSSManager.

Parameters:
serviceContext - The gCube context of the service.
Throws:
Exception - If the DTSSManager could not be initialized.


Copyright © 2013. All Rights Reserved.