Brooklyn

brooklyn.rest.util
[Java] Class BrooklynRestResourceUtils

java.lang.Object
  brooklyn.rest.util.BrooklynRestResourceUtils

public class BrooklynRestResourceUtils

Constructor Summary
BrooklynRestResourceUtils(ManagementContext mgmt)

 
Method Summary
Application create(ApplicationSpec spec)

Response createCatalogEntryFromGroovyCode(java.lang.String groovyCode)

Task destroy(Application application)

static java.lang.String fixLocation(java.lang.String locationId)

Application getApplication(java.lang.String application)

looks for the given application instance, first by ID then by name

BrooklynCatalog getCatalog()

EntityLocal getEntity(java.lang.String application, java.lang.String entity)

finds the entity indicated by the given ID or name

LocationRegistry getLocationRegistry()

Policy getPolicy(java.lang.String application, java.lang.String entity, java.lang.String policy)

finds the policy indicated by the given ID or name.

Policy getPolicy(Entity entity, java.lang.String policy)

finds the policy indicated by the given ID or name.

EntityLocal searchForEntityNamed(Entity root, java.lang.String entity)

walks the hierarchy (depth-first) at root (often an Application) looking for an entity matching the given ID or name; returns the first such entity, or null if none found

Task start(Application app, ApplicationSpec spec)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Constructor Detail

BrooklynRestResourceUtils

public BrooklynRestResourceUtils(ManagementContext mgmt)


 
Method Detail

create

@SuppressWarnings("unchecked")
public Application create(ApplicationSpec spec)


createCatalogEntryFromGroovyCode

@SuppressWarnings({ "rawtypes" })
public Response createCatalogEntryFromGroovyCode(java.lang.String groovyCode)


destroy

public Task destroy(Application application)


fixLocation

@Deprecated
public static java.lang.String fixLocation(java.lang.String locationId)


getApplication

public Application getApplication(java.lang.String application)
looks for the given application instance, first by ID then by name
throws:
404 if not found


getCatalog

public BrooklynCatalog getCatalog()


getEntity

public EntityLocal getEntity(java.lang.String application, java.lang.String entity)
finds the entity indicated by the given ID or name

prefers ID based lookup in which case appId is optional, and if supplied will be enforced. optionally the name can be supplied, for cases when paths should work across versions, in which case names will be searched recursively (and the application is required).

throws:
404 or 412 (unless input is null in which case output is null)


getLocationRegistry

public LocationRegistry getLocationRegistry()


getPolicy

public Policy getPolicy(java.lang.String application, java.lang.String entity, java.lang.String policy)
finds the policy indicated by the given ID or name.
throws:
404 or 412 (unless input is null in which case output is null)
See Also:
getEntity(java.lang.String, java.lang.String)


getPolicy

public Policy getPolicy(Entity entity, java.lang.String policy)
finds the policy indicated by the given ID or name.
throws:
404 or 412 (unless input is null in which case output is null)
See Also:
getPolicy(java.lang.String, java.lang.String, java.lang.String)


searchForEntityNamed

public EntityLocal searchForEntityNamed(Entity root, java.lang.String entity)
walks the hierarchy (depth-first) at root (often an Application) looking for an entity matching the given ID or name; returns the first such entity, or null if none found


start

public Task start(Application app, ApplicationSpec spec)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.