public class SitesImpl
extends java.lang.Object
implements com.liferay.portlet.sites.util.Sites
ANALYTICS_PREFIX, CONTENT_SHARING_WITH_CHILDREN_DEFAULT_VALUE, CONTENT_SHARING_WITH_CHILDREN_DISABLED, CONTENT_SHARING_WITH_CHILDREN_DISABLED_BY_DEFAULT, CONTENT_SHARING_WITH_CHILDREN_ENABLED, CONTENT_SHARING_WITH_CHILDREN_ENABLED_BY_DEFAULT, LAST_MERGE_TIME, LAST_RESET_TIME, LAYOUT_UPDATEABLE, MERGE_FAIL_COUNT, MERGE_FAIL_FRIENDLY_URL_LAYOUTS| Constructor and Description |
|---|
SitesImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMergeFailFriendlyURLLayout(com.liferay.portal.model.Layout layout) |
void |
addPortletBreadcrumbEntries(com.liferay.portal.model.Group group,
javax.servlet.http.HttpServletRequest request,
javax.portlet.RenderResponse renderResponse) |
void |
addPortletBreadcrumbEntries(com.liferay.portal.model.Group group,
java.lang.String pagesName,
javax.portlet.PortletURL redirectURL,
javax.servlet.http.HttpServletRequest request,
javax.portlet.RenderResponse renderResponse) |
void |
applyLayoutPrototype(com.liferay.portal.model.LayoutPrototype layoutPrototype,
com.liferay.portal.model.Layout targetLayout,
boolean linkEnabled) |
protected void |
checkResetPrototypePermissions(com.liferay.portal.model.Group group,
com.liferay.portal.model.Layout layout)
Checks the permissions necessary for resetting the layout or site.
|
void |
copyLayout(long userId,
com.liferay.portal.model.Layout sourceLayout,
com.liferay.portal.model.Layout targetLayout,
com.liferay.portal.service.ServiceContext serviceContext) |
void |
copyLookAndFeel(com.liferay.portal.model.Layout targetLayout,
com.liferay.portal.model.Layout sourceLayout) |
void |
copyPortletPermissions(com.liferay.portal.model.Layout targetLayout,
com.liferay.portal.model.Layout sourceLayout) |
void |
copyPortletSetups(com.liferay.portal.model.Layout sourceLayout,
com.liferay.portal.model.Layout targetLayout) |
void |
copyTypeSettings(com.liferay.portal.model.Group sourceGroup,
com.liferay.portal.model.Group targetGroup) |
java.lang.Object[] |
deleteLayout(javax.portlet.ActionRequest actionRequest,
javax.portlet.ActionResponse actionResponse) |
java.lang.Object[] |
deleteLayout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
deleteLayout(javax.portlet.RenderRequest renderRequest,
javax.portlet.RenderResponse renderResponse) |
protected void |
doMergeLayoutPrototypeLayout(com.liferay.portal.model.Group group,
com.liferay.portal.model.Layout layout) |
protected void |
doResetPrototype(com.liferay.portal.model.Layout layout)
Resets the modified timestamp on the layout, and then calls
doResetPrototype(LayoutSet) to reset the modified timestamp on the
layout's site. |
protected void |
doResetPrototype(com.liferay.portal.model.LayoutSet layoutSet)
Resets the modified timestamp on the layout set.
|
java.io.File |
exportLayoutSetPrototype(com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype,
com.liferay.portal.service.ServiceContext serviceContext) |
java.lang.Long[] |
filterGroups(java.util.List<com.liferay.portal.model.Group> groups,
java.lang.String[] groupKeys) |
com.liferay.portal.model.Layout |
getLayoutSetPrototypeLayout(com.liferay.portal.model.Layout layout) |
java.util.Map<java.lang.String,java.lang.String[]> |
getLayoutSetPrototypeParameters(com.liferay.portal.service.ServiceContext serviceContext) |
protected java.util.Map<java.lang.String,java.lang.String[]> |
getLayoutSetPrototypesParameters(boolean importData) |
int |
getMergeFailCount(com.liferay.portal.model.LayoutPrototype layoutPrototype)
Returns the number of failed merge attempts for the layout prototype
since its last reset or update.
|
int |
getMergeFailCount(com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype)
Returns the number of failed merge attempts for the layout set prototype
since its last reset or update.
|
java.util.List<com.liferay.portal.model.Layout> |
getMergeFailFriendlyURLLayouts(com.liferay.portal.model.LayoutSet layoutSet) |
java.util.List<java.lang.String> |
getOrganizationNames(com.liferay.portal.model.Group group,
com.liferay.portal.model.User user) |
java.util.List<java.lang.String> |
getUserGroupNames(com.liferay.portal.model.Group group,
com.liferay.portal.model.User user) |
void |
importLayoutSetPrototype(com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype,
java.io.InputStream inputStream,
com.liferay.portal.service.ServiceContext serviceContext) |
protected void |
importLayoutSetPrototype(com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype,
long groupId,
boolean privateLayout,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
boolean importData) |
boolean |
isContentSharingWithChildrenEnabled(com.liferay.portal.model.Group group) |
boolean |
isFirstLayout(long groupId,
boolean privateLayout,
long layoutId) |
boolean |
isLayoutDeleteable(com.liferay.portal.model.Layout layout) |
boolean |
isLayoutModifiedSinceLastMerge(com.liferay.portal.model.Layout layout) |
boolean |
isLayoutSetMergeable(com.liferay.portal.model.Group group,
com.liferay.portal.model.LayoutSet layoutSet)
Returns
true if the linked site template can be merged into
the layout set. |
boolean |
isLayoutSetPrototypeUpdateable(com.liferay.portal.model.LayoutSet layoutSet) |
boolean |
isLayoutSortable(com.liferay.portal.model.Layout layout) |
boolean |
isLayoutUpdateable(com.liferay.portal.model.Layout layout) |
boolean |
isUserGroupLayout(com.liferay.portal.model.Layout layout) |
boolean |
isUserGroupLayoutSetViewable(com.liferay.portal.security.permission.PermissionChecker permissionChecker,
com.liferay.portal.model.Group userGroupGroup) |
void |
mergeLayoutPrototypeLayout(com.liferay.portal.model.Group group,
com.liferay.portal.model.Layout layout) |
void |
mergeLayoutProtypeLayout(com.liferay.portal.model.Group group,
com.liferay.portal.model.Layout layout)
Deprecated.
As of 6.2.0, replaced by
mergeLayoutPrototypeLayout(Group, Layout) |
void |
mergeLayoutSetPrototypeLayouts(com.liferay.portal.model.Group group,
com.liferay.portal.model.LayoutSet layoutSet) |
void |
mergeLayoutSetProtypeLayouts(com.liferay.portal.model.Group group,
com.liferay.portal.model.LayoutSet layoutSet)
Deprecated.
As of 6.2.0, replaced by
mergeLayoutSetPrototypeLayouts(Group, LayoutSet) |
void |
removeMergeFailFriendlyURLLayouts(com.liferay.portal.model.LayoutSet layoutSet) |
void |
resetPrototype(com.liferay.portal.model.Layout layout)
Checks the permissions necessary for resetting the layout.
|
void |
resetPrototype(com.liferay.portal.model.LayoutSet layoutSet)
Checks the permissions necessary for resetting the layout set.
|
protected void |
setLayoutSetPrototypeLinkEnabledParameter(java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
com.liferay.portal.model.LayoutSet targetLayoutSet,
com.liferay.portal.service.ServiceContext serviceContext) |
void |
setMergeFailCount(com.liferay.portal.model.LayoutPrototype layoutPrototype,
int newMergeFailCount)
Sets the number of failed merge attempts for the layout prototype to a
new value.
|
void |
setMergeFailCount(com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype,
int newMergeFailCount)
Sets the number of failed merge attempts for the layout set prototype to
a new value.
|
void |
updateLayoutScopes(long userId,
com.liferay.portal.model.Layout sourceLayout,
com.liferay.portal.model.Layout targetLayout,
javax.portlet.PortletPreferences sourcePreferences,
javax.portlet.PortletPreferences targetPreferences,
java.lang.String sourcePortletId,
java.lang.String languageId) |
protected void |
updateLayoutSetPrototypeLink(long groupId,
boolean privateLayout,
long layoutSetPrototypeId,
boolean layoutSetPrototypeLinkEnabled) |
void |
updateLayoutSetPrototypesLinks(com.liferay.portal.model.Group group,
long publicLayoutSetPrototypeId,
long privateLayoutSetPrototypeId,
boolean publicLayoutSetPrototypeLinkEnabled,
boolean privateLayoutSetPrototypeLinkEnabled) |
public void addMergeFailFriendlyURLLayout(com.liferay.portal.model.Layout layout)
throws com.liferay.portal.kernel.exception.PortalException
addMergeFailFriendlyURLLayout in interface com.liferay.portlet.sites.util.Sitescom.liferay.portal.kernel.exception.PortalExceptionpublic void addPortletBreadcrumbEntries(com.liferay.portal.model.Group group,
javax.servlet.http.HttpServletRequest request,
javax.portlet.RenderResponse renderResponse)
throws java.lang.Exception
addPortletBreadcrumbEntries in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic void addPortletBreadcrumbEntries(com.liferay.portal.model.Group group,
java.lang.String pagesName,
javax.portlet.PortletURL redirectURL,
javax.servlet.http.HttpServletRequest request,
javax.portlet.RenderResponse renderResponse)
throws java.lang.Exception
addPortletBreadcrumbEntries in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic void applyLayoutPrototype(com.liferay.portal.model.LayoutPrototype layoutPrototype,
com.liferay.portal.model.Layout targetLayout,
boolean linkEnabled)
throws java.lang.Exception
applyLayoutPrototype in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic void copyLayout(long userId,
com.liferay.portal.model.Layout sourceLayout,
com.liferay.portal.model.Layout targetLayout,
com.liferay.portal.service.ServiceContext serviceContext)
throws java.lang.Exception
copyLayout in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic void copyLookAndFeel(com.liferay.portal.model.Layout targetLayout,
com.liferay.portal.model.Layout sourceLayout)
throws java.lang.Exception
copyLookAndFeel in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic void copyPortletPermissions(com.liferay.portal.model.Layout targetLayout,
com.liferay.portal.model.Layout sourceLayout)
throws java.lang.Exception
copyPortletPermissions in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic void copyPortletSetups(com.liferay.portal.model.Layout sourceLayout,
com.liferay.portal.model.Layout targetLayout)
throws java.lang.Exception
copyPortletSetups in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic void copyTypeSettings(com.liferay.portal.model.Group sourceGroup,
com.liferay.portal.model.Group targetGroup)
throws java.lang.Exception
copyTypeSettings in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic java.lang.Object[] deleteLayout(javax.portlet.ActionRequest actionRequest,
javax.portlet.ActionResponse actionResponse)
throws java.lang.Exception
deleteLayout in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic java.lang.Object[] deleteLayout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
deleteLayout in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic void deleteLayout(javax.portlet.RenderRequest renderRequest,
javax.portlet.RenderResponse renderResponse)
throws java.lang.Exception
deleteLayout in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic java.io.File exportLayoutSetPrototype(com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype,
com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException
exportLayoutSetPrototype in interface com.liferay.portlet.sites.util.Sitescom.liferay.portal.kernel.exception.PortalExceptionpublic java.lang.Long[] filterGroups(java.util.List<com.liferay.portal.model.Group> groups,
java.lang.String[] groupKeys)
filterGroups in interface com.liferay.portlet.sites.util.Sitespublic com.liferay.portal.model.Layout getLayoutSetPrototypeLayout(com.liferay.portal.model.Layout layout)
getLayoutSetPrototypeLayout in interface com.liferay.portlet.sites.util.Sitespublic java.util.Map<java.lang.String,java.lang.String[]> getLayoutSetPrototypeParameters(com.liferay.portal.service.ServiceContext serviceContext)
getLayoutSetPrototypeParameters in interface com.liferay.portlet.sites.util.Sitespublic int getMergeFailCount(com.liferay.portal.model.LayoutPrototype layoutPrototype)
throws com.liferay.portal.kernel.exception.PortalException
getMergeFailCount in interface com.liferay.portlet.sites.util.SiteslayoutPrototype - the page template being checked for failed merge
attemptscom.liferay.portal.kernel.exception.PortalException - if no page was associated with the layout
prototype or if a portal exception occurredpublic int getMergeFailCount(com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype)
throws com.liferay.portal.kernel.exception.PortalException
getMergeFailCount in interface com.liferay.portlet.sites.util.SiteslayoutSetPrototype - the site template being checked for failed
merge attemptscom.liferay.portal.kernel.exception.PortalException - if no site was associated with the layout set
prototype or if a portal exception occurredpublic java.util.List<com.liferay.portal.model.Layout> getMergeFailFriendlyURLLayouts(com.liferay.portal.model.LayoutSet layoutSet)
throws com.liferay.portal.kernel.exception.PortalException
getMergeFailFriendlyURLLayouts in interface com.liferay.portlet.sites.util.Sitescom.liferay.portal.kernel.exception.PortalExceptionpublic java.util.List<java.lang.String> getOrganizationNames(com.liferay.portal.model.Group group,
com.liferay.portal.model.User user)
throws java.lang.Exception
getOrganizationNames in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic java.util.List<java.lang.String> getUserGroupNames(com.liferay.portal.model.Group group,
com.liferay.portal.model.User user)
throws java.lang.Exception
getUserGroupNames in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic void importLayoutSetPrototype(com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype,
java.io.InputStream inputStream,
com.liferay.portal.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException
importLayoutSetPrototype in interface com.liferay.portlet.sites.util.Sitescom.liferay.portal.kernel.exception.PortalExceptionpublic boolean isContentSharingWithChildrenEnabled(com.liferay.portal.model.Group group)
isContentSharingWithChildrenEnabled in interface com.liferay.portlet.sites.util.Sitespublic boolean isFirstLayout(long groupId,
boolean privateLayout,
long layoutId)
isFirstLayout in interface com.liferay.portlet.sites.util.Sitespublic boolean isLayoutDeleteable(com.liferay.portal.model.Layout layout)
isLayoutDeleteable in interface com.liferay.portlet.sites.util.Sitespublic boolean isLayoutModifiedSinceLastMerge(com.liferay.portal.model.Layout layout)
isLayoutModifiedSinceLastMerge in interface com.liferay.portlet.sites.util.Sitespublic boolean isLayoutSetMergeable(com.liferay.portal.model.Group group,
com.liferay.portal.model.LayoutSet layoutSet)
throws com.liferay.portal.kernel.exception.PortalException
true if the linked site template can be merged into
the layout set. This method checks the current number of merge fail
attempts stored for the linked site template and, if greater than the
merge fail threshold, will return false.isLayoutSetMergeable in interface com.liferay.portlet.sites.util.Sitesgroup - the site template's group, which is about to be merged into
the layout setlayoutSet - the site in which the site template is attempting to
merge intotrue if the linked site template can be merged into
the layout set; false otherwisecom.liferay.portal.kernel.exception.PortalException - if no site template was associated with the
layout set or if a portal exception occurredpublic boolean isLayoutSetPrototypeUpdateable(com.liferay.portal.model.LayoutSet layoutSet)
isLayoutSetPrototypeUpdateable in interface com.liferay.portlet.sites.util.Sitespublic boolean isLayoutSortable(com.liferay.portal.model.Layout layout)
isLayoutSortable in interface com.liferay.portlet.sites.util.Sitespublic boolean isLayoutUpdateable(com.liferay.portal.model.Layout layout)
isLayoutUpdateable in interface com.liferay.portlet.sites.util.Sitespublic boolean isUserGroupLayout(com.liferay.portal.model.Layout layout)
throws com.liferay.portal.kernel.exception.PortalException
isUserGroupLayout in interface com.liferay.portlet.sites.util.Sitescom.liferay.portal.kernel.exception.PortalExceptionpublic boolean isUserGroupLayoutSetViewable(com.liferay.portal.security.permission.PermissionChecker permissionChecker,
com.liferay.portal.model.Group userGroupGroup)
throws com.liferay.portal.kernel.exception.PortalException
isUserGroupLayoutSetViewable in interface com.liferay.portlet.sites.util.Sitescom.liferay.portal.kernel.exception.PortalExceptionpublic void mergeLayoutPrototypeLayout(com.liferay.portal.model.Group group,
com.liferay.portal.model.Layout layout)
throws java.lang.Exception
mergeLayoutPrototypeLayout in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exception@Deprecated
public void mergeLayoutProtypeLayout(com.liferay.portal.model.Group group,
com.liferay.portal.model.Layout layout)
throws java.lang.Exception
mergeLayoutPrototypeLayout(Group, Layout)mergeLayoutProtypeLayout in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic void mergeLayoutSetPrototypeLayouts(com.liferay.portal.model.Group group,
com.liferay.portal.model.LayoutSet layoutSet)
throws java.lang.Exception
mergeLayoutSetPrototypeLayouts in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exception@Deprecated
public void mergeLayoutSetProtypeLayouts(com.liferay.portal.model.Group group,
com.liferay.portal.model.LayoutSet layoutSet)
throws java.lang.Exception
mergeLayoutSetPrototypeLayouts(Group, LayoutSet)mergeLayoutSetProtypeLayouts in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic void removeMergeFailFriendlyURLLayouts(com.liferay.portal.model.LayoutSet layoutSet)
removeMergeFailFriendlyURLLayouts in interface com.liferay.portlet.sites.util.Sitespublic void resetPrototype(com.liferay.portal.model.Layout layout)
throws com.liferay.portal.kernel.exception.PortalException
doResetPrototype(Layout).resetPrototype in interface com.liferay.portlet.sites.util.Siteslayout - the page being checked for sufficient permissionscom.liferay.portal.kernel.exception.PortalException - if no site was associated with the layout, if the
user did not have permission to update the layout or the layout's
site, or if a portal exception occurredpublic void resetPrototype(com.liferay.portal.model.LayoutSet layoutSet)
throws com.liferay.portal.kernel.exception.PortalException
doResetPrototype(LayoutSet).resetPrototype in interface com.liferay.portlet.sites.util.SiteslayoutSet - the site being checked for sufficient permissionscom.liferay.portal.kernel.exception.PortalException - if the user did not have permission to update the
site or if a portal exception occurredpublic void setMergeFailCount(com.liferay.portal.model.LayoutPrototype layoutPrototype,
int newMergeFailCount)
throws com.liferay.portal.kernel.exception.PortalException
setMergeFailCount in interface com.liferay.portlet.sites.util.SiteslayoutPrototype - the page template of the counter being updatednewMergeFailCount - the new value of the countercom.liferay.portal.kernel.exception.PortalException - if no page was associated with the layout
prototype, if the user did not have permission to update the
page, or if a portal exception occurredpublic void setMergeFailCount(com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype,
int newMergeFailCount)
throws com.liferay.portal.kernel.exception.PortalException
setMergeFailCount in interface com.liferay.portlet.sites.util.SiteslayoutSetPrototype - the site template of the counter being updatednewMergeFailCount - the new value of the countercom.liferay.portal.kernel.exception.PortalException - if no site was associated with the layout set
prototype, if the user did not have permission to update the
layout set prototype, or if a portal exception occurredpublic void updateLayoutScopes(long userId,
com.liferay.portal.model.Layout sourceLayout,
com.liferay.portal.model.Layout targetLayout,
javax.portlet.PortletPreferences sourcePreferences,
javax.portlet.PortletPreferences targetPreferences,
java.lang.String sourcePortletId,
java.lang.String languageId)
throws java.lang.Exception
updateLayoutScopes in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionpublic void updateLayoutSetPrototypesLinks(com.liferay.portal.model.Group group,
long publicLayoutSetPrototypeId,
long privateLayoutSetPrototypeId,
boolean publicLayoutSetPrototypeLinkEnabled,
boolean privateLayoutSetPrototypeLinkEnabled)
throws java.lang.Exception
updateLayoutSetPrototypesLinks in interface com.liferay.portlet.sites.util.Sitesjava.lang.Exceptionprotected void checkResetPrototypePermissions(com.liferay.portal.model.Group group,
com.liferay.portal.model.Layout layout)
throws com.liferay.portal.kernel.exception.PortalException
PortalException is thrown.group - the site being checked for sufficient permissionslayout - the page being checked for sufficient permissions
(optionally null). If null, the
permissions are only checked for resetting the site.com.liferay.portal.kernel.exception.PortalException - if the user did not have permission to update the
layout or site, or if a portal exception occurredprotected void doMergeLayoutPrototypeLayout(com.liferay.portal.model.Group group,
com.liferay.portal.model.Layout layout)
throws java.lang.Exception
java.lang.Exceptionprotected void doResetPrototype(com.liferay.portal.model.Layout layout)
throws com.liferay.portal.kernel.exception.PortalException
doResetPrototype(LayoutSet) to reset the modified timestamp on the
layout's site.
After the timestamps are reset, the modified page template and site template are merged into their linked layout and site when they are first accessed.
layout - the page having its timestamp resetcom.liferay.portal.kernel.exception.PortalException - if no site was associated with the layout or if a
portal exception occurredprotected void doResetPrototype(com.liferay.portal.model.LayoutSet layoutSet)
After the timestamp is reset, the modified site template is merged into its linked layout set when it is first accessed.
layoutSet - the site having its timestamp resetprotected java.util.Map<java.lang.String,java.lang.String[]> getLayoutSetPrototypesParameters(boolean importData)
protected void importLayoutSetPrototype(com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype,
long groupId,
boolean privateLayout,
java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
boolean importData)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionprotected void setLayoutSetPrototypeLinkEnabledParameter(java.util.Map<java.lang.String,java.lang.String[]> parameterMap,
com.liferay.portal.model.LayoutSet targetLayoutSet,
com.liferay.portal.service.ServiceContext serviceContext)
protected void updateLayoutSetPrototypeLink(long groupId,
boolean privateLayout,
long layoutSetPrototypeId,
boolean layoutSetPrototypeLinkEnabled)
throws java.lang.Exception
java.lang.Exception