Class PackageResourceGuard

    • Constructor Detail

      • PackageResourceGuard

        public PackageResourceGuard()
        Construct.
    • Method Detail

      • accept

        public boolean accept​(String path)
        Description copied from interface: IPackageResourceGuard
        Whether the package resource that can be reached using the provided parameters may be accessed.
        Specified by:
        accept in interface IPackageResourceGuard
        Parameters:
        path - The absolute path, starting from the class root (packages are separated with forward slashes instead of dots).
        Returns:
        True if access is permitted, false otherwise
        See Also:
        IPackageResourceGuard.accept(java.lang.String)
      • acceptExtension

        protected boolean acceptExtension​(String extension)
        Whether the provided extension is accepted.
        Parameters:
        extension - The extension, starting from the class root (packages are separated with forward slashes instead of dots).
        Returns:
        True if accepted, false otherwise.
      • acceptFile

        protected boolean acceptFile​(String file)
        Whether the provided filename is accepted.
        Parameters:
        file - filename
        Returns:
        True if accepted, false otherwise.
      • getBlockedExtensions

        protected final Set<String> getBlockedExtensions()
        Gets the set of extensions that are denied access.
        Returns:
        The set of extensions that are denied access
      • getBlockedFiles

        protected final Set<String> getBlockedFiles()
        Gets the set of extensions that are denied access.
        Returns:
        The set of extensions that are denied access
      • setBlockedExtensions

        protected final void setBlockedExtensions​(Set<String> blockedExtensions)
        Sets the set of extensions that are denied access.
        Parameters:
        blockedExtensions - Set of extensions that are denied access
      • setBlockedFiles

        protected final void setBlockedFiles​(Set<String> blockedFiles)
        Sets the set of filenames that are denied access.
        Parameters:
        blockedFiles - Set of extensions that are denied access
      • isAllowAccessToRootResources

        public final boolean isAllowAccessToRootResources()
        Checks whether or not resources in the web root folder can be access.
        Returns:
        true iff root resources can be accessed
      • setAllowAccessToRootResources

        public final void setAllowAccessToRootResources​(boolean allowAccessToRootResources)
        Sets whether or not resources in the web root folder can be accessed.
        Parameters:
        allowAccessToRootResources -