Class DiscoveryLiteDescriptor
java.lang.Object
org.apache.sling.discovery.commons.providers.spi.base.DiscoveryLiteDescriptor
Simplifies access to the underlying JSON-backed oak discovery-lite descriptor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
TODO: avoid hardcoding the constant here but use an Oak constant class instead if possible -
Method Summary
Modifier and TypeMethodDescriptionint[]
Returns the 'active' field of the discovery-lite descriptorint[]
Returns the 'deactivating' field of the discovery-lite descriptorstatic DiscoveryLiteDescriptor
getDescriptorFrom
(ResourceResolver resourceResolver) {"seq":8,"final":true,"id":"aae34e9a-b08d-409e-be10-9ff4106e5387","me":4,"active":[4],"deactivating":[],"inactive":[1,2,3]}Returns the raw toString of the underlying descriptorint
getMyId()
Returns the 'me' field of the discovery-lite descriptorReturns the 'id' field of the discovery-lite descriptorboolean
isFinal()
toString()
-
Field Details
-
OAK_DISCOVERYLITE_CLUSTERVIEW
TODO: avoid hardcoding the constant here but use an Oak constant class instead if possible- See Also:
-
-
Method Details
-
getDescriptorFrom
public static DiscoveryLiteDescriptor getDescriptorFrom(ResourceResolver resourceResolver) throws Exception {"seq":8,"final":true,"id":"aae34e9a-b08d-409e-be10-9ff4106e5387","me":4,"active":[4],"deactivating":[],"inactive":[1,2,3]}- Throws:
Exception
-
getMyId
Returns the 'me' field of the discovery-lite descriptor- Returns:
- the 'me' field of the discovery-lite descriptor
- Throws:
Exception
- if anything in the descriptor is wrongly formatted
-
getDeactivatingIds
Returns the 'deactivating' field of the discovery-lite descriptor- Returns:
- the 'deactivating' field of the discovery-lite descriptor
- Throws:
Exception
- if anything in the descriptor is wrongly formatted
-
getActiveIds
Returns the 'active' field of the discovery-lite descriptor- Returns:
- the 'active' field of the discovery-lite descriptor
- Throws:
Exception
- if anything in the descriptor is wrongly formatted
-
getViewId
Returns the 'id' field of the discovery-lite descriptor- Returns:
- the 'id' field of the discovery-lite descriptor
- Throws:
Exception
- if anything in the descriptor is wrongly formatted
-
toString
-
getDescriptorStr
Returns the raw toString of the underlying descriptor- Returns:
- the raw toString of the underlying descriptor
-
getSeqNum
- Throws:
Exception
-
isFinal
- Throws:
Exception
-