public interface TargetResolver
Modifier and Type | Method and Description |
---|---|
boolean |
isContainerTarget(Target target)
Returns true if object is a
Target for a container being used to check operations on a different child
TargetType within it. |
<T> com.atlassian.fugue.Option<T> |
resolveContainerHibernateObject(Target target,
Class<T> expectedType)
Get the target hibernate object for the container relating to the specified target.
|
<T> com.atlassian.fugue.Option<T> |
resolveHibernateObject(Target target,
Class<T> expectedType)
Get the target hibernate object, if this target is one that has a specific object (not a container)
|
<T> T |
resolveModelObject(Target target,
Class<T> expectedType)
Get the target model object (e.g.
|
@Nonnull <T> T resolveModelObject(Target target, Class<T> expectedType)
T
- the class type to cast the model object to after resolving the target to a model objectUnsupportedTargetException
- if target is an unsupported type for resolving model objects, or is a container targetBadRequestException
@Nonnull <T> com.atlassian.fugue.Option<T> resolveHibernateObject(Target target, Class<T> expectedType)
UnsupportedTargetException
- if target is an unsupported type for resolving hibernate objects
(e.g. is a container target)BadRequestException
resolveContainerHibernateObject(com.atlassian.confluence.api.model.permissions.Target, Class)
@Nonnull <T> com.atlassian.fugue.Option<T> resolveContainerHibernateObject(Target target, Class<T> expectedType)
UnsupportedTargetException
- if target is an unsupported type for resolving container hibernate objects
(e.g. not a container target, or is an unsuitable kind of model object)BadRequestException
resolveHibernateObject(com.atlassian.confluence.api.model.permissions.Target, Class)
boolean isContainerTarget(Target target)
Target
for a container being used to check operations on a different child
TargetType
within it.Target.forChildrenOfContainer(com.atlassian.confluence.api.model.content.Container,
com.atlassian.confluence.api.model.permissions.TargetType)
Copyright © 2003–2017 Atlassian. All rights reserved.