public class LayoutLocalServiceUtil
extends java.lang.Object
com.liferay.portal.service.impl.LayoutLocalServiceImpl
and
is an access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.LayoutLocalService
Constructor and Description |
---|
LayoutLocalServiceUtil() |
Modifier and Type | Method and Description |
---|---|
static Layout |
addLayout(Layout layout)
Adds the layout to the database.
|
static Layout |
addLayout(long userId,
long groupId,
boolean privateLayout,
long parentLayoutId,
long classNameId,
long classPK,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.util.Map<java.util.Locale,java.lang.String> keywordsMap,
java.util.Map<java.util.Locale,java.lang.String> robotsMap,
java.lang.String type,
java.lang.String typeSettings,
boolean hidden,
boolean system,
java.util.Map<java.util.Locale,java.lang.String> friendlyURLMap,
ServiceContext serviceContext)
Adds a layout with additional parameters.
|
static Layout |
addLayout(long userId,
long groupId,
boolean privateLayout,
long parentLayoutId,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.util.Map<java.util.Locale,java.lang.String> keywordsMap,
java.util.Map<java.util.Locale,java.lang.String> robotsMap,
java.lang.String type,
java.lang.String typeSettings,
boolean hidden,
boolean system,
java.util.Map<java.util.Locale,java.lang.String> friendlyURLMap,
ServiceContext serviceContext)
Adds a layout with additional parameters.
|
static Layout |
addLayout(long userId,
long groupId,
boolean privateLayout,
long parentLayoutId,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.util.Map<java.util.Locale,java.lang.String> keywordsMap,
java.util.Map<java.util.Locale,java.lang.String> robotsMap,
java.lang.String type,
java.lang.String typeSettings,
boolean hidden,
java.util.Map<java.util.Locale,java.lang.String> friendlyURLMap,
ServiceContext serviceContext)
Adds a layout with additional parameters.
|
static Layout |
addLayout(long userId,
long groupId,
boolean privateLayout,
long parentLayoutId,
java.lang.String name,
java.lang.String title,
java.lang.String description,
java.lang.String type,
boolean hidden,
boolean system,
java.lang.String friendlyURL,
ServiceContext serviceContext)
Adds a layout with single entry maps for name, title, and description to
the default locale.
|
static Layout |
addLayout(long userId,
long groupId,
boolean privateLayout,
long parentLayoutId,
java.lang.String name,
java.lang.String title,
java.lang.String description,
java.lang.String type,
boolean hidden,
java.lang.String friendlyURL,
ServiceContext serviceContext)
Adds a layout with single entry maps for name, title, and description to
the default locale.
|
static void |
anonymizeLayout(Layout layout,
long userId,
User anonymousUser)
Anonymize user information of the specific layout
|
static Layout |
checkout(Layout publishedLayout,
int version) |
static Layout |
create()
Creates a new layout.
|
static Layout |
delete(Layout publishedLayout) |
static Layout |
deleteDraft(Layout draftLayout) |
static Layout |
deleteLayout(Layout layout)
Deletes the layout from the database.
|
static void |
deleteLayout(Layout layout,
boolean updateLayoutSet,
ServiceContext serviceContext)
Deletes the layout, its child layouts, and its associated resources.
|
static Layout |
deleteLayout(long plid)
Deletes the layout with the primary key from the database.
|
static void |
deleteLayout(long groupId,
boolean privateLayout,
long layoutId,
ServiceContext serviceContext)
Deletes the layout with the layout ID, also deleting the layout's child
layouts, and associated resources.
|
static void |
deleteLayout(long plid,
ServiceContext serviceContext)
Deletes the layout with the plid, also deleting the layout's child
layouts, and associated resources.
|
static void |
deleteLayouts(long groupId,
boolean privateLayout,
ServiceContext serviceContext)
Deletes the group's private or non-private layouts, also deleting the
layouts' child layouts, and associated resources.
|
static PersistedModel |
deletePersistedModel(PersistedModel persistedModel) |
static LayoutVersion |
deleteVersion(LayoutVersion layoutVersion) |
static DynamicQuery |
dynamicQuery() |
static <T> java.util.List<T> |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
static <T> java.util.List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows.
|
static <T> java.util.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.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
static long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows matching the dynamic query.
|
static Layout |
fetchDefaultLayout(long groupId,
boolean privateLayout) |
static Layout |
fetchDraft(Layout layout) |
static Layout |
fetchDraft(long primaryKey) |
static Layout |
fetchFirstLayout(long groupId,
boolean privateLayout,
long parentLayoutId) |
static Layout |
fetchFirstLayout(long groupId,
boolean privateLayout,
long parentLayoutId,
boolean hidden) |
static LayoutVersion |
fetchLatestVersion(Layout layout) |
static Layout |
fetchLayout(long plid) |
static Layout |
fetchLayout(long groupId,
boolean privateLayout,
long layoutId) |
static Layout |
fetchLayout(long classNameId,
long classPK) |
static Layout |
fetchLayout(java.lang.String uuid,
long groupId,
boolean privateLayout) |
static Layout |
fetchLayoutByFriendlyURL(long groupId,
boolean privateLayout,
java.lang.String friendlyURL) |
static Layout |
fetchLayoutByIconImageId(boolean privateLayout,
long iconImageId) |
static Layout |
fetchLayoutByUuidAndGroupId(java.lang.String uuid,
long groupId,
boolean privateLayout)
Returns the layout matching the UUID, group, and privacy.
|
static LayoutVersion |
fetchLayoutVersion(long layoutVersionId) |
static Layout |
fetchPublished(Layout layout) |
static Layout |
fetchPublished(long primaryKey) |
static ActionableDynamicQuery |
getActionableDynamicQuery() |
static long |
getDefaultPlid(long groupId)
Returns the primary key of the default layout for the group.
|
static long |
getDefaultPlid(long groupId,
boolean privateLayout)
Returns primary key of the matching default layout for the group
|
static long |
getDefaultPlid(long groupId,
boolean privateLayout,
java.lang.String portletId)
Returns primary key of the default portlet layout for the group
|
static Layout |
getDraft(Layout layout) |
static Layout |
getDraft(long primaryKey) |
static ExportActionableDynamicQuery |
getExportActionableDynamicQuery(PortletDataContext portletDataContext) |
static Layout |
getFriendlyURLLayout(long groupId,
boolean privateLayout,
java.lang.String friendlyURL)
Returns the layout for the friendly URL.
|
static IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
static Layout |
getLayout(long plid)
Returns the layout with the primary key.
|
static Layout |
getLayout(long groupId,
boolean privateLayout,
long layoutId)
Returns the layout matching the layout ID, group, and privacy; throws a
NoSuchLayoutException otherwise. |
static Layout |
getLayoutByIconImageId(long iconImageId)
Returns the layout for the icon image; throws a
NoSuchLayoutException otherwise. |
static Layout |
getLayoutByUuidAndGroupId(java.lang.String uuid,
long groupId,
boolean privateLayout)
Returns the layout matching the UUID, group, and privacy.
|
static java.util.Map<java.lang.Long,java.util.List<Layout>> |
getLayoutChildLayouts(LayoutSet layoutSet,
java.util.List<Layout> parentLayouts)
Deprecated.
As of Judson (7.1.x), replaced by
getLayoutChildLayouts(List) |
static java.util.Map<java.lang.Long,java.util.List<Layout>> |
getLayoutChildLayouts(java.util.List<Layout> parentLayouts) |
static java.util.List<Layout> |
getLayouts(int start,
int end)
Returns a range of all the layouts.
|
static java.util.List<Layout> |
getLayouts(long companyId) |
static java.util.List<Layout> |
getLayouts(long groupId,
boolean privateLayout)
Returns all the layouts belonging to the group.
|
static java.util.List<Layout> |
getLayouts(long groupId,
boolean privateLayout,
int start,
int end,
OrderByComparator<Layout> obc)
Returns a range of all the layouts belonging to the group.
|
static java.util.List<Layout> |
getLayouts(long groupId,
boolean privateLayout,
long parentLayoutId)
Returns all the layouts belonging to the group that are children of the
parent layout.
|
static java.util.List<Layout> |
getLayouts(long groupId,
boolean privateLayout,
long[] layoutIds)
Returns all the layouts that match the layout IDs and belong to the
group.
|
static java.util.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.
|
static java.util.List<Layout> |
getLayouts(long groupId,
boolean privateLayout,
long parentLayoutId,
boolean incomplete,
int start,
int end,
OrderByComparator<Layout> obc)
Returns a range of all the layouts belonging to the group that are
children of the parent layout.
|
static java.util.List<Layout> |
getLayouts(long groupId,
boolean privateLayout,
java.lang.String type)
Returns all the layouts that match the type and belong to the group.
|
static java.util.List<Layout> |
getLayouts(long groupId,
boolean privateLayout,
java.lang.String keywords,
java.lang.String[] types,
int start,
int end,
OrderByComparator<Layout> obc)
Returns a range of all the layouts belonging to the group.
|
static java.util.List<Layout> |
getLayouts(long groupId,
int start,
int end,
OrderByComparator<Layout> obc)
Returns a range of all the layouts belonging to the group.
|
static java.util.List<Layout> |
getLayouts(long groupId,
java.lang.String keywords,
java.lang.String[] types,
int start,
int end,
OrderByComparator<Layout> obc)
Returns a range of all the layouts belonging to the group.
|
static LayoutReference[] |
getLayouts(long companyId,
java.lang.String portletId,
java.lang.String preferencesKey,
java.lang.String preferencesValue)
Returns the layout references for all the layouts that belong to the
company and belong to the portlet that matches the preferences.
|
static java.util.List<Layout> |
getLayoutsByLayoutPrototypeUuid(java.lang.String layoutPrototypeUuid) |
static int |
getLayoutsByLayoutPrototypeUuidCount(java.lang.String layoutPrototypeUuid) |
static java.util.List<Layout> |
getLayoutsByUuidAndCompanyId(java.lang.String uuid,
long companyId)
Returns all the layouts matching the UUID and company.
|
static java.util.List<Layout> |
getLayoutsByUuidAndCompanyId(java.lang.String uuid,
long companyId,
int start,
int end,
OrderByComparator<Layout> orderByComparator)
Returns a range of layouts matching the UUID and company.
|
static int |
getLayoutsCount()
Returns the number of layouts.
|
static int |
getLayoutsCount(Group group,
boolean privateLayout) |
static int |
getLayoutsCount(Group group,
boolean privateLayout,
boolean includeUserGroups) |
static int |
getLayoutsCount(Group group,
boolean privateLayout,
long parentLayoutId) |
static int |
getLayoutsCount(Group group,
boolean privateLayout,
long[] layoutIds) |
static int |
getLayoutsCount(Group group,
boolean privateLayout,
java.lang.String keywords,
java.lang.String[] types) |
static int |
getLayoutsCount(long groupId) |
static int |
getLayoutsCount(long groupId,
java.lang.String keywords,
java.lang.String[] types) |
static int |
getLayoutsCount(User user,
boolean privateLayout) |
static int |
getLayoutsCount(User user,
boolean privateLayout,
boolean includeUserGroups) |
static long |
getNextLayoutId(long groupId,
boolean privateLayout)
Returns the layout ID to use for the next layout.
|
static java.util.List<Layout> |
getNoPermissionLayouts(long roleId)
Deprecated.
As of Judson (7.1.x), with no direct replacement
|
static java.util.List<Layout> |
getNullFriendlyURLLayouts()
Deprecated.
As of Judson (7.1.x), with no direct replacement
|
static java.lang.String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static Layout |
getParentLayout(Layout layout) |
static PersistedModel |
getPersistedModel(java.io.Serializable primaryKeyObj) |
static java.util.List<Layout> |
getScopeGroupLayouts(long parentGroupId) |
static java.util.List<Layout> |
getScopeGroupLayouts(long parentGroupId,
boolean privateLayout)
Returns all the layouts within scope of the group.
|
static LayoutLocalService |
getService() |
static LayoutVersion |
getVersion(Layout layout,
int version) |
static java.util.List<LayoutVersion> |
getVersions(Layout layout) |
static boolean |
hasLayout(java.lang.String uuid,
long groupId,
boolean privateLayout)
Returns
true if there is a matching layout with the UUID,
group, and privacy. |
static boolean |
hasLayouts(Group group) |
static boolean |
hasLayouts(Group group,
boolean privateLayout) |
static boolean |
hasLayouts(Group group,
boolean privateLayout,
boolean includeUserGroups) |
static boolean |
hasLayouts(long groupId,
boolean privateLayout,
long parentLayoutId)
Returns
true if the group has any layouts;
false otherwise. |
static boolean |
hasLayouts(User user,
boolean privateLayout) |
static boolean |
hasLayouts(User user,
boolean privateLayout,
boolean includeUserGroups) |
static boolean |
hasLayoutSetPrototypeLayout(long layoutSetPrototypeId,
java.lang.String layoutUuid) |
static boolean |
hasLayoutSetPrototypeLayout(java.lang.String layoutSetPrototypeUuid,
long companyId,
java.lang.String layoutUuid) |
static Layout |
publishDraft(Layout draftLayout) |
static void |
registerListener(VersionServiceListener<Layout,LayoutVersion> versionServiceListener) |
static void |
setLayouts(long groupId,
boolean privateLayout,
long parentLayoutId,
long[] layoutIds,
ServiceContext serviceContext)
Sets the layouts for the group, replacing and prioritizing all layouts of
the parent layout.
|
static void |
unregisterListener(VersionServiceListener<Layout,LayoutVersion> versionServiceListener) |
static void |
updateAsset(long userId,
Layout layout,
long[] assetCategoryIds,
java.lang.String[] assetTagNames) |
static Layout |
updateDraft(Layout draftLayout) |
static Layout |
updateFriendlyURL(long userId,
long plid,
java.lang.String friendlyURL,
java.lang.String languageId)
Updates the friendly URL of the layout.
|
static Layout |
updateIconImage(long plid,
byte[] bytes) |
static Layout |
updateLayout(Layout draftLayout)
Updates the layout in the database or adds it if it does not yet exist.
|
static Layout |
updateLayout(long groupId,
boolean privateLayout,
long layoutId,
java.util.Date publishDate)
Updates the layout replacing its draft publish date.
|
static Layout |
updateLayout(long groupId,
boolean privateLayout,
long layoutId,
long classNameId,
long classPK)
Updates the layout replacing its entity class name ID and primary key.
|
static Layout |
updateLayout(long groupId,
boolean privateLayout,
long layoutId,
long parentLayoutId,
java.util.Map<java.util.Locale,java.lang.String> nameMap,
java.util.Map<java.util.Locale,java.lang.String> titleMap,
java.util.Map<java.util.Locale,java.lang.String> descriptionMap,
java.util.Map<java.util.Locale,java.lang.String> keywordsMap,
java.util.Map<java.util.Locale,java.lang.String> robotsMap,
java.lang.String type,
boolean hidden,
java.util.Map<java.util.Locale,java.lang.String> friendlyURLMap,
boolean hasIconImage,
byte[] iconBytes,
ServiceContext serviceContext)
Updates the layout.
|
static Layout |
updateLayout(long groupId,
boolean privateLayout,
long layoutId,
java.lang.String typeSettings)
Updates the layout replacing its type settings.
|
static Layout |
updateLookAndFeel(long groupId,
boolean privateLayout,
long layoutId,
java.lang.String themeId,
java.lang.String colorSchemeId,
java.lang.String css)
Updates the look and feel of the layout.
|
static Layout |
updateName(Layout layout,
java.lang.String name,
java.lang.String languageId)
Updates the name of the layout.
|
static Layout |
updateName(long groupId,
boolean privateLayout,
long layoutId,
java.lang.String name,
java.lang.String languageId)
Updates the name of the layout matching the group, layout ID, and
privacy.
|
static Layout |
updateName(long plid,
java.lang.String name,
java.lang.String languageId)
Updates the name of the layout matching the primary key.
|
static 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.
|
static Layout |
updateParentLayoutId(long plid,
long parentPlid)
Updates the parent layout ID of the layout matching the primary key.
|
static Layout |
updateParentLayoutIdAndPriority(long plid,
long parentPlid,
int priority)
Updates the parent layout ID and priority of the layout.
|
static void |
updatePriorities(long groupId,
boolean privateLayout)
Updates the priorities of the layouts.
|
static Layout |
updatePriority(Layout layout,
int priority)
Updates the priority of the layout.
|
static Layout |
updatePriority(long groupId,
boolean privateLayout,
long layoutId,
int priority)
Updates the priority of the layout matching the group, layout ID, and
privacy.
|
static 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.
|
static Layout |
updatePriority(long plid,
int priority)
Updates the priority of the layout matching the primary key.
|
static Layout |
updateType(long plid,
java.lang.String type) |
public static Layout addLayout(Layout layout)
layout
- the layoutpublic static Layout addLayout(long userId, long groupId, boolean privateLayout, long parentLayoutId, long classNameId, long classPK, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> titleMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.util.Map<java.util.Locale,java.lang.String> keywordsMap, java.util.Map<java.util.Locale,java.lang.String> robotsMap, java.lang.String type, java.lang.String typeSettings, boolean hidden, boolean system, java.util.Map<java.util.Locale,java.lang.String> friendlyURLMap, ServiceContext serviceContext) throws PortalException
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.
userId
- the primary key of the usergroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- the layout ID of the parent layout (optionally
LayoutConstants#DEFAULT_PARENT_LAYOUT_ID
)classNameId
- the class name ID of the entityclassPK
- the primary key of the entitynameMap
- the layout's locales and localized namestitleMap
- the layout's locales and localized titlesdescriptionMap
- the layout's locales and localized descriptionskeywordsMap
- the layout's locales and localized keywordsrobotsMap
- the layout's locales and localized robotstype
- 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 hiddensystem
- whether the layout is of system typefriendlyURLMap
- 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.PortalException
- if a portal exception occurredpublic static Layout addLayout(long userId, long groupId, boolean privateLayout, long parentLayoutId, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> titleMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.util.Map<java.util.Locale,java.lang.String> keywordsMap, java.util.Map<java.util.Locale,java.lang.String> robotsMap, java.lang.String type, java.lang.String typeSettings, boolean hidden, boolean system, java.util.Map<java.util.Locale,java.lang.String> friendlyURLMap, ServiceContext serviceContext) throws PortalException
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.
userId
- the primary key of the usergroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- the layout ID of the parent layout (optionally
LayoutConstants#DEFAULT_PARENT_LAYOUT_ID
)nameMap
- the layout's locales and localized namestitleMap
- the layout's locales and localized titlesdescriptionMap
- the layout's locales and localized descriptionskeywordsMap
- the layout's locales and localized keywordsrobotsMap
- the layout's locales and localized robotstype
- 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 hiddensystem
- whether the layout is of system typefriendlyURLMap
- 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.PortalException
- if a portal exception occurredpublic static Layout addLayout(long userId, long groupId, boolean privateLayout, long parentLayoutId, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> titleMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.util.Map<java.util.Locale,java.lang.String> keywordsMap, java.util.Map<java.util.Locale,java.lang.String> robotsMap, java.lang.String type, java.lang.String typeSettings, boolean hidden, java.util.Map<java.util.Locale,java.lang.String> friendlyURLMap, ServiceContext serviceContext) throws PortalException
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.
userId
- the primary key of the usergroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- the layout ID of the parent layout (optionally
LayoutConstants#DEFAULT_PARENT_LAYOUT_ID
)nameMap
- the layout's locales and localized namestitleMap
- the layout's locales and localized titlesdescriptionMap
- the layout's locales and localized descriptionskeywordsMap
- the layout's locales and localized keywordsrobotsMap
- the layout's locales and localized robotstype
- 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 hiddenfriendlyURLMap
- 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.PortalException
- if a portal exception occurredpublic static Layout addLayout(long userId, long groupId, boolean privateLayout, long parentLayoutId, java.lang.String name, java.lang.String title, java.lang.String description, java.lang.String type, boolean hidden, boolean system, java.lang.String friendlyURL, ServiceContext serviceContext) throws PortalException
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.
userId
- the primary key of the usergroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- 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 titledescription
- the layout's descriptiontype
- the layout's type (optionally LayoutConstants#TYPE_PORTLET
). The possible types can be found
in LayoutConstants
.hidden
- whether the layout is hiddensystem
- whether the layout is of system typefriendlyURL
- 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.PortalException
- if a portal exception occurredpublic static Layout addLayout(long userId, long groupId, boolean privateLayout, long parentLayoutId, java.lang.String name, java.lang.String title, java.lang.String description, java.lang.String type, boolean hidden, java.lang.String friendlyURL, ServiceContext serviceContext) throws PortalException
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.
userId
- the primary key of the usergroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- 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 titledescription
- the layout's descriptiontype
- the layout's type (optionally LayoutConstants#TYPE_PORTLET
). The possible types can be found
in LayoutConstants
.hidden
- whether the layout is hiddenfriendlyURL
- 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.PortalException
- if a portal exception occurredpublic static void anonymizeLayout(Layout layout, long userId, User anonymousUser) throws PortalException
layout
- the layout that need to anonymizeduserId
- the primary key of the owner useranonymousUser
- the anonymized user informationPortalException
public static Layout checkout(Layout publishedLayout, int version) throws PortalException
PortalException
public static Layout create()
public static Layout delete(Layout publishedLayout) throws PortalException
PortalException
public static Layout deleteDraft(Layout draftLayout) throws PortalException
PortalException
public static Layout deleteLayout(Layout layout) throws PortalException
layout
- the layoutPortalException
public static void deleteLayout(Layout layout, boolean updateLayoutSet, ServiceContext serviceContext) throws PortalException
layout
- the layoutupdateLayoutSet
- whether the layout set's page counter needs to be
updatedserviceContext
- the service context to be appliedPortalException
- if a portal exception occurredpublic static Layout deleteLayout(long plid) throws PortalException
plid
- the primary key of the layoutPortalException
- if a layout with the primary key could not be foundpublic static void deleteLayout(long groupId, boolean privateLayout, long layoutId, ServiceContext serviceContext) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutId
- the layout ID of the layoutserviceContext
- the service context to be appliedPortalException
- if a portal exception occurredpublic static void deleteLayout(long plid, ServiceContext serviceContext) throws PortalException
plid
- the primary key of the layoutserviceContext
- the service context to be appliedPortalException
- if a portal exception occurredpublic static void deleteLayouts(long groupId, boolean privateLayout, ServiceContext serviceContext) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupserviceContext
- 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
.PortalException
- if a portal exception occurredpublic static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
PortalException
public static LayoutVersion deleteVersion(LayoutVersion layoutVersion) throws PortalException
PortalException
public static DynamicQuery dynamicQuery()
public static <T> java.util.List<T> dynamicQuery(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static <T> java.util.List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
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
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)public static <T> java.util.List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
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
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static long dynamicQueryCount(DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the querypublic static Layout fetchDefaultLayout(long groupId, boolean privateLayout)
public static Layout fetchDraft(long primaryKey)
public static Layout fetchFirstLayout(long groupId, boolean privateLayout, long parentLayoutId)
public static Layout fetchFirstLayout(long groupId, boolean privateLayout, long parentLayoutId, boolean hidden)
public static LayoutVersion fetchLatestVersion(Layout layout)
public static Layout fetchLayout(long plid)
public static Layout fetchLayout(long groupId, boolean privateLayout, long layoutId)
public static Layout fetchLayout(long classNameId, long classPK)
public static Layout fetchLayout(java.lang.String uuid, long groupId, boolean privateLayout)
public static Layout fetchLayoutByFriendlyURL(long groupId, boolean privateLayout, java.lang.String friendlyURL)
public static Layout fetchLayoutByIconImageId(boolean privateLayout, long iconImageId) throws PortalException
PortalException
public static Layout fetchLayoutByUuidAndGroupId(java.lang.String uuid, long groupId, boolean privateLayout)
uuid
- the layout's UUIDgroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupnull
if a matching layout
could not be foundpublic static LayoutVersion fetchLayoutVersion(long layoutVersionId)
public static Layout fetchPublished(long primaryKey)
public static ActionableDynamicQuery getActionableDynamicQuery()
public static long getDefaultPlid(long groupId)
groupId
- the primary key of the groupLayoutConstants#DEFAULT_PLID
)public static long getDefaultPlid(long groupId, boolean privateLayout)
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupLayoutConstants#DEFAULT_PLID
) otherwisepublic static long getDefaultPlid(long groupId, boolean privateLayout, java.lang.String portletId) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupportletId
- the primary key of the portletLayoutConstants#DEFAULT_PLID
otherwisePortalException
public static Layout getDraft(Layout layout) throws PortalException
PortalException
public static Layout getDraft(long primaryKey) throws PortalException
PortalException
public static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
public static Layout getFriendlyURLLayout(long groupId, boolean privateLayout, java.lang.String friendlyURL) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupfriendlyURL
- the friendly URL of the layoutPortalException
- if a portal exception occurredpublic static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
public static Layout getLayout(long plid) throws PortalException
plid
- the primary key of the layoutPortalException
- if a layout with the primary key could not be foundpublic static Layout getLayout(long groupId, boolean privateLayout, long layoutId) throws PortalException
NoSuchLayoutException
otherwise.groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutId
- the layout ID of the layoutPortalException
- if a portal exception occurredpublic static Layout getLayoutByIconImageId(long iconImageId) throws PortalException
NoSuchLayoutException
otherwise.iconImageId
- the primary key of the icon imagePortalException
- if a portal exception occurredpublic static Layout getLayoutByUuidAndGroupId(java.lang.String uuid, long groupId, boolean privateLayout) throws PortalException
uuid
- the layout's UUIDgroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupPortalException
- if a matching layout could not be found@Deprecated public static java.util.Map<java.lang.Long,java.util.List<Layout>> getLayoutChildLayouts(LayoutSet layoutSet, java.util.List<Layout> parentLayouts)
getLayoutChildLayouts(List)
public static java.util.Map<java.lang.Long,java.util.List<Layout>> getLayoutChildLayouts(java.util.List<Layout> parentLayouts)
public static java.util.List<Layout> getLayouts(int start, int end)
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
.
start
- the lower bound of the range of layoutsend
- the upper bound of the range of layouts (not inclusive)public static java.util.List<Layout> getLayouts(long companyId)
public static java.util.List<Layout> getLayouts(long groupId, boolean privateLayout)
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupnull
if no matches were
foundpublic static java.util.List<Layout> getLayouts(long groupId, boolean privateLayout, int start, int end, OrderByComparator<Layout> obc)
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupstart
- the lower bound of the range of layoutsend
- the upper bound of the range of layouts (not inclusive)obc
- the comparator to order the layoutsnull
if no matches were
foundpublic static java.util.List<Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId)
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- the layout ID of the parent layoutnull
if no matches were
foundpublic static java.util.List<Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId, boolean incomplete, int start, int end)
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.
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- the layout ID of the parent layoutincomplete
- whether the layout is incompletestart
- the lower bound of the range of layoutsend
- the upper bound of the range of layouts (not inclusive)null
if no matches were
foundpublic static java.util.List<Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId, boolean incomplete, int start, int end, OrderByComparator<Layout> obc)
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.
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- the layout ID of the parent layoutstart
- the lower bound of the range of layoutsend
- the upper bound of the range of layouts (not inclusive)obc
- the comparator to order the layoutsnull
if no matches were
foundpublic static java.util.List<Layout> getLayouts(long groupId, boolean privateLayout, long[] layoutIds) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutIds
- the layout IDs of the layoutsPortalException
- if a portal exception occurredpublic static java.util.List<Layout> getLayouts(long groupId, boolean privateLayout, java.lang.String type) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouptype
- the type of the layouts (optionally LayoutConstants#TYPE_PORTLET
)null
if no matches were
foundPortalException
public static java.util.List<Layout> getLayouts(long groupId, boolean privateLayout, java.lang.String keywords, java.lang.String[] types, int start, int end, OrderByComparator<Layout> obc) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupkeywords
- keywordstypes
- layout typesstart
- the lower bound of the range of layoutsend
- the upper bound of the range of layouts (not inclusive)obc
- the comparator to order the layoutsnull
if no matches were
foundPortalException
public static java.util.List<Layout> getLayouts(long groupId, int start, int end, OrderByComparator<Layout> obc)
groupId
- the primary key of the groupstart
- the lower bound of the range of layoutsend
- the upper bound of the range of layouts (not inclusive)obc
- the comparator to order the layoutsnull
if no matches were
foundpublic static LayoutReference[] getLayouts(long companyId, java.lang.String portletId, java.lang.String preferencesKey, java.lang.String preferencesValue)
companyId
- the primary key of the companyportletId
- the primary key of the portletpreferencesKey
- the portlet's preference keypreferencesValue
- the portlet's preference valuepublic static java.util.List<Layout> getLayouts(long groupId, java.lang.String keywords, java.lang.String[] types, int start, int end, OrderByComparator<Layout> obc) throws PortalException
groupId
- the primary key of the groupkeywords
- keywordstypes
- layout typesstart
- the lower bound of the range of layoutsend
- the upper bound of the range of layouts (not inclusive)obc
- the comparator to order the layoutsnull
if no matches were
foundPortalException
public static java.util.List<Layout> getLayoutsByLayoutPrototypeUuid(java.lang.String layoutPrototypeUuid)
public static int getLayoutsByLayoutPrototypeUuidCount(java.lang.String layoutPrototypeUuid)
public static java.util.List<Layout> getLayoutsByUuidAndCompanyId(java.lang.String uuid, long companyId)
uuid
- the UUID of the layoutscompanyId
- the primary key of the companypublic static java.util.List<Layout> getLayoutsByUuidAndCompanyId(java.lang.String uuid, long companyId, int start, int end, OrderByComparator<Layout> orderByComparator)
uuid
- the UUID of the layoutscompanyId
- the primary key of the companystart
- the lower bound of the range of layoutsend
- the upper bound of the range of layouts (not inclusive)orderByComparator
- the comparator to order the results by
(optionally null
)public static int getLayoutsCount()
public static int getLayoutsCount(Group group, boolean privateLayout) throws PortalException
PortalException
public static int getLayoutsCount(Group group, boolean privateLayout, boolean includeUserGroups) throws PortalException
PortalException
public static int getLayoutsCount(Group group, boolean privateLayout, long parentLayoutId)
public static int getLayoutsCount(Group group, boolean privateLayout, long[] layoutIds)
public static int getLayoutsCount(Group group, boolean privateLayout, java.lang.String keywords, java.lang.String[] types) throws PortalException
PortalException
public static int getLayoutsCount(long groupId)
public static int getLayoutsCount(long groupId, java.lang.String keywords, java.lang.String[] types) throws PortalException
PortalException
public static int getLayoutsCount(User user, boolean privateLayout) throws PortalException
PortalException
public static int getLayoutsCount(User user, boolean privateLayout, boolean includeUserGroups) throws PortalException
PortalException
public static long getNextLayoutId(long groupId, boolean privateLayout)
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the group@Deprecated public static java.util.List<Layout> getNoPermissionLayouts(long roleId)
roleId
- the primary key of the role@Deprecated public static java.util.List<Layout> getNullFriendlyURLLayouts()
null
null
public static java.lang.String getOSGiServiceIdentifier()
public static Layout getParentLayout(Layout layout) throws PortalException
PortalException
public static PersistedModel getPersistedModel(java.io.Serializable primaryKeyObj) throws PortalException
PortalException
public static java.util.List<Layout> getScopeGroupLayouts(long parentGroupId) throws PortalException
PortalException
public static java.util.List<Layout> getScopeGroupLayouts(long parentGroupId, boolean privateLayout) throws PortalException
parentGroupId
- the primary key of the group's parent groupprivateLayout
- whether the layout is private to the groupPortalException
- if a portal exception occurredpublic static LayoutVersion getVersion(Layout layout, int version) throws PortalException
PortalException
public static java.util.List<LayoutVersion> getVersions(Layout layout)
public static boolean hasLayout(java.lang.String uuid, long groupId, boolean privateLayout) throws PortalException
true
if there is a matching layout with the UUID,
group, and privacy.uuid
- the layout's UUIDgroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouptrue
if the layout is found; false
otherwisePortalException
- if a portal exception occurredpublic static boolean hasLayouts(Group group) throws PortalException
PortalException
public static boolean hasLayouts(Group group, boolean privateLayout) throws PortalException
PortalException
public static boolean hasLayouts(Group group, boolean privateLayout, boolean includeUserGroups) throws PortalException
PortalException
public static boolean hasLayouts(long groupId, boolean privateLayout, long parentLayoutId)
true
if the group has any layouts;
false
otherwise.groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- the layout ID of the parent layouttrue
if the group has any layouts;
false
otherwisepublic static boolean hasLayouts(User user, boolean privateLayout) throws PortalException
PortalException
public static boolean hasLayouts(User user, boolean privateLayout, boolean includeUserGroups) throws PortalException
PortalException
public static boolean hasLayoutSetPrototypeLayout(long layoutSetPrototypeId, java.lang.String layoutUuid) throws PortalException
PortalException
public static boolean hasLayoutSetPrototypeLayout(java.lang.String layoutSetPrototypeUuid, long companyId, java.lang.String layoutUuid) throws PortalException
PortalException
public static Layout publishDraft(Layout draftLayout) throws PortalException
PortalException
public static void registerListener(VersionServiceListener<Layout,LayoutVersion> versionServiceListener)
public static void setLayouts(long groupId, boolean privateLayout, long parentLayoutId, long[] layoutIds, ServiceContext serviceContext) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- the layout ID of the parent layoutlayoutIds
- the layout IDs of the layoutsserviceContext
- the service context to be appliedPortalException
- if a portal exception occurredpublic static void unregisterListener(VersionServiceListener<Layout,LayoutVersion> versionServiceListener)
public static void updateAsset(long userId, Layout layout, long[] assetCategoryIds, java.lang.String[] assetTagNames) throws PortalException
PortalException
public static Layout updateDraft(Layout draftLayout) throws PortalException
PortalException
public static Layout updateFriendlyURL(long userId, long plid, java.lang.String friendlyURL, java.lang.String languageId) throws PortalException
userId
- the primary key of the userplid
- the primary key of the layoutfriendlyURL
- the friendly URL to be assignedlanguageId
- the primary key of the languagePortalException
- if a portal exception occurredpublic static Layout updateIconImage(long plid, byte[] bytes) throws PortalException
PortalException
public static Layout updateLayout(Layout draftLayout) throws PortalException
layout
- the layoutPortalException
public static Layout updateLayout(long groupId, boolean privateLayout, long layoutId, java.util.Date publishDate) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutId
- the layout ID of the layoutpublishDate
- the date when draft was last publishedPortalException
- if a portal exception occurredpublic static Layout updateLayout(long groupId, boolean privateLayout, long layoutId, long classNameId, long classPK) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutId
- the layout ID of the layoutclassNameId
- the class name ID of the entityclassPK
- the primary key of the entityPortalException
- if a portal exception occurredpublic static Layout updateLayout(long groupId, boolean privateLayout, long layoutId, long parentLayoutId, java.util.Map<java.util.Locale,java.lang.String> nameMap, java.util.Map<java.util.Locale,java.lang.String> titleMap, java.util.Map<java.util.Locale,java.lang.String> descriptionMap, java.util.Map<java.util.Locale,java.lang.String> keywordsMap, java.util.Map<java.util.Locale,java.lang.String> robotsMap, java.lang.String type, boolean hidden, java.util.Map<java.util.Locale,java.lang.String> friendlyURLMap, boolean hasIconImage, byte[] iconBytes, ServiceContext serviceContext) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutId
- the layout ID of the layoutparentLayoutId
- the layout ID of the layout's new parent layoutnameMap
- 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 hiddenfriendlyURLMap
- 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 updatediconBytes
- the byte array of the layout's new icon imageserviceContext
- 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.PortalException
- if a portal exception occurredpublic static Layout updateLayout(long groupId, boolean privateLayout, long layoutId, java.lang.String typeSettings) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutId
- the layout ID of the layouttypeSettings
- the settings to load the unicode properties object.
See #fastLoad(String)
.PortalException
- if a portal exception occurredpublic static Layout updateLookAndFeel(long groupId, boolean privateLayout, long layoutId, java.lang.String themeId, java.lang.String colorSchemeId, java.lang.String css) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutId
- the layout ID of the layoutthemeId
- the primary key of the layout's new themecolorSchemeId
- the primary key of the layout's new color schemecss
- the layout's new CSSPortalException
- if a portal exception occurredpublic static Layout updateName(Layout layout, java.lang.String name, java.lang.String languageId) throws PortalException
layout
- the layout to be updatedname
- the layout's new namelanguageId
- the primary key of the language. For more information
see Locale
.PortalException
- if a portal exception occurredpublic static Layout updateName(long groupId, boolean privateLayout, long layoutId, java.lang.String name, java.lang.String languageId) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutId
- the layout ID of the layoutname
- the layout's new namelanguageId
- the primary key of the language. For more information
see Locale
.PortalException
- if a portal exception occurredpublic static Layout updateName(long plid, java.lang.String name, java.lang.String languageId) throws PortalException
plid
- the primary key of the layoutname
- the name to be assignedlanguageId
- the primary key of the language. For more information
see Locale
.PortalException
- if a portal exception occurredpublic static Layout updateParentLayoutId(long groupId, boolean privateLayout, long layoutId, long parentLayoutId) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutId
- the layout ID of the layoutparentLayoutId
- the layout ID to be assigned to the parent layoutPortalException
- if a portal exception occurredpublic static Layout updateParentLayoutId(long plid, long parentPlid) throws PortalException
LayoutConstants#DEFAULT_PARENT_LAYOUT_ID
is assigned.plid
- the primary key of the layoutparentPlid
- the primary key of the parent layoutPortalException
- if a portal exception occurredpublic static Layout updateParentLayoutIdAndPriority(long plid, long parentPlid, int priority) throws PortalException
plid
- the primary key of the layoutparentPlid
- the primary key of the parent layoutpriority
- the layout's new priorityPortalException
- if a portal exception occurredpublic static void updatePriorities(long groupId, boolean privateLayout) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupPortalException
public static Layout updatePriority(Layout layout, int priority) throws PortalException
layout
- the layout to be updatedpriority
- the layout's new priorityPortalException
- if a portal exception occurredpublic static Layout updatePriority(long groupId, boolean privateLayout, long layoutId, int priority) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutId
- the layout ID of the layoutpriority
- the layout's new priorityPortalException
- if a portal exception occurredpublic static Layout updatePriority(long groupId, boolean privateLayout, long layoutId, long nextLayoutId, long previousLayoutId) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutId
- the layout ID of the layoutnextLayoutId
- the layout ID of the next layoutpreviousLayoutId
- the layout ID of the previous layoutPortalException
- if a portal exception occurredpublic static Layout updatePriority(long plid, int priority) throws PortalException
plid
- the primary key of the layoutpriority
- the layout's new priorityPortalException
- if a portal exception occurredpublic static Layout updateType(long plid, java.lang.String type) throws PortalException
PortalException
public static LayoutLocalService getService()