Class CmsFunctionAvailability

java.lang.Object
org.opencms.ade.configuration.CmsFunctionAvailability

public class CmsFunctionAvailability extends Object
Helper class for computing dynamic function availability based on sitemap configuration settings.
  • Constructor Details

  • Method Details

    • add

      public void add(CmsUUID functionId)
      Adds a dynamic function id and enables whitelisting.
      Parameters:
      functionId - the function id to add
    • addAll

      public void addAll(Collection<CmsUUID> enabledIds)
      Adds all ids from the given collection.
      Parameters:
      enabledIds - the ids to add
    • checkAvailable

      public boolean checkAvailable(CmsUUID id)
      Check if the function with the given id is available with this configuration.
      Parameters:
      id - the id to check
      Returns:
      true if the function is available
    • getBlacklist

      Gets the blacklist of explicitly removed functions that are not already covered by not being in a whitelist.
      Returns:
      the list of explicitly removed functions
    • getWhitelist

      Gets the whitelist of explicitly enabled functions.

      If no functions have been explicitly added, and no "remove all" option has been used, this will return null.

      Returns:
      the whitelist of functions
    • isDefined

      public boolean isDefined()
      Checks if this object has any restrictions on functions.
      Returns:
      true if this has any restrictions on functions
    • remove

      public void remove(CmsUUID functionId)
      Removes a single function.
      Parameters:
      functionId - the id of the function
    • removeAll

      public void removeAll()
      Removes all functions and enables the whitelist.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: