com.logicaldoc.web.document
Class DocumentsRecordsManager

java.lang.Object
  extended by com.logicaldoc.web.components.SortableList
      extended by com.logicaldoc.web.document.DocumentsRecordsManager

public class DocumentsRecordsManager
extends SortableList

The DocumentsRecordsManager class is responsible for constructing the list of DocumentRecord beans which will be bound to a ice:dataTable JSF component.

Large data sets could be handle by adding a ice:dataPaginator. Alternatively the dataTable could also be hidden and the dataTable could be added to scrollable ice:panelGroup.

Since:
3.0
Author:
Marco Meschieri - Logical Objects

Field Summary
static java.lang.String CHILD_INDENT_STYLE_CLASS
           
static java.lang.String CHILD_ROW_STYLE_CLASS
           
static java.lang.String CONTRACT_IMAGE
           
static java.lang.String EXPAND_IMAGE
           
static java.lang.String GROUP_INDENT_STYLE_CLASS
           
static java.lang.String GROUP_ROW_STYLE_CLASS
           
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
DocumentsRecordsManager()
           
 
Method Summary
 java.lang.String back()
           
 java.lang.String copyToClipboard()
          Places all selected documents into the clipboard and set the guiRequest to "copy"
 java.lang.String copyToFolder()
          Copy documents inside the clipboard into the current directory
 java.lang.String createBookmarks()
           
 java.lang.String cutToClipboard()
          Places all selected documents into the clipboard and set the guiRequest to "cut"
 java.lang.String deleteSelected()
          Deletes all selected documents.
 void dispose()
          Cleans up the resources used by this class.
 DocumentRecord findDRinDocuments(long docId)
           
 java.util.Set<DocumentRecord> getClipboard()
           
 int getClipboardSize()
           
 int getCount()
           
 int getDisplayedRows()
           
 java.util.List<DocumentRecord> getDocuments()
          Gets the list of DocumentRecord which will be used by the ice:dataTable component.
 java.lang.String getGuiRequest()
           
 java.util.List<DocumentRecord> getLastDocs()
          Retrieves the list of last accessed documents from the database
 java.lang.String getOperationComment()
           
 javax.faces.component.UIData getPanels()
           
 java.util.Set<DocumentRecord> getSelection()
           
 javax.faces.component.UIData getTable()
           
protected  boolean isDefaultAscending(java.lang.String sortColumn)
          Determines the sort order.
 boolean isIndexable()
           
 boolean isMultipleSelection()
           
 boolean isSelectedAll()
           
 java.lang.String markSelectionAsImmutable()
          Marks as immutable all selected documents
 void move()
          Move or copy documents inside the clipboard into the current directory checking if the user have clicked on the 'cut' button or on the 'copy' button
 java.lang.String moveToFolder()
          Move documents inside the clipboard into the current directory
 void pageChange(javax.faces.event.ActionEvent event)
           
 java.lang.String pasteAsShortcut()
          Copy documents inside the clipboard into the current directory as alias
 void refresh()
           
 void refresh(long docId)
           
 java.lang.String requestImmutabilityComment()
          Shows the document immutability form
 java.lang.String saveIndexOption()
          Marks as indexable/unindexable all selected documents
 java.lang.String selectAll()
           
 void selectDirectory(long directoryId)
          Changes the currently selected directory and updates the documents list.
protected  void selectHighlightedDocument(long docId)
           
 void selectRow(javax.faces.event.ActionEvent event)
           
 void selectRow(com.icesoft.faces.component.ext.RowSelectorEvent e)
           
 void setDisplayedRows(int displayedRows)
           
 void setIndexable(boolean indexable)
           
 void setMultipleSelection(boolean multiple)
           
 void setOperationComment(java.lang.String operationComment)
           
 void setPanels(javax.faces.component.UIData panels)
           
 void setSelectedAll(boolean selectedAll)
           
 void setTable(javax.faces.component.UIData table)
           
 java.lang.String showIndexOptions()
          Shows the document unindexable options page
protected  void sort(java.lang.String column, boolean ascending)
          Sorts the list of DocumentRecord data.
 java.lang.String startZipUpload()
          Shows the zip upload form
 java.lang.String unselectAll()
           
 void unselectRow(javax.faces.event.ActionEvent event)
           
 java.lang.String uploadZip()
          Imports the zip content in the current directory
 
Methods inherited from class com.logicaldoc.web.components.SortableList
getSortColumn, isAscending, setAscending, setSortColumn, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

GROUP_INDENT_STYLE_CLASS

public static final java.lang.String GROUP_INDENT_STYLE_CLASS
See Also:
Constant Field Values

GROUP_ROW_STYLE_CLASS

public static final java.lang.String GROUP_ROW_STYLE_CLASS
See Also:
Constant Field Values

CHILD_INDENT_STYLE_CLASS

public static final java.lang.String CHILD_INDENT_STYLE_CLASS
See Also:
Constant Field Values

CHILD_ROW_STYLE_CLASS

public static final java.lang.String CHILD_ROW_STYLE_CLASS
See Also:
Constant Field Values

CONTRACT_IMAGE

public static final java.lang.String CONTRACT_IMAGE
See Also:
Constant Field Values

EXPAND_IMAGE

public static final java.lang.String EXPAND_IMAGE
See Also:
Constant Field Values
Constructor Detail

DocumentsRecordsManager

public DocumentsRecordsManager()
Method Detail

selectDirectory

public void selectDirectory(long directoryId)
Changes the currently selected directory and updates the documents list.

Parameters:
directoryId -

getOperationComment

public java.lang.String getOperationComment()

setOperationComment

public void setOperationComment(java.lang.String operationComment)

dispose

public void dispose()
Cleans up the resources used by this class. This method could be called when a session destroyed event is called.


getDocuments

public java.util.List<DocumentRecord> getDocuments()
Gets the list of DocumentRecord which will be used by the ice:dataTable component.

Returns:
array list of parent DocumentRecord

isMultipleSelection

public boolean isMultipleSelection()

getClipboard

public java.util.Set<DocumentRecord> getClipboard()

setMultipleSelection

public void setMultipleSelection(boolean multiple)

selectRow

public void selectRow(com.icesoft.faces.component.ext.RowSelectorEvent e)

selectRow

public void selectRow(javax.faces.event.ActionEvent event)

unselectRow

public void unselectRow(javax.faces.event.ActionEvent event)

findDRinDocuments

public DocumentRecord findDRinDocuments(long docId)

refresh

public void refresh()

refresh

public void refresh(long docId)

getClipboardSize

public int getClipboardSize()

getCount

public int getCount()

deleteSelected

public java.lang.String deleteSelected()
Deletes all selected documents. Only not immutable and not locked document can be deleted.


requestImmutabilityComment

public java.lang.String requestImmutabilityComment()
Shows the document immutability form


markSelectionAsImmutable

public java.lang.String markSelectionAsImmutable()
Marks as immutable all selected documents


cutToClipboard

public java.lang.String cutToClipboard()
Places all selected documents into the clipboard and set the guiRequest to "cut"


copyToClipboard

public java.lang.String copyToClipboard()
Places all selected documents into the clipboard and set the guiRequest to "copy"


move

public void move()
Move or copy documents inside the clipboard into the current directory checking if the user have clicked on the 'cut' button or on the 'copy' button


moveToFolder

public java.lang.String moveToFolder()
Move documents inside the clipboard into the current directory


pageChange

public void pageChange(javax.faces.event.ActionEvent event)

copyToFolder

public java.lang.String copyToFolder()
Copy documents inside the clipboard into the current directory


startZipUpload

public java.lang.String startZipUpload()
Shows the zip upload form


uploadZip

public java.lang.String uploadZip()
Imports the zip content in the current directory


pasteAsShortcut

public java.lang.String pasteAsShortcut()
Copy documents inside the clipboard into the current directory as alias


getLastDocs

public java.util.List<DocumentRecord> getLastDocs()
Retrieves the list of last accessed documents from the database


createBookmarks

public java.lang.String createBookmarks()

selectHighlightedDocument

protected void selectHighlightedDocument(long docId)

selectAll

public java.lang.String selectAll()

unselectAll

public java.lang.String unselectAll()

showIndexOptions

public java.lang.String showIndexOptions()
Shows the document unindexable options page


saveIndexOption

public java.lang.String saveIndexOption()
Marks as indexable/unindexable all selected documents


isSelectedAll

public boolean isSelectedAll()

getDisplayedRows

public int getDisplayedRows()

setDisplayedRows

public void setDisplayedRows(int displayedRows)

isDefaultAscending

protected boolean isDefaultAscending(java.lang.String sortColumn)
Determines the sort order.

Specified by:
isDefaultAscending in class SortableList
Parameters:
sortColumn - to sort by.
Returns:
whether sort order is ascending or descending.

sort

protected void sort(java.lang.String column,
                    boolean ascending)
Sorts the list of DocumentRecord data.

Specified by:
sort in class SortableList

setSelectedAll

public void setSelectedAll(boolean selectedAll)

back

public java.lang.String back()

getSelection

public java.util.Set<DocumentRecord> getSelection()

getGuiRequest

public java.lang.String getGuiRequest()

getPanels

public javax.faces.component.UIData getPanels()

setPanels

public void setPanels(javax.faces.component.UIData panels)

getTable

public javax.faces.component.UIData getTable()

setTable

public void setTable(javax.faces.component.UIData table)

isIndexable

public boolean isIndexable()

setIndexable

public void setIndexable(boolean indexable)


Copyright © 2008-2010 Logical Objects. All Rights Reserved.