|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.store.PersistentObject
com.dec.gi.sql.SQLObject
com.dec.gi.sql.LoggedObject
com.dec.avw.core.Form
com.groiss.dms.DocForm
public abstract class DocForm
This class is the superclass of all form classes generated by the system to which documents can be attached.
| Field Summary | |
|---|---|
byte[] |
avwcontent
the content of the document |
long |
avwcontentSize
the size of the document |
java.lang.String |
avwextension
extension of the document |
byte[] |
avwmessageDigest
Holds the message digest for the content of this document. |
int |
avwstatus
status of the document (IN or OUT) |
com.dec.avw.core.User |
avwusedBy
user, who edits the document |
static int |
LOCAL
Deprecated. |
| Fields inherited from class com.dec.avw.core.Form |
|---|
AUTO_VERSION_TEXT, avwchangedAt, avwchangedBy, avwcreatedAt, avwcreatedBy, formtype, loadFormType, loadNotes, noteViewers, task |
| Fields inherited from class com.dec.gi.sql.LoggedObject |
|---|
acl, canDeleteAlreadyChecked, changetime, NO_CHECK_DEFFERRED, transactionId |
| Fields inherited from class com.dec.gi.sql.SQLObject |
|---|
DO_BLIND |
| Fields inherited from class com.groiss.store.PersistentObject |
|---|
filled, oid, store |
| Fields inherited from interface com.groiss.dms.DMSDocForm |
|---|
IN, LOCKED, OUT |
| Fields inherited from interface com.groiss.store.Exportable |
|---|
emptyKeys |
| Constructor Summary | |
|---|---|
DocForm()
|
|
| Method Summary | |
|---|---|
void |
checkIn(User user)
Checks the document in |
void |
checkIn(User user,
byte[] barr)
Checks the document in |
void |
checkIn(User user,
java.io.InputStream is)
Checks the document in |
void |
checkIn(User user,
java.lang.String tmpFile)
Checks the document in |
void |
checkIn(User user,
java.lang.String tmpFile,
boolean deleteTmpFile)
Checks the document in |
static void |
checkInRemote(DocForm doc)
Check in from remote. |
java.lang.String |
checkOut(User user)
Check out the attached document and write it to the file system. |
java.lang.String |
checkOut(User u,
java.lang.String file)
Check out a document. |
static DocForm |
checkOutRemote(long doc,
java.lang.String className,
long user,
long tid)
check out on start server |
void |
delete()
Must override delete-method to guarantee that the associated document is also deleted. |
static java.lang.String |
getCheckOutDir(com.dec.avw.core.StepInstance process)
Returns the check out directory for the passed process |
java.lang.String |
getCheckOutFilePath()
Returns the path of the check out directory for this document |
byte[] |
getContent()
Returns the content of this document |
protected com.dec.avw.core.Form |
getCopy(User user)
Creates a copy of this document |
java.lang.String |
getDefaultIcon()
Returns the string determining the file holding the icon for this document |
java.lang.String |
getExtension()
Returns the extension of the attached document |
java.lang.String |
getFullName()
Returns the full name of the document which is the name and the extension separated by a dot |
byte[] |
getMessageDigest()
Returns the message digest of the content of this document. |
long |
getSize()
Get the size of the document. |
int |
getStatus()
Get the status of the document. |
User |
getUsedBy()
Get the user who has locked or checked out the document. |
boolean |
isCheckedOut()
Returns if this document is currently checked out |
boolean |
isLocked()
Returns if this document is locked |
void |
lock(User user)
Locks this document. |
void |
onInsert()
Inserts this document and its content |
void |
revert()
Performs an undo of checkout by setting status to IN and usedBy to Null. |
void |
revert(boolean deleteFile)
Performs an undo of checkout by setting status to IN and usedBy to Null. |
void |
saveContent(User user)
|
void |
saveToLocal(java.io.OutputStream os)
Write this document to the passed stream. |
void |
saveVersionToLocal(long version,
java.io.OutputStream os)
Write the specified document version to the passed stream. |
void |
setContent()
write the content into a byte buffer |
void |
setExtension(java.lang.String extension)
Sets the extension of the attached document |
java.lang.String |
toListString()
|
java.lang.String |
toString()
|
void |
undoCheckOut()
Undoes the check out of the document |
void |
unlock()
Unlocks this document. |
void |
updateContent()
Updates the content of this document |
void |
write(java.io.OutputStream os)
Write the document to the file system. |
| Methods inherited from class com.dec.avw.core.Form |
|---|
attachNote, checkDelete, checkEdit, clone, createPrototypeCopy, deleteAttachedNotes, deleteVersion, deleteVersion, deleteVersions, disableAutoUpdate, enableAutoUpdate, fill, getAndLock, getChangedAt, getChangedBy, getContentForVersion, getCreatedAt, getCreatedBy, getDefaultDept, getDefaultOrgUnit, getDependent, getEventHandler, getField, getFormClassDir, getFormType, getHTMLClass, getIcon, getLatestVersion, getLatestVersion, getLocalClassName, getLocalObjectName, getMasterForm, getName, getName, getOwner, getProcess, getSelectFieldValue, getSubForm, getSubform, getSubforms, getTabledef, getTableName, getTask, getTemporaryVersion, getTemporaryVersion2, getTypeName, getVersionId, getVersionsForDistribution, getVersionsForDistribution, getViewer, hasAttachedNotes, hasAttributes, hasVersion, hasVersions, ignoreSubstitution, isAutoUpdate, isPrototype, isView, listAttachedNotes, listVersions, makeCopy, makeCopy, makeProcessFormVersion, makeVersion, makeVersion, mayDelete, mayInsert, mayUpdate, onDelete, onRead, onUpdate, removeNote, setField, setFormRelation, setFormType, setName, setNoteViewers, setTask, setVersionId |
| Methods inherited from class com.dec.gi.sql.LoggedObject |
|---|
canDelete, delete, deleteExtensions, deleteNoCheck, getAcl, getAllVersions, getExtensions, getExtensionsWithDummies, getLogInfo, getTransactionId, getVersion, getVersion, ignoreFields, increaseTransactionId, insert, insertNoCheck, makeVersion, setAcl, setTransactionId, toString, update, updateAt, updateNoCheck, updateNoVersioning |
| Methods inherited from class com.dec.gi.sql.SQLObject |
|---|
addRequiredObjects, beforeImport, count, count, dbAttrs, dbFieldString, delete, delete, delete, executeStatement, executeStatement, exportAsElements, get, get, get, get, get2, getCache, getFieldDescriptor, getFieldName, getKey, getKeys, getLoggingContext, getNoCache, getStore, getTableDefinition, getValue, getValueText, hasRows, hasRows, inDatabase, insert, insertBlind, isValid, list, list, list, list, list2, list2, retrieveLoggingContextByOid, setEmpty, setFromDB, setNewOid, setOid, setValues, setValues, table, table, update, updateBlind |
| Methods inherited from class com.groiss.store.PersistentObject |
|---|
dbFields, equals, getOid, hashCode, isFilled, setFilled, setOid, setStore |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.groiss.dms.DMSDocForm |
|---|
hasAttributes |
| Methods inherited from interface com.groiss.dms.DMSForm |
|---|
getField, getFormType, setField |
| Methods inherited from interface com.groiss.dms.DMSObject |
|---|
attachNote, getAcl, getChangedAt, getChangedBy, getCreatedAt, getCreatedBy, getDefaultOrgUnit, getIcon, getName, getOid, getTypeName, hasAttachedNotes, hasVersions, listAttachedNotes, listVersions, makeCopy, makeVersion, removeNote, setAcl, setName |
| Methods inherited from interface com.dec.avw.core.OwnedObject |
|---|
getOwner, ignoreSubstitution |
| Methods inherited from interface com.groiss.store.Persistent |
|---|
dbFields, getStore, getTableName, isFilled, onDelete, onRead, onUpdate, setFilled, setOid, setStore |
| Methods inherited from interface com.groiss.org.HasLog |
|---|
getVersionId, setVersionId |
| Field Detail |
|---|
public static final int LOCAL
public java.lang.String avwextension
public int avwstatus
public com.dec.avw.core.User avwusedBy
public long avwcontentSize
public byte[] avwmessageDigest
public volatile byte[] avwcontent
| Constructor Detail |
|---|
public DocForm()
| Method Detail |
|---|
public void delete()
throws java.lang.Exception
delete in class com.dec.gi.sql.SQLObjectjava.lang.Exception
protected com.dec.avw.core.Form getCopy(User user)
throws java.lang.Exception
getCopy in class com.dec.avw.core.Formjava.lang.Exception
public byte[] getContent()
throws java.lang.Exception
getContent in interface DMSDocFormgetContent in class com.dec.avw.core.Formjava.lang.Exceptionpublic java.lang.String getDefaultIcon()
getDefaultIcon in class com.dec.avw.core.Formpublic long getSize()
getSize in interface DMSDocFormgetSize in class com.dec.avw.core.Form
public void checkIn(User user)
throws java.lang.Exception
user - the user who wants to check in.
java.lang.Exception
public void checkIn(User user,
java.lang.String tmpFile)
throws java.lang.Exception
user - the user who wants to check in.tmpFile - the file (on the server) to check in.
java.lang.Exception
public void checkIn(User user,
java.lang.String tmpFile,
boolean deleteTmpFile)
throws java.lang.Exception
user - the user who wants to check in.tmpFile - the file (on the server) to check in.deleteTmpFile - if true the passed tmpfile is deleted after the check in
java.lang.Exception
public void checkIn(User user,
java.io.InputStream is)
throws java.lang.Exception
checkIn in interface DMSDocFormuser - the user who wants to check in.is - the inputstream from which the content of the document is read.
java.lang.Exception
public void checkIn(User user,
byte[] barr)
throws java.lang.Exception
DMSDocForm
checkIn in interface DMSDocFormuser - the user who performs this actionbarr - a byte array holding the content of the document
java.lang.Exception
public void saveContent(User user)
throws java.lang.Exception
java.lang.Exception
public java.lang.String checkOut(User user)
throws java.lang.Exception
checkOut in interface DMSDocFormuser - the user performing the action.
java.lang.Exception
public java.lang.String checkOut(User u,
java.lang.String file)
throws java.lang.Exception
u - the user performing the action.file - the pathname of the temporary file where the document is written
java.lang.Exception
public static java.lang.String getCheckOutDir(com.dec.avw.core.StepInstance process)
throws java.lang.Exception
java.lang.Exception
public java.lang.String getCheckOutFilePath()
throws java.lang.Exception
java.lang.Exception
public void revert()
throws java.lang.Exception
java.lang.Exception
public void revert(boolean deleteFile)
throws java.lang.Exception
deleteFile - if true the file written to the file system by checkout will be deleted, otherwise not
java.lang.Exceptionpublic java.lang.String getFullName()
public void write(java.io.OutputStream os)
throws java.lang.Exception
os - the output stream to write on
java.lang.Exceptionpublic boolean isCheckedOut()
public User getUsedBy()
getUsedBy in interface DMSDocForm
public void saveToLocal(java.io.OutputStream os)
throws java.lang.Exception
os - the output stream to write on
java.lang.Exception
public void saveVersionToLocal(long version,
java.io.OutputStream os)
throws java.lang.Exception
version - the oid of the version which should be writtenos - the output stream to write on
java.lang.Exceptionpublic java.lang.String getExtension()
getExtension in interface DMSDocFormpublic void setExtension(java.lang.String extension)
public int getStatus()
getStatus in interface DMSDocFormpublic byte[] getMessageDigest()
public void setContent()
throws java.lang.Exception
java.lang.Exception
public static void checkInRemote(DocForm doc)
throws java.lang.Exception
java.lang.Exception
public void onInsert()
throws java.lang.Exception
onInsert in interface PersistentonInsert in class com.dec.avw.core.Formjava.lang.Exception
public void updateContent()
throws java.lang.Exception
java.lang.Exception
public static DocForm checkOutRemote(long doc,
java.lang.String className,
long user,
long tid)
throws java.lang.Exception
java.lang.Exception
public void lock(User user)
throws java.lang.Exception
lock in interface DMSDocFormuser - the user who performs this action
java.lang.Exception
public void unlock()
throws java.lang.Exception
unlock in interface DMSDocFormjava.lang.Exceptionpublic boolean isLocked()
public java.lang.String toString()
toString in class com.dec.avw.core.Formpublic java.lang.String toListString()
toListString in class com.dec.avw.core.Form
public void undoCheckOut()
throws java.lang.Exception
DMSDocForm
undoCheckOut in interface DMSDocFormjava.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||