Class PrimaryDataEntityWrapper
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- de.ipk_gatersleben.bit.bi.edal.rmi.server.wrapper.PrimaryDataEntityWrapper
-
- All Implemented Interfaces:
PrimaryDataEntityRmiInterface,java.io.Serializable,java.rmi.Remote
- Direct Known Subclasses:
PrimaryDataDirectoryWrapper,PrimaryDataFileWrapper
public abstract class PrimaryDataEntityWrapper extends java.rmi.server.UnicastRemoteObject implements PrimaryDataEntityRmiInterface
Wrapper class to wrapPrimaryDataEntityfunctions on server side.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description intmyDataPortPrimaryDataEntitymyEntity
-
Constructor Summary
Constructors Constructor Description PrimaryDataEntityWrapper(int dataPort, PrimaryDataEntity entity)Constructor forPrimaryDataEntityWrapper.
-
Method Summary
Modifier and Type Method Description voidaddPublicReference(PersistentIdentifier identifierType, javax.security.auth.Subject subject)voiddelete(javax.security.auth.Subject subject)PrimaryDataEntityVersionRmiInterfacegetCurrentVersion(javax.security.auth.Subject subject)java.lang.StringgetID(javax.security.auth.Subject subject)MetaDatagetMetaData(javax.security.auth.Subject subject)java.lang.StringgetName(javax.security.auth.Subject subject)PrimaryDataDirectoryRmiInterfacegetParentDirectory(javax.security.auth.Subject subject)java.lang.StringgetPath(javax.security.auth.Subject subject)java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>>getPermissions(javax.security.auth.Subject subject)PrimaryDataEntityVersionRmiInterfacegetVersionByDate(java.util.Calendar date, javax.security.auth.Subject subject)PrimaryDataEntityVersionRmiInterfacegetVersionByRevisionNumber(long revisionNumber, javax.security.auth.Subject subject)java.util.Collection<PrimaryDataEntityVersionRmiInterface>getVersions(javax.security.auth.Subject subject)voidgrantPermission(java.security.Principal principal, GrantableMethods.Methods method, javax.security.auth.Subject subject)booleanisDirectory(javax.security.auth.Subject subject)voidmove(PrimaryDataDirectoryRmiInterface destinationDirectory, javax.security.auth.Subject subject)voidrename(java.lang.String name, javax.security.auth.Subject subject)voidrevokePermission(java.security.Principal principal, GrantableMethods.Methods method, javax.security.auth.Subject subject)voidsetMetaData(MetaData metadata, javax.security.auth.Subject subject)-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.ipk_gatersleben.bit.bi.edal.rmi.interfaces.PrimaryDataEntityRmiInterface
getPublicReferences
-
-
-
-
Field Detail
-
myEntity
public PrimaryDataEntity myEntity
-
myDataPort
public int myDataPort
-
-
Constructor Detail
-
PrimaryDataEntityWrapper
public PrimaryDataEntityWrapper(int dataPort, PrimaryDataEntity entity) throws java.rmi.RemoteExceptionConstructor forPrimaryDataEntityWrapper.- Parameters:
dataPort- the data port for the remote objects.entity- aPrimaryDataEntityobject.- Throws:
java.rmi.RemoteException- is unable to call remote function.
-
-
Method Detail
-
delete
public void delete(javax.security.auth.Subject subject) throws java.rmi.RemoteException, PrimaryDataEntityVersionException, PrimaryDataDirectoryException- Specified by:
deletein interfacePrimaryDataEntityRmiInterface- Parameters:
subject- the authenticated subject for check permission.- Throws:
java.rmi.RemoteException- if unable to call remote function.PrimaryDataEntityVersionException- if trying to delete the rootPrimaryDataDirectoryPrimaryDataDirectoryException- if trying to delete a non-currentPrimaryDataEntityVersion.- See Also:
PrimaryDataEntity.delete()
-
getCurrentVersion
public PrimaryDataEntityVersionRmiInterface getCurrentVersion(javax.security.auth.Subject subject) throws java.rmi.RemoteException
- Specified by:
getCurrentVersionin interfacePrimaryDataEntityRmiInterface- Parameters:
subject- the authenticated subject for check permission..- Returns:
- the currently set
PrimaryDataEntityVersion - Throws:
java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataEntity.getCurrentVersion()
-
getID
public java.lang.String getID(javax.security.auth.Subject subject) throws java.rmi.RemoteException- Specified by:
getIDin interfacePrimaryDataEntityRmiInterface- Parameters:
subject- the authenticated subject for check permission.- Returns:
- the ID of this
PrimaryDataEntity. - Throws:
java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataEntity.getID()
-
getMetaData
public MetaData getMetaData(javax.security.auth.Subject subject) throws java.rmi.RemoteException
- Specified by:
getMetaDatain interfacePrimaryDataEntityRmiInterface- Parameters:
subject- the authenticated subject for check permission.- Returns:
MetaDataobject of the currentPrimaryDataEntityVersionof thisPrimaryDataEntity- Throws:
java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataEntity.getMetaData()
-
getName
public java.lang.String getName(javax.security.auth.Subject subject) throws java.rmi.RemoteException- Specified by:
getNamein interfacePrimaryDataEntityRmiInterface- Parameters:
subject- the authenticated subject for check permission.- Returns:
- the file name.
- Throws:
java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataEntity.getName()
-
getParentDirectory
public PrimaryDataDirectoryRmiInterface getParentDirectory(javax.security.auth.Subject subject) throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Specified by:
getParentDirectoryin interfacePrimaryDataEntityRmiInterface- Parameters:
subject- the authenticated subject for check permission.- Returns:
- the parent
PrimaryDataDirectoryof thisPrimaryDataEntity. - Throws:
PrimaryDataDirectoryException- if trying to access the parentPrimaryDataDirectoryof the rootPrimaryDataDirectory.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataEntity.getParentDirectory()
-
getPermissions
public java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> getPermissions(javax.security.auth.Subject subject) throws PrimaryDataEntityException, java.rmi.RemoteException
- Specified by:
getPermissionsin interfacePrimaryDataEntityRmiInterface- Parameters:
subject- the authenticated subject for check permission.- Returns:
- an unmodifiable
Listcontaining allEdalPermission. - Throws:
PrimaryDataEntityException- if unable to load permissionsjava.rmi.RemoteException- if unable to call remote function.
-
getPath
public java.lang.String getPath(javax.security.auth.Subject subject) throws java.rmi.RemoteException- Specified by:
getPathin interfacePrimaryDataEntityRmiInterface- Parameters:
subject- the authenticated subject for check permission.- Returns:
- the complete path as
Stringto thePrimaryDataEntityobject - Throws:
java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataEntity.getPath()
-
getVersions
public java.util.Collection<PrimaryDataEntityVersionRmiInterface> getVersions(javax.security.auth.Subject subject) throws java.rmi.RemoteException
- Specified by:
getVersionsin interfacePrimaryDataEntityRmiInterface- Parameters:
subject- the authenticated subject for check permission.- Returns:
- an unmodifiable
SortedSetcontaining allPrimaryDataEntity - Throws:
java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataEntity.getVersions()
-
getVersionByDate
public PrimaryDataEntityVersionRmiInterface getVersionByDate(java.util.Calendar date, javax.security.auth.Subject subject) throws PrimaryDataEntityVersionException, java.rmi.RemoteException
- Specified by:
getVersionByDatein interfacePrimaryDataEntityRmiInterface- Parameters:
date- the date of thePrimaryDataEntityVersionsubject- the authenticated subject for check permission.- Returns:
- the specified
PrimaryDataEntityVersion - Throws:
PrimaryDataEntityVersionException- if there is noPrimaryDataEntityVersionwith this version stored.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataEntity.getVersionByDate(Calendar)
-
getVersionByRevisionNumber
public PrimaryDataEntityVersionRmiInterface getVersionByRevisionNumber(long revisionNumber, javax.security.auth.Subject subject) throws PrimaryDataEntityVersionException, java.rmi.RemoteException
- Specified by:
getVersionByRevisionNumberin interfacePrimaryDataEntityRmiInterface- Parameters:
revisionNumber- the number of thePrimaryDataEntityVersionsubject- the authenticated subject for check permission.- Returns:
- the specified
PrimaryDataEntityVersion - Throws:
PrimaryDataEntityVersionException- if there is noPrimaryDataEntityVersionwith this version stored.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataEntity.getVersionByRevisionNumber(long)
-
grantPermission
public void grantPermission(java.security.Principal principal, GrantableMethods.Methods method, javax.security.auth.Subject subject) throws java.rmi.RemoteException, PrimaryDataEntityException- Specified by:
grantPermissionin interfacePrimaryDataEntityRmiInterface- Parameters:
principal- to grant this methodmethod-GrantableMethods.Methodsfor a the methodsubject- the authenticated subject for check permission.- Throws:
java.rmi.RemoteException- if unable to call remote function.PrimaryDataEntityException- if can not found method to grant.- See Also:
PrimaryDataEntity.grantPermission(Principal, de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods)
-
isDirectory
public boolean isDirectory(javax.security.auth.Subject subject) throws java.rmi.RemoteException- Specified by:
isDirectoryin interfacePrimaryDataEntityRmiInterface- Parameters:
subject- the authenticated subject for check permission.- Returns:
truewhen it is aPrimaryDataDirectory;
falseotherwise.- Throws:
java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataEntity.isDirectory()
-
move
public void move(PrimaryDataDirectoryRmiInterface destinationDirectory, javax.security.auth.Subject subject) throws java.rmi.RemoteException, PrimaryDataDirectoryException
- Specified by:
movein interfacePrimaryDataEntityRmiInterface- Parameters:
destinationDirectory- the new parentPrimaryDataDirectoryfor thisPrimaryDataEntity.subject- the authenticated subject for check permission.- Throws:
java.rmi.RemoteException- if unable to call remote function.PrimaryDataDirectoryException- if trying to move the rootPrimaryDataDirectory.- See Also:
PrimaryDataEntity.move(de.ipk_gatersleben.bit.bi.edal.primary_data.file.PrimaryDataDirectory)
-
rename
public void rename(java.lang.String name, javax.security.auth.Subject subject) throws java.rmi.RemoteException, PrimaryDataEntityVersionException, PrimaryDataDirectoryException- Specified by:
renamein interfacePrimaryDataEntityRmiInterface- Parameters:
name- the new name for thisPrimaryDataEntity.subject- the authenticated subject for check permission.- Throws:
java.rmi.RemoteException- if unable to call remote function.PrimaryDataEntityVersionException- if unable to set the newPrimaryDataEntityVersion.PrimaryDataDirectoryException- if anPrimaryDataEntitywith this name already exists.- See Also:
PrimaryDataEntity.rename(String)
-
revokePermission
public void revokePermission(java.security.Principal principal, GrantableMethods.Methods method, javax.security.auth.Subject subject) throws java.rmi.RemoteException, PrimaryDataEntityException- Specified by:
revokePermissionin interfacePrimaryDataEntityRmiInterface- Parameters:
principal- to revoke this method.method-GrantableMethods.Methodsfor a the method.subject- the authenticated subject for check permission.- Throws:
java.rmi.RemoteException- if unable to call remote function.PrimaryDataEntityException- if trying to revoke theEdalPermissionforPrimaryDataEntity.grantPermission(Principal, de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods)of your ownPrimaryDataEntity.- See Also:
PrimaryDataEntity.revokePermission(Principal, de.ipk_gatersleben.bit.bi.edal.aspectj.security.GrantableMethods.Methods)
-
setMetaData
public void setMetaData(MetaData metadata, javax.security.auth.Subject subject) throws java.rmi.RemoteException, PrimaryDataEntityVersionException, MetaDataException
- Specified by:
setMetaDatain interfacePrimaryDataEntityRmiInterface- Parameters:
metadata- the newMetaDataobject to set.subject- the authenticated subject for check permission.- Throws:
java.rmi.RemoteException- if unable to call remote function.PrimaryDataEntityVersionException- if unable to storePrimaryDataEntityVersion.MetaDataException- if there are non valid value for element in theMetaDataobject.- See Also:
PrimaryDataEntity.setMetaData(MetaData)
-
addPublicReference
public void addPublicReference(PersistentIdentifier identifierType, javax.security.auth.Subject subject) throws java.rmi.RemoteException, PrimaryDataEntityException
- Specified by:
addPublicReferencein interfacePrimaryDataEntityRmiInterface- Parameters:
identifierType- the type of the new Identifier.subject- the authenticated subject for check permission.- Throws:
java.rmi.RemoteException- if unable to call remote function.PrimaryDataEntityException- if unable to add thePublicReferenceto thisPrimaryDataEntity.
-
-