public class DataManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> |
DEFAULT_PERMISSIONS
Constant map with all initial default permissions.
|
static int |
NUMBER_OF_THREAD_FOR_HTTP_SERVER_CONNECTION_POOL |
static java.lang.String |
TEST_DATA_STRING |
| Constructor and Description |
|---|
DataManager() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Long |
getAvailableStorageSpace()
Getter for the available space in the mount path of eDAL.
|
static EdalConfiguration |
getConfiguration()
Getter for the
EdalConfiguration. |
static java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> |
getDefaultPermissions() |
static ImplementationProvider |
getImplProv()
Getter for the current
ImplementationProvider. |
static java.util.concurrent.ExecutorService |
getJettyThreadPool()
Getter for the
ThreadPool for EdalHttpServer. |
static java.util.concurrent.ExecutorService |
getListThreadPool()
Getter for the
ThreadPool for ListThread |
static PrimaryDataDirectory |
getRootDirectory(ImplementationProvider implementationProvider,
javax.security.auth.Subject subject)
Static function to get the root
PrimaryDataDirectory of the
eDAL-System. |
static javax.security.auth.Subject |
getSubject()
In order to know, who is working with an eDAL data structure instance.
|
static java.util.List<java.lang.Class<? extends java.security.Principal>> |
getSupportedPrincipals()
Getter all supported
Principals of the current eDAL system. |
static java.lang.Long |
getUsedStorageSpace()
Getter for the used space in the mount path of eDAL.
|
static void |
receiveTestData(java.io.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 |
sendEmail(java.lang.String message,
java.lang.String subject,
java.lang.String emailAddress)
Function to send an eMail to the given recipient.
|
static void |
sendEmail(java.lang.String message,
java.lang.String subject,
java.lang.String emailAddress,
java.net.URL attachment)
Function to send an eMail with attachment to the given recipient.
|
static void |
setDefaultPermissions(java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> newUserPermissions)
Overrides the current default permissions of the current user with the new
permissions.
|
static void |
setSubject(javax.security.auth.Subject subject)
Setter for the current
Subject. |
static void |
shutdown()
Convenience function to shutdown the eDAL system.
|
static void |
waitForShutDown() |
public static final java.lang.String TEST_DATA_STRING
public static final int NUMBER_OF_THREAD_FOR_HTTP_SERVER_CONNECTION_POOL
public static final java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> DEFAULT_PERMISSIONS
Methods.listPrimaryDataEntities
Methods.listPrimaryDataEntitiesByDate
Methods.getPrimaryDataEntity
Methods.read
Methods.exist
Methods.getParentDirectory
Methods.getVersions
Methods.getCurrentVersion
Methods.searchByDublinCoreElement
Methods.searchByMetaData
public static java.lang.Long getAvailableStorageSpace()
throws EdalException
EdalException - if no path is specified.public static EdalConfiguration getConfiguration()
EdalConfiguration.EdalConfiguration.public static java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> getDefaultPermissions()
public static ImplementationProvider getImplProv()
ImplementationProvider.public static PrimaryDataDirectory getRootDirectory(ImplementationProvider implementationProvider, javax.security.auth.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 javax.security.auth.Subject getSubject()
getRootDirectory(ImplementationProvider, Subject)
function the subject as ThreadLocal object to the current threadpublic static java.util.List<java.lang.Class<? extends java.security.Principal>> getSupportedPrincipals()
throws EdalException
Principals of the current eDAL system.PrincipalsEdalException - if unable to load Principals.public static java.lang.Long getUsedStorageSpace()
throws EdalException
EdalException - if no path is specified.public static void resetDefaultPermissions()
DEFAULT_PERMISSIONS.public static void sendEmail(java.lang.String message,
java.lang.String subject,
java.lang.String emailAddress)
message - the message to sendsubject - the subject of the eMailemailAddress - the eMail address of the recipient.public static void sendEmail(java.lang.String message,
java.lang.String subject,
java.lang.String emailAddress,
java.net.URL attachment)
message - the message to sendsubject - the subject of the eMailemailAddress - the eMail address of the recipient.attachment - the attached Filepublic static void setDefaultPermissions(java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> newUserPermissions)
newUserPermissions - the user permissions to set to the default permissions.public static void setSubject(javax.security.auth.Subject subject)
Subject.subject - a Subject object.public static void shutdown()
public static void waitForShutDown()
public static java.util.concurrent.ExecutorService getJettyThreadPool()
ThreadPool for EdalHttpServer.public static java.util.concurrent.ExecutorService getListThreadPool()
ThreadPool for ListThreadpublic static void receiveTestData(java.io.OutputStream outputStream)
throws java.io.IOException
OutputStream containing a short String to test server
connectivityoutputStream - the OutputStream to fill in the Stringjava.io.IOException - if unable to send