use of com.enonic.xp.lib.common.PropertyTreeMapper in project xp by enonic.
the class ContentMapper method serializeExtraData.
private void serializeExtraData(final MapGenerator gen, final Iterable<ExtraData> values) {
gen.map("x");
final ListMultimap<ApplicationKey, ExtraData> extradatasByModule = ArrayListMultimap.create();
for (ExtraData extraData : values) {
extradatasByModule.put(extraData.getName().getApplicationKey(), extraData);
}
for (final ApplicationKey applicationKey : extradatasByModule.keys()) {
final List<ExtraData> extraDatas = extradatasByModule.get(applicationKey);
if (extraDatas.isEmpty()) {
continue;
}
gen.map(extraDatas.get(0).getApplicationPrefix());
for (final ExtraData extraData : extraDatas) {
gen.map(extraData.getName().getLocalName());
new PropertyTreeMapper(extraData.getData()).serialize(gen);
gen.end();
}
gen.end();
}
gen.end();
}
use of com.enonic.xp.lib.common.PropertyTreeMapper in project xp by enonic.
the class AuditLogMapper method serializeData.
private static void serializeData(final MapGenerator gen, final PropertyTree value) {
gen.map("data");
new PropertyTreeMapper(value).serialize(gen);
gen.end();
}
use of com.enonic.xp.lib.common.PropertyTreeMapper in project xp by enonic.
the class ScheduledJobMapper method serializeConfig.
private void serializeConfig(final MapGenerator gen, final PropertyTree config) {
gen.map("config");
new PropertyTreeMapper(config).serialize(gen);
gen.end();
}
use of com.enonic.xp.lib.common.PropertyTreeMapper in project xp by enonic.
the class RepositoryMapper method serialize.
private void serialize(final MapGenerator gen, final PropertyTree repositoryData) {
gen.map("data");
new PropertyTreeMapper(repositoryData).serialize(gen);
gen.end();
}
Aggregations