Class SharedContentsHelper

java.lang.Object
org.ametys.web.filter.SharedContentsHelper

public final class SharedContentsHelper extends Object
Helper for creating expression for shared contents
  • Method Details

    • copyTitle

      public static void copyTitle(Content srcContent, DefaultSharedContent targetContent) throws AmetysRepositoryException
      Copy the title of the source content to the target content
      Parameters:
      srcContent - The source content
      targetContent - The shared target content
      Throws:
      AmetysRepositoryException - if an error occurs.
    • getSharedContentsExpression

      public static Expression getSharedContentsExpression(Site currentSite, Site site)
      Get the expression for shared contents
      Parameters:
      currentSite - the current site
      site - the site of contents to find
      Returns:
      the expression to aware of privacy of contents or null if sites are equals
    • getSharedContentsExpression

      Get the expression for shared contents
      Parameters:
      currentSite - the current site
      sites - all sites
      Returns:
      the expression to aware of privacy of contents
    • getSharedContentsExpressionForPrivateClosedSites

      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
    • getSharedContentsExpressionForPublicOrProtectedClosedSites

      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
    • getSharedContentsExpressionForPublicOutsideSites

      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
    • getSharedContentsExpressionForPrivateOrProtectedOutsideSites

      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
    • getContentAccessQuery

      public static Query getContentAccessQuery(Site currentSite, Site site)
      Get the expression for shared contents
      Parameters:
      currentSite - the current site
      site - the site of contents to find
      Returns:
      the expression to aware of privacy of contents or null if sites are equals
    • getContentAccessQuery

      public static Query getContentAccessQuery(Site currentSite, Iterable<Site> sites)
      Get the expression for shared contents
      Parameters:
      currentSite - the current site
      sites - 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

      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

      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