Class ClientPrimaryDataEntity
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.rmi.client.ClientContext
-
- de.ipk_gatersleben.bit.bi.edal.rmi.client.ClientPrimaryDataEntity
-
- All Implemented Interfaces:
java.lang.Comparable<ClientPrimaryDataEntity>
- Direct Known Subclasses:
ClientPrimaryDataDirectory,ClientPrimaryDataFile
public abstract class ClientPrimaryDataEntity extends ClientContext implements java.lang.Comparable<ClientPrimaryDataEntity>
SampleClient version ofPrimaryDataEntityto use eDAL system like the stand-alone implementation.
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientPrimaryDataEntityVersioncurrentVersionprotected de.ipk_gatersleben.bit.bi.edal.rmi.interfaces.PrimaryDataEntityRmiInterfacemyEntityRMI-
Fields inherited from class de.ipk_gatersleben.bit.bi.edal.rmi.client.ClientContext
clientDataManager
-
-
Constructor Summary
Constructors Constructor Description ClientPrimaryDataEntity(de.ipk_gatersleben.bit.bi.edal.rmi.interfaces.PrimaryDataEntityRmiInterface entity, ClientDataManager client)Constructor for ClientPrimaryDataEntity.
-
Method Summary
Modifier and Type Method Description voidaddPublicReference(de.ipk_gatersleben.bit.bi.edal.primary_data.reference.PersistentIdentifier identifierType)intcompareTo(ClientPrimaryDataEntity other)voiddelete()PrimaryDataEntity.delete()booleanequals(java.lang.Object obj)ClientPrimaryDataEntityVersiongetCurrentVersion()PrimaryDataEntity.getCurrentVersion()java.lang.StringgetID()PrimaryDataEntity.getID()de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.MetaDatagetMetaData()PrimaryDataEntity.getMetaData()java.lang.StringgetName()PrimaryDataEntity.getName()ClientPrimaryDataDirectorygetParentDirectory()PrimaryDataEntity.getParentDirectory()java.lang.StringgetPath()PrimaryDataEntity.getPath()java.util.Map<java.security.Principal,java.util.List<de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods>>getPermissions()PrimaryDataEntity.getPermissions()java.util.List<de.ipk_gatersleben.bit.bi.edal.primary_data.file.PublicReference>getPublicReferences()PrimaryDataEntity.getPublicReferences()ClientPrimaryDataEntityVersiongetVersionByDate(java.util.Calendar date)PrimaryDataEntity.getVersionByDate(Calendar)ClientPrimaryDataEntityVersiongetVersionByRevisionNumber(long revisionNumber)PrimaryDataEntity.getVersionByRevisionNumber(long)java.util.SortedSet<ClientPrimaryDataEntityVersion>getVersions()PrimaryDataEntity.getVersions()voidgrantPermission(java.security.Principal principal, de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods method)PrimaryDataEntity#grantPermission(Principal, Methods)}inthashCode()booleanisDirectory()PrimaryDataEntity.isDirectory()voidmove(ClientPrimaryDataDirectory destinationDirectory)PrimaryDataEntity.move(PrimaryDataDirectory)voidrename(java.lang.String name)PrimaryDataEntity.rename(String)voidrevokePermission(java.security.Principal principal, de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods method)PrimaryDataEntity#revokePermission(Principal, Enum)voidsetMetaData(de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.MetaData new_metadata)PrimaryDataEntity.setMetaData(MetaData)voidswitchCurrentVersion(ClientPrimaryDataEntityVersion version)PrimaryDataEntity.switchCurrentVersion(PrimaryDataEntityVersion)
-
-
-
Field Detail
-
myEntityRMI
protected de.ipk_gatersleben.bit.bi.edal.rmi.interfaces.PrimaryDataEntityRmiInterface myEntityRMI
-
currentVersion
protected ClientPrimaryDataEntityVersion currentVersion
-
-
Constructor Detail
-
ClientPrimaryDataEntity
public ClientPrimaryDataEntity(de.ipk_gatersleben.bit.bi.edal.rmi.interfaces.PrimaryDataEntityRmiInterface entity, ClientDataManager client)Constructor for ClientPrimaryDataEntity.- Parameters:
entity- aPrimaryDataEntityRmiInterfaceobject.client- theClientDataManager
-
-
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.RemoteExceptionde.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.PrimaryDataDirectoryExceptionPrimaryDataEntity.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 rootPrimaryDataDirectoryde.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectoryException- if trying to delete a non-currentPrimaryDataEntityVersion.- 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.RemoteExceptionPrimaryDataEntity.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.RemoteExceptionPrimaryDataEntity.getMetaData()- Returns:
MetaDataobject of the currentPrimaryDataEntityVersionof thisPrimaryDataEntity.- 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.RemoteExceptionPrimaryDataEntity.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
PrimaryDataDirectoryof thisPrimaryDataEntity. - 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 parentPrimaryDataDirectoryof the rootPrimaryDataDirectory.- See Also:
PrimaryDataEntityRmiInterface.getParentDirectory(javax.security.auth.Subject)
-
getPath
public java.lang.String getPath() throws java.rmi.RemoteExceptionPrimaryDataEntity.getPath()- Returns:
- the complete path as
Stringto thePrimaryDataEntityobject - 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.PrimaryDataEntityExceptionPrimaryDataEntity.getPermissions()- Returns:
- the map with all permissions
- Throws:
java.rmi.RemoteException- if unable to call remote functionde.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.RemoteExceptionPrimaryDataEntity.getPublicReferences()- Returns:
- a
Listwith allPublicReferences. - 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
SortedSetcontaining allPrimaryDataEntity - 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 thePrimaryDataEntityVersion- 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 olderPrimaryDataEntityVersionstored for thisPrimaryDataEntity- 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 thePrimaryDataEntityVersion- 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 noPrimaryDataEntityVersionwith 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.PrimaryDataEntityExceptionPrimaryDataEntity#grantPermission(Principal, Methods)}- Parameters:
principal- to grant this methodmethod-Enumfor 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.RemoteExceptionPrimaryDataEntity.isDirectory()- Returns:
truewhen it is aPrimaryDataDirectory;
falseotherwise.- 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 parentPrimaryDataDirectoryfor thisPrimaryDataEntity.- 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 rootPrimaryDataDirectory.- 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.PrimaryDataDirectoryExceptionPrimaryDataEntity.rename(String)- Parameters:
name- the new name for thisPrimaryDataEntity- 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 newPrimaryDataEntityVersion.de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectoryException- if anPrimaryDataEntitywith 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.PrimaryDataEntityExceptionPrimaryDataEntity#revokePermission(Principal, Enum)- Parameters:
principal- to revoke this method.method-Enumfor 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 theEdalPermissionfor PrimaryDataEntity#grantPermission(Principal, Enum) of your ownPrimaryDataEntity.
-
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.MetaDataExceptionPrimaryDataEntity.setMetaData(MetaData)- Parameters:
new_metadata- the newMetaDataobject 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 storePrimaryDataEntityVersion.de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.MetaDataException- if there are non valid value for element in theMetaDataobject.java.security.AccessControlException- if the user with the currentSubjectis 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 newPrimaryDataEntityVersionto set as currentPrimaryDataEntityVersion.- Throws:
java.rmi.RemoteException- if unable to call remote function.de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataEntityVersionException- if requestedPrimaryDataEntityVersionis not available or marked as deleted.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(ClientPrimaryDataEntity other)
- Specified by:
compareToin interfacejava.lang.Comparable<ClientPrimaryDataEntity>
-
-