public class ClientDataManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static Map<Principal,List<de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods>> |
DEFAULT_PERMISSIONS
Constant map with all initial default permissions.
|
static org.apache.log4j.Logger |
logger |
| Constructor and Description |
|---|
ClientDataManager(String serverAddress,
int registryPort,
de.ipk_gatersleben.bit.bi.edal.rmi.server.Authentication authentication)
Constructor for
ClientDataManager. |
| Modifier and Type | Method and Description |
|---|---|
de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.MetaData |
createMetadataInstance()
Create a new
MetaData instance with default values. |
de.ipk_gatersleben.bit.bi.edal.rmi.server.Authentication |
getAuthentication() |
Long |
getAvailableStorageSpace()
Getter for the available space in the mount path of eDAL.
|
Map<Principal,List<de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods>> |
getDefaultPermissions()
Get the local stored default permissions for the current client user.
|
int |
getRegistryPort() |
ClientPrimaryDataDirectory |
getRootDirectory()
Central entry point.
|
String |
getServerAddress() |
protected Subject |
getSubject()
Getter for the current
Subject. |
List<Class<? extends Principal>> |
getSupportedPrincipals()
Getter all supported
Principals of the current eDAL system. |
Long |
getUsedStorageSpace()
Getter for the used space in the mount path of eDAL.
|
static void |
init()
Do nothing.
|
void |
resetDefaultPermissions()
Reset the initial default permissions.
|
void |
setDefaultPermissions(Map<Principal,List<de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods>> permissions)
Overrides the current default permissions of the current user with the
new permissions.
|
void |
testReadingFromServer(String fileName,
OutputStream outputStream) |
void |
testStoringOnServer(String fileName,
InputStream inputStream) |
public static org.apache.log4j.Logger logger
public static Map<Principal,List<de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods>> DEFAULT_PERMISSIONS
ALLPrincipal:
Methods.listPrimaryDataEntities
Methods.getPrimaryDataEntity
Methods.read
Methods.exist
Methods.getParentDirectory
Methods.getVersions
Methods.getCurrentVersion
Methods.searchByDublinCoreElement
Methods.searchByMetaData
public ClientDataManager(String serverAddress, int registryPort, de.ipk_gatersleben.bit.bi.edal.rmi.server.Authentication authentication) throws de.ipk_gatersleben.bit.bi.edal.primary_data.security.EdalAuthenticateException
ClientDataManager.authentication - the Authentication object.registryPort - the port to the eDAL server.serverAddress - the path of the eDAL server.de.ipk_gatersleben.bit.bi.edal.primary_data.security.EdalAuthenticateException - if the Subject is null.public static void init()
public de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.MetaData createMetadataInstance()
MetaData instance with default values.MetaData object.public de.ipk_gatersleben.bit.bi.edal.rmi.server.Authentication getAuthentication()
public Long getAvailableStorageSpace() throws RemoteException, de.ipk_gatersleben.bit.bi.edal.primary_data.file.EdalException
RemoteException - if unable to call remote function.de.ipk_gatersleben.bit.bi.edal.primary_data.file.EdalException - if no mount path is set.public Map<Principal,List<de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods>> getDefaultPermissions()
Map with the default permissions.public int getRegistryPort()
public ClientPrimaryDataDirectory getRootDirectory() throws RemoteException, NotBoundException, de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectoryException, de.ipk_gatersleben.bit.bi.edal.primary_data.file.EdalException, de.ipk_gatersleben.bit.bi.edal.primary_data.security.EdalAuthenticateException
ClientPrimaryDataDirectory.ClientPrimaryDataDirectory object.RemoteException - if unable to call remote function.NotBoundException - if no DataManagerRmiInterface is bound.de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectoryException - if unable to load the rootDirectory.de.ipk_gatersleben.bit.bi.edal.primary_data.file.EdalException - if failedde.ipk_gatersleben.bit.bi.edal.primary_data.security.EdalAuthenticateException - if authentication failedpublic String getServerAddress()
public List<Class<? extends Principal>> getSupportedPrincipals() throws RemoteException, de.ipk_gatersleben.bit.bi.edal.primary_data.file.EdalException
Principals of the current eDAL system.PrincipalsRemoteException - if unable to call remote function.de.ipk_gatersleben.bit.bi.edal.primary_data.file.EdalException - if unable to load Principals.public Long getUsedStorageSpace() throws RemoteException, de.ipk_gatersleben.bit.bi.edal.primary_data.file.EdalException
RemoteException - if unable to call remote function.de.ipk_gatersleben.bit.bi.edal.primary_data.file.EdalException - if no mount path is set.public void resetDefaultPermissions()
public void setDefaultPermissions(Map<Principal,List<de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods>> permissions)
permissions - the permissions to store.public void testReadingFromServer(String fileName, OutputStream outputStream) throws IOException
IOExceptionpublic void testStoringOnServer(String fileName, InputStream inputStream) throws IOException
IOExceptionCopyright © 2016 Leibniz Institute of Plant Genetics and Crop Plant Research (IPK). All rights reserved.