org.alfresco.web.bean.search
Class AdvancedSearchDialog

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.search.AdvancedSearchDialog
All Implemented Interfaces:
java.io.Serializable, IDialogBean
Direct Known Subclasses:
EditSearchDialog, SaveSearchDialog

public class AdvancedSearchDialog
extends BaseDialogBean

Provides the form state and action event handling for the Advanced Search UI.

Integrates with the web-client ConfigService to retrieve configuration of custom meta-data searching fields. Custom fields can be configured to appear in the UI and they are they automatically added to the search query by this bean.

See Also:
Serialized Form

Field Summary
protected  SearchProperties properties
           
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, isFinished, navigator, parameters
 
Constructor Summary
AdvancedSearchDialog()
           
 
Method Summary
 void addCategory(javax.faces.event.ActionEvent event)
          Action handler called when the Add button is pressed to add the current Category selection
 void expandPanel(javax.faces.event.ActionEvent event)
          Save the state of the progressive panel that was expanded/collapsed
protected  java.lang.String finishImpl(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs the actual processing for the wizard.
 javax.faces.model.DataModel getCategoriesDataModel()
          Returns the properties for current categories JSF DataModel
 java.util.List getContentFormats()
           
 java.util.List getContentTypes()
           
 java.lang.String getFinishButtonLabel()
          Returns the label to use for the finish button
 java.util.List getFolderTypes()
           
protected  org.alfresco.service.cmr.repository.NodeRef getGlobalSearchesRef()
           
protected  org.alfresco.service.cmr.security.PermissionService getPermissionService()
           
 java.util.List getSavedSearches()
           
protected  org.alfresco.service.cmr.repository.NodeRef getUserSearchesRef()
           
 void init(java.util.Map parameters)
          Default constructor
 boolean isAllowEdit()
           
 void removeCategory(javax.faces.event.ActionEvent event)
          Action handler called when the Remove button is pressed to remove a category
 void reset(javax.faces.event.ActionEvent event)
          Handler to clear the advanced search screen form details
 void savedSearchModeChanged(javax.faces.event.ActionEvent event)
          Change the current saved searches list mode based on user selection
 java.lang.String saveEditSearch()
          Action handler called to initiate the saved search screen for Edit
 java.lang.String saveNewSearch()
          Action handler called to initiate the saved search screen for Create
 java.lang.String search()
          Handler to perform a search based on the current criteria
 void selectSearch(javax.faces.event.ActionEvent event)
          Action handler called when a saved search is selected by the user
 void setAllowEdit(boolean allowEdit)
           
 void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
           
 void setProperties(SearchProperties properties)
           
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
cancel, doPostCommitProcessing, finish, formatErrorMessage, getActionsConfigId, getActionsContext, getAdditionalButtons, getCancelButtonLabel, getCheckOutCheckInService, getContainerDescription, getContainerSubTitle, getContainerTitle, getDefaultCancelOutcome, getDefaultFinishOutcome, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, getFinishButtonDisabled, getMoreActionsConfigId, getNamespaceService, getNodeService, getRuleService, getSearchService, getTransactionService, isFinished, restored, setBrowseBean, setDictionaryService, setFileFolderService, setNamespaceService, setNavigator, setNodeService, setSearchService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

protected SearchProperties properties
Constructor Detail

AdvancedSearchDialog

public AdvancedSearchDialog()
Method Detail

init

public void init(java.util.Map parameters)
Default constructor

Specified by:
init in interface IDialogBean
Overrides:
init in class BaseDialogBean
Parameters:
parameters - Map of parameters for the dialog

setPermissionService

public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)

getPermissionService

protected org.alfresco.service.cmr.security.PermissionService getPermissionService()

setProperties

public void setProperties(SearchProperties properties)

isAllowEdit

public boolean isAllowEdit()
Returns:
Returns the allow Edit mode.

setAllowEdit

public void setAllowEdit(boolean allowEdit)
Parameters:
allowEdit - The allow Edit mode to set.

getCategoriesDataModel

public javax.faces.model.DataModel getCategoriesDataModel()
Returns the properties for current categories JSF DataModel

Returns:
JSF DataModel representing the current categories to search against

getContentTypes

public java.util.List getContentTypes()
Returns:
Returns a list of content object types to allow the user to select from

getFolderTypes

public java.util.List getFolderTypes()
Returns:
Returns a list of folder object types to allow the user to select from

getContentFormats

public java.util.List getContentFormats()
Returns:
Returns a list of content formats to allow the user to select from

reset

public void reset(javax.faces.event.ActionEvent event)
Handler to clear the advanced search screen form details


search

public java.lang.String search()
Handler to perform a search based on the current criteria


saveNewSearch

public java.lang.String saveNewSearch()
Action handler called to initiate the saved search screen for Create


saveEditSearch

public java.lang.String saveEditSearch()
Action handler called to initiate the saved search screen for Edit


getSavedSearches

public java.util.List getSavedSearches()
Returns:
list of saved searches as SelectItem objects

savedSearchModeChanged

public void savedSearchModeChanged(javax.faces.event.ActionEvent event)
Change the current saved searches list mode based on user selection


selectSearch

public void selectSearch(javax.faces.event.ActionEvent event)
Action handler called when a saved search is selected by the user


getUserSearchesRef

protected org.alfresco.service.cmr.repository.NodeRef getUserSearchesRef()
Returns:
the cached reference to the shared Saved Searches folder

getGlobalSearchesRef

protected org.alfresco.service.cmr.repository.NodeRef getGlobalSearchesRef()
Returns:
the cached reference to the global Saved Searches folder

addCategory

public void addCategory(javax.faces.event.ActionEvent event)
Action handler called when the Add button is pressed to add the current Category selection


removeCategory

public void removeCategory(javax.faces.event.ActionEvent event)
Action handler called when the Remove button is pressed to remove a category


expandPanel

public void expandPanel(javax.faces.event.ActionEvent event)
Save the state of the progressive panel that was expanded/collapsed


getFinishButtonLabel

public java.lang.String getFinishButtonLabel()
Description copied from interface: IDialogBean
Returns the label to use for the finish button

Specified by:
getFinishButtonLabel in interface IDialogBean
Overrides:
getFinishButtonLabel in class BaseDialogBean
Returns:
The finish button label

finishImpl

protected java.lang.String finishImpl(javax.faces.context.FacesContext context,
                                      java.lang.String outcome)
                               throws java.lang.Exception
Description copied from class: BaseDialogBean
Performs the actual processing for the wizard. NOTE: This method is called within the context of a transaction so no transaction handling is required

Specified by:
finishImpl in class BaseDialogBean
Parameters:
context - FacesContext
outcome - The default outcome
Returns:
The outcome
Throws:
java.lang.Exception


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.