public final class JcrAllUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
DYNAMIC_JCR_ALL_VALUE |
Modifier and Type | Method and Description |
---|---|
static PropertyState |
asPropertyState(@NotNull java.lang.String name,
@NotNull PrivilegeBits bits,
@NotNull PrivilegeBitsProvider provider)
Returns a new multi-valued
PropertyState of type Type.LONGS with the given name and the
long representation of the given bits as values. |
static boolean |
denotesDynamicJcrAll(@Nullable PropertyState property) |
static PrivilegeBits |
getPrivilegeBits(@Nullable PropertyState propertyState,
@NotNull PrivilegeBitsProvider provider)
Get or create an instance of privilege bits for the given property state.
|
public static final long DYNAMIC_JCR_ALL_VALUE
public static PrivilegeBits getPrivilegeBits(@Nullable @Nullable PropertyState propertyState, @NotNull @NotNull PrivilegeBitsProvider provider)
PrivilegeBits.getInstance(PropertyState)
this implementation will respect the special marker used to
reflect the dynamic nature of the PrivilegeConstants.JCR_ALL
privilege.propertyState
- A property storing privilege bits as Type.LONGS
representation or the
dynamic marker
for jcr:all
.provider
- An instanceof PrivilegeBitsProvider
to compute the bits for the PrivilegeConstants.JCR_ALL
, when
the given property contains the dynamic marker
for jcr:all
.PrivilegeBits
asPropertyState(String, PrivilegeBits, PrivilegeBitsProvider)
public static PropertyState asPropertyState(@NotNull @NotNull java.lang.String name, @NotNull @NotNull PrivilegeBits bits, @NotNull @NotNull PrivilegeBitsProvider provider)
PropertyState
of type Type.LONGS
with the given name
and the
long representation of the given bits
as values. If the bits present include jcr:all
the value
will be DYNAMIC_JCR_ALL_VALUE
instead to mark the dynamic nature of the jcr:all
privilege.
For any other bits this method is equivalent to PrivilegeBits.asPropertyState(String)
.name
- The name of the property to be created.bits
- The privilege bits from which the values will be retrieved.provider
- The PrivilegeBitsProvider
needed to check if the given bits include jcr:all
.PrivilegeBits.asPropertyState(String)
or a state with the
dynamic value marker
in case the given bits represent jcr:all
.public static boolean denotesDynamicJcrAll(@Nullable @Nullable PropertyState property)
Copyright © 2010 - 2020 Adobe. All Rights Reserved