compositeValueSupport.set(key, value);
}
protected CompositeValue createCompositeValue(PropertyDefinitionMap propDefMap, MetaType metaType)
{
MutableCompositeMetaType compositeMetaType;
if (metaType != null)
compositeMetaType = (MutableCompositeMetaType)metaType;
else
{
// TODO: See if this else block is actually necessary (I think it is needed for creates).
String name = (propDefMap != null) ?
propDefMap.getName() : "CompositeMetaType";
String desc = (propDefMap != null && propDefMap.getDescription() != null) ?
propDefMap.getDescription() : "none";
compositeMetaType = new MutableCompositeMetaType(name, desc);
if (propDefMap != null)
{
for (PropertyDefinition mapMemberPropDef : propDefMap.getPropertyDefinitions().values())
{
String mapMemberDesc = (propDefMap.getDescription() != null) ? propDefMap.getDescription() : "none";
MetaType mapMemberMetaType = ProfileServiceUtil.convertPropertyDefinitionToMetaType(mapMemberPropDef);
compositeMetaType.addItem(mapMemberPropDef.getName(), mapMemberDesc, mapMemberMetaType);
}
}
}
return new CompositeValueSupport(compositeMetaType);
}