|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SearchService
This service provides methods to perform search, create search query based "Smart Lists" and manage book-marked assets.
The service exposes methods to verify if search is enabled for an asset type. If it is enabled, what are the attributes on which it is enabled, i.e., which are the attributes based on which a search may be performed for a specified asset type.
Method Summary | |
---|---|
int |
addBookmarks(java.util.List<AssetId> assets) Bookmarks the specified assets. |
boolean |
deleteSmartList(long smartListId) Deletes a smart list. |
java.util.List<BookmarkBean> |
getBookmarks() Returns the list of bookmarks for the logged in user in the logged in site. |
java.util.List<AttributeDef> |
getSearchEnabledAttributes(java.lang.String type, java.lang.String subType) Returns a list of AttributeDef objects for the attributes on which search has been enabled. |
SmartList |
getSmartList(long smartListId) Returns the smart list with the specified id. |
java.util.List<SmartList> |
getSmartLists() Returns all smart lists for the logged in user in the logged in site. |
boolean |
isSearchEnabled(java.lang.String assetType) Returns true if search is enabled for the specified asset type. |
boolean |
removeBookmarks(java.util.List<AssetId> bookmarks) Removes the bookmark for the specified assets, if any. |
boolean |
saveSmartList(SmartList smartList, MessageCollectors.SmartListMessageCollector collector) Saves the specified smart list. |
java.util.List<ResultRow> |
search(long siteId, java.lang.String phrase, java.lang.String phraseOperation, java.util.List<TypeBean> assetTypes, java.lang.String searchfield, int maxResults, java.util.List<SortOrder> sortby) Returns search results for the specified search parameters. |
java.util.List<ResultRow> |
search(SearchCriteria searchCriteria, int maxResults, java.util.List<SortOrder> sortby) Returns search results for the specified search criteria. |
Methods inherited from interface com.fatwire.services.Service |
---|
getManager, getResponse, setManager |
Method Detail |
---|
boolean isSearchEnabled(java.lang.String assetType) throws ServiceException
true
if search is enabled for the specified asset type.assetType
- the asset type on which to check if search has been enabled.true
if search is enabled on the asset type, false
otherwise.ServiceException
- wraps any exception underlying the service call.java.util.List<AttributeDef> getSearchEnabledAttributes(java.lang.String type, java.lang.String subType) throws ServiceException
AttributeDef
objects for the attributes on which search has been enabled. If there are no attributes on which search is enabled, this method returns an empty list. This method assumes that search index has been enabled on the specified asset type. If search is not enabled on the specified asset type, the method returns an empty list.type
- the asset type to which the attributes belong.subType
- the sub-type (for asset maker assets) or definition (for Flex assets).AttributeDef
instances for which search is enabled.ServiceException
- wraps any exception underlying the service call.java.util.List<ResultRow> search(long siteId, java.lang.String phrase, java.lang.String phraseOperation, java.util.List<TypeBean> assetTypes, java.lang.String searchfield, int maxResults, java.util.List<SortOrder> sortby) throws ServiceException
siteId
- the site on which to perform the search. Only assets available in this site will be returned.phrase
- search phrase.phraseOperation
- operation for the search to be performed on the phrase, e.g. CONTAINS
, defaults to Operation.CONTAINS
.assetTypes
- the type and sub-type of assets to search. If exactly one type sub-type combination is specified, this method uses the search index for that asset type. If the search index is not enabled, the method throws a ServiceException
.searchfield
- the field to search for. If the field is not specified, the method uses the default search field configured for the index.maxResults
- maximum search results to be returned.sortby
- sort orders for sorting the results.ServiceException
- wraps any exception underlying the service call.Operation
, SortOrder
java.util.List<ResultRow> search(SearchCriteria searchCriteria, int maxResults, java.util.List<SortOrder> sortby) throws ServiceException
Operation.CONTAINS
operation for phrases in the search criteria. This method will use the asset type based search index if it is enabled for the asset type specified in the search criteria. Otherwise, it will use the Global Index. The default search field for the search index will be used for search.searchCriteria
- search criteria which can provide for search parameters like: the site on which to perform the search, search phrase, the type and sub-type of the assets to search,maxResults
- maximum search results to be returned.sortby
- sort orders for sorting the results.ServiceException
- wraps any exception underlying the service call.SearchCriteria
, SortOrder
java.util.List<SmartList> getSmartLists() throws ServiceException
ServiceException
- wraps any exception underlying the service call.SmartList getSmartList(long smartListId) throws ServiceException
smartListId
- the id of the smart list to load.ServiceException
- wraps any exception underlying the service call.boolean saveSmartList(SmartList smartList, MessageCollectors.SmartListMessageCollector collector) throws ServiceException
smartList
- the smart list to save.SmartListMessageCollector
- populates with messages.true
if the smart list could be successfully saved, false
otherwise.ServiceException
- wraps any exception underlying the service call.boolean deleteSmartList(long smartListId) throws ServiceException
smartListId
- id of the smart list to delete.true
if the smart list could be successfully deleted, false
otherwise.ServiceException
- wraps any exception underlying the service call.java.util.List<BookmarkBean> getBookmarks() throws ServiceException
ServiceException
- wraps any exception underlying the service call.int addBookmarks(java.util.List<AssetId> assets) throws ServiceException
assets
- the assets to be bookmarked.ServiceException
- wraps any exception underlying the service call.boolean removeBookmarks(java.util.List<AssetId> bookmarks) throws ServiceException
bookmarks
- the assets for which the bookmarks need to be removed.true
if the bookmark could be successfully removed, false
otherwise.ServiceException
- wraps any exception underlying the service call.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.