com.groiss.dms
Interface DMS

All Superinterfaces:
java.rmi.Remote, RemoteDMS

public interface DMS
extends RemoteDMS

Utility class for DMS related operations.


Field Summary
 
Fields inherited from interface com.groiss.dms.RemoteDMS
COPY, invalidChars, LINK, MOVE
 
Method Summary
<P extends DMSObject>
P
add(DMSFolder f, P o, User u)
          Adds an Object to a folder.
 void addKeyword(DMSObject obj, Keyword keyword, User user)
          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, User user)
          Attaches the passed note to the passed object.
 void backupToVersion(DMSForm form, PersistentVersion version, User user)
          Makes the content of the passed version to the current content of the passed form.
<P extends DMSForm>
P
changeType(DMSForm obj, FormType newType, DMSFolder folder, User user)
          This method changes the type of the passed DMSObject to the passed FormType.
 void checkDelete(User user, DMSObject obj)
          Throws ApplicationException Nr.
 void checkDuplicateNames(DMSFolder targetFolder, DMSObject targetObject, java.lang.String name, java.lang.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)
          Throws ApplicationException Nr.
 void checkValidName(DMSObject target, java.lang.String name, java.lang.String extension)
          Checks if the name and extension do not contain any forbidden characters
 void checkView(User user, DMSObject obj)
          Throws ApplicationException Nr.
 int countSubforms(DMSForm f, int id)
          Counts the number of subforms in the subform-relation where f is the main form.
<P extends DMSDocForm>
P
createDocForm(FormType ft, java.lang.String name, java.lang.String extension, P template, User u, PermissionList acl)
          Creates a new document of the specified formtype.
<P extends DMSFolder>
P
createFolder(FormType ft, java.lang.String name, P template, User u, PermissionList acl)
          Create a folder of a given type.
<P extends DMSForm>
P
createForm(FormType ft, P template, User u, PermissionList acl)
          Creates a new form of the specified formtype.
 Keyword createKeyword(java.lang.String word, User user)
          Creates a new Keyword for the passed word and returns this instance.
<P extends DMSNote>
P
createNote(java.lang.String subject, java.lang.String content, User u, PermissionList acl)
          Creates a new note
<P extends DMSWebLink>
P
createWebLink(java.lang.String name, java.lang.String url, java.lang.String description, User u, PermissionList acl)
          Creates a new link to an URL
 void delete(DMSFolder f, DMSObject o, User u)
          Deletes the object o which resides in folder f.
 void deleteKeyword(Keyword keyword, User user)
          Deletes the passed keyword.
 void deleteVersion(PersistentVersion version, User user)
          Deletes the passed version of an object.
 void disableRightChecks()
          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.
 void enableRightChecks()
          enables the right checks if they were previously disabled using method RemoteDMS.disableRightChecks().
 java.util.Map<DMSForm,DMSForm> fetchMainForms(java.util.Collection<? extends DMSForm> subForms)
          Construct a mapping from sub form instances to (filled) main form instances
 MultiMap<DMSForm,DMSForm> fetchSubForms(java.util.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.
<P extends DMSObject>
P
getDMSObject(long oid)
          Get a DMSObject by oid.
<P extends DMSObject>
P
getDMSObject(java.lang.String classname, long oid)
          Get a DMSObject by classname and oid.
<P extends DMSFolder>
P
getFolder(DMSObject obj)
          Get the folder containing the passed object.
 FormType getFormType(long oid)
          Returns the formtpye with the given oid
 FormType getFormType(java.lang.String id, int version)
          Returns the formtype with the given id and version number
 java.lang.String getIcon(java.lang.String extension)
          Returns the icon for the passed extension.
 java.lang.String getIconFromMimetype(java.lang.String mimetype)
          Returns the icon for the passed mimetype.
 Keyword getKeyword(long oid)
          Returns the keyword with the passed oid
<P extends DMSForm>
P
getMainForm(DMSForm f)
          Returns the main form of the passed form (or null if there is none)
<P extends DMSFolder>
P
getPublicRootFolder()
          Returns the public root folder in the DMS.
<P extends DMSFolder>
P
getRootFolder(User user)
          Returns the root DMS folder (i.e.
 com.groiss.security.Signature getSignatureClass()
          Returns an instance of the class which should be uses as Signature implementation
<P extends DMSForm>
java.util.List<P>
getTemplates(FormType ft)
          Returns the templates for the passed form type.
 boolean isDuplicateName(DMSFolder targetFolder, DMSObject targetObject, java.lang.String name, java.lang.String extension)
          Returns true if already an item of the passed folder has the passed name
<P extends DMSObject>
java.util.List<P>
listContents(DMSFolder folder, FormType ft, java.lang.String cond, java.lang.String order, java.lang.Object[] vals, boolean recursive)
          Returns a list of dms objects which match the passed condition
 java.util.List<FormType> listCreateableFormTypes(java.lang.String searchCond, java.lang.String order, User user)
          Returns the formtypes which meet the search condition and from which the passed user may create form objects.
<P extends DMSForm>
java.util.List<P>
listForms(FormType ft, java.lang.String cond, java.lang.String order, java.lang.Object[] vals)
          Returns a list of forms of the given formtype which match the passed condition
<P extends Keyword>
java.util.List<P>
listKeywords()
          Returns a list of all keywords known to the system
<P extends Keyword>
java.util.List<P>
listKeywords(DMSObject obj)
          Returns a list of all keywords attached to the passed DMSObject
 java.util.List<DMSNote> listNotes(DMSObject target, User user)
          Returns all the notes which are attached to target and which the user may view or edit
 java.util.List<com.groiss.security.SignedObject> listSignatures(PersistentVersion version, User user)
          Returns the signatures of the passed version
 java.util.List<java.lang.String> listSignatureTypes()
          Returns the available types of signatures
<P extends DMSFolder>
java.util.List<P>
listSubfolders(DMSFolder startFolder)
          Returns a list of all folders which are subfolders of the given folder.
<P extends DMSForm>
java.util.List<P>
listSubforms(DMSForm f, int id)
          Returns a list of subforms of the passed form (which is empty if there are none)
<P extends DMSForm>
java.util.List<P>
listSubforms(DMSForm f, int id, java.lang.String cond, java.lang.String order, java.lang.Object[] vals)
          Returns a list of subforms of the passed form (which is empty if there are none)
 java.util.List<PersistentVersion> listVersions(DMSObject obj, User user)
          Returns the versions of the specified object in descending order of their creation date.
 void lock(DMSDocForm document, User user)
          Locks the document.
 PersistentVersion makeVersion(DMSObject obj, User user, java.lang.String description)
          Makes a version of the passed object.
 boolean mayDelete(User user, DMSObject obj)
          Returns true if the passed user may delete the passed object or if the right check is deactivated.
 boolean mayEdit(User user, DMSObject obj)
          Returns true if the passed user may edit the passed object or if the right check is deactivated.
 boolean mayView(User user, DMSObject obj)
          Returns true if the passed user may view the passed object or if the right check is deactivated.
<P extends DMSObject>
P
move(DMSFolder src, DMSFolder dest, P doc, short type, User u)
          Moves an object from one folder to another.
<P extends DMSDocForm>
P
reloadDocument(DMSFolder folder, P document, java.lang.String newExtension, java.io.InputStream is, User user)
          Reloads the document, i.e.
 void remove(DMSFolder f, DMSObject o, User u)
          Removes an Object from a folder.
 void removeKeyword(DMSObject obj, Keyword keyword, User user)
          Removes the passed keyword from the passed DMSObject
 void removeNote(DMSObject target, DMSNote note, User user)
          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>
P
renameDocument(DMSFolder folder, P obj, java.lang.String newName, java.lang.String newExtension, User u)
          Sets the name and extension of the passed object to newName.
 void setContent(User user, DMSDocForm document, byte[] barr)
          Set the content of a document.
 void unlock(DMSDocForm document)
          Unlocks the document.
 void update(DMSObject o)
          Updates the passed object
 boolean verify(PersistentVersion version, com.groiss.security.SignedObject signature)
          Verifies the electronically signature of a document's version.
 

Method Detail

createFolder

<P extends DMSFolder> P createFolder(FormType ft,
                                     java.lang.String name,
                                     P template,
                                     User u,
                                     PermissionList acl)
Create a 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)
u - the user who wants to create the folder
acl - the acl attached to the new folder (may be null)

createDocForm

<P extends DMSDocForm> P createDocForm(FormType ft,
                                       java.lang.String name,
                                       java.lang.String extension,
                                       P template,
                                       User u,
                                       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)
u - the user who wants to perform this action
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,
                                 User u,
                                 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)
u - the user who wants to perform this action
acl - the acl if one should be set (otherwise pass null)
Returns:
the new form

createNote

<P extends DMSNote> P createNote(java.lang.String subject,
                                 java.lang.String content,
                                 User u,
                                 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
u - the user who wants to perform this action
acl - the acl if one should be set (otherwise pass null)
Returns:
the new form

createWebLink

<P extends DMSWebLink> P createWebLink(java.lang.String name,
                                       java.lang.String url,
                                       java.lang.String description,
                                       User u,
                                       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
u - the user who wants to perform this action
acl - the acl if one should be set (otherwise pass null)
Returns:
the new form

getFormType

FormType getFormType(java.lang.String id,
                     int version)
Returns the formtype with the given id and version number

Specified by:
getFormType in interface RemoteDMS

getFormType

FormType getFormType(long oid)
Returns the formtpye with the given oid

Specified by:
getFormType in interface RemoteDMS

getTemplates

<P extends DMSForm> java.util.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

java.util.List<FormType> listCreateableFormTypes(java.lang.String searchCond,
                                                 java.lang.String order,
                                                 User user)
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
user - the user for which the search should be performed

move

<P extends DMSObject> P move(DMSFolder src,
                             DMSFolder dest,
                             P doc,
                             short type,
                             User u)
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:
  • RemoteDMS.MOVE: the object should be moved (i.e. removed from src and added to dest)
  • RemoteDMS.COPY: the object should be copied (i.e. stays in src and a copy is added to dest)
  • RemoteDMS.LINK: the object should be linked (i.e. stays in src and a link to the object is added to dest)
u - the user who wants to perform this action

add

<P extends DMSObject> P add(DMSFolder f,
                            P o,
                            User u)
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
u - the user who wants to perform this action

remove

void remove(DMSFolder f,
            DMSObject o,
            User u)
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
u - the user who wants to perform this action

delete

void delete(DMSFolder f,
            DMSObject o,
            User u)
Deletes the object o which resides in folder f. This will also remove the object from the folder.

Specified by:
delete in interface RemoteDMS
Parameters:
f - the folder holding the object which should be deleted
o - the object which should be deleted
u - the user who wants to perform this action

attachNote

void attachNote(DMSObject target,
                DMSNote note,
                User user)
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
user - the user who wants to perform this action

removeNote

void removeNote(DMSObject target,
                DMSNote note,
                User user)
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
user - the user who wants to perform this action

listNotes

java.util.List<DMSNote> listNotes(DMSObject target,
                                  User user)
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
user - the user who wants to perform this action

makeVersion

PersistentVersion makeVersion(DMSObject obj,
                              User user,
                              java.lang.String description)
Makes a version of the passed object.

Specified by:
makeVersion in interface RemoteDMS
Parameters:
obj - the object which should be versioned
user - the user who wants to make the version
description - the version description text

deleteVersion

void deleteVersion(PersistentVersion version,
                   User user)
Deletes the passed version of an object.

Specified by:
deleteVersion in interface RemoteDMS
Parameters:
version - the version to be deleted
user - the user who wants to delete the version

listVersions

java.util.List<PersistentVersion> listVersions(DMSObject obj,
                                               User user)
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
user - the user who performs this request

backupToVersion

void backupToVersion(DMSForm form,
                     PersistentVersion version,
                     User user)
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)
user - the user who performs this request

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

getDMSObject

<P extends DMSObject> P getDMSObject(java.lang.String classname,
                                     long oid)
Get a DMSObject by classname and oid.

Specified by:
getDMSObject in interface RemoteDMS
Parameters:
classname - the full qualified class name of the requested object
oid - the oid of the requested object

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

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> java.util.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> java.util.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> java.util.List<P> listSubforms(DMSForm f,
                                                   int id,
                                                   java.lang.String cond,
                                                   java.lang.String order,
                                                   java.lang.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 - the value objects for the condition if the condition is build with the syntax 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(java.util.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

java.util.Map<DMSForm,DMSForm> fetchMainForms(java.util.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

listForms

<P extends DMSForm> java.util.List<P> listForms(FormType ft,
                                                java.lang.String cond,
                                                java.lang.String order,
                                                java.lang.Object[] vals)
Returns a list of forms of the given formtype which match the passed condition

Specified by:
listForms in interface RemoteDMS
Parameters:
ft - the formtype of the desired forms
cond - the condition which must match
order - the sorting order
vals - the value objects for the condition if the condition is build with the syntax of a prepared statement

listContents

<P extends DMSObject> java.util.List<P> listContents(DMSFolder folder,
                                                     FormType ft,
                                                     java.lang.String cond,
                                                     java.lang.String order,
                                                     java.lang.Object[] vals,
                                                     boolean recursive)
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 value objects for the condition if the condition is build with the syntax of a prepared statement
recursive - determines if the search should also include all subfolders

renameDocument

<P extends DMSObject> P renameDocument(DMSFolder folder,
                                       P obj,
                                       java.lang.String newName,
                                       java.lang.String newExtension,
                                       User u)
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.
u - the user who wants to perform the renaming

reloadDocument

<P extends DMSDocForm> P reloadDocument(DMSFolder folder,
                                        P document,
                                        java.lang.String newExtension,
                                        java.io.InputStream is,
                                        User user)
Reloads the document, i.e. replaces the content of the document with the content of the passed file

Specified by:
reloadDocument in interface RemoteDMS
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
user - the user who wants to perfom this action

setContent

void setContent(User user,
                DMSDocForm document,
                byte[] barr)
Set the content of a document.

Specified by:
setContent in interface RemoteDMS
Parameters:
user - the user who performs this action
document - the document
barr - a byte array

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

lock

void lock(DMSDocForm document,
          User user)
Locks the document.

Specified by:
lock in interface RemoteDMS
Parameters:
document - the document
user - the user who performs this action

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,
                                 User user)
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
user - the user who performs the change

update

void update(DMSObject o)
Updates the passed object

Specified by:
update in interface RemoteDMS
Parameters:
o - the object to be updated

createKeyword

Keyword createKeyword(java.lang.String word,
                      User user)
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
user - the user who creates the keyword
Returns:
the new keyword

deleteKeyword

void deleteKeyword(Keyword keyword,
                   User user)
Deletes the passed keyword.

Specified by:
deleteKeyword in interface RemoteDMS
Parameters:
keyword - the keyword which should be deleted
user - the user who creates the keyword

getKeyword

Keyword getKeyword(long oid)
Returns the keyword with the passed oid

Specified by:
getKeyword in interface RemoteDMS
Parameters:
oid - the oid the wanted keyword
Returns:
the keyword if there exists one for the passed oid

listKeywords

<P extends Keyword> java.util.List<P> listKeywords()
Returns a list of all keywords known to the system

Specified by:
listKeywords in interface RemoteDMS
Returns:
a list of all keywords

addKeyword

void addKeyword(DMSObject obj,
                Keyword keyword,
                User user)
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
user - the user who wants to perform this action

removeKeyword

void removeKeyword(DMSObject obj,
                   Keyword keyword,
                   User user)
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
user - the user who wants to perform this action

listKeywords

<P extends Keyword> java.util.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

void disableRightChecks()
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

void enableRightChecks()
enables the right checks if they were previously disabled using method RemoteDMS.disableRightChecks().

Specified by:
enableRightChecks in interface RemoteDMS

checkEdit

void checkEdit(User user,
               DMSObject obj)
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

void checkView(User user,
               DMSObject obj)
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

void checkDelete(User user,
                 DMSObject obj)
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

boolean mayEdit(User user,
                DMSObject obj)
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

boolean mayView(User user,
                DMSObject obj)
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

boolean mayDelete(User user,
                  DMSObject obj)
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

getSignatureClass

com.groiss.security.Signature getSignatureClass()
Returns an instance of the class which should be uses as Signature implementation

Specified by:
getSignatureClass in interface RemoteDMS

listSignatureTypes

java.util.List<java.lang.String> listSignatureTypes()
Returns the available types of signatures

Specified by:
listSignatureTypes in interface RemoteDMS
Returns:
a list of Strings where each String represents one type

listSignatures

java.util.List<com.groiss.security.SignedObject> listSignatures(PersistentVersion version,
                                                                User user)
Returns the signatures of the passed version

Specified by:
listSignatures in interface RemoteDMS
Parameters:
version - the document version which signatures are requested
user - the user who wants to get the signatures

verify

boolean verify(PersistentVersion version,
               com.groiss.security.SignedObject signature)
Verifies the electronically signature of a document's version.

Specified by:
verify in interface RemoteDMS
Parameters:
version - The document version which signature should be verified
signature - The SignedObject holding the signature relevant data
Returns:
true, if the signature is correct; false otherwise.

getIcon

java.lang.String getIcon(java.lang.String extension)
Returns the icon for the passed extension. If no icon is found null is returned.

Specified by:
getIcon in interface RemoteDMS
Parameters:
extension - the extension for which the icon is wanted

getIconFromMimetype

java.lang.String getIconFromMimetype(java.lang.String mimetype)
Returns the icon for the passed mimetype. If no icon is found null is returned.

Specified by:
getIconFromMimetype in interface RemoteDMS
Parameters:
mimetype - the mimetype for which the icon is wanted

checkValidName

void checkValidName(DMSObject target,
                    java.lang.String name,
                    java.lang.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,
                         java.lang.String name,
                         java.lang.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,
                        java.lang.String name,
                        java.lang.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


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.