Class Target
java.lang.Object
com.atlassian.confluence.api.model.permissions.Target
- Direct Known Subclasses:
Target.ContainerTarget,Target.IdTarget,Target.ModelObjectTarget
The target for an operation permissions check.
- Since:
- 5.8
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA target for a container being used to check operations on a different target type within it.static classA light weight target that only contain id of the object.static classA target that points to a single model object, e.g. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic TargetforChildrenOfContainer(Container container, TargetType childTargetType) Create aTargetfor a container being used to check operations on a different childTargetTypewithin it.static TargetforContentId(ContentId id, TargetType type) Create aTargetfrom content idstatic TargetforModelObject(Object modelObject) Create aTargetthat points to a single model object, e.g.final @NonNull TargetTypeGet theTargetTypefor this model object.inthashCode()static TargettargetForModelObject(Object modelObject) Deprecated.since 5.9static TargettargetInContainer(Container container, TargetType childTargetType) Deprecated.since 5.9
-
Field Details
-
targetType
-
-
Method Details
-
targetForModelObject
Deprecated.since 5.9- Parameters:
modelObject- an API-layer model object (for example, aContent)- Throws:
IllegalArgumentException- if modelObject is an unsupported type
-
targetInContainer
Deprecated.since 5.9Create aTargetfor a container being used to check operations on a different childTargetTypewithin it.For example, a
ContentType.PAGEcontainer used to check operations on containedTargetType.COMMENTs.- Parameters:
container- an API-layer model object (for example, aContent) that is a container of other targetschildTargetType- theTargetType(different from that of the container) whose permissions will be checked within the container- Throws:
IllegalArgumentException- if container is an unsupported type
-
forModelObject
- Parameters:
modelObject- an API-layer model object (for example, aContent)- Throws:
IllegalArgumentException- if modelObject is an unsupported type
-
forChildrenOfContainer
Create aTargetfor a container being used to check operations on a different childTargetTypewithin it.For example, a
ContentType.PAGEcontainer used to check operations on containedTargetType.COMMENTs.- Parameters:
container- an API-layer model object (for example, aContent) that is a container of other targetschildTargetType- theTargetType(different from that of the container) whose permissions will be checked within the container- Throws:
IllegalArgumentException- if container is an unsupported type
-
forContentId
Create aTargetfrom content id- Parameters:
id- id of content object- Returns:
- target object
-
getTargetType
Get theTargetTypefor this model object.This determines the type of
OperationCheckto perform. -
equals
-
hashCode
public int hashCode()
-