public class LayoutServiceImpl extends LayoutServiceBaseImpl
counterLocalService, layoutFinder, layoutLocalService, layoutPersistence, layoutService
Constructor and Description |
---|
LayoutServiceImpl() |
Modifier and Type | Method and Description |
---|---|
com.liferay.portal.kernel.model.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,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds a layout with additional parameters.
|
com.liferay.portal.kernel.model.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,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds a layout with additional parameters.
|
com.liferay.portal.kernel.model.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,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds a layout with additional parameters.
|
com.liferay.portal.kernel.model.Layout |
addLayout(long groupId,
boolean privateLayout,
long parentLayoutId,
String name,
String title,
String description,
String type,
boolean hidden,
String friendlyURL,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds a layout with single entry maps for name, title, and description to
the default locale.
|
com.liferay.portal.kernel.repository.model.FileEntry |
addTempFileEntry(long groupId,
String folderName,
String fileName,
InputStream inputStream,
String mimeType) |
protected void |
checkLayoutTypeSettings(com.liferay.portal.kernel.model.Layout layout,
String originalTypeSettings,
String newTypeSettings) |
com.liferay.portal.kernel.model.Layout |
copyLayout(long groupId,
boolean privateLayout,
Map<Locale,String> localeNamesMap,
boolean hidden,
boolean system,
boolean copyPermissions,
long sourcePlid,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
void |
deleteLayout(long groupId,
boolean privateLayout,
long layoutId,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Deletes the layout with the primary key, also deleting the layout's child
layouts, and associated resources.
|
void |
deleteLayout(long plid,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Deletes the layout with the plid, also deleting the layout's child
layouts, and associated resources.
|
void |
deleteTempFileEntry(long groupId,
String folderName,
String fileName) |
com.liferay.portal.kernel.model.Layout |
fetchLayout(long groupId,
boolean privateLayout,
long layoutId) |
protected List<com.liferay.portal.kernel.model.Layout> |
filterLayouts(List<com.liferay.portal.kernel.model.Layout> layouts) |
protected List<com.liferay.portal.kernel.model.Layout> |
filterLayouts(List<com.liferay.portal.kernel.model.Layout> layouts,
int start,
int end) |
List<com.liferay.portal.kernel.model.Layout> |
getAncestorLayouts(long plid)
Returns all the ancestor layouts of the layout.
|
long |
getControlPanelLayoutPlid()
Returns the control panel layout's plid.
|
long |
getDefaultPlid(long groupId,
boolean privateLayout)
Returns primary key of the matching default layout for the group.
|
long |
getDefaultPlid(long groupId,
long scopeGroupId,
boolean privateLayout,
String portletId)
Returns the primary key of the default layout for the group.
|
long |
getDefaultPlid(long groupId,
long scopeGroupId,
String portletId) |
com.liferay.portal.kernel.model.Layout |
getLayoutByUuidAndGroupId(String uuid,
long groupId,
boolean privateLayout)
Returns the layout matching the UUID, group, and privacy.
|
String |
getLayoutName(long groupId,
boolean privateLayout,
long layoutId,
String languageId)
Returns the name of the layout.
|
long |
getLayoutPlid(String uuid,
long groupId,
boolean privateLayout)
Returns the layout's plid that matches the parameters.
|
com.liferay.portal.kernel.model.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.
|
List<com.liferay.portal.kernel.model.Layout> |
getLayouts(long groupId,
boolean privateLayout) |
List<com.liferay.portal.kernel.model.Layout> |
getLayouts(long groupId,
boolean privateLayout,
long parentLayoutId) |
List<com.liferay.portal.kernel.model.Layout> |
getLayouts(long groupId,
boolean privateLayout,
long parentLayoutId,
boolean incomplete,
int start,
int end) |
List<com.liferay.portal.kernel.model.Layout> |
getLayouts(long groupId,
boolean privateLayout,
long parentLayoutId,
int start,
int end) |
List<com.liferay.portal.kernel.model.Layout> |
getLayouts(long groupId,
boolean privateLayout,
String type) |
List<com.liferay.portal.kernel.model.Layout> |
getLayouts(long groupId,
boolean privateLayout,
String type,
int start,
int end) |
List<com.liferay.portal.kernel.model.Layout> |
getLayouts(long groupId,
boolean privateLayout,
String keywords,
String[] types,
int[] statuses,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator) |
List<com.liferay.portal.kernel.model.Layout> |
getLayouts(long groupId,
boolean privateLayout,
String keywords,
String[] types,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator) |
List<com.liferay.portal.kernel.model.Layout> |
getLayouts(long groupId,
String type) |
List<com.liferay.portal.kernel.model.Layout> |
getLayouts(long groupId,
String type,
int start,
int end) |
int |
getLayoutsCount(long groupId,
boolean privateLayout) |
int |
getLayoutsCount(long groupId,
boolean privateLayout,
long parentLayoutId) |
int |
getLayoutsCount(long groupId,
boolean privateLayout,
long parentLayoutId,
int priority) |
int |
getLayoutsCount(long groupId,
boolean privateLayout,
String type) |
int |
getLayoutsCount(long groupId,
boolean privateLayout,
String keywords,
String[] types) |
int |
getLayoutsCount(long groupId,
boolean privateLayout,
String keywords,
String[] types,
int[] statuses) |
int |
getLayoutsCount(long groupId,
String type) |
protected List<String> |
getPortletIds(com.liferay.portal.kernel.model.Layout layout,
String typeSettings) |
String[] |
getTempFileNames(long groupId,
String folderName) |
boolean |
hasLayout(String uuid,
long groupId,
boolean privateLayout)
Returns
true if there is a matching layout with the UUID,
group, and privacy. |
boolean |
hasPortletId(long plid,
String portletId) |
com.liferay.portal.kernel.model.Layout |
publishLayout(long plid) |
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.
|
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.
|
void |
setLayouts(long groupId,
boolean privateLayout,
long parentLayoutId,
long[] layoutIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Sets the layouts for the group, replacing and prioritizing all layouts of
the parent layout.
|
void |
unschedulePublishToLive(long groupId,
String jobName,
String groupName)
Deletes the job from the scheduler's queue.
|
void |
unschedulePublishToRemote(long groupId,
String jobName,
String groupName)
Deletes the job from the scheduler's persistent queue.
|
com.liferay.portal.kernel.model.Layout |
updateIconImage(long plid,
byte[] bytes) |
com.liferay.portal.kernel.model.Layout |
updateLayout(long groupId,
boolean privateLayout,
long layoutId,
long 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 styleBookEntryId,
long faviconFileEntryId,
long masterLayoutPlid,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates the layout with additional parameters.
|
com.liferay.portal.kernel.model.Layout |
updateLayout(long groupId,
boolean privateLayout,
long layoutId,
String typeSettings)
Updates the layout replacing its type settings.
|
com.liferay.portal.kernel.model.Layout |
updateLookAndFeel(long groupId,
boolean privateLayout,
long layoutId,
String themeId,
String colorSchemeId,
String css)
Updates the look and feel of the layout.
|
com.liferay.portal.kernel.model.Layout |
updateName(long groupId,
boolean privateLayout,
long layoutId,
String name,
String languageId)
Updates the name of the layout matching the group, layout ID, and
privacy.
|
com.liferay.portal.kernel.model.Layout |
updateName(long plid,
String name,
String languageId)
Updates the name of the layout matching the primary key.
|
com.liferay.portal.kernel.model.Layout |
updateParentLayoutId(long groupId,
boolean privateLayout,
long layoutId,
long parentLayoutId)
Updates the parent layout ID of the layout matching the group, layout ID,
and privacy.
|
com.liferay.portal.kernel.model.Layout |
updateParentLayoutId(long plid,
long parentPlid)
Updates the parent layout ID of the layout matching the primary key.
|
com.liferay.portal.kernel.model.Layout |
updateParentLayoutIdAndPriority(long plid,
long parentPlid,
int priority)
Updates the parent layout ID and priority of the layout.
|
com.liferay.portal.kernel.model.Layout |
updatePriority(long groupId,
boolean privateLayout,
long layoutId,
int priority)
Updates the priority of the layout matching the group, layout ID, and
privacy.
|
com.liferay.portal.kernel.model.Layout |
updatePriority(long groupId,
boolean privateLayout,
long layoutId,
long nextLayoutId,
long previousLayoutId)
Updates the priority of the layout matching the group, layout ID, and
privacy, setting the layout's priority based on the priorities of the
next and previous layouts.
|
com.liferay.portal.kernel.model.Layout |
updatePriority(long plid,
int priority)
Updates the priority of the layout matching the primary key.
|
com.liferay.portal.kernel.model.Layout |
updateType(long plid,
String type) |
afterPropertiesSet, destroy, getCounterLocalService, getLayoutFinder, getLayoutLocalService, getLayoutPersistence, getLayoutService, getModelClass, getModelClassName, getOSGiServiceIdentifier, runSQL, setCounterLocalService, setLayoutFinder, setLayoutLocalService, setLayoutPersistence, setLayoutService
public com.liferay.portal.kernel.model.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, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.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.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.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, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.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.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.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, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.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.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout addLayout(long groupId, boolean privateLayout, long parentLayoutId, String name, String title, String description, String type, boolean hidden, String friendlyURL, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
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.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.repository.model.FileEntry addTempFileEntry(long groupId, String folderName, String fileName, InputStream inputStream, String mimeType) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.Layout copyLayout(long groupId, boolean privateLayout, Map<Locale,String> localeNamesMap, boolean hidden, boolean system, boolean copyPermissions, long sourcePlid, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public void deleteLayout(long groupId, boolean privateLayout, long layoutId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.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 appliedcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic void deleteLayout(long plid, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
plid
- the primary key of the layoutserviceContext
- the service context to be appliedcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic void deleteTempFileEntry(long groupId, String folderName, String fileName) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.Layout fetchLayout(long groupId, boolean privateLayout, long layoutId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.Layout> getAncestorLayouts(long plid) throws com.liferay.portal.kernel.exception.PortalException
plid
- the primary key of the layoutcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic long getControlPanelLayoutPlid() throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
- if a portal exception is occuredpublic long getDefaultPlid(long groupId, boolean privateLayout)
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupLayoutConstants.DEFAULT_PLID
) otherwisepublic long getDefaultPlid(long groupId, long scopeGroupId, boolean privateLayout, String portletId) throws com.liferay.portal.kernel.exception.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
otherwisecom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurred@ThreadLocalCachable public long getDefaultPlid(long groupId, long scopeGroupId, String portletId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.Layout getLayoutByUuidAndGroupId(String uuid, long groupId, boolean privateLayout) throws com.liferay.portal.kernel.exception.PortalException
uuid
- the layout's UUIDgroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic String getLayoutName(long groupId, boolean privateLayout, long layoutId, String languageId) throws com.liferay.portal.kernel.exception.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
.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic long getLayoutPlid(String uuid, long groupId, boolean privateLayout) throws com.liferay.portal.kernel.exception.PortalException
uuid
- the layout's UUIDgroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.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 List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout)
public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId, boolean incomplete, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, String type) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, String type, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, String keywords, String[] types, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, boolean privateLayout, String keywords, String[] types, int[] statuses, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.Layout> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, String type)
public List<com.liferay.portal.kernel.model.Layout> getLayouts(long groupId, String type, int start, int end)
public int getLayoutsCount(long groupId, boolean privateLayout)
public int getLayoutsCount(long groupId, boolean privateLayout, long parentLayoutId)
public int getLayoutsCount(long groupId, boolean privateLayout, long parentLayoutId, int priority)
public int getLayoutsCount(long groupId, boolean privateLayout, String type)
public int getLayoutsCount(long groupId, boolean privateLayout, String keywords, String[] types) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public int getLayoutsCount(long groupId, boolean privateLayout, String keywords, String[] types, int[] statuses) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public int getLayoutsCount(long groupId, String type)
public String[] getTempFileNames(long groupId, String folderName) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public boolean hasLayout(String uuid, long groupId, boolean privateLayout) throws com.liferay.portal.kernel.exception.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
otherwisecom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic boolean hasPortletId(long plid, String portletId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.Layout publishLayout(long plid) throws Exception
Exception
public 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 com.liferay.portal.kernel.exception.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 CronTextUtil.getCronText(javax.portlet.PortletRequest, java.util.Calendar, boolean, int)
schedulerStartDate
- the scheduler start dateschedulerEndDate
- the scheduler end datedescription
- the scheduler descriptioncom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic 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 com.liferay.portal.kernel.exception.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 CronTextUtil.getCronText(javax.portlet.PortletRequest, java.util.Calendar, boolean, int)
schedulerStartDate
- the scheduler start dateschedulerEndDate
- the scheduler end datedescription
- the scheduler descriptioncom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic void setLayouts(long groupId, boolean privateLayout, long parentLayoutId, long[] layoutIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.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 appliedcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic void unschedulePublishToLive(long groupId, String jobName, String groupName) throws com.liferay.portal.kernel.exception.PortalException
groupId
- the primary key of the groupjobName
- the job namegroupName
- the group name (optionally DestinationNames.LAYOUTS_LOCAL_PUBLISHER
). See DestinationNames
.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic void unschedulePublishToRemote(long groupId, String jobName, String groupName) throws com.liferay.portal.kernel.exception.PortalException
groupId
- the primary key of the groupjobName
- the job namegroupName
- the group name (optionally DestinationNames.LAYOUTS_LOCAL_PUBLISHER
). See DestinationNames
.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout updateIconImage(long plid, byte[] bytes) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.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 styleBookEntryId, long faviconFileEntryId, long masterLayoutPlid, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.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 imagestyleBookEntryId
- the primary key of the style book entryfaviconFileEntryId
- the file entry ID of the layout's new faviconmasterLayoutPlid
- 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.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout updateLayout(long groupId, boolean privateLayout, long layoutId, String typeSettings) throws com.liferay.portal.kernel.exception.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)
.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout updateLookAndFeel(long groupId, boolean privateLayout, long layoutId, String themeId, String colorSchemeId, String css) throws com.liferay.portal.kernel.exception.PortalException
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 CSScom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout updateName(long groupId, boolean privateLayout, long layoutId, String name, String languageId) throws com.liferay.portal.kernel.exception.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
.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout updateName(long plid, String name, String languageId) throws com.liferay.portal.kernel.exception.PortalException
plid
- the primary key of the layoutname
- the name to be assignedlanguageId
- the primary key of the language. For more information
see Locale
.com.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout updateParentLayoutId(long groupId, boolean privateLayout, long layoutId, long parentLayoutId) throws com.liferay.portal.kernel.exception.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 layoutcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout updateParentLayoutId(long plid, long parentPlid) throws com.liferay.portal.kernel.exception.PortalException
LayoutConstants.DEFAULT_PARENT_LAYOUT_ID
is assigned.plid
- the primary key of the layoutparentPlid
- the primary key of the parent layoutcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout updateParentLayoutIdAndPriority(long plid, long parentPlid, int priority) throws com.liferay.portal.kernel.exception.PortalException
plid
- the primary key of the layoutparentPlid
- the primary key of the parent layoutpriority
- the layout's new prioritycom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout updatePriority(long groupId, boolean privateLayout, long layoutId, int priority) throws com.liferay.portal.kernel.exception.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 prioritycom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout updatePriority(long groupId, boolean privateLayout, long layoutId, long nextLayoutId, long previousLayoutId) throws com.liferay.portal.kernel.exception.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 layoutcom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout updatePriority(long plid, int priority) throws com.liferay.portal.kernel.exception.PortalException
plid
- the primary key of the layoutpriority
- the layout's new prioritycom.liferay.portal.kernel.exception.PortalException
- if a portal exception occurredpublic com.liferay.portal.kernel.model.Layout updateType(long plid, String type) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void checkLayoutTypeSettings(com.liferay.portal.kernel.model.Layout layout, String originalTypeSettings, String newTypeSettings) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected List<com.liferay.portal.kernel.model.Layout> filterLayouts(List<com.liferay.portal.kernel.model.Layout> layouts) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected List<com.liferay.portal.kernel.model.Layout> filterLayouts(List<com.liferay.portal.kernel.model.Layout> layouts, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected List<String> getPortletIds(com.liferay.portal.kernel.model.Layout layout, String typeSettings)