Class AggregatingDescriptors
java.lang.Object
org.apache.jackrabbit.oak.spi.descriptors.AggregatingDescriptors
- All Implemented Interfaces:
Descriptors
An AggregatingDescriptors is an implementation of Descriptors
that allows to aggregate multiple Descriptors (which are
provided dynamically via a whiteboard tracker).
-
Constructor Summary
ConstructorsConstructorDescriptionAggregatingDescriptors(Tracker<Descriptors> tracker) Create an AggregatingDescriptors which uses descriptors.getServices() at method invocation time -
Method Summary
Modifier and TypeMethodDescriptionString[]getKeys()Returns a string array holding all descriptor keys available for this implementation, both the standard descriptors defined by the string constants in this interface and any implementation-specific descriptors.@Nullable ValueThe value of a single-value descriptor is found by passing the key for that descriptor to this method.@Nullable Value[]The value array of a multi-value descriptor is found by passing the key for that descriptor to this method.booleanisSingleValueDescriptor(@NotNull String key) Returnstrueifkeyis a valid single-value descriptor; otherwise returnsfalsebooleanisStandardDescriptor(@NotNull String key) Returnstrueifkeyis a standard descriptor defined by the string constants in this interface andfalseif it is either a valid implementation-specific key or not a valid key.
-
Constructor Details
-
AggregatingDescriptors
Create an AggregatingDescriptors which uses descriptors.getServices() at method invocation time
-
-
Method Details
-
getKeys
Description copied from interface:DescriptorsReturns a string array holding all descriptor keys available for this implementation, both the standard descriptors defined by the string constants in this interface and any implementation-specific descriptors. Used in conjunction withDescriptors.getValue(String key)andDescriptors.getValues(String key)to query information about this repository implementation.- Specified by:
getKeysin interfaceDescriptors- Returns:
- a string array holding all descriptor keys.
-
isStandardDescriptor
Description copied from interface:DescriptorsReturnstrueifkeyis a standard descriptor defined by the string constants in this interface andfalseif it is either a valid implementation-specific key or not a valid key.- Specified by:
isStandardDescriptorin interfaceDescriptors- Parameters:
key- a descriptor key.- Returns:
- whether
keyis a standard descriptor.
-
isSingleValueDescriptor
Description copied from interface:DescriptorsReturnstrueifkeyis a valid single-value descriptor; otherwise returnsfalse- Specified by:
isSingleValueDescriptorin interfaceDescriptors- Parameters:
key- a descriptor key.- Returns:
- whether the specified descriptor is multi-valued.
-
getValue
Description copied from interface:DescriptorsThe value of a single-value descriptor is found by passing the key for that descriptor to this method. Ifkeyis the key of a multi-value descriptor or not a valid key this method returnsnull.- Specified by:
getValuein interfaceDescriptors- Parameters:
key- a descriptor key.- Returns:
- The value of the indicated descriptor
-
getValues
Description copied from interface:DescriptorsThe value array of a multi-value descriptor is found by passing the key for that descriptor to this method. Ifkeyis the key of a single-value descriptor then this method returns that value as an array of size one. Ifkeyis not a valid key this method returnsnull.- Specified by:
getValuesin interfaceDescriptors- Parameters:
key- a descriptor key.- Returns:
- the value array for the indicated descriptor
-