com.groiss.dms
Class FolderForm

java.lang.Object
  extended by com.groiss.store.PersistentObject
      extended by com.dec.gi.sql.SQLObject
          extended by com.dec.gi.sql.LoggedObject
              extended by com.dec.avw.core.Form
                  extended by com.groiss.dms.FolderForm
All Implemented Interfaces:
com.dec.avw.acl.HasACL, com.dec.avw.core.OwnedObject, DMSFolder, DMSForm, DMSObject, KeyValuePair, HasLog, RightCheck, Exportable, HasSubclasses, OptimisticLocking, Persistent, java.io.Serializable, java.lang.Cloneable

public abstract class FolderForm
extends com.dec.avw.core.Form
implements DMSFolder

This class is the superclass of all form classes generated by the system to which documents can be attached.

See Also:
Serialized Form

Field Summary
 boolean bequestACL
          Determines if objects which are added to this folder should inherit the folders ACL.
 com.dec.avw.core.Dept dept
          Holds the department this folder may belong to
 com.dec.avw.core.StepInstance process
          Holds the process this folder may belong to
 
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.DMSFolder
PATH_SEPARATOR
 
Fields inherited from interface com.groiss.store.Exportable
emptyKeys
 
Constructor Summary
FolderForm()
           
 
Method Summary
 DMSObject add(DMSObject o)
          Adds the passed object to its content
 java.util.Collection addAll(java.util.Collection v)
          Adds all the objects of the passed collection to its content
 boolean bequestACL()
          Returns true if objects which are added to this folder should inherit the folders ACL, otherwise false is returned
 void bequestACL(boolean bequest)
          Sets if objects which are added to this folder should inherit the folders ACL.
 void clear()
          Removes the whole content of this folder
 boolean contains(DMSObject o)
          Returns true if the passed object is an element of this folder, false otherwise.
protected  com.dec.avw.core.Form getCopy(User user)
          Overridden to avoid that the process context will also be copied.
protected  java.lang.String getDefaultIcon()
          Returns the default icon for this object
 OrgUnit getDefaultOrgUnit()
          Returns the default organizational unit of this object.
 DMSFolderItemRel getEmptyFIR()
          Returns an empty relation object which may be used for database queries.
 DMSFolderItemRel getNewFIR(DMSFolder folder, DMSObject item, com.dec.avw.core.Server itemServer)
           
 OrgUnit getOrgUnit()
          Returns the organizational unit to which this folder belongs to
 DMSFolder getParentFolder()
          Returns the parent of this folder
 java.lang.String getPathToRoot()
          Returns a string determining the path from this folder up to its root (leaded and separated by java.io.File.separator).
 ProcessInstance getProcessContext()
          Returns the process to which this folder may belong to (directly or indirectly)
 java.lang.String getTableModel()
          Returns the full qualified name of the class which is used for displaying the content of this folder (must extend class DMSObjectTable).
 boolean isEmpty()
          Returns true if this folder is empty, false otherwise
 java.util.List listContents()
          Returns a list holding the whole content of this folder.
 DMSObject makeCopy(User user)
          Returns a copy of this object.
 DocumentVersion makeVersion(User user, java.lang.String description)
          Makes a version of all its documents (also those in subfolders).
 void onDelete()
          This method is called before the persistent object is deleted.
 void remove(DMSObject o)
          Removes the passed object from this folder
 void removeAll(java.util.Collection v)
          Removes all the objects in the collection from the folder
 void setOrgUnit(OrgUnit ou)
          Sets the organizational unit to which this folder belongs to
 void setProcessContext(ProcessInstance process)
          Sets the process to which this folder may belong to (directly or indirectly)
 int size()
          Returns the number of elements in this folder.
 
Methods inherited from class com.dec.avw.core.Form
attachNote, checkDelete, checkEdit, clone, createPrototypeCopy, deleteAttachedNotes, deleteVersion, deleteVersion, deleteVersions, disableAutoUpdate, enableAutoUpdate, fill, getAndLock, getChangedAt, getChangedBy, getContent, getContentForVersion, getCreatedAt, getCreatedBy, getDefaultDept, getDependent, getEventHandler, getField, getFormClassDir, getFormType, getHTMLClass, getIcon, getLatestVersion, getLatestVersion, getLocalClassName, getLocalObjectName, getMasterForm, getName, getName, getOwner, getProcess, getSelectFieldValue, getSize, getSubForm, getSubform, getSubforms, getTabledef, getTableName, getTask, getTemporaryVersion, getTemporaryVersion2, getTypeName, getVersionId, getVersionsForDistribution, getVersionsForDistribution, getViewer, hasAttachedNotes, hasAttributes, hasVersion, hasVersions, ignoreSubstitution, isAutoUpdate, isPrototype, isView, listAttachedNotes, listVersions, makeCopy, makeProcessFormVersion, makeVersion, mayDelete, mayInsert, mayUpdate, onInsert, onRead, onUpdate, removeNote, setField, setFormRelation, setFormType, setName, setNoteViewers, setTask, setVersionId, toListString, toString
 
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, 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.DMSObject
attachNote, getAcl, getChangedAt, getChangedBy, getCreatedAt, getCreatedBy, getIcon, getName, getOid, getTypeName, hasAttachedNotes, hasVersions, listAttachedNotes, listVersions, 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, onInsert, onRead, onUpdate, setFilled, setOid, setStore
 

Field Detail

dept

public com.dec.avw.core.Dept dept
Holds the department this folder may belong to


process

public com.dec.avw.core.StepInstance process
Holds the process this folder may belong to


bequestACL

public boolean bequestACL
Determines if objects which are added to this folder should inherit the folders ACL. If the objects have their own ACL it is considered to be stronger so it will not be replaced by the folders ACL

Constructor Detail

FolderForm

public FolderForm()
Method Detail

add

public DMSObject add(DMSObject o)
              throws java.lang.Exception
Description copied from interface: DMSFolder
Adds the passed object to its content

Specified by:
add in interface DMSFolder
Parameters:
o - the object to be added
Returns:
the added object
Throws:
java.lang.Exception

addAll

public java.util.Collection addAll(java.util.Collection v)
                            throws java.lang.Exception
Description copied from interface: DMSFolder
Adds all the objects of the passed collection to its content

Specified by:
addAll in interface DMSFolder
Parameters:
v - the collection holding the objects to be added
Returns:
the collection of added objects
Throws:
java.lang.Exception

clear

public void clear()
           throws java.lang.Exception
Description copied from interface: DMSFolder
Removes the whole content of this folder

Specified by:
clear in interface DMSFolder
Throws:
java.lang.Exception

contains

public boolean contains(DMSObject o)
Description copied from interface: DMSFolder
Returns true if the passed object is an element of this folder, false otherwise.

Specified by:
contains in interface DMSFolder

listContents

public java.util.List listContents()
Description copied from interface: DMSFolder
Returns a list holding the whole content of this folder.

Specified by:
listContents in interface DMSFolder

isEmpty

public boolean isEmpty()
Description copied from interface: DMSFolder
Returns true if this folder is empty, false otherwise

Specified by:
isEmpty in interface DMSFolder

remove

public void remove(DMSObject o)
            throws java.lang.Exception
Description copied from interface: DMSFolder
Removes the passed object from this folder

Specified by:
remove in interface DMSFolder
Throws:
java.lang.Exception

removeAll

public void removeAll(java.util.Collection v)
               throws java.lang.Exception
Description copied from interface: DMSFolder
Removes all the objects in the collection from the folder

Specified by:
removeAll in interface DMSFolder
Throws:
java.lang.Exception

size

public int size()
Description copied from interface: DMSFolder
Returns the number of elements in this folder.

Specified by:
size in interface DMSFolder

getOrgUnit

public OrgUnit getOrgUnit()
Description copied from interface: DMSFolder
Returns the organizational unit to which this folder belongs to

Specified by:
getOrgUnit in interface DMSFolder

getDefaultOrgUnit

public OrgUnit getDefaultOrgUnit()
Description copied from interface: DMSObject
Returns the default organizational unit of this object.

Specified by:
getDefaultOrgUnit in interface DMSObject
Overrides:
getDefaultOrgUnit in class com.dec.avw.core.Form

setOrgUnit

public void setOrgUnit(OrgUnit ou)
Description copied from interface: DMSFolder
Sets the organizational unit to which this folder belongs to

Specified by:
setOrgUnit in interface DMSFolder

getProcessContext

public ProcessInstance getProcessContext()
Description copied from interface: DMSFolder
Returns the process to which this folder may belong to (directly or indirectly)

Specified by:
getProcessContext in interface DMSFolder

setProcessContext

public void setProcessContext(ProcessInstance process)
Description copied from interface: DMSFolder
Sets the process to which this folder may belong to (directly or indirectly)

Specified by:
setProcessContext in interface DMSFolder

getDefaultIcon

protected java.lang.String getDefaultIcon()
Returns the default icon for this object

Overrides:
getDefaultIcon in class com.dec.avw.core.Form

getPathToRoot

public java.lang.String getPathToRoot()
Returns a string determining the path from this folder up to its root (leaded and separated by java.io.File.separator).

Specified by:
getPathToRoot in interface DMSFolder
Returns:
the path string

getParentFolder

public DMSFolder getParentFolder()
Returns the parent of this folder

Specified by:
getParentFolder in interface DMSFolder

getNewFIR

public final DMSFolderItemRel getNewFIR(DMSFolder folder,
                                        DMSObject item,
                                        com.dec.avw.core.Server itemServer)

getEmptyFIR

public final DMSFolderItemRel getEmptyFIR()
Returns an empty relation object which may be used for database queries.


makeCopy

public DMSObject makeCopy(User user)
                   throws java.lang.Exception
Description copied from interface: DMSObject
Returns a copy of this object.

Specified by:
makeCopy in interface DMSObject
Overrides:
makeCopy in class com.dec.avw.core.Form
Parameters:
user - the user who wants to make the copy.
Throws:
java.lang.Exception

getTableModel

public java.lang.String getTableModel()
Returns the full qualified name of the class which is used for displaying the content of this folder (must extend class DMSObjectTable). This default implementation returns the class defined by parameter avw.dms.standard_tablemodel in the server's configuration or DMSObjectTable if the parameter is not set.

Specified by:
getTableModel in interface DMSFolder

getCopy

protected com.dec.avw.core.Form getCopy(User user)
                                 throws java.lang.Exception
Overridden to avoid that the process context will also be copied.

Overrides:
getCopy in class com.dec.avw.core.Form
Throws:
java.lang.Exception

makeVersion

public DocumentVersion makeVersion(User user,
                                   java.lang.String description)
                            throws java.lang.Exception
Makes a version of all its documents (also those in subfolders). The folder object itself is not versioned, only its content. So the return value will be null.

Specified by:
makeVersion in interface DMSObject
Overrides:
makeVersion in class com.dec.avw.core.Form
Parameters:
user - the user who wants to make the version
description - the description text for this version
Throws:
java.lang.Exception

bequestACL

public boolean bequestACL()
Returns true if objects which are added to this folder should inherit the folders ACL, otherwise false is returned

Specified by:
bequestACL in interface DMSFolder

bequestACL

public void bequestACL(boolean bequest)
Sets if objects which are added to this folder should inherit the folders ACL.

Specified by:
bequestACL in interface DMSFolder

onDelete

public void onDelete()
              throws java.lang.Exception
Description copied from interface: Persistent
This method is called before the persistent object is deleted.

Specified by:
onDelete in interface Persistent
Overrides:
onDelete in class com.dec.avw.core.Form
Throws:
java.lang.Exception


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