## org.apache.felix.ipojo.webconsole
Class StateUtils

    java.lang.Object
      org.apache.felix.ipojo.webconsole.StateUtils

    public class StateUtils

extends java.lang.Object

Helper class dealing with instance and factory states.

Author:
  Felix Project Team

Constructor Summary
`StateUtils()`

Method Summary
`static java.lang.String` `getDependencyBindingPolicy(int policy)` Gets the dependency binding policy as a String.
`static java.lang.String` `getDependencyState(int state)` Gets the dependency state as a String.
`static java.lang.String` `getFactoryState(int state)` Gets the factory state as a String.
`static java.util.List<java.lang.String>` `getInstanceList(java.util.List<org.apache.felix.ipojo.architecture.Architecture> archs, java.lang.String factory)` Gets the instance list created by the given factory.
`static java.lang.String` `getInstanceState(int state)` Gets the instance state as a String.
`static int` `getInvalidFactoriesCount(java.util.List<org.apache.felix.ipojo.Factory> factories)` Gets the number of invalid factories.
`static int` `getInvalidHandlersCount(java.util.List<org.apache.felix.ipojo.HandlerFactory> handlers)` Gets the number of invalid handlers.
`static int` `getInvalidInstancesCount(java.util.List<org.apache.felix.ipojo.architecture.Architecture> archs)` Gets the number of invalid instances.
`static java.lang.String` `getProvidedServiceState(int state)` Gets the provided service state as a String.
`static int` `getValidFactoriesCount(java.util.List<org.apache.felix.ipojo.Factory> factories)` Gets the number of valid factories.
`static int` `getValidHandlersCount(java.util.List<org.apache.felix.ipojo.HandlerFactory> handlers)` Gets the number of valid handlers.
`static int` `getValidInstancesCount(java.util.List<org.apache.felix.ipojo.architecture.Architecture> archs)` Gets the number of valid instances.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StateUtils

    public StateUtils()

Method Detail

### getValidInstancesCount

    public static int getValidInstancesCount(java.util.List<org.apache.felix.ipojo.architecture.Architecture> archs)

  Gets the number of valid instances.

  Parameters:
    `archs` - the instance architecture list
  Returns:
    the number of valid instances.

### getInvalidInstancesCount

    public static int getInvalidInstancesCount(java.util.List<org.apache.felix.ipojo.architecture.Architecture> archs)

  Gets the number of invalid instances.

  Parameters:
    `archs` - the instance architecture list
  Returns:
    the number of invalid instances.

### getValidFactoriesCount

    public static int getValidFactoriesCount(java.util.List<org.apache.felix.ipojo.Factory> factories)

  Gets the number of valid factories.

  Parameters:
    `factories` - the factory list
  Returns:
    the number of valid factories.

### getInvalidFactoriesCount

    public static int getInvalidFactoriesCount(java.util.List<org.apache.felix.ipojo.Factory> factories)

  Gets the number of invalid factories.

  Parameters:
    `factories` - the factory list
  Returns:
    the number of invalid factories.

### getValidHandlersCount

    public static int getValidHandlersCount(java.util.List<org.apache.felix.ipojo.HandlerFactory> handlers)

  Gets the number of valid handlers.

  Parameters:
    `handlers` - the handler factory list
  Returns:
    the number of valid handlers.

### getInvalidHandlersCount

    public static int getInvalidHandlersCount(java.util.List<org.apache.felix.ipojo.HandlerFactory> handlers)

  Gets the number of invalid handlers.

  Parameters:
    `handlers` - the handler factory list
  Returns:
    the number of invalid handlers.

### getInstanceState

    public static java.lang.String getInstanceState(int state)

  Gets the instance state as a String.

  Parameters:
    `state` - the state.
  Returns:
    the String form of the state.

### getFactoryState

    public static java.lang.String getFactoryState(int state)

  Gets the factory state as a String.

  Parameters:
    `state` - the state.
  Returns:
    the String form of the state.

### getInstanceList

    public static java.util.List<java.lang.String> getInstanceList(java.util.List<org.apache.felix.ipojo.architecture.Architecture> archs,
                                                                   java.lang.String factory)

  Gets the instance list created by the given factory.

  Parameters:
    `archs` - the list of instance architectures
    `factory` - the factory name
  Returns:
    the list containing the created instances (name)

### getDependencyState

    public static java.lang.String getDependencyState(int state)

  Gets the dependency state as a String.

  Parameters:
    `state` - the state.
  Returns:
    the String form of the state.

### getDependencyBindingPolicy

    public static java.lang.String getDependencyBindingPolicy(int policy)

  Gets the dependency binding policy as a String.

  Parameters:
    `policy` - the policy.
  Returns:
    the String form of the policy.

### getProvidedServiceState

    public static java.lang.String getProvidedServiceState(int state)

  Gets the provided service state as a String.

  Parameters:
    `state` - the state.
  Returns:
    the String form of the state.

Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.