Examples of ModelObject


Examples of org.exoplatform.portal.config.model.ModelObject

        List<UIComponent> children = uiPortal.getChildren();
        if (children == null)
            return model;
        ArrayList<ModelObject> newChildren = new ArrayList<ModelObject>();
        for (UIComponent child : children) {
            ModelObject component = buildModelObject(child);
            if (component != null)
                newChildren.add(component);
        }
        model.getPortalLayout().setChildren(newChildren);
        model.getPortalLayout().setMoveAppsPermissions(uiPortal.getMoveAppsPermissions());
View Full Code Here

Examples of org.exoplatform.portal.config.model.ModelObject

            List<UIComponent> uiChildren = uiPage.getChildren();
            if (uiChildren == null)
                return;
            ArrayList<ModelObject> children = new ArrayList<ModelObject>();
            for (UIComponent child : uiChildren) {
                ModelObject component = PortalDataMapper.buildModelObject(child);
                if (component != null)
                    children.add(component);
            }
            page.setChildren(children);
            uiPage.getChildren().clear();
View Full Code Here

Examples of org.exoplatform.portal.config.model.ModelObject

            return;
         }
         ArrayList<ModelObject> children = new ArrayList<ModelObject>();
         for (UIComponent child : uiChildren)
         {
            ModelObject component = PortalDataMapper.buildModelObject(child);
            if (component != null)
               children.add(component);
         }
         page.setChildren(children);
         uiPage.getChildren().clear();
View Full Code Here

Examples of org.exoplatform.portal.config.model.ModelObject

         if (uiChildren == null)
            return;
         ArrayList<ModelObject> children = new ArrayList<ModelObject>();
         for (UIComponent child : uiChildren)
         {
            ModelObject component = PortalDataMapper.buildModelObject(child);
            if (component != null)
               children.add(component);
         }
         page.setChildren(children);
         uiPage.getChildren().clear();
View Full Code Here

Examples of org.exoplatform.portal.config.model.ModelObject

   protected static final Log log = ExoLogger.getLogger("portal:PortalDataMapper");

   @SuppressWarnings("unchecked")
   public static ModelObject buildModelObject(UIComponent uiComponent)
   {
      ModelObject model = null;
      if (uiComponent instanceof UIPortal)
      {
         model = toPortal((UIPortal)uiComponent);
      }
      else if (uiComponent instanceof UIPageBody)
View Full Code Here

Examples of org.exoplatform.portal.config.model.ModelObject

      if (uiChildren == null)
         return;
      ArrayList<ModelObject> children = new ArrayList<ModelObject>();
      for (UIComponent child : uiChildren)
      {
         ModelObject component = buildModelObject(child);
         if (component != null)
            children.add(component);
      }
      model.setChildren(children);
   }
View Full Code Here

Examples of org.exoplatform.portal.config.model.ModelObject

      if (children == null)
         return model;
      ArrayList<ModelObject> newChildren = new ArrayList<ModelObject>();
      for (UIComponent child : children)
      {
         ModelObject component = buildModelObject(child);
         if (component != null)
            newChildren.add(component);
      }
      model.getPortalLayout().setChildren(newChildren);
      return model;
View Full Code Here

Examples of org.gatein.management.api.model.ModelObject

   {
      ModelValue.ModelValueType type = value.getValueType();
      switch (type)
      {
         case OBJECT:
            ModelObject mo = value.asValue(ModelObject.class);
            for (String name : mo.getNames())
            {
               resolveLinks(mo.get(name), uriInfo);
            }
            break;
         case REFERENCE:
            ModelReference ref = value.asValue(ModelReference.class);
            PathAddress address = ref.getValue();
View Full Code Here

Examples of org.gatein.management.api.model.ModelObject

                ModelValue mv = list.get(i);
                String field = "attributes["+i+"]"; // Used for error reporting
                if (mv.getValueType() != ModelValue.ModelValueType.OBJECT) {
                    throw invalidType(mv, ModelValue.ModelValueType.OBJECT, field);
                }
                ModelObject attrModel = mv.asValue(ModelObject.class);
                if (!attrModel.hasDefined("key")) {
                    throw requiredField(field, "key");
                }
                String key = get(attrModel, ModelString.class, "key").getValue();
                if (!attrModel.has("value")) {
                    throw requiredField(field, "value");
                }
                String value = get(attrModel, ModelString.class, "value").getValue();
                site.getAttributes().put(key, value);
            }
View Full Code Here

Examples of org.gatein.management.api.model.ModelObject

        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"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.