siteModel.set("skin", site.getSkin());
populate("locale", site.getLocale(), siteModel);
populate("access-permissions", site.getAccessPermission(), siteModel);
populate("edit-permissions", site.getEditPermission(), siteModel);
ModelList attrList = siteModel.get("attributes", ModelList.class);
Attributes attributes = site.getAttributes();
for (String key : attributes.keySet()) {
ModelObject attr = attrList.add().setEmptyObject();
attr.set("key", key);
attr.set("value", attributes.get(key));
}
// Pages
ModelReference pagesRef = siteModel.get("pages", ModelReference.class);
pagesRef.set(address.append("pages"));