@ExperimentalApi public abstract class Target extends Object
OperationService
,
OperationCheck
Modifier and Type | Class and Description |
---|---|
static class |
Target.ContainerTarget
A target for a container being used to check operations on a different target type within it.
|
static class |
Target.IdTarget
A light weight target that only contain id of the object.
|
static class |
Target.ModelObjectTarget
A target that points to a single model object, e.g.
|
Modifier and Type | Field and Description |
---|---|
protected TargetType |
targetType |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static Target |
forChildrenOfContainer(Container container,
TargetType childTargetType)
Create a
Target for a container being used to check operations on a different child TargetType within it. |
static Target |
forContentId(ContentId id,
TargetType type)
Create a
Target from content id |
static Target |
forModelObject(Object modelObject)
Create a
Target that points to a single model object, e.g. |
TargetType |
getTargetType()
Get the
TargetType for this model object. |
int |
hashCode() |
static Target |
targetForModelObject(Object modelObject)
Deprecated.
since 5.9
|
static Target |
targetInContainer(Container container,
TargetType childTargetType)
Deprecated.
since 5.9
|
protected final TargetType targetType
@Deprecated public static Target targetForModelObject(Object modelObject)
modelObject
- an API-layer model object (for example, a Content
)IllegalArgumentException
- if modelObject is an unsupported type@Deprecated public static Target targetInContainer(Container container, TargetType childTargetType)
Target
for a container being used to check operations on a different child TargetType
within it.
For example, a ContentType.PAGE
container used to check operations on contained
TargetType.COMMENT
s.
container
- an API-layer model object (for example, a Content
) that is a container of other targetschildTargetType
- the TargetType
(different from that of the container) whose permissions will be checked
within the containerIllegalArgumentException
- if container is an unsupported typepublic static Target forModelObject(Object modelObject)
modelObject
- an API-layer model object (for example, a Content
)IllegalArgumentException
- if modelObject is an unsupported typepublic static Target forChildrenOfContainer(Container container, TargetType childTargetType)
Target
for a container being used to check operations on a different child TargetType
within it.
For example, a ContentType.PAGE
container used to check operations on contained
TargetType.COMMENT
s.
container
- an API-layer model object (for example, a Content
) that is a container of other targetschildTargetType
- the TargetType
(different from that of the container) whose permissions will be checked
within the containerIllegalArgumentException
- if container is an unsupported typepublic static Target forContentId(ContentId id, TargetType type)
Target
from content idid
- id of content object@Nonnull public final TargetType getTargetType()
TargetType
for this model object.
This determines the type of OperationCheck
to perform.
Copyright © 2003–2018 Atlassian. All rights reserved.