Class AclObjectIdentity
java.lang.Object
ubic.gemma.core.security.acl.domain.AclObjectIdentity
- All Implemented Interfaces:
Serializable, org.springframework.security.acls.model.ObjectIdentity
@Entity
public class AclObjectIdentity
extends Object
implements org.springframework.security.acls.model.ObjectIdentity
Implementation of
ObjectIdentity.- Version:
- $Id: AclObjectIdentity.java,v 1.1 2013/09/14 16:55:18 paul Exp $
- Author:
- Paul
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAclObjectIdentity(Class<? extends Securable> javaType, Long identifier) AclObjectIdentity(String type, Long identifier) AclObjectIdentity(Securable object) If the object is a proxy, its superclass must be the correct one to give the OBJECT_CLASS (type) in the ACL tables. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleangetId()getType()inthashCode()Important so caching operates properly.voidsetEntries(Set<AclEntry> entries) voidsetEntriesInheriting(boolean entriesInheriting) voidvoidsetIdentifier(Long identifier) voidsetObjectIdClass(Long objectIdClass) voidsetOwnerSid(AclSid ownerSid) Set the owner from anAclSidentity (Hibernate-side).voidsetOwnerSidFromSpring(org.springframework.security.acls.model.Sid ownerSid) Set the owner from a Spring SecuritySid.voidsetParentObject(AclObjectIdentity parentObject) voidtoString()
-
Constructor Details
-
AclObjectIdentity
public AclObjectIdentity() -
AclObjectIdentity
-
AclObjectIdentity
If the object is a proxy, its superclass must be the correct one to give the OBJECT_CLASS (type) in the ACL tables. For polymorphic classes this will be a problem if the method returns the superclass, so use fetch all properties. Example: PhenotypeAssociationDao. See chapter 19.1.3 of the Hibernate documentation for an explanation about polymorphic classes and proxies.Renovations Phase 2:
ClassUtils.getUserClass(Class)only unwraps CGLIB proxies (whose class names contain"$$"); Hibernate proxies use"$HibernateProxy$"(single$) and slip through unchanged, leaving the OID with a synthetic type likeExperimentalDesign$HibernateProxy$hm1xnISythat doesn't match the canonical class name Spring Security's BasicLookupStrategy compares againstacl_class.class. UseHibernate.getClass(Object)which handles HibernateProxy and then falls back to ClassUtils for CGLIB-only stacks. -
AclObjectIdentity
-
-
Method Details
-
getId
-
setId
-
getType
- Specified by:
getTypein interfaceorg.springframework.security.acls.model.ObjectIdentity
-
setType
-
getIdentifier
- Specified by:
getIdentifierin interfaceorg.springframework.security.acls.model.ObjectIdentity
-
setIdentifier
-
getEntries
-
setEntries
-
getEntriesInheriting
public boolean getEntriesInheriting() -
setEntriesInheriting
public void setEntriesInheriting(boolean entriesInheriting) -
getObjectIdClass
-
setObjectIdClass
-
getOwnerSid
-
setOwnerSid
-
setOwnerSidFromSpring
public void setOwnerSidFromSpring(org.springframework.security.acls.model.Sid ownerSid) Set the owner from a Spring SecuritySid. The legacy gsecAclImplaccepts a Spring sid through Spring'sOwnershipAclinterface; this overload bridges that back to the Hibernate-mapped entity. Phase B of the gsec absorption split the Sid hierarchy cleanly: gsec entities are no longerSidimplementations, so the conversion has to happen here. The legacyAclImpl/AclDaoImplstack is no longer wired in production (theaclServicebean is nowJdbcMutableAclService); this path remains forBaseDatabaseTest-based unit tests that still exercise the legacy stack. -
getParentObject
-
setParentObject
-
hashCode
-
equals
-
toString
-