public class DataManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static Map<Principal,List<GrantableMethods.Methods>> |
DEFAULT_PERMISSIONS
Constant map with all initial default permissions.
|
static String |
TEST_DATA_STRING |
| Constructor and Description |
|---|
DataManager() |
| Modifier and Type | Method and Description |
|---|---|
static Long |
getAvailableStorageSpace()
Getter for the available space in the mount path of eDAL.
|
static EdalConfiguration |
getConfiguration()
Getter for the
EdalConfiguration. |
static Map<Principal,List<GrantableMethods.Methods>> |
getDefaultPermissions() |
static ImplementationProvider |
getImplProv()
Getter for the current
ImplementationProvider. |
static ExecutorService |
getJettyThreadPool()
Getter for the
ThreadPool for EdalJettyServer. |
static ExecutorService |
getListThreadPool()
Getter for the
ThreadPool for ListThread |
static PrimaryDataDirectory |
getRootDirectory(ImplementationProvider implementationProvider,
Subject subject)
Static function to get the root
PrimaryDataDirectory of the
eDAL-System. |
static Subject |
getSubject()
In order to know, who is working with an eDAL data structure instance.
|
static List<Class<? extends Principal>> |
getSupportedPrincipals()
Getter all supported
Principals of the current eDAL system. |
static Long |
getUsedStorageSpace()
Getter for the used space in the mount path of eDAL.
|
static void |
receiveTestData(OutputStream outputStream)
Send an
OutputStream containing a short String to test
server connectivity |
static void |
resetDefaultPermissions()
Reload all initial default permission in
DEFAULT_PERMISSIONS. |
static void |
setDefaultPermissions(Map<Principal,List<GrantableMethods.Methods>> newUserPermissions)
Overrides the current default permissions of the current user with the
new permissions.
|
static void |
setSubject(Subject subject)
Setter for the current
Subject. |
static void |
shutdown()
Convenience function to shutdown the eDAL system.
|
static void |
waitForShutDown() |
public static final String TEST_DATA_STRING
public static final Map<Principal,List<GrantableMethods.Methods>> DEFAULT_PERMISSIONS
ALLPrincipal:public static Long getAvailableStorageSpace() throws EdalException
EdalException - if no path is specified.public static EdalConfiguration getConfiguration()
EdalConfiguration.EdalConfiguration.public static Map<Principal,List<GrantableMethods.Methods>> getDefaultPermissions()
public static ImplementationProvider getImplProv()
ImplementationProvider.public static PrimaryDataDirectory getRootDirectory(ImplementationProvider implementationProvider, Subject subject) throws PrimaryDataDirectoryException
PrimaryDataDirectory of the
eDAL-System.implementationProvider - must provide the implementing classes the implementation,
which will be used. The call pass the current logged in JAAS
subject.For example:
ImplementationProvider myImpl = new MyEDALImplementation();
LoginContext CTX = new LoginContext(...);
CTX();
Subject mySubject = CTX.getSubject();
PrimaryDataDirectory root_dir = DataManager.getRootDirectory(myImpl, mySubject);
subject - the authenticated subjectPrimaryDataDirectory for the passed
implementationPrimaryDataDirectoryException - if unable to create
MetaData
instance or if unable to initialize security system.public static Subject getSubject()
getRootDirectory(ImplementationProvider, Subject)
function the subject as ThreadLocal object to the current threadpublic static List<Class<? extends Principal>> getSupportedPrincipals() throws EdalException
Principals of the current eDAL system.PrincipalsEdalException - if unable to load Principals.public static Long getUsedStorageSpace() throws EdalException
EdalException - if no path is specified.public static void resetDefaultPermissions()
DEFAULT_PERMISSIONS.public static void setDefaultPermissions(Map<Principal,List<GrantableMethods.Methods>> newUserPermissions)
newUserPermissions - the user permissions to set to the default permissions.public static void setSubject(Subject subject)
Subject.subject - a Subject object.public static void shutdown()
public static void waitForShutDown()
public static ExecutorService getJettyThreadPool()
ThreadPool for EdalJettyServer.public static ExecutorService getListThreadPool()
ThreadPool for ListThreadpublic static void receiveTestData(OutputStream outputStream) throws IOException
OutputStream containing a short String to test
server connectivityoutputStream - the OutputStream to fill in the StringIOException - if unable to sendCopyright © 2015 Leibniz Institute of Plant Genetics and Crop Plant Research (IPK). All rights reserved.