Interface DMS

All Superinterfaces:
Remote, RemoteDMS

public interface DMS extends RemoteDMS
Utility class for DMS related operations.
  • Field Details

    • MOVE

      static final short MOVE
      Determines that a DMSObject should be moved from one folder to another
      See Also:
    • COPY

      static final short COPY
      Determines that a DMSObject should be copied from one folder to another
      See Also:
    • invalidChars

      static final char[] invalidChars
      holds the characters which are not allowed within the name of a DMSObject
  • Method Details

    • getInstance

      static DMS getInstance()
      Get the DMS to perform action with the workflow document management system.
      Returns:
      a DMS object
    • createFolder

      <P extends DMSFolder> P createFolder(String name)
      Creates a new standard folder.
      Specified by:
      createFolder in interface RemoteDMS
      Parameters:
      name - the name for the folder
      Returns:
      the new folder
    • createFolder

      <P extends DMSFolder> P createFolder(FormType ft, String name, P template, PermissionList acl)
      Creates a new folder of a given type.
      Specified by:
      createFolder in interface RemoteDMS
      Parameters:
      ft - the folder's formtype
      name - the name for the folder
      template - 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

      <P extends DMSDocForm> P createDocForm(String name, String extension)
      Creates a new standard document.
      Specified by:
      createDocForm in interface RemoteDMS
      Parameters:
      name - the name of the new DocForm
      extension - 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 interface RemoteDMS
      Parameters:
      ft - the document's formtype
      name - the name of the new DocForm
      extension - 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

      <P extends DMSForm> P createForm(FormType ft, P template, PermissionList acl)
      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 interface RemoteDMS
      Parameters:
      ft - the form's formtype
      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 form
    • createNote

      <P extends DMSNote> P createNote(String subject, String content, PermissionList acl)
      Creates a new note
      Specified by:
      createNote in interface RemoteDMS
      Parameters:
      subject - the subject of the note
      content - the content of the note
      acl - 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 interface RemoteDMS
      Parameters:
      name - the name of the weblink
      url - the url of the weblink
      description - a description text of the the weblink
      acl - the acl if one should be set (otherwise pass null)
      Returns:
      the new weblink
    • getFormType

      FormType getFormType(String id, int version)
      Returns the formtype with the given id and version number
      Specified by:
      getFormType in interface RemoteDMS
    • getTemplates

      <P extends DMSForm> List<P> getTemplates(FormType ft)
      Returns the templates for the passed form type.
      Specified by:
      getTemplates in interface RemoteDMS
      Parameters:
      ft - the form type of which the templates are wanted
      Returns:
      a list of form objects
    • listCreateableFormTypes

      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.
      Specified by:
      listCreateableFormTypes in interface RemoteDMS
      Parameters:
      searchCond - a sql where-clause
      order - sql order attributes
    • move

      <P extends DMSObject> P move(DMSFolder src, DMSFolder dest, P doc, short type)
      Moves an object from one folder to another.
      Specified by:
      move in interface RemoteDMS
      Parameters:
      src - the folder currently holding the object
      dest - the folder to which the objects should be moved
      doc - the object which should be moved
      type - the type of move operation:
      • MOVE: the object should be moved (i.e. removed from src and added to dest)
      • COPY: the object should be copied (i.e. stays in src and a copy is added to dest)
      • LINK: the object should be linked (i.e. stays in src and a link to the object is added to dest)
    • add

      <P extends DMSObject> P add(DMSFolder f, P o)
      Adds an Object to a folder. Use this method after creation of the object.
      Specified by:
      add in interface RemoteDMS
      Parameters:
      f - the folder to which the object should be added
      o - the object which should be added to the folder
    • add

      <P extends DMSObject> P add(DMSFolder f, P o, DMS.AddOption ao)
      Adds an Object to a folder. Use this method after creation of the object.
      Specified by:
      add in interface RemoteDMS
      Parameters:
      f - the folder to which the object should be added
      o - the object which should be added to the folder
      ao - define the behaviour for name conflicts.
    • remove

      boolean remove(DMSFolder f, DMSObject o)
      Removes an Object from a folder. NOTE: this will not delete the passed object but only remove it from the folders contents
      Specified by:
      remove in interface RemoteDMS
      Parameters:
      f - the folder from which the object should be removed
      o - the object which should be removed from the folder
      Returns:
      true if this collection changed as a result of the call
    • 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.
      Specified by:
      delete in interface RemoteDMS
      Parameters:
      f - the folder holding the object which should be deleted
      o - the object which should be deleted
      Returns:
      a list of all objects deleted by this request
    • attachNote

      void attachNote(DMSObject target, DMSNote note)
      Attaches the passed note to the passed object.
      Specified by:
      attachNote in interface RemoteDMS
      Parameters:
      target - the object to which the note should be attached
      note - the note which should be attached
    • removeNote

      void removeNote(DMSObject target, DMSNote note)
      Removes the passed note from the passed document.
      Specified by:
      removeNote in interface RemoteDMS
      Parameters:
      target - the object form which the note should be removed
      note - the note which should be removed
    • listNotes

      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
      Specified by:
      listNotes in interface RemoteDMS
      Parameters:
      target - the object which notes are wanted
    • listNotes

      List<DMSNote> listNotes(DMSObject target, boolean includeSystemNotes)
      Returns all the notes which are attached to target and which the user may view or edit
      Specified by:
      listNotes in interface RemoteDMS
      Parameters:
      target - the object which notes are wanted
      includeSystemNotes - determines if system notes should be returned. true if system notes should be found.
      Returns:
    • makeVersion

      PersistentVersion makeVersion(DMSObject obj, String description)
      Makes a version of the passed object.
      Specified by:
      makeVersion in interface RemoteDMS
      Parameters:
      obj - the object which should be versioned
      description - the version description text
    • deleteVersion

      void deleteVersion(PersistentVersion version)
      Deletes the passed version of an object.
      Specified by:
      deleteVersion in interface RemoteDMS
      Parameters:
      version - the version to be deleted
    • listVersions

      List<PersistentVersion> listVersions(DMSObject obj)
      Returns the versions of the specified object in descending order of their creation date.
      Specified by:
      listVersions in interface RemoteDMS
      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 interface RemoteDMS
      Parameters:
      obj - the object which versions are requested
      condition - 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

      void backupToVersion(DMSForm form, PersistentVersion version)
      Makes the content of the passed version to the current content of the passed form.
      Specified by:
      backupToVersion in interface RemoteDMS
      Parameters:
      form - the object which should be reset to the passed the version
      version - the version which content should be used (it must be a version of the passed form)
    • deleteVersions

      void deleteVersions(DMSForm form)
      Deletes all versions of the passed form.
      Specified by:
      deleteVersions in interface RemoteDMS
      Parameters:
      form - the object which versions should be deleted
    • getRootFolder

      <P extends DMSFolder> P getRootFolder(User user)
      Returns the root DMS folder (i.e. it has no parent) for a user.
      Specified by:
      getRootFolder in interface RemoteDMS
      Parameters:
      user - the user who's root folder is requested.
    • getPublicRootFolder

      <P extends DMSFolder> P getPublicRootFolder()
      Returns the public root folder in the DMS.
      Specified by:
      getPublicRootFolder in interface RemoteDMS
    • getRecycleBin

      <P extends DMSFolder> P getRecycleBin(User user)
      Description copied from interface: RemoteDMS
      Returns the recycle bin for a user.
      Specified by:
      getRecycleBin in interface RemoteDMS
      Parameters:
      user - the user who's recycle bin is requested.
    • getRecentlyUsedFolder

      <P extends DMSFolder> P getRecentlyUsedFolder(User user)
      Description copied from interface: RemoteDMS
      Returns the recently-used folder for a user
      Specified by:
      getRecentlyUsedFolder in interface RemoteDMS
      Parameters:
      user - the user who's recently-used folder is requested
      Returns:
    • getDMSObject

      <P extends DMSObject> P getDMSObject(long oid)
      Get a DMSObject by oid. This method will only find DMSObjects which are elements of a DMSFolder.
      Specified by:
      getDMSObject in interface RemoteDMS
      Parameters:
      oid - the oid of the requested object
    • getDMSObject

      <P extends DMSObject> P getDMSObject(String path)
      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 interface RemoteDMS
      Parameters:
      path - the path leading to the wanted DMSObject
    • getFolder

      <P extends DMSFolder> P getFolder(DMSObject obj)
      Get the folder containing the passed object.
      Specified by:
      getFolder in interface RemoteDMS
      Parameters:
      obj - the object which folder is wanted
    • listSubfolders

      <P extends DMSFolder> List<P> listSubfolders(DMSFolder startFolder)
      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 interface RemoteDMS
      Parameters:
      startFolder - the folder which subfolders are requested
    • getMainForm

      <P extends DMSForm> P getMainForm(DMSForm f)
      Returns the main form of the passed form (or null if there is none)
      Specified by:
      getMainForm in interface RemoteDMS
      Parameters:
      f - the form for which the mainform is needed
    • listSubforms

      <P extends DMSForm> List<P> listSubforms(DMSForm f, int id)
      Returns a list of subforms of the passed form (which is empty if there are none)
      Specified by:
      listSubforms in interface RemoteDMS
      Parameters:
      f - the form of which the subforms are needed
      id - 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 interface RemoteDMS
      Parameters:
      f - the form of which the subforms are needed
      id - the id of the wanted subforms
      cond - 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 order
      vals - values for the parameters in condition of a prepared statement
    • countSubforms

      int countSubforms(DMSForm f, int id)
      Counts the number of subforms in the subform-relation where f is the main form.
      Specified by:
      countSubforms in interface RemoteDMS
      Parameters:
      f - the form of which the subforms will be counted
      id - the id of the subform relation
    • removeSubform

      void removeSubform(DMSForm main, DMSForm sub)
      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 interface RemoteDMS
      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

      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. 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 interface RemoteDMS
      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
      id - the id of the subform-relation from which the subform should be removed
    • addSubform

      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. 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 interface RemoteDMS
      Parameters:
      main - the mainform
      sub - the subform to add
      id - the id of the set of subform to which the passed subform should be added
    • fetchSubForms

      MultiMap<DMSForm,DMSForm> fetchSubForms(Collection<? extends DMSForm> mainForms, int subformid)
      Construct a mapping from mainform instances to (filled) subform instances.
      Specified by:
      fetchSubForms in interface RemoteDMS
      Parameters:
      mainForms - the referencing mainforms
      subformid - the id of the subform (tablefield) to get
      Returns:
      the mapping from mainforms to subforms
    • fetchMainForms

      Map<DMSForm,DMSForm> fetchMainForms(Collection<? extends DMSForm> subForms)
      Construct a mapping from sub form instances to (filled) main form instances
      Specified by:
      fetchMainForms in interface RemoteDMS
      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 interface RemoteDMS
      Parameters:
      folder - the folder whose content is wanted
      ft - the formtype of the desired objects
      cond - 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
      order - the sorting order (for available columns see parameter cond)
      vals - the values of the parameters in cond
      recursive - 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 interface RemoteDMS
      Parameters:
      folder - the folder whose content is wanted
      ft - the formtype of the desired objects
      recursive - determines if the search should also include all subfolders
      cond - 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
      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 interface RemoteDMS
      Parameters:
      folder - the folder the document belongs to
      obj - the object which should be renamed
      newName - the new name for the document
      newExtension - the new extension for the document. This parameter is ignored if the passed object is not a DMSDocForm.
    • 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 to
      document - the document which should be reloaded
      newExtension - 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 to
      document - the document which should be reloaded
      newExtension - the possibly new extension (if null or the empty string is passed the old extension remains unchanged).
      is - the InputStream holding the new content
      length - the length of the new content in bytes
      digest - the message digest of the new content
    • setContent

      void setContent(DMSDocForm document, byte[] barr)
      Set the content of a document.
      Specified by:
      setContent in interface RemoteDMS
      Parameters:
      document - the document
      barr - a byte array
    • setContent

      void setContent(DMSDocForm document, InputStream is)
      Set the content of a document. NOTE: if the new content is already available as byte array then use setContent(DMSDocForm, byte[]) which is more performant than this method.
      Parameters:
      document - the document which content should be set
      is - an InputStream to the content of the document
    • setContent

      void setContent(DMSDocForm document, InputStream is, long length, byte[] digest)
      Set the content of a document.
      Parameters:
      document - the document which content should be set
      is - an InputStream to the content of the document
      length - the length of the new content in bytes
      digest - the message digest of the new content
    • getContent

      byte[] getContent(DMSDocForm document)
      Get the content of a document.
      Specified by:
      getContent in interface RemoteDMS
      Parameters:
      document - the document
      Returns:
      a byte array
    • getContentAsStream

      InputStream getContentAsStream(DMSDocForm document)
      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

      byte[] getContent(PersistentVersion version)
      Get the content of a document's version.
      Specified by:
      getContent in interface RemoteDMS
      Parameters:
      version - the version
      Returns:
      a byte array
    • getContentAsStream

      InputStream getContentAsStream(PersistentVersion version)
      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

      void lock(DMSDocForm document)
      Locks the document.
      Specified by:
      lock in interface RemoteDMS
      Parameters:
      document - the document
    • unlock

      void unlock(DMSDocForm document)
      Unlocks the document.
      Specified by:
      unlock in interface RemoteDMS
      Parameters:
      document - the document
    • changeType

      <P extends DMSForm> P changeType(DMSForm obj, FormType newType, DMSFolder folder)
      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 interface RemoteDMS
      Parameters:
      obj - the objects which type should be changed
      newType - the new type for the passed object
      folder - the folder of which the object is a content member
    • update

      void update(DMSObject o)
      Updates the passed object
      Specified by:
      update in interface RemoteDMS
      Parameters:
      o - the object to be updated
    • moveToRecycleBin

      List<DMSObject> moveToRecycleBin(DMSFolder f, DMSObject o)
      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 interface RemoteDMS
      Parameters:
      f - the folder holding the object which should be deleted
      o - the object which should be deleted
      Returns:
      all object moved to the Recycle Bin by this call
    • restoreFromRecycleBin

      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. If o is a folder also its content will be restored
      Specified by:
      restoreFromRecycleBin in interface RemoteDMS
      Parameters:
      o - the object to restore
      Returns:
      the restored objects
    • emptyRecycleBin

      List<DMSObject> emptyRecycleBin()
      Empties the Recycle Bin of the current user - i.e. all its content will now be deleted irrevocably
      Specified by:
      emptyRecycleBin in interface RemoteDMS
      Returns:
      the deleted objects
    • createKeyword

      Keyword createKeyword(String word)
      Creates a new Keyword for the passed word and returns this instance.
      Specified by:
      createKeyword in interface RemoteDMS
      Parameters:
      word - the string representing the wanted keyword
      Returns:
      the new keyword
    • addKeyword

      void addKeyword(DMSObject obj, Keyword keyword)
      Adds the passed keyword to the passed DMSObject
      Specified by:
      addKeyword in interface RemoteDMS
      Parameters:
      obj - the object to which the keyword should be added
      keyword - the keyword which should be added
    • removeKeyword

      void removeKeyword(DMSObject obj, Keyword keyword)
      Removes the passed keyword from the passed DMSObject
      Specified by:
      removeKeyword in interface RemoteDMS
      Parameters:
      obj - the object from which the keyword should be removed
      keyword - the keyword which should be removed
    • listKeywords

      <P extends Keyword> List<P> listKeywords(DMSObject obj)
      Returns a list of all keywords attached to the passed DMSObject
      Specified by:
      listKeywords in interface RemoteDMS
      Parameters:
      obj - the object which the keywords should be returned
      Returns:
      a list of all keywords of a given DMSObject
    • disableRightChecks

      @Deprecated(since="10.0", forRemoval=true) void disableRightChecks()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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:
      
       try (SilentCloseable sc = PersistentAspect.add(PersistentAspect.ALL_PERMISSIONS)) {
          //do your DMS related unchecked stuff
       }
       
      If this method is called all right checks done using methods RemoteDMS.checkEdit(User, DMSObject), RemoteDMS.checkView(User, DMSObject), RemoteDMS.mayEdit(User, DMSObject) and RemoteDMS.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 interface RemoteDMS
    • enableRightChecks

      @Deprecated(since="10.0", forRemoval=true) void enableRightChecks()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.
      enables the right checks if they were previously disabled using method RemoteDMS.disableRightChecks().
      Specified by:
      enableRightChecks in interface RemoteDMS
    • checkEdit

      @Deprecated(since="10.0", forRemoval=true) void checkEdit(User user, DMSObject obj)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws ApplicationException Nr. 27 if the passed user may NOT edit the passed object
      Specified by:
      checkEdit in interface RemoteDMS
      Parameters:
      user - the user who wants to edit the object
      obj - the object which should be edited
    • checkView

      @Deprecated(since="10.0", forRemoval=true) void checkView(User user, DMSObject obj)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws ApplicationException Nr. 27 if the passed user may NOT view the passed object
      Specified by:
      checkView in interface RemoteDMS
      Parameters:
      user - the user who wants to view the object
      obj - the object which should be viewed
    • checkDelete

      @Deprecated(since="10.0", forRemoval=true) void checkDelete(User user, DMSObject obj)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws ApplicationException Nr. 27 if the passed user may NOT delete the passed object
      Specified by:
      checkDelete in interface RemoteDMS
      Parameters:
      user - the user who wants to delete the object
      obj - the object which should be deleted
    • mayEdit

      @Deprecated(since="10.0", forRemoval=true) boolean mayEdit(User user, DMSObject obj)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns true if the passed user may edit the passed object or if the right check is deactivated. Otherwise false is returned.
      Specified by:
      mayEdit in interface RemoteDMS
      Parameters:
      user - the user who wants to edit the object
      obj - the object which should be edited
    • mayView

      @Deprecated(since="10.0", forRemoval=true) boolean mayView(User user, DMSObject obj)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns true if the passed user may view the passed object or if the right check is deactivated. Otherwise false is returned.
      Specified by:
      mayView in interface RemoteDMS
      Parameters:
      user - the user who wants to view the object
      obj - the object which should be viewed
    • mayDelete

      @Deprecated(since="10.0", forRemoval=true) boolean mayDelete(User user, DMSObject obj)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns true if the passed user may delete the passed object or if the right check is deactivated. Otherwise false is returned.
      Specified by:
      mayDelete in interface RemoteDMS
      Parameters:
      user - the user who wants to delete the object
      obj - the object which should be deleted
    • checkValidName

      void checkValidName(DMSObject target, String name, String extension)
      Checks if the name and extension do not contain any forbidden characters
      Specified by:
      checkValidName in interface RemoteDMS
      Parameters:
      target - the object to which the name belongs to (or will belong to)
      name - the name which should be checked
      extension - 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 interface RemoteDMS
      Parameters:
      targetFolder - the folder in which should be checked
      targetObject - the object the name belongs to (or will belong to)
      name - the name which should be checked
      extension - 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 interface RemoteDMS
      Parameters:
      targetFolder - the folder in which should be checked
      targetObject - the object the name belongs to (or will belong to)
      name - the name which should be checked
      extension - the extension which should be checked
    • isInRecycleBin

      boolean isInRecycleBin(DMSObject target)
      Returns true, if the object in the recylce bin
      Specified by:
      isInRecycleBin in interface RemoteDMS
      Parameters:
      target - the object, which should be checked
    • signDocuments

      void signDocuments(List<? extends DMSDocForm> documents, Agent agent, char[] password)
      Digital Signing of a list of DMS documents. Implemented only for PDF documents.
      Specified by:
      signDocuments in interface RemoteDMS
      Parameters:
      documents - a List of documents to sign
      agent - the agent (role or user) which is signing the document
      password - the password of the private key used to sign document
    • signVersions

      void signVersions(List<? extends PersistentVersion> versions, Agent agent, char[] password)
      Digital Signing of a list of DMS document version. Implemented only for PDF documents.
      Specified by:
      signVersions in interface RemoteDMS
      Parameters:
      versions - a List of versions to sign
      agent - the agent (role or user) which is signing the document
      password - the password of the private key used to sign document