@Internal public enum TenancyScope extends Enum<TenancyScope>
| Enum Constant and Description |
|---|
SUPPRESS
Explicitly marks that tenancy scope concerns are not relevant for this component and that it should be exempt from static analysis rules.
|
TENANTED
Indicates that the component uses data access patterns that require knowledge of the current tenant.
|
TENANTLESS
Indicates that the component only accesses data that is universal across all tenants.
|
UNRESOLVED
Explicitly marks that this is a component whose safety in a multi-tenanted environment has not yet
been evaluated or that is known to require additional work.
|
| Modifier and Type | Method and Description |
|---|---|
static TenancyScope |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TenancyScope[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TenancyScope TENANTED
This implies that the component not must be used without first establishing a tenanted request context.
public static final TenancyScope TENANTLESS
Tenantless components may be accessed safely even outside of a tenanted request context and must avoid
access to any tenant-specific information. Calling TENANTED components from TENANTLESS
ones is generally an error, since if this service calls another service that requires a tenant, then
this service transitively requires one as well.
public static final TenancyScope UNRESOLVED
This is intended to be used temporarily to help track remaining multi-tenancy work. It should not be assigned in new code unless properly resolving the problem is blocked by some external dependency.
public static final TenancyScope SUPPRESS
This is intended for use on components that code analysis tools are likely to flag as suspicious, but are naturally safe due to how they are used.
public static TenancyScope[] values()
for (TenancyScope c : TenancyScope.values()) System.out.println(c);
public static TenancyScope valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2016 Atlassian. All rights reserved.