Class ServicesInfo
java.lang.Object
org.apache.sling.testing.clients.osgi.ServicesInfo
A simple Wrapper around the returned JSON when requesting the status of /system/console/services
-
Constructor Summary
ConstructorsConstructorDescriptionServicesInfo(com.fasterxml.jackson.databind.JsonNode root) The only constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturn service info for a service with given idReturn service infos for a bundle with namenameint
-
Constructor Details
-
ServicesInfo
The only constructor.- Parameters:
root- the root JSON node of the bundles info.- Throws:
TestingValidationException- if the json does not contain the proper info
-
-
Method Details
-
getTotalNumOfServices
public int getTotalNumOfServices()- Returns:
- total number of bundles.
-
forId
Return service info for a service with given id- Parameters:
id- the id of the service- Returns:
- the BundleInfo
- Throws:
TestingValidationException- if the info could not be retrieved
-
forType
Return service infos for a bundle with namename- Parameters:
type- the type of the service- Returns:
- a Collection of
ServiceInfos of all services with the given type. Might be empty, nevernull - Throws:
TestingValidationException- if the info cannot be retrieved
-