Class FileSystemImplementationProvider
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.file.implementation.FileSystemImplementationProvider
-
- All Implemented Interfaces:
ImplementationProvider
public class FileSystemImplementationProvider extends java.lang.Object implements ImplementationProvider
FileSystem implementation ofImplementationProvider
-
-
Constructor Summary
Constructors Constructor Description FileSystemImplementationProvider(EdalConfiguration configuration)
-
Method Summary
Modifier and Type Method Description MetaDataImplementation
createMetaDataInstance()
Create an new instance of theMetaData
implementation class.java.lang.Class<? extends ApprovalServiceProvider>
getApprovalServiceProvider()
Getter for theApprovalServiceProvider
implementation classorg.ehcache.CacheManager
getCacheManager()
EdalConfiguration
getConfiguration()
Getter for the configuration class with all parameter to start the eDAL system.java.nio.file.Path
getDataPath()
Private getter for the dataPathjava.lang.Class<? extends HttpServiceProvider>
getHttpServiceProvider()
Getter for theHttpServiceProvider
implementation class.IndexWriterThread
getIndexThread()
org.apache.logging.log4j.Logger
getLogger()
Getter for the current logger for system outputjava.nio.file.Path
getMountPath()
Getter for the mount path of the EDAL system.java.lang.Class<? extends PermissionProvider>
getPermissionProvider()
Getter for thePermissionProvider
implementation class.java.lang.Class<? extends PrimaryDataDirectory>
getPrimaryDataDirectoryProvider()
Getter for thePrimaryDataDirectory
implementation class.java.lang.Class<? extends PrimaryDataFile>
getPrimaryDataFileProvider()
Getter for thePrimaryDataFile
implementation class.java.lang.Class<? extends ServiceProvider>
getServiceProvider()
Getter for theServiceProvider
implementation class.org.hibernate.Session
getSession()
Getter for a newSession
for public access.org.hibernate.stat.Statistics
getStatistics()
Getter for theStatistics
of theSessionFactory
PrimaryDataDirectory
mount(java.util.List<java.lang.Class<? extends java.security.Principal>> supportedPrincipals)
Check if a rootPrimaryDataDirectory
exists and return it or create an new rootPrimaryDataDirectory
PrimaryDataEntity
reloadPrimaryDataEntityByID(java.lang.String uuid, long versionNumber)
Internal Function to reload aPrimaryDataEntity
with hisUUID
.void
shutdown()
Cleanup all resources used by the particular implementation provider
-
-
-
Constructor Detail
-
FileSystemImplementationProvider
public FileSystemImplementationProvider(EdalConfiguration configuration)
-
-
Method Detail
-
createMetaDataInstance
public MetaDataImplementation createMetaDataInstance()
Create an new instance of theMetaData
implementation class.- Specified by:
createMetaDataInstance
in interfaceImplementationProvider
- Returns:
- a instance of the implementing class of
MetaData
.
-
getApprovalServiceProvider
public java.lang.Class<? extends ApprovalServiceProvider> getApprovalServiceProvider()
Getter for theApprovalServiceProvider
implementation class- Specified by:
getApprovalServiceProvider
in interfaceImplementationProvider
- Returns:
- the implementing class of
ApprovalServiceProvider
-
getConfiguration
public EdalConfiguration getConfiguration()
Getter for the configuration class with all parameter to start the eDAL system.- Specified by:
getConfiguration
in interfaceImplementationProvider
- Returns:
- an
EdalConfiguration
class.
-
getDataPath
public java.nio.file.Path getDataPath()
Private getter for the dataPath- Returns:
- the dataPath
-
getIndexThread
public IndexWriterThread getIndexThread()
- Returns:
- the indexThread
-
getLogger
public org.apache.logging.log4j.Logger getLogger()
Getter for the current logger for system output- Specified by:
getLogger
in interfaceImplementationProvider
- Returns:
- Logger
-
getMountPath
public java.nio.file.Path getMountPath()
Getter for the mount path of the EDAL system.- Returns:
- the current MountPath.
-
getPermissionProvider
public java.lang.Class<? extends PermissionProvider> getPermissionProvider()
Getter for thePermissionProvider
implementation class.- Specified by:
getPermissionProvider
in interfaceImplementationProvider
- Returns:
- the instance of
PermissionProvider
to be use.
-
getPrimaryDataDirectoryProvider
public java.lang.Class<? extends PrimaryDataDirectory> getPrimaryDataDirectoryProvider()
Getter for thePrimaryDataDirectory
implementation class.- Specified by:
getPrimaryDataDirectoryProvider
in interfaceImplementationProvider
- Returns:
- the implementing class of
PrimaryDataDirectory
.
-
reloadPrimaryDataEntityByID
public PrimaryDataEntity reloadPrimaryDataEntityByID(java.lang.String uuid, long versionNumber) throws EdalException
Internal Function to reload aPrimaryDataEntity
with hisUUID
.- Specified by:
reloadPrimaryDataEntityByID
in interfaceImplementationProvider
- Parameters:
uuid
- theUUID
of thePrimaryDataEntity
versionNumber
- the number of thePrimaryDataEntityVersion
- Returns:
- the
PrimaryDataEntity
- Throws:
EdalException
- if unable to find aPrimaryDataEntity
-
getPrimaryDataFileProvider
public java.lang.Class<? extends PrimaryDataFile> getPrimaryDataFileProvider()
Getter for thePrimaryDataFile
implementation class.- Specified by:
getPrimaryDataFileProvider
in interfaceImplementationProvider
- Returns:
- the implementing class of
PrimaryDataFile
.
-
getSession
public org.hibernate.Session getSession()
Getter for a newSession
for public access. NOTE: useSharedSessionContract.close()
after UnitOfWork !- Returns:
- new Session
-
getStatistics
public org.hibernate.stat.Statistics getStatistics()
Getter for theStatistics
of theSessionFactory
- Returns:
- the
Statistics
-
mount
public PrimaryDataDirectory mount(java.util.List<java.lang.Class<? extends java.security.Principal>> supportedPrincipals) throws PrimaryDataDirectoryException
Check if a rootPrimaryDataDirectory
exists and return it or create an new rootPrimaryDataDirectory
- Specified by:
mount
in interfaceImplementationProvider
- Parameters:
supportedPrincipals
- the supportedPrincipal
s- Returns:
- the root
PrimaryDataDirectory
. - Throws:
PrimaryDataDirectoryException
- if unable to mount with the eDAL system.
-
shutdown
public void shutdown()
Cleanup all resources used by the particular implementation provider- Specified by:
shutdown
in interfaceImplementationProvider
-
getServiceProvider
public java.lang.Class<? extends ServiceProvider> getServiceProvider()
Description copied from interface:ImplementationProvider
Getter for theServiceProvider
implementation class.- Specified by:
getServiceProvider
in interfaceImplementationProvider
- Returns:
- the implementing class of
ServiceProvider
.
-
getHttpServiceProvider
public java.lang.Class<? extends HttpServiceProvider> getHttpServiceProvider()
Description copied from interface:ImplementationProvider
Getter for theHttpServiceProvider
implementation class.- Specified by:
getHttpServiceProvider
in interfaceImplementationProvider
- Returns:
- the implementing class of
HttpServiceProvider
.
-
getCacheManager
public org.ehcache.CacheManager getCacheManager()
-
-