@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.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 |
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() |
protected final TargetType targetType
public 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.COMMENTs.
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 type@Nonnull public final TargetType getTargetType()
TargetType for this model object.
This determines the type of OperationCheck to perform.
Copyright © 2003–2016 Atlassian. All rights reserved.