Brooklyn

brooklyn.entity.rebind
[Java] Class MementoTransformer

java.lang.Object
  brooklyn.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.

Authors:
aled


Field Summary
protected static Logger LOG

 
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()
 

Field Detail

LOG

protected static final Logger LOG


 
Method Detail

transformEntitiesToIds

public static java.lang.Object transformEntitiesToIds(java.lang.Object value)


transformIdsToEntities

public static java.lang.Object transformIdsToEntities(RebindContext rebindContext, java.lang.Object value, java.lang.Class requiredType, boolean removeDanglingRefs)


transformIdsToEntities

public static java.lang.Object transformIdsToEntities(RebindContext rebindContext, java.lang.Object value, TypeToken requiredType, boolean removeDanglingRefs)


transformIdsToLocations

public static java.lang.Object transformIdsToLocations(RebindContext rebindContext, java.lang.Object value, java.lang.Class requiredType, boolean removeDanglingRefs)


transformLocationsToIds

public static java.lang.Object transformLocationsToIds(java.lang.Object value)


 

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