Class LayoutLocalServiceImpl

Object
com.liferay.portal.kernel.service.BaseLocalServiceImpl
com.liferay.portal.service.base.LayoutLocalServiceBaseImpl
com.liferay.portal.service.impl.LayoutLocalServiceImpl
All Implemented Interfaces:
com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService, com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.change.tracking.CTService<com.liferay.portal.kernel.model.Layout>, com.liferay.portal.kernel.service.LayoutLocalService, com.liferay.portal.kernel.service.PersistedModelLocalService

public class LayoutLocalServiceImpl extends LayoutLocalServiceBaseImpl
Provides the local service for accessing, adding, deleting, exporting, importing, and updating layouts.
Author:
Brian Wing Shun Chan, Jorge Ferrer, Joel Kozikowski, Charles May, Raymond Augé, Jorge Ferrer, Bruno Farache, Vilmos Papp, James Lefeu, Tibor Lipusz
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from class com.liferay.portal.service.base.LayoutLocalServiceBaseImpl

    counterLocalService, layoutFinder, layoutLocalService, layoutPersistence
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.liferay.portal.kernel.model.Layout
    addLayout(String externalReferenceCode, long userId, long groupId, boolean privateLayout, long parentLayoutId, long classNameId, long classPK, Map<Locale,String> nameMap, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, Map<Locale,String> keywordsMap, Map<Locale,String> robotsMap, String type, String typeSettings, boolean hidden, boolean system, Map<Locale,String> friendlyURLMap, long masterLayoutPlid, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Adds a layout with additional parameters.
    com.liferay.portal.kernel.model.Layout
    addLayout(String externalReferenceCode, long userId, long groupId, boolean privateLayout, long parentLayoutId, String name, String title, String description, String type, boolean hidden, boolean system, String friendlyURL, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Adds a layout with single entry maps for name, title, and description to the default locale.
    com.liferay.portal.kernel.model.Layout
    addLayout(String externalReferenceCode, long userId, long groupId, boolean privateLayout, long parentLayoutId, String name, String title, String description, String type, boolean hidden, String friendlyURL, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Adds a layout with single entry maps for name, title, and description to the default locale.
    com.liferay.portal.kernel.model.Layout
    addLayout(String externalReferenceCode, long userId, long groupId, boolean privateLayout, long parentLayoutId, Map<Locale,String> nameMap, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, Map<Locale,String> keywordsMap, Map<Locale,String> robotsMap, String type, String typeSettings, boolean hidden, boolean system, Map<Locale,String> friendlyURLMap, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Adds a layout with additional parameters.
    com.liferay.portal.kernel.model.Layout
    addLayout(String externalReferenceCode, long userId, long groupId, boolean privateLayout, long parentLayoutId, Map<Locale,String> nameMap, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, Map<Locale,String> keywordsMap, Map<Locale,String> robotsMap, String type, String typeSettings, boolean hidden, Map<Locale,String> friendlyURLMap, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Adds a layout with additional parameters.
    com.liferay.portal.kernel.model.Layout
    copyLayout(long userId, long groupId, boolean privateLayout, Map<Locale,String> nameMap, boolean hidden, boolean system, boolean copyPermissions, long sourcePlid, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    com.liferay.portal.kernel.model.Layout
    copyLayoutContent(long[] segmentsExperienceIds, com.liferay.portal.kernel.model.Layout sourceLayout, com.liferay.portal.kernel.model.Layout targetLayout)
     
    com.liferay.portal.kernel.model.Layout
    copyLayoutContent(long segmentsExperienceId, com.liferay.portal.kernel.model.Layout sourceLayout, com.liferay.portal.kernel.model.Layout targetLayout)
     
    com.liferay.portal.kernel.model.Layout
    copyLayoutContent(com.liferay.portal.kernel.model.Layout sourceLayout, com.liferay.portal.kernel.model.Layout targetLayout)
     
    com.liferay.portal.kernel.model.Layout
    deleteLayout(long plid)
    Deletes the layout with the plid, also deleting the layout's child layouts, and associated resources.
    void
    deleteLayout(long groupId, boolean privateLayout, long layoutId, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Deletes the layout with the layout ID, also deleting the layout's child layouts, and associated resources.
    void
    deleteLayout(long plid, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Deletes the layout with the plid, also deleting the layout's child layouts, and associated resources.
    com.liferay.portal.kernel.model.Layout
    deleteLayout(com.liferay.portal.kernel.model.Layout layout)
    Deletes the layout, its child layouts, and its associated resources.
    void
    deleteLayout(com.liferay.portal.kernel.model.Layout layout, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Deletes the layout, its child layouts, and its associated resources.
    void
    deleteLayout(String externalReferenceCode, long groupId)
     
    void
    deleteLayouts(long groupId, boolean privateLayout, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Deletes the group's private or non-private layouts, also deleting the layouts' child layouts, and associated resources.
    com.liferay.portal.kernel.model.Layout
    fetchDefaultLayout(long groupId, boolean privateLayout)
     
    com.liferay.portal.kernel.model.Layout
    fetchDraftLayout(long plid)
     
    com.liferay.portal.kernel.model.Layout
    fetchFirstLayout(long groupId, boolean privateLayout, long parentLayoutId)
     
    com.liferay.portal.kernel.model.Layout
    fetchFirstLayout(long groupId, boolean privateLayout, long parentLayoutId, boolean hidden)
     
    com.liferay.portal.kernel.model.Layout
    fetchLayout(long groupId, boolean privateLayout, long layoutId)
     
    com.liferay.portal.kernel.model.Layout
    fetchLayout(long classNameId, long classPK)
     
    com.liferay.portal.kernel.model.Layout
    fetchLayout(String uuid, long groupId, boolean privateLayout)
     
    com.liferay.portal.kernel.model.Layout
    fetchLayoutByFriendlyURL(long groupId, boolean privateLayout, String friendlyURL)
     
    com.liferay.portal.kernel.model.Layout
    fetchLayoutByIconImageId(boolean privateLayout, long iconImageId)
     
    com.liferay.portal.kernel.model.Layout
    fetchLayoutByUuidAndGroupId(String uuid, long groupId, boolean privateLayout)
    Returns the layout matching the UUID, group, and privacy.
    List<com.liferay.portal.kernel.model.Layout>
    getAllLayouts(long groupId, boolean privateLayout, String type)
    Returns all the layouts that match the type and belong to the group, including the ones marked as System.
    com.liferay.portal.kernel.model.Layout
    getBrowsableLayout(com.liferay.portal.kernel.model.Layout layout)
     
    static String
    getCounterName(long groupId, boolean privateLayout)
    Returns the object counter's name.
    long
    getDefaultPlid(long groupId)
    Returns the primary key of the default layout for the group.
    long
    getDefaultPlid(long groupId, boolean privateLayout)
    Returns primary key of the matching default layout for the group
    long
    getDefaultPlid(long groupId, boolean privateLayout, String portletId)
    Returns primary key of the default portlet layout for the group
    com.liferay.portal.kernel.model.Layout
    getFriendlyURLLayout(long groupId, boolean privateLayout, String friendlyURL)
    Returns the layout for the friendly URL.
    com.liferay.portal.kernel.model.Layout
    getLayout(long plid)
    Returns the layout with the primary key.
    com.liferay.portal.kernel.model.Layout
    getLayout(long groupId, boolean privateLayout, long layoutId)
    Returns the layout matching the layout ID, group, and privacy; throws a NoSuchLayoutException otherwise.
    com.liferay.portal.kernel.model.Layout
    getLayoutByExternalReferenceCode(String externalReferenceCode, long groupId)
     
    com.liferay.portal.kernel.model.Layout
    getLayoutByFriendlyURL(long groupId, boolean privateLayout, String friendlyURL)
     
    com.liferay.portal.kernel.model.Layout
    getLayoutByIconImageId(long iconImageId)
    Returns the layout for the icon image; throws a NoSuchLayoutException otherwise.
    com.liferay.portal.kernel.model.Layout
    getLayoutByUuidAndGroupId(String uuid, long groupId, boolean privateLayout)
    Returns the layout matching the UUID, group, and privacy.
    Map<Long,List<com.liferay.portal.kernel.model.Layout>>
    getLayoutChildLayouts(List<com.liferay.portal.kernel.model.Layout> parentLayouts)
     
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long companyId)
     
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, boolean privateLayout)
    Returns all the layouts belonging to the group.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, boolean privateLayout, int[] statuses, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
    Returns a range of all the layouts belonging to the group.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, boolean privateLayout, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
    Returns a range of all the layouts belonging to the group.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, boolean privateLayout, long parentLayoutId)
    Returns all the layouts belonging to the group that are children of the parent layout.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, boolean privateLayout, long[] layoutIds)
    Returns all the layouts that match the layout IDs and belong to the group.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, boolean privateLayout, long parentLayoutId, boolean incomplete, int start, int end)
    Returns a range of all the layouts belonging to the group that are children of the parent layout.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, boolean privateLayout, long parentLayoutId, boolean incomplete, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
    Returns a range of all the layouts belonging to the group that are children of the parent layout.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, boolean privateLayout, String type)
    Returns all the layouts that match the type and belong to the group.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, boolean privateLayout, String[] types)
    Returns all the layouts that match the type and belong to the group.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, boolean privateLayout, String keywords, String[] types, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
    Returns a range of all the layouts belonging to the group.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
    Returns a range of all the layouts belonging to the group.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, long userId, boolean privateLayout, String keywords, String[] types, int[] statuses, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
     
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, long userId, boolean privateLayout, String keywords, String[] types, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
    Returns a range of all the layouts belonging to the group.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, String keywords, String[] types, int[] statuses, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
    Returns a range of all the layouts belonging to the group.
    List<com.liferay.portal.kernel.model.Layout>
    getLayouts(long groupId, String keywords, String[] types, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
    Returns a range of all the layouts belonging to the group.
    com.liferay.portal.kernel.model.LayoutReference[]
    getLayouts(long companyId, String portletId, String preferencesKey, String preferencesValue)
    Returns the layout references for all the layouts that belong to the company and belong to the portlet that matches the preferences.
    List<com.liferay.portal.kernel.model.Layout>
     
    List<com.liferay.portal.kernel.model.Layout>
     
    int
     
    int
    getLayoutsCount(long groupId)
     
    int
    getLayoutsCount(long groupId, boolean privateLayout)
     
    int
    getLayoutsCount(long groupId, boolean privateLayout, long parentLayoutId)
     
    int
    getLayoutsCount(long groupId, long userId, boolean privateLayout, String keywords, String[] types)
     
    int
    getLayoutsCount(long groupId, long userId, boolean privateLayout, String keywords, String[] types, int[] statuses)
     
    int
    getLayoutsCount(long groupId, String keywords, String[] types)
     
    int
    getLayoutsCount(long groupId, String keywords, String[] types, int[] statuses)
     
    int
    getLayoutsCount(com.liferay.portal.kernel.model.Group group, boolean privateLayout)
     
    int
    getLayoutsCount(com.liferay.portal.kernel.model.Group group, boolean privateLayout, boolean includeUserGroups)
     
    int
    getLayoutsCount(com.liferay.portal.kernel.model.Group group, boolean privateLayout, long parentLayoutId)
     
    int
    getLayoutsCount(com.liferay.portal.kernel.model.Group group, boolean privateLayout, long[] layoutIds)
     
    int
    getLayoutsCount(com.liferay.portal.kernel.model.Group group, boolean privateLayout, String keywords, String[] types)
     
    int
    getLayoutsCount(com.liferay.portal.kernel.model.User user, boolean privateLayout)
     
    int
    getLayoutsCount(com.liferay.portal.kernel.model.User user, boolean privateLayout, boolean includeUserGroups)
     
    List<com.liferay.portal.kernel.model.Layout>
    getMasterLayouts(long groupId, long masterLayoutPlid)
     
    int
    getMasterLayoutsCount(long groupId, long masterLayoutPlid)
     
    long
    getNextLayoutId(long groupId, boolean privateLayout)
    Returns the layout ID to use for the next layout.
    com.liferay.portal.kernel.model.Layout
    getParentLayout(com.liferay.portal.kernel.model.Layout layout)
     
    List<com.liferay.portal.kernel.model.Layout>
    getPublishedLayouts(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
     
    int
     
    List<com.liferay.portal.kernel.model.Layout>
    getScopeGroupLayouts(long parentGroupId)
     
    List<com.liferay.portal.kernel.model.Layout>
    getScopeGroupLayouts(long parentGroupId, boolean privateLayout)
    Returns all the layouts within scope of the group.
    boolean
    hasLayout(String uuid, long groupId, boolean privateLayout)
    Returns true if there is a matching layout with the UUID, group, and privacy.
    boolean
    hasLayouts(long groupId, boolean privateLayout, long parentLayoutId)
    Returns true if the group has any layouts; false otherwise.
    boolean
    hasLayouts(com.liferay.portal.kernel.model.Group group)
     
    boolean
    hasLayouts(com.liferay.portal.kernel.model.Group group, boolean privateLayout)
     
    boolean
    hasLayouts(com.liferay.portal.kernel.model.Group group, boolean privateLayout, boolean includeUserGroups)
     
    boolean
    hasLayouts(com.liferay.portal.kernel.model.User user, boolean privateLayout)
     
    boolean
    hasLayouts(com.liferay.portal.kernel.model.User user, boolean privateLayout, boolean includeUserGroups)
     
    boolean
    hasLayoutSetPrototypeLayout(long layoutSetPrototypeId, String layoutUuid)
     
    boolean
    hasLayoutSetPrototypeLayout(String layoutSetPrototypeUuid, long companyId, String layoutUuid)
     
    List<com.liferay.portal.kernel.model.Layout>
    search(long groupId, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
     
    List<com.liferay.portal.kernel.model.Layout>
    search(long groupId, long userId, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types, int[] statuses, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
     
    List<com.liferay.portal.kernel.model.Layout>
    search(long groupId, long userId, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
     
    int
    searchCount(long groupId, long userId, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types)
     
    int
    searchCount(com.liferay.portal.kernel.model.Group group, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types)
     
    void
    setLayouts(long groupId, boolean privateLayout, long parentLayoutId, long[] layoutIds, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Sets the layouts for the group, replacing and prioritizing all layouts of the parent layout.
    void
    updateAsset(long userId, com.liferay.portal.kernel.model.Layout layout, long[] assetCategoryIds, String[] assetTagNames)
     
    com.liferay.portal.kernel.model.Layout
    updateFriendlyURL(long userId, long plid, String friendlyURL, String languageId)
    Updates the friendly URL of the layout.
    com.liferay.portal.kernel.model.Layout
    updateIconImage(long plid, byte[] bytes)
     
    com.liferay.portal.kernel.model.Layout
    updateLayout(long groupId, boolean privateLayout, long layoutId, long classNameId, long classPK)
    Updates the layout replacing its entity class name ID and primary key.
    com.liferay.portal.kernel.model.Layout
    updateLayout(long groupId, boolean privateLayout, long layoutId, long parentLayoutId, Map<Locale,String> nameMap, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, Map<Locale,String> keywordsMap, Map<Locale,String> robotsMap, String type, boolean hidden, Map<Locale,String> friendlyURLMap, boolean hasIconImage, byte[] iconBytes, long styleBookEntryId, long faviconFileEntryId, long masterLayoutPlid, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Updates the layout.
    com.liferay.portal.kernel.model.Layout
    updateLayout(long groupId, boolean privateLayout, long layoutId, String typeSettings)
    Updates the layout replacing its type settings.
    com.liferay.portal.kernel.model.Layout
    updateLayout(long groupId, boolean privateLayout, long layoutId, String typeSettings, byte[] iconBytes, String themeId, String colorSchemeId, long styleBookEntryId, String css, long faviconFileEntryId, long masterLayoutPlid)
     
    com.liferay.portal.kernel.model.Layout
    updateLayout(long groupId, boolean privateLayout, long layoutId, Date publishDate)
    Updates the layout replacing its draft publish date.
    com.liferay.portal.kernel.model.Layout
    updateLookAndFeel(long groupId, boolean privateLayout, long layoutId, String themeId, String colorSchemeId, String css)
    Updates the look and feel of the layout.
    com.liferay.portal.kernel.model.Layout
    updateMasterLayoutPlid(long groupId, boolean privateLayout, long layoutId, long masterLayoutPlid)
    Updates the layout replacing its master layout plid.
    com.liferay.portal.kernel.model.Layout
    updateName(long groupId, boolean privateLayout, long layoutId, String name, String languageId)
    Updates the name of the layout matching the group, layout ID, and privacy.
    com.liferay.portal.kernel.model.Layout
    updateName(long plid, String name, String languageId)
    Updates the name of the layout matching the primary key.
    com.liferay.portal.kernel.model.Layout
    updateName(com.liferay.portal.kernel.model.Layout layout, String name, String languageId)
    Updates the name of the layout.
    com.liferay.portal.kernel.model.Layout
    updateParentLayoutId(long groupId, boolean privateLayout, long layoutId, long parentLayoutId)
    Updates the parent layout ID of the layout matching the group, layout ID, and privacy.
    com.liferay.portal.kernel.model.Layout
    updateParentLayoutId(long plid, long parentPlid)
    Updates the parent layout ID of the layout matching the primary key.
    com.liferay.portal.kernel.model.Layout
    updateParentLayoutIdAndPriority(long plid, long parentPlid, int priority)
    Updates the parent layout ID and priority of the layout.
    void
    updatePriorities(long groupId, boolean privateLayout)
    Updates the priorities of the layouts.
    com.liferay.portal.kernel.model.Layout
    updatePriority(long groupId, boolean privateLayout, long layoutId, int priority)
    Updates the priority of the layout matching the group, layout ID, and privacy.
    com.liferay.portal.kernel.model.Layout
    updatePriority(long groupId, boolean privateLayout, long layoutId, long nextLayoutId, long previousLayoutId)
    Updates the priority of the layout matching the group, layout ID, and privacy, setting the layout's priority based on the priorities of the next and previous layouts.
    com.liferay.portal.kernel.model.Layout
    updatePriority(long plid, int priority)
    Updates the priority of the layout matching the primary key.
    com.liferay.portal.kernel.model.Layout
    updatePriority(com.liferay.portal.kernel.model.Layout layout, int priority)
    Updates the priority of the layout.
    com.liferay.portal.kernel.model.Layout
    updateStatus(long userId, long plid, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    com.liferay.portal.kernel.model.Layout
    updateStyleBookEntryId(long groupId, boolean privateLayout, long layoutId, long styleBookEntryId)
    Updates the layout replacing its style book entry ID.
    com.liferay.portal.kernel.model.Layout
    updateType(long plid, String type)
     
    protected void
    validateTypeSettingsProperties(com.liferay.portal.kernel.model.Layout layout, com.liferay.portal.kernel.util.UnicodeProperties typeSettingsUnicodeProperties)
     

    Methods inherited from class com.liferay.portal.kernel.service.BaseLocalServiceImpl

    getClassLoader, getLocalizationMap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService

    fetchPersistedModel
  • Field Details

  • Constructor Details

    • LayoutLocalServiceImpl

      public LayoutLocalServiceImpl()
  • Method Details

    • getCounterName

      public static String getCounterName(long groupId, boolean privateLayout)
      Returns the object counter's name.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether layout is private to the group
      Returns:
      the object counter's name
    • addLayout

      @Indexable(type=REINDEX) public com.liferay.portal.kernel.model.Layout addLayout(String externalReferenceCode, long userId, long groupId, boolean privateLayout, long parentLayoutId, long classNameId, long classPK, Map<Locale,String> nameMap, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, Map<Locale,String> keywordsMap, Map<Locale,String> robotsMap, String type, String typeSettings, boolean hidden, boolean system, Map<Locale,String> friendlyURLMap, long masterLayoutPlid, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a layout with additional parameters.

      This method handles the creation of the layout including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, ... etc.

      Parameters:
      externalReferenceCode - the layout's external reference code
      userId - the primary key of the user
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      parentLayoutId - the layout ID of the parent layout (optionally LayoutConstants.DEFAULT_PARENT_LAYOUT_ID)
      classNameId - the class name ID of the entity
      classPK - the primary key of the entity
      nameMap - the layout's locales and localized names
      titleMap - the layout's locales and localized titles
      descriptionMap - the layout's locales and localized descriptions
      keywordsMap - the layout's locales and localized keywords
      robotsMap - the layout's locales and localized robots
      type - the layout's type (optionally LayoutConstants.TYPE_PORTLET). The possible types can be found in LayoutConstants.
      typeSettings - the settings to load the unicode properties object. See #fastLoad(String).
      hidden - whether the layout is hidden
      system - whether the layout is of system type
      friendlyURLMap - the layout's locales and localized friendly URLs. To see how the URL is normalized when accessed, see FriendlyURLNormalizerUtil.normalize(String).
      masterLayoutPlid - the primary key of the master layout
      serviceContext - the service context to be applied. Must set the UUID for the layout. Can set the creation date, modification date, and expando bridge attributes for the layout. For layouts that belong to a layout set prototype, an attribute named layoutUpdateable can be set to specify whether site administrators can modify this page within their site. For layouts that are created from a layout prototype, attributes named layoutPrototypeUuid and layoutPrototypeLinkedEnabled can be specified to provide the unique identifier of the source prototype and a boolean to determine whether a link to it should be enabled to activate propagation of changes made to the linked page in the prototype.
      Returns:
      the layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • addLayout

      @Indexable(type=REINDEX) public com.liferay.portal.kernel.model.Layout addLayout(String externalReferenceCode, long userId, long groupId, boolean privateLayout, long parentLayoutId, Map<Locale,String> nameMap, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, Map<Locale,String> keywordsMap, Map<Locale,String> robotsMap, String type, String typeSettings, boolean hidden, boolean system, Map<Locale,String> friendlyURLMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a layout with additional parameters.

      This method handles the creation of the layout including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, ... etc.

      Parameters:
      externalReferenceCode - the layout's external reference code
      userId - the primary key of the user
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      parentLayoutId - the layout ID of the parent layout (optionally LayoutConstants.DEFAULT_PARENT_LAYOUT_ID)
      nameMap - the layout's locales and localized names
      titleMap - the layout's locales and localized titles
      descriptionMap - the layout's locales and localized descriptions
      keywordsMap - the layout's locales and localized keywords
      robotsMap - the layout's locales and localized robots
      type - the layout's type (optionally LayoutConstants.TYPE_PORTLET). The possible types can be found in LayoutConstants.
      typeSettings - the settings to load the unicode properties object. See #fastLoad(String).
      hidden - whether the layout is hidden
      system - whether the layout is of system type
      friendlyURLMap - the layout's locales and localized friendly URLs. To see how the URL is normalized when accessed, see FriendlyURLNormalizerUtil.normalize(String).
      serviceContext - the service context to be applied. Must set the UUID for the layout. Can set the creation date, modification date, and expando bridge attributes for the layout. For layouts that belong to a layout set prototype, an attribute named layoutUpdateable can be set to specify whether site administrators can modify this page within their site. For layouts that are created from a layout prototype, attributes named layoutPrototypeUuid and layoutPrototypeLinkedEnabled can be specified to provide the unique identifier of the source prototype and a boolean to determine whether a link to it should be enabled to activate propagation of changes made to the linked page in the prototype.
      Returns:
      the layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • addLayout

      @Indexable(type=REINDEX) public com.liferay.portal.kernel.model.Layout addLayout(String externalReferenceCode, long userId, long groupId, boolean privateLayout, long parentLayoutId, Map<Locale,String> nameMap, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, Map<Locale,String> keywordsMap, Map<Locale,String> robotsMap, String type, String typeSettings, boolean hidden, Map<Locale,String> friendlyURLMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a layout with additional parameters.

      This method handles the creation of the layout including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, ... etc.

      Parameters:
      externalReferenceCode - the layout's external reference code
      userId - the primary key of the user
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      parentLayoutId - the layout ID of the parent layout (optionally LayoutConstants.DEFAULT_PARENT_LAYOUT_ID)
      nameMap - the layout's locales and localized names
      titleMap - the layout's locales and localized titles
      descriptionMap - the layout's locales and localized descriptions
      keywordsMap - the layout's locales and localized keywords
      robotsMap - the layout's locales and localized robots
      type - the layout's type (optionally LayoutConstants.TYPE_PORTLET). The possible types can be found in LayoutConstants.
      typeSettings - the settings to load the unicode properties object. See #fastLoad(String).
      hidden - whether the layout is hidden
      friendlyURLMap - the layout's locales and localized friendly URLs. To see how the URL is normalized when accessed, see FriendlyURLNormalizerUtil.normalize(String).
      serviceContext - the service context to be applied. Must set the UUID for the layout. Can set the creation date, modification date, and expando bridge attributes for the layout. For layouts that belong to a layout set prototype, an attribute named layoutUpdateable can be set to specify whether site administrators can modify this page within their site. For layouts that are created from a layout prototype, attributes named layoutPrototypeUuid and layoutPrototypeLinkedEnabled can be specified to provide the unique identifier of the source prototype and a boolean to determine whether a link to it should be enabled to activate propagation of changes made to the linked page in the prototype.
      Returns:
      the layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • addLayout

      public com.liferay.portal.kernel.model.Layout addLayout(String externalReferenceCode, long userId, long groupId, boolean privateLayout, long parentLayoutId, String name, String title, String description, String type, boolean hidden, boolean system, String friendlyURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a layout with single entry maps for name, title, and description to the default locale.

      This method handles the creation of the layout including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, ... etc.

      Parameters:
      externalReferenceCode - the layout's external reference code
      userId - the primary key of the user
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      parentLayoutId - the layout ID of the parent layout (optionally LayoutConstants.DEFAULT_PARENT_LAYOUT_ID). The possible values can be found in LayoutConstants.
      name - the layout's name (optionally PropsValues.DEFAULT_USER_PRIVATE_LAYOUT_NAME or PropsValues.DEFAULT_USER_PUBLIC_LAYOUT_NAME). The default values can be overridden in portal-ext.properties by specifying new values for the corresponding properties defined in PropsValues
      title - the layout's title
      description - the layout's description
      type - the layout's type (optionally LayoutConstants.TYPE_PORTLET). The possible types can be found in LayoutConstants.
      hidden - whether the layout is hidden
      system - whether the layout is of system type
      friendlyURL - the friendly URL of the layout (optionally PropsValues.DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL or PropsValues.DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL). The default values can be overridden in portal-ext.properties by specifying new values for the corresponding properties defined in PropsValues. To see how the URL is normalized when accessed, see FriendlyURLNormalizerUtil.normalize(String).
      serviceContext - the service context to be applied. Must set the UUID for the layout. Can set the creation date and modification date for the layout. For layouts that belong to a layout set prototype, an attribute named layoutUpdateable can be set to specify whether site administrators can modify this page within their site.
      Returns:
      the layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • addLayout

      public com.liferay.portal.kernel.model.Layout addLayout(String externalReferenceCode, long userId, long groupId, boolean privateLayout, long parentLayoutId, String name, String title, String description, String type, boolean hidden, String friendlyURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a layout with single entry maps for name, title, and description to the default locale.

      This method handles the creation of the layout including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, ... etc.

      Parameters:
      externalReferenceCode - the layout's external reference code
      userId - the primary key of the user
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      parentLayoutId - the layout ID of the parent layout (optionally LayoutConstants.DEFAULT_PARENT_LAYOUT_ID). The possible values can be found in LayoutConstants.
      name - the layout's name (optionally PropsValues.DEFAULT_USER_PRIVATE_LAYOUT_NAME or PropsValues.DEFAULT_USER_PUBLIC_LAYOUT_NAME). The default values can be overridden in portal-ext.properties by specifying new values for the corresponding properties defined in PropsValues
      title - the layout's title
      description - the layout's description
      type - the layout's type (optionally LayoutConstants.TYPE_PORTLET). The possible types can be found in LayoutConstants.
      hidden - whether the layout is hidden
      friendlyURL - the friendly URL of the layout (optionally PropsValues.DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL or PropsValues.DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL). The default values can be overridden in portal-ext.properties by specifying new values for the corresponding properties defined in PropsValues. To see how the URL is normalized when accessed, see FriendlyURLNormalizerUtil.normalize(String).
      serviceContext - the service context to be applied. Must set the UUID for the layout. Can set the creation date and modification date for the layout. For layouts that belong to a layout set prototype, an attribute named layoutUpdateable can be set to specify whether site administrators can modify this page within their site.
      Returns:
      the layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • copyLayout

      public com.liferay.portal.kernel.model.Layout copyLayout(long userId, long groupId, boolean privateLayout, Map<Locale,String> nameMap, boolean hidden, boolean system, boolean copyPermissions, long sourcePlid, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • copyLayoutContent

      public com.liferay.portal.kernel.model.Layout copyLayoutContent(com.liferay.portal.kernel.model.Layout sourceLayout, com.liferay.portal.kernel.model.Layout targetLayout) throws Exception
      Throws:
      Exception
    • copyLayoutContent

      public com.liferay.portal.kernel.model.Layout copyLayoutContent(long segmentsExperienceId, com.liferay.portal.kernel.model.Layout sourceLayout, com.liferay.portal.kernel.model.Layout targetLayout) throws Exception
      Throws:
      Exception
    • copyLayoutContent

      public com.liferay.portal.kernel.model.Layout copyLayoutContent(long[] segmentsExperienceIds, com.liferay.portal.kernel.model.Layout sourceLayout, com.liferay.portal.kernel.model.Layout targetLayout) throws Exception
      Throws:
      Exception
    • deleteLayout

      public com.liferay.portal.kernel.model.Layout deleteLayout(com.liferay.portal.kernel.model.Layout layout) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the layout, its child layouts, and its associated resources.
      Specified by:
      deleteLayout in interface com.liferay.portal.kernel.service.LayoutLocalService
      Overrides:
      deleteLayout in class LayoutLocalServiceBaseImpl
      Parameters:
      layout - the layout
      Returns:
      the deleted layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteLayout

      @SystemEvent(action=1, type=1) public void deleteLayout(com.liferay.portal.kernel.model.Layout layout, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the layout, its child layouts, and its associated resources.
      Parameters:
      layout - the layout
      serviceContext - the service context to be applied
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteLayout

      public com.liferay.portal.kernel.model.Layout deleteLayout(long plid) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the layout with the plid, also deleting the layout's child layouts, and associated resources.
      Specified by:
      deleteLayout in interface com.liferay.portal.kernel.service.LayoutLocalService
      Overrides:
      deleteLayout in class LayoutLocalServiceBaseImpl
      Parameters:
      plid - the primary key of the layout
      Returns:
      the layout that was removed
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteLayout

      public void deleteLayout(long groupId, boolean privateLayout, long layoutId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the layout with the layout ID, also deleting the layout's child layouts, and associated resources.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      serviceContext - the service context to be applied
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteLayout

      public void deleteLayout(long plid, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the layout with the plid, also deleting the layout's child layouts, and associated resources.
      Parameters:
      plid - the primary key of the layout
      serviceContext - the service context to be applied
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • deleteLayout

      public void deleteLayout(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteLayouts

      public void deleteLayouts(long groupId, boolean privateLayout, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the group's private or non-private layouts, also deleting the layouts' child layouts, and associated resources.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      serviceContext - the service context to be applied. The parent layout set's page count will be updated by default, unless an attribute named updatePageCount is set to false.
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • fetchDefaultLayout

      public com.liferay.portal.kernel.model.Layout fetchDefaultLayout(long groupId, boolean privateLayout)
    • fetchDraftLayout

      public com.liferay.portal.kernel.model.Layout fetchDraftLayout(long plid)
    • fetchFirstLayout

      public com.liferay.portal.kernel.model.Layout fetchFirstLayout(long groupId, boolean privateLayout, long parentLayoutId)
    • fetchFirstLayout

      public com.liferay.portal.kernel.model.Layout fetchFirstLayout(long groupId, boolean privateLayout, long parentLayoutId, boolean hidden)
    • fetchLayout

      public com.liferay.portal.kernel.model.Layout fetchLayout(long groupId, boolean privateLayout, long layoutId)
    • fetchLayout

      public com.liferay.portal.kernel.model.Layout fetchLayout(long classNameId, long classPK)
    • fetchLayout

      public com.liferay.portal.kernel.model.Layout fetchLayout(String uuid, long groupId, boolean privateLayout)
    • fetchLayoutByFriendlyURL

      public com.liferay.portal.kernel.model.Layout fetchLayoutByFriendlyURL(long groupId, boolean privateLayout, String friendlyURL)
    • fetchLayoutByIconImageId

      public com.liferay.portal.kernel.model.Layout fetchLayoutByIconImageId(boolean privateLayout, long iconImageId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchLayoutByUuidAndGroupId

      public com.liferay.portal.kernel.model.Layout fetchLayoutByUuidAndGroupId(String uuid, long groupId, boolean privateLayout)
      Returns the layout matching the UUID, group, and privacy.
      Specified by:
      fetchLayoutByUuidAndGroupId in interface com.liferay.portal.kernel.service.LayoutLocalService
      Overrides:
      fetchLayoutByUuidAndGroupId in class LayoutLocalServiceBaseImpl
      Parameters:
      uuid - the layout's UUID
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      Returns:
      the matching layout, or null if a matching layout could not be found
    • getAllLayouts

      public List<com.liferay.portal.kernel.model.Layout> getAllLayouts(long groupId, boolean privateLayout, String type) throws com.liferay.portal.kernel.exception.PortalException
      Returns all the layouts that match the type and belong to the group, including the ones marked as System.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      type - the type of the layouts (optiona.lly LayoutConstants.TYPE_PORTLET)
      Returns:
      the matching layouts, or an empty list if no matches were found
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getBrowsableLayout

      public com.liferay.portal.kernel.model.Layout getBrowsableLayout(com.liferay.portal.kernel.model.Layout layout)
    • getDefaultPlid

      public long getDefaultPlid(long groupId)
      Returns the primary key of the default layout for the group.
      Parameters:
      groupId - the primary key of the group
      Returns:
      the primary key of the default layout for the group (optionally LayoutConstants.DEFAULT_PLID)
    • getDefaultPlid

      public long getDefaultPlid(long groupId, boolean privateLayout)
      Returns primary key of the matching default layout for the group
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      Returns:
      the primary key of the default layout for the group; LayoutConstants.DEFAULT_PLID) otherwise
    • getDefaultPlid

      public long getDefaultPlid(long groupId, boolean privateLayout, String portletId) throws com.liferay.portal.kernel.exception.PortalException
      Returns primary key of the default portlet layout for the group
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      portletId - the primary key of the portlet
      Returns:
      the primary key of the default portlet layout for the group; LayoutConstants.DEFAULT_PLID otherwise
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getFriendlyURLLayout

      public com.liferay.portal.kernel.model.Layout getFriendlyURLLayout(long groupId, boolean privateLayout, String friendlyURL) throws com.liferay.portal.kernel.exception.PortalException
      Returns the layout for the friendly URL.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      friendlyURL - the friendly URL of the layout
      Returns:
      the layout for the friendly URL
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLayout

      public com.liferay.portal.kernel.model.Layout getLayout(long plid) throws com.liferay.portal.kernel.exception.PortalException
      Description copied from class: LayoutLocalServiceBaseImpl
      Returns the layout with the primary key.
      Specified by:
      getLayout in interface com.liferay.portal.kernel.service.LayoutLocalService
      Overrides:
      getLayout in class LayoutLocalServiceBaseImpl
      Parameters:
      plid - the primary key of the layout
      Returns:
      the layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a layout with the primary key could not be found
    • getLayout

      public com.liferay.portal.kernel.model.Layout getLayout(long groupId, boolean privateLayout, long layoutId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the layout matching the layout ID, group, and privacy; throws a NoSuchLayoutException otherwise.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      Returns:
      the matching layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLayoutByExternalReferenceCode

      public com.liferay.portal.kernel.model.Layout getLayoutByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getLayoutByExternalReferenceCode in interface com.liferay.portal.kernel.service.LayoutLocalService
      Overrides:
      getLayoutByExternalReferenceCode in class LayoutLocalServiceBaseImpl
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayoutByFriendlyURL

      public com.liferay.portal.kernel.model.Layout getLayoutByFriendlyURL(long groupId, boolean privateLayout, String friendlyURL) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayoutByIconImageId

      public com.liferay.portal.kernel.model.Layout getLayoutByIconImageId(long iconImageId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the layout for the icon image; throws a NoSuchLayoutException otherwise.
      Parameters:
      iconImageId - the primary key of the icon image
      Returns:
      Returns the layout for the icon image
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLayoutByUuidAndGroupId

      public com.liferay.portal.kernel.model.Layout getLayoutByUuidAndGroupId(String uuid, long groupId, boolean privateLayout) throws com.liferay.portal.kernel.exception.PortalException
      Returns the layout matching the UUID, group, and privacy.
      Specified by:
      getLayoutByUuidAndGroupId in interface com.liferay.portal.kernel.service.LayoutLocalService
      Overrides:
      getLayoutByUuidAndGroupId in class LayoutLocalServiceBaseImpl
      Parameters:
      uuid - the layout's UUID
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      Returns:
      the matching layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a matching layout could not be found
    • getLayoutChildLayouts

      public Map<Long,List<com.liferay.portal.kernel.model.Layout>> getLayoutChildLayouts(List<com.liferay.portal.kernel.model.Layout> parentLayouts)
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(Collection<Serializable> primaryKeys)
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long companyId)
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout)
      Returns all the layouts belonging to the group.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      Returns:
      the matching layouts, or null if no matches were found
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
      Returns a range of all the layouts belonging to the group.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      start - the lower bound of the range of layouts
      end - the upper bound of the range of layouts (not inclusive)
      orderByComparator - the comparator to order the layouts
      Returns:
      the matching layouts, or null if no matches were found
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, int[] statuses, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
      Returns a range of all the layouts belonging to the group.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      start - the lower bound of the range of layouts
      end - the upper bound of the range of layouts (not inclusive)
      orderByComparator - the comparator to order the layouts
      Returns:
      the matching layouts, or null if no matches were found
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId)
      Returns all the layouts belonging to the group that are children of the parent layout.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      parentLayoutId - the layout ID of the parent layout
      Returns:
      the matching layouts, or null if no matches were found
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId, boolean incomplete, int start, int end)
      Returns a range of all the layouts belonging to the group that are children of the parent layout.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      parentLayoutId - the layout ID of the parent layout
      incomplete - whether the layout is incomplete
      start - the lower bound of the range of layouts
      end - the upper bound of the range of layouts (not inclusive)
      Returns:
      the matching layouts, or null if no matches were found
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId, boolean incomplete, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
      Returns a range of all the layouts belonging to the group that are children of the parent layout.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      parentLayoutId - the layout ID of the parent layout
      start - the lower bound of the range of layouts
      end - the upper bound of the range of layouts (not inclusive)
      orderByComparator - the comparator to order the layouts
      Returns:
      the matching layouts, or null if no matches were found
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, long[] layoutIds) throws com.liferay.portal.kernel.exception.PortalException
      Returns all the layouts that match the layout IDs and belong to the group.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutIds - the layout IDs of the layouts
      Returns:
      the matching layouts, or an empty list if no matches were found
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, String type) throws com.liferay.portal.kernel.exception.PortalException
      Returns all the layouts that match the type and belong to the group.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      type - the type of the layouts (optionally LayoutConstants.TYPE_PORTLET)
      Returns:
      the matching layouts, or null if no matches were found
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, String keywords, String[] types, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Returns a range of all the layouts belonging to the group.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      keywords - keywords
      types - layout types
      start - the lower bound of the range of layouts
      end - the upper bound of the range of layouts (not inclusive)
      orderByComparator - the comparator to order the layouts
      Returns:
      the matching layouts, or null if no matches were found
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, String[] types) throws com.liferay.portal.kernel.exception.PortalException
      Returns all the layouts that match the type and belong to the group.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      types - the layout's type (optionally LayoutConstants.TYPE_PORTLET). The possible types can be found in LayoutConstants.
      Returns:
      the matching layouts, or null if no matches were found
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
      Returns a range of all the layouts belonging to the group.
      Parameters:
      groupId - the primary key of the group
      start - the lower bound of the range of layouts
      end - the upper bound of the range of layouts (not inclusive)
      orderByComparator - the comparator to order the layouts
      Returns:
      the matching layouts, or null if no matches were found
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, long userId, boolean privateLayout, String keywords, String[] types, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Returns a range of all the layouts belonging to the group.
      Parameters:
      groupId - the primary key of the group
      userId - the primary key of the user
      privateLayout - whether the layout is private to the group
      keywords - keywords
      types - layout types
      start - the lower bound of the range of layouts
      end - the upper bound of the range of layouts (not inclusive)
      orderByComparator - the comparator to order the layouts
      Returns:
      the matching layouts, or null if no matches were found
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, long userId, boolean privateLayout, String keywords, String[] types, int[] statuses, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayouts

      public com.liferay.portal.kernel.model.LayoutReference[] getLayouts(long companyId, String portletId, String preferencesKey, String preferencesValue)
      Returns the layout references for all the layouts that belong to the company and belong to the portlet that matches the preferences.
      Parameters:
      companyId - the primary key of the company
      portletId - the primary key of the portlet
      preferencesKey - the portlet's preference key
      preferencesValue - the portlet's preference value
      Returns:
      the layout references of the matching layouts
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, String keywords, String[] types, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Returns a range of all the layouts belonging to the group.
      Parameters:
      groupId - the primary key of the group
      keywords - keywords
      types - layout types
      start - the lower bound of the range of layouts
      end - the upper bound of the range of layouts (not inclusive)
      orderByComparator - the comparator to order the layouts
      Returns:
      the matching layouts, or null if no matches were found
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayouts

      public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, String keywords, String[] types, int[] statuses, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Returns a range of all the layouts belonging to the group.
      Parameters:
      groupId - the primary key of the group
      keywords - keywords
      types - layout types
      start - the lower bound of the range of layouts
      end - the upper bound of the range of layouts (not inclusive)
      orderByComparator - the comparator to order the layouts
      Returns:
      the matching layouts, or null if no matches were found
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayoutsByLayoutPrototypeUuid

      public List<com.liferay.portal.kernel.model.Layout> getLayoutsByLayoutPrototypeUuid(String layoutPrototypeUuid)
    • getLayoutsByLayoutPrototypeUuidCount

      public int getLayoutsByLayoutPrototypeUuidCount(String layoutPrototypeUuid)
    • getLayoutsCount

      public int getLayoutsCount(com.liferay.portal.kernel.model.Group group, boolean privateLayout) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayoutsCount

      public int getLayoutsCount(com.liferay.portal.kernel.model.Group group, boolean privateLayout, boolean includeUserGroups) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayoutsCount

      public int getLayoutsCount(com.liferay.portal.kernel.model.Group group, boolean privateLayout, long parentLayoutId)
    • getLayoutsCount

      public int getLayoutsCount(com.liferay.portal.kernel.model.Group group, boolean privateLayout, long[] layoutIds)
    • getLayoutsCount

      public int getLayoutsCount(com.liferay.portal.kernel.model.Group group, boolean privateLayout, String keywords, String[] types) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayoutsCount

      public int getLayoutsCount(long groupId)
    • getLayoutsCount

      public int getLayoutsCount(long groupId, boolean privateLayout)
    • getLayoutsCount

      public int getLayoutsCount(long groupId, boolean privateLayout, long parentLayoutId)
    • getLayoutsCount

      public int getLayoutsCount(long groupId, long userId, boolean privateLayout, String keywords, String[] types) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayoutsCount

      public int getLayoutsCount(long groupId, long userId, boolean privateLayout, String keywords, String[] types, int[] statuses) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayoutsCount

      public int getLayoutsCount(long groupId, String keywords, String[] types) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayoutsCount

      public int getLayoutsCount(long groupId, String keywords, String[] types, int[] statuses) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayoutsCount

      public int getLayoutsCount(com.liferay.portal.kernel.model.User user, boolean privateLayout) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getLayoutsCount

      public int getLayoutsCount(com.liferay.portal.kernel.model.User user, boolean privateLayout, boolean includeUserGroups) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getMasterLayouts

      public List<com.liferay.portal.kernel.model.Layout> getMasterLayouts(long groupId, long masterLayoutPlid)
    • getMasterLayoutsCount

      public int getMasterLayoutsCount(long groupId, long masterLayoutPlid)
    • getNextLayoutId

      public long getNextLayoutId(long groupId, boolean privateLayout)
      Returns the layout ID to use for the next layout.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      Returns:
      the layout ID to use for the next layout
    • getParentLayout

      public com.liferay.portal.kernel.model.Layout getParentLayout(com.liferay.portal.kernel.model.Layout layout) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getPublishedLayouts

      public List<com.liferay.portal.kernel.model.Layout> getPublishedLayouts(long groupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator)
    • getPublishedLayoutsCount

      public int getPublishedLayoutsCount(long groupId)
    • getScopeGroupLayouts

      public List<com.liferay.portal.kernel.model.Layout> getScopeGroupLayouts(long parentGroupId) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getScopeGroupLayouts

      public List<com.liferay.portal.kernel.model.Layout> getScopeGroupLayouts(long parentGroupId, boolean privateLayout) throws com.liferay.portal.kernel.exception.PortalException
      Returns all the layouts within scope of the group.
      Parameters:
      parentGroupId - the primary key of the group's parent group
      privateLayout - whether the layout is private to the group
      Returns:
      the layouts within scope of the group
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • hasLayout

      public boolean hasLayout(String uuid, long groupId, boolean privateLayout) throws com.liferay.portal.kernel.exception.PortalException
      Returns true if there is a matching layout with the UUID, group, and privacy.
      Parameters:
      uuid - the layout's UUID
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      Returns:
      true if the layout is found; false otherwise
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • hasLayouts

      public boolean hasLayouts(com.liferay.portal.kernel.model.Group group) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • hasLayouts

      public boolean hasLayouts(com.liferay.portal.kernel.model.Group group, boolean privateLayout) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • hasLayouts

      public boolean hasLayouts(com.liferay.portal.kernel.model.Group group, boolean privateLayout, boolean includeUserGroups) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • hasLayouts

      public boolean hasLayouts(long groupId, boolean privateLayout, long parentLayoutId)
      Returns true if the group has any layouts; false otherwise.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      parentLayoutId - the layout ID of the parent layout
      Returns:
      true if the group has any layouts; false otherwise
    • hasLayouts

      public boolean hasLayouts(com.liferay.portal.kernel.model.User user, boolean privateLayout) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • hasLayouts

      public boolean hasLayouts(com.liferay.portal.kernel.model.User user, boolean privateLayout, boolean includeUserGroups) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • hasLayoutSetPrototypeLayout

      public boolean hasLayoutSetPrototypeLayout(long layoutSetPrototypeId, String layoutUuid) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • hasLayoutSetPrototypeLayout

      public boolean hasLayoutSetPrototypeLayout(String layoutSetPrototypeUuid, long companyId, String layoutUuid) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • search

      public List<com.liferay.portal.kernel.model.Layout> search(long groupId, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • search

      public List<com.liferay.portal.kernel.model.Layout> search(long groupId, long userId, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • search

      public List<com.liferay.portal.kernel.model.Layout> search(long groupId, long userId, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types, int[] statuses, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • searchCount

      public int searchCount(com.liferay.portal.kernel.model.Group group, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • searchCount

      public int searchCount(long groupId, long userId, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • setLayouts

      public void setLayouts(long groupId, boolean privateLayout, long parentLayoutId, long[] layoutIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Sets the layouts for the group, replacing and prioritizing all layouts of the parent layout.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      parentLayoutId - the layout ID of the parent layout
      layoutIds - the layout IDs of the layouts
      serviceContext - the service context to be applied
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateAsset

      public void updateAsset(long userId, com.liferay.portal.kernel.model.Layout layout, long[] assetCategoryIds, String[] assetTagNames) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateFriendlyURL

      public com.liferay.portal.kernel.model.Layout updateFriendlyURL(long userId, long plid, String friendlyURL, String languageId) throws com.liferay.portal.kernel.exception.PortalException
      Updates the friendly URL of the layout.
      Parameters:
      userId - the primary key of the user
      plid - the primary key of the layout
      friendlyURL - the friendly URL to be assigned
      languageId - the primary key of the language
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateIconImage

      public com.liferay.portal.kernel.model.Layout updateIconImage(long plid, byte[] bytes) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateLayout

      public com.liferay.portal.kernel.model.Layout updateLayout(long groupId, boolean privateLayout, long layoutId, Date publishDate) throws com.liferay.portal.kernel.exception.PortalException
      Updates the layout replacing its draft publish date.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      publishDate - the date when draft was last published
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateLayout

      public com.liferay.portal.kernel.model.Layout updateLayout(long groupId, boolean privateLayout, long layoutId, long classNameId, long classPK) throws com.liferay.portal.kernel.exception.PortalException
      Updates the layout replacing its entity class name ID and primary key.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      classNameId - the class name ID of the entity
      classPK - the primary key of the entity
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateLayout

      public com.liferay.portal.kernel.model.Layout updateLayout(long groupId, boolean privateLayout, long layoutId, long parentLayoutId, Map<Locale,String> nameMap, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, Map<Locale,String> keywordsMap, Map<Locale,String> robotsMap, String type, boolean hidden, Map<Locale,String> friendlyURLMap, boolean hasIconImage, byte[] iconBytes, long styleBookEntryId, long faviconFileEntryId, long masterLayoutPlid, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Updates the layout.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      parentLayoutId - the layout ID of the layout's new parent layout
      nameMap - the locales and localized names to merge (optionally null)
      titleMap - the locales and localized titles to merge (optionally null)
      descriptionMap - the locales and localized descriptions to merge (optionally null)
      keywordsMap - the locales and localized keywords to merge (optionally null)
      robotsMap - the locales and localized robots to merge (optionally null)
      type - the layout's new type (optionally LayoutConstants.TYPE_PORTLET)
      hidden - whether the layout is hidden
      friendlyURLMap - the layout's locales and localized friendly URLs. To see how the URL is normalized when accessed, see FriendlyURLNormalizerUtil.normalize(String).
      hasIconImage - whether the icon image will be updated
      iconBytes - the byte array of the layout's new icon image
      styleBookEntryId - the primary key of the style book entrys
      faviconFileEntryId - the file entry ID of the layout's new favicon
      masterLayoutPlid - the primary key of the master layout
      serviceContext - the service context to be applied. Can set the modification date and expando bridge attributes for the layout. For layouts that are linked to a layout prototype, attributes named layoutPrototypeUuid and layoutPrototypeLinkedEnabled can be specified to provide the unique identifier of the source prototype and a boolean to determine whether a link to it should be enabled to activate propagation of changes made to the linked page in the prototype.
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateLayout

      public com.liferay.portal.kernel.model.Layout updateLayout(long groupId, boolean privateLayout, long layoutId, String typeSettings) throws com.liferay.portal.kernel.exception.PortalException
      Updates the layout replacing its type settings.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      typeSettings - the settings to load the unicode properties object. See #fastLoad(String).
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateLayout

      public com.liferay.portal.kernel.model.Layout updateLayout(long groupId, boolean privateLayout, long layoutId, String typeSettings, byte[] iconBytes, String themeId, String colorSchemeId, long styleBookEntryId, String css, long faviconFileEntryId, long masterLayoutPlid) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateLookAndFeel

      public com.liferay.portal.kernel.model.Layout updateLookAndFeel(long groupId, boolean privateLayout, long layoutId, String themeId, String colorSchemeId, String css) throws com.liferay.portal.kernel.exception.PortalException
      Updates the look and feel of the layout.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      themeId - the primary key of the layout's new theme
      colorSchemeId - the primary key of the layout's new color scheme
      css - the layout's new CSS
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateMasterLayoutPlid

      public com.liferay.portal.kernel.model.Layout updateMasterLayoutPlid(long groupId, boolean privateLayout, long layoutId, long masterLayoutPlid) throws com.liferay.portal.kernel.exception.PortalException
      Updates the layout replacing its master layout plid.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      masterLayoutPlid - the primary key of the master layout
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateName

      public com.liferay.portal.kernel.model.Layout updateName(com.liferay.portal.kernel.model.Layout layout, String name, String languageId) throws com.liferay.portal.kernel.exception.PortalException
      Updates the name of the layout.
      Parameters:
      layout - the layout to be updated
      name - the layout's new name
      languageId - the primary key of the language. For more information see Locale.
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateName

      public com.liferay.portal.kernel.model.Layout updateName(long groupId, boolean privateLayout, long layoutId, String name, String languageId) throws com.liferay.portal.kernel.exception.PortalException
      Updates the name of the layout matching the group, layout ID, and privacy.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      name - the layout's new name
      languageId - the primary key of the language. For more information see Locale.
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateName

      public com.liferay.portal.kernel.model.Layout updateName(long plid, String name, String languageId) throws com.liferay.portal.kernel.exception.PortalException
      Updates the name of the layout matching the primary key.
      Parameters:
      plid - the primary key of the layout
      name - the name to be assigned
      languageId - the primary key of the language. For more information see Locale.
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateParentLayoutId

      public com.liferay.portal.kernel.model.Layout updateParentLayoutId(long groupId, boolean privateLayout, long layoutId, long parentLayoutId) throws com.liferay.portal.kernel.exception.PortalException
      Updates the parent layout ID of the layout matching the group, layout ID, and privacy.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      parentLayoutId - the layout ID to be assigned to the parent layout
      Returns:
      the matching layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateParentLayoutId

      public com.liferay.portal.kernel.model.Layout updateParentLayoutId(long plid, long parentPlid) throws com.liferay.portal.kernel.exception.PortalException
      Updates the parent layout ID of the layout matching the primary key. If a layout matching the parent primary key is found, the layout ID of that layout is assigned, otherwise LayoutConstants.DEFAULT_PARENT_LAYOUT_ID is assigned.
      Parameters:
      plid - the primary key of the layout
      parentPlid - the primary key of the parent layout
      Returns:
      the layout matching the primary key
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateParentLayoutIdAndPriority

      public com.liferay.portal.kernel.model.Layout updateParentLayoutIdAndPriority(long plid, long parentPlid, int priority) throws com.liferay.portal.kernel.exception.PortalException
      Updates the parent layout ID and priority of the layout.
      Parameters:
      plid - the primary key of the layout
      parentPlid - the primary key of the parent layout
      priority - the layout's new priority
      Returns:
      the layout matching the primary key
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updatePriorities

      public void updatePriorities(long groupId, boolean privateLayout) throws com.liferay.portal.kernel.exception.PortalException
      Updates the priorities of the layouts.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updatePriority

      public com.liferay.portal.kernel.model.Layout updatePriority(com.liferay.portal.kernel.model.Layout layout, int priority) throws com.liferay.portal.kernel.exception.PortalException
      Updates the priority of the layout.
      Parameters:
      layout - the layout to be updated
      priority - the layout's new priority
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updatePriority

      public com.liferay.portal.kernel.model.Layout updatePriority(long groupId, boolean privateLayout, long layoutId, int priority) throws com.liferay.portal.kernel.exception.PortalException
      Updates the priority of the layout matching the group, layout ID, and privacy.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      priority - the layout's new priority
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updatePriority

      public com.liferay.portal.kernel.model.Layout updatePriority(long groupId, boolean privateLayout, long layoutId, long nextLayoutId, long previousLayoutId) throws com.liferay.portal.kernel.exception.PortalException
      Updates the priority of the layout matching the group, layout ID, and privacy, setting the layout's priority based on the priorities of the next and previous layouts.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      nextLayoutId - the layout ID of the next layout
      previousLayoutId - the layout ID of the previous layout
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updatePriority

      public com.liferay.portal.kernel.model.Layout updatePriority(long plid, int priority) throws com.liferay.portal.kernel.exception.PortalException
      Updates the priority of the layout matching the primary key.
      Parameters:
      plid - the primary key of the layout
      priority - the layout's new priority
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateStatus

      @Indexable(type=REINDEX) public com.liferay.portal.kernel.model.Layout updateStatus(long userId, long plid, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateStyleBookEntryId

      public com.liferay.portal.kernel.model.Layout updateStyleBookEntryId(long groupId, boolean privateLayout, long layoutId, long styleBookEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Updates the layout replacing its style book entry ID.
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      layoutId - the layout ID of the layout
      styleBookEntryId - the primary key of the style book entry
      Returns:
      the updated layout
      Throws:
      com.liferay.portal.kernel.exception.PortalException - if a portal exception occurred
    • updateType

      public com.liferay.portal.kernel.model.Layout updateType(long plid, String type) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • validateTypeSettingsProperties

      protected void validateTypeSettingsProperties(com.liferay.portal.kernel.model.Layout layout, com.liferay.portal.kernel.util.UnicodeProperties typeSettingsUnicodeProperties) throws com.liferay.portal.kernel.exception.PortalException
      Throws:
      com.liferay.portal.kernel.exception.PortalException