|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.issue.search.CachingSearchRequestStore
public class CachingSearchRequestStore
Caching store for SearchRequest. The cache stores a id -> SearchRequest and a searchrequest.owner -> id mapping.
| Constructor Summary | |
|---|---|
CachingSearchRequestStore(SearchRequestStore delegateStore,
com.atlassian.event.api.EventPublisher eventPublisher)
|
|
| Method Summary | |
|---|---|
SearchRequest |
adjustFavouriteCount(Long searchRequestId,
int incrementValue)
Updates the favourite count of the SearchRequest in the database. |
SearchRequest |
create(SearchRequest request)
Takes a SearchRequest, user, name of search request and description and persists the XML representation
of the SearchRequest object to the database along with the rest of the details |
void |
delete(Long searchId)
Removes the SearchRequest GenericValue from the database based on its id |
EnclosedIterable<SearchRequest> |
get(SharedEntityAccessor.RetrievalDescriptor descriptor)
Get a EnclosedIterable of SearchRequests for the specified List of ids. |
EnclosedIterable<SearchRequest> |
getAll()
Get a EnclosedIterable of all SearchRequests in the database. |
EnclosedIterable<IndexableSharedEntity<SearchRequest>> |
getAllIndexableSharedEntities()
Get a EnclosedIterable of all IndexableSharedEntities representing SearchRequests in the database. |
Collection<SearchRequest> |
getAllOwnedSearchRequests(com.atlassian.crowd.embedded.api.User owner)
Retrieves a collection of SearchRequest objects that a user created. |
Collection<SearchRequest> |
getAllRequests()
Retrieves all the SearchRequests |
SearchRequest |
getRequestByAuthorAndName(com.atlassian.crowd.embedded.api.User author,
String name)
Find a search request given the author and the request name. |
SearchRequest |
getSearchRequest(Long searchRequestId)
Return the search request as stored in the database |
EnclosedIterable<SearchRequest> |
getSearchRequests(com.atlassian.crowd.embedded.api.Group group)
Get all search requests associated with a given Group. |
EnclosedIterable<SearchRequest> |
getSearchRequests(Project project)
Get all search requests associate with a given Project. |
void |
onClearCache(ClearCacheEvent event)
|
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
SearchRequest |
update(SearchRequest request)
Updates an existing search request in the database. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CachingSearchRequestStore(SearchRequestStore delegateStore,
com.atlassian.event.api.EventPublisher eventPublisher)
| Method Detail |
|---|
public void start()
throws Exception
Startable
start in interface StartableException - Allows implementations to throw an Exception.@EventListener public void onClearCache(ClearCacheEvent event)
public Collection<SearchRequest> getAllRequests()
SearchRequestStore
getAllRequests in interface SearchRequestStorepublic EnclosedIterable<SearchRequest> get(SharedEntityAccessor.RetrievalDescriptor descriptor)
SearchRequestStoreEnclosedIterable of SearchRequests for the specified List of ids.
get in interface SearchRequestStoredescriptor - retrieval descriptor
public EnclosedIterable<SearchRequest> getAll()
SearchRequestStoreEnclosedIterable of all SearchRequests in the database.
getAll in interface SearchRequestStorepublic EnclosedIterable<IndexableSharedEntity<SearchRequest>> getAllIndexableSharedEntities()
SearchRequestStoreEnclosedIterable of all IndexableSharedEntities representing SearchRequests in the database.
Note: this is used so that we can retrieve all the meta data about a SearchRequest without having to deal with
the Query.
getAllIndexableSharedEntities in interface SearchRequestStorepublic Collection<SearchRequest> getAllOwnedSearchRequests(com.atlassian.crowd.embedded.api.User owner)
SearchRequestStore
getAllOwnedSearchRequests in interface SearchRequestStoreowner - The user who created the SearchRequests
SearchRequest that user created.
public SearchRequest getRequestByAuthorAndName(com.atlassian.crowd.embedded.api.User author,
String name)
SearchRequestStore
getRequestByAuthorAndName in interface SearchRequestStoreauthor - Author of the SearchRequestname - Name of the SearchRequest
public SearchRequest getSearchRequest(Long searchRequestId)
SearchRequestStore
getSearchRequest in interface SearchRequestStoresearchRequestId - Id of the SearchRequest
public SearchRequest create(SearchRequest request)
SearchRequestStoreSearchRequest, user, name of search request and description and persists the XML representation
of the SearchRequest object to the database along with the rest of the details
create in interface SearchRequestStorerequest - SearchResult that should be persisted
public SearchRequest update(SearchRequest request)
SearchRequestStore
update in interface SearchRequestStorerequest - the request to persist.
SearchRequest that was persisted to the database
public SearchRequest adjustFavouriteCount(Long searchRequestId,
int incrementValue)
SearchRequestStore
adjustFavouriteCount in interface SearchRequestStoresearchRequestId - the identifier of the search request to decrease.incrementValue - the value to increase the favourite count by. Can be a number < 0 to decrease the favourite count.
SearchRequest.public void delete(Long searchId)
SearchRequestStore
delete in interface SearchRequestStoresearchId - of the search request to be removed from storagepublic EnclosedIterable<SearchRequest> getSearchRequests(Project project)
SearchRequestStoresearch requests associate with a given Project.
getSearchRequests in interface SearchRequestStoreproject - Project that is associated with the filters
SearchRequest that have their project set to the given projectpublic EnclosedIterable<SearchRequest> getSearchRequests(com.atlassian.crowd.embedded.api.Group group)
SearchRequestStoresearch requests associated with a given Group.
getSearchRequests in interface SearchRequestStoregroup - the group that is associated with the filters
SearchRequest that have their project set to the given project
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||