Package com.liferay.portal.model

Examples of com.liferay.portal.model.LayoutTypePortlet


    Layout layout = LayoutLocalServiceUtil.addLayout(
      userId, groupId, privateLayout, parentLayoutId, nameMap, titleMap,
      null, null, null, LayoutConstants.TYPE_PORTLET, typeSettings,
      hidden, friendlyURLMap, serviceContext);

    LayoutTypePortlet layoutTypePortlet =
      (LayoutTypePortlet)layout.getLayoutType();

    String layoutTemplateId = layoutJSONObject.getString(
      "layoutTemplateId", _defaultLayoutTemplateId);

    if (Validator.isNotNull(layoutTemplateId)) {
      layoutTypePortlet.setLayoutTemplateId(
        userId, layoutTemplateId, false);
    }

    JSONArray columnsJSONArray = layoutJSONObject.getJSONArray("columns");
View Full Code Here


  protected void addLayoutColumnPortlet(
      Layout layout, String columnId, JSONObject portletJSONObject)
    throws Exception {

    LayoutTypePortlet layoutTypePortlet =
      (LayoutTypePortlet)layout.getLayoutType();

    String rootPortletId = portletJSONObject.getString("portletId");

    if (Validator.isNull(rootPortletId)) {
      throw new ImporterException("portletId is not specified");
    }

    String portletId = layoutTypePortlet.addPortletId(
      userId, rootPortletId, columnId, -1, false);

    JSONObject portletPreferencesJSONObject =
      portletJSONObject.getJSONObject("portletPreferences");
View Full Code Here

          LayoutConstants.DEFAULT_PARENT_LAYOUT_ID, false, 0, 1);

        if (!layouts.isEmpty()) {
          Layout layout = layouts.get(0);

          LayoutTypePortlet layoutTypePortlet =
            (LayoutTypePortlet)layout.getLayoutType();

          List<String> portletIds = layoutTypePortlet.getPortletIds();

          if (portletIds.size() != 2) {
            existing = true;
          }
View Full Code Here

  protected void addLayoutColumnPortlet(
      Layout layout, String columnId, JSONObject portletJSONObject)
    throws Exception {

    LayoutTypePortlet layoutTypePortlet =
      (LayoutTypePortlet)layout.getLayoutType();

    String rootPortletId = portletJSONObject.getString("portletId");

    if (Validator.isNull(rootPortletId)) {
      throw new ImporterException("portletId is not specified");
    }

    String portletId = layoutTypePortlet.addPortletId(
      userId, rootPortletId, columnId, -1, false);

    JSONObject portletPreferencesJSONObject =
      portletJSONObject.getJSONObject("portletPreferences");
View Full Code Here

          LayoutConstants.DEFAULT_PARENT_LAYOUT_ID, false, 0, 1);

        if (!layouts.isEmpty()) {
          Layout layout = layouts.get(0);

          LayoutTypePortlet layoutTypePortlet =
            (LayoutTypePortlet)layout.getLayoutType();

          List<String> portletIds = layoutTypePortlet.getPortletIds();

          if (portletIds.size() != 2) {
            existing = true;
          }
View Full Code Here

    Layout layout = LayoutLocalServiceUtil.addLayout(
      userId, groupId, privateLayout, parentLayoutId, nameMap, titleMap,
      null, null, null, LayoutConstants.TYPE_PORTLET, typeSettings,
      hidden, friendlyURLMap, serviceContext);

    LayoutTypePortlet layoutTypePortlet =
      (LayoutTypePortlet)layout.getLayoutType();

    String layoutTemplateId = layoutJSONObject.getString(
      "layoutTemplateId", _defaultLayoutTemplateId);

    if (Validator.isNotNull(layoutTemplateId)) {
      layoutTypePortlet.setLayoutTemplateId(
        userId, layoutTemplateId, false);
    }

    JSONArray columnsJSONArray = layoutJSONObject.getJSONArray("columns");
View Full Code Here

  protected void setupPage(long companyId, long userId, long groupId, PortalPage portalPage, boolean privateLayout)
    throws Exception {
    String portalPageName = portalPage.getName();
    String[] portletIds = portalPage.getPortletIds();
    Layout portalPageLayout = getPortalPageLayout(userId, groupId, portalPageName, privateLayout);
    LayoutTypePortlet layoutTypePortlet = (LayoutTypePortlet) portalPageLayout.getLayoutType();

    layoutTypePortlet.setLayoutTemplateId(userId, portalPage.getLayoutTemplateId(), false);

    int columnNumber = 1;

    for (String portletId : portletIds) {
View Full Code Here

TOP

Related Classes of com.liferay.portal.model.LayoutTypePortlet

Copyright © 2018 www.massapicom. 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.