Class DboSavedSearchProvider
java.lang.Object
com.webmethods.caf.faces.search.saved.DboSavedSearchProvider
- All Implemented Interfaces:
ISavedSearchProvider
,Serializable
Saved Search Provider based on DBO instances published into one of several
folders. Separate folders are maintained for each user as well as a global
common folder
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
protected static final String
protected IThingID
protected String
protected Map<String,
ISavedSearch> protected ISearchQueryFactory
protected static final String
protected static final String
-
Constructor Summary
ConstructorsConstructorDescriptionDboSavedSearchProvider
(ISearchQueryFactory searchQueryFactory, IThingID rootFolder) DboSavedSearchProvider
(ISearchQueryFactory searchQueryFactory, String rootSearchFolderName) -
Method Summary
Modifier and TypeMethodDescriptionaddOrUpdateSearch
(IURI principalURI, ISavedSearch savedSearch) Add or update a saved search storage DBO with the supplied search criteria returns IThingID of updated objectboolean
protected ISavedSearch
convertDboToSavedSearch
(IThingID dboThingID, boolean globalSearch) convertSavedSearchToPropertiesMap
(ISavedSearch savedSearch) protected IThingID
createFolder
(IThingID parentFolder, String folderName, IThingID folderOwner) protected IThingID
Creates and returns a new SavedSearch object for the SearchBar control.createSearch
(IURI principalURI, ISavedSearch savedSearch) void
deleteSavedSearch
(String savedSearchID) Deletes a saved searchvoid
deleteSavedSearch
(String savedSearchID, IURI principalURI) protected void
deleteSearch
(IURI principalURI, String searchID) protected IThingID
protected static IContainerPolicy
getContainerBizPolicy
(IThingID containerID) protected static IContainerMechanics
getContainerMech
(IThingID containerID) protected static IURI
getCurrentUserSavedSearchByID
(String searchID) protected IThingID
getOrCreateFolder
(IThingID parentFolder, String folderName, IThingID folderOwner) getSavedSearch
(String savedSearchID) Gets a saved searchgetSavedSearch
(String savedSearchID, IURI principalURI) getSavedSearchByID
(IURI principalURI, String searchName) Get array of all the saved searchesgetSavedSearches
(IURI principalURI) protected Map<String,
ISavedSearch> protected Map<String,
ISavedSearch> getSavedSearchesMap
(IURI principalURI) static IThing
getSavedSearchFromURI
(IURI searchURI) getSavedSearchThings
(IURI principalURI) getSearchContainer
(IURI principalURI) boolean
Returns whether is saved search provider supports public saved searchesgetUserSearchContainer
(IURI principalURI) boolean
Returns whether the saved search provider has any saved searchesvoid
saveSearch
(ISavedSearch savedSearch) Save a searchvoid
saveSearch
(ISavedSearch savedSearch, IURI principalURI) boolean
searchExists
(IURI principalURI, String searchName) void
setRootSavedSearchFolder
(IThingID savedSearchFolder) void
setSearchQueryFactory
(ISearchQueryFactory factory) Sets the factory that should be used to create search query objectsvoid
updateSavedSearch
(String savedSearchID, ISavedSearch savedSearch) Updates a saved searchvoid
updateSavedSearch
(String savedSearchID, ISavedSearch savedSearch, IURI principalURI)
-
Field Details
-
FOLDER_SYSTEM_ALIAS
- See Also:
-
FOLDER_SAVE_ROOT_ALIAS
- See Also:
-
FOLDER_SAVE_ROOT_NAME
- See Also:
-
m_searchQueryFactory
-
m_savedSearchesMap
-
fSavedSearchCaseInsensitiveNames
-
m_rootSavedSearchFolder
-
m_rootSearchFolderName
-
SAVED_SEARCH_DBO_XTYPE
- See Also:
-
GLOBAL_SEARCH_FOLDER_NAME
- See Also:
-
SEARCH_TERMS_PROPERTY
- See Also:
-
-
Constructor Details
-
DboSavedSearchProvider
-
DboSavedSearchProvider
-
-
Method Details
-
setSearchQueryFactory
Description copied from interface:ISavedSearchProvider
Sets the factory that should be used to create search query objects- Specified by:
setSearchQueryFactory
in interfaceISavedSearchProvider
- Parameters:
factory
- the factory to use to create search query objects
-
createSavedSearch
Creates and returns a new SavedSearch object for the SearchBar control. Sub-classes may override to provide an alternate ISavedSearch implementation.- Specified by:
createSavedSearch
in interfaceISavedSearchProvider
- Returns:
- Returns a new ISavedSearch object
-
hasSavedSearches
public boolean hasSavedSearches()Description copied from interface:ISavedSearchProvider
Returns whether the saved search provider has any saved searches- Specified by:
hasSavedSearches
in interfaceISavedSearchProvider
- Returns:
- true if saved searches are available, false otherwise
-
deleteSavedSearch
Description copied from interface:ISavedSearchProvider
Deletes a saved search- Specified by:
deleteSavedSearch
in interfaceISavedSearchProvider
- Parameters:
savedSearchID
- the id of the saved search to delete
-
deleteSavedSearch
-
getSavedSearch
Description copied from interface:ISavedSearchProvider
Gets a saved search- Specified by:
getSavedSearch
in interfaceISavedSearchProvider
- Parameters:
savedSearchID
- the id of the saved search to get- Returns:
- the saved search or null if it is not found
-
getSavedSearch
-
getSavedSearches
Description copied from interface:ISavedSearchProvider
Get array of all the saved searches- Specified by:
getSavedSearches
in interfaceISavedSearchProvider
- Returns:
- array of all saved searches
-
getSavedSearches
-
saveSearch
Description copied from interface:ISavedSearchProvider
Save a search- Specified by:
saveSearch
in interfaceISavedSearchProvider
- Parameters:
savedSearch
- the saved search to save
-
saveSearch
-
updateSavedSearch
Description copied from interface:ISavedSearchProvider
Updates a saved search- Specified by:
updateSavedSearch
in interfaceISavedSearchProvider
- Parameters:
savedSearchID
- the id of the saved search to updatesavedSearch
- the saved search to save
-
updateSavedSearch
-
getSupportsPublicSavedSearch
public boolean getSupportsPublicSavedSearch()Description copied from interface:ISavedSearchProvider
Returns whether is saved search provider supports public saved searches- Specified by:
getSupportsPublicSavedSearch
in interfaceISavedSearchProvider
- Returns:
- true if public saved searches are supported, false otherwise
-
getSavedSearchesMap
-
getSavedSearchesMap
-
getCurrentPrincipalURI
- Throws:
PortalException
-
getSearchContainer
- Throws:
PortalException
-
getGlobalSearchContainer
- Throws:
PortalException
-
getUserSearchContainer
- Throws:
PortalException
-
getSavedSearchThings
- Throws:
PortalException
-
getContainerMech
- Throws:
PortalException
-
getContainerBizPolicy
protected static IContainerPolicy getContainerBizPolicy(IThingID containerID) throws PortalException - Throws:
PortalException
-
getSavedSearchFromURI
- Throws:
PortalException
-
addOrUpdateSearch
public IThingID addOrUpdateSearch(IURI principalURI, ISavedSearch savedSearch) throws PortalException Add or update a saved search storage DBO with the supplied search criteria returns IThingID of updated object- Throws:
PortalException
-
createSearch
- Throws:
PortalException
-
getCurrentUserSavedSearchByID
- Throws:
PortalException
-
getSavedSearchByID
- Throws:
PortalException
-
searchExists
- Throws:
PortalException
-
deleteSearch
- Throws:
PortalException
-
convertDboToSavedSearch
protected ISavedSearch convertDboToSavedSearch(IThingID dboThingID, boolean globalSearch) throws PortalException - Throws:
PortalException
-
convertSavedSearchToPropertiesMap
-
getAdminThingID
-
getOrCreateFolder
protected IThingID getOrCreateFolder(IThingID parentFolder, String folderName, IThingID folderOwner) throws PortalException - Throws:
PortalException
-
createFolder
protected IThingID createFolder(IThingID parentFolder, String folderName, IThingID folderOwner) throws PortalException - Throws:
PortalException
-
createRootFolder
- Throws:
PortalException
-
getRootSavedSearchFolder
- Throws:
PortalException
-
setRootSavedSearchFolder
-
canUserSavePublic
public boolean canUserSavePublic()
-