Modifier and Type | Field and Description |
---|---|
static short |
COPY
Determines that a DMSObject should be copied from one folder to another
|
static char[] |
invalidChars
holds the charactes which are not allowed within the name of a DMSObject
|
static short |
LINK
Determines that a link to a DMSObject should be created
|
static short |
MOVE
Determines that a DMSObject should be moved from one folder to another
|
Modifier and Type | Method and Description |
---|---|
<P extends DMSObject> |
add(DMSFolder f,
P o)
Adds an Object to a folder.
|
<P extends DMSObject> |
add(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 DMSObject
|
void |
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> |
changeType(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.
since ep10, will be removed in ep11
Use
OrgData.checkRight(Right, Persistent) instead |
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 |
checkEdit(User user,
DMSObject obj)
Deprecated.
since ep10, will be removed in ep11
Use
OrgData.checkRight(Right, Persistent) instead |
void |
checkValidName(DMSObject target,
String name,
String extension)
Checks if the name and extension do not contain any forbidden characters
|
void |
checkView(User user,
DMSObject obj)
Deprecated.
since ep10, will be removed in ep11
Use
OrgData.checkRight(Right, Persistent) instead |
int |
countSubforms(DMSForm f,
int id)
Counts the number of subforms in the subform-relation where
f is
the main form. |
<P extends DMSDocForm> |
createDocForm(FormType ft,
String name,
String extension,
P template,
PermissionList acl)
Creates a new document of the specified formtype.
|
<P extends DMSDocForm> |
createDocForm(String name,
String extension)
Creates a new standard document.
|
<P extends DMSFolder> |
createFolder(FormType ft,
String name,
P template,
PermissionList acl)
Creates a new folder of a given type.
|
<P extends DMSFolder> |
createFolder(String name)
Creates a new standard folder.
|
<P extends DMSForm> |
createForm(FormType ft,
P template,
PermissionList acl)
Creates a new form of the specified formtype.
|
Keyword |
createKeyword(String word)
Creates a new Keyword for the passed word and returns this instance.
|
<P extends DMSNote> |
createNote(String subject,
String content,
PermissionList acl)
Creates a new note
|
<P extends DMSWebLink> |
createWebLink(String name,
String url,
String description,
PermissionList acl)
Creates a new link to an URL
|
List<DMSObject> |
delete(DMSFolder f,
DMSObject o)
Deletes 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 |
disableRightChecks()
Deprecated.
since ep10, will be removed in ep11
Use
PersistentAspect.add(PersistentAspect...) with PersistentAspect.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:
|
List<DMSObject> |
emptyRecycleBin()
Empties the Recycle Bin of the current user - i.e. all its content will now be deleted irrevocably
|
void |
enableRightChecks()
Deprecated.
since ep10, will be removed in ep11
Use
PersistentAspect.remove(PersistentAspect...) with PersistentAspect.ALL_PERMISSIONS as parameter instead to enable
permission check again. When you're using the code pattern described in disableRightChecks() you will not need to call
PersistentAspect.remove(PersistentAspect...) on your own. |
Map<DMSForm,DMSForm> |
fetchMainForms(Collection<? extends DMSForm> subForms)
Construct a mapping from sub form instances to (filled) main form instances
|
MultiMap<DMSForm,DMSForm> |
fetchSubForms(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.
|
<P extends DMSObject> |
getDMSObject(long oid)
Get a DMSObject by oid.
|
<P extends DMSObject> |
getDMSObject(String path)
Get a DMSObject by path.
|
<P extends DMSFolder> |
getFolder(DMSObject obj)
Get the folder containing the passed object.
|
FormType |
getFormType(String id,
int version)
Returns the formtype with the given id and version number
|
<P extends DMSForm> |
getMainForm(DMSForm f)
Returns the main form of the passed form (or null if there is none)
|
<P extends DMSFolder> |
getPublicRootFolder()
Returns the public root folder in the DMS.
|
<P extends DMSFolder> |
getRecentlyUsedFolder(User user)
Returns the recently-used folder for a user
|
<P extends DMSFolder> |
getRecycleBin(User user)
Returns the recycle bin for a user.
|
<P extends DMSFolder> |
getRootFolder(User user)
Returns the root DMS folder (i.e. it has no parent) for a user.
|
<P extends DMSForm> |
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 name
|
boolean |
isInRecycleBin(DMSObject target)
Returns true, if the object in the recylce bin
|
<P extends DMSObject> |
listContents(DMSFolder folder,
FormType ft,
boolean recursive,
String cond,
String order,
Object... vals)
Returns a list of dms objects which match the passed condition
|
<P extends DMSObject> |
listContents(DMSFolder folder,
FormType ft,
String cond,
String order,
Object[] vals,
boolean recursive)
Deprecated.
|
List<FormType> |
listCreateableFormTypes(String searchCond,
String order)
Returns the formtypes which meet the search condition and from which the passed user may create
form objects.
|
<P extends Keyword> |
listKeywords(DMSObject obj)
Returns a list of all keywords attached to the passed DMSObject
|
List<DMSNote> |
listNotes(DMSObject target)
Returns all the notes which are attached to target and which the user may view or edit
No System notes are returned
|
List<DMSNote> |
listNotes(DMSObject target,
boolean includeSystemNotes)
Returns all the notes which are attached to target and which the user may view or edit
|
<P extends DMSFolder> |
listSubfolders(DMSFolder startFolder)
Returns a list of all folders which are subfolders of the given folder.
|
<P extends DMSForm> |
listSubforms(DMSForm f,
int id)
Returns a list of subforms of the passed form (which is empty if there are none)
|
<P extends DMSForm> |
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)
|
List<PersistentVersion> |
listVersions(DMSObject obj)
Returns the versions of the specified object in descending order of their creation date.
|
List<PersistentVersion> |
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.
|
PersistentVersion |
makeVersion(DMSObject obj,
String description)
Makes a version of the passed object.
|
boolean |
mayDelete(User user,
DMSObject obj)
Deprecated.
since ep10, will be removed in ep11
Use
OrgData.mayDelete(User, Persistent) instead |
boolean |
mayEdit(User user,
DMSObject obj)
Deprecated.
since ep10, will be removed in ep11
Use
OrgData.mayUpdate(User, Persistent) instead |
boolean |
mayView(User user,
DMSObject obj)
Deprecated.
since ep10, will be removed in ep11
Use
OrgData.mayView(User, Persistent) instead |
<P extends DMSObject> |
move(DMSFolder src,
DMSFolder dest,
P doc,
short type)
Moves an object from one folder to another.
|
List<DMSObject> |
moveToRecycleBin(DMSFolder f,
DMSObject o)
Moves the object o which resides in folder f to the Recycle Bin.
|
boolean |
remove(DMSFolder f,
DMSObject o)
Removes an Object from a folder.
|
void |
removeKeyword(DMSObject obj,
Keyword keyword)
Removes the passed keyword from the passed DMSObject
|
void |
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> |
renameDocument(DMSFolder folder,
P obj,
String newName,
String newExtension)
Sets the name and extension of the passed object to newName.
|
List<DMSObject> |
restoreFromRecycleBin(DMSObject o)
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 |
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 |
update(DMSObject o)
Updates the passed object
|
static final short MOVE
static final short COPY
static final short LINK
static final char[] invalidChars
<P extends DMSFolder> P createFolder(String name) throws RemoteException
name
- the name for the folderRemoteException
<P extends DMSFolder> P createFolder(FormType ft, String name, P template, PermissionList acl) throws RemoteException
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)RemoteException
<P extends DMSDocForm> P createDocForm(String name, String extension) throws RemoteException
name
- the name of the new DocFormextension
- the file extension of the new documentRemoteException
<P extends DMSDocForm> P createDocForm(FormType ft, String name, String extension, P template, PermissionList acl) throws RemoteException
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)RemoteException
<P extends DMSForm> P createForm(FormType ft, P template, PermissionList acl) throws RemoteException
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)RemoteException
<P extends DMSNote> P createNote(String subject, String content, PermissionList acl) throws RemoteException
subject
- the subject of the notecontent
- the content of the noteacl
- the acl if one should be set (otherwise pass null)RemoteException
<P extends DMSWebLink> P createWebLink(String name, String url, String description, PermissionList acl) throws RemoteException
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)RemoteException
FormType getFormType(String id, int version) throws RemoteException
RemoteException
<P extends DMSForm> List<P> getTemplates(FormType ft) throws RemoteException
ft
- the form type of which the templates are wantedRemoteException
List<FormType> listCreateableFormTypes(String searchCond, String order) throws RemoteException
searchCond
- a sql where-clauseorder
- sql order attributesRemoteException
<P extends DMSObject> P move(DMSFolder src, DMSFolder dest, P doc, short type) throws RemoteException
src
- the folder currently holding the objectdest
- the folder to which the objects should be moveddoc
- the object which should be movedtype
- the type of move operation:
RemoteException
<P extends DMSObject> P add(DMSFolder f, P o) throws RemoteException
f
- the folder to which the object should be addedo
- the object which should be added to the folderRemoteException
<P extends DMSObject> P add(DMSFolder f, P o, DMS.AddOption ao) throws RemoteException
f
- the folder to which the object should be addedo
- the object which should be added to the folderao
- define the behaviour for name conflicts.RemoteException
boolean remove(DMSFolder f, DMSObject o) throws RemoteException
f
- the folder from which the object should be removedo
- the object which should be removed from the folderRemoteException
List<DMSObject> delete(DMSFolder f, DMSObject o) throws RemoteException
f
- the folder holding the object which should be deletedo
- the object which should be deletedRemoteException
void attachNote(DMSObject target, DMSNote note) throws RemoteException
target
- the object to which the note should be attachednote
- the note which should be attachedRemoteException
void removeNote(DMSObject target, DMSNote note) throws RemoteException
target
- the object form which the note should be removednote
- the note which should be removedRemoteException
List<DMSNote> listNotes(DMSObject target) throws RemoteException
target
- the object which notes are wantedRemoteException
List<DMSNote> listNotes(DMSObject target, boolean includeSystemNotes) throws Exception
target
- the object which notes are wantedincludeSystemNotes
- determines if system notes should be returned. true if system notes should be found.RemoteException
Exception
PersistentVersion makeVersion(DMSObject obj, String description) throws RemoteException
obj
- the object which should be versioneddescription
- the version description textRemoteException
void deleteVersion(PersistentVersion version) throws RemoteException
version
- the version to be deletedRemoteException
List<PersistentVersion> listVersions(DMSObject obj) throws RemoteException
obj
- the object which versions are requestedRemoteException
List<PersistentVersion> listVersions(DMSObject obj, String condition, String order, Object... bindVars) throws RemoteException
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 conditionRemoteException
void backupToVersion(DMSForm form, PersistentVersion version) throws RemoteException
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)RemoteException
void deleteVersions(DMSForm form) throws RemoteException
form
- the object which versions should be deletedRemoteException
byte[] getContent(PersistentVersion version) throws RemoteException
version
- the versionRemoteException
<P extends DMSFolder> P getRootFolder(User user) throws RemoteException
user
- the user who's root folder is requested.RemoteException
<P extends DMSFolder> P getPublicRootFolder() throws RemoteException
RemoteException
<P extends DMSFolder> P getRecycleBin(User user) throws RemoteException
user
- the user who's recycle bin is requested.RemoteException
<P extends DMSFolder> P getRecentlyUsedFolder(User user) throws RemoteException
user
- the user who's recently-used folder is requestedRemoteException
<P extends DMSObject> P getDMSObject(long oid) throws RemoteException
oid
- the oid of the requested objectRemoteException
<P extends DMSObject> P getDMSObject(String path) throws RemoteException
path
- the path leading to the wanted DMSObjectRemoteException
<P extends DMSFolder> P getFolder(DMSObject obj) throws RemoteException
obj
- the object which folder is wantedRemoteException
<P extends DMSFolder> List<P> listSubfolders(DMSFolder startFolder) throws RemoteException
startFolder
- the folder which subfolders are requestedRemoteException
<P extends DMSForm> P getMainForm(DMSForm f) throws RemoteException
f
- the form for which the mainform is neededRemoteException
<P extends DMSForm> List<P> listSubforms(DMSForm f, int id) throws RemoteException
f
- the form of which the subforms are neededid
- the id of the wanted subformsRemoteException
<P extends DMSForm> List<P> listSubforms(DMSForm f, int id, String cond, String order, Object... vals) throws RemoteException
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 statementRemoteException
int countSubforms(DMSForm f, int id) throws RemoteException
f
is
the main form.f
- the form of which the subforms will be countedid
- the id of the subform relationRemoteException
void removeSubform(DMSForm main, DMSForm sub) throws RemoteException
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 removeRemoteException
void removeSubform(DMSForm main, DMSForm sub, int id) throws RemoteException
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 removedRemoteException
void addSubform(DMSForm main, DMSForm sub, int id) throws RemoteException
main
- the mainformsub
- the subform to addid
- the id of the set of subform to which the passed subform should be addedRemoteException
MultiMap<DMSForm,DMSForm> fetchSubForms(Collection<? extends DMSForm> mainForms, int subformid) throws RemoteException
mainForms
- the referencing mainformssubformid
- the id of the subform (tablefield) to getRemoteException
Map<DMSForm,DMSForm> fetchMainForms(Collection<? extends DMSForm> subForms) throws RemoteException
subForms
- the referencing subformsRemoteException
@Deprecated <P extends DMSObject> List<P> listContents(DMSFolder folder, FormType ft, String cond, String order, Object[] vals, boolean recursive) throws RemoteException
listContents(DMSFolder,FormType,boolean,String,String,Object...)
insteadfolder
- 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:
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 subfoldersRemoteException
<P extends DMSObject> List<P> listContents(DMSFolder folder, FormType ft, boolean recursive, String cond, String order, Object... vals) throws RemoteException
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:
order
- the sorting order (for available columns see parameter cond)vals
- the values of the parameters in cond
of a prepared statementRemoteException
<P extends DMSObject> P renameDocument(DMSFolder folder, P obj, String newName, String newExtension) throws RemoteException
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 a DMSDocForm
.RemoteException
void setContent(DMSDocForm document, byte[] barr) throws RemoteException
document
- the documentbarr
- a byte arrayRemoteException
byte[] getContent(DMSDocForm document) throws RemoteException
document
- the documentRemoteException
void lock(DMSDocForm document) throws RemoteException
document
- the documentRemoteException
void unlock(DMSDocForm document) throws RemoteException
document
- the documentRemoteException
<P extends DMSForm> P changeType(DMSForm obj, FormType newType, DMSFolder folder) throws RemoteException
obj
- the objects which type should be changednewType
- the new type for the passed objectfolder
- the folder of which the object is a content memberRemoteException
void update(DMSObject o) throws RemoteException
o
- the object to be updatedRemoteException
List<DMSObject> moveToRecycleBin(DMSFolder f, DMSObject o) throws RemoteException
f
- the folder holding the object which should be deletedo
- the object which should be deletedRemoteException
List<DMSObject> restoreFromRecycleBin(DMSObject o) throws RemoteException
o
- the object to restoreRemoteException
List<DMSObject> emptyRecycleBin() throws RemoteException
RemoteException
Keyword createKeyword(String word) throws RemoteException
word
- the string representing the wanted keywordRemoteException
void addKeyword(DMSObject obj, Keyword keyword) throws RemoteException
obj
- the object to which the keyword should be addedkeyword
- the keyword which should be addedRemoteException
void removeKeyword(DMSObject obj, Keyword keyword) throws RemoteException
obj
- the object from which the keyword should be removedkeyword
- the keyword which should be removedRemoteException
<P extends Keyword> List<P> listKeywords(DMSObject obj) throws RemoteException
obj
- the object which the keywords should be returnedRemoteException
@Deprecated void disableRightChecks() throws RemoteException
PersistentAspect.add(PersistentAspect...)
with PersistentAspect.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 (AutoCloseablePersistentAspect acpa = PersistentAspect.add(PersistentAspect.ALL_PERMISSIONS)) {
//do your DMS related unchecked stuff
}
checkEdit(User, DMSObject)
, checkView(User, DMSObject)
,
mayEdit(User, DMSObject)
and 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.RemoteException
@Deprecated void enableRightChecks() throws RemoteException
PersistentAspect.remove(PersistentAspect...)
with PersistentAspect.ALL_PERMISSIONS
as parameter instead to enable
permission check again. When you're using the code pattern described in disableRightChecks()
you will not need to call
PersistentAspect.remove(PersistentAspect...)
on your own.disableRightChecks()
.RemoteException
@Deprecated void checkEdit(User user, DMSObject obj) throws RemoteException
OrgData.checkRight(Right, Persistent)
insteadApplicationException
Nr. 27 if the passed user may NOT edit the passed objectuser
- the user who wants to edit the objectobj
- the object which should be editedRemoteException
@Deprecated void checkView(User user, DMSObject obj) throws RemoteException
OrgData.checkRight(Right, Persistent)
insteadApplicationException
Nr. 27 if the passed user may NOT view the passed objectuser
- the user who wants to view the objectobj
- the object which should be viewedRemoteException
@Deprecated void checkDelete(User user, DMSObject obj) throws RemoteException
OrgData.checkRight(Right, Persistent)
insteadApplicationException
Nr. 27 if the passed user may NOT delete the passed objectuser
- the user who wants to delete the objectobj
- the object which should be deletedRemoteException
@Deprecated boolean mayEdit(User user, DMSObject obj) throws RemoteException
OrgData.mayUpdate(User, Persistent)
insteaduser
- the user who wants to edit the objectobj
- the object which should be editedRemoteException
@Deprecated boolean mayView(User user, DMSObject obj) throws RemoteException
OrgData.mayView(User, Persistent)
insteaduser
- the user who wants to view the objectobj
- the object which should be viewedRemoteException
@Deprecated boolean mayDelete(User user, DMSObject obj) throws RemoteException
OrgData.mayDelete(User, Persistent)
insteaduser
- the user who wants to delete the objectobj
- the object which should be deletedRemoteException
void checkValidName(DMSObject target, String name, String extension) throws RemoteException
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 checkedRemoteException
void checkDuplicateNames(DMSFolder targetFolder, DMSObject targetObject, String name, String extension) throws RemoteException
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 checkedRemoteException
boolean isDuplicateName(DMSFolder targetFolder, DMSObject targetObject, String name, String extension) throws RemoteException
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 checkedRemoteException
boolean isInRecycleBin(DMSObject target) throws RemoteException
target
- the object, which should be checkedRemoteException
void signDocuments(List<? extends DMSDocForm> documents, Agent agent, char[] password) throws RemoteException
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 documentRemoteException
void signVersions(List<? extends PersistentVersion> versions, Agent agent, char[] password) throws RemoteException
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 documentRemoteException
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.