|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DMS
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 |
|---|
static final short MOVE
static final short COPY
static final short LINK
static final char[] invalidChars
| Method Detail |
|---|
DMSFolder createFolder(FormType ft,
java.lang.String name,
DMSFolder template,
User u,
com.dec.avw.acl.ACL acl)
throws java.lang.Exception
ft - the folder's formtypename - the name for the foldertemplate - specifies the template which should be used for creating the folder (may be null)u - the user who wants to create the folderacl - the acl attached to the new folder (may be null)
java.lang.Exception
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
ft - the document's formtypename - the name of the new DocFormextension - the file extension of the new document (this parameter is ignored if
a template is passed because then the template determines the extension)template - specifies the template which should be used for creating the folder (may be null)u - the user who wants to perform this actionacl - the acl if one should be set (otherwise pass null)
java.lang.Exception
DMSForm createForm(FormType ft,
DMSForm template,
User u,
com.dec.avw.acl.ACL acl)
throws java.lang.Exception
ft - the form's formtypetemplate - specifies the template which should be used for creating the folder (may be null)u - the user who wants to perform this actionacl - the acl if one should be set (otherwise pass null)
java.lang.Exception
DMSNote createNote(java.lang.String subject,
java.lang.String content,
User u,
com.dec.avw.acl.ACL acl)
throws java.lang.Exception
subject - the subject of the notecontent - the content of the noteu - the user who wants to perform this actionacl - the acl if one should be set (otherwise pass null)
java.lang.Exception
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
name - the name of the weblinkurl - the url of the weblinkdescription - a description text of the the weblinku - the user who wants to perform this actionacl - the acl if one should be set (otherwise pass null)
java.lang.Exception
FormType getFormType(java.lang.String id,
int version)
throws java.rmi.RemoteException
java.rmi.RemoteException
FormType getFormType(long oid)
throws java.rmi.RemoteException
java.rmi.RemoteException
java.util.List getTemplates(FormType ft)
throws java.lang.Exception
ft - the form type of which the templates are wanted
java.lang.Exception
java.util.List listCreateableFormTypes(java.lang.String searchCond,
java.lang.String order,
User user)
throws java.lang.Exception
searchCond - a sql where-clauseorder - sql order attributesuser - the user for which the search should be performed
java.lang.Exception
DMSObject move(DMSFolder src,
DMSFolder dest,
DMSObject doc,
short type,
User u)
throws java.lang.Exception
src - the folder currently holding the objectdest - the folder to which the objects should be moveddoc - the object which should be movedtype - the type of move operation:
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
java.lang.Exception
DMSObject add(DMSFolder f,
DMSObject o,
User u)
throws java.lang.Exception
f - the folder to which the object should be addedo - the object which should be added to the folderu - the user who wants to perform this action
java.lang.Exception
void delete(DMSFolder f,
DMSObject o,
User u)
throws java.lang.Exception
f - the folder holding the object which should be deletedo - the object which should be deletedu - the user who wants to perform this action
java.lang.Exception
void attachNote(DMSObject target,
DMSNote note,
User user)
throws java.lang.Exception
target - the object to which the note should be attachednote - the note which should be attacheduser - the user who wants to perform this action
java.lang.Exception
void removeNote(DMSObject target,
DMSNote note,
User user)
throws java.lang.Exception
target - the object form which the note should be removednote - the note which should be removeduser - the user who wants to perform this action
java.lang.Exception
java.util.List listNotes(DMSObject target,
User user)
throws java.lang.Exception
target - the object which notes are wanteduser - the user who wants to perform this action
java.lang.Exception
DocumentVersion makeVersion(DMSObject obj,
User user,
java.lang.String description)
throws java.lang.Exception
obj - the object which should be versioneduser - the user who wants to make the versiondescription - the version description text
java.lang.Exception
void deleteVersion(DocumentVersion dv,
User user)
throws java.lang.Exception
dv - the version to be deleteduser - the user who wants to delete the version
java.lang.Exception
java.util.List listVersions(DMSObject obj,
User user)
throws java.lang.Exception
obj - the object which versions are requesteduser - the user who performs this request
java.lang.Exception
void backupToVersion(DMSDocForm doc,
DocumentVersion version,
User user)
throws java.lang.Exception
doc - the object which content should be replaced by the version's contentversion - the version which content should be used (it must be a version of the passed
document)user - the user who performs this request
java.lang.Exception
DMSFolder getRootFolder(User user)
throws java.lang.Exception
user - the user who's root folder is requested.
java.lang.Exception
DMSFolder getPublicRootFolder()
throws java.lang.Exception
java.lang.Exception
DMSObject getDMSObject(java.lang.String classname,
long oid)
throws java.rmi.RemoteException
classname - the full qualified class name of the requested objectoid - the oid of the requested object
java.rmi.RemoteException
DMSObject getDMSObject(long oid)
throws java.rmi.RemoteException
oid - the oid of the requested object
java.rmi.RemoteException
DMSFolder getFolder(DMSObject obj)
throws java.rmi.RemoteException
obj - the object which folder is wanted
java.rmi.RemoteException
java.util.List listSubfolders(DMSFolder startFolder)
throws java.rmi.RemoteException
startFolder - the folder which subfolders are requested
java.rmi.RemoteException
DMSForm getMainForm(DMSForm f)
throws java.rmi.RemoteException
f - the form for which the mainform is needed
java.rmi.RemoteException
java.util.List listSubforms(DMSForm f,
int id)
throws java.rmi.RemoteException
f - the form of which the subforms are neededid - the id of the wanted subforms
java.rmi.RemoteException
java.util.List listSubforms(DMSForm f,
int id,
java.lang.String cond,
java.lang.String order,
java.lang.Object[] vals)
throws java.rmi.RemoteException
f - the form of which the subforms are neededid - the id of the wanted subformscond - the condition which must matchorder - the sorting ordervals - the value objects for the condition if the condition is build with the syntax
of a prepared statement
java.rmi.RemoteException
int countSubforms(DMSForm f,
int id)
throws java.lang.Exception
f is
the main form.
f - the form of which the subforms will be countedid - the id of the subform relation
java.lang.Exception
void removeSubform(DMSForm main,
DMSForm sub)
throws java.lang.Exception
java.lang.Exception
void addSubform(DMSForm main,
DMSForm sub,
int id)
throws java.lang.Exception
java.lang.Exception
java.util.List listForms(FormType ft,
java.lang.String cond,
java.lang.String order,
java.lang.Object[] vals)
throws java.lang.Exception
ft - the formtype of the desired formscond - the condition which must matchorder - the sorting ordervals - the value objects for the condition if the condition is build with the syntax
of a prepared statement
java.lang.Exception
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
folder - the folder whose content is wantedft - the formtype of the desired objectscond - the condition which must match. The following columns are available for parameter
cond and order:
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 statementrecursive - determines if the search should also include all subfolders
java.lang.Exception
DMSObject renameDocument(DMSFolder folder,
DMSObject obj,
java.lang.String newName,
java.lang.String newExtension,
User u)
throws java.lang.Exception
folder - the folder the document belongs toobj - the object which should be renamednewName - the new name for the documentnewExtension - the new extension for the document. This parameter is ignored if the passed
object is not a DMSDocForm.u - the user who wants to perform the renaming
java.lang.Exception
DMSDocForm reloadDocument(DMSFolder folder,
DMSDocForm document,
java.lang.String newExtension,
java.io.InputStream is,
User user)
throws java.lang.Exception
folder - the folder the document belongs todocument - the document which should be reloadednewExtension - the possibly new extension (if null or the empty string is passed the old
extension remains unchanged).is - the inputstream holding the new contentuser - the user who wants to perfom this action
java.lang.Exception
void setContent(User user,
DMSDocForm document,
byte[] barr)
throws java.lang.Exception
user - the user who performs this actiondocument - the documentbarr - a byte array
java.lang.Exception
byte[] getContent(DMSDocForm document)
throws java.lang.Exception
document - the document
java.lang.Exception
void lock(DMSDocForm document,
User user)
throws java.lang.Exception
document - the documentuser - the user who performs this action
java.lang.Exception
void unlock(DMSDocForm document)
throws java.lang.Exception
document - the document
java.lang.Exception
DMSForm changeType(DMSForm obj,
FormType newType,
DMSFolder folder,
User user)
throws java.lang.Exception
obj - the objects which type should be changednewType - the new type for the passed objectfolder - the folder of which the object is a content memberuser - the user who performs the change
java.lang.Exception
void update(DMSObject o)
throws java.lang.Exception
java.lang.Exception
Keyword createKeyword(java.lang.String word,
User user)
throws java.lang.Exception
word - the string representing the wanted keyworduser - the user who creates the keyword
java.lang.Exception
void deleteKeyword(Keyword keyword,
User user)
throws java.lang.Exception
keyword - the keyword which should be deleteduser - the user who creates the keyword
java.lang.Exception
Keyword getKeyword(long oid)
throws java.lang.Exception
oid - the oid the wanted keyword
java.lang.Exception
java.util.List listKeywords()
throws java.lang.Exception
java.lang.Exception
void addKeyword(DMSObject obj,
Keyword keyword,
User user)
throws java.lang.Exception
obj - the object to which the keyword should be addedkeyword - the keyword which should be addeduser - the user who wants to perform this action
java.lang.Exception
void removeKeyword(DMSObject obj,
Keyword keyword,
User user)
throws java.lang.Exception
obj - the object from which the keyword should be removedkeyword - the keyword which should be removeduser - the user who wants to perform this action
java.lang.Exception
java.util.List listKeywords(DMSObject obj)
throws java.lang.Exception
obj - the object which the keywords should be returned
java.lang.Exception
void disableRightChecks()
throws java.rmi.RemoteException
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.
java.rmi.RemoteException
void enableRightChecks()
throws java.rmi.RemoteException
disableRightChecks().
java.rmi.RemoteException
void checkEdit(User user,
DMSObject obj)
throws java.rmi.RemoteException
user - the user who wants to edit the objectobj - the object which should be edited
java.rmi.RemoteException
void checkView(User user,
DMSObject obj)
throws java.rmi.RemoteException
user - the user who wants to view the objectobj - the object which should be viewed
java.rmi.RemoteException
void checkDelete(User user,
DMSObject obj)
throws java.rmi.RemoteException
user - the user who wants to delete the objectobj - the object which should be deleted
java.rmi.RemoteException
boolean mayEdit(User user,
DMSObject obj)
throws java.rmi.RemoteException
user - the user who wants to edit the objectobj - the object which should be edited
java.rmi.RemoteException
boolean mayView(User user,
DMSObject obj)
throws java.rmi.RemoteException
user - the user who wants to view the objectobj - the object which should be viewed
java.rmi.RemoteException
boolean mayDelete(User user,
DMSObject obj)
throws java.rmi.RemoteException
user - the user who wants to delete the objectobj - the object which should be deleted
java.rmi.RemoteException
com.groiss.security.Signature getSignatureClass()
throws java.rmi.RemoteException
Signature implementation
java.rmi.RemoteException
java.util.List listSignatureTypes()
throws java.rmi.RemoteException
java.rmi.RemoteException
java.util.List listSignatures(Persistent version,
User user)
throws java.lang.Exception
version - the document version which signatures are requesteduser - the user who wants to get the signatures
java.lang.Exception
boolean verify(Persistent version,
com.groiss.security.SignedObject signature)
throws java.lang.Exception
version - The document version which signature should be verifiedsignature - The SignedObject holding the signature relevant data
java.lang.Exception
java.lang.String getIcon(java.lang.String extension)
throws java.rmi.RemoteException
extension - the extension for which the icon is wanted
java.rmi.RemoteException
java.lang.String getIconFromMimetype(java.lang.String mimetype)
throws java.rmi.RemoteException
mimetype - the mimetype for which the icon is wanted
java.rmi.RemoteException
void checkValidName(DMSObject target,
java.lang.String name,
java.lang.String extension)
throws java.rmi.RemoteException
target - the object to which the name belongs to (or will belong to)name - the name which should be checkedextension - the extension which should be checked
java.rmi.RemoteException
void checkDuplicateNames(DMSFolder targetFolder,
DMSObject targetObject,
java.lang.String name,
java.lang.String extension)
throws java.rmi.RemoteException
targetFolder - the folder in which should be checkedtargetObject - the object the name belongs to (or will belong to)name - the name which should be checkedextension - the extension which should be checked
java.rmi.RemoteException
boolean isDuplicateName(DMSFolder targetFolder,
DMSObject targetObject,
java.lang.String name,
java.lang.String extension)
throws java.rmi.RemoteException
targetFolder - the folder in which should be checkedtargetObject - the object the name belongs to (or will belong to)name - the name which should be checkedextension - the extension which should be checked
java.rmi.RemoteException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||