public class SitesImpl
extends Object
implements com.liferay.sites.kernel.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_LAYOUT_MODIFIED_TIME, LAST_MERGE_TIME, LAST_MERGE_VERSION, LAST_RESET_TIME, LAYOUT_UPDATEABLE, MERGE_FAIL_COUNT, MERGE_FAIL_FRIENDLY_URL_LAYOUTS, SHOW_SITE_NAME
Constructor and Description |
---|
SitesImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addMergeFailFriendlyURLLayout(com.liferay.portal.kernel.model.Layout layout) |
void |
applyLayoutPrototype(com.liferay.portal.kernel.model.LayoutPrototype layoutPrototype,
com.liferay.portal.kernel.model.Layout targetLayout,
boolean linkEnabled) |
protected void |
checkResetPrototypePermissions(com.liferay.portal.kernel.model.Group group,
com.liferay.portal.kernel.model.Layout layout)
Checks the permissions necessary for resetting the layout or site.
|
void |
copyPortletPermissions(com.liferay.portal.kernel.model.Layout targetLayout,
com.liferay.portal.kernel.model.Layout sourceLayout) |
void |
copyPortletSetups(com.liferay.portal.kernel.model.Layout sourceLayout,
com.liferay.portal.kernel.model.Layout targetLayout) |
protected void |
deleteUnreferencedPortlets(List<String> targetLayoutPortletIds,
com.liferay.portal.kernel.model.Layout targetLayout,
com.liferay.portal.kernel.model.Layout sourceLayout) |
protected void |
doMergeLayoutPrototypeLayout(com.liferay.portal.kernel.model.Group group,
com.liferay.portal.kernel.model.Layout layout) |
protected void |
doResetPrototype(com.liferay.portal.kernel.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.kernel.model.LayoutSet layoutSet)
Resets the modified timestamp on the layout set.
|
protected File |
exportLayoutSetPrototype(com.liferay.portal.kernel.model.User user,
com.liferay.portal.kernel.model.LayoutSetPrototype layoutSetPrototype,
Map<String,String[]> parameterMap,
String cacheFileName) |
Map<String,String[]> |
getLayoutSetPrototypeParameters(com.liferay.portal.kernel.service.ServiceContext serviceContext) |
protected Map<String,String[]> |
getLayoutSetPrototypesParameters(boolean importData) |
protected void |
importLayoutSetPrototype(com.liferay.portal.kernel.model.LayoutSetPrototype layoutSetPrototype,
long groupId,
boolean privateLayout,
Map<String,String[]> parameterMap,
boolean importData) |
protected boolean |
isAnyFailedLayoutModifiedSinceLastMerge(com.liferay.portal.kernel.model.LayoutSet layoutSet) |
boolean |
isLayoutModifiedSinceLastMerge(com.liferay.portal.kernel.model.Layout layout) |
boolean |
isLayoutSetMergeable(com.liferay.portal.kernel.model.Group group,
com.liferay.portal.kernel.model.LayoutSet layoutSet)
Returns
true if the linked site template can be merged into
the layout set. |
protected boolean |
isLayoutSetPrototypeMergeBackgroundTaskExists(com.liferay.portal.kernel.model.LayoutSetPrototype layoutSetPrototype,
com.liferay.portal.kernel.model.LayoutSet layoutSet) |
protected boolean |
isSkipImport(long groupId,
com.liferay.portal.kernel.model.LayoutSet layoutSet,
boolean completed,
long lastMergeVersion) |
boolean |
isUserGroupLayoutSetViewable(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker,
com.liferay.portal.kernel.model.Group userGroupGroup) |
void |
mergeLayoutPrototypeLayout(com.liferay.portal.kernel.model.Group group,
com.liferay.portal.kernel.model.Layout layout) |
void |
mergeLayoutSetPrototypeLayouts(com.liferay.portal.kernel.model.Group group,
com.liferay.portal.kernel.model.LayoutSet layoutSet) |
protected void |
mergeLayoutSetPrototypeLayoutsInBackground(com.liferay.portal.kernel.model.LayoutSetPrototype layoutSetPrototype,
com.liferay.portal.kernel.model.LayoutSet layoutSet) |
void |
removeMergeFailFriendlyURLLayouts(com.liferay.portal.kernel.model.LayoutSet layoutSet) |
void |
resetPrototype(com.liferay.portal.kernel.model.Layout layout)
Checks the permissions necessary for resetting the layout.
|
void |
resetPrototype(com.liferay.portal.kernel.model.LayoutSet layoutSet)
Checks the permissions necessary for resetting the layout set.
|
void |
setMergeFailCount(com.liferay.portal.kernel.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.kernel.model.LayoutSetPrototype layoutSetPrototype,
int newMergeFailCount)
Sets the number of failed merge attempts for the layout set prototype to
a new value.
|
protected void |
updateLayoutSetPrototypeLink(long groupId,
boolean privateLayout,
long layoutSetPrototypeId,
boolean layoutSetPrototypeLinkEnabled) |
void |
updateLayoutSetPrototypesLinks(com.liferay.portal.kernel.model.Group group,
long publicLayoutSetPrototypeId,
long privateLayoutSetPrototypeId,
boolean publicLayoutSetPrototypeLinkEnabled,
boolean privateLayoutSetPrototypeLinkEnabled) |
public void addMergeFailFriendlyURLLayout(com.liferay.portal.kernel.model.Layout layout) throws com.liferay.portal.kernel.exception.PortalException
addMergeFailFriendlyURLLayout
in interface com.liferay.sites.kernel.util.Sites
com.liferay.portal.kernel.exception.PortalException
public void applyLayoutPrototype(com.liferay.portal.kernel.model.LayoutPrototype layoutPrototype, com.liferay.portal.kernel.model.Layout targetLayout, boolean linkEnabled) throws Exception
applyLayoutPrototype
in interface com.liferay.sites.kernel.util.Sites
Exception
public void copyPortletPermissions(com.liferay.portal.kernel.model.Layout targetLayout, com.liferay.portal.kernel.model.Layout sourceLayout) throws Exception
copyPortletPermissions
in interface com.liferay.sites.kernel.util.Sites
Exception
public void copyPortletSetups(com.liferay.portal.kernel.model.Layout sourceLayout, com.liferay.portal.kernel.model.Layout targetLayout) throws Exception
copyPortletSetups
in interface com.liferay.sites.kernel.util.Sites
Exception
public Map<String,String[]> getLayoutSetPrototypeParameters(com.liferay.portal.kernel.service.ServiceContext serviceContext)
getLayoutSetPrototypeParameters
in interface com.liferay.sites.kernel.util.Sites
public boolean isLayoutModifiedSinceLastMerge(com.liferay.portal.kernel.model.Layout layout)
isLayoutModifiedSinceLastMerge
in interface com.liferay.sites.kernel.util.Sites
public boolean isLayoutSetMergeable(com.liferay.portal.kernel.model.Group group, com.liferay.portal.kernel.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.sites.kernel.util.Sites
group
- 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
public boolean isUserGroupLayoutSetViewable(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker, com.liferay.portal.kernel.model.Group userGroupGroup) throws com.liferay.portal.kernel.exception.PortalException
isUserGroupLayoutSetViewable
in interface com.liferay.sites.kernel.util.Sites
com.liferay.portal.kernel.exception.PortalException
public void mergeLayoutPrototypeLayout(com.liferay.portal.kernel.model.Group group, com.liferay.portal.kernel.model.Layout layout) throws Exception
mergeLayoutPrototypeLayout
in interface com.liferay.sites.kernel.util.Sites
Exception
public void mergeLayoutSetPrototypeLayouts(com.liferay.portal.kernel.model.Group group, com.liferay.portal.kernel.model.LayoutSet layoutSet) throws Exception
mergeLayoutSetPrototypeLayouts
in interface com.liferay.sites.kernel.util.Sites
Exception
public void removeMergeFailFriendlyURLLayouts(com.liferay.portal.kernel.model.LayoutSet layoutSet) throws com.liferay.portal.kernel.exception.PortalException
removeMergeFailFriendlyURLLayouts
in interface com.liferay.sites.kernel.util.Sites
com.liferay.portal.kernel.exception.PortalException
public void resetPrototype(com.liferay.portal.kernel.model.Layout layout) throws com.liferay.portal.kernel.exception.PortalException
doResetPrototype(Layout)
.resetPrototype
in interface com.liferay.sites.kernel.util.Sites
layout
- the page being checked for sufficient permissionscom.liferay.portal.kernel.exception.PortalException
public void resetPrototype(com.liferay.portal.kernel.model.LayoutSet layoutSet) throws com.liferay.portal.kernel.exception.PortalException
doResetPrototype(LayoutSet)
.resetPrototype
in interface com.liferay.sites.kernel.util.Sites
layoutSet
- the site being checked for sufficient permissionscom.liferay.portal.kernel.exception.PortalException
public void setMergeFailCount(com.liferay.portal.kernel.model.LayoutPrototype layoutPrototype, int newMergeFailCount) throws com.liferay.portal.kernel.exception.PortalException
setMergeFailCount
in interface com.liferay.sites.kernel.util.Sites
layoutPrototype
- the page template of the counter being updatednewMergeFailCount
- the new value of the countercom.liferay.portal.kernel.exception.PortalException
public void setMergeFailCount(com.liferay.portal.kernel.model.LayoutSetPrototype layoutSetPrototype, int newMergeFailCount) throws com.liferay.portal.kernel.exception.PortalException
setMergeFailCount
in interface com.liferay.sites.kernel.util.Sites
layoutSetPrototype
- the site template of the counter being updatednewMergeFailCount
- the new value of the countercom.liferay.portal.kernel.exception.PortalException
public void updateLayoutSetPrototypesLinks(com.liferay.portal.kernel.model.Group group, long publicLayoutSetPrototypeId, long privateLayoutSetPrototypeId, boolean publicLayoutSetPrototypeLinkEnabled, boolean privateLayoutSetPrototypeLinkEnabled) throws Exception
updateLayoutSetPrototypesLinks
in interface com.liferay.sites.kernel.util.Sites
Exception
protected void checkResetPrototypePermissions(com.liferay.portal.kernel.model.Group group, com.liferay.portal.kernel.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
protected void deleteUnreferencedPortlets(List<String> targetLayoutPortletIds, com.liferay.portal.kernel.model.Layout targetLayout, com.liferay.portal.kernel.model.Layout sourceLayout) throws Exception
Exception
protected void doMergeLayoutPrototypeLayout(com.liferay.portal.kernel.model.Group group, com.liferay.portal.kernel.model.Layout layout) throws Exception
Exception
protected void doResetPrototype(com.liferay.portal.kernel.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
protected void doResetPrototype(com.liferay.portal.kernel.model.LayoutSet layoutSet) throws com.liferay.portal.kernel.exception.PortalException
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 resetcom.liferay.portal.kernel.exception.PortalException
protected File exportLayoutSetPrototype(com.liferay.portal.kernel.model.User user, com.liferay.portal.kernel.model.LayoutSetPrototype layoutSetPrototype, Map<String,String[]> parameterMap, String cacheFileName)
protected Map<String,String[]> getLayoutSetPrototypesParameters(boolean importData)
protected void importLayoutSetPrototype(com.liferay.portal.kernel.model.LayoutSetPrototype layoutSetPrototype, long groupId, boolean privateLayout, Map<String,String[]> parameterMap, boolean importData) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected boolean isAnyFailedLayoutModifiedSinceLastMerge(com.liferay.portal.kernel.model.LayoutSet layoutSet)
protected boolean isLayoutSetPrototypeMergeBackgroundTaskExists(com.liferay.portal.kernel.model.LayoutSetPrototype layoutSetPrototype, com.liferay.portal.kernel.model.LayoutSet layoutSet) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected boolean isSkipImport(long groupId, com.liferay.portal.kernel.model.LayoutSet layoutSet, boolean completed, long lastMergeVersion)
protected void mergeLayoutSetPrototypeLayoutsInBackground(com.liferay.portal.kernel.model.LayoutSetPrototype layoutSetPrototype, com.liferay.portal.kernel.model.LayoutSet layoutSet) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void updateLayoutSetPrototypeLink(long groupId, boolean privateLayout, long layoutSetPrototypeId, boolean layoutSetPrototypeLinkEnabled) throws Exception
Exception