public class DboSavedSearchProvider extends Object implements ISavedSearchProvider, Serializable
Modifier and Type | Field and Description |
---|---|
protected static String |
FOLDER_SAVE_ROOT_ALIAS |
protected static String |
FOLDER_SAVE_ROOT_NAME |
protected static String |
FOLDER_SYSTEM_ALIAS |
protected Map<String,String> |
fSavedSearchCaseInsensitiveNames |
protected static String |
GLOBAL_SEARCH_FOLDER_NAME |
protected IThingID |
m_rootSavedSearchFolder |
protected String |
m_rootSearchFolderName |
protected Map<String,ISavedSearch> |
m_savedSearchesMap |
protected ISearchQueryFactory |
m_searchQueryFactory |
protected static String |
SAVED_SEARCH_DBO_XTYPE |
protected static String |
SEARCH_TERMS_PROPERTY |
Constructor and Description |
---|
DboSavedSearchProvider(ISearchQueryFactory searchQueryFactory,
IThingID rootFolder) |
DboSavedSearchProvider(ISearchQueryFactory searchQueryFactory,
String rootSearchFolderName) |
Modifier and Type | Method and Description |
---|---|
IThingID |
addOrUpdateSearch(IURI principalURI,
ISavedSearch savedSearch)
Add or update a saved search storage DBO with the supplied search
criteria returns IThingID of updated object
|
boolean |
canUserSavePublic() |
protected ISavedSearch |
convertDboToSavedSearch(IThingID dboThingID,
boolean globalSearch) |
protected Map<String,Object> |
convertSavedSearchToPropertiesMap(ISavedSearch savedSearch) |
protected IThingID |
createFolder(IThingID parentFolder,
String folderName,
IThingID folderOwner) |
protected IThingID |
createRootFolder() |
ISavedSearch |
createSavedSearch()
Creates and returns a new SavedSearch object for the SearchBar control.
|
IThingID |
createSearch(IURI principalURI,
ISavedSearch savedSearch) |
void |
deleteSavedSearch(String savedSearchID)
Deletes a saved search
|
void |
deleteSavedSearch(String savedSearchID,
IURI principalURI) |
protected void |
deleteSearch(IURI principalURI,
String searchID) |
protected IThingID |
getAdminThingID() |
protected static IContainerPolicy |
getContainerBizPolicy(IThingID containerID) |
protected static IContainerMechanics |
getContainerMech(IThingID containerID) |
protected static IURI |
getCurrentPrincipalURI() |
IThingID |
getCurrentUserSavedSearchByID(String searchID) |
IThingID |
getGlobalSearchContainer() |
protected IThingID |
getOrCreateFolder(IThingID parentFolder,
String folderName,
IThingID folderOwner) |
IThingID |
getRootSavedSearchFolder() |
ISavedSearch |
getSavedSearch(String savedSearchID)
Gets a saved search
|
ISavedSearch |
getSavedSearch(String savedSearchID,
IURI principalURI) |
IThingID |
getSavedSearchByID(IURI principalURI,
String searchName) |
ISavedSearch[] |
getSavedSearches()
Get array of all the saved searches
|
ISavedSearch[] |
getSavedSearches(IURI principalURI) |
protected Map<String,ISavedSearch> |
getSavedSearchesMap() |
protected Map<String,ISavedSearch> |
getSavedSearchesMap(IURI principalURI) |
static IThing |
getSavedSearchFromURI(IURI searchURI) |
IThingIDList |
getSavedSearchThings(IURI principalURI) |
IThingID |
getSearchContainer(IURI principalURI) |
boolean |
getSupportsPublicSavedSearch()
Returns whether is saved search provider supports
public saved searches
|
IThingID |
getUserSearchContainer(IURI principalURI) |
boolean |
hasSavedSearches()
Returns whether the saved search provider has any saved searches
|
void |
saveSearch(ISavedSearch savedSearch)
Save a search
|
void |
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 objects
|
void |
updateSavedSearch(String savedSearchID,
ISavedSearch savedSearch)
Updates a saved search
|
void |
updateSavedSearch(String savedSearchID,
ISavedSearch savedSearch,
IURI principalURI) |
protected static final String FOLDER_SYSTEM_ALIAS
protected static final String FOLDER_SAVE_ROOT_ALIAS
protected static final String FOLDER_SAVE_ROOT_NAME
protected ISearchQueryFactory m_searchQueryFactory
protected Map<String,ISavedSearch> m_savedSearchesMap
protected IThingID m_rootSavedSearchFolder
protected String m_rootSearchFolderName
protected static final String SAVED_SEARCH_DBO_XTYPE
protected static final String GLOBAL_SEARCH_FOLDER_NAME
protected static final String SEARCH_TERMS_PROPERTY
public DboSavedSearchProvider(ISearchQueryFactory searchQueryFactory, IThingID rootFolder)
public DboSavedSearchProvider(ISearchQueryFactory searchQueryFactory, String rootSearchFolderName)
public void setSearchQueryFactory(ISearchQueryFactory factory)
ISavedSearchProvider
setSearchQueryFactory
in interface ISavedSearchProvider
factory
- the factory to use to create search query objectspublic ISavedSearch createSavedSearch()
createSavedSearch
in interface ISavedSearchProvider
public boolean hasSavedSearches()
ISavedSearchProvider
hasSavedSearches
in interface ISavedSearchProvider
public void deleteSavedSearch(String savedSearchID)
ISavedSearchProvider
deleteSavedSearch
in interface ISavedSearchProvider
savedSearchID
- the id of the saved search to deletepublic ISavedSearch getSavedSearch(String savedSearchID)
ISavedSearchProvider
getSavedSearch
in interface ISavedSearchProvider
savedSearchID
- the id of the saved search to getpublic ISavedSearch getSavedSearch(String savedSearchID, IURI principalURI)
public ISavedSearch[] getSavedSearches()
ISavedSearchProvider
getSavedSearches
in interface ISavedSearchProvider
public ISavedSearch[] getSavedSearches(IURI principalURI)
public void saveSearch(ISavedSearch savedSearch)
ISavedSearchProvider
saveSearch
in interface ISavedSearchProvider
savedSearch
- the saved search to savepublic void saveSearch(ISavedSearch savedSearch, IURI principalURI)
public void updateSavedSearch(String savedSearchID, ISavedSearch savedSearch)
ISavedSearchProvider
updateSavedSearch
in interface ISavedSearchProvider
savedSearchID
- the id of the saved search to updatesavedSearch
- the saved search to savepublic void updateSavedSearch(String savedSearchID, ISavedSearch savedSearch, IURI principalURI)
public boolean getSupportsPublicSavedSearch()
ISavedSearchProvider
getSupportsPublicSavedSearch
in interface ISavedSearchProvider
protected Map<String,ISavedSearch> getSavedSearchesMap()
protected Map<String,ISavedSearch> getSavedSearchesMap(IURI principalURI)
protected static IURI getCurrentPrincipalURI() throws PortalException
PortalException
public IThingID getSearchContainer(IURI principalURI) throws PortalException
PortalException
public IThingID getGlobalSearchContainer() throws PortalException
PortalException
public IThingID getUserSearchContainer(IURI principalURI) throws PortalException
PortalException
public IThingIDList getSavedSearchThings(IURI principalURI) throws PortalException
PortalException
protected static IContainerMechanics getContainerMech(IThingID containerID) throws PortalException
PortalException
protected static IContainerPolicy getContainerBizPolicy(IThingID containerID) throws PortalException
PortalException
public static IThing getSavedSearchFromURI(IURI searchURI) throws PortalException
PortalException
public IThingID addOrUpdateSearch(IURI principalURI, ISavedSearch savedSearch) throws PortalException
PortalException
public IThingID createSearch(IURI principalURI, ISavedSearch savedSearch) throws PortalException
PortalException
public IThingID getCurrentUserSavedSearchByID(String searchID) throws PortalException
PortalException
public IThingID getSavedSearchByID(IURI principalURI, String searchName) throws PortalException
PortalException
public boolean searchExists(IURI principalURI, String searchName) throws PortalException
PortalException
protected void deleteSearch(IURI principalURI, String searchID) throws PortalException
PortalException
protected ISavedSearch convertDboToSavedSearch(IThingID dboThingID, boolean globalSearch) throws PortalException
PortalException
protected Map<String,Object> convertSavedSearchToPropertiesMap(ISavedSearch savedSearch)
protected IThingID getAdminThingID()
protected IThingID getOrCreateFolder(IThingID parentFolder, String folderName, IThingID folderOwner) throws PortalException
PortalException
protected IThingID createFolder(IThingID parentFolder, String folderName, IThingID folderOwner) throws PortalException
PortalException
protected IThingID createRootFolder() throws PortalException
PortalException
public IThingID getRootSavedSearchFolder() throws PortalException
PortalException
public void setRootSavedSearchFolder(IThingID savedSearchFolder)
public boolean canUserSavePublic()