public class LayoutServiceUtil
extends Object
com.liferay.portal.service.impl.LayoutServiceImpl
and is an
access point for service operations in application layer code running on a
remote server. Methods of this service are expected to have security checks
based on the propagated JAAS credentials because this service can be
accessed remotely.LayoutService
Constructor and Description |
---|
LayoutServiceUtil() |
Modifier and Type | Method and Description |
---|---|
static Layout |
addLayout(long groupId,
boolean privateLayout,
long parentLayoutId,
long classNameId,
long classPK,
Map<Locale,String> localeNamesMap,
Map<Locale,String> localeTitlesMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> keywordsMap,
Map<Locale,String> robotsMap,
String type,
String typeSettings,
boolean hidden,
boolean system,
long masterLayoutPlid,
Map<Locale,String> friendlyURLMap,
ServiceContext serviceContext)
Deprecated.
As of Mueller (7.2.x), replaced by
addLayout(long,
boolean, long, long, long, Map, Map, Map, Map, Map, String,
String, boolean, boolean, Map, long, ServiceContext) |
static Layout |
addLayout(long groupId,
boolean privateLayout,
long parentLayoutId,
long classNameId,
long classPK,
Map<Locale,String> localeNamesMap,
Map<Locale,String> localeTitlesMap,
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)
Adds a layout with additional parameters.
|
static Layout |
addLayout(long groupId,
boolean privateLayout,
long parentLayoutId,
long classNameId,
long classPK,
Map<Locale,String> localeNamesMap,
Map<Locale,String> localeTitlesMap,
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)
Deprecated.
As of Mueller (7.2.x), replaced by
addLayout(long,
boolean, long, long, long, Map, Map, Map, Map, Map, String,
String, boolean, boolean, long, Map, ServiceContext) |
static Layout |
addLayout(long groupId,
boolean privateLayout,
long parentLayoutId,
Map<Locale,String> localeNamesMap,
Map<Locale,String> localeTitlesMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> keywordsMap,
Map<Locale,String> robotsMap,
String type,
String typeSettings,
boolean hidden,
long masterLayoutPlid,
Map<Locale,String> friendlyURLMap,
ServiceContext serviceContext)
Deprecated.
As of Athanasius (7.3.x), replaced by
addLayout(long,
boolean, long, long, long, Map, Map, Map, Map, Map, String,
String, boolean, boolean, Map, long, ServiceContext) |
static Layout |
addLayout(long groupId,
boolean privateLayout,
long parentLayoutId,
Map<Locale,String> localeNamesMap,
Map<Locale,String> localeTitlesMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> keywordsMap,
Map<Locale,String> robotsMap,
String type,
String typeSettings,
boolean hidden,
Map<Locale,String> friendlyURLMap,
long masterLayoutPlid,
ServiceContext serviceContext)
Adds a layout with additional parameters.
|
static Layout |
addLayout(long groupId,
boolean privateLayout,
long parentLayoutId,
Map<Locale,String> localeNamesMap,
Map<Locale,String> localeTitlesMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> keywordsMap,
Map<Locale,String> robotsMap,
String type,
String typeSettings,
boolean hidden,
Map<Locale,String> friendlyURLMap,
ServiceContext serviceContext)
Adds a layout with additional parameters.
|
static Layout |
addLayout(long groupId,
boolean privateLayout,
long parentLayoutId,
String name,
String title,
String description,
String type,
boolean hidden,
String friendlyURL,
ServiceContext serviceContext)
Adds a layout with single entry maps for name, title, and description to
the default locale.
|
static FileEntry |
addTempFileEntry(long groupId,
String folderName,
String fileName,
InputStream inputStream,
String mimeType) |
static void |
deleteLayout(long groupId,
boolean privateLayout,
long layoutId,
ServiceContext serviceContext)
Deletes the layout with the primary key, 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 |
deleteTempFileEntry(long groupId,
String folderName,
String fileName) |
static Layout |
fetchLayout(long groupId,
boolean privateLayout,
long layoutId) |
static List<Layout> |
getAncestorLayouts(long plid)
Returns all the ancestor layouts of the layout.
|
static long |
getControlPanelLayoutPlid()
Returns the control panel layout's plid.
|
static long |
getDefaultPlid(long groupId,
boolean privateLayout)
Returns primary key of the matching default layout for the group.
|
static long |
getDefaultPlid(long groupId,
long scopeGroupId,
boolean privateLayout,
String portletId)
Returns the primary key of the default layout for the group.
|
static long |
getDefaultPlid(long groupId,
long scopeGroupId,
String portletId) |
static Layout |
getLayoutByUuidAndGroupId(String uuid,
long groupId,
boolean privateLayout)
Returns the layout matching the UUID, group, and privacy.
|
static String |
getLayoutName(long groupId,
boolean privateLayout,
long layoutId,
String languageId)
Returns the name of the layout.
|
static long |
getLayoutPlid(String uuid,
long groupId,
boolean privateLayout)
Returns the layout's plid that matches the parameters.
|
static LayoutReference[] |
getLayoutReferences(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.
|
static List<Layout> |
getLayouts(long groupId,
boolean privateLayout) |
static List<Layout> |
getLayouts(long groupId,
boolean privateLayout,
long parentLayoutId) |
static List<Layout> |
getLayouts(long groupId,
boolean privateLayout,
long parentLayoutId,
boolean incomplete,
int start,
int end) |
static List<Layout> |
getLayouts(long groupId,
boolean privateLayout,
String type) |
static List<Layout> |
getLayouts(long groupId,
boolean privateLayout,
String type,
int start,
int end) |
static List<Layout> |
getLayouts(long groupId,
boolean privateLayout,
String keywords,
String[] types,
int start,
int end,
OrderByComparator<Layout> orderByComparator) |
static List<Layout> |
getLayouts(long groupId,
String type) |
static List<Layout> |
getLayouts(long groupId,
String type,
int start,
int end) |
static int |
getLayoutsCount(long groupId,
boolean privateLayout) |
static int |
getLayoutsCount(long groupId,
boolean privateLayout,
long parentLayoutId) |
static int |
getLayoutsCount(long groupId,
boolean privateLayout,
long parentLayoutId,
int priority) |
static int |
getLayoutsCount(long groupId,
boolean privateLayout,
String type) |
static int |
getLayoutsCount(long groupId,
boolean privateLayout,
String keywords,
String[] types) |
static int |
getLayoutsCount(long groupId,
String type) |
static String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static LayoutService |
getService() |
static String[] |
getTempFileNames(long groupId,
String folderName) |
static boolean |
hasLayout(String uuid,
long groupId,
boolean privateLayout)
Returns
true if there is a matching layout with the UUID,
group, and privacy. |
static boolean |
hasPortletId(long plid,
String portletId) |
static void |
schedulePublishToLive(long sourceGroupId,
long targetGroupId,
boolean privateLayout,
long[] layoutIds,
Map<String,String[]> parameterMap,
String groupName,
String cronText,
Date schedulerStartDate,
Date schedulerEndDate,
String description)
Schedules a range of layouts to be published.
|
static void |
schedulePublishToRemote(long sourceGroupId,
boolean privateLayout,
Map<Long,Boolean> layoutIdMap,
Map<String,String[]> parameterMap,
String remoteAddress,
int remotePort,
String remotePathContext,
boolean secureConnection,
long remoteGroupId,
boolean remotePrivateLayout,
Date startDate,
Date endDate,
String groupName,
String cronText,
Date schedulerStartDate,
Date schedulerEndDate,
String description)
Schedules a range of layouts to be stored.
|
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 |
unschedulePublishToLive(long groupId,
String jobName,
String groupName)
Deletes the job from the scheduler's queue.
|
static void |
unschedulePublishToRemote(long groupId,
String jobName,
String groupName)
Deletes the job from the scheduler's persistent queue.
|
static Layout |
updateIconImage(long plid,
byte[] bytes) |
static Layout |
updateLayout(long groupId,
boolean privateLayout,
long layoutId,
long parentLayoutId,
Map<Locale,String> localeNamesMap,
Map<Locale,String> localeTitlesMap,
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 masterLayoutPlid,
long styleBookEntryId,
ServiceContext serviceContext)
Updates the layout with additional parameters.
|
static Layout |
updateLayout(long groupId,
boolean privateLayout,
long layoutId,
long parentLayoutId,
Map<Locale,String> localeNamesMap,
Map<Locale,String> localeTitlesMap,
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 masterLayoutPlid,
ServiceContext serviceContext)
Deprecated.
As of Athanasius (7.3.x), replaced by
updateLayout(long, boolean, long, long, Map, Map, Map, Map,
Map, String, boolean, Map, boolean, byte[], long, long,
ServiceContext) |
static Layout |
updateLayout(long groupId,
boolean privateLayout,
long layoutId,
long parentLayoutId,
Map<Locale,String> localeNamesMap,
Map<Locale,String> localeTitlesMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> keywordsMap,
Map<Locale,String> robotsMap,
String type,
boolean hidden,
Map<Locale,String> friendlyURLMap,
boolean hasIconImage,
byte[] iconBytes,
ServiceContext serviceContext)
Deprecated.
As of Athanasius (7.3.x), replaced by
updateLayout(long, boolean, long, long, Map, Map, Map, Map,
Map, String, boolean, Map, boolean, byte[], long,
ServiceContext) |
static Layout |
updateLayout(long groupId,
boolean privateLayout,
long layoutId,
String typeSettings)
Updates the layout replacing its type settings.
|
static Layout |
updateLookAndFeel(long groupId,
boolean privateLayout,
long layoutId,
String themeId,
String colorSchemeId,
String css)
Updates the look and feel of the layout.
|
static Layout |
updateName(long groupId,
boolean privateLayout,
long layoutId,
String name,
String languageId)
Updates the name of the layout matching the group, layout ID, and
privacy.
|
static Layout |
updateName(long plid,
String name,
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 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,
String type) |
@Deprecated public static Layout addLayout(long groupId, boolean privateLayout, long parentLayoutId, long classNameId, long classPK, Map<Locale,String> localeNamesMap, Map<Locale,String> localeTitlesMap, Map<Locale,String> descriptionMap, Map<Locale,String> keywordsMap, Map<Locale,String> robotsMap, String type, String typeSettings, boolean hidden, boolean system, long masterLayoutPlid, Map<Locale,String> friendlyURLMap, ServiceContext serviceContext) throws PortalException
addLayout(long,
boolean, long, long, long, Map, Map, Map, Map, Map, String,
String, boolean, boolean, Map, long, ServiceContext)
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.
groupId
- 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 entitylocaleNamesMap
- the layout's locales and localized nameslocaleTitlesMap
- 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 systemmasterLayoutPlid
- the primary key of the master layoutfriendlyURLMap
- 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 used to
specify whether site administrators can modify this page
within their site.PortalException
- if a portal exception occurredpublic static Layout addLayout(long groupId, boolean privateLayout, long parentLayoutId, long classNameId, long classPK, Map<Locale,String> localeNamesMap, Map<Locale,String> localeTitlesMap, 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
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.
groupId
- 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 entitylocaleNamesMap
- the layout's locales and localized nameslocaleTitlesMap
- 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 systemfriendlyURLMap
- 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 layoutserviceContext
- 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 used to specify whether site
administrators can modify this page within their site.PortalException
- if a portal exception occurred@Deprecated public static Layout addLayout(long groupId, boolean privateLayout, long parentLayoutId, long classNameId, long classPK, Map<Locale,String> localeNamesMap, Map<Locale,String> localeTitlesMap, 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
addLayout(long,
boolean, long, long, long, Map, Map, Map, Map, Map, String,
String, boolean, boolean, long, Map, ServiceContext)
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.
groupId
- 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 entitylocaleNamesMap
- the layout's locales and localized nameslocaleTitlesMap
- 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 systemfriendlyURLMap
- 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 used to
specify whether site administrators can modify this page
within their site.PortalException
- if a portal exception occurred@Deprecated public static Layout addLayout(long groupId, boolean privateLayout, long parentLayoutId, Map<Locale,String> localeNamesMap, Map<Locale,String> localeTitlesMap, Map<Locale,String> descriptionMap, Map<Locale,String> keywordsMap, Map<Locale,String> robotsMap, String type, String typeSettings, boolean hidden, long masterLayoutPlid, Map<Locale,String> friendlyURLMap, ServiceContext serviceContext) throws PortalException
addLayout(long,
boolean, long, long, long, Map, Map, Map, Map, Map, String,
String, boolean, boolean, Map, long, ServiceContext)
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.
groupId
- 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
)localeNamesMap
- the layout's locales and localized nameslocaleTitlesMap
- 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 hiddenmasterLayoutPlid
- the primary key of the master layoutfriendlyURLMap
- 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 used to
specify whether site administrators can modify this page
within their site.PortalException
- if a portal exception occurredpublic static Layout addLayout(long groupId, boolean privateLayout, long parentLayoutId, Map<Locale,String> localeNamesMap, Map<Locale,String> localeTitlesMap, Map<Locale,String> descriptionMap, Map<Locale,String> keywordsMap, Map<Locale,String> robotsMap, String type, String typeSettings, boolean hidden, Map<Locale,String> friendlyURLMap, long masterLayoutPlid, 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.
groupId
- 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
)localeNamesMap
- the layout's locales and localized nameslocaleTitlesMap
- 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)
.masterLayoutPlid
- the primary key of the master layoutserviceContext
- 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 used to specify whether site
administrators can modify this page within their site.PortalException
- if a portal exception occurredpublic static Layout addLayout(long groupId, boolean privateLayout, long parentLayoutId, Map<Locale,String> localeNamesMap, Map<Locale,String> localeTitlesMap, 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
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.
groupId
- 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
)localeNamesMap
- the layout's locales and localized nameslocaleTitlesMap
- 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 used to specify whether site
administrators can modify this page within their site.PortalException
- if a portal exception occurredpublic static Layout addLayout(long groupId, boolean privateLayout, long parentLayoutId, String name, String title, String description, String type, boolean hidden, 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.
groupId
- 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
)name
- the layout's locales and localized namestitle
- the layout's locales and localized titlesdescription
- the layout's locales and localized descriptionstype
- the layout's type (optionally LayoutConstants#TYPE_PORTLET
). The possible types can be found
in LayoutConstants
.hidden
- whether the layout is hiddenfriendlyURL
- 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 specify 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 used to specify whether site
administrators can modify this page within their site.PortalException
- if a portal exception occurredpublic static FileEntry addTempFileEntry(long groupId, String folderName, String fileName, InputStream inputStream, String mimeType) throws PortalException
PortalException
public 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 deleteTempFileEntry(long groupId, String folderName, String fileName) throws PortalException
PortalException
public static Layout fetchLayout(long groupId, boolean privateLayout, long layoutId) throws PortalException
PortalException
public static List<Layout> getAncestorLayouts(long plid) throws PortalException
plid
- the primary key of the layoutPortalException
- if a portal exception occurredpublic static long getControlPanelLayoutPlid() throws PortalException
PortalException
- if a portal exception is occuredpublic 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, long scopeGroupId, boolean privateLayout, String portletId) throws PortalException
groupId
- the primary key of the groupscopeGroupId
- the primary key of the scope group. See ServiceContext.getScopeGroupId()
.privateLayout
- whether the layout is private to the groupportletId
- the primary key of the portletLayoutConstants#DEFAULT_PLID
otherwisePortalException
- if a portal exception occurredpublic static long getDefaultPlid(long groupId, long scopeGroupId, String portletId) throws PortalException
PortalException
public static Layout getLayoutByUuidAndGroupId(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 portal exception occurredpublic static String getLayoutName(long groupId, boolean privateLayout, long layoutId, String languageId) throws PortalException
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the grouplayoutId
- the layout ID of the layoutlanguageId
- the primary key of the language. For more information
See Locale
.PortalException
- if a portal exception occurredpublic static long getLayoutPlid(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 portal exception occurredpublic static LayoutReference[] getLayoutReferences(long companyId, String portletId, String preferencesKey, 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 List<Layout> getLayouts(long groupId, boolean privateLayout)
public static List<Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId) throws PortalException
PortalException
public static List<Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId, boolean incomplete, int start, int end) throws PortalException
PortalException
public static List<Layout> getLayouts(long groupId, boolean privateLayout, String type) throws PortalException
PortalException
public static List<Layout> getLayouts(long groupId, boolean privateLayout, String type, int start, int end) throws PortalException
PortalException
public static List<Layout> getLayouts(long groupId, boolean privateLayout, String keywords, String[] types, int start, int end, OrderByComparator<Layout> orderByComparator) throws PortalException
PortalException
public static List<Layout> getLayouts(long groupId, String type)
public static List<Layout> getLayouts(long groupId, String type, int start, int end)
public static int getLayoutsCount(long groupId, boolean privateLayout)
public static int getLayoutsCount(long groupId, boolean privateLayout, long parentLayoutId)
public static int getLayoutsCount(long groupId, boolean privateLayout, long parentLayoutId, int priority)
public static int getLayoutsCount(long groupId, boolean privateLayout, String type)
public static int getLayoutsCount(long groupId, boolean privateLayout, String keywords, String[] types) throws PortalException
PortalException
public static int getLayoutsCount(long groupId, String type)
public static String getOSGiServiceIdentifier()
public static String[] getTempFileNames(long groupId, String folderName) throws PortalException
PortalException
public static boolean hasLayout(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 hasPortletId(long plid, String portletId) throws PortalException
PortalException
public static void schedulePublishToLive(long sourceGroupId, long targetGroupId, boolean privateLayout, long[] layoutIds, Map<String,String[]> parameterMap, String groupName, String cronText, Date schedulerStartDate, Date schedulerEndDate, String description) throws PortalException
sourceGroupId
- the primary key of the source grouptargetGroupId
- the primary key of the target groupprivateLayout
- whether the layout is private to the grouplayoutIds
- the layouts considered for publishing, specified by the
layout IDsparameterMap
- the mapping of parameters indicating which
information will be used. See PortletDataHandlerKeys
.groupName
- the group name (optionally DestinationNames#LAYOUTS_LOCAL_PUBLISHER
). See DestinationNames
.cronText
- the cron text. See #toCronText
schedulerStartDate
- the scheduler start dateschedulerEndDate
- the scheduler end datedescription
- the scheduler descriptionPortalException
- if a portal exception occurredpublic static void schedulePublishToRemote(long sourceGroupId, boolean privateLayout, Map<Long,Boolean> layoutIdMap, Map<String,String[]> parameterMap, String remoteAddress, int remotePort, String remotePathContext, boolean secureConnection, long remoteGroupId, boolean remotePrivateLayout, Date startDate, Date endDate, String groupName, String cronText, Date schedulerStartDate, Date schedulerEndDate, String description) throws PortalException
sourceGroupId
- the primary key of the source groupprivateLayout
- whether the layout is private to the grouplayoutIdMap
- the layouts considered for publishing, specified by
the layout IDs and booleans indicating whether they have childrenparameterMap
- the mapping of parameters indicating which
information will be used. See PortletDataHandlerKeys
.remoteAddress
- the remote addressremotePort
- the remote portremotePathContext
- the remote path contextsecureConnection
- whether the connection is secureremoteGroupId
- the primary key of the remote groupremotePrivateLayout
- whether remote group's layout is privatestartDate
- the start dateendDate
- the end dategroupName
- the group name. Optionally DestinationNames#LAYOUTS_LOCAL_PUBLISHER
). See DestinationNames
.cronText
- the cron text. See #toCronText
schedulerStartDate
- the scheduler start dateschedulerEndDate
- the scheduler end datedescription
- the scheduler descriptionPortalException
- if a portal exception occurredpublic 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 primary keys of the layoutsserviceContext
- the service context to be appliedPortalException
- if a portal exception occurredpublic static void unschedulePublishToLive(long groupId, String jobName, String groupName) throws PortalException
groupId
- the primary key of the groupjobName
- the job namegroupName
- the group name (optionally DestinationNames#LAYOUTS_LOCAL_PUBLISHER
). See DestinationNames
.PortalException
- if a portal exception occurredpublic static void unschedulePublishToRemote(long groupId, String jobName, String groupName) throws PortalException
groupId
- the primary key of the groupjobName
- the job namegroupName
- the group name (optionally DestinationNames#LAYOUTS_LOCAL_PUBLISHER
). See DestinationNames
.PortalException
- if a portal exception occurredpublic static Layout updateIconImage(long plid, byte[] bytes) throws PortalException
PortalException
public static Layout updateLayout(long groupId, boolean privateLayout, long layoutId, long parentLayoutId, Map<Locale,String> localeNamesMap, Map<Locale,String> localeTitlesMap, 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 masterLayoutPlid, long styleBookEntryId, 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 layoutlocaleNamesMap
- the layout's locales and localized nameslocaleTitlesMap
- the layout's locales and localized titlesdescriptionMap
- 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
- if the layout has a custom icon imageiconBytes
- the byte array of the layout's new icon imagemasterLayoutPlid
- the primary key of the master layoutstyleBookEntryId
- the primary key of the style book entryserviceContext
- the service context to be applied. Can set the
modification date and expando bridge attributes for the layout.PortalException
- if a portal exception occurred@Deprecated public static Layout updateLayout(long groupId, boolean privateLayout, long layoutId, long parentLayoutId, Map<Locale,String> localeNamesMap, Map<Locale,String> localeTitlesMap, 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 masterLayoutPlid, ServiceContext serviceContext) throws PortalException
updateLayout(long, boolean, long, long, Map, Map, Map, Map,
Map, String, boolean, Map, boolean, byte[], long, long,
ServiceContext)
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
layoutlocaleNamesMap
- the layout's locales and localized nameslocaleTitlesMap
- the layout's locales and localized titlesdescriptionMap
- 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
- if the layout has a custom icon imageiconBytes
- the byte array of the layout's new icon imagemasterLayoutPlid
- the primary key of the master layoutserviceContext
- the service context to be applied. Can set the
modification date and expando bridge attributes for the
layout.PortalException
- if a portal exception occurred@Deprecated public static Layout updateLayout(long groupId, boolean privateLayout, long layoutId, long parentLayoutId, Map<Locale,String> localeNamesMap, Map<Locale,String> localeTitlesMap, Map<Locale,String> descriptionMap, Map<Locale,String> keywordsMap, Map<Locale,String> robotsMap, String type, boolean hidden, Map<Locale,String> friendlyURLMap, boolean hasIconImage, byte[] iconBytes, ServiceContext serviceContext) throws PortalException
updateLayout(long, boolean, long, long, Map, Map, Map, Map,
Map, String, boolean, Map, boolean, byte[], long,
ServiceContext)
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
layoutlocaleNamesMap
- the layout's locales and localized nameslocaleTitlesMap
- the layout's locales and localized titlesdescriptionMap
- 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
- if the layout has a custom icon imageiconBytes
- 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.PortalException
- if a portal exception occurredpublic static Layout updateLayout(long groupId, boolean privateLayout, long layoutId, 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, String themeId, String colorSchemeId, 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(long groupId, boolean privateLayout, long layoutId, String name, 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, String name, 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 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, String type) throws PortalException
PortalException
public static LayoutService getService()