|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface RemoteDMS
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 | ||
|---|---|---|
|
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. |
|
|
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. 27 if the passed user may NOT delete the passed object |
|
void |
checkDuplicateNames(DMSFolder targetFolder,
DMSObject targetObject,
String name,
String extension)
Checks if the passed folder does not already contain an element with the same name as the passed one. |
|
void |
checkEdit(User user,
DMSObject obj)
Throws ApplicationException Nr. 27 if the passed user may NOT edit the passed object |
|
void |
checkValidName(DMSObject target,
String name,
String extension)
Checks if the name and extension do not contain any forbidden characters |
|
void |
checkView(User user,
DMSObject obj)
Throws ApplicationException 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. |
|
|
createDocForm(FormType ft,
String name,
String extension,
P template,
User u,
PermissionList acl)
Creates a new document of the specified formtype. |
|
|
createFolder(FormType ft,
String name,
P template,
User u,
PermissionList acl)
Create a folder of a given type. |
|
|
createForm(FormType ft,
P template,
User u,
PermissionList acl)
Creates a new form of the specified formtype. |
|
Keyword |
createKeyword(String word,
User user)
Creates a new Keyword for the passed word and returns this instance. |
|
|
createNote(String subject,
String content,
User u,
PermissionList acl)
Creates a new note |
|
|
createWebLink(String name,
String url,
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 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. |
|
|
getDMSObject(long oid)
Get a DMSObject by oid. |
|
|
getDMSObject(String classname,
long oid)
Get a DMSObject by classname and oid. |
|
|
getFolder(DMSObject obj)
Get the folder containing the passed object. |
|
FormType |
getFormType(long oid)
Returns the formtpye with the given oid |
|
FormType |
getFormType(String id,
int version)
Returns the formtype with the given id and version number |
|
String |
getIcon(String extension)
Returns the icon for the passed extension. |
|
String |
getIconFromMimetype(String mimetype)
Returns the icon for the passed mimetype. |
|
Keyword |
getKeyword(long oid)
Returns the keyword with the passed oid |
|
|
getMainForm(DMSForm f)
Returns the main form of the passed form (or null if there is none) |
|
|
getPublicRootFolder()
Returns the public root folder in the DMS. |
|
|
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 |
|
|
getTemplates(FormType ft)
Returns the templates for the passed form type. |
|
boolean |
isDuplicateName(DMSFolder targetFolder,
DMSObject targetObject,
String name,
String extension)
Returns true if already an item of the passed folder has the passed name |
|
|
listContents(DMSFolder folder,
FormType ft,
String cond,
String order,
Object[] vals,
boolean recursive)
Returns a list of dms objects which match the passed condition |
|
List<FormType> |
listCreateableFormTypes(String searchCond,
String order,
User user)
Returns the formtypes which meet the search condition and from which the passed user may create form objects. |
|
|
listForms(FormType ft,
String cond,
String order,
Object[] vals)
Returns a list of forms of the given formtype which match the passed condition |
|
|
listKeywords()
Returns a list of all keywords known to the system |
|
|
listKeywords(DMSObject obj)
Returns a list of all keywords attached to the passed DMSObject |
|
List<DMSNote> |
listNotes(DMSObject target,
User user)
Returns all the notes which are attached to target and which the user may view or edit |
|
List<com.groiss.security.SignedObject> |
listSignatures(PersistentVersion version,
User user)
Returns the signatures of the passed version |
|
List<String> |
listSignatureTypes()
Returns the available types of signatures |
|
|
listSubfolders(DMSFolder startFolder)
Returns a list of all folders which are subfolders of the given folder. |
|
|
listSubforms(DMSForm f,
int id)
Returns a list of subforms of the passed form (which is empty if there are none) |
|
|
listSubforms(DMSForm f,
int id,
String cond,
String order,
Object[] vals)
Returns a list of subforms of the passed form (which is empty if there are none) |
|
List<PersistentVersion> |
listVersions(DMSObject obj,
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,
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. |
|
|
move(DMSFolder src,
DMSFolder dest,
P doc,
short type,
User u)
Moves an object from one folder to another. |
|
|
reloadDocument(DMSFolder folder,
P document,
String newExtension,
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)
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. |
|
|
renameDocument(DMSFolder folder,
P obj,
String newName,
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. |
|
| Field Detail |
|---|
static final short MOVE
static final short COPY
static final short LINK
static final char[] invalidChars
| Method Detail |
|---|
<P extends DMSFolder> P createFolder(FormType ft,
String name,
P template,
User u,
PermissionList acl)
throws RemoteException
ft - the folder's formtypename - the name for the foldertemplate - specifies the template which should be used for creating the folder (may be null)u - the user who wants to create the folderacl - the acl attached to the new folder (may be null)
RemoteException
<P extends DMSDocForm> P createDocForm(FormType ft,
String name,
String extension,
P template,
User u,
PermissionList acl)
throws RemoteException
ft - the document's formtypename - the name of the new DocFormextension - the file extension of the new document (this parameter is ignored if
a template is passed because then the template determines the extension)template - specifies the template which should be used for creating the folder (may be null)u - the user who wants to perform this actionacl - the acl if one should be set (otherwise pass null)
RemoteException
<P extends DMSForm> P createForm(FormType ft,
P template,
User u,
PermissionList acl)
throws RemoteException
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)
RemoteException
<P extends DMSNote> P createNote(String subject,
String content,
User u,
PermissionList acl)
throws RemoteException
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)
RemoteException
<P extends DMSWebLink> P createWebLink(String name,
String url,
String description,
User u,
PermissionList acl)
throws RemoteException
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)
RemoteException
FormType getFormType(String id,
int version)
throws RemoteException
RemoteException
FormType getFormType(long oid)
throws RemoteException
RemoteException
<P extends DMSForm> List<P> getTemplates(FormType ft)
throws RemoteException
ft - the form type of which the templates are wanted
RemoteException
List<FormType> listCreateableFormTypes(String searchCond,
String order,
User user)
throws RemoteException
searchCond - a sql where-clauseorder - sql order attributesuser - the user for which the search should be performed
RemoteException
<P extends DMSObject> P move(DMSFolder src,
DMSFolder dest,
P doc,
short type,
User u)
throws RemoteException
src - the folder currently holding the objectdest - the folder to which the objects should be moveddoc - the object which should be movedtype - the type of move operation:
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
RemoteException
<P extends DMSObject> P add(DMSFolder f,
P o,
User u)
throws RemoteException
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
RemoteException
void delete(DMSFolder f,
DMSObject o,
User u)
throws RemoteException
f - the folder holding the object which should be deletedo - the object which should be deletedu - the user who wants to perform this action
RemoteException
void attachNote(DMSObject target,
DMSNote note,
User user)
throws RemoteException
target - the object to which the note should be attachednote - the note which should be attacheduser - the user who wants to perform this action
RemoteException
void removeNote(DMSObject target,
DMSNote note,
User user)
throws RemoteException
target - the object form which the note should be removednote - the note which should be removeduser - the user who wants to perform this action
RemoteException
List<DMSNote> listNotes(DMSObject target,
User user)
throws RemoteException
target - the object which notes are wanteduser - the user who wants to perform this action
RemoteException
PersistentVersion makeVersion(DMSObject obj,
User user,
String description)
throws RemoteException
obj - the object which should be versioneduser - the user who wants to make the versiondescription - the version description text
RemoteException
void deleteVersion(PersistentVersion version,
User user)
throws RemoteException
version - the version to be deleteduser - the user who wants to delete the version
RemoteException
List<PersistentVersion> listVersions(DMSObject obj,
User user)
throws RemoteException
obj - the object which versions are requesteduser - the user who performs this request
RemoteException
void backupToVersion(DMSForm form,
PersistentVersion version,
User user)
throws RemoteException
form - the object which should be reset to the passed the versionversion - the version which content should be used (it must be a version of the passed
form)user - the user who performs this request
RemoteException
<P extends DMSFolder> P getRootFolder(User user)
throws RemoteException
user - the user who's root folder is requested.
RemoteException
<P extends DMSFolder> P getPublicRootFolder()
throws RemoteException
RemoteException
<P extends DMSObject> P getDMSObject(String classname,
long oid)
throws RemoteException
classname - the full qualified class name of the requested objectoid - the oid of the requested object
RemoteException
<P extends DMSObject> P getDMSObject(long oid)
throws RemoteException
oid - the oid of the requested object
RemoteException
<P extends DMSFolder> P getFolder(DMSObject obj)
throws RemoteException
obj - the object which folder is wanted
RemoteException
<P extends DMSFolder> List<P> listSubfolders(DMSFolder startFolder)
throws RemoteException
startFolder - the folder which subfolders are requested
RemoteException
<P extends DMSForm> P getMainForm(DMSForm f)
throws RemoteException
f - the form for which the mainform is needed
RemoteException
<P extends DMSForm> List<P> listSubforms(DMSForm f,
int id)
throws RemoteException
f - the form of which the subforms are neededid - the id of the wanted subforms
RemoteException
<P extends DMSForm> List<P> listSubforms(DMSForm f,
int id,
String cond,
String order,
Object[] vals)
throws RemoteException
f - the form of which the subforms are neededid - the id of the wanted subformscond - the condition which must match. This allows additional filtering within the subform table,
e.g. 'amount > 10000' where 'amount' is a column in the database table of the subform class determined
by the passed id.order - the sorting ordervals - the value objects for the condition if the condition is build with the syntax
of a prepared statement
RemoteException
int countSubforms(DMSForm f,
int id)
throws RemoteException
f is
the main form.
f - the form of which the subforms will be countedid - the id of the subform relation
RemoteException
void removeSubform(DMSForm main,
DMSForm sub)
throws RemoteException
main - the mainform. If null is passed all main-subform-relations in which the passed subform
is referenced as subform will be removed.sub - the subform to remove
RemoteException
void removeSubform(DMSForm main,
DMSForm sub,
int id)
throws RemoteException
main - the mainform. If null is passed all main-subform-relations in which the passed subform
is referenced as subform will be removed.sub - the subform to removeid - the id of the subform-relation from which the subform should be removed
RemoteException
void addSubform(DMSForm main,
DMSForm sub,
int id)
throws RemoteException
main - the mainformsub - the subform to addid - the id of the set of subform to which the passed subform should be added
RemoteException
<P extends DMSForm> List<P> listForms(FormType ft,
String cond,
String order,
Object[] vals)
throws RemoteException
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
RemoteException
<P extends DMSObject> List<P> listContents(DMSFolder folder,
FormType ft,
String cond,
String order,
Object[] vals,
boolean recursive)
throws RemoteException
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
RemoteException
<P extends DMSObject> P renameDocument(DMSFolder folder,
P obj,
String newName,
String newExtension,
User u)
throws RemoteException
folder - the folder the document belongs toobj - the object which should be renamednewName - the new name for the documentnewExtension - the new extension for the document. This parameter is ignored if the passed
object is not a DMSDocForm.u - the user who wants to perform the renaming
RemoteException
<P extends DMSDocForm> P reloadDocument(DMSFolder folder,
P document,
String newExtension,
InputStream is,
User user)
throws RemoteException
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
RemoteException
void setContent(User user,
DMSDocForm document,
byte[] barr)
throws RemoteException
user - the user who performs this actiondocument - the documentbarr - a byte array
RemoteException
byte[] getContent(DMSDocForm document)
throws RemoteException
document - the document
RemoteException
void lock(DMSDocForm document,
User user)
throws RemoteException
document - the documentuser - the user who performs this action
RemoteException
void unlock(DMSDocForm document)
throws RemoteException
document - the document
RemoteException
<P extends DMSForm> P changeType(DMSForm obj,
FormType newType,
DMSFolder folder,
User user)
throws RemoteException
obj - the objects which type should be changednewType - the new type for the passed objectfolder - the folder of which the object is a content memberuser - the user who performs the change
RemoteException
void update(DMSObject o)
throws RemoteException
o - the object to be updated
RemoteException
Keyword createKeyword(String word,
User user)
throws RemoteException
word - the string representing the wanted keyworduser - the user who creates the keyword
RemoteException
void deleteKeyword(Keyword keyword,
User user)
throws RemoteException
keyword - the keyword which should be deleteduser - the user who creates the keyword
RemoteException
Keyword getKeyword(long oid)
throws RemoteException
oid - the oid the wanted keyword
RemoteException
<P extends Keyword> List<P> listKeywords()
throws RemoteException
RemoteException
void addKeyword(DMSObject obj,
Keyword keyword,
User user)
throws RemoteException
obj - the object to which the keyword should be addedkeyword - the keyword which should be addeduser - the user who wants to perform this action
RemoteException
void removeKeyword(DMSObject obj,
Keyword keyword,
User user)
throws RemoteException
obj - the object from which the keyword should be removedkeyword - the keyword which should be removeduser - the user who wants to perform this action
RemoteException
<P extends Keyword> List<P> listKeywords(DMSObject obj)
throws RemoteException
obj - the object which the keywords should be returned
RemoteException
void disableRightChecks()
throws 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.
RemoteException
void enableRightChecks()
throws RemoteException
disableRightChecks().
RemoteException
void checkEdit(User user,
DMSObject obj)
throws RemoteException
ApplicationException Nr. 27 if the passed user may NOT edit the passed object
user - the user who wants to edit the objectobj - the object which should be edited
RemoteException
void checkView(User user,
DMSObject obj)
throws RemoteException
ApplicationException Nr. 27 if the passed user may NOT view the passed object
user - the user who wants to view the objectobj - the object which should be viewed
RemoteException
void checkDelete(User user,
DMSObject obj)
throws RemoteException
ApplicationException Nr. 27 if the passed user may NOT delete the passed object
user - the user who wants to delete the objectobj - the object which should be deleted
RemoteException
boolean mayEdit(User user,
DMSObject obj)
throws RemoteException
user - the user who wants to edit the objectobj - the object which should be edited
RemoteException
boolean mayView(User user,
DMSObject obj)
throws RemoteException
user - the user who wants to view the objectobj - the object which should be viewed
RemoteException
boolean mayDelete(User user,
DMSObject obj)
throws RemoteException
user - the user who wants to delete the objectobj - the object which should be deleted
RemoteException
com.groiss.security.Signature getSignatureClass()
throws RemoteException
Signature implementation
RemoteException
List<String> listSignatureTypes()
throws RemoteException
RemoteException
List<com.groiss.security.SignedObject> listSignatures(PersistentVersion version,
User user)
throws RemoteException
version - the document version which signatures are requesteduser - the user who wants to get the signatures
RemoteException
boolean verify(PersistentVersion version,
com.groiss.security.SignedObject signature)
throws RemoteException
version - The document version which signature should be verifiedsignature - The SignedObject holding the signature relevant data
RemoteException
String getIcon(String extension)
throws RemoteException
extension - the extension for which the icon is wanted
RemoteException
String getIconFromMimetype(String mimetype)
throws RemoteException
mimetype - the mimetype for which the icon is wanted
RemoteException
void checkValidName(DMSObject target,
String name,
String extension)
throws RemoteException
target - the object to which the name belongs to (or will belong to)name - the name which should be checkedextension - the extension which should be checked
RemoteException
void checkDuplicateNames(DMSFolder targetFolder,
DMSObject targetObject,
String name,
String extension)
throws RemoteException
targetFolder - the folder in which should be checkedtargetObject - the object the name belongs to (or will belong to)name - the name which should be checkedextension - the extension which should be checked
RemoteException
boolean isDuplicateName(DMSFolder targetFolder,
DMSObject targetObject,
String name,
String extension)
throws RemoteException
targetFolder - the folder in which should be checkedtargetObject - the object the name belongs to (or will belong to)name - the name which should be checkedextension - the extension which should be checked
RemoteException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||