Class PrimaryDataDirectoryWrapper
- 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
-
- de.ipk_gatersleben.bit.bi.edal.rmi.server.wrapper.PrimaryDataDirectoryWrapper
-
- All Implemented Interfaces:
PrimaryDataDirectoryRmiInterface,PrimaryDataEntityRmiInterface,java.io.Serializable,java.rmi.Remote
public class PrimaryDataDirectoryWrapper extends PrimaryDataEntityWrapper implements PrimaryDataDirectoryRmiInterface
Wrapper class to wrapPrimaryDataDirectoryfunctions on server side.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.ipk_gatersleben.bit.bi.edal.rmi.server.wrapper.PrimaryDataEntityWrapper
myDataPort, myEntity
-
-
Constructor Summary
Constructors Constructor Description PrimaryDataDirectoryWrapper(int dataPort, PrimaryDataDirectory directory)Constructor forPrimaryDataDirectoryWrapper.
-
Method Summary
Modifier and Type Method Description PrimaryDataDirectoryRmiInterfacecreatePrimaryDataDirectory(java.lang.String path, javax.security.auth.Subject subject, java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> defaultPermissions)PrimaryDataFileRmiInterfacecreatePrimaryDataFile(java.lang.String name, javax.security.auth.Subject subject, java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> defaultPermissions)booleanexist(java.lang.String path, javax.security.auth.Subject subject)java.util.List<PrimaryDataEntityRmiInterface>getAllPublishedEntities(javax.security.auth.Subject subject)PrimaryDataEntityRmiInterfacegetPrimaryDataEntity(java.lang.String name, javax.security.auth.Subject subject)java.util.List<PublicReference>getPublicReferences(javax.security.auth.Subject subject)java.util.List<PrimaryDataEntityRmiInterface>listPrimaryDataEntities(javax.security.auth.Subject subject)java.util.List<PrimaryDataEntityRmiInterface>searchByDublinCoreElement(EnumDublinCoreElements element, UntypedData data, boolean fuzzy, boolean recursiveIntoSubdirectories, javax.security.auth.Subject subject)java.util.List<PrimaryDataEntityRmiInterface>searchByKeyword(java.lang.String keyword, boolean fuzzy, boolean recursiveIntoSubdirectories, javax.security.auth.Subject subject)java.util.List<PrimaryDataEntityRmiInterface>searchByMetaData(MetaData query, boolean fuzzy, boolean recursiveIntoSubdirectories, javax.security.auth.Subject subject)java.util.List<PrimaryDataEntityRmiInterface>searchByPublicationStatus(PublicationStatus publicationStatus, javax.security.auth.Subject subject)voidsetMetaData(MetaData metadata, javax.security.auth.Subject subject)-
Methods inherited from class de.ipk_gatersleben.bit.bi.edal.rmi.server.wrapper.PrimaryDataEntityWrapper
addPublicReference, delete, getCurrentVersion, getID, getMetaData, getName, getParentDirectory, getPath, getPermissions, getVersionByDate, getVersionByRevisionNumber, getVersions, grantPermission, isDirectory, move, rename, revokePermission
-
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
addPublicReference, delete, getCurrentVersion, getID, getMetaData, getName, getParentDirectory, getPath, getPermissions, getVersionByDate, getVersionByRevisionNumber, getVersions, grantPermission, isDirectory, move, rename, revokePermission
-
-
-
-
Constructor Detail
-
PrimaryDataDirectoryWrapper
public PrimaryDataDirectoryWrapper(int dataPort, PrimaryDataDirectory directory) throws java.rmi.RemoteExceptionConstructor forPrimaryDataDirectoryWrapper.- Parameters:
dataPort- the data port for the remote objects.directory- aPrimaryDataDirectoryobject.- Throws:
java.rmi.RemoteException- is unable to call remote function.
-
-
Method Detail
-
createPrimaryDataDirectory
public PrimaryDataDirectoryRmiInterface createPrimaryDataDirectory(java.lang.String path, javax.security.auth.Subject subject, java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> defaultPermissions) throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Specified by:
createPrimaryDataDirectoryin interfacePrimaryDataDirectoryRmiInterface- Parameters:
path- the name of the newPrimaryDataDirectory.subject- the authenticated subject for check permission.defaultPermissions- current default permissions.- Returns:
- the new
PrimaryDataDirectoryobject.
nullif failed - Throws:
PrimaryDataDirectoryException- if the currentPrimaryDataEntityVersionof thisPrimaryDataDirectoryis marked as deleted or if there is already aPrimaryDataEntitywith the same name.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataDirectory.createPrimaryDataDirectory(String)
-
createPrimaryDataFile
public PrimaryDataFileRmiInterface createPrimaryDataFile(java.lang.String name, javax.security.auth.Subject subject, java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> defaultPermissions) throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Specified by:
createPrimaryDataFilein interfacePrimaryDataDirectoryRmiInterface- Parameters:
name- of the newPrimaryDataFileobject.subject- the authenticated subject for check permission.defaultPermissions- current default permissions- Returns:
- the new
PrimaryDataFile.
nullif failed - Throws:
PrimaryDataDirectoryException- if the currentPrimaryDataEntityVersionof thisPrimaryDataDirectoryis marked as deleted or if there is already aPrimaryDataEntitywith the same name.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataDirectory.createPrimaryDataFile(String)
-
exist
public boolean exist(java.lang.String path, javax.security.auth.Subject subject) throws java.rmi.RemoteException, PrimaryDataDirectoryException- Specified by:
existin interfacePrimaryDataDirectoryRmiInterface- Parameters:
path- the name of thePrimaryDataEntityto check.subject- the authenticated subject for check permission.- Returns:
trueif there is already a PrimartyDataEntity with the same path;
falseotherwise- Throws:
java.rmi.RemoteException- if unable to call remote function.PrimaryDataDirectoryException- if unable to load allPrimaryDataEntityobjects in thisPrimaryDataDirectoryto check if the name already exists.- See Also:
PrimaryDataDirectory.exist(String)
-
listPrimaryDataEntities
public java.util.List<PrimaryDataEntityRmiInterface> listPrimaryDataEntities(javax.security.auth.Subject subject) throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Specified by:
listPrimaryDataEntitiesin interfacePrimaryDataDirectoryRmiInterface- Parameters:
subject- the authenticated subject for check permission.- Returns:
- an unmodifiable
Listcontaining allPrimaryDataEntity - Throws:
PrimaryDataDirectoryException- if unable to load allPrimaryDataEntityobjects in thisPrimaryDataDirectory.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataDirectory.listPrimaryDataEntities()
-
setMetaData
public void setMetaData(MetaData metadata, javax.security.auth.Subject subject) throws java.rmi.RemoteException, PrimaryDataEntityVersionException, MetaDataException
- Specified by:
setMetaDatain interfacePrimaryDataDirectoryRmiInterface- Specified by:
setMetaDatain interfacePrimaryDataEntityRmiInterface- Overrides:
setMetaDatain classPrimaryDataEntityWrapper- 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)
-
searchByDublinCoreElement
public java.util.List<PrimaryDataEntityRmiInterface> searchByDublinCoreElement(EnumDublinCoreElements element, UntypedData data, boolean fuzzy, boolean recursiveIntoSubdirectories, javax.security.auth.Subject subject) throws java.rmi.RemoteException, PrimaryDataDirectoryException
- Specified by:
searchByDublinCoreElementin interfacePrimaryDataDirectoryRmiInterface- Parameters:
element- theEnumDublinCoreElementsfor query.data-UntypedDataparameter for search.fuzzy-true: exact search;
false: fuzzy search.recursiveIntoSubdirectories-true: include also all sub directories recursively;
false: search only in the currentPrimaryDataDirectoryobject.subject- the authenticated subject for check permission.- Returns:
- an unmodifiable
ListofPrimaryDataEntitythat match the parameter. - Throws:
java.rmi.RemoteException- if unable to call remote function.PrimaryDataDirectoryException- if unable to findPrimaryDataEntityobject or if there are too much results.- See Also:
PrimaryDataDirectory.searchByDublinCoreElement(EnumDublinCoreElements, UntypedData, boolean, boolean)
-
searchByMetaData
public java.util.List<PrimaryDataEntityRmiInterface> searchByMetaData(MetaData query, boolean fuzzy, boolean recursiveIntoSubdirectories, javax.security.auth.Subject subject) throws java.rmi.RemoteException, PrimaryDataDirectoryException, MetaDataException
- Specified by:
searchByMetaDatain interfacePrimaryDataDirectoryRmiInterface- Parameters:
query- aMetaDataobject for query.fuzzy-true: fuzzy search;
false: exact searchrecursiveIntoSubdirectories-true: include also all subPrimaryDataDirectoryrecursively;
falsesearch only in the currentPrimaryDataDirectoryobjectsubject- the authenticated subject for check permission.- Returns:
- a unmodifiable
ListofPrimaryDataEntitythat match theMetaDataparameter - Throws:
java.rmi.RemoteException- if unable to call remote function.PrimaryDataDirectoryException- if unable to findPrimaryDataEntityobject or if there are too much results.MetaDataException- if there are non valid values for someMetaDataelements.- See Also:
PrimaryDataDirectory.searchByMetaData(MetaData, boolean, boolean)
-
getPrimaryDataEntity
public PrimaryDataEntityRmiInterface getPrimaryDataEntity(java.lang.String name, javax.security.auth.Subject subject) throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Specified by:
getPrimaryDataEntityin interfacePrimaryDataDirectoryRmiInterface- Parameters:
name- name of thePrimaryDataEntityin thisPrimaryDataDirectory.subject- the authenticated subject for check permission.- Returns:
- the found
PrimaryDataEntityobject. - Throws:
PrimaryDataDirectoryException- if no suchPrimaryDataEntityexists.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataDirectory.getPrimaryDataEntity(String)
-
getPublicReferences
public java.util.List<PublicReference> getPublicReferences(javax.security.auth.Subject subject) throws java.rmi.RemoteException
- Specified by:
getPublicReferencesin interfacePrimaryDataEntityRmiInterface- Parameters:
subject- the authenticated subject for check permission.- Returns:
- a
Listwith all storedPublicReferences of the currentPrimaryDataEntityVersionof thisPrimaryDataEntity. - Throws:
java.rmi.RemoteException- if unable to call remote function.
-
searchByPublicationStatus
public java.util.List<PrimaryDataEntityRmiInterface> searchByPublicationStatus(PublicationStatus publicationStatus, javax.security.auth.Subject subject) throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Specified by:
searchByPublicationStatusin interfacePrimaryDataDirectoryRmiInterface- Parameters:
publicationStatus- thePublicationStatusof the searchedPrimaryDataEntity.subject- the authenticated subject for check permission.- Returns:
- a
Listof allPrimaryDataEntitywith aPublicReference. - Throws:
PrimaryDataDirectoryException- if unable to search forPublicationStatusjava.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataDirectory.searchByPublicationStatus(PublicationStatus)
-
getAllPublishedEntities
public java.util.List<PrimaryDataEntityRmiInterface> getAllPublishedEntities(javax.security.auth.Subject subject) throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Specified by:
getAllPublishedEntitiesin interfacePrimaryDataDirectoryRmiInterface- Parameters:
subject- the authenticated subject for check permission.- Returns:
- a
Listof allPrimaryDataEntitywith aPublicReference. - Throws:
PrimaryDataDirectoryException- if unable to load objcts.java.rmi.RemoteException- if unable to call remote function.
-
searchByKeyword
public java.util.List<PrimaryDataEntityRmiInterface> searchByKeyword(java.lang.String keyword, boolean fuzzy, boolean recursiveIntoSubdirectories, javax.security.auth.Subject subject) throws PrimaryDataDirectoryException, java.rmi.RemoteException
- Specified by:
searchByKeywordin interfacePrimaryDataDirectoryRmiInterface- Parameters:
keyword- the term to search over all elements.fuzzy-true: fuzzy search;false: exact searchrecursiveIntoSubdirectories-true: include also all subPrimaryDataDirectoryrecursively;falsesearch only in the currentPrimaryDataDirectoryobjectsubject- the authenticated subject for check permission.- Returns:
- a unmodifiable
ListofPrimaryDataEntitythat match the keyword. - Throws:
PrimaryDataDirectoryException- if unable to search for the keyword.java.rmi.RemoteException- if unable to call remote function.- See Also:
PrimaryDataDirectory.searchByKeyword(String, boolean, boolean)
-
-