|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.entity.rebind.MementoTransformer
public class MementoTransformer
Helpers for transforming references to locations into location ids, and vice versa. This is used when serializing a location, and when re-binding that location, when the location holds references to other locations. TODO This is unpleasant code. It is required because there is not a clean distinction between object construction and object configuration. Therefore, some locations expect to be passed (in their constructor for SetFromFlag) references to other locations. That makes it hard to serialize a set of inter-connected locations, and subsequently rebind them. TODO Has limited support for transforms - fields that are iterables/maps must be declared of type List, Set, Collection, Iterable or Map.
Method Summary | |
---|---|
static java.lang.Object
|
transformEntitiesToIds(java.lang.Object value)
|
static java.lang.Object
|
transformIdsToEntities(RebindContext rebindContext, java.lang.Object value, java.lang.Class requiredType, boolean removeDanglingRefs)
|
static java.lang.Object
|
transformIdsToEntities(RebindContext rebindContext, java.lang.Object value, TypeToken requiredType, boolean removeDanglingRefs)
|
static java.lang.Object
|
transformIdsToLocations(RebindContext rebindContext, java.lang.Object value, java.lang.Class requiredType, boolean removeDanglingRefs)
|
static java.lang.Object
|
transformLocationsToIds(java.lang.Object value)
|
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() |
Method Detail |
---|
public static java.lang.Object transformEntitiesToIds(java.lang.Object value)
public static java.lang.Object transformIdsToEntities(RebindContext rebindContext, java.lang.Object value, java.lang.Class requiredType, boolean removeDanglingRefs)
public static java.lang.Object transformIdsToEntities(RebindContext rebindContext, java.lang.Object value, TypeToken requiredType, boolean removeDanglingRefs)
public static java.lang.Object transformIdsToLocations(RebindContext rebindContext, java.lang.Object value, java.lang.Class requiredType, boolean removeDanglingRefs)
public static java.lang.Object transformLocationsToIds(java.lang.Object value)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.