Examples of LayoutPrototype


Examples of com.liferay.portal.model.LayoutPrototype

    JSONObject layoutTemplateJSONObject = jsonObject.getJSONObject(
      "layoutTemplate");

    String name = getName(layoutTemplateJSONObject.getString("name"));

    LayoutPrototype layoutPrototype = getLayoutPrototype(companyId, name);

    if (layoutPrototype != null) {
      if (!developerModeEnabled) {
        if (_log.isInfoEnabled()) {
          _log.info(
            "Layout prototype with name " + name +
              " already exists for company " + companyId);
        }

        return;
      }

      LayoutPrototypeLocalServiceUtil.deleteLayoutPrototype(
        layoutPrototype);
    }

    layoutPrototype =
      LayoutPrototypeLocalServiceUtil.addLayoutPrototype(
        userId, companyId, getMap(name), name, true, serviceContext);

    JSONArray columnsJSONArray = layoutTemplateJSONObject.getJSONArray(
      "columns");

    Layout layout = layoutPrototype.getLayout();

    addLayoutColumns(
      layout, LayoutTypePortletConstants.COLUMN_PREFIX, columnsJSONArray);

    LayoutLocalServiceUtil.updateLayout(
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.