Package org.ametys.web.filter
Class SharedContentsHelper
java.lang.Object
org.ametys.web.filter.SharedContentsHelper
Helper for creating expression for shared contents
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
copyTitle
(Content srcContent, DefaultSharedContent targetContent) Copy the title of the source content to the target contentstatic Query
getContentAccessQuery
(Site currentSite, Iterable<Site> sites) Get the expression for shared contentsstatic Query
getContentAccessQuery
(Site currentSite, Site site) Get the expression for shared contentsstatic Query
Get the expression corresponding to the shared contents of privates sitesstatic Query
Get the expression corresponding to the shared contents of private or protected sitesstatic Query
Get the expression corresponding to the shared contents of public or protected sitesstatic Query
Get the expression corresponding to the shared contents of public sitesstatic Expression
getSharedContentsExpression
(Site currentSite, AmetysObjectIterable<Site> sites) Get the expression for shared contentsstatic Expression
getSharedContentsExpression
(Site currentSite, Site site) Get the expression for shared contentsstatic Expression
Get the expression corresponding to the shared contents of privates sitesstatic Expression
Get the expression corresponding to the shared contents of private or protected sitesstatic Expression
Get the expression corresponding to the shared contents of public or protected sitesstatic Expression
Get the expression corresponding to the shared contents of public sites
-
Method Details
-
getContentAccessQuery
Get the expression for shared contents- Parameters:
currentSite
- the current sitesite
- the site of contents to find- Returns:
- the expression to aware of privacy of contents or null if sites are equals
-
getContentAccessQuery
Get the expression for shared contents- Parameters:
currentSite
- the current sitesites
- all sites- Returns:
- the expression to aware of privacy of contents
-
getContentAccessQueryForPrivateClosedSites
Get the expression corresponding to the shared contents of privates sites- Parameters:
siteNames
- the site names of private and closed sites- Returns:
- the expression corresponding to the shared contents of privates sites
-
getContentAccessQueryForPublicOrProtectedClosedSites
public static Query getContentAccessQueryForPublicOrProtectedClosedSites(Collection<String> siteNames) Get the expression corresponding to the shared contents of public or protected sites- Parameters:
siteNames
- the list of public or protected sites- Returns:
- the expression corresponding to the shared contents of public or protected sites
-
getContentAccessQueryForPublicOutsideSites
Get the expression corresponding to the shared contents of public sites- Parameters:
siteNames
- the list of public sites- Returns:
- the expression corresponding to the shared contents of public sites
-
getContentAccessQueryForPrivateOrProtectedOutsideSites
public static Query getContentAccessQueryForPrivateOrProtectedOutsideSites(Collection<String> siteNames) Get the expression corresponding to the shared contents of private or protected sites- Parameters:
siteNames
- the list of private or protected sites- Returns:
- the expression corresponding to the shared contents of private or protected sites