brooklyn.catalog
Interface BrooklynCatalog


public interface BrooklynCatalog


Method Summary
 void addItem(CatalogItem<?> item)
          adds an item to the 'manual' catalog; this does not update the classpath or have a record to the java Class, so callers of this method will typically also need to call addToClasspath(String) or addToClasspath(ClassLoader)
 CatalogItem<?> addItem(Class<?> clazz)
          creates a catalog item and adds it to the 'manual' catalog, with the corresponding Class definition (loaded by a classloader) registered and available in the classloader.
 void addToClasspath(ClassLoader loader)
          adds a classpath entry which will be used by the 'manual' catalog
 void addToClasspath(String url)
          adds a classpath entry which will be used by the 'manual' catalog
<T> CatalogItem<T>
getCatalogItem(Class<T> type, String id)
          variant of getCatalogItem(String) which checks (and casts) type for convenience (returns null if type does not match)
 CatalogItem<?> getCatalogItem(String id)
          finds the item with the given ID, or null if not found
<T> Iterable<CatalogItem<T>>
getCatalogItems()
          returns all items in the catalog
<T> Iterable<CatalogItem<T>>
getCatalogItems(com.google.common.base.Predicate<? super CatalogItem<T>> filter)
          convenience for filtering items in the catalog; see CatalogPredicates for useful filters
 ClassLoader getRootClassLoader()
          returns the classloader which should be used to load classes and entities; this includes all the catalog's classloaders in the right order
<T> Class<? extends T>
loadClass(CatalogItem<T> item)
          throws exceptions if any problems
<T> Class<? extends T>
loadClassByType(String typeName, Class<T> typeClass)
           
 

Method Detail

getCatalogItem

CatalogItem<?> getCatalogItem(String id)
finds the item with the given ID, or null if not found


getCatalogItem

<T> CatalogItem<T> getCatalogItem(Class<T> type,
                                  String id)
variant of getCatalogItem(String) which checks (and casts) type for convenience (returns null if type does not match)


getCatalogItems

<T> Iterable<CatalogItem<T>> getCatalogItems()
returns all items in the catalog


getCatalogItems

<T> Iterable<CatalogItem<T>> getCatalogItems(com.google.common.base.Predicate<? super CatalogItem<T>> filter)
convenience for filtering items in the catalog; see CatalogPredicates for useful filters


getRootClassLoader

ClassLoader getRootClassLoader()
returns the classloader which should be used to load classes and entities; this includes all the catalog's classloaders in the right order


loadClass

<T> Class<? extends T> loadClass(CatalogItem<T> item)
throws exceptions if any problems


loadClassByType

<T> Class<? extends T> loadClassByType(String typeName,
                                       Class<T> typeClass)

addItem

void addItem(CatalogItem<?> item)
adds an item to the 'manual' catalog; this does not update the classpath or have a record to the java Class, so callers of this method will typically also need to call addToClasspath(String) or addToClasspath(ClassLoader)


addItem

CatalogItem<?> addItem(Class<?> clazz)
creates a catalog item and adds it to the 'manual' catalog, with the corresponding Class definition (loaded by a classloader) registered and available in the classloader.

note that the class will be available for this session only, although the record of the item will appear in the catalog DTO if exported, so it is recommended to edit the 'manual' catalog DTO if using it to generate a catalog, either adding the appropriate classpath URL or removing this entry.


addToClasspath

void addToClasspath(ClassLoader loader)
adds a classpath entry which will be used by the 'manual' catalog


addToClasspath

void addToClasspath(String url)
adds a classpath entry which will be used by the 'manual' catalog



Copyright © 2013. All Rights Reserved.