public class EntityManagementUtils
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | EntityManagementUtils.CreationResult<T,U>container for operation which creates something and which wants to return both
 the items created and any pending create/start task | 
| Modifier and Type | Field and Description | 
|---|---|
| static ConfigKey<java.lang.Boolean> | WRAPPER_APP_MARKERA marker config value which indicates that an  Applicationentity was created automatically,
 needed because a plan might give multiple top-level entities or a non-Application top-level entity,
 in a context where Brooklyn requires anApplicationat the root. | 
| Constructor and Description | 
|---|
| EntityManagementUtils() | 
| Modifier and Type | Method and Description | 
|---|---|
| static EntityManagementUtils.CreationResult<java.util.List<Entity>,java.util.List<java.lang.String>> | addChildren(Entity parent,
           java.lang.String yaml,
           java.lang.Boolean start) | 
| static EntityManagementUtils.CreationResult<java.util.List<Entity>,java.util.List<java.lang.String>> | addChildrenStarting(Entity parent,
                   java.lang.String yaml) | 
| static java.util.List<Entity> | addChildrenUnstarted(Entity parent,
                    java.lang.String yaml)adds entities from the given yaml, under the given parent; but does not start them | 
| static boolean | canPromoteChildrenInWrappedApplication(EntitySpec<? extends Application> spec)Deprecated. 
 since 0.9.0 use  canUnwrapEntity(EntitySpec) | 
| static boolean | canPromoteWrappedApplication(EntitySpec<? extends Application> app)Deprecated. 
 since 0.9.0 use  canUnwrapApplication(EntitySpec) | 
| static boolean | canUnwrapApplication(EntitySpec<? extends Application> wrapperApplication)As  canUnwrapEntity(EntitySpec)but additionally requiring that the wrapped item is anApplication,
 for use when the context requires anApplicationie a root of a spec. | 
| static boolean | canUnwrapEntity(EntitySpec<? extends Entity> spec)Returns true if the spec is for a wrapper app with no important settings, wrapping a single child entity. | 
| static <T,SpecT extends AbstractBrooklynObjectSpec<? extends T,SpecT>>  | createCatalogSpec(ManagementContext mgmt,
                 CatalogItem<T,SpecT> item)Deprecated.  | 
| static <T,SpecT extends AbstractBrooklynObjectSpec<? extends T,SpecT>>  | createCatalogSpec(ManagementContext mgmt,
                 CatalogItem<T,SpecT> item,
                 java.util.Set<java.lang.String> encounteredTypes)Deprecated.  | 
| static EntitySpec<? extends Application> | createEntitySpecForApplication(ManagementContext mgmt,
                              java.lang.String plan) | 
| static <T extends Application>  | createStarting(ManagementContext mgmt,
              EntitySpec<T> appSpec) | 
| static EntityManagementUtils.CreationResult<? extends Application,java.lang.Void> | createStarting(ManagementContext mgmt,
              java.lang.String appSpec) | 
| static <T extends Application>  | createUnstarted(ManagementContext mgmt,
               EntitySpec<T> spec)creates an application from the given app spec, managed by the given management context | 
| static Application | createUnstarted(ManagementContext mgmt,
               java.lang.String plan)as  createUnstarted(ManagementContext, EntitySpec)but for a string plan (e.g. | 
| static boolean | isWrapperApp(EntitySpec<?> spec) | 
| static EntitySpec<? extends Application> | newWrapperApp() | 
| static <T extends Application>  | start(T app) | 
| static EntitySpec<? extends Application> | unwrapApplication(EntitySpec<? extends Application> wrapperApplication)Unwraps a wrapped  Applicationif appropriate. | 
| static EntitySpec<? extends Entity> | unwrapEntity(EntitySpec<? extends Entity> wrapperApplication)Unwraps a single  Entityif appropriate. | 
public static final ConfigKey<java.lang.Boolean> WRAPPER_APP_MARKER
Application entity was created automatically,
 needed because a plan might give multiple top-level entities or a non-Application top-level entity,
 in a context where Brooklyn requires an Application at the root.
 
 Typically when such a wrapper app wraps another Application
 (or where we are looking for a single Entity, or a list to add, and they are so wrapped)
 it will be unwrapped. 
 See newWrapperApp() and unwrapApplication(EntitySpec).
public static <T extends Application> T createUnstarted(ManagementContext mgmt, EntitySpec<T> spec)
public static Application createUnstarted(ManagementContext mgmt, java.lang.String plan)
createUnstarted(ManagementContext, EntitySpec) but for a string plan (e.g. camp yaml)public static EntitySpec<? extends Application> createEntitySpecForApplication(ManagementContext mgmt, java.lang.String plan)
@Deprecated public static <T,SpecT extends AbstractBrooklynObjectSpec<? extends T,SpecT>> SpecT createCatalogSpec(ManagementContext mgmt, CatalogItem<T,SpecT> item)
@Deprecated public static <T,SpecT extends AbstractBrooklynObjectSpec<? extends T,SpecT>> SpecT createCatalogSpec(ManagementContext mgmt, CatalogItem<T,SpecT> item, java.util.Set<java.lang.String> encounteredTypes)
public static <T extends Application> EntityManagementUtils.CreationResult<T,java.lang.Void> createStarting(ManagementContext mgmt, EntitySpec<T> appSpec)
public static EntityManagementUtils.CreationResult<? extends Application,java.lang.Void> createStarting(ManagementContext mgmt, java.lang.String appSpec)
public static <T extends Application> EntityManagementUtils.CreationResult<T,java.lang.Void> start(T app)
public static EntityManagementUtils.CreationResult<java.util.List<Entity>,java.util.List<java.lang.String>> addChildren(Entity parent, java.lang.String yaml, java.lang.Boolean start)
public static java.util.List<Entity> addChildrenUnstarted(Entity parent, java.lang.String yaml)
public static EntityManagementUtils.CreationResult<java.util.List<Entity>,java.util.List<java.lang.String>> addChildrenStarting(Entity parent, java.lang.String yaml)
public static EntitySpec<? extends Entity> unwrapEntity(EntitySpec<? extends Entity> wrapperApplication)
Entity if appropriate. See WRAPPER_APP_MARKER.
 Also see canUnwrapEntity(EntitySpec) to test whether it will unwrap.public static EntitySpec<? extends Application> unwrapApplication(EntitySpec<? extends Application> wrapperApplication)
Application if appropriate.
 This is like canUnwrapEntity(EntitySpec) with an additional check that the wrapped child is an Application. 
 See WRAPPER_APP_MARKER for an overview. 
 Also see canUnwrapApplication(EntitySpec) to test whether it will unwrap.public static EntitySpec<? extends Application> newWrapperApp()
public static boolean canUnwrapApplication(EntitySpec<? extends Application> wrapperApplication)
canUnwrapEntity(EntitySpec)
 but additionally requiring that the wrapped item is an Application,
 for use when the context requires an Application ie a root of a spec.WRAPPER_APP_MARKER@Deprecated public static boolean canPromoteWrappedApplication(EntitySpec<? extends Application> app)
canUnwrapApplication(EntitySpec)public static boolean canUnwrapEntity(EntitySpec<? extends Entity> spec)
Application; 
 see canUnwrapApplication(EntitySpec) if that is required).
 
 Note callers will normally use one of unwrapEntity(EntitySpec) or unwrapApplication(EntitySpec).
for an overview@Deprecated public static boolean canPromoteChildrenInWrappedApplication(EntitySpec<? extends Application> spec)
canUnwrapEntity(EntitySpec)public static boolean isWrapperApp(EntitySpec<?> spec)