|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.search.DefaultSearchRequestManager
public class DefaultSearchRequestManager
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.jira.sharing.SharedEntityAccessor |
---|
SharedEntityAccessor.Factory, SharedEntityAccessor.RetrievalDescriptor |
Constructor Summary | |
---|---|
DefaultSearchRequestManager(ColumnLayoutManager columnLayoutManager,
SubscriptionManager subscriptionManager,
ShareManager shareManager,
SearchRequestStore searchRequestStore,
SharedEntityIndexer indexer,
SearchService searchService,
UserUtil userUtil)
|
Method Summary | |
---|---|
void |
adjustFavouriteCount(SharedEntity entity,
int adjustmentValue)
Adjusts the favourite counts for a given entity. |
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 id)
Removes the SearchRequest GenericValue from the database based on its id |
EnclosedIterable<SearchRequest> |
get(SharedEntityAccessor.RetrievalDescriptor descriptor)
Used to get sharable entities from a search result. |
EnclosedIterable<SearchRequest> |
get(com.atlassian.crowd.embedded.api.User user,
SharedEntityAccessor.RetrievalDescriptor descriptor)
Used to get sharable entities from a search result. |
EnclosedIterable<SearchRequest> |
getAll()
Get all sharable entities this accessor can see. |
EnclosedIterable<SharedEntity> |
getAllIndexableSharedEntities()
Get all sharable entities this accessor can see for use in indexing. |
Collection<SearchRequest> |
getAllOwnedSearchRequests(com.atlassian.crowd.embedded.api.User user)
Retrieves a collection of SearchRequest objects that a user created. |
SearchRequest |
getOwnedSearchRequestByName(com.atlassian.crowd.embedded.api.User author,
String name)
Find a search request given the author and the request name. |
SearchRequest |
getSearchRequestById(com.atlassian.crowd.embedded.api.User user,
Long id)
Return the search request as stored in the database |
String |
getSearchRequestOwnerUserName(Long id)
Return the owner of the passed SearchRequest. |
SearchRequest |
getSharedEntity(Long entityId)
This will call back to ask for a SharedEntity based on id. |
SearchRequest |
getSharedEntity(com.atlassian.crowd.embedded.api.User user,
Long entityId)
This is called to get SharedEntity by id If the user is allows to see it |
SharedEntity.TypeDescriptor<SearchRequest> |
getType()
Returns the type that this object can work with. |
boolean |
hasPermissionToUse(com.atlassian.crowd.embedded.api.User user,
SearchRequest entity)
Returns true if the user has permission to use the SharedEntity |
SharedEntitySearchResult<SearchRequest> |
search(SharedEntitySearchParameters searchParameters,
com.atlassian.crowd.embedded.api.User user,
int pagePosition,
int pageWidth)
Search for the SearchRequests that match the passed searchParameters. |
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 DefaultSearchRequestManager(ColumnLayoutManager columnLayoutManager, SubscriptionManager subscriptionManager, ShareManager shareManager, SearchRequestStore searchRequestStore, SharedEntityIndexer indexer, SearchService searchService, UserUtil userUtil)
Method Detail |
---|
public EnclosedIterable<SearchRequest> get(SharedEntityAccessor.RetrievalDescriptor descriptor)
SharedEntityAccessor
sharable entities
from a search result.
get
in interface SharedEntityAccessor<SearchRequest>
descriptor
- retrieval descriptor
EnclosedIterable
of SharedEntity
'spublic EnclosedIterable<SearchRequest> get(com.atlassian.crowd.embedded.api.User user, SharedEntityAccessor.RetrievalDescriptor descriptor)
SharedEntityAccessor
sharable entities
from a search result.
The entities returned may be modified by the user parameter (e.g. permissions or clause sanitisation).
get
in interface SharedEntityAccessor<SearchRequest>
user
- the user performing the searchdescriptor
- retrieval descriptor
EnclosedIterable
of SharedEntity
'spublic EnclosedIterable<SearchRequest> getAll()
SharedEntityAccessor
sharable entities
this accessor can see.
getAll
in interface SharedEntityAccessor<SearchRequest>
EnclosedIterable
of SharedEntity
'spublic EnclosedIterable<SharedEntity> getAllIndexableSharedEntities()
SharedEntityAccessor
sharable entities
this accessor can see for use in indexing.
getAllIndexableSharedEntities
in interface SharedEntityAccessor<SearchRequest>
EnclosedIterable
of SharedEntity
'spublic Collection<SearchRequest> getAllOwnedSearchRequests(com.atlassian.crowd.embedded.api.User user)
SearchRequestManager
getAllOwnedSearchRequests
in interface SearchRequestManager
user
- The user who created the SearchRequests
SearchRequest
that user created.public SearchRequest getOwnedSearchRequestByName(com.atlassian.crowd.embedded.api.User author, String name)
SearchRequestManager
getOwnedSearchRequestByName
in interface SearchRequestManager
author
- The author of the SearchRequestname
- The name of the SearchRequest
public SearchRequest getSearchRequestById(com.atlassian.crowd.embedded.api.User user, Long id)
SearchRequestManager
getSearchRequestById
in interface SearchRequestManager
user
- The user to check shares withid
- The id of the filter
public String getSearchRequestOwnerUserName(Long id)
SearchRequestManager
getSearchRequestOwnerUserName
in interface SearchRequestManager
id
- the identifier of the SearchRequest.
public SearchRequest create(SearchRequest request)
SearchRequestManager
create
in interface SearchRequestManager
request
- SearchResult that should be persisted
public SearchRequest update(SearchRequest request)
SearchRequestManager
update
in interface SearchRequestManager
request
- the request to persist
SearchRequest
that was persisted to the databasepublic void delete(Long id)
SearchRequestManager
delete
in interface SearchRequestManager
id
- of the search request to be removed from storagepublic SharedEntity.TypeDescriptor<SearchRequest> getType()
SharedEntityAccessor
getType
in interface SharedEntityAccessor<SearchRequest>
public void adjustFavouriteCount(SharedEntity entity, int adjustmentValue)
SharedEntityAccessor
adjustFavouriteCount
in interface SharedEntityAccessor<SearchRequest>
entity
- the entity to adjustadjustmentValue
- the value to adjust by.public SharedEntitySearchResult<SearchRequest> search(SharedEntitySearchParameters searchParameters, com.atlassian.crowd.embedded.api.User user, int pagePosition, int pageWidth)
SearchRequestManager
search
in interface SearchRequestManager
searchParameters
- the searchParameters to query.user
- the user performing the search.pagePosition
- the page to return.pageWidth
- the number of results per page.
public SearchRequest getSharedEntity(Long entityId)
SharedEntityAccessor
SharedEntity
based on id.
getSharedEntity
in interface SharedEntityAccessor<SearchRequest>
entityId
- the id of the SharedEntity
SharedEntity
or null if it cant be foundpublic SearchRequest getSharedEntity(com.atlassian.crowd.embedded.api.User user, Long entityId)
SharedEntityAccessor
SharedEntity
by id If the user is allows to see it
getSharedEntity
in interface SharedEntityAccessor<SearchRequest>
user
- the user in playentityId
- the id of the SharedEntity
SharedEntity
if it exists and the user can see it and null otherwisepublic boolean hasPermissionToUse(com.atlassian.crowd.embedded.api.User user, SearchRequest entity)
SharedEntityAccessor
SharedEntity
hasPermissionToUse
in interface SharedEntityAccessor<SearchRequest>
user
- the user in playentity
- the SharedEntity
to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |