public class EdalHelpers
extends java.lang.Object
| Constructor and Description |
|---|
EdalHelpers() |
| Modifier and Type | Method and Description |
|---|---|
static javax.security.auth.Subject |
authenticateElixirUser(java.lang.String httpProxyHost,
int httpProxyPort)
Authenticate user using the
GoogleLoginModule. |
static javax.security.auth.Subject |
authenticateGoogleUser()
Authenticate user using the
GoogleLoginModule. |
static javax.security.auth.Subject |
authenticateGoogleUser(java.lang.String httpProxyHost,
int httpProxyPort)
Authenticate user using the
GoogleLoginModule. |
static javax.security.auth.Subject |
authenticateIPKKerberosUser(java.lang.String user)
Authenticate user using the IPK Kerberos-LoginModule.
|
static javax.security.auth.Subject |
authenticateORCIDUser(java.lang.String httpProxyHost,
int httpProxyPort)
Authenticate user using the
ORCIDLoginModule. |
static javax.security.auth.Subject |
authenticateSampleUser()
Authenticate user using the
SampleUserLoginModule
-LoginModule. |
static javax.security.auth.Subject |
authenticateSubjectWithKerberos(java.lang.String kerberosRealm,
java.lang.String kerberosKDC,
java.lang.String user)
Authenticate user using the specified Kerberos-LoginModule.
|
static javax.security.auth.Subject |
authenticateUser(java.lang.String name,
java.lang.String password)
Authenticate user using the
UserLoginModule
-LoginModule. |
static javax.security.auth.Subject |
authenticateWinOrUnixOrMacUser()
Authenticate user using the Windows- or Unix- or MAC-LoginModule.
|
static void |
cleanMountPath(java.nio.file.Path path)
Clean all files in directory.
|
static ImplementationProvider |
getFileSystemImplementationProvider(boolean cleanMountPathBefore,
EdalConfiguration config)
Get a new
FileSystemImplementationProvider. |
static void |
getSearchStatistic(org.hibernate.stat.Statistics statistics)
Print SearchStatistic.
|
static void |
getStatistic(org.hibernate.stat.Statistics statistics)
Print PermissionStatistic.
|
public static javax.security.auth.Subject authenticateGoogleUser()
throws EdalAuthenticateException
GoogleLoginModule.SubjectEdalAuthenticateException - if unable to run LoginModule
successful.public static javax.security.auth.Subject authenticateORCIDUser(java.lang.String httpProxyHost,
int httpProxyPort)
throws EdalAuthenticateException
ORCIDLoginModule.httpProxyHost - the address of the HTTP proxy hosthttpProxyPort - the address of the HTTP proxy portSubjectEdalAuthenticateException - if unable to run LoginModule
successful.public static javax.security.auth.Subject authenticateElixirUser(java.lang.String httpProxyHost,
int httpProxyPort)
throws EdalAuthenticateException
GoogleLoginModule.httpProxyHost - the address of the HTTP proxy hosthttpProxyPort - the address of the HTTP proxy portSubjectEdalAuthenticateException - if unable to run LoginModule
successful.public static javax.security.auth.Subject authenticateGoogleUser(java.lang.String httpProxyHost,
int httpProxyPort)
throws EdalAuthenticateException
GoogleLoginModule.httpProxyHost - the address of the HTTP proxy hosthttpProxyPort - the address of the HTTP proxy portSubjectEdalAuthenticateException - if unable to run LoginModule
successful.public static javax.security.auth.Subject authenticateIPKKerberosUser(java.lang.String user)
throws EdalAuthenticateException
user - user name.SubjectEdalAuthenticateException - if unable to run LoginModule
successful.public static javax.security.auth.Subject authenticateUser(java.lang.String name,
java.lang.String password)
throws EdalAuthenticateException
UserLoginModule
-LoginModule.name - the user name to authenticatepassword - the password of the user to authenticateSubjectEdalAuthenticateException - if unable to run LoginModule
successful.public static javax.security.auth.Subject authenticateSampleUser()
throws EdalAuthenticateException
SampleUserLoginModule
-LoginModule.SubjectEdalAuthenticateException - if unable to run LoginModule
successful.public static javax.security.auth.Subject authenticateSubjectWithKerberos(java.lang.String kerberosRealm,
java.lang.String kerberosKDC,
java.lang.String user)
throws EdalAuthenticateException
kerberosRealm - the Kerberos realmkerberosKDC - the Kerberos KDCuser - optional usernameSubjectEdalAuthenticateException - if unable to run LoginModule
successful.public static javax.security.auth.Subject authenticateWinOrUnixOrMacUser()
throws EdalAuthenticateException
SubjectEdalAuthenticateException - if the authentication failedpublic static void cleanMountPath(java.nio.file.Path path)
throws EdalException
path - a Path object.EdalException - if unable to clean mount path.public static ImplementationProvider getFileSystemImplementationProvider(boolean cleanMountPathBefore, EdalConfiguration config) throws EdalException
FileSystemImplementationProvider. The path to use for file
storage and database is set to users home/edal_testcleanMountPathBefore - true if you want to clean the database before start eDAL.config - the EdalConfiguration class.FileSystemImplementationProviderEdalException - if unable to clean mount path or create new mount path.public static void getSearchStatistic(org.hibernate.stat.Statistics statistics)
statistics - the Statistics to get informationpublic static void getStatistic(org.hibernate.stat.Statistics statistics)
statistics - the Statistics to get information