Package org.apache.sling.testing.clients.osgi

# 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

Modifier and Type
Method
Description
`ComponentInfo`
`forId(String id)`
`ComponentInfo`
`forName(String name)`
`ComponentInfo`
`forPid(String pid)`
`int`
`getNumberOfInstalledComponents()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ComponentsInfo

public ComponentsInfo(com.fasterxml.jackson.databind.JsonNode rootNode)
The only constructor.

Parameters:
  `rootNode` - the root JSON node of the components info.

## Method Details

### getNumberOfInstalledComponents

public int getNumberOfInstalledComponents() throws TestingValidationException

Returns:
  the number of installed components
Throws:
  `TestingValidationException` - if the info cannot be retrieved

### forId

public ComponentInfo forId(String id) throws TestingValidationException

Parameters:
  `id` - the id of the component
Returns:
  the ComponentInfo for a component with the identifier `id`
Throws:
  `TestingValidationException` - if the info cannot be retrieved

### forName

public ComponentInfo forName(String name) throws TestingValidationException

Parameters:
  `name` - the name of the component
Returns:
  the ComponentInfo for a component with the name `name`
Throws:
  `TestingValidationException` - if the info cannot be retrieved

### forPid

public ComponentInfo forPid(String pid) throws TestingValidationException

Parameters:
  `pid` - the pid of the component
Returns:
  the ComponentInfo for a component with the pid `pid`
Throws:
  `TestingValidationException` - if the info cannot be retrieved