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 MetaDataImplementationcreateMetaDataInstance()Create an new instance of theMetaDataimplementation class.java.lang.Class<? extends ApprovalServiceProvider>getApprovalServiceProvider()Getter for theApprovalServiceProviderimplementation classorg.ehcache.CacheManagergetCacheManager()EdalConfigurationgetConfiguration()Getter for the configuration class with all parameter to start the eDAL system.java.nio.file.PathgetDataPath()Private getter for the dataPathjava.lang.Class<? extends HttpServiceProvider>getHttpServiceProvider()Getter for theHttpServiceProviderimplementation class.IndexWriterThreadgetIndexThread()org.apache.logging.log4j.LoggergetLogger()Getter for the current logger for system outputjava.nio.file.PathgetMountPath()Getter for the mount path of the EDAL system.java.lang.Class<? extends PermissionProvider>getPermissionProvider()Getter for thePermissionProviderimplementation class.java.lang.Class<? extends PrimaryDataDirectory>getPrimaryDataDirectoryProvider()Getter for thePrimaryDataDirectoryimplementation class.java.lang.Class<? extends PrimaryDataFile>getPrimaryDataFileProvider()Getter for thePrimaryDataFileimplementation class.java.lang.Class<? extends ServiceProvider>getServiceProvider()Getter for theServiceProviderimplementation class.org.hibernate.SessiongetSession()Getter for a newSessionfor public access.org.hibernate.stat.StatisticsgetStatistics()Getter for theStatisticsof theSessionFactoryPrimaryDataDirectorymount(java.util.List<java.lang.Class<? extends java.security.Principal>> supportedPrincipals)Check if a rootPrimaryDataDirectoryexists and return it or create an new rootPrimaryDataDirectoryPrimaryDataEntityreloadPrimaryDataEntityByID(java.lang.String uuid, long versionNumber)Internal Function to reload aPrimaryDataEntitywith hisUUID.voidshutdown()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 theMetaDataimplementation class.- Specified by:
createMetaDataInstancein interfaceImplementationProvider- Returns:
- a instance of the implementing class of
MetaData.
-
getApprovalServiceProvider
public java.lang.Class<? extends ApprovalServiceProvider> getApprovalServiceProvider()
Getter for theApprovalServiceProviderimplementation class- Specified by:
getApprovalServiceProviderin 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:
getConfigurationin interfaceImplementationProvider- Returns:
- an
EdalConfigurationclass.
-
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:
getLoggerin 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 thePermissionProviderimplementation class.- Specified by:
getPermissionProviderin interfaceImplementationProvider- Returns:
- the instance of
PermissionProviderto be use.
-
getPrimaryDataDirectoryProvider
public java.lang.Class<? extends PrimaryDataDirectory> getPrimaryDataDirectoryProvider()
Getter for thePrimaryDataDirectoryimplementation class.- Specified by:
getPrimaryDataDirectoryProviderin interfaceImplementationProvider- Returns:
- the implementing class of
PrimaryDataDirectory.
-
reloadPrimaryDataEntityByID
public PrimaryDataEntity reloadPrimaryDataEntityByID(java.lang.String uuid, long versionNumber) throws EdalException
Internal Function to reload aPrimaryDataEntitywith hisUUID.- Specified by:
reloadPrimaryDataEntityByIDin interfaceImplementationProvider- Parameters:
uuid- theUUIDof thePrimaryDataEntityversionNumber- the number of thePrimaryDataEntityVersion- Returns:
- the
PrimaryDataEntity - Throws:
EdalException- if unable to find aPrimaryDataEntity
-
getPrimaryDataFileProvider
public java.lang.Class<? extends PrimaryDataFile> getPrimaryDataFileProvider()
Getter for thePrimaryDataFileimplementation class.- Specified by:
getPrimaryDataFileProviderin interfaceImplementationProvider- Returns:
- the implementing class of
PrimaryDataFile.
-
getSession
public org.hibernate.Session getSession()
Getter for a newSessionfor public access. NOTE: useSharedSessionContract.close()after UnitOfWork !- Returns:
- new Session
-
getStatistics
public org.hibernate.stat.Statistics getStatistics()
Getter for theStatisticsof theSessionFactory- Returns:
- the
Statistics
-
mount
public PrimaryDataDirectory mount(java.util.List<java.lang.Class<? extends java.security.Principal>> supportedPrincipals) throws PrimaryDataDirectoryException
Check if a rootPrimaryDataDirectoryexists and return it or create an new rootPrimaryDataDirectory- Specified by:
mountin interfaceImplementationProvider- Parameters:
supportedPrincipals- the supportedPrincipals- 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:
shutdownin interfaceImplementationProvider
-
getServiceProvider
public java.lang.Class<? extends ServiceProvider> getServiceProvider()
Description copied from interface:ImplementationProviderGetter for theServiceProviderimplementation class.- Specified by:
getServiceProviderin interfaceImplementationProvider- Returns:
- the implementing class of
ServiceProvider.
-
getHttpServiceProvider
public java.lang.Class<? extends HttpServiceProvider> getHttpServiceProvider()
Description copied from interface:ImplementationProviderGetter for theHttpServiceProviderimplementation class.- Specified by:
getHttpServiceProviderin interfaceImplementationProvider- Returns:
- the implementing class of
HttpServiceProvider.
-
getCacheManager
public org.ehcache.CacheManager getCacheManager()
-
-