Package com.groiss.dms
Interface DMS
Utility class for DMS related operations.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Options for adding a document to a folder.static final class
Predefined form types. -
Field Summary
Modifier and TypeFieldDescriptionstatic final short
Determines that a DMSObject should be copied from one folder to anotherstatic final char[]
holds the characters which are not allowed within the name of a DMSObjectstatic final short
Determines that a link to a DMSObject should be createdstatic final short
Determines that a DMSObject should be moved from one folder to another -
Method Summary
Modifier and TypeMethodDescription<P extends DMSObject>
PAdds an Object to a folder.<P extends DMSObject>
Padd
(DMSFolder f, P o, DMS.AddOption ao) Adds an Object to a folder.void
addKeyword
(DMSObject obj, Keyword keyword) Adds the passed keyword to the passed DMSObjectvoid
addSubform
(DMSForm main, DMSForm sub, int id) Adds the passed subform to the mainform into the set of subforms identified by the passed id.void
attachNote
(DMSObject target, DMSNote note) Attaches the passed note to the passed object.void
backupToVersion
(DMSForm form, PersistentVersion version) Makes the content of the passed version to the current content of the passed form.<P extends DMSForm>
PchangeType
(DMSForm obj, FormType newType, DMSFolder folder) This method changes the type of the passed DMSObject to the passed FormType.void
checkDelete
(User user, DMSObject obj) Deprecated, for removal: This API element is subject to removal in a future version.void
checkDuplicateNames
(DMSFolder targetFolder, DMSObject targetObject, String name, String extension) Checks if the passed folder does not already contain an element with the same name as the passed one.void
Deprecated, for removal: This API element is subject to removal in a future version.UseOrgData.checkRight(Right, Persistent)
insteadvoid
checkValidName
(DMSObject target, String name, String extension) Checks if the name and extension do not contain any forbidden charactersvoid
Deprecated, for removal: This API element is subject to removal in a future version.UseOrgData.checkRight(Right, Persistent)
insteadint
countSubforms
(DMSForm f, int id) Counts the number of subforms in the subform-relation wheref
is the main form.<P extends DMSDocForm>
PcreateDocForm
(FormType ft, String name, String extension, P template, PermissionList acl) Creates a new document of the specified formtype.<P extends DMSDocForm>
PcreateDocForm
(String name, String extension) Creates a new standard document.<P extends DMSFolder>
PcreateFolder
(FormType ft, String name, P template, PermissionList acl) Creates a new folder of a given type.<P extends DMSFolder>
PcreateFolder
(String name) Creates a new standard folder.<P extends DMSForm>
PcreateForm
(FormType ft, P template, PermissionList acl) Creates a new form of the specified formtype.createKeyword
(String word) Creates a new Keyword for the passed word and returns this instance.<P extends DMSNote>
PcreateNote
(String subject, String content, PermissionList acl) Creates a new note<P extends DMSWebLink>
PcreateWebLink
(String name, String url, String description, PermissionList acl) Creates a new link to an URLDeletes the object o which resides in folder f.void
deleteVersion
(PersistentVersion version) Deletes the passed version of an object.void
deleteVersions
(DMSForm form) Deletes all versions of the passed form.void
Deprecated, for removal: This API element is subject to removal in a future version.UsePersistentAspect.add(PersistentAspect...)
withPersistentAspect.ALL_PERMISSIONS
as parameter instead to disable any permission check.Empties the Recycle Bin of the current user - i.e. all its content will now be deleted irrevocablyvoid
Deprecated, for removal: This API element is subject to removal in a future version.UsePersistentAspect.remove(PersistentAspect...)
withPersistentAspect.ALL_PERMISSIONS
as parameter instead to enable permission check again.fetchMainForms
(Collection<? extends DMSForm> subForms) Construct a mapping from sub form instances to (filled) main form instancesfetchSubForms
(Collection<? extends DMSForm> mainForms, int subformid) Construct a mapping from mainform instances to (filled) subform instances.byte[]
getContent
(DMSDocForm document) Get the content of a document.byte[]
getContent
(PersistentVersion version) Get the content of a document's version.getContentAsStream
(DMSDocForm document) Get an InputStream to the content of a document.getContentAsStream
(PersistentVersion version) Get an InputStream to the content of a document's version.<P extends DMSObject>
PgetDMSObject
(long oid) Get a DMSObject by oid.<P extends DMSObject>
PgetDMSObject
(String path) Get a DMSObject by path.<P extends DMSFolder>
PGet the folder containing the passed object.getFormType
(String id, int version) Returns the formtype with the given id and version numberstatic DMS
Get the DMS to perform action with the workflow document management system.<P extends DMSForm>
PReturns the main form of the passed form (or null if there is none)<P extends DMSFolder>
PReturns the public root folder in the DMS.<P extends DMSFolder>
PgetRecentlyUsedFolder
(User user) Returns the recently-used folder for a user<P extends DMSFolder>
PgetRecycleBin
(User user) Returns the recycle bin for a user.<P extends DMSFolder>
PgetRootFolder
(User user) Returns the root DMS folder (i.e. it has no parent) for a user.getTemplates
(FormType ft) Returns the templates for the passed form type.boolean
isDuplicateName
(DMSFolder targetFolder, DMSObject targetObject, String name, String extension) Returns true if already an item of the passed folder has the passed nameboolean
isInRecycleBin
(DMSObject target) Returns true, if the object in the recylce binlistContents
(DMSFolder folder, FormType ft, boolean recursive, String cond, String order, Object... vals) Returns a list of dms objects which match the passed conditionlistContents
(DMSFolder folder, FormType ft, String cond, String order, Object[] vals, boolean recursive) Deprecated, for removal: This API element is subject to removal in a future version.listCreateableFormTypes
(String searchCond, String order) Returns the formtypes which meet the search condition and from which the passed user may create form objects.listKeywords
(DMSObject obj) Returns a list of all keywords attached to the passed DMSObjectReturns all the notes which are attached to target and which the user may view or edit No System notes are returnedReturns all the notes which are attached to target and which the user may view or editlistSubfolders
(DMSFolder startFolder) Returns a list of all folders which are subfolders of the given folder.listSubforms
(DMSForm f, int id) Returns a list of subforms of the passed form (which is empty if there are none)listSubforms
(DMSForm f, int id, String cond, String order, Object... vals) Returns a list of subforms of the passed form (which is empty if there are none)listVersions
(DMSObject obj) Returns the versions of the specified object in descending order of their creation date.listVersions
(DMSObject obj, String condition, String order, Object... bindVars) Returns the versions of the specified object matching the specified condition.void
lock
(DMSDocForm document) Locks the document.makeVersion
(DMSObject obj, String description) Makes a version of the passed object.boolean
Deprecated, for removal: This API element is subject to removal in a future version.UseOrgData.mayDelete(User, Persistent)
insteadboolean
Deprecated, for removal: This API element is subject to removal in a future version.UseOrgData.mayUpdate(User, Persistent)
insteadboolean
Deprecated, for removal: This API element is subject to removal in a future version.UseOrgData.mayView(User, Persistent)
instead<P extends DMSObject>
PMoves an object from one folder to another.Moves the object o which resides in folder f to the Recycle Bin.<P extends DMSDocForm>
PreloadDocument
(DMSFolder folder, P document, String newExtension, InputStream is) Reloads the document, i.e. replaces the content of the document with the content of the passed file<P extends DMSDocForm>
PreloadDocument
(DMSFolder folder, P document, String newExtension, InputStream is, long length, byte[] digest) Reloads the document, i.e. replaces the content of the document with the content of the passed streamboolean
Removes an Object from a folder.void
removeKeyword
(DMSObject obj, Keyword keyword) Removes the passed keyword from the passed DMSObjectvoid
removeNote
(DMSObject target, DMSNote note) Removes the passed note from the passed document.void
removeSubform
(DMSForm main, DMSForm sub) Removes the passed subform from the passed mainform.void
removeSubform
(DMSForm main, DMSForm sub, int id) Removes the passed subform from the subform-relation identified by the passed id in the passed mainform.<P extends DMSObject>
PrenameDocument
(DMSFolder folder, P obj, String newName, String newExtension) Sets the name and extension of the passed object to newName.Restores the passed object from recycle bin, i.e. moves it to it original folder if that folder still exists - otherwise an exception is thrown.void
setContent
(DMSDocForm document, byte[] barr) Set the content of a document.void
setContent
(DMSDocForm document, InputStream is) Set the content of a document.void
setContent
(DMSDocForm document, InputStream is, long length, byte[] digest) Set the content of a document.void
signDocuments
(List<? extends DMSDocForm> documents, Agent agent, char[] password) Digital Signing of a list of DMS documents.void
signVersions
(List<? extends PersistentVersion> versions, Agent agent, char[] password) Digital Signing of a list of DMS document version.void
unlock
(DMSDocForm document) Unlocks the document.void
Updates the passed object
-
Field Details
-
MOVE
static final short MOVEDetermines that a DMSObject should be moved from one folder to another- See Also:
-
COPY
static final short COPYDetermines that a DMSObject should be copied from one folder to another- See Also:
-
LINK
static final short LINKDetermines that a link to a DMSObject should be created- See Also:
-
invalidChars
static final char[] invalidCharsholds the characters which are not allowed within the name of a DMSObject
-
-
Method Details
-
getInstance
Get the DMS to perform action with the workflow document management system.- Returns:
- a DMS object
-
createFolder
Creates a new standard folder.- Specified by:
createFolder
in interfaceRemoteDMS
- Parameters:
name
- the name for the folder- Returns:
- the new folder
-
createFolder
Creates a new folder of a given type.- Specified by:
createFolder
in interfaceRemoteDMS
- Parameters:
ft
- the folder's formtypename
- the name for the foldertemplate
- specifies the template which should be used for creating the folder (may be null)acl
- the acl attached to the new folder (may be null)- Returns:
- the new folder
-
createDocForm
Creates a new standard document.- Specified by:
createDocForm
in interfaceRemoteDMS
- Parameters:
name
- the name of the new DocFormextension
- the file extension of the new document- Returns:
- the new document
-
createDocForm
<P extends DMSDocForm> P createDocForm(FormType ft, String name, String extension, P template, PermissionList acl) Creates a new document of the specified formtype.- Specified by:
createDocForm
in interfaceRemoteDMS
- Parameters:
ft
- the document's formtypename
- the name of the new DocFormextension
- the file extension of the new document (this parameter is ignored if a template is passed because then the template determines the extension)template
- specifies the template which should be used for creating the folder (may be null)acl
- the acl if one should be set (otherwise pass null)- Returns:
- the new document
-
createForm
Creates a new form of the specified formtype. The form will be inserted to the database and therefore contain an oid.- Specified by:
createForm
in interfaceRemoteDMS
- Parameters:
ft
- the form's formtypetemplate
- specifies the template which should be used for creating the folder (may be null)acl
- the acl if one should be set (otherwise pass null)- Returns:
- the new form
-
createNote
Creates a new note- Specified by:
createNote
in interfaceRemoteDMS
- Parameters:
subject
- the subject of the notecontent
- the content of the noteacl
- the acl if one should be set (otherwise pass null)- Returns:
- the new form
-
createWebLink
<P extends DMSWebLink> P createWebLink(String name, String url, String description, PermissionList acl) Creates a new link to an URL- Specified by:
createWebLink
in interfaceRemoteDMS
- Parameters:
name
- the name of the weblinkurl
- the url of the weblinkdescription
- a description text of the the weblinkacl
- the acl if one should be set (otherwise pass null)- Returns:
- the new weblink
-
getFormType
Returns the formtype with the given id and version number- Specified by:
getFormType
in interfaceRemoteDMS
-
getTemplates
Returns the templates for the passed form type.- Specified by:
getTemplates
in interfaceRemoteDMS
- Parameters:
ft
- the form type of which the templates are wanted- Returns:
- a list of form objects
-
listCreateableFormTypes
Returns the formtypes which meet the search condition and from which the passed user may create form objects.- Specified by:
listCreateableFormTypes
in interfaceRemoteDMS
- Parameters:
searchCond
- a sql where-clauseorder
- sql order attributes
-
move
Moves an object from one folder to another. -
add
Adds an Object to a folder. Use this method after creation of the object. -
add
Adds an Object to a folder. Use this method after creation of the object. -
remove
Removes an Object from a folder. NOTE: this will not delete the passed object but only remove it from the folders contents -
delete
Deletes the object o which resides in folder f. This will also remove the object from the folder. If o is a folder all its content will also be deleted. -
attachNote
Attaches the passed note to the passed object.- Specified by:
attachNote
in interfaceRemoteDMS
- Parameters:
target
- the object to which the note should be attachednote
- the note which should be attached
-
removeNote
Removes the passed note from the passed document.- Specified by:
removeNote
in interfaceRemoteDMS
- Parameters:
target
- the object form which the note should be removednote
- the note which should be removed
-
listNotes
Returns all the notes which are attached to target and which the user may view or edit No System notes are returned -
listNotes
Returns all the notes which are attached to target and which the user may view or edit -
makeVersion
Makes a version of the passed object.- Specified by:
makeVersion
in interfaceRemoteDMS
- Parameters:
obj
- the object which should be versioneddescription
- the version description text
-
deleteVersion
Deletes the passed version of an object.- Specified by:
deleteVersion
in interfaceRemoteDMS
- Parameters:
version
- the version to be deleted
-
listVersions
Returns the versions of the specified object in descending order of their creation date.- Specified by:
listVersions
in interfaceRemoteDMS
- Parameters:
obj
- the object which versions are requested
-
listVersions
List<PersistentVersion> listVersions(DMSObject obj, String condition, String order, Object... bindVars) Returns the versions of the specified object matching the specified condition.- Specified by:
listVersions
in interfaceRemoteDMS
- Parameters:
obj
- the object which versions are requestedcondition
- the condition the versions must match (columns of avw_log can be used to filter version records)order
- a comma separated list of column names of avw_log.bindVars
- values for the parameters in condition
-
backupToVersion
Makes the content of the passed version to the current content of the passed form.- Specified by:
backupToVersion
in interfaceRemoteDMS
- Parameters:
form
- the object which should be reset to the passed the versionversion
- the version which content should be used (it must be a version of the passed form)
-
deleteVersions
Deletes all versions of the passed form.- Specified by:
deleteVersions
in interfaceRemoteDMS
- Parameters:
form
- the object which versions should be deleted
-
getRootFolder
Returns the root DMS folder (i.e. it has no parent) for a user.- Specified by:
getRootFolder
in interfaceRemoteDMS
- Parameters:
user
- the user who's root folder is requested.
-
getPublicRootFolder
Returns the public root folder in the DMS.- Specified by:
getPublicRootFolder
in interfaceRemoteDMS
-
getRecycleBin
Description copied from interface:RemoteDMS
Returns the recycle bin for a user.- Specified by:
getRecycleBin
in interfaceRemoteDMS
- Parameters:
user
- the user who's recycle bin is requested.
-
getRecentlyUsedFolder
Description copied from interface:RemoteDMS
Returns the recently-used folder for a user- Specified by:
getRecentlyUsedFolder
in interfaceRemoteDMS
- Parameters:
user
- the user who's recently-used folder is requested- Returns:
-
getDMSObject
Get a DMSObject by oid. This method will only find DMSObjects which are elements of a DMSFolder.- Specified by:
getDMSObject
in interfaceRemoteDMS
- Parameters:
oid
- the oid of the requested object
-
getDMSObject
Get a DMSObject by path. The path is a string of DMSObject names separated with '/' whereas each element in the path must be a folder's name except the last one (e.g. 'Common/my_directory/my_file.txt'). For the DMS top-level folders the following place holders may be used: 'COMMON' for public root 'USER' for DMS root folder of the current user 'RECYCLEBIN' for the recycle bin of the current user So the above example may also be specified as 'COMMON/my_directory/my_file.txt' in which case the actual name of the public root is not relevant anymore. Note: This method will only find DMSObjects which are elements of a DMSFolder.- Specified by:
getDMSObject
in interfaceRemoteDMS
- Parameters:
path
- the path leading to the wanted DMSObject
-
getFolder
Get the folder containing the passed object. -
listSubfolders
Returns a list of all folders which are subfolders of the given folder. ATTENTION: the found folders are not filled, only their oids are set- Specified by:
listSubfolders
in interfaceRemoteDMS
- Parameters:
startFolder
- the folder which subfolders are requested
-
getMainForm
Returns the main form of the passed form (or null if there is none)- Specified by:
getMainForm
in interfaceRemoteDMS
- Parameters:
f
- the form for which the mainform is needed
-
listSubforms
Returns a list of subforms of the passed form (which is empty if there are none)- Specified by:
listSubforms
in interfaceRemoteDMS
- Parameters:
f
- the form of which the subforms are neededid
- the id of the wanted subforms
-
listSubforms
<P extends DMSForm> List<P> listSubforms(DMSForm f, int id, String cond, String order, Object... vals) Returns a list of subforms of the passed form (which is empty if there are none)- Specified by:
listSubforms
in interfaceRemoteDMS
- Parameters:
f
- the form of which the subforms are neededid
- the id of the wanted subformscond
- the condition which must match. This allows additional filtering within the subform table, e.g. 'amount > 10000' where 'amount' is a column in the database table of the subform class determined by the passed id.order
- the sorting ordervals
- values for the parameters in condition of a prepared statement
-
countSubforms
Counts the number of subforms in the subform-relation wheref
is the main form.- Specified by:
countSubforms
in interfaceRemoteDMS
- Parameters:
f
- the form of which the subforms will be countedid
- the id of the subform relation
-
removeSubform
Removes the passed subform from the passed mainform. NOTE: only the relation between the main- and the subform is removed, the subform will not be deleted by this method. Also the mainform will not be updated - so it may be the case that users can still see the removed subform in the browser if the mainform is gotten from the browser cache.- Specified by:
removeSubform
in interfaceRemoteDMS
- Parameters:
main
- the mainform. If null is passed all main-subform-relations in which the passed subform is referenced as subform will be removed.sub
- the subform to remove
-
removeSubform
Removes the passed subform from the subform-relation identified by the passed id in the passed mainform. NOTE: only the relation between the main- and the subform is removed, the subform will not be deleted by this method. Also the mainform will not be updated - so it may be the case that users can still see the removed subform in the browser if the mainform is gotten from the browser cache.- Specified by:
removeSubform
in interfaceRemoteDMS
- Parameters:
main
- the mainform. If null is passed all main-subform-relations in which the passed subform is referenced as subform will be removed.sub
- the subform to removeid
- the id of the subform-relation from which the subform should be removed
-
addSubform
Adds the passed subform to the mainform into the set of subforms identified by the passed id. NOTE: the mainform will not be updated - so it may be the case that users can't see the added subform in the browser if the mainform is gotten from the browser cache.- Specified by:
addSubform
in interfaceRemoteDMS
- Parameters:
main
- the mainformsub
- the subform to addid
- the id of the set of subform to which the passed subform should be added
-
fetchSubForms
Construct a mapping from mainform instances to (filled) subform instances.- Specified by:
fetchSubForms
in interfaceRemoteDMS
- Parameters:
mainForms
- the referencing mainformssubformid
- the id of the subform (tablefield) to get- Returns:
- the mapping from mainforms to subforms
-
fetchMainForms
Construct a mapping from sub form instances to (filled) main form instances- Specified by:
fetchMainForms
in interfaceRemoteDMS
- Parameters:
subForms
- the referencing subforms- Returns:
- the mapping from subforms to mainforms
-
listContents
@Deprecated(since="10.0", forRemoval=true) <P extends DMSObject> List<P> listContents(DMSFolder folder, FormType ft, String cond, String order, Object[] vals, boolean recursive) Deprecated, for removal: This API element is subject to removal in a future version.Returns a list of dms objects which match the passed condition- Specified by:
listContents
in interfaceRemoteDMS
- Parameters:
folder
- the folder whose content is wantedft
- the formtype of the desired objectscond
- the condition which must match. The following columns are available for parameter cond and order:- if the passed formtype is null:
- t0.form the oid of the content element
- t0.docname the name of the content element
- t0.dept the oid of the department
- t0.owner the oid of the owner (= creator)
- t0.createdat the creation date
- t0.changedat the date of the last change
- if the passed formtype is not null you can use all columns of the specified form type's table. For those columns you must also use the table alias t0 as described in the listing above
- if the passed formtype is null:
order
- the sorting order (for available columns see parameter cond)vals
- the values of the parameters in condrecursive
- determines if the search should also include all subfolders
-
listContents
<P extends DMSObject> List<P> listContents(DMSFolder folder, FormType ft, boolean recursive, String cond, String order, Object... vals) Returns a list of dms objects which match the passed condition- Specified by:
listContents
in interfaceRemoteDMS
- Parameters:
folder
- the folder whose content is wantedft
- the formtype of the desired objectsrecursive
- determines if the search should also include all subfolderscond
- the condition which must match. The following columns are available for parameter cond and order:- if the passed formtype is null:
- t0.form the oid of the content element
- t0.docname the name of the content element
- t0.dept the oid of the department
- t0.owner the oid of the owner (= creator)
- t0.createdat the creation date
- t0.changedat the date of the last change
- if the passed formtype is not null you can use all columns of the specified form type's table. For those columns you must also use the table alias t0 as described in the listing above
- if the passed formtype is null:
order
- the sorting order (for available columns see parameter cond)vals
- the values of the parameters in cond of a prepared statement
-
renameDocument
<P extends DMSObject> P renameDocument(DMSFolder folder, P obj, String newName, String newExtension) Sets the name and extension of the passed object to newName.- Specified by:
renameDocument
in interfaceRemoteDMS
- Parameters:
folder
- the folder the document belongs toobj
- the object which should be renamednewName
- the new name for the documentnewExtension
- the new extension for the document. This parameter is ignored if the passed object is not aDMSDocForm
.
-
reloadDocument
<P extends DMSDocForm> P reloadDocument(DMSFolder folder, P document, String newExtension, InputStream is) Reloads the document, i.e. replaces the content of the document with the content of the passed file- Parameters:
folder
- the folder the document belongs todocument
- the document which should be reloadednewExtension
- the possibly new extension (if null or the empty string is passed the old extension remains unchanged).is
- the inputstream holding the new content
-
reloadDocument
<P extends DMSDocForm> P reloadDocument(DMSFolder folder, P document, String newExtension, InputStream is, long length, byte[] digest) Reloads the document, i.e. replaces the content of the document with the content of the passed stream- Parameters:
folder
- the folder the document belongs todocument
- the document which should be reloadednewExtension
- the possibly new extension (if null or the empty string is passed the old extension remains unchanged).is
- theInputStream
holding the new contentlength
- the length of the new content in bytesdigest
- the message digest of the new content
-
setContent
Set the content of a document.- Specified by:
setContent
in interfaceRemoteDMS
- Parameters:
document
- the documentbarr
- a byte array
-
setContent
Set the content of a document. NOTE: if the new content is already available as byte array then usesetContent(DMSDocForm, byte[])
which is more performant than this method.- Parameters:
document
- the document which content should be setis
- anInputStream
to the content of the document
-
setContent
Set the content of a document.- Parameters:
document
- the document which content should be setis
- anInputStream
to the content of the documentlength
- the length of the new content in bytesdigest
- the message digest of the new content
-
getContent
Get the content of a document.- Specified by:
getContent
in interfaceRemoteDMS
- Parameters:
document
- the document- Returns:
- a byte array
-
getContentAsStream
Get an InputStream to the content of a document. The caller is responsible for closing the stream.- Parameters:
document
- the document- Returns:
- an InputStream
-
getContent
Get the content of a document's version.- Specified by:
getContent
in interfaceRemoteDMS
- Parameters:
version
- the version- Returns:
- a byte array
-
getContentAsStream
Get an InputStream to the content of a document's version. The caller is responsible for closing the stream.- Parameters:
version
- the version- Returns:
- an InputStream
-
lock
Locks the document. -
unlock
Unlocks the document. -
changeType
This method changes the type of the passed DMSObject to the passed FormType. All system definied metadata will be copied, all type specific metadata will not (except the name attribute). Only DMSFolders and DMSDocForms may change their types. Note: because the @enterprise persistence mechanism needs the oid and class name of instances of interfaces and abstract classes there are some changes to be done in other tables to correct the class name (the oid will stay the same when changing the type). If you have your own tables where you hold references to such objects you have to handle the change in these tables by yourself.- Specified by:
changeType
in interfaceRemoteDMS
- Parameters:
obj
- the objects which type should be changednewType
- the new type for the passed objectfolder
- the folder of which the object is a content member
-
update
Updates the passed object -
moveToRecycleBin
Moves the object o which resides in folder f to the Recycle Bin. If o is a folder also its content will be moved to the Bin (recursively).- Specified by:
moveToRecycleBin
in interfaceRemoteDMS
- Parameters:
f
- the folder holding the object which should be deletedo
- the object which should be deleted- Returns:
- all object moved to the Recycle Bin by this call
-
restoreFromRecycleBin
Restores the passed object from recycle bin, i.e. moves it to it original folder if that folder still exists - otherwise an exception is thrown. If o is a folder also its content will be restored- Specified by:
restoreFromRecycleBin
in interfaceRemoteDMS
- Parameters:
o
- the object to restore- Returns:
- the restored objects
-
emptyRecycleBin
Empties the Recycle Bin of the current user - i.e. all its content will now be deleted irrevocably- Specified by:
emptyRecycleBin
in interfaceRemoteDMS
- Returns:
- the deleted objects
-
createKeyword
Creates a new Keyword for the passed word and returns this instance.- Specified by:
createKeyword
in interfaceRemoteDMS
- Parameters:
word
- the string representing the wanted keyword- Returns:
- the new keyword
-
addKeyword
Adds the passed keyword to the passed DMSObject- Specified by:
addKeyword
in interfaceRemoteDMS
- Parameters:
obj
- the object to which the keyword should be addedkeyword
- the keyword which should be added
-
removeKeyword
Removes the passed keyword from the passed DMSObject- Specified by:
removeKeyword
in interfaceRemoteDMS
- Parameters:
obj
- the object from which the keyword should be removedkeyword
- the keyword which should be removed
-
listKeywords
Returns a list of all keywords attached to the passed DMSObject- Specified by:
listKeywords
in interfaceRemoteDMS
- Parameters:
obj
- the object which the keywords should be returned- Returns:
- a list of all keywords of a given DMSObject
-
disableRightChecks
Deprecated, for removal: This API element is subject to removal in a future version.UsePersistentAspect.add(PersistentAspect...)
withPersistentAspect.ALL_PERMISSIONS
as parameter instead to disable any permission check. If you use the following code pattern you do not need to care about removing the added aspect on your own:try (SilentCloseable sc = PersistentAspect.add(PersistentAspect.ALL_PERMISSIONS)) { //do your DMS related unchecked stuff }
If this method is called all right checks done using methodsRemoteDMS.checkEdit(User, DMSObject)
,RemoteDMS.checkView(User, DMSObject)
,RemoteDMS.mayEdit(User, DMSObject)
andRemoteDMS.mayView(User, DMSObject)
are deactivated in the current thread. But be aware to enable the right check at the end of your actions because threads are reused in our system.- Specified by:
disableRightChecks
in interfaceRemoteDMS
-
enableRightChecks
Deprecated, for removal: This API element is subject to removal in a future version.UsePersistentAspect.remove(PersistentAspect...)
withPersistentAspect.ALL_PERMISSIONS
as parameter instead to enable permission check again. When you're using the code pattern described indisableRightChecks()
you will not need to callPersistentAspect.remove(PersistentAspect...)
on your own.enables the right checks if they were previously disabled using methodRemoteDMS.disableRightChecks()
.- Specified by:
enableRightChecks
in interfaceRemoteDMS
-
checkEdit
Deprecated, for removal: This API element is subject to removal in a future version.UseOrgData.checkRight(Right, Persistent)
insteadThrowsApplicationException
Nr. 27 if the passed user may NOT edit the passed object -
checkView
Deprecated, for removal: This API element is subject to removal in a future version.UseOrgData.checkRight(Right, Persistent)
insteadThrowsApplicationException
Nr. 27 if the passed user may NOT view the passed object -
checkDelete
Deprecated, for removal: This API element is subject to removal in a future version.UseOrgData.checkRight(Right, Persistent)
insteadThrowsApplicationException
Nr. 27 if the passed user may NOT delete the passed object- Specified by:
checkDelete
in interfaceRemoteDMS
- Parameters:
user
- the user who wants to delete the objectobj
- the object which should be deleted
-
mayEdit
Deprecated, for removal: This API element is subject to removal in a future version.UseOrgData.mayUpdate(User, Persistent)
insteadReturns true if the passed user may edit the passed object or if the right check is deactivated. Otherwise false is returned. -
mayView
Deprecated, for removal: This API element is subject to removal in a future version.UseOrgData.mayView(User, Persistent)
insteadReturns true if the passed user may view the passed object or if the right check is deactivated. Otherwise false is returned. -
mayDelete
Deprecated, for removal: This API element is subject to removal in a future version.UseOrgData.mayDelete(User, Persistent)
insteadReturns true if the passed user may delete the passed object or if the right check is deactivated. Otherwise false is returned. -
checkValidName
Checks if the name and extension do not contain any forbidden characters- Specified by:
checkValidName
in interfaceRemoteDMS
- Parameters:
target
- the object to which the name belongs to (or will belong to)name
- the name which should be checkedextension
- the extension which should be checked
-
checkDuplicateNames
void checkDuplicateNames(DMSFolder targetFolder, DMSObject targetObject, String name, String extension) Checks if the passed folder does not already contain an element with the same name as the passed one.- Specified by:
checkDuplicateNames
in interfaceRemoteDMS
- Parameters:
targetFolder
- the folder in which should be checkedtargetObject
- the object the name belongs to (or will belong to)name
- the name which should be checkedextension
- the extension which should be checked
-
isDuplicateName
boolean isDuplicateName(DMSFolder targetFolder, DMSObject targetObject, String name, String extension) Returns true if already an item of the passed folder has the passed name- Specified by:
isDuplicateName
in interfaceRemoteDMS
- Parameters:
targetFolder
- the folder in which should be checkedtargetObject
- the object the name belongs to (or will belong to)name
- the name which should be checkedextension
- the extension which should be checked
-
isInRecycleBin
Returns true, if the object in the recylce bin- Specified by:
isInRecycleBin
in interfaceRemoteDMS
- Parameters:
target
- the object, which should be checked
-
signDocuments
Digital Signing of a list of DMS documents. Implemented only for PDF documents.- Specified by:
signDocuments
in interfaceRemoteDMS
- Parameters:
documents
- a List of documents to signagent
- the agent (role or user) which is signing the documentpassword
- the password of the private key used to sign document
-
signVersions
Digital Signing of a list of DMS document version. Implemented only for PDF documents.- Specified by:
signVersions
in interfaceRemoteDMS
- Parameters:
versions
- a List of versions to signagent
- the agent (role or user) which is signing the documentpassword
- the password of the private key used to sign document
-
OrgData.checkRight(Right, Persistent)
instead