Class ObjectIdentityUtils

java.lang.Object
com.atlassian.bamboo.security.acegi.acls.objectidentity.ObjectIdentityUtils

public final class ObjectIdentityUtils extends Object
Helper methods for working with Acegi object identities.
See Also:
  • Field Details

    • ACL_OBJECT_IDENTITY_CLASSES

      public static final Map<Class<?>,Class<?>> ACL_OBJECT_IDENTITY_CLASSES
      Mapping of Bamboo entity classes to ACL related classes.
  • Method Details

    • getAclClassForEntity

      @NotNull public static @NotNull Optional<Class<?>> getAclClassForEntity(@NotNull @NotNull BambooIdProvider entity)
      Returns a class to be used when defining ObjectIdentity of any entity. If the passed entity is of unknown type, returns an empty Optional.
      Parameters:
      entity - any Bamboo entity which may have ACL identity
      Returns:
      class to use when constructing ACL object identity if known
    • getAclClassForEntityClass

      @NotNull public static @NotNull Optional<Class<?>> getAclClassForEntityClass(@NotNull @NotNull Class<?> entityClass)
      Returns a class to be used when defining ObjectIdentity of any entity. If the passed class is unknown, returns an empty Optional.
      Parameters:
      entityClass - actual class of any Bamboo entity which may have ACL identity
      Returns:
      class to use when constructing ACL object identity if known