Class ComponentsInfo
- java.lang.Object
-
- org.apache.sling.testing.clients.osgi.ComponentsInfo
-
public class ComponentsInfo extends Object
Thin wrapper around the list of components
-
-
Constructor Summary
Constructors Constructor Description ComponentsInfo(com.fasterxml.jackson.databind.JsonNode rootNode)
The only constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentInfo
forId(String id)
ComponentInfo
forName(String name)
ComponentInfo
forPid(String pid)
int
getNumberOfInstalledComponents()
-
-
-
Constructor Detail
-
ComponentsInfo
public ComponentsInfo(com.fasterxml.jackson.databind.JsonNode rootNode) throws ClientException
The only constructor.- Parameters:
rootNode
- the root JSON node of the components info.- Throws:
ClientException
- if the info cannot be retrieved
-
-
Method Detail
-
getNumberOfInstalledComponents
public int getNumberOfInstalledComponents() throws ClientException
- Returns:
- the number of installed components
- Throws:
ClientException
- if the info cannot be retrieved
-
forId
public ComponentInfo forId(String id) throws ClientException
- Parameters:
id
- the id of the component- Returns:
- the ComponentInfo for a component with the identifier
id
- Throws:
ClientException
- if the info cannot be retrieved
-
forName
public ComponentInfo forName(String name) throws ClientException
- Parameters:
name
- the name of the component- Returns:
- the ComponentInfo for a component with the name
name
- Throws:
ClientException
- if the info cannot be retrieved
-
forPid
public ComponentInfo forPid(String pid) throws ClientException
- Parameters:
pid
- the pid of the component- Returns:
- the ComponentInfo for a component with the pid
pid
- Throws:
ClientException
- if the info cannot be retrieved
-
-