com.groiss.dms
Interface DMS

All Superinterfaces:
java.rmi.Remote

public interface DMS
extends java.rmi.Remote

Utility class for DMS related operations.


Field Summary
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
 
Method Summary
 DMSObject add(DMSFolder f, DMSObject 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)
           
 void attachNote(DMSObject target, DMSNote note, User user)
          Attaches the passed note to the passed object.
 void backupToVersion(DMSDocForm doc, DocumentVersion version, User user)
          Makes the content of the passed version to the current content of the passed document.
 DMSForm 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 AVWException Nr. 27 if the passed user may NOT delete the passed object
 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 AVWException Nr. 27 if the passed user may NOT edit the passed object
 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 AVWException Nr. 27 if the passed user may NOT view the passed object
 int countSubforms(DMSForm f, int id)
          Counts the number of subforms in the subform-relation where f is the main form.
 DMSDocForm createDocForm(FormType ft, java.lang.String name, java.lang.String extension, DMSDocForm template, User u, com.dec.avw.acl.ACL acl)
          Creates a new document of the specified formtype.
 DMSFolder createFolder(FormType ft, java.lang.String name, DMSFolder template, User u, com.dec.avw.acl.ACL acl)
          Create a folder of a given type.
 DMSForm createForm(FormType ft, DMSForm template, User u, com.dec.avw.acl.ACL 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.
 DMSNote createNote(java.lang.String subject, java.lang.String content, User u, com.dec.avw.acl.ACL acl)
          Creates a new note
 DMSWebLink createWebLink(java.lang.String name, java.lang.String url, java.lang.String description, User u, com.dec.avw.acl.ACL 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(DocumentVersion dv, User user)
          Deletes the passed version of an object.
 void disableRightChecks()
          If this method is called all right checks done using methods checkEdit(User, DMSObject), checkView(User, DMSObject), mayEdit(User, DMSObject) and mayView(User, DMSObject) are deactivated in the current thread.
 void enableRightChecks()
          enables the right checks if they were previously disabled using method disableRightChecks().
 byte[] getContent(DMSDocForm document)
          Get the content of a document.
 DMSObject getDMSObject(long oid)
          Get a DMSObject by oid.
 DMSObject getDMSObject(java.lang.String classname, long oid)
          Get a DMSObject by classname and oid.
 DMSFolder 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
 DMSForm getMainForm(DMSForm f)
          Returns the main form of the passed form (or null if there is none)
 DMSFolder getPublicRootFolder()
          Returns the public root folder in the DMS.
 DMSFolder getRootFolder(User user)
          Returns the root DMS folder (i.e. it has no parent) for a user.
 com.groiss.security.Signature getSignatureClass()
          Returns an instance of the class which should be uses as Signature implementation
 java.util.List 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
 java.util.List listContents(DMSFolder folder, FormType ft, java.lang.String cond, java.lang.String order, java.lang.Object[] vals, boolean recursive)
          Returns a list of forms of the given formtype which match the passed condition
 java.util.List 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.
 java.util.List 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
 java.util.List listKeywords()
          Returns a list of all keywords known to the system
 java.util.List listKeywords(DMSObject obj)
          Returns a list of all keywords attached to the passed DMSObject
 java.util.List 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 listSignatures(Persistent version, User user)
          Returns the signatures of the passed version
 java.util.List listSignatureTypes()
          Returns the available types of signatures
 java.util.List listSubfolders(DMSFolder startFolder)
          Returns a list of all folders which are subfolders of the given folder.
 java.util.List listSubforms(DMSForm f, int id)
          Returns a list of subforms of the passed form (which is empty if there are none)
 java.util.List 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 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.
 DocumentVersion 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.
 DMSObject move(DMSFolder src, DMSFolder dest, DMSObject doc, short type, User u)
          Moves an object from one folder to another.
 DMSDocForm reloadDocument(DMSFolder folder, DMSDocForm 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
 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)
           
 DMSObject renameDocument(DMSFolder folder, DMSObject 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)
           
 boolean verify(Persistent version, com.groiss.security.SignedObject signature)
          Verifies the electronically signature of a document's version.
 

Field Detail

MOVE

static final short MOVE
Determines that a DMSObject should be moved from one folder to another

See Also:
Constant Field Values

COPY

static final short COPY
Determines that a DMSObject should be copied from one folder to another

See Also:
Constant Field Values

LINK

static final short LINK
Determines that a link to a DMSObject should be created

See Also:
Constant Field Values

invalidChars

static final char[] invalidChars
holds the charactes which are not allowed within the name of a DMSObject

Method Detail

createFolder

DMSFolder createFolder(FormType ft,
                       java.lang.String name,
                       DMSFolder template,
                       User u,
                       com.dec.avw.acl.ACL acl)
                       throws java.lang.Exception
Create a folder of a given type.

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)
Throws:
java.lang.Exception

createDocForm

DMSDocForm createDocForm(FormType ft,
                         java.lang.String name,
                         java.lang.String extension,
                         DMSDocForm template,
                         User u,
                         com.dec.avw.acl.ACL acl)
                         throws java.lang.Exception
Creates a new document of the specified formtype.

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
Throws:
java.lang.Exception

createForm

DMSForm createForm(FormType ft,
                   DMSForm template,
                   User u,
                   com.dec.avw.acl.ACL acl)
                   throws java.lang.Exception
Creates a new form of the specified formtype. The form will be inserted to the database and therefore contain an oid.

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
Throws:
java.lang.Exception

createNote

DMSNote createNote(java.lang.String subject,
                   java.lang.String content,
                   User u,
                   com.dec.avw.acl.ACL acl)
                   throws java.lang.Exception
Creates a new note

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
Throws:
java.lang.Exception

createWebLink

DMSWebLink createWebLink(java.lang.String name,
                         java.lang.String url,
                         java.lang.String description,
                         User u,
                         com.dec.avw.acl.ACL acl)
                         throws java.lang.Exception
Creates a new link to an URL

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
Throws:
java.lang.Exception

getFormType

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

Throws:
java.rmi.RemoteException

getFormType

FormType getFormType(long oid)
                     throws java.rmi.RemoteException
Returns the formtpye with the given oid

Throws:
java.rmi.RemoteException

getTemplates

java.util.List getTemplates(FormType ft)
                            throws java.lang.Exception
Returns the templates for the passed form type.

Parameters:
ft - the form type of which the templates are wanted
Returns:
a list of form objects
Throws:
java.lang.Exception

listCreateableFormTypes

java.util.List listCreateableFormTypes(java.lang.String searchCond,
                                       java.lang.String order,
                                       User user)
                                       throws java.lang.Exception
Returns the formtypes which meet the search condition and from which the passed user may create form objects.

Parameters:
searchCond - a sql where-clause
order - sql order attributes
user - the user for which the search should be performed
Throws:
java.lang.Exception

move

DMSObject move(DMSFolder src,
               DMSFolder dest,
               DMSObject doc,
               short type,
               User u)
               throws java.lang.Exception
Moves an object from one folder to another.

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)
u - the user who wants to perform this action
Throws:
java.lang.Exception

add

DMSObject add(DMSFolder f,
              DMSObject o,
              User u)
              throws java.lang.Exception
Adds an Object to a folder. Use this method after creation of the object.

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
Throws:
java.lang.Exception

delete

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

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
Throws:
java.lang.Exception

attachNote

void attachNote(DMSObject target,
                DMSNote note,
                User user)
                throws java.lang.Exception
Attaches the passed note to the passed object.

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
Throws:
java.lang.Exception

removeNote

void removeNote(DMSObject target,
                DMSNote note,
                User user)
                throws java.lang.Exception
Removes the passed note from the passed document.

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
Throws:
java.lang.Exception

listNotes

java.util.List listNotes(DMSObject target,
                         User user)
                         throws java.lang.Exception
Returns all the notes which are attached to target and which the user may view or edit

Parameters:
target - the object which notes are wanted
user - the user who wants to perform this action
Throws:
java.lang.Exception

makeVersion

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

Parameters:
obj - the object which should be versioned
user - the user who wants to make the version
description - the version description text
Throws:
java.lang.Exception

deleteVersion

void deleteVersion(DocumentVersion dv,
                   User user)
                   throws java.lang.Exception
Deletes the passed version of an object.

Parameters:
dv - the version to be deleted
user - the user who wants to delete the version
Throws:
java.lang.Exception

listVersions

java.util.List listVersions(DMSObject obj,
                            User user)
                            throws java.lang.Exception
Returns the versions of the specified object in descending order of their creation date.

Parameters:
obj - the object which versions are requested
user - the user who performs this request
Throws:
java.lang.Exception

backupToVersion

void backupToVersion(DMSDocForm doc,
                     DocumentVersion version,
                     User user)
                     throws java.lang.Exception
Makes the content of the passed version to the current content of the passed document. ATTENTION: the metadata of the version are not restored!!

Parameters:
doc - the object which content should be replaced by the version's content
version - the version which content should be used (it must be a version of the passed document)
user - the user who performs this request
Throws:
java.lang.Exception

getRootFolder

DMSFolder getRootFolder(User user)
                        throws java.lang.Exception
Returns the root DMS folder (i.e. it has no parent) for a user.

Parameters:
user - the user who's root folder is requested.
Throws:
java.lang.Exception

getPublicRootFolder

DMSFolder getPublicRootFolder()
                              throws java.lang.Exception
Returns the public root folder in the DMS.

Throws:
java.lang.Exception

getDMSObject

DMSObject getDMSObject(java.lang.String classname,
                       long oid)
                       throws java.rmi.RemoteException
Get a DMSObject by classname and oid.

Parameters:
classname - the full qualified class name of the requested object
oid - the oid of the requested object
Throws:
java.rmi.RemoteException

getDMSObject

DMSObject getDMSObject(long oid)
                       throws java.rmi.RemoteException
Get a DMSObject by oid. This method will only find DMSObjects which are elements of a DMSFolder.

Parameters:
oid - the oid of the requested object
Throws:
java.rmi.RemoteException

getFolder

DMSFolder getFolder(DMSObject obj)
                    throws java.rmi.RemoteException
Get the folder containing the passed object.

Parameters:
obj - the object which folder is wanted
Throws:
java.rmi.RemoteException

listSubfolders

java.util.List listSubfolders(DMSFolder startFolder)
                              throws java.rmi.RemoteException
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

Parameters:
startFolder - the folder which subfolders are requested
Throws:
java.rmi.RemoteException

getMainForm

DMSForm getMainForm(DMSForm f)
                    throws java.rmi.RemoteException
Returns the main form of the passed form (or null if there is none)

Parameters:
f - the form for which the mainform is needed
Throws:
java.rmi.RemoteException

listSubforms

java.util.List listSubforms(DMSForm f,
                            int id)
                            throws java.rmi.RemoteException
Returns a list of subforms of the passed form (which is empty if there are none)

Parameters:
f - the form of which the subforms are needed
id - the id of the wanted subforms
Throws:
java.rmi.RemoteException

listSubforms

java.util.List listSubforms(DMSForm f,
                            int id,
                            java.lang.String cond,
                            java.lang.String order,
                            java.lang.Object[] vals)
                            throws java.rmi.RemoteException
Returns a list of subforms of the passed form (which is empty if there are none)

Parameters:
f - the form of which the subforms are needed
id - the id of the wanted subforms
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
Throws:
java.rmi.RemoteException

countSubforms

int countSubforms(DMSForm f,
                  int id)
                  throws java.lang.Exception
Counts the number of subforms in the subform-relation where f is the main form.

Parameters:
f - the form of which the subforms will be counted
id - the id of the subform relation
Throws:
java.lang.Exception

removeSubform

void removeSubform(DMSForm main,
                   DMSForm sub)
                   throws java.lang.Exception
Throws:
java.lang.Exception

addSubform

void addSubform(DMSForm main,
                DMSForm sub,
                int id)
                throws java.lang.Exception
Throws:
java.lang.Exception

listForms

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

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
Throws:
java.lang.Exception

listContents

java.util.List listContents(DMSFolder folder,
                            FormType ft,
                            java.lang.String cond,
                            java.lang.String order,
                            java.lang.Object[] vals,
                            boolean recursive)
                            throws java.lang.Exception
Returns a list of forms of the given formtype which match the passed condition

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
Throws:
java.lang.Exception

renameDocument

DMSObject renameDocument(DMSFolder folder,
                         DMSObject obj,
                         java.lang.String newName,
                         java.lang.String newExtension,
                         User u)
                         throws java.lang.Exception
Sets the name and extension of the passed object to newName.

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
Throws:
java.lang.Exception

reloadDocument

DMSDocForm reloadDocument(DMSFolder folder,
                          DMSDocForm document,
                          java.lang.String newExtension,
                          java.io.InputStream is,
                          User user)
                          throws java.lang.Exception
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
user - the user who wants to perfom this action
Throws:
java.lang.Exception

setContent

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

Parameters:
user - the user who performs this action
document - the document
barr - a byte array
Throws:
java.lang.Exception

getContent

byte[] getContent(DMSDocForm document)
                  throws java.lang.Exception
Get the content of a document.

Parameters:
document - the document
Returns:
a byte array
Throws:
java.lang.Exception

lock

void lock(DMSDocForm document,
          User user)
          throws java.lang.Exception
Locks the document.

Parameters:
document - the document
user - the user who performs this action
Throws:
java.lang.Exception

unlock

void unlock(DMSDocForm document)
            throws java.lang.Exception
Unlocks the document.

Parameters:
document - the document
Throws:
java.lang.Exception

changeType

DMSForm changeType(DMSForm obj,
                   FormType newType,
                   DMSFolder folder,
                   User user)
                   throws java.lang.Exception
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.

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
Throws:
java.lang.Exception

update

void update(DMSObject o)
            throws java.lang.Exception
Throws:
java.lang.Exception

createKeyword

Keyword createKeyword(java.lang.String word,
                      User user)
                      throws java.lang.Exception
Creates a new Keyword for the passed word and returns this instance.

Parameters:
word - the string representing the wanted keyword
user - the user who creates the keyword
Returns:
the new keyword
Throws:
java.lang.Exception

deleteKeyword

void deleteKeyword(Keyword keyword,
                   User user)
                   throws java.lang.Exception
Deletes the passed keyword.

Parameters:
keyword - the keyword which should be deleted
user - the user who creates the keyword
Throws:
java.lang.Exception

getKeyword

Keyword getKeyword(long oid)
                   throws java.lang.Exception
Returns the keyword with the passed oid

Parameters:
oid - the oid the wanted keyword
Returns:
the keyword if there exists one for the passed oid
Throws:
java.lang.Exception

listKeywords

java.util.List listKeywords()
                            throws java.lang.Exception
Returns a list of all keywords known to the system

Returns:
a list of all keywords
Throws:
java.lang.Exception

addKeyword

void addKeyword(DMSObject obj,
                Keyword keyword,
                User user)
                throws java.lang.Exception
Adds the passed keyword to the passed DMSObject

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
Throws:
java.lang.Exception

removeKeyword

void removeKeyword(DMSObject obj,
                   Keyword keyword,
                   User user)
                   throws java.lang.Exception
Removes the passed keyword from the passed DMSObject

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
Throws:
java.lang.Exception

listKeywords

java.util.List listKeywords(DMSObject obj)
                            throws java.lang.Exception
Returns a list of all keywords attached to the passed DMSObject

Parameters:
obj - the object which the keywords should be returned
Returns:
a list of all keywords of a given DMSObject
Throws:
java.lang.Exception

disableRightChecks

void disableRightChecks()
                        throws java.rmi.RemoteException
If this method is called all right checks done using methods 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.

Throws:
java.rmi.RemoteException

enableRightChecks

void enableRightChecks()
                       throws java.rmi.RemoteException
enables the right checks if they were previously disabled using method disableRightChecks().

Throws:
java.rmi.RemoteException

checkEdit

void checkEdit(User user,
               DMSObject obj)
               throws java.rmi.RemoteException
Throws AVWException Nr. 27 if the passed user may NOT edit the passed object

Parameters:
user - the user who wants to edit the object
obj - the object which should be edited
Throws:
java.rmi.RemoteException

checkView

void checkView(User user,
               DMSObject obj)
               throws java.rmi.RemoteException
Throws AVWException Nr. 27 if the passed user may NOT view the passed object

Parameters:
user - the user who wants to view the object
obj - the object which should be viewed
Throws:
java.rmi.RemoteException

checkDelete

void checkDelete(User user,
                 DMSObject obj)
                 throws java.rmi.RemoteException
Throws AVWException Nr. 27 if the passed user may NOT delete the passed object

Parameters:
user - the user who wants to delete the object
obj - the object which should be deleted
Throws:
java.rmi.RemoteException

mayEdit

boolean mayEdit(User user,
                DMSObject obj)
                throws java.rmi.RemoteException
Returns true if the passed user may edit the passed object or if the right check is deactivated. Otherwise false is returned.

Parameters:
user - the user who wants to edit the object
obj - the object which should be edited
Throws:
java.rmi.RemoteException

mayView

boolean mayView(User user,
                DMSObject obj)
                throws java.rmi.RemoteException
Returns true if the passed user may view the passed object or if the right check is deactivated. Otherwise false is returned.

Parameters:
user - the user who wants to view the object
obj - the object which should be viewed
Throws:
java.rmi.RemoteException

mayDelete

boolean mayDelete(User user,
                  DMSObject obj)
                  throws java.rmi.RemoteException
Returns true if the passed user may delete the passed object or if the right check is deactivated. Otherwise false is returned.

Parameters:
user - the user who wants to delete the object
obj - the object which should be deleted
Throws:
java.rmi.RemoteException

getSignatureClass

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

Throws:
java.rmi.RemoteException

listSignatureTypes

java.util.List listSignatureTypes()
                                  throws java.rmi.RemoteException
Returns the available types of signatures

Returns:
a list of Strings where each String represents one type
Throws:
java.rmi.RemoteException

listSignatures

java.util.List listSignatures(Persistent version,
                              User user)
                              throws java.lang.Exception
Returns the signatures of the passed version

Parameters:
version - the document version which signatures are requested
user - the user who wants to get the signatures
Throws:
java.lang.Exception

verify

boolean verify(Persistent version,
               com.groiss.security.SignedObject signature)
               throws java.lang.Exception
Verifies the electronically signature of a document's version.

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.
Throws:
java.lang.Exception

getIcon

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

Parameters:
extension - the extension for which the icon is wanted
Throws:
java.rmi.RemoteException

getIconFromMimetype

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

Parameters:
mimetype - the mimetype for which the icon is wanted
Throws:
java.rmi.RemoteException

checkValidName

void checkValidName(DMSObject target,
                    java.lang.String name,
                    java.lang.String extension)
                    throws java.rmi.RemoteException
Checks if the name and extension do not contain any forbidden characters

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
Throws:
java.rmi.RemoteException

checkDuplicateNames

void checkDuplicateNames(DMSFolder targetFolder,
                         DMSObject targetObject,
                         java.lang.String name,
                         java.lang.String extension)
                         throws java.rmi.RemoteException
Checks if the passed folder does not already contain an element with the same name as the passed one.

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
Throws:
java.rmi.RemoteException

isDuplicateName

boolean isDuplicateName(DMSFolder targetFolder,
                        DMSObject targetObject,
                        java.lang.String name,
                        java.lang.String extension)
                        throws java.rmi.RemoteException
Returns true if already an item of the passed folder has the passed name

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
Throws:
java.rmi.RemoteException


Copyright © 2001-2006 Groiss Informatics GmbH. All Rights Reserved.