Class ObjectIdentityUtils


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

      • ACL_OBJECT_IDENTITY_CLASSES

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

      • 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