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 wrapPrimaryDataDirectory
functions 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 PrimaryDataDirectoryRmiInterface
createPrimaryDataDirectory(java.lang.String path, javax.security.auth.Subject subject, java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> defaultPermissions)
PrimaryDataFileRmiInterface
createPrimaryDataFile(java.lang.String name, javax.security.auth.Subject subject, java.util.Map<java.security.Principal,java.util.List<GrantableMethods.Methods>> defaultPermissions)
boolean
exist(java.lang.String path, javax.security.auth.Subject subject)
java.util.List<PrimaryDataEntityRmiInterface>
getAllPublishedEntities(javax.security.auth.Subject subject)
PrimaryDataEntityRmiInterface
getPrimaryDataEntity(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)
void
setMetaData(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.RemoteException
Constructor forPrimaryDataDirectoryWrapper
.- Parameters:
dataPort
- the data port for the remote objects.directory
- aPrimaryDataDirectory
object.- 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:
createPrimaryDataDirectory
in interfacePrimaryDataDirectoryRmiInterface
- Parameters:
path
- the name of the newPrimaryDataDirectory
.subject
- the authenticated subject for check permission.defaultPermissions
- current default permissions.- Returns:
- the new
PrimaryDataDirectory
object.
null
if failed - Throws:
PrimaryDataDirectoryException
- if the currentPrimaryDataEntityVersion
of thisPrimaryDataDirectory
is marked as deleted or if there is already aPrimaryDataEntity
with 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:
createPrimaryDataFile
in interfacePrimaryDataDirectoryRmiInterface
- Parameters:
name
- of the newPrimaryDataFile
object.subject
- the authenticated subject for check permission.defaultPermissions
- current default permissions- Returns:
- the new
PrimaryDataFile
.
null
if failed - Throws:
PrimaryDataDirectoryException
- if the currentPrimaryDataEntityVersion
of thisPrimaryDataDirectory
is marked as deleted or if there is already aPrimaryDataEntity
with 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:
exist
in interfacePrimaryDataDirectoryRmiInterface
- Parameters:
path
- the name of thePrimaryDataEntity
to check.subject
- the authenticated subject for check permission.- Returns:
true
if there is already a PrimartyDataEntity with the same path;
false
otherwise- Throws:
java.rmi.RemoteException
- if unable to call remote function.PrimaryDataDirectoryException
- if unable to load allPrimaryDataEntity
objects in thisPrimaryDataDirectory
to 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:
listPrimaryDataEntities
in interfacePrimaryDataDirectoryRmiInterface
- Parameters:
subject
- the authenticated subject for check permission.- Returns:
- an unmodifiable
List
containing allPrimaryDataEntity
- Throws:
PrimaryDataDirectoryException
- if unable to load allPrimaryDataEntity
objects 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:
setMetaData
in interfacePrimaryDataDirectoryRmiInterface
- Specified by:
setMetaData
in interfacePrimaryDataEntityRmiInterface
- Overrides:
setMetaData
in classPrimaryDataEntityWrapper
- Parameters:
metadata
- the newMetaData
object 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 theMetaData
object.- 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:
searchByDublinCoreElement
in interfacePrimaryDataDirectoryRmiInterface
- Parameters:
element
- theEnumDublinCoreElements
for query.data
-UntypedData
parameter for search.fuzzy
-true
: exact search;
false
: fuzzy search.recursiveIntoSubdirectories
-true
: include also all sub directories recursively;
false
: search only in the currentPrimaryDataDirectory
object.subject
- the authenticated subject for check permission.- Returns:
- an unmodifiable
List
ofPrimaryDataEntity
that match the parameter. - Throws:
java.rmi.RemoteException
- if unable to call remote function.PrimaryDataDirectoryException
- if unable to findPrimaryDataEntity
object 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:
searchByMetaData
in interfacePrimaryDataDirectoryRmiInterface
- Parameters:
query
- aMetaData
object for query.fuzzy
-true
: fuzzy search;
false
: exact searchrecursiveIntoSubdirectories
-true
: include also all subPrimaryDataDirectory
recursively;
false
search only in the currentPrimaryDataDirectory
objectsubject
- the authenticated subject for check permission.- Returns:
- a unmodifiable
List
ofPrimaryDataEntity
that match theMetaData
parameter - Throws:
java.rmi.RemoteException
- if unable to call remote function.PrimaryDataDirectoryException
- if unable to findPrimaryDataEntity
object or if there are too much results.MetaDataException
- if there are non valid values for someMetaData
elements.- 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:
getPrimaryDataEntity
in interfacePrimaryDataDirectoryRmiInterface
- Parameters:
name
- name of thePrimaryDataEntity
in thisPrimaryDataDirectory
.subject
- the authenticated subject for check permission.- Returns:
- the found
PrimaryDataEntity
object. - Throws:
PrimaryDataDirectoryException
- if no suchPrimaryDataEntity
exists.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:
getPublicReferences
in interfacePrimaryDataEntityRmiInterface
- Parameters:
subject
- the authenticated subject for check permission.- Returns:
- a
List
with all storedPublicReference
s of the currentPrimaryDataEntityVersion
of 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:
searchByPublicationStatus
in interfacePrimaryDataDirectoryRmiInterface
- Parameters:
publicationStatus
- thePublicationStatus
of the searchedPrimaryDataEntity
.subject
- the authenticated subject for check permission.- Returns:
- a
List
of allPrimaryDataEntity
with aPublicReference
. - Throws:
PrimaryDataDirectoryException
- if unable to search forPublicationStatus
java.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:
getAllPublishedEntities
in interfacePrimaryDataDirectoryRmiInterface
- Parameters:
subject
- the authenticated subject for check permission.- Returns:
- a
List
of allPrimaryDataEntity
with 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:
searchByKeyword
in interfacePrimaryDataDirectoryRmiInterface
- Parameters:
keyword
- the term to search over all elements.fuzzy
-true
: fuzzy search;false
: exact searchrecursiveIntoSubdirectories
-true
: include also all subPrimaryDataDirectory
recursively;false
search only in the currentPrimaryDataDirectory
objectsubject
- the authenticated subject for check permission.- Returns:
- a unmodifiable
List
ofPrimaryDataEntity
that 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)
-
-