Class ClientPrimaryDataEntity

    • Field Detail

      • myEntityRMI

        protected de.ipk_gatersleben.bit.bi.edal.rmi.interfaces.PrimaryDataEntityRmiInterface myEntityRMI
    • Constructor Detail

      • ClientPrimaryDataEntity

        public ClientPrimaryDataEntity​(de.ipk_gatersleben.bit.bi.edal.rmi.interfaces.PrimaryDataEntityRmiInterface entity,
                                       ClientDataManager client)
        Constructor for ClientPrimaryDataEntity.
        Parameters:
        entity - a PrimaryDataEntityRmiInterface object.
        client - the ClientDataManager
    • Method Detail

      • addPublicReference

        public void addPublicReference​(de.ipk_gatersleben.bit.bi.edal.primary_data.reference.PersistentIdentifier identifierType)
                                throws java.rmi.RemoteException,
                                       de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityException
        Throws:
        java.rmi.RemoteException
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityException
      • delete

        public void delete()
                    throws java.rmi.RemoteException,
                           de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException,
                           de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectoryException
        PrimaryDataEntity.delete()
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException - if trying to delete the root PrimaryDataDirectory
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectoryException - if trying to delete a non-current PrimaryDataEntityVersion.
        See Also:
        PrimaryDataEntityRmiInterface.delete(javax.security.auth.Subject)
      • getCurrentVersion

        public ClientPrimaryDataEntityVersion getCurrentVersion()
                                                         throws java.rmi.RemoteException
        PrimaryDataEntity.getCurrentVersion()
        Returns:
        the currently set PrimaryDataEntityVersion
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        See Also:
        PrimaryDataEntityRmiInterface.getCurrentVersion(javax.security.auth.Subject)
      • getID

        public java.lang.String getID()
                               throws java.rmi.RemoteException
        PrimaryDataEntity.getID()
        Returns:
        the ID of this PrimaryDataEntity.
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        See Also:
        PrimaryDataEntityRmiInterface.getID(javax.security.auth.Subject)
      • getMetaData

        public de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.MetaData getMetaData()
                                                                                  throws java.rmi.RemoteException
        PrimaryDataEntity.getMetaData()
        Returns:
        MetaData object of the current PrimaryDataEntityVersion of this PrimaryDataEntity.
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        See Also:
        PrimaryDataEntityRmiInterface.getMetaData(javax.security.auth.Subject)
      • getName

        public java.lang.String getName()
                                 throws java.rmi.RemoteException
        PrimaryDataEntity.getName()
        Returns:
        the name of this PrimaryDataEntity.
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        See Also:
        PrimaryDataEntityRmiInterface.getName(javax.security.auth.Subject)
      • getParentDirectory

        public ClientPrimaryDataDirectory getParentDirectory()
                                                      throws de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectoryException,
                                                             java.rmi.RemoteException
        PrimaryDataEntity.getParentDirectory()
        Returns:
        the parent PrimaryDataDirectory of this PrimaryDataEntity.
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectoryException - if trying to access the parent PrimaryDataDirectory of the root PrimaryDataDirectory.
        See Also:
        PrimaryDataEntityRmiInterface.getParentDirectory(javax.security.auth.Subject)
      • getPath

        public java.lang.String getPath()
                                 throws java.rmi.RemoteException
        PrimaryDataEntity.getPath()
        Returns:
        the complete path as String to the PrimaryDataEntity object
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        See Also:
        PrimaryDataEntityRmiInterface.getPath(javax.security.auth.Subject)
      • getPermissions

        public java.util.Map<java.security.Principal,​java.util.List<de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods>> getPermissions()
                                                                                                                                                             throws java.rmi.RemoteException,
                                                                                                                                                                    de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityException
        PrimaryDataEntity.getPermissions()
        Returns:
        the map with all permissions
        Throws:
        java.rmi.RemoteException - if unable to call remote function
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityException - if unable to load permissions
        See Also:
        PrimaryDataEntityRmiInterface.getPermissions(Subject)
      • getPublicReferences

        public java.util.List<de.ipk_gatersleben.bit.bi.edal.primary_data.file.PublicReference> getPublicReferences()
                                                                                                             throws java.rmi.RemoteException
        PrimaryDataEntity.getPublicReferences()
        Returns:
        a List with all PublicReferences.
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        See Also:
        PrimaryDataEntityRmiInterface.getPublicReferences(Subject)
      • getVersions

        public java.util.SortedSet<ClientPrimaryDataEntityVersion> getVersions()
                                                                        throws java.rmi.RemoteException
        PrimaryDataEntity.getVersions()
        Returns:
        an unmodifiable SortedSet containing all PrimaryDataEntity
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        See Also:
        PrimaryDataEntityRmiInterface.getVersions(javax.security.auth.Subject)
      • getVersionByDate

        public ClientPrimaryDataEntityVersion getVersionByDate​(java.util.Calendar date)
                                                        throws java.rmi.RemoteException,
                                                               de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException
        PrimaryDataEntity.getVersionByDate(Calendar)
        Parameters:
        date - the date of the PrimaryDataEntityVersion
        Returns:
        the specified PrimaryDataEntityVersion
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException - if there are only older PrimaryDataEntityVersion stored for this PrimaryDataEntity
        See Also:
        PrimaryDataEntity.getVersionByDate(Calendar)
      • getVersionByRevisionNumber

        public ClientPrimaryDataEntityVersion getVersionByRevisionNumber​(long revisionNumber)
                                                                  throws java.rmi.RemoteException,
                                                                         de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException
        PrimaryDataEntity.getVersionByRevisionNumber(long)
        Parameters:
        revisionNumber - the number of the PrimaryDataEntityVersion
        Returns:
        the specified PrimaryDataEntityVersion
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException - if there is no PrimaryDataEntityVersion with this version stored.
        See Also:
        PrimaryDataEntity.getVersionByRevisionNumber(long)
      • grantPermission

        public void grantPermission​(java.security.Principal principal,
                                    de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods method)
                             throws java.rmi.RemoteException,
                                    de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityException
        PrimaryDataEntity#grantPermission(Principal, Methods)}
        Parameters:
        principal - to grant this method
        method - Enum for a the method
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityException - if can not found method to grant.
      • isDirectory

        public boolean isDirectory()
                            throws java.rmi.RemoteException
        PrimaryDataEntity.isDirectory()
        Returns:
        true when it is a PrimaryDataDirectory;
        false otherwise.
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        See Also:
        PrimaryDataEntityRmiInterface.isDirectory(javax.security.auth.Subject)
      • move

        public void move​(ClientPrimaryDataDirectory destinationDirectory)
                  throws java.rmi.RemoteException,
                         de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectoryException
        PrimaryDataEntity.move(PrimaryDataDirectory)
        Parameters:
        destinationDirectory - the new parent PrimaryDataDirectory for this PrimaryDataEntity.
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectoryException - if trying to move the root PrimaryDataDirectory.
        See Also:
        PrimaryDataEntityRmiInterface.move(PrimaryDataDirectoryRmiInterface, javax.security.auth.Subject)
      • rename

        public void rename​(java.lang.String name)
                    throws java.rmi.RemoteException,
                           de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException,
                           de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectoryException
        PrimaryDataEntity.rename(String)
        Parameters:
        name - the new name for this PrimaryDataEntity
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException - if unable to set the new PrimaryDataEntityVersion.
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectoryException - if an PrimaryDataEntity with this name already exists.
        See Also:
        PrimaryDataEntityRmiInterface.rename(java.lang.String, javax.security.auth.Subject)
      • revokePermission

        public void revokePermission​(java.security.Principal principal,
                                     de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods method)
                              throws java.rmi.RemoteException,
                                     de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityException
        PrimaryDataEntity#revokePermission(Principal, Enum)
        Parameters:
        principal - to revoke this method.
        method - Enum for a the method.
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityException - if trying to revoke the EdalPermission for PrimaryDataEntity#grantPermission(Principal, Enum) of your own PrimaryDataEntity.
      • setMetaData

        public void setMetaData​(de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.MetaData new_metadata)
                         throws java.rmi.RemoteException,
                                de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException,
                                de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.MetaDataException
        PrimaryDataEntity.setMetaData(MetaData)
        Parameters:
        new_metadata - the new MetaData object to set.
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException - if unable to store PrimaryDataEntityVersion.
        de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.MetaDataException - if there are non valid value for element in the MetaData object.
        java.security.AccessControlException - if the user with the current Subject is not allowed to execute this method. The AccessControlException is thrown by AspectJ.
        See Also:
        PrimaryDataEntityRmiInterface.setMetaData(MetaData, Subject)
      • switchCurrentVersion

        public void switchCurrentVersion​(ClientPrimaryDataEntityVersion version)
                                  throws java.rmi.RemoteException,
                                         de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException
        PrimaryDataEntity.switchCurrentVersion(PrimaryDataEntityVersion)
        Parameters:
        version - the new PrimaryDataEntityVersion to set as current PrimaryDataEntityVersion.
        Throws:
        java.rmi.RemoteException - if unable to call remote function.
        de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException - if requested PrimaryDataEntityVersion is not available or marked as deleted.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object