Package org.apache.synapse.mediators.bsf.access.control

## Class AccessControlUtils

- java.lang.Object
- - org.apache.synapse.mediators.bsf.access.control.AccessControlUtils

-     public class AccessControlUtils
      extends Object

  Utility methods related to Script Mediator access control.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AccessControlUtils()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static boolean` | `isAccessAllowed​(String string, AccessControlConfig accessControlConfig, Comparator<String> comparator)` | Returns whether the provided string which represents a Java class or native object is accessible or not.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AccessControlUtils

          public AccessControlUtils()

  - ### Method Detail

    - #### isAccessAllowed

          public static boolean isAccessAllowed​(String string,
                                                AccessControlConfig accessControlConfig,
                                                Comparator<String> comparator)

      Returns whether the provided string which represents a Java class or native object is accessible or not. The allowing/blocking will be determined by the provided AccessControlConfig, based on the matching/comparing done as specified in the comparator.
      Parameters:
        `string` - Java class name or native object name.
        `accessControlConfig` - Access control config of the Script Mediator.
        `comparator` - The comparator based on which, the provided Java class/native object name is matched against the provided access control config.
      Returns:
        Whether the access is allowed or not.