Class ClientDataManager


  • public class ClientDataManager
    extends java.lang.Object
    Class that provides the connection to an eDAL RMI server.
    • Field Detail

      • logger

        public static org.apache.logging.log4j.Logger logger
      • DEFAULT_PERMISSIONS

        public static java.util.Map<java.security.Principal,​java.util.List<GrantableMethods.Methods>> DEFAULT_PERMISSIONS
        Constant map with all initial default permissions.

        ALLPrincipal:

        Methods.listPrimaryDataEntities

        Methods.getPrimaryDataEntity

        Methods.read

        Methods.exist

        Methods.getParentDirectory

        Methods.getVersions

        Methods.getCurrentVersion

        Methods.searchByDublinCoreElement

        Methods.searchByMetaData

    • Method Detail

      • init

        public static void init()
        Do nothing. Just to force the Java Class loader to load the class and run the static block to initialize the logging system.
      • createMetadataInstance

        public MetaData createMetadataInstance()
        Create a new MetaData instance with default values.
        Returns:
        a new MetaData object.
      • getAvailableStorageSpace

        public java.lang.Long getAvailableStorageSpace()
                                                throws java.rmi.RemoteException,
                                                       EdalException
        Getter for the available space in the mount path of eDAL.
        Returns:
        available space
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        EdalException - if no mount path is set.
      • getDefaultPermissions

        public java.util.Map<java.security.Principal,​java.util.List<GrantableMethods.Methods>> getDefaultPermissions()
        Get the local stored default permissions for the current client user.
        Returns:
        the Map with the default permissions.
      • getRegistryPort

        public int getRegistryPort()
        Returns:
        the registryPort
      • getServerAddress

        public java.lang.String getServerAddress()
        Returns:
        the serverAddress
      • getSubject

        protected javax.security.auth.Subject getSubject()
        Getter for the current Subject.
        Returns:
        the subject
      • getSupportedPrincipals

        public java.util.List<java.lang.Class<? extends java.security.Principal>> getSupportedPrincipals()
                                                                                                  throws java.rmi.RemoteException,
                                                                                                         EdalException
        Getter all supported Principals of the current eDAL system.
        Returns:
        the list of supported Principals
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        EdalException - if unable to load Principals.
      • getUsedStorageSpace

        public java.lang.Long getUsedStorageSpace()
                                           throws java.rmi.RemoteException,
                                                  EdalException
        Getter for the used space in the mount path of eDAL.
        Returns:
        used space
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        EdalException - if no mount path is set.
      • resetDefaultPermissions

        public void resetDefaultPermissions()
        Reset the initial default permissions.
      • setDefaultPermissions

        public void setDefaultPermissions​(java.util.Map<java.security.Principal,​java.util.List<GrantableMethods.Methods>> permissions)
        Overrides the current default permissions of the current user with the new permissions.
        Parameters:
        permissions - the permissions to store.
      • testReadingFromServer

        public void testReadingFromServer​(java.lang.String fileName,
                                          java.io.OutputStream outputStream)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • testStoringOnServer

        public void testStoringOnServer​(java.lang.String fileName,
                                        java.io.InputStream inputStream)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • sendEmail

        public void sendEmail​(java.lang.String emailMessage,
                              java.lang.String emailSubject)
                       throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
      • sendEmail

        public void sendEmail​(java.lang.String emailMessage,
                              java.lang.String emailSubject,
                              java.net.URL attachment)
                       throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException