|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Nested Class Summary | |
---|---|
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 . |
Method Summary | |
---|---|
void |
adjustFavouriteCount(SharedEntity entity,
int adjustmentValue)
Adjusts the favourite counts for a given entity. |
EnclosedIterable<S> |
get(SharedEntityAccessor.RetrievalDescriptor descriptor)
Used to get sharable entities from a search result. |
EnclosedIterable<S> |
get(com.atlassian.crowd.embedded.api.User searcher,
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(Long entityId)
This will call back to ask for a SharedEntity based on id. |
S |
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<S> |
getType()
Returns the type that this object can work with. |
boolean |
hasPermissionToUse(com.atlassian.crowd.embedded.api.User user,
S entity)
Returns true if the user has permission to use the SharedEntity |
Method Detail |
---|
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 SharedEntity
SharedEntity
or null if it cant be foundS getSharedEntity(com.atlassian.crowd.embedded.api.User user, Long entityId)
SharedEntity
by id If the user is allows to see it
user
- the user in playentityId
- the id of the SharedEntity
SharedEntity
if it exists and the user can see it and null otherwiseboolean hasPermissionToUse(com.atlassian.crowd.embedded.api.User user, S entity)
SharedEntity
user
- the user in playentity
- the SharedEntity
to check
EnclosedIterable<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 descriptor
EnclosedIterable
of SharedEntity
'sEnclosedIterable<S> get(com.atlassian.crowd.embedded.api.User 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 descriptor
EnclosedIterable
of SharedEntity
's
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |