Class LayoutServiceWrapper
- All Implemented Interfaces:
BaseService
,LayoutService
,ServiceWrapper<LayoutService>
LayoutService
.- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLayout
(String externalReferenceCode, 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.addLayout
(String externalReferenceCode, 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.addLayout
(String externalReferenceCode, 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.addLayout
(String externalReferenceCode, 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.addTempFileEntry
(long groupId, String folderName, String fileName, InputStream inputStream, String mimeType) copyLayout
(long groupId, boolean privateLayout, Map<Locale, String> localeNamesMap, boolean hidden, boolean system, boolean copyPermissions, long sourcePlid, ServiceContext serviceContext) 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.void
deleteLayout
(long plid, ServiceContext serviceContext) Deletes the layout with the plid, also deleting the layout's child layouts, and associated resources.void
deleteLayout
(String externalReferenceCode, long groupId) void
deleteTempFileEntry
(long groupId, String folderName, String fileName) fetchFirstLayout
(long groupId, boolean privateLayout, boolean published) fetchLayout
(long groupId, boolean privateLayout, long layoutId) fetchLayoutByExternalReferenceCode
(String externalReferenceCode, long groupId) long
fetchLayoutPlid
(String uuid, long groupId, boolean privateLayout) getAncestorLayouts
(long plid) Returns all the ancestor layouts of the layout.long
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) getLayoutByExternalReferenceCode
(String externalReferenceCode, long groupId) getLayoutByUuidAndGroupId
(String uuid, long groupId, boolean privateLayout) Returns the layout matching the UUID, group, and privacy.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.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.getLayouts
(long groupId, boolean privateLayout) getLayouts
(long groupId, boolean privateLayout, long parentLayoutId) getLayouts
(long groupId, boolean privateLayout, long parentLayoutId, boolean incomplete, int start, int end) getLayouts
(long groupId, boolean privateLayout, long parentLayoutId, int start, int end) getLayouts
(long groupId, boolean privateLayout, String type) getLayouts
(long groupId, boolean privateLayout, String type, int start, int end) getLayouts
(long groupId, boolean privateLayout, String keywords, String[] types, int[] statuses, int start, int end, OrderByComparator<Layout> orderByComparator) getLayouts
(long groupId, boolean privateLayout, String keywords, String[] types, int start, int end, OrderByComparator<Layout> orderByComparator) getLayouts
(long groupId, String type) 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) Returns the OSGi service identifier.String[]
getTempFileNames
(long groupId, String folderName) boolean
Returnstrue
if there is a matching layout with the UUID, group, and privacy.boolean
hasPortletId
(long plid, String portletId) 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, ServiceContext serviceContext) Sets the layouts for the group, replacing and prioritizing all layouts of the parent layout.void
setWrappedService
(LayoutService layoutService) 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.updateIconImage
(long plid, byte[] bytes) 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, ServiceContext serviceContext) Updates the layout with additional parameters.updateLayout
(long groupId, boolean privateLayout, long layoutId, String typeSettings) Updates the layout replacing its type settings.updateLookAndFeel
(long groupId, boolean privateLayout, long layoutId, String themeId, String colorSchemeId, String css) Updates the look and feel of the 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.updateName
(long plid, String name, String languageId) Updates the name of the layout matching the primary key.updateParentLayoutId
(long groupId, boolean privateLayout, long layoutId, long parentLayoutId) Updates the parent layout ID of the layout matching the group, layout ID, and privacy.updateParentLayoutId
(long plid, long parentPlid) Updates the parent layout ID of the layout matching the primary key.updateParentLayoutIdAndPriority
(long plid, long parentPlid, int priority) Updates the parent layout ID and priority of the layout.updatePriority
(long groupId, boolean privateLayout, long layoutId, int priority) Updates the priority of the layout matching the group, layout ID, and privacy.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.updatePriority
(long plid, int priority) Updates the priority of the layout matching the primary key.updateType
(long plid, String type)
-
Constructor Details
-
LayoutServiceWrapper
public LayoutServiceWrapper() -
LayoutServiceWrapper
-
-
Method Details
-
addLayout
public Layout addLayout(String externalReferenceCode, long groupId, boolean privateLayout, long parentLayoutId, long classNameId, long classPK, Map<Locale, String> localeNamesMap, Map<Locale, throws PortalExceptionString> 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.This method handles the creation of the layout including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, ... etc.
- Specified by:
addLayout
in interfaceLayoutService
- Parameters:
externalReferenceCode
- the layout's external reference codegroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- the layout ID of the parent layout (optionallyLayoutConstants#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 (optionallyLayoutConstants#TYPE_PORTLET
). The possible types can be found inLayoutConstants
.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, seeFriendlyURLNormalizerUtil.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 namedlayoutUpdateable
can be used to specify whether site administrators can modify this page within their site.- Returns:
- the layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
addLayout
public Layout addLayout(String externalReferenceCode, long groupId, boolean privateLayout, long parentLayoutId, Map<Locale, String> localeNamesMap, Map<Locale, throws PortalExceptionString> 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.This method handles the creation of the layout including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, ... etc.
- Specified by:
addLayout
in interfaceLayoutService
- Parameters:
externalReferenceCode
- the layout's external reference codegroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- the layout ID of the parent layout (optionallyLayoutConstants#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 (optionallyLayoutConstants#TYPE_PORTLET
). The possible types can be found inLayoutConstants
.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, seeFriendlyURLNormalizerUtil.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 namedlayoutUpdateable
can be used to specify whether site administrators can modify this page within their site.- Returns:
- the layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
addLayout
public Layout addLayout(String externalReferenceCode, long groupId, boolean privateLayout, long parentLayoutId, Map<Locale, String> localeNamesMap, Map<Locale, throws PortalExceptionString> 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.This method handles the creation of the layout including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, ... etc.
- Specified by:
addLayout
in interfaceLayoutService
- Parameters:
externalReferenceCode
- the layout's external reference codegroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- the layout ID of the parent layout (optionallyLayoutConstants#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 (optionallyLayoutConstants#TYPE_PORTLET
). The possible types can be found inLayoutConstants
.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, seeFriendlyURLNormalizerUtil.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 namedlayoutUpdateable
can be used to specify whether site administrators can modify this page within their site.- Returns:
- the layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
addLayout
public Layout addLayout(String externalReferenceCode, long groupId, boolean privateLayout, long parentLayoutId, String name, String title, String description, String type, boolean hidden, String friendlyURL, ServiceContext serviceContext) throws PortalException Adds a layout with single entry maps for name, title, and description to the default locale.This method handles the creation of the layout including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, ... etc.
- Specified by:
addLayout
in interfaceLayoutService
- Parameters:
externalReferenceCode
- the layout's external reference codegroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the groupparentLayoutId
- the layout ID of the parent layout (optionallyLayoutConstants#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 (optionallyLayoutConstants#TYPE_PORTLET
). The possible types can be found inLayoutConstants
.hidden
- whether the layout is hiddenfriendlyURL
- the layout's locales and localized friendly URLs. To see how the URL is normalized when accessed, seeFriendlyURLNormalizerUtil.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 namedlayoutUpdateable
can be used to specify whether site administrators can modify this page within their site.- Returns:
- the layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
addTempFileEntry
public FileEntry addTempFileEntry(long groupId, String folderName, String fileName, InputStream inputStream, String mimeType) throws PortalException - Specified by:
addTempFileEntry
in interfaceLayoutService
- Throws:
PortalException
-
copyLayout
public Layout copyLayout(long groupId, boolean privateLayout, Map<Locale, String> localeNamesMap, boolean hidden, boolean system, boolean copyPermissions, long sourcePlid, ServiceContext serviceContext) throws PortalException- Specified by:
copyLayout
in interfaceLayoutService
- Throws:
PortalException
-
deleteLayout
public void deleteLayout(long groupId, boolean privateLayout, long layoutId, ServiceContext serviceContext) throws PortalException Deletes the layout with the primary key, also deleting the layout's child layouts, and associated resources.- Specified by:
deleteLayout
in interfaceLayoutService
- Parameters:
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 applied- Throws:
PortalException
- if a portal exception occurredPortalException
-
deleteLayout
Deletes the layout with the plid, also deleting the layout's child layouts, and associated resources.- Specified by:
deleteLayout
in interfaceLayoutService
- Parameters:
plid
- the primary key of the layoutserviceContext
- the service context to be applied- Throws:
PortalException
- if a portal exception occurredPortalException
-
deleteLayout
- Specified by:
deleteLayout
in interfaceLayoutService
- Throws:
PortalException
-
deleteTempFileEntry
public void deleteTempFileEntry(long groupId, String folderName, String fileName) throws PortalException - Specified by:
deleteTempFileEntry
in interfaceLayoutService
- Throws:
PortalException
-
fetchFirstLayout
- Specified by:
fetchFirstLayout
in interfaceLayoutService
-
fetchLayout
public Layout fetchLayout(long groupId, boolean privateLayout, long layoutId) throws PortalException - Specified by:
fetchLayout
in interfaceLayoutService
- Throws:
PortalException
-
fetchLayoutByExternalReferenceCode
public Layout fetchLayoutByExternalReferenceCode(String externalReferenceCode, long groupId) throws PortalException - Specified by:
fetchLayoutByExternalReferenceCode
in interfaceLayoutService
- Throws:
PortalException
-
fetchLayoutPlid
public long fetchLayoutPlid(String uuid, long groupId, boolean privateLayout) throws PortalException - Specified by:
fetchLayoutPlid
in interfaceLayoutService
- Throws:
PortalException
-
getAncestorLayouts
Returns all the ancestor layouts of the layout.- Specified by:
getAncestorLayouts
in interfaceLayoutService
- Parameters:
plid
- the primary key of the layout- Returns:
- the ancestor layouts of the layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
getControlPanelLayoutPlid
Returns the control panel layout's plid.- Specified by:
getControlPanelLayoutPlid
in interfaceLayoutService
- Returns:
- the control panel layout's plid
- Throws:
PortalException
- if a portal exception is occuredPortalException
-
getDefaultPlid
public long getDefaultPlid(long groupId, boolean privateLayout) Returns primary key of the matching default layout for the group.- Specified by:
getDefaultPlid
in interfaceLayoutService
- Parameters:
groupId
- the primary key of the groupprivateLayout
- whether the layout is private to the group- Returns:
- the primary key of the default layout for the group;
LayoutConstants#DEFAULT_PLID
) otherwise
-
getDefaultPlid
public long getDefaultPlid(long groupId, long scopeGroupId, boolean privateLayout, String portletId) throws PortalException Returns the primary key of the default layout for the group.- Specified by:
getDefaultPlid
in interfaceLayoutService
- Parameters:
groupId
- the primary key of the groupscopeGroupId
- the primary key of the scope group. SeeServiceContext.getScopeGroupId()
.privateLayout
- whether the layout is private to the groupportletId
- the primary key of the portlet- Returns:
- Returns the primary key of the default layout group;
LayoutConstants#DEFAULT_PLID
otherwise - Throws:
PortalException
- if a portal exception occurredPortalException
-
getDefaultPlid
public long getDefaultPlid(long groupId, long scopeGroupId, String portletId) throws PortalException - Specified by:
getDefaultPlid
in interfaceLayoutService
- Throws:
PortalException
-
getLayoutByExternalReferenceCode
public Layout getLayoutByExternalReferenceCode(String externalReferenceCode, long groupId) throws PortalException - Specified by:
getLayoutByExternalReferenceCode
in interfaceLayoutService
- Throws:
PortalException
-
getLayoutByUuidAndGroupId
public Layout getLayoutByUuidAndGroupId(String uuid, long groupId, boolean privateLayout) throws PortalException Returns the layout matching the UUID, group, and privacy.- Specified by:
getLayoutByUuidAndGroupId
in interfaceLayoutService
- Parameters:
uuid
- the layout's UUIDgroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the group- Returns:
- the matching layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
getLayoutName
public String getLayoutName(long groupId, boolean privateLayout, long layoutId, String languageId) throws PortalException Returns the name of the layout.- Specified by:
getLayoutName
in interfaceLayoutService
- Parameters:
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 SeeLocale
.- Returns:
- the layout's name
- Throws:
PortalException
- if a portal exception occurredPortalException
-
getLayoutPlid
Returns the layout's plid that matches the parameters.- Specified by:
getLayoutPlid
in interfaceLayoutService
- Parameters:
uuid
- the layout's UUIDgroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the group- Returns:
- the matching layout's plid
- Throws:
PortalException
- if a portal exception occurredPortalException
-
getLayoutReferences
public 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.- Specified by:
getLayoutReferences
in interfaceLayoutService
- Parameters:
companyId
- the primary key of the companyportletId
- the primary key of the portletpreferencesKey
- the portlet's preference keypreferencesValue
- the portlet's preference value- Returns:
- the layout references of the matching layouts
-
getLayouts
- Specified by:
getLayouts
in interfaceLayoutService
-
getLayouts
public List<Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId) throws PortalException - Specified by:
getLayouts
in interfaceLayoutService
- Throws:
PortalException
-
getLayouts
public List<Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId, boolean incomplete, int start, int end) throws PortalException - Specified by:
getLayouts
in interfaceLayoutService
- Throws:
PortalException
-
getLayouts
public List<Layout> getLayouts(long groupId, boolean privateLayout, long parentLayoutId, int start, int end) throws PortalException - Specified by:
getLayouts
in interfaceLayoutService
- Throws:
PortalException
-
getLayouts
public List<Layout> getLayouts(long groupId, boolean privateLayout, String type) throws PortalException - Specified by:
getLayouts
in interfaceLayoutService
- Throws:
PortalException
-
getLayouts
public List<Layout> getLayouts(long groupId, boolean privateLayout, String type, int start, int end) throws PortalException - Specified by:
getLayouts
in interfaceLayoutService
- Throws:
PortalException
-
getLayouts
public List<Layout> getLayouts(long groupId, boolean privateLayout, String keywords, String[] types, int start, int end, OrderByComparator<Layout> orderByComparator) throws PortalException - Specified by:
getLayouts
in interfaceLayoutService
- Throws:
PortalException
-
getLayouts
public List<Layout> getLayouts(long groupId, boolean privateLayout, String keywords, String[] types, int[] statuses, int start, int end, OrderByComparator<Layout> orderByComparator) throws PortalException - Specified by:
getLayouts
in interfaceLayoutService
- Throws:
PortalException
-
getLayouts
- Specified by:
getLayouts
in interfaceLayoutService
-
getLayouts
- Specified by:
getLayouts
in interfaceLayoutService
-
getLayoutsCount
public int getLayoutsCount(long groupId, boolean privateLayout) - Specified by:
getLayoutsCount
in interfaceLayoutService
-
getLayoutsCount
public int getLayoutsCount(long groupId, boolean privateLayout, long parentLayoutId) - Specified by:
getLayoutsCount
in interfaceLayoutService
-
getLayoutsCount
public int getLayoutsCount(long groupId, boolean privateLayout, long parentLayoutId, int priority) - Specified by:
getLayoutsCount
in interfaceLayoutService
-
getLayoutsCount
- Specified by:
getLayoutsCount
in interfaceLayoutService
-
getLayoutsCount
public int getLayoutsCount(long groupId, boolean privateLayout, String keywords, String[] types) throws PortalException - Specified by:
getLayoutsCount
in interfaceLayoutService
- Throws:
PortalException
-
getLayoutsCount
public int getLayoutsCount(long groupId, boolean privateLayout, String keywords, String[] types, int[] statuses) throws PortalException - Specified by:
getLayoutsCount
in interfaceLayoutService
- Throws:
PortalException
-
getLayoutsCount
- Specified by:
getLayoutsCount
in interfaceLayoutService
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Specified by:
getOSGiServiceIdentifier
in interfaceLayoutService
- Returns:
- the OSGi service identifier
-
getTempFileNames
- Specified by:
getTempFileNames
in interfaceLayoutService
- Throws:
PortalException
-
hasLayout
Returnstrue
if there is a matching layout with the UUID, group, and privacy.- Specified by:
hasLayout
in interfaceLayoutService
- Parameters:
uuid
- the layout's UUIDgroupId
- the primary key of the groupprivateLayout
- whether the layout is private to the group- Returns:
true
if the layout is found;false
otherwise- Throws:
PortalException
- if a portal exception occurredPortalException
-
hasPortletId
- Specified by:
hasPortletId
in interfaceLayoutService
- Throws:
PortalException
-
publishLayout
- Specified by:
publishLayout
in interfaceLayoutService
- Throws:
Exception
-
schedulePublishToLive
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 PortalExceptionSchedules a range of layouts to be published.- Specified by:
schedulePublishToLive
in interfaceLayoutService
- Parameters:
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. SeePortletDataHandlerKeys
.groupName
- the group name (optionallyDestinationNames#LAYOUTS_LOCAL_PUBLISHER
). SeeDestinationNames
.cronText
- the cron text. SeeCronTextUtil.getCronText(javax.portlet.PortletRequest, java.util.Calendar, boolean, int)
schedulerStartDate
- the scheduler start dateschedulerEndDate
- the scheduler end datedescription
- the scheduler description- Throws:
PortalException
- if a portal exception occurredPortalException
-
schedulePublishToRemote
public void schedulePublishToRemote(long sourceGroupId, boolean privateLayout, Map<Long, Boolean> layoutIdMap, Map<String, throws PortalExceptionString[]> 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.- Specified by:
schedulePublishToRemote
in interfaceLayoutService
- Parameters:
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. SeePortletDataHandlerKeys
.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. OptionallyDestinationNames#LAYOUTS_LOCAL_PUBLISHER
). SeeDestinationNames
.cronText
- the cron text. SeeCronTextUtil.getCronText(javax.portlet.PortletRequest, java.util.Calendar, boolean, int)
schedulerStartDate
- the scheduler start dateschedulerEndDate
- the scheduler end datedescription
- the scheduler description- Throws:
PortalException
- if a portal exception occurredPortalException
-
setLayouts
public void setLayouts(long groupId, boolean privateLayout, long parentLayoutId, long[] layoutIds, ServiceContext serviceContext) throws PortalException Sets the layouts for the group, replacing and prioritizing all layouts of the parent layout.- Specified by:
setLayouts
in interfaceLayoutService
- Parameters:
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 applied- Throws:
PortalException
- if a portal exception occurredPortalException
-
unschedulePublishToLive
public void unschedulePublishToLive(long groupId, String jobName, String groupName) throws PortalException Deletes the job from the scheduler's queue.- Specified by:
unschedulePublishToLive
in interfaceLayoutService
- Parameters:
groupId
- the primary key of the groupjobName
- the job namegroupName
- the group name (optionallyDestinationNames#LAYOUTS_LOCAL_PUBLISHER
). SeeDestinationNames
.- Throws:
PortalException
- if a portal exception occurredPortalException
-
unschedulePublishToRemote
public void unschedulePublishToRemote(long groupId, String jobName, String groupName) throws PortalException Deletes the job from the scheduler's persistent queue.- Specified by:
unschedulePublishToRemote
in interfaceLayoutService
- Parameters:
groupId
- the primary key of the groupjobName
- the job namegroupName
- the group name (optionallyDestinationNames#LAYOUTS_LOCAL_PUBLISHER
). SeeDestinationNames
.- Throws:
PortalException
- if a portal exception occurredPortalException
-
updateIconImage
- Specified by:
updateIconImage
in interfaceLayoutService
- Throws:
PortalException
-
updateLayout
public Layout updateLayout(long groupId, boolean privateLayout, long layoutId, long parentLayoutId, Map<Locale, String> localeNamesMap, Map<Locale, throws PortalExceptionString> 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, ServiceContext serviceContext) Updates the layout with additional parameters.- Specified by:
updateLayout
in interfaceLayoutService
- Parameters:
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 (optionallynull
)keywordsMap
- the locales and localized keywords to merge (optionallynull
)robotsMap
- the locales and localized robots to merge (optionallynull
)type
- the layout's new type (optionallyLayoutConstants#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 seeFriendlyURLNormalizerUtil.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.- Returns:
- the updated layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
updateLayout
public Layout updateLayout(long groupId, boolean privateLayout, long layoutId, String typeSettings) throws PortalException Updates the layout replacing its type settings.- Specified by:
updateLayout
in interfaceLayoutService
- Parameters:
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)
.- Returns:
- the updated layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
updateLookAndFeel
public Layout updateLookAndFeel(long groupId, boolean privateLayout, long layoutId, String themeId, String colorSchemeId, String css) throws PortalException Updates the look and feel of the layout.- Specified by:
updateLookAndFeel
in interfaceLayoutService
- Parameters:
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 CSS- Returns:
- the updated layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
updateName
public Layout updateName(long groupId, boolean privateLayout, long layoutId, String name, String languageId) throws PortalException Updates the name of the layout matching the group, layout ID, and privacy.- Specified by:
updateName
in interfaceLayoutService
- Parameters:
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 seeLocale
.- Returns:
- the updated layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
updateName
Updates the name of the layout matching the primary key.- Specified by:
updateName
in interfaceLayoutService
- Parameters:
plid
- the primary key of the layoutname
- the name to be assignedlanguageId
- the primary key of the language. For more information seeLocale
.- Returns:
- the updated layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
updateParentLayoutId
public Layout updateParentLayoutId(long groupId, boolean privateLayout, long layoutId, long parentLayoutId) throws PortalException Updates the parent layout ID of the layout matching the group, layout ID, and privacy.- Specified by:
updateParentLayoutId
in interfaceLayoutService
- Parameters:
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 layout- Returns:
- the matching layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
updateParentLayoutId
Updates the parent layout ID of the layout matching the primary key. If a layout matching the parent primary key is found, the layout ID of that layout is assigned, otherwiseLayoutConstants#DEFAULT_PARENT_LAYOUT_ID
is assigned.- Specified by:
updateParentLayoutId
in interfaceLayoutService
- Parameters:
plid
- the primary key of the layoutparentPlid
- the primary key of the parent layout- Returns:
- the layout matching the primary key
- Throws:
PortalException
- if a portal exception occurredPortalException
-
updateParentLayoutIdAndPriority
public Layout updateParentLayoutIdAndPriority(long plid, long parentPlid, int priority) throws PortalException Updates the parent layout ID and priority of the layout.- Specified by:
updateParentLayoutIdAndPriority
in interfaceLayoutService
- Parameters:
plid
- the primary key of the layoutparentPlid
- the primary key of the parent layoutpriority
- the layout's new priority- Returns:
- the layout matching the primary key
- Throws:
PortalException
- if a portal exception occurredPortalException
-
updatePriority
public Layout updatePriority(long groupId, boolean privateLayout, long layoutId, int priority) throws PortalException Updates the priority of the layout matching the group, layout ID, and privacy.- Specified by:
updatePriority
in interfaceLayoutService
- Parameters:
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 priority- Returns:
- the updated layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
updatePriority
public Layout updatePriority(long groupId, boolean privateLayout, long layoutId, long nextLayoutId, long previousLayoutId) throws PortalException Updates the priority of the layout matching the group, layout ID, and privacy, setting the layout's priority based on the priorities of the next and previous layouts.- Specified by:
updatePriority
in interfaceLayoutService
- Parameters:
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 layout- Returns:
- the updated layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
updatePriority
Updates the priority of the layout matching the primary key.- Specified by:
updatePriority
in interfaceLayoutService
- Parameters:
plid
- the primary key of the layoutpriority
- the layout's new priority- Returns:
- the updated layout
- Throws:
PortalException
- if a portal exception occurredPortalException
-
updateType
- Specified by:
updateType
in interfaceLayoutService
- Throws:
PortalException
-
getWrappedService
- Specified by:
getWrappedService
in interfaceServiceWrapper<LayoutService>
-
setWrappedService
- Specified by:
setWrappedService
in interfaceServiceWrapper<LayoutService>
-