|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.rest.util.BrooklynRestResourceUtils
public class BrooklynRestResourceUtils
Constructor Summary | |
BrooklynRestResourceUtils(ManagementContext mgmt)
|
Method Summary | |
---|---|
protected void
|
configureRenderingMetadata(ApplicationSpec spec, ApplicationBuilder appBuilder)
|
protected void
|
configureRenderingMetadata(ApplicationSpec input, EntitySpec entity)
|
protected void
|
configureRenderingMetadata(EntitySpec input, EntitySpec entity)
|
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()
|
java.lang.Object
|
getObjectValueForDisplay(java.lang.Object value)
|
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. |
protected java.util.Map
|
getRenderingConfigurationFor(java.lang.String catalogId)
|
java.lang.String
|
getStringValueForDisplay(java.lang.Object value)
true if the URL points to content which must be resolved on the server-side (i.e. classpath) and which is safe to do so (currently just images, though in future perhaps also javascript and html plugins) |
boolean
|
isUrlServerSideAndSafe(java.lang.String url)
|
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 |
---|
public BrooklynRestResourceUtils(ManagementContext mgmt)
Method Detail |
---|
protected void configureRenderingMetadata(ApplicationSpec spec, ApplicationBuilder appBuilder)
protected void configureRenderingMetadata(ApplicationSpec input, EntitySpec entity)
protected void configureRenderingMetadata(EntitySpec input, EntitySpec entity)
final String type = spec.getType(); public Application create(ApplicationSpec spec)
CatalogItem> item = getCatalog().addItem(clazz); public Response createCatalogEntryFromGroovyCode(java.lang.String groovyCode)
public Task destroy(Application application)
public static java.lang.String fixLocation(java.lang.String locationId)
public Application getApplication(java.lang.String application)
public BrooklynCatalog getCatalog()
public EntityLocal getEntity(java.lang.String application, java.lang.String entity)
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).
public LocationRegistry getLocationRegistry()
public java.lang.Object getObjectValueForDisplay(java.lang.Object value)
public Policy getPolicy(java.lang.String application, java.lang.String entity, java.lang.String policy)
public Policy getPolicy(Entity entity, java.lang.String policy)
protected java.util.Map getRenderingConfigurationFor(java.lang.String catalogId)
public java.lang.String getStringValueForDisplay(java.lang.Object value)
note we do not let caller access classpath through this mechanism, just those which are supplied by the platform administrator e.g. as an icon url
public boolean isUrlServerSideAndSafe(java.lang.String url)
public EntityLocal searchForEntityNamed(Entity root, java.lang.String entity)
public Task start(Application app, ApplicationSpec spec)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.