public interface SharedEntityAccessor<S extends SharedEntity>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
SharedEntityAccessor.Factory
Factory to retrieve a
SharedEntityAccessor for a given SharedEntity |
static interface |
SharedEntityAccessor.RetrievalDescriptor
Used when getting a Collection of
shared entities. |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustFavouriteCount(SharedEntity entity,
int adjustmentValue)
Adjusts the favourite counts for a given entity.
|
EnclosedIterable<S> |
get(ApplicationUser searcher,
SharedEntityAccessor.RetrievalDescriptor descriptor)
Used to get
sharable entities from a search result. |
EnclosedIterable<S> |
get(SharedEntityAccessor.RetrievalDescriptor descriptor)
Used to get
sharable entities from a search result. |
EnclosedIterable<S> |
getAll()
Deprecated.
This has been moved to the PortalPageManager and deprecated for SearchRequestManager. Since v5.2.
|
EnclosedIterable<SharedEntity> |
getAllIndexableSharedEntities()
Get all
sharable entities this accessor can see for use in indexing. |
S |
getSharedEntity(ApplicationUser user,
Long entityId)
This is called to get
SharedEntity by id If the user is allows to see it |
S |
getSharedEntity(Long entityId)
This will call back to ask for a
SharedEntity based on id. |
SharedEntity.TypeDescriptor<S> |
getType()
Returns the type that this object can work with.
|
boolean |
hasPermissionToUse(ApplicationUser user,
S entity)
Returns true if the user has permission to use the
SharedEntity |
SharedEntitySearchResult<S> |
search(SharedEntitySearchParameters searchParameters,
ApplicationUser user,
int pagePosition,
int pageWidth)
Search for the
sharable entities that match the passed SearchParameters. |
SharedEntity.TypeDescriptor<S> getType()
void adjustFavouriteCount(SharedEntity entity, int adjustmentValue)
entity - the entity to adjustadjustmentValue - the value to adjust by.S getSharedEntity(Long entityId)
SharedEntity based on id.entityId - the id of the SharedEntitySharedEntity or null if it cant be foundS getSharedEntity(ApplicationUser user, Long entityId)
SharedEntity by id If the user is allows to see ituser - the user in playentityId - the id of the SharedEntitySharedEntity if it exists and the user can see it and null otherwiseboolean hasPermissionToUse(ApplicationUser user, S entity)
SharedEntityuser - the user in playentity - the SharedEntity to checkEnclosedIterable<S> getAll()
sharable entities this accessor can see.EnclosedIterable of SharedEntity'sEnclosedIterable<SharedEntity> getAllIndexableSharedEntities()
sharable entities this accessor can see for use in indexing.EnclosedIterable of SharedEntity'sEnclosedIterable<S> get(SharedEntityAccessor.RetrievalDescriptor descriptor)
sharable entities from a search result.descriptor - retrieval descriptorEnclosedIterable of SharedEntity'sEnclosedIterable<S> get(ApplicationUser searcher, SharedEntityAccessor.RetrievalDescriptor descriptor)
sharable entities from a search result.
The entities returned may be modified by the user parameter (e.g. permissions or clause sanitisation).searcher - the user performing the searchdescriptor - retrieval descriptorEnclosedIterable of SharedEntity'sSharedEntitySearchResult<S> search(SharedEntitySearchParameters searchParameters, ApplicationUser user, int pagePosition, int pageWidth)
sharable entities that match the passed SearchParameters. The result can be paged so that a subset of the results can be returned.searchParameters - the SearchParameters to query.user - the user performing the search.pagePosition - the page to return.pageWidth - the number of results per page.Copyright © 2002-2022 Atlassian. All Rights Reserved.