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 class
A target for a container being used to check operations on a different target type within it.static class
A light weight target that only contain id of the object.static class
A target that points to a single model object, e.g. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
static Target
forChildrenOfContainer
(Container container, TargetType childTargetType) Create aTarget
for a container being used to check operations on a different childTargetType
within it.static Target
forContentId
(ContentId id, TargetType type) Create aTarget
from content idstatic Target
forModelObject
(Object modelObject) Create aTarget
that points to a single model object, e.g.final @NonNull TargetType
Get theTargetType
for this model object.int
hashCode()
static Target
targetForModelObject
(Object modelObject) Deprecated.since 5.9static Target
targetInContainer
(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 aTarget
for a container being used to check operations on a different childTargetType
within it.For example, a
ContentType.PAGE
container used to check operations on containedTargetType.COMMENT
s.- 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 aTarget
for a container being used to check operations on a different childTargetType
within it.For example, a
ContentType.PAGE
container used to check operations on containedTargetType.COMMENT
s.- 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 aTarget
from content id- Parameters:
id
- id of content object- Returns:
- target object
-
getTargetType
Get theTargetType
for this model object.This determines the type of
OperationCheck
to perform. -
equals
-
hashCode
public int hashCode()
-