Package com.atlassian.jira.sharing
Interface SharedEntityAccessor<S extends SharedEntity>
- All Known Subinterfaces:
PortalPageManager,SearchRequestManager
- All Known Implementing Classes:
DefaultPortalPageManager,DefaultSearchRequestManager
public interface SharedEntityAccessor<S extends SharedEntity>
Provides an abstraction for accessing SharedEntity objects. This class abstracts away the details of the SharedEntity
implementation to those components that need it.
- Since:
- v3.13
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceFactory to retrieve aSharedEntityAccessorfor a givenSharedEntitystatic interfaceUsed when getting a Collection ofshared entities. -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustFavouriteCount(SharedEntity entity, int adjustmentValue) Adjusts the favourite counts for a given entity.get(SharedEntityAccessor.RetrievalDescriptor descriptor) Used to getsharable entitiesfrom a search result.get(ApplicationUser searcher, SharedEntityAccessor.RetrievalDescriptor descriptor) Used to getsharable entitiesfrom a search result.getAll()Deprecated.This has been moved to the PortalPageManager and deprecated for SearchRequestManager.Get allsharable entitiesthis accessor can see for use in indexing.getSharedEntity(ApplicationUser user, Long entityId) This is called to getSharedEntityby id If the user is allows to see itgetSharedEntity(Long entityId) This will call back to ask for aSharedEntitybased on id.getType()Returns the type that this object can work with.booleanhasPermissionToUse(ApplicationUser user, S entity) Returns true if the user has permission to use theSharedEntitysearch(SharedEntitySearchParameters searchParameters, ApplicationUser user, int pagePosition, int pageWidth) Search for thesharable entitiesthat match the passed SearchParameters.
-
Method Details
-
getType
SharedEntity.TypeDescriptor<S> getType()Returns the type that this object can work with.- Returns:
- the type that this object can work with.
-
hasPermissionToUse
Returns true if the user has permission to use theSharedEntity- Parameters:
user- the user in playentity- theSharedEntityto check- Returns:
- true if the user has permission to use it
-
getAll
EnclosedIterable<S> getAll()Deprecated.This has been moved to the PortalPageManager and deprecated for SearchRequestManager. Since v5.2.Get allsharable entitiesthis accessor can see.- Returns:
- a
EnclosedIterableofSharedEntity's
-