Class TargetResolverImpl
java.lang.Object
com.atlassian.confluence.internal.permissions.TargetResolverImpl
- All Implemented Interfaces:
TargetResolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isContainerTarget
(Target target) Returns true if object is aTarget
for a container being used to check operations on a different childTargetType
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> @NonNull T
resolveModelObject
(Target target, Class<T> expectedClass) Get the target model object (e.g.
-
Constructor Details
-
TargetResolverImpl
-
-
Method Details
-
resolveModelObject
Description copied from interface:TargetResolver
Get the target model object (e.g. Content), if this target is one that has a specific model object (not a container)- Specified by:
resolveModelObject
in interfaceTargetResolver
- Type Parameters:
T
- the class type to cast the model object to after resolving the target to a model object- Returns:
- the result of resolving the model object, cast to T
-
resolveHibernateObject
public <T> @NonNull com.atlassian.fugue.Option<T> resolveHibernateObject(Target target, Class<T> expectedType) Description copied from interface:TargetResolver
Get the target hibernate object, if this target is one that has a specific object (not a container)- Specified by:
resolveHibernateObject
in interfaceTargetResolver
- Parameters:
expectedType
- hibernate object type to cast to, likely Class<? extends ConfluenceEntityObject>,- Returns:
- an option containing the hibernate object, or an empty option if the types are correct but the hibernate ID doesn't exist in the database
- See Also:
-
resolveContainerHibernateObject
public <T> @NonNull com.atlassian.fugue.Option<T> resolveContainerHibernateObject(Target target, Class<T> expectedType) Description copied from interface:TargetResolver
Get the target hibernate object for the container relating to the specified target.- If this target is a container target, get that container's hibernate object.
- If this target is one that has a specific object (not a container), get that object's container's hibernate object.
- Specified by:
resolveContainerHibernateObject
in interfaceTargetResolver
- Parameters:
expectedType
- hibernate object type to cast to, likely Class<? extends ConfluenceEntityObject>,- Returns:
- an option containing the hibernate object, or an empty option if the types are correct but the hibernate ID doesn't exist in the database
- See Also:
-
isContainerTarget
Description copied from interface:TargetResolver
Returns true if object is aTarget
for a container being used to check operations on a different childTargetType
within it.- Specified by:
isContainerTarget
in interfaceTargetResolver
- Returns:
- true if it's a container target, false otherwise
- See Also:
-