com.actuate.activeportal.forms
Class FileListActionForm

java.lang.Object
  extended by org.apache.struts.action.ActionForm
      extended by com.actuate.activeportal.forms.BaseActionForm
          extended by com.actuate.activeportal.forms.GeneralFilterActionForm
              extended by com.actuate.activeportal.forms.FileListActionForm
All Implemented Interfaces:
IContentList, java.io.Serializable
Direct Known Subclasses:
SearchFilesActionForm

public class FileListActionForm
extends GeneralFilterActionForm
implements IContentList

This form is used for retrieving the list of files that are displayed in the file list. The form manages setting of filters and after the query is executed on the server the action updates this form with the list of objects retrieved from the server.

Author:
Actuate Corporation
See Also:
Serialized Form

Constructor Summary
FileListActionForm()
           
 
Method Summary
 void addCategory(java.lang.String _categoryName, java.util.Collection items)
          This method is called by the action to add all items belonging to a particular category into the form.
 void fixUTF8()
          This method is called to convert the data submitted by the browser to a java string value.
 java.lang.Object[] getArray(java.lang.String _categoryName)
           This method should return the list of objects whose properties are to be displayed.
 java.lang.String[] getCategories()
           This method is used by the categories view to retrieve the list of categories it is supposed to display.
 java.util.Collection getCollection(java.lang.String _categoryName)
           This method should return the list of objects whose properties are to be displayed.
 java.lang.String getFolderId()
          Returns the id of the folder that is currently being displayed if available
 java.lang.String getFolderName()
          Returns the name of the folder whose contents are currently being displayed.
 java.util.Collection getFolders()
          Returns the list of folders that have been set by calling the setFolders method
 boolean isEmpty()
          This method is called by the views to determine whether the list is empty.
 boolean isShowLatestQueries()
          Returns a boolean indicating whether only the latest information objects are supposed to be displayed.
 void setAllItems(java.lang.Object[] items)
          In case the view is not a categorized view, this method is called by the action to keep all the items in one single array.
 void setFolderId(java.lang.String string)
          Called to set the id of the folder that is currently being displayed.
 void setFolderName(java.lang.String string)
          Called to set the name of the folder whose contents are currently being displayed.
 void setFolders(java.util.Collection c)
          This method is called in case of the tree view skin since it always needs the folder list for the left frame irrespective of the filter applied on the content frame.
 void setShowLatestQueries(boolean b)
          If this is set to true then only the latest information objects will be shown.
 
Methods inherited from class com.actuate.activeportal.forms.GeneralFilterActionForm
getCompletedFilter, getFilter, getPendingFilter, getRunningFilter, getScheduledFilter, getWaitingFilter, isApplyFilter, isCbFail, isCbSuccess, isFilterEnabled, isOnlyLatest, isResetFilter, isShowDocuments, isShowExecutables, isShowFolders, reset, setApplyFilter, setCbFail, setCbSuccess, setCompletedFilter, setFilter, setFilterEnabled, setOnlyLatest, setPendingFilter, setResetFilter, setRunningFilter, setScheduledFilter, setShowDocuments, setShowExecutables, setShowFolders, setWaitingFilter
 
Methods inherited from class com.actuate.activeportal.forms.BaseActionForm
isPostback, setPostback
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileListActionForm

public FileListActionForm()
Method Detail

getCategories

public java.lang.String[] getCategories()
Description copied from interface: IContentList

This method is used by the categories view to retrieve the list of categories it is supposed to display.

For e.g.
The file list implementation will return
{folders}
{documents}
{executables}
etc....

Specified by:
getCategories in interface IContentList
Returns:
The list of category names
See Also:
IContentList.getCategories()

getArray

public java.lang.Object[] getArray(java.lang.String _categoryName)
Description copied from interface: IContentList

This method should return the list of objects whose properties are to be displayed.

For e.g. If the file list is being displayed then each object in the array will be an instance of com.actuate.schemas.File
If this method returns null then the getCollection() method will be called.
This method is called with the category name as a parameter. Bear in mind that this can be null if the view is not the category view; in such a case the entire list should normally be returned.

Specified by:
getArray in interface IContentList
Parameters:
_categoryName - The category which is being displayed currently
Returns:
The list of objects to display
See Also:
IContentList.getArray(java.lang.String)

getCollection

public java.util.Collection getCollection(java.lang.String _categoryName)
Description copied from interface: IContentList

This method should return the list of objects whose properties are to be displayed.

For e.g. If the file list is being displayed then each object in the array will be an instance of com.actuate.schemas.File If this method returns null then the getCollection() method will be called. This method is called with the category name as a parameter. Bear in mind that this can be null if the view is not the category view; in such a case the entire list should normally be returned.

Specified by:
getCollection in interface IContentList
Parameters:
_categoryName - The category which is being displayed currently
Returns:
The collection of objects to display
See Also:
IContentList.getCollection(java.lang.String)

isEmpty

public boolean isEmpty()
Description copied from interface: IContentList
This method is called by the views to determine whether the list is empty. The implementing class needs to return a true if there are no items available

Specified by:
isEmpty in interface IContentList
Returns:
A boolean indicating whether there are any items available to display
See Also:
IContentList.isEmpty()

addCategory

public void addCategory(java.lang.String _categoryName,
                        java.util.Collection items)
This method is called by the action to add all items belonging to a particular category into the form. Categories are the sections shown in the categories view

Parameters:
_categoryName - The name of the category to be added
items - The list of items belonging to the category.

setAllItems

public void setAllItems(java.lang.Object[] items)
In case the view is not a categorized view, this method is called by the action to keep all the items in one single array.

Parameters:
items - All the list of files that have been retrieved by the action

getFolders

public java.util.Collection getFolders()
Returns the list of folders that have been set by calling the setFolders method

Returns:
the list of folders

setFolders

public void setFolders(java.util.Collection c)
This method is called in case of the tree view skin since it always needs the folder list for the left frame irrespective of the filter applied on the content frame. It always keeps a list of folders in the form so that the left navigation frame can display the tree.

Parameters:
c - A collection containing the list of folders

getFolderId

public java.lang.String getFolderId()
Returns the id of the folder that is currently being displayed if available

Returns:
The id of the folder or null if not set by the framework

getFolderName

public java.lang.String getFolderName()
Returns the name of the folder whose contents are currently being displayed. If the id is present then this may be null.

Returns:
The name of the folder is available or null if not present.

setFolderId

public void setFolderId(java.lang.String string)
Called to set the id of the folder that is currently being displayed.

Parameters:
string - The id of the folder.

setFolderName

public void setFolderName(java.lang.String string)
Called to set the name of the folder whose contents are currently being displayed.

Parameters:
string - The name of the folder

fixUTF8

public void fixUTF8()
This method is called to convert the data submitted by the browser to a java string value.

Overrides:
fixUTF8 in class BaseActionForm

isShowLatestQueries

public boolean isShowLatestQueries()
Returns a boolean indicating whether only the latest information objects are supposed to be displayed. If this is false then all versions of information objects are returned.

Returns:
A boolean indicating whether all information objects are displayed or not.

setShowLatestQueries

public void setShowLatestQueries(boolean b)
If this is set to true then only the latest information objects will be shown. if this is false then all versions of information objects will be shown.

Parameters:
b - A boolean indicating whether the latest versions of queries should be shown or all versions should be shown