com.groiss.dms.html
Class HTMLDMSObject

java.lang.Object
  extended by com.groiss.dms.html.HTMLDMSObject

public class HTMLDMSObject
extends java.lang.Object

HTML interface all object types in the dms of


Field Summary
static int DEFAULT_SORT
           
 
Constructor Summary
HTMLDMSObject()
           
 
Method Summary
 Page attachNote(javax.servlet.http.HttpServletRequest req)
          Starts the action for attaching a new note to a document or process
 Page attachNote2(javax.servlet.http.HttpServletRequest req)
           
static boolean autoEdit()
          Returns true if the meta data of a new dms document should be opened as an answer to a creation action
static void avwstf(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse sout)
          This method is added for supporting Internet Explorer which is extension-base and not mimetype-based.
 Page changeType(javax.servlet.http.HttpServletRequest req)
          opens the mask to change the object's type
 Page checkIn(javax.servlet.http.HttpServletRequest req)
          method to check in the chosen document(s)
 Page checkOut(javax.servlet.http.HttpServletRequest req)
          method to check out the chosen document(s)
 Page createFolder(javax.servlet.http.HttpServletRequest req1)
          this method creates a new folder and adds it to its parent
 Page createForm(javax.servlet.http.HttpServletRequest req1)
          this method creates a new form and adds it to its folder
 Page createVersion(javax.servlet.http.HttpServletRequest req)
          Returns the page for making a version to the browser
 Page delete(javax.servlet.http.HttpServletRequest req)
          this method deletes the chosen dms object(s) from the database.
 Page deleteNote(javax.servlet.http.HttpServletRequest req)
           
 Page dmsFunction(javax.servlet.http.HttpServletRequest req)
           
 Page doChangeType(javax.servlet.http.HttpServletRequest req)
          changes the object type to the type defined in the changeType-Mask
 Page doCreateVersion(javax.servlet.http.HttpServletRequest req)
          Creates a version of the specified object
 Page docUpload(javax.servlet.http.HttpServletRequest req1)
          this method uploads a document
 Page doRename(javax.servlet.http.HttpServletRequest req)
          changes the object name to the name defined in the changeNameMask
 Page doReplace(javax.servlet.http.HttpServletRequest req1)
          reloads the object.
 Page download(javax.servlet.http.HttpServletRequest req)
          Downloads the selected DocForms as zip-archive
static java.lang.String encode(java.lang.String s)
          Translates special characters to "_".
 Page folderForm(javax.servlet.http.HttpServletRequest req)
          Opens the form of the passed DMSFolder
 Page folderProps(javax.servlet.http.HttpServletRequest req)
          opens the mask to change the object's name
protected  com.dec.avw.acl.ACL getACL(javax.servlet.http.HttpServletRequest req)
           
 Page getAnswerToCreation(DMSObject object, DMSFolder folder)
          Returns the page for editing the object if autoEdit() returns true.
static
<T extends DMSObject>
T
getDMSObject(java.lang.String classAndOid)
          Returns the dms object which is specified by a string consisting of the class name and the oid (seperated by ':') of that object
static DMSObject getDMSObject(java.lang.String classname, java.lang.String oid)
          Deprecated. use method getDMSObject(String) instead
static java.lang.String getDocsPage(java.lang.String folderclass, long folder, long task, java.lang.String actions, java.lang.String pathToRoot, java.lang.String target)
          Returns a html page where the target location is replaced by the url returned by getDocsUrl(String, long, long, String, String).
static java.lang.String getDocsUrl(DMSFolder folder, ActivityInstance task, java.lang.String actions, java.lang.String pathToRoot)
          Returns the url for getting the list of elements of a specific folder.
static java.lang.String getDocsUrl(DMSFolder folder, ActivityInstance task, java.lang.String actions, java.lang.String pathToRoot, java.lang.Integer from)
          Deprecated. since ep70, use method getDocsUrl(DMSFolder, ActivityInstance, String, String) instead.
static java.lang.String getDocsUrl(DMSFolder folder, ActivityInstance task, java.lang.String actions, java.lang.String pathToRoot, java.lang.String comingFrom)
          Returns the url for getting the list of elements of a specific folder.
static java.lang.String getDocsUrl(java.lang.String folderclass, long folderoid, long task, java.lang.String actions, java.lang.String pathToRoot)
          Returns the url for getting the list of elements of a specific folder.
static java.lang.String getEditUrl(DMSObject object, DMSFolder folder, boolean readOnly)
           
static java.lang.String getEditUrl(DMSObject object, DMSFolder folder, boolean readOnly, boolean inplace)
           
static void getFile(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse sout)
          Returns the requested file in the way the starter32.exe needs it.
static DMSFolder getFolder(java.lang.String classname, java.lang.String oid)
          Deprecated. use method getDMSObject(String) instead
static java.lang.String getIconAndName(DMSObject obj)
          Returns the string representing the object to the user.
static java.lang.Object[] getIconAndNameAsArray(DMSObject obj)
           
 java.lang.String getKeywordsAsString(DMSObject obj)
          Returns the keywords attached to the passed document
static java.lang.String getMetadataUrl(DMSObject object, DMSFolder fldr, boolean readonly, boolean ownWindow)
           
static java.lang.String getTarget(java.lang.Object type)
          Deprecated. since ep7.0. There is no use for this method anymore therefore there is no alternative for it
static Pair getTree(DMSFolder root)
          Returns the tree of which the passed folder is the root of.
 Page insertForm(javax.servlet.http.HttpServletRequest req)
           
 Page newDMS(javax.servlet.http.HttpServletRequest req)
          start mask if general function "new dms-object" is clicked -> user has to select the kind of dms-object (form, folder, document etc.) first.
protected  Page newDMSObject(javax.servlet.http.HttpServletRequest req, int type)
          Returns a page for collecting the needed data for creating a new dms object of the passed type
 Page newDocument(javax.servlet.http.HttpServletRequest req)
          this method starts the document-upload-process /* invokes method loadDoc()
 Page newFolder(javax.servlet.http.HttpServletRequest req)
          returns the page for creating a new folder
 Page newForm(javax.servlet.http.HttpServletRequest req)
          returns the page for creating a new form
 Page newNote(javax.servlet.http.HttpServletRequest req)
          creates a new note
 Page newWebLink(javax.servlet.http.HttpServletRequest req)
          creates a new web link
 Page replace(javax.servlet.http.HttpServletRequest req)
          opens the mask to replace (reload) the object.
 Page setDocProps(javax.servlet.http.HttpServletRequest req)
          set properties of document
 Page setFolderProps(javax.servlet.http.HttpServletRequest req)
          set properties of folder
 Page showAccess(javax.servlet.http.HttpServletRequest req)
           
static java.lang.String showDoc(DMSObject doc, DMSFolder folder, boolean readOnly)
          Show the document link
 Page showDocFrames(javax.servlet.http.HttpServletRequest req)
          Returns a page showing the content of the folder and the dms-toolbar.
static Page showDocs(DMSFolder f)
          Shows the content of the passed folder
static Page showDocs(javax.servlet.http.HttpServletRequest req)
          Shows the content of the passed folder.
 Page showError(java.lang.String title, java.util.List<Pair<java.lang.String,java.lang.String>> errors, DMSFolder folder)
          this method shows the error-messages
static void showMergedImage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Prints the merged image to the result stream.
 Page showProperties(javax.servlet.http.HttpServletRequest req)
          opens the mask to show the details of the selected object
 Page showVersions(javax.servlet.http.HttpServletRequest req)
          This method shows the table of the versions of an object
 Page undoCheckOut(javax.servlet.http.HttpServletRequest req)
          Undoes the checkout of the passed document, but only the user is allowed to perform this action
 Page unlock(javax.servlet.http.HttpServletRequest req)
          Unlocks the passed document, but only the user is allowed to perform this action
 Page upward(javax.servlet.http.HttpServletRequest req)
          go up one level
 void viewFile(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SORT

public static int DEFAULT_SORT
Constructor Detail

HTMLDMSObject

public HTMLDMSObject()
Method Detail

showDocs

public static Page showDocs(javax.servlet.http.HttpServletRequest req)
                     throws java.lang.Exception
Shows the content of the passed folder. The folder may be specified by oid and class name (parameter 'folder' in request) or by a path (parameter 'path' in request). When the path is used there are 3 special place holders at the beginning of this path: e.g. {hugo}/test would determine the folder with name 'test' which must be a subfolder of the root folder of user 'hugo'

Throws:
java.lang.Exception

showDocs

public static Page showDocs(DMSFolder f)
                     throws java.lang.Exception
Shows the content of the passed folder

Parameters:
f - the folder which content should be shown
Throws:
java.lang.Exception

getDocsPage

public static java.lang.String getDocsPage(java.lang.String folderclass,
                                           long folder,
                                           long task,
                                           java.lang.String actions,
                                           java.lang.String pathToRoot,
                                           java.lang.String target)
                                    throws java.lang.Exception
Returns a html page where the target location is replaced by the url returned by getDocsUrl(String, long, long, String, String).

Parameters:
folderclass - the name of the class of the folder which documents should be shown
folder - the oid of the folder which documents should be shown
task - the oid of the task in which the content should be shown (only relevant for worklist component). If the task should be ignored 0 must be passed as the value for this parameter.
actions - the set of actions for the shown documents
pathToRoot - a list of : separated with File.separator determining the path from current folder to the root (which is needed for going upwards)
target - the target in which the list of documents should be shown
Throws:
java.lang.Exception

getDocsUrl

public static java.lang.String getDocsUrl(java.lang.String folderclass,
                                          long folderoid,
                                          long task,
                                          java.lang.String actions,
                                          java.lang.String pathToRoot)
Returns the url for getting the list of elements of a specific folder.

Parameters:
folderclass - the name of the class of the folder which documents should be shown
folderoid - the oid of the folder which documents should be shown
task - the oid of the task in which the content should be shown (only relevant for worklist component). If the task should be ignored 0 must be passed as the value for this parameter.
actions - the set of actions for the shown documents
pathToRoot - a list of : separated with File.separator determining the path from current folder to the root (which is needed for going upwards)

getDocsUrl

public static java.lang.String getDocsUrl(DMSFolder folder,
                                          ActivityInstance task,
                                          java.lang.String actions,
                                          java.lang.String pathToRoot)
Returns the url for getting the list of elements of a specific folder.

Parameters:
folder - the folder which documents should be shown
task - the task in which the content should be shown (only relevant for worklist component). If the task should be ignored null must be passed as the value for this parameter.
actions - the set of actions for the shown documents

getDocsUrl

@Deprecated
public static java.lang.String getDocsUrl(DMSFolder folder,
                                                     ActivityInstance task,
                                                     java.lang.String actions,
                                                     java.lang.String pathToRoot,
                                                     java.lang.Integer from)
Deprecated. since ep70, use method getDocsUrl(DMSFolder, ActivityInstance, String, String) instead.


getDocsUrl

public static java.lang.String getDocsUrl(DMSFolder folder,
                                          ActivityInstance task,
                                          java.lang.String actions,
                                          java.lang.String pathToRoot,
                                          java.lang.String comingFrom)
Returns the url for getting the list of elements of a specific folder.

Parameters:
folder - the folder which documents should be shown
task - the task in which the content should be shown (only relevant for worklist component). If the task should be ignored null must be passed as the value for this parameter.
actions - the set of actions for the shown documents
comingFrom - the url for the back button in the toplevel document table of a process

getTarget

@Deprecated
public static java.lang.String getTarget(java.lang.Object type)
Deprecated. since ep7.0. There is no use for this method anymore therefore there is no alternative for it

Returns the target which is predefined for the passed type. The return value is allways parent.right except for type FROM_PROCESSHISTORY (here no target is defined)


getEditUrl

public static java.lang.String getEditUrl(DMSObject object,
                                          DMSFolder folder,
                                          boolean readOnly)

getEditUrl

public static java.lang.String getEditUrl(DMSObject object,
                                          DMSFolder folder,
                                          boolean readOnly,
                                          boolean inplace)

getMetadataUrl

public static java.lang.String getMetadataUrl(DMSObject object,
                                              DMSFolder fldr,
                                              boolean readonly,
                                              boolean ownWindow)

viewFile

public void viewFile(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse res)
              throws java.lang.Exception
Throws:
java.lang.Exception

showDoc

public static java.lang.String showDoc(DMSObject doc,
                                       DMSFolder folder,
                                       boolean readOnly)
Show the document link


showError

public Page showError(java.lang.String title,
                      java.util.List<Pair<java.lang.String,java.lang.String>> errors,
                      DMSFolder folder)
               throws java.lang.Exception
this method shows the error-messages

Throws:
java.lang.Exception

newDocument

public Page newDocument(javax.servlet.http.HttpServletRequest req)
                 throws java.lang.Exception
this method starts the document-upload-process /* invokes method loadDoc()

Throws:
java.lang.Exception

newDMS

public Page newDMS(javax.servlet.http.HttpServletRequest req)
            throws java.lang.Exception
start mask if general function "new dms-object" is clicked -> user has to select the kind of dms-object (form, folder, document etc.) first. the mask is displayed in an iframe. the mask is the same as if started via the special function.

Parameters:
req - must contain "folder"
Returns:
Page containing select-menu and mask (by default "folder")
Throws:
java.lang.Exception

newDMSObject

protected Page newDMSObject(javax.servlet.http.HttpServletRequest req,
                            int type)
                     throws java.lang.Exception
Returns a page for collecting the needed data for creating a new dms object of the passed type

Parameters:
type - the type of the object which should be created
Throws:
java.lang.Exception

docUpload

public Page docUpload(javax.servlet.http.HttpServletRequest req1)
               throws java.lang.Exception
this method uploads a document

Throws:
java.lang.Exception

checkIn

public Page checkIn(javax.servlet.http.HttpServletRequest req)
             throws java.lang.Exception
method to check in the chosen document(s)

Throws:
java.lang.Exception

checkOut

public Page checkOut(javax.servlet.http.HttpServletRequest req)
              throws java.lang.Exception
method to check out the chosen document(s)

Throws:
java.lang.Exception

getFile

public static void getFile(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse sout)
                    throws java.lang.Exception
Returns the requested file in the way the starter32.exe needs it.

Throws:
java.lang.Exception

avwstf

public static void avwstf(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse sout)
                   throws java.lang.Exception
This method is added for supporting Internet Explorer which is extension-base and not mimetype-based. The IE now thinks he gets a document with extension 'avwstf'.

Throws:
java.lang.Exception

delete

public Page delete(javax.servlet.http.HttpServletRequest req)
            throws java.lang.Exception
this method deletes the chosen dms object(s) from the database.

Throws:
java.lang.Exception

doRename

public Page doRename(javax.servlet.http.HttpServletRequest req)
              throws java.lang.Exception
changes the object name to the name defined in the changeNameMask

Throws:
java.lang.Exception

folderProps

public Page folderProps(javax.servlet.http.HttpServletRequest req)
                 throws java.lang.Exception
opens the mask to change the object's name

Throws:
java.lang.Exception

showProperties

public Page showProperties(javax.servlet.http.HttpServletRequest req)
                    throws java.lang.Exception
opens the mask to show the details of the selected object

Throws:
java.lang.Exception

folderForm

public Page folderForm(javax.servlet.http.HttpServletRequest req)
                throws java.lang.Exception
Opens the form of the passed DMSFolder

Parameters:
req -
Throws:
java.lang.Exception

replace

public Page replace(javax.servlet.http.HttpServletRequest req)
             throws java.lang.Exception
opens the mask to replace (reload) the object. This method is only available for DMSDocForms.

Throws:
java.lang.Exception

doReplace

public Page doReplace(javax.servlet.http.HttpServletRequest req1)
               throws java.lang.Exception
reloads the object. This method is only available for DMSDocForms.

Throws:
java.lang.Exception

createVersion

public Page createVersion(javax.servlet.http.HttpServletRequest req)
                   throws java.lang.Exception
Returns the page for making a version to the browser

Throws:
java.lang.Exception

doCreateVersion

public Page doCreateVersion(javax.servlet.http.HttpServletRequest req)
                     throws java.lang.Exception
Creates a version of the specified object

Throws:
java.lang.Exception

showVersions

public Page showVersions(javax.servlet.http.HttpServletRequest req)
                  throws java.lang.Exception
This method shows the table of the versions of an object

Throws:
java.lang.Exception

encode

public static java.lang.String encode(java.lang.String s)
Translates special characters to "_".

Parameters:
s - String to be translated
Returns:
the translated String.

getDMSObject

public static <T extends DMSObject> T getDMSObject(java.lang.String classAndOid)
Returns the dms object which is specified by a string consisting of the class name and the oid (seperated by ':') of that object


getDMSObject

@Deprecated
public static DMSObject getDMSObject(java.lang.String classname,
                                                java.lang.String oid)
Deprecated. use method getDMSObject(String) instead


getFolder

@Deprecated
public static DMSFolder getFolder(java.lang.String classname,
                                             java.lang.String oid)
Deprecated. use method getDMSObject(String) instead


newFolder

public Page newFolder(javax.servlet.http.HttpServletRequest req)
               throws java.lang.Exception
returns the page for creating a new folder

Throws:
java.lang.Exception

createFolder

public Page createFolder(javax.servlet.http.HttpServletRequest req1)
                  throws java.lang.Exception
this method creates a new folder and adds it to its parent

Throws:
java.lang.Exception

newForm

public Page newForm(javax.servlet.http.HttpServletRequest req)
             throws java.lang.Exception
returns the page for creating a new form

Throws:
java.lang.Exception

createForm

public Page createForm(javax.servlet.http.HttpServletRequest req1)
                throws java.lang.Exception
this method creates a new form and adds it to its folder

Throws:
java.lang.Exception

newNote

public Page newNote(javax.servlet.http.HttpServletRequest req)
             throws java.lang.Exception
creates a new note

Throws:
java.lang.Exception

newWebLink

public Page newWebLink(javax.servlet.http.HttpServletRequest req)
                throws java.lang.Exception
creates a new web link

Throws:
java.lang.Exception

insertForm

public Page insertForm(javax.servlet.http.HttpServletRequest req)
                throws java.lang.Exception
Throws:
java.lang.Exception

attachNote

public Page attachNote(javax.servlet.http.HttpServletRequest req)
                throws java.lang.Exception
Starts the action for attaching a new note to a document or process

Throws:
java.lang.Exception

attachNote2

public Page attachNote2(javax.servlet.http.HttpServletRequest req)
                 throws java.lang.Exception
Throws:
java.lang.Exception

deleteNote

public Page deleteNote(javax.servlet.http.HttpServletRequest req)
                throws java.lang.Exception
Throws:
java.lang.Exception

showMergedImage

public static void showMergedImage(javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res)
                            throws java.lang.Exception
Prints the merged image to the result stream.

Throws:
java.lang.Exception

getAnswerToCreation

public Page getAnswerToCreation(DMSObject object,
                                DMSFolder folder)
                         throws java.lang.Exception
Returns the page for editing the object if autoEdit() returns true. Else the object list will be shown as a result;

Throws:
java.lang.Exception

autoEdit

public static boolean autoEdit()
Returns true if the meta data of a new dms document should be opened as an answer to a creation action


getACL

protected com.dec.avw.acl.ACL getACL(javax.servlet.http.HttpServletRequest req)
                              throws java.lang.Exception
Throws:
java.lang.Exception

changeType

public Page changeType(javax.servlet.http.HttpServletRequest req)
                throws java.lang.Exception
opens the mask to change the object's type

Throws:
java.lang.Exception

doChangeType

public Page doChangeType(javax.servlet.http.HttpServletRequest req)
                  throws java.lang.Exception
changes the object type to the type defined in the changeType-Mask

Throws:
java.lang.Exception

setFolderProps

public Page setFolderProps(javax.servlet.http.HttpServletRequest req)
                    throws java.lang.Exception
set properties of folder

Throws:
java.lang.Exception

setDocProps

public Page setDocProps(javax.servlet.http.HttpServletRequest req)
                 throws java.lang.Exception
set properties of document

Throws:
java.lang.Exception

upward

public Page upward(javax.servlet.http.HttpServletRequest req)
            throws java.lang.Exception
go up one level

Throws:
java.lang.Exception

download

public Page download(javax.servlet.http.HttpServletRequest req)
              throws java.lang.Exception
Downloads the selected DocForms as zip-archive

Throws:
java.lang.Exception

getIconAndName

public static java.lang.String getIconAndName(DMSObject obj)
Returns the string representing the object to the user. Normally it returns the result of method obj.getName(), but when obj is a DocForm and it is configured that the extension should be shown, the name and the extension is returned


getIconAndNameAsArray

public static java.lang.Object[] getIconAndNameAsArray(DMSObject obj)

unlock

public Page unlock(javax.servlet.http.HttpServletRequest req)
            throws java.lang.Exception
Unlocks the passed document, but only the user is allowed to perform this action

Throws:
java.lang.Exception

undoCheckOut

public Page undoCheckOut(javax.servlet.http.HttpServletRequest req)
                  throws java.lang.Exception
Undoes the checkout of the passed document, but only the user is allowed to perform this action

Throws:
java.lang.Exception

getTree

public static Pair getTree(DMSFolder root)
                    throws java.lang.Exception
Returns the tree of which the passed folder is the root of.

Parameters:
root - the root folder of the desired tree
Returns:
a pair holding a structure which is designed to be used for class HTMLTree
Throws:
java.lang.Exception

getKeywordsAsString

public java.lang.String getKeywordsAsString(DMSObject obj)
                                     throws java.lang.Exception
Returns the keywords attached to the passed document

Parameters:
obj - the DMSObject which keywords are wanted
Returns:
a comma separated list of the keywords attached to the passed DMSObject
Throws:
java.lang.Exception

showAccess

public Page showAccess(javax.servlet.http.HttpServletRequest req)
                throws java.lang.Exception
Throws:
java.lang.Exception

showDocFrames

public Page showDocFrames(javax.servlet.http.HttpServletRequest req)
                   throws java.lang.Exception
Returns a page showing the content of the folder and the dms-toolbar.

Parameters:
req - must contain parameter 'folder' specifying the folder which content should be shown. The value of that parameter must be as follows: :
Returns:
a page showing the content of the folder and the dms-toolbar
Throws:
java.lang.Exception

dmsFunction

public Page dmsFunction(javax.servlet.http.HttpServletRequest req)
                 throws java.lang.Exception
Throws:
java.lang.Exception


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