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:
ObjectIdentity
,HibernateObjectIdentityImpl
-
-
Field Summary
Fields Modifier and Type Field Description static Map<Class<?>,Class<?>>
ACL_OBJECT_IDENTITY_CLASSES
Mapping of Bamboo entity classes to ACL related classes.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull Optional<Class<?>>
getAclClassForEntity(@NotNull BambooIdProvider entity)
Returns a class to be used when definingObjectIdentity
of any entity.static @NotNull Optional<Class<?>>
getAclClassForEntityClass(@NotNull Class<?> entityClass)
Returns a class to be used when definingObjectIdentity
of any entity.
-
-
-
Method Detail
-
getAclClassForEntity
@NotNull public static @NotNull Optional<Class<?>> getAclClassForEntity(@NotNull @NotNull BambooIdProvider entity)
Returns a class to be used when definingObjectIdentity
of any entity. If the passed entity is of unknown type, returns an emptyOptional
.- 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 definingObjectIdentity
of any entity. If the passed class is unknown, returns an emptyOptional
.- Parameters:
entityClass
- actual class of any Bamboo entity which may have ACL identity- Returns:
- class to use when constructing ACL object identity if known
-
-