Class LayoutLocalServiceWrapper

Object
com.liferay.portal.kernel.service.LayoutLocalServiceWrapper
All Implemented Interfaces:
BaseLocalService, CTService<Layout>, LayoutLocalService, PersistedModelLocalService, ServiceWrapper<LayoutLocalService>

public class LayoutLocalServiceWrapper extends Object implements LayoutLocalService, ServiceWrapper<LayoutLocalService>
Provides a wrapper for LayoutLocalService.
Author:
Brian Wing Shun Chan
See Also:
{$generated.description}
  • Constructor Details

    • LayoutLocalServiceWrapper

      public LayoutLocalServiceWrapper()
    • LayoutLocalServiceWrapper

      public LayoutLocalServiceWrapper(LayoutLocalService layoutLocalService)
  • Method Details

    • addLayout

      public Layout addLayout(Layout layout)
      Adds the layout to the database. Also notifies the appropriate model listeners.

      Important: Inspect LayoutLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Specified by:
      addLayout in interface LayoutLocalService
      Parameters:
      layout - the layout
      Returns:
      the layout that was added
    • addLayout

      public 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, ServiceContext serviceContext) throws 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.

      Specified by:
      addLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • addLayout

      public 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, ServiceContext serviceContext) throws 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.

      Specified by:
      addLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • addLayout

      public 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, ServiceContext serviceContext) throws 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.

      Specified by:
      addLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • addLayout

      public 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, ServiceContext serviceContext) throws 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.

      Specified by:
      addLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • addLayout

      public Layout addLayout(String externalReferenceCode, long userId, long groupId, boolean privateLayout, long parentLayoutId, String name, String title, String description, String type, boolean hidden, String friendlyURL, ServiceContext serviceContext) throws 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.

      Specified by:
      addLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • copyLayout

      public Layout copyLayout(long userId, long groupId, boolean privateLayout, Map<Locale,String> nameMap, boolean hidden, boolean system, boolean copyPermissions, long sourcePlid, ServiceContext serviceContext) throws PortalException
      Specified by:
      copyLayout in interface LayoutLocalService
      Throws:
      PortalException
    • copyLayoutContent

      public Layout copyLayoutContent(Layout sourceLayout, Layout targetLayout) throws Exception
      Specified by:
      copyLayoutContent in interface LayoutLocalService
      Throws:
      Exception
    • copyLayoutContent

      public Layout copyLayoutContent(long segmentsExperienceId, Layout sourceLayout, Layout targetLayout) throws Exception
      Specified by:
      copyLayoutContent in interface LayoutLocalService
      Throws:
      Exception
    • copyLayoutContent

      public Layout copyLayoutContent(long[] segmentsExperienceIds, Layout sourceLayout, Layout targetLayout) throws Exception
      Specified by:
      copyLayoutContent in interface LayoutLocalService
      Throws:
      Exception
    • createLayout

      public Layout createLayout(long plid)
      Creates a new layout with the primary key. Does not add the layout to the database.
      Specified by:
      createLayout in interface LayoutLocalService
      Parameters:
      plid - the primary key for the new layout
      Returns:
      the new layout
    • createPersistedModel

      public PersistedModel createPersistedModel(Serializable primaryKeyObj) throws PortalException
      Specified by:
      createPersistedModel in interface LayoutLocalService
      Specified by:
      createPersistedModel in interface PersistedModelLocalService
      Throws:
      PortalException
      PortalException
    • deleteLayout

      public Layout deleteLayout(Layout layout) throws PortalException
      Deletes the layout from the database. Also notifies the appropriate model listeners.

      Important: Inspect LayoutLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Specified by:
      deleteLayout in interface LayoutLocalService
      Parameters:
      layout - the layout
      Returns:
      the layout that was removed
      Throws:
      PortalException
      PortalException
    • deleteLayout

      public void deleteLayout(Layout layout, ServiceContext serviceContext) throws PortalException
      Deletes the layout, its child layouts, and its associated resources.
      Specified by:
      deleteLayout in interface LayoutLocalService
      Parameters:
      layout - the layout
      serviceContext - the service context to be applied
      Throws:
      PortalException - if a portal exception occurred
      PortalException
    • deleteLayout

      public Layout deleteLayout(long plid) throws PortalException
      Deletes the layout with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect LayoutLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Specified by:
      deleteLayout in interface LayoutLocalService
      Parameters:
      plid - the primary key of the layout
      Returns:
      the layout that was removed
      Throws:
      PortalException - if a layout with the primary key could not be found
      PortalException
    • deleteLayout

      public void deleteLayout(long groupId, boolean privateLayout, long layoutId, ServiceContext serviceContext) throws PortalException
      Deletes the layout with the layout ID, also deleting the layout's child layouts, and associated resources.
      Specified by:
      deleteLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • deleteLayout

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

      public void deleteLayout(String externalReferenceCode, long groupId) throws PortalException
      Specified by:
      deleteLayout in interface LayoutLocalService
      Throws:
      PortalException
    • deleteLayouts

      public void deleteLayouts(long groupId, boolean privateLayout, ServiceContext serviceContext) throws PortalException
      Deletes the group's private or non-private layouts, also deleting the layouts' child layouts, and associated resources.
      Specified by:
      deleteLayouts in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • deletePersistedModel

      public PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
      Specified by:
      deletePersistedModel in interface LayoutLocalService
      Specified by:
      deletePersistedModel in interface PersistedModelLocalService
      Throws:
      PortalException
      PortalException
    • dslQuery

      public <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQuery in interface LayoutLocalService
      Specified by:
      dslQuery in interface PersistedModelLocalService
    • dslQueryCount

      public int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQueryCount in interface LayoutLocalService
      Specified by:
      dslQueryCount in interface PersistedModelLocalService
    • dynamicQuery

      public DynamicQuery dynamicQuery()
      Specified by:
      dynamicQuery in interface LayoutLocalService
    • dynamicQuery

      public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
      Performs a dynamic query on the database and returns the matching rows.
      Specified by:
      dynamicQuery in interface LayoutLocalService
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the matching rows
    • dynamicQuery

      public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
      Performs a dynamic query on the database and returns a range of the matching rows.

      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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.portal.model.impl.LayoutModelImpl.

      Specified by:
      dynamicQuery in interface LayoutLocalService
      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      Returns:
      the range of matching rows
    • dynamicQuery

      public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
      Performs a dynamic query on the database and returns an ordered range of the matching rows.

      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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.portal.model.impl.LayoutModelImpl.

      Specified by:
      dynamicQuery in interface LayoutLocalService
      Parameters:
      dynamicQuery - the dynamic query
      start - the lower bound of the range of model instances
      end - the upper bound of the range of model instances (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching rows
    • dynamicQueryCount

      public long dynamicQueryCount(DynamicQuery dynamicQuery)
      Returns the number of rows matching the dynamic query.
      Specified by:
      dynamicQueryCount in interface LayoutLocalService
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the number of rows matching the dynamic query
    • dynamicQueryCount

      public long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
      Returns the number of rows matching the dynamic query.
      Specified by:
      dynamicQueryCount in interface LayoutLocalService
      Parameters:
      dynamicQuery - the dynamic query
      projection - the projection to apply to the query
      Returns:
      the number of rows matching the dynamic query
    • fetchDefaultLayout

      public Layout fetchDefaultLayout(long groupId, boolean privateLayout)
      Specified by:
      fetchDefaultLayout in interface LayoutLocalService
    • fetchDraftLayout

      public Layout fetchDraftLayout(long plid)
      Specified by:
      fetchDraftLayout in interface LayoutLocalService
    • fetchFirstLayout

      public Layout fetchFirstLayout(long groupId, boolean privateLayout, long parentLayoutId)
      Specified by:
      fetchFirstLayout in interface LayoutLocalService
    • fetchFirstLayout

      public Layout fetchFirstLayout(long groupId, boolean privateLayout, long parentLayoutId, boolean hidden)
      Specified by:
      fetchFirstLayout in interface LayoutLocalService
    • fetchLayout

      public Layout fetchLayout(long plid)
      Specified by:
      fetchLayout in interface LayoutLocalService
    • fetchLayout

      public Layout fetchLayout(long groupId, boolean privateLayout, long layoutId)
      Specified by:
      fetchLayout in interface LayoutLocalService
    • fetchLayout

      public Layout fetchLayout(long classNameId, long classPK)
      Specified by:
      fetchLayout in interface LayoutLocalService
    • fetchLayout

      public Layout fetchLayout(String uuid, long groupId, boolean privateLayout)
      Specified by:
      fetchLayout in interface LayoutLocalService
    • fetchLayoutByExternalReferenceCode

      public Layout fetchLayoutByExternalReferenceCode(String externalReferenceCode, long groupId)
      Specified by:
      fetchLayoutByExternalReferenceCode in interface LayoutLocalService
    • fetchLayoutByFriendlyURL

      public Layout fetchLayoutByFriendlyURL(long groupId, boolean privateLayout, String friendlyURL)
      Specified by:
      fetchLayoutByFriendlyURL in interface LayoutLocalService
    • fetchLayoutByIconImageId

      public Layout fetchLayoutByIconImageId(boolean privateLayout, long iconImageId) throws PortalException
      Specified by:
      fetchLayoutByIconImageId in interface LayoutLocalService
      Throws:
      PortalException
    • fetchLayoutByUuidAndGroupId

      public Layout fetchLayoutByUuidAndGroupId(String uuid, long groupId, boolean privateLayout)
      Returns the layout matching the UUID, group, and privacy.
      Specified by:
      fetchLayoutByUuidAndGroupId in interface LayoutLocalService
      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
    • getActionableDynamicQuery

      public ActionableDynamicQuery getActionableDynamicQuery()
      Specified by:
      getActionableDynamicQuery in interface LayoutLocalService
    • getAllLayouts

      public List<Layout> getAllLayouts(long groupId, boolean privateLayout, String type) throws PortalException
      Returns all the layouts that match the type and belong to the group, including the ones marked as System.
      Specified by:
      getAllLayouts in interface LayoutLocalService
      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:
      PortalException
    • getBrowsableLayout

      public Layout getBrowsableLayout(Layout layout)
      Specified by:
      getBrowsableLayout in interface LayoutLocalService
    • getDefaultPlid

      public long getDefaultPlid(long groupId)
      Returns the primary key of the default layout for the group.
      Specified by:
      getDefaultPlid in interface LayoutLocalService
      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
      Specified by:
      getDefaultPlid in interface LayoutLocalService
      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 PortalException
      Returns primary key of the default portlet layout for the group
      Specified by:
      getDefaultPlid in interface LayoutLocalService
      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:
      PortalException
      PortalException
    • getExportActionableDynamicQuery

      public ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
      Specified by:
      getExportActionableDynamicQuery in interface LayoutLocalService
    • getFriendlyURLLayout

      public Layout getFriendlyURLLayout(long groupId, boolean privateLayout, String friendlyURL) throws PortalException
      Returns the layout for the friendly URL.
      Specified by:
      getFriendlyURLLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • getIndexableActionableDynamicQuery

      public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
      Specified by:
      getIndexableActionableDynamicQuery in interface LayoutLocalService
    • getLayout

      public Layout getLayout(long plid) throws PortalException
      Returns the layout with the primary key.
      Specified by:
      getLayout in interface LayoutLocalService
      Parameters:
      plid - the primary key of the layout
      Returns:
      the layout
      Throws:
      PortalException - if a layout with the primary key could not be found
      PortalException
    • getLayout

      public Layout getLayout(long groupId, boolean privateLayout, long layoutId) throws PortalException
      Returns the layout matching the layout ID, group, and privacy; throws a NoSuchLayoutException otherwise.
      Specified by:
      getLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • getLayoutByExternalReferenceCode

      public Layout getLayoutByExternalReferenceCode(String externalReferenceCode, long groupId) throws PortalException
      Specified by:
      getLayoutByExternalReferenceCode in interface LayoutLocalService
      Throws:
      PortalException
    • getLayoutByFriendlyURL

      public Layout getLayoutByFriendlyURL(long groupId, boolean privateLayout, String friendlyURL) throws PortalException
      Specified by:
      getLayoutByFriendlyURL in interface LayoutLocalService
      Throws:
      PortalException
    • getLayoutByIconImageId

      public Layout getLayoutByIconImageId(long iconImageId) throws PortalException
      Returns the layout for the icon image; throws a NoSuchLayoutException otherwise.
      Specified by:
      getLayoutByIconImageId in interface LayoutLocalService
      Parameters:
      iconImageId - the primary key of the icon image
      Returns:
      Returns the layout for the icon image
      Throws:
      PortalException - if a portal exception occurred
      PortalException
    • getLayoutByUuidAndGroupId

      public Layout getLayoutByUuidAndGroupId(String uuid, long groupId, boolean privateLayout) throws PortalException
      Returns the layout matching the UUID, group, and privacy.
      Specified by:
      getLayoutByUuidAndGroupId in interface LayoutLocalService
      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:
      PortalException - if a matching layout could not be found
      PortalException
    • getLayoutChildLayouts

      public Map<Long,List<Layout>> getLayoutChildLayouts(List<Layout> parentLayouts)
      Specified by:
      getLayoutChildLayouts in interface LayoutLocalService
    • getLayouts

      public List<Layout> getLayouts(Collection<Serializable> primaryKeys)
      Specified by:
      getLayouts in interface LayoutLocalService
    • getLayouts

      public List<Layout> getLayouts(int start, int end)
      Returns a range of all the layouts.

      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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.portal.model.impl.LayoutModelImpl.

      Specified by:
      getLayouts in interface LayoutLocalService
      Parameters:
      start - the lower bound of the range of layouts
      end - the upper bound of the range of layouts (not inclusive)
      Returns:
      the range of layouts
    • getLayouts

      public List<Layout> getLayouts(long companyId)
      Specified by:
      getLayouts in interface LayoutLocalService
    • getLayouts

      public List<Layout> getLayouts(long groupId, boolean privateLayout)
      Returns all the layouts belonging to the group.
      Specified by:
      getLayouts in interface LayoutLocalService
      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<Layout> getLayouts(long groupId, boolean privateLayout, int start, int end, OrderByComparator<Layout> orderByComparator)
      Returns a range of all the layouts belonging to the group.
      Specified by:
      getLayouts in interface LayoutLocalService
      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<Layout> getLayouts(long groupId, boolean privateLayout, int[] statuses, int start, int end, OrderByComparator<Layout> orderByComparator)
      Returns a range of all the layouts belonging to the group.
      Specified by:
      getLayouts in interface LayoutLocalService
      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<Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId)
      Returns all the layouts belonging to the group that are children of the parent layout.
      Specified by:
      getLayouts in interface LayoutLocalService
      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<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.

      Specified by:
      getLayouts in interface LayoutLocalService
      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<Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId, boolean incomplete, int start, int end, OrderByComparator<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.

      Specified by:
      getLayouts in interface LayoutLocalService
      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<Layout> getLayouts(long groupId, boolean privateLayout, long[] layoutIds) throws PortalException
      Returns all the layouts that match the layout IDs and belong to the group.
      Specified by:
      getLayouts in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • getLayouts

      public List<Layout> getLayouts(long groupId, boolean privateLayout, String type) throws PortalException
      Returns all the layouts that match the type and belong to the group.
      Specified by:
      getLayouts in interface LayoutLocalService
      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:
      PortalException
    • getLayouts

      public List<Layout> getLayouts(long groupId, boolean privateLayout, String keywords, String[] types, int start, int end, OrderByComparator<Layout> orderByComparator) throws PortalException
      Returns a range of all the layouts belonging to the group.
      Specified by:
      getLayouts in interface LayoutLocalService
      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:
      PortalException
    • getLayouts

      public List<Layout> getLayouts(long groupId, boolean privateLayout, String[] types) throws PortalException
      Returns all the layouts that match the type and belong to the group.
      Specified by:
      getLayouts in interface LayoutLocalService
      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:
      PortalException
    • getLayouts

      public List<Layout> getLayouts(long groupId, int start, int end, OrderByComparator<Layout> orderByComparator)
      Returns a range of all the layouts belonging to the group.
      Specified by:
      getLayouts in interface LayoutLocalService
      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<Layout> getLayouts(long groupId, long userId, boolean privateLayout, String keywords, String[] types, int start, int end, OrderByComparator<Layout> orderByComparator) throws PortalException
      Returns a range of all the layouts belonging to the group.
      Specified by:
      getLayouts in interface LayoutLocalService
      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:
      PortalException
    • getLayouts

      public List<Layout> getLayouts(long groupId, long userId, boolean privateLayout, String keywords, String[] types, int[] statuses, int start, int end, OrderByComparator<Layout> orderByComparator) throws PortalException
      Specified by:
      getLayouts in interface LayoutLocalService
      Throws:
      PortalException
    • getLayouts

      public 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.
      Specified by:
      getLayouts in interface LayoutLocalService
      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<Layout> getLayouts(long groupId, String keywords, String[] types, int start, int end, OrderByComparator<Layout> orderByComparator) throws PortalException
      Returns a range of all the layouts belonging to the group.
      Specified by:
      getLayouts in interface LayoutLocalService
      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:
      PortalException
    • getLayouts

      public List<Layout> getLayouts(long groupId, String keywords, String[] types, int[] statuses, int start, int end, OrderByComparator<Layout> orderByComparator) throws PortalException
      Returns a range of all the layouts belonging to the group.
      Specified by:
      getLayouts in interface LayoutLocalService
      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:
      PortalException
    • getLayoutsByLayoutPrototypeUuid

      public List<Layout> getLayoutsByLayoutPrototypeUuid(String layoutPrototypeUuid)
      Specified by:
      getLayoutsByLayoutPrototypeUuid in interface LayoutLocalService
    • getLayoutsByLayoutPrototypeUuidCount

      public int getLayoutsByLayoutPrototypeUuidCount(String layoutPrototypeUuid)
      Specified by:
      getLayoutsByLayoutPrototypeUuidCount in interface LayoutLocalService
    • getLayoutsByUuidAndCompanyId

      public List<Layout> getLayoutsByUuidAndCompanyId(String uuid, long companyId)
      Returns all the layouts matching the UUID and company.
      Specified by:
      getLayoutsByUuidAndCompanyId in interface LayoutLocalService
      Parameters:
      uuid - the UUID of the layouts
      companyId - the primary key of the company
      Returns:
      the matching layouts, or an empty list if no matches were found
    • getLayoutsByUuidAndCompanyId

      public List<Layout> getLayoutsByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator<Layout> orderByComparator)
      Returns a range of layouts matching the UUID and company.
      Specified by:
      getLayoutsByUuidAndCompanyId in interface LayoutLocalService
      Parameters:
      uuid - the UUID of the layouts
      companyId - the primary key of the company
      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 results by (optionally null)
      Returns:
      the range of matching layouts, or an empty list if no matches were found
    • getLayoutsCount

      public int getLayoutsCount()
      Returns the number of layouts.
      Specified by:
      getLayoutsCount in interface LayoutLocalService
      Returns:
      the number of layouts
    • getLayoutsCount

      public int getLayoutsCount(Group group, boolean privateLayout) throws PortalException
      Specified by:
      getLayoutsCount in interface LayoutLocalService
      Throws:
      PortalException
    • getLayoutsCount

      public int getLayoutsCount(Group group, boolean privateLayout, boolean includeUserGroups) throws PortalException
      Specified by:
      getLayoutsCount in interface LayoutLocalService
      Throws:
      PortalException
    • getLayoutsCount

      public int getLayoutsCount(Group group, boolean privateLayout, long parentLayoutId)
      Specified by:
      getLayoutsCount in interface LayoutLocalService
    • getLayoutsCount

      public int getLayoutsCount(Group group, boolean privateLayout, long[] layoutIds)
      Specified by:
      getLayoutsCount in interface LayoutLocalService
    • getLayoutsCount

      public int getLayoutsCount(Group group, boolean privateLayout, String keywords, String[] types) throws PortalException
      Specified by:
      getLayoutsCount in interface LayoutLocalService
      Throws:
      PortalException
    • getLayoutsCount

      public int getLayoutsCount(long groupId)
      Specified by:
      getLayoutsCount in interface LayoutLocalService
    • getLayoutsCount

      public int getLayoutsCount(long groupId, boolean privateLayout)
      Specified by:
      getLayoutsCount in interface LayoutLocalService
    • getLayoutsCount

      public int getLayoutsCount(long groupId, boolean privateLayout, long parentLayoutId)
      Specified by:
      getLayoutsCount in interface LayoutLocalService
    • getLayoutsCount

      public int getLayoutsCount(long groupId, long userId, boolean privateLayout, String keywords, String[] types) throws PortalException
      Specified by:
      getLayoutsCount in interface LayoutLocalService
      Throws:
      PortalException
    • getLayoutsCount

      public int getLayoutsCount(long groupId, long userId, boolean privateLayout, String keywords, String[] types, int[] statuses) throws PortalException
      Specified by:
      getLayoutsCount in interface LayoutLocalService
      Throws:
      PortalException
    • getLayoutsCount

      public int getLayoutsCount(long groupId, String keywords, String[] types) throws PortalException
      Specified by:
      getLayoutsCount in interface LayoutLocalService
      Throws:
      PortalException
    • getLayoutsCount

      public int getLayoutsCount(long groupId, String keywords, String[] types, int[] statuses) throws PortalException
      Specified by:
      getLayoutsCount in interface LayoutLocalService
      Throws:
      PortalException
    • getLayoutsCount

      public int getLayoutsCount(User user, boolean privateLayout) throws PortalException
      Specified by:
      getLayoutsCount in interface LayoutLocalService
      Throws:
      PortalException
    • getLayoutsCount

      public int getLayoutsCount(User user, boolean privateLayout, boolean includeUserGroups) throws PortalException
      Specified by:
      getLayoutsCount in interface LayoutLocalService
      Throws:
      PortalException
    • getMasterLayouts

      public List<Layout> getMasterLayouts(long groupId, long masterLayoutPlid)
      Specified by:
      getMasterLayouts in interface LayoutLocalService
    • getMasterLayoutsCount

      public int getMasterLayoutsCount(long groupId, long masterLayoutPlid)
      Specified by:
      getMasterLayoutsCount in interface LayoutLocalService
    • getNextLayoutId

      public long getNextLayoutId(long groupId, boolean privateLayout)
      Returns the layout ID to use for the next layout.
      Specified by:
      getNextLayoutId in interface LayoutLocalService
      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
    • getOSGiServiceIdentifier

      public String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Specified by:
      getOSGiServiceIdentifier in interface LayoutLocalService
      Returns:
      the OSGi service identifier
    • getParentLayout

      public Layout getParentLayout(Layout layout) throws PortalException
      Specified by:
      getParentLayout in interface LayoutLocalService
      Throws:
      PortalException
    • getPersistedModel

      public PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException
      Specified by:
      getPersistedModel in interface LayoutLocalService
      Specified by:
      getPersistedModel in interface PersistedModelLocalService
      Throws:
      PortalException
      PortalException
    • getPublishedLayouts

      public List<Layout> getPublishedLayouts(long groupId, int start, int end, OrderByComparator<Layout> orderByComparator)
      Specified by:
      getPublishedLayouts in interface LayoutLocalService
    • getPublishedLayoutsCount

      public int getPublishedLayoutsCount(long groupId)
      Specified by:
      getPublishedLayoutsCount in interface LayoutLocalService
    • getScopeGroupLayouts

      public List<Layout> getScopeGroupLayouts(long parentGroupId) throws PortalException
      Specified by:
      getScopeGroupLayouts in interface LayoutLocalService
      Throws:
      PortalException
    • getScopeGroupLayouts

      public List<Layout> getScopeGroupLayouts(long parentGroupId, boolean privateLayout) throws PortalException
      Returns all the layouts within scope of the group.
      Specified by:
      getScopeGroupLayouts in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • hasLayout

      public boolean hasLayout(String uuid, long groupId, boolean privateLayout) throws PortalException
      Returns true if there is a matching layout with the UUID, group, and privacy.
      Specified by:
      hasLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • hasLayouts

      public boolean hasLayouts(Group group) throws PortalException
      Specified by:
      hasLayouts in interface LayoutLocalService
      Throws:
      PortalException
    • hasLayouts

      public boolean hasLayouts(Group group, boolean privateLayout) throws PortalException
      Specified by:
      hasLayouts in interface LayoutLocalService
      Throws:
      PortalException
    • hasLayouts

      public boolean hasLayouts(Group group, boolean privateLayout, boolean includeUserGroups) throws PortalException
      Specified by:
      hasLayouts in interface LayoutLocalService
      Throws:
      PortalException
    • hasLayouts

      public boolean hasLayouts(long groupId, boolean privateLayout, long parentLayoutId)
      Returns true if the group has any layouts; false otherwise.
      Specified by:
      hasLayouts in interface LayoutLocalService
      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(User user, boolean privateLayout) throws PortalException
      Specified by:
      hasLayouts in interface LayoutLocalService
      Throws:
      PortalException
    • hasLayouts

      public boolean hasLayouts(User user, boolean privateLayout, boolean includeUserGroups) throws PortalException
      Specified by:
      hasLayouts in interface LayoutLocalService
      Throws:
      PortalException
    • hasLayoutSetPrototypeLayout

      public boolean hasLayoutSetPrototypeLayout(long layoutSetPrototypeId, String layoutUuid) throws PortalException
      Specified by:
      hasLayoutSetPrototypeLayout in interface LayoutLocalService
      Throws:
      PortalException
    • hasLayoutSetPrototypeLayout

      public boolean hasLayoutSetPrototypeLayout(String layoutSetPrototypeUuid, long companyId, String layoutUuid) throws PortalException
      Specified by:
      hasLayoutSetPrototypeLayout in interface LayoutLocalService
      Throws:
      PortalException
    • search

      public List<Layout> search(long groupId, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types, int start, int end, OrderByComparator<Layout> orderByComparator) throws PortalException
      Specified by:
      search in interface LayoutLocalService
      Throws:
      PortalException
    • search

      public List<Layout> search(long groupId, long userId, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types, int start, int end, OrderByComparator<Layout> orderByComparator) throws PortalException
      Specified by:
      search in interface LayoutLocalService
      Throws:
      PortalException
    • search

      public List<Layout> search(long groupId, long userId, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types, int[] statuses, int start, int end, OrderByComparator<Layout> orderByComparator) throws PortalException
      Specified by:
      search in interface LayoutLocalService
      Throws:
      PortalException
    • searchCount

      public int searchCount(Group group, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types) throws PortalException
      Specified by:
      searchCount in interface LayoutLocalService
      Throws:
      PortalException
    • searchCount

      public int searchCount(long groupId, long userId, boolean privateLayout, String keywords, boolean searchOnlyByTitle, String[] types) throws PortalException
      Specified by:
      searchCount in interface LayoutLocalService
      Throws:
      PortalException
    • setLayouts

      public void setLayouts(long groupId, boolean privateLayout, long parentLayoutId, long[] layoutIds, ServiceContext serviceContext) throws PortalException
      Sets the layouts for the group, replacing and prioritizing all layouts of the parent layout.
      Specified by:
      setLayouts in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateAsset

      public void updateAsset(long userId, Layout layout, long[] assetCategoryIds, String[] assetTagNames) throws PortalException
      Specified by:
      updateAsset in interface LayoutLocalService
      Throws:
      PortalException
    • updateFriendlyURL

      public Layout updateFriendlyURL(long userId, long plid, String friendlyURL, String languageId) throws PortalException
      Updates the friendly URL of the layout.
      Specified by:
      updateFriendlyURL in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateIconImage

      public Layout updateIconImage(long plid, byte[] bytes) throws PortalException
      Specified by:
      updateIconImage in interface LayoutLocalService
      Throws:
      PortalException
    • updateLayout

      public Layout updateLayout(Layout layout)
      Updates the layout in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect LayoutLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.

      Specified by:
      updateLayout in interface LayoutLocalService
      Parameters:
      layout - the layout
      Returns:
      the layout that was updated
    • updateLayout

      public Layout updateLayout(long groupId, boolean privateLayout, long layoutId, Date publishDate) throws PortalException
      Updates the layout replacing its draft publish date.
      Specified by:
      updateLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateLayout

      public Layout updateLayout(long groupId, boolean privateLayout, long layoutId, long classNameId, long classPK) throws PortalException
      Updates the layout replacing its entity class name ID and primary key.
      Specified by:
      updateLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateLayout

      public 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, ServiceContext serviceContext) throws PortalException
      Updates the layout.
      Specified by:
      updateLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateLayout

      public Layout updateLayout(long groupId, boolean privateLayout, long layoutId, String typeSettings) throws PortalException
      Updates the layout replacing its type settings.
      Specified by:
      updateLayout in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateLayout

      public 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 PortalException
      Specified by:
      updateLayout in interface LayoutLocalService
      Throws:
      PortalException
    • updateLookAndFeel

      public Layout updateLookAndFeel(long groupId, boolean privateLayout, long layoutId, String themeId, String colorSchemeId, String css) throws PortalException
      Updates the look and feel of the layout.
      Specified by:
      updateLookAndFeel in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateMasterLayoutPlid

      public Layout updateMasterLayoutPlid(long groupId, boolean privateLayout, long layoutId, long masterLayoutPlid) throws PortalException
      Updates the layout replacing its master layout plid.
      Specified by:
      updateMasterLayoutPlid in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateName

      public Layout updateName(Layout layout, String name, String languageId) throws PortalException
      Updates the name of the layout.
      Specified by:
      updateName in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateName

      public Layout updateName(long groupId, boolean privateLayout, long layoutId, String name, String languageId) throws PortalException
      Updates the name of the layout matching the group, layout ID, and privacy.
      Specified by:
      updateName in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateName

      public Layout updateName(long plid, String name, String languageId) throws PortalException
      Updates the name of the layout matching the primary key.
      Specified by:
      updateName in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateParentLayoutId

      public Layout updateParentLayoutId(long groupId, boolean privateLayout, long layoutId, long parentLayoutId) throws PortalException
      Updates the parent layout ID of the layout matching the group, layout ID, and privacy.
      Specified by:
      updateParentLayoutId in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateParentLayoutId

      public Layout updateParentLayoutId(long plid, long parentPlid) throws 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.
      Specified by:
      updateParentLayoutId in interface LayoutLocalService
      Parameters:
      plid - the primary key of the layout
      parentPlid - the primary key of the parent layout
      Returns:
      the layout matching the primary key
      Throws:
      PortalException - if a portal exception occurred
      PortalException
    • updateParentLayoutIdAndPriority

      public Layout updateParentLayoutIdAndPriority(long plid, long parentPlid, int priority) throws PortalException
      Updates the parent layout ID and priority of the layout.
      Specified by:
      updateParentLayoutIdAndPriority in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updatePriorities

      public void updatePriorities(long groupId, boolean privateLayout) throws PortalException
      Updates the priorities of the layouts.
      Specified by:
      updatePriorities in interface LayoutLocalService
      Parameters:
      groupId - the primary key of the group
      privateLayout - whether the layout is private to the group
      Throws:
      PortalException
      PortalException
    • updatePriority

      public Layout updatePriority(Layout layout, int priority) throws PortalException
      Updates the priority of the layout.
      Specified by:
      updatePriority in interface LayoutLocalService
      Parameters:
      layout - the layout to be updated
      priority - the layout's new priority
      Returns:
      the updated layout
      Throws:
      PortalException - if a portal exception occurred
      PortalException
    • updatePriority

      public Layout updatePriority(long groupId, boolean privateLayout, long layoutId, int priority) throws PortalException
      Updates the priority of the layout matching the group, layout ID, and privacy.
      Specified by:
      updatePriority in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updatePriority

      public Layout updatePriority(long groupId, boolean privateLayout, long layoutId, long nextLayoutId, long previousLayoutId) throws 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.
      Specified by:
      updatePriority in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updatePriority

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

      public Layout updateStatus(long userId, long plid, int status, ServiceContext serviceContext) throws PortalException
      Specified by:
      updateStatus in interface LayoutLocalService
      Throws:
      PortalException
    • updateStyleBookEntryId

      public Layout updateStyleBookEntryId(long groupId, boolean privateLayout, long layoutId, long styleBookEntryId) throws PortalException
      Updates the layout replacing its style book entry ID.
      Specified by:
      updateStyleBookEntryId in interface LayoutLocalService
      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:
      PortalException - if a portal exception occurred
      PortalException
    • updateType

      public Layout updateType(long plid, String type) throws PortalException
      Specified by:
      updateType in interface LayoutLocalService
      Throws:
      PortalException
    • getBasePersistence

      public BasePersistence<?> getBasePersistence()
      Specified by:
      getBasePersistence in interface PersistedModelLocalService
    • getCTPersistence

      public CTPersistence<Layout> getCTPersistence()
      Specified by:
      getCTPersistence in interface CTService<Layout>
      Specified by:
      getCTPersistence in interface LayoutLocalService
    • getModelClass

      public Class<Layout> getModelClass()
      Specified by:
      getModelClass in interface CTService<Layout>
      Specified by:
      getModelClass in interface LayoutLocalService
    • updateWithUnsafeFunction

      public <R, E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<Layout>,R,E> updateUnsafeFunction) throws E
      Specified by:
      updateWithUnsafeFunction in interface CTService<Layout>
      Specified by:
      updateWithUnsafeFunction in interface LayoutLocalService
      Throws:
      E extends Throwable
    • getWrappedService

      public LayoutLocalService getWrappedService()
      Specified by:
      getWrappedService in interface ServiceWrapper<LayoutLocalService>
    • setWrappedService

      public void setWrappedService(LayoutLocalService layoutLocalService)
      Specified by:
      setWrappedService in interface ServiceWrapper<LayoutLocalService>