public class TargetResolverImpl extends Object implements TargetResolver
Constructor and Description |
---|
TargetResolverImpl(AnyTypeDao anyTypeDao) |
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> @NonNull 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> @NonNull 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> expectedClass)
Get the target model object (e.g.
|
public TargetResolverImpl(AnyTypeDao anyTypeDao)
public <T> T resolveModelObject(Target target, Class<T> expectedClass)
TargetResolver
resolveModelObject
in interface TargetResolver
T
- the class type to cast the model object to after resolving the target to a model objectpublic <T> @NonNull com.atlassian.fugue.Option<T> resolveHibernateObject(Target target, Class<T> expectedType)
TargetResolver
resolveHibernateObject
in interface TargetResolver
expectedType
- hibernate object type to cast to, likely Class extends ConfluenceEntityObject>,TargetResolver.resolveContainerHibernateObject(com.atlassian.confluence.api.model.permissions.Target, Class)
public <T> @NonNull com.atlassian.fugue.Option<T> resolveContainerHibernateObject(Target target, Class<T> expectedType)
TargetResolver
resolveContainerHibernateObject
in interface TargetResolver
expectedType
- hibernate object type to cast to, likely Class extends ConfluenceEntityObject>,TargetResolver.resolveHibernateObject(com.atlassian.confluence.api.model.permissions.Target, Class)
public boolean isContainerTarget(Target target)
TargetResolver
Target
for a container being used to check operations on a different child
TargetType
within it.isContainerTarget
in interface TargetResolver
Target.forChildrenOfContainer(com.atlassian.confluence.api.model.content.Container,
com.atlassian.confluence.api.model.permissions.TargetType)
Copyright © 2003–2021 Atlassian. All rights reserved.