acl/src/main/java/org/springframework/security/acls/jdbc/JdbcMutableAclService.java
public MutableAcl createAcl(ObjectIdentity objectIdentity)
			throws AlreadyExistsException {
		Assert.notNull(objectIdentity, "Object Identity required");

		// Check this object identity hasn't already been persisted
		if (retrieveObjectIdentityPrimaryKey(objectIdentity) != null) {
			throw new AlreadyExistsException("Object identity '" + objectIdentity
					+ "' already exists");
		}

		// Need to retrieve the current principal, in order to know who "owns" this ACL
		// (can be changed later on)
		Authentication auth = SecurityContextHolder.getContext().getAuthentication();
		PrincipalSid sid = new PrincipalSid(auth);

		// Create the acl_object_identity row
		createObjectIdentity(objectIdentity, sid);

		// Retrieve the ACL via superclass (ensures cache registration, proper retrieval
		// etc)
		Acl acl = readAclById(objectIdentity);
		Assert.isInstanceOf(MutableAcl.class, acl, "MutableAcl should be been returned");

		return (MutableAcl) acl;
	}
public MutableAcl createAcl(ObjectIdentity objectIdentity)
			throws AlreadyExistsException {
		Assert.notNull(objectIdentity, "Object Identity required");

		// Check this object identity hasn't already been persisted
		if (retrieveObjectIdentityPrimaryKey(objectIdentity) != null) {
			throw new AlreadyExistsException("Object identity '" + objectIdentity
					+ "' already exists");
		}

		// Need to retrieve the current principal, in order to know who "owns" this ACL
		// (can be changed later on)
		Authentication auth = SecurityContextHolder.getContext().getAuthentication();
		PrincipalSid sid = new PrincipalSid(auth);

		// Create the acl_object_identity row
		createObjectIdentity(objectIdentity, sid);

		// Retrieve the ACL via superclass (ensures cache registration, proper retrieval
		// etc)
		Acl acl = readAclById(objectIdentity);
		Assert.isInstanceOf(MutableAcl.class, acl, "MutableAcl should be been returned");

		return (MutableAcl) acl;
	}
public MutableAcl createAcl ( ObjectIdentity objectIdentity ) throws AlreadyExistsException { Assert . notNull ( objectIdentity , "Object Identity required" ) ; // Check this object identity hasn't already been persisted if ( retrieveObjectIdentityPrimaryKey ( objectIdentity ) != null ) { throw new AlreadyExistsException ( "Object identity '" + objectIdentity + "' already exists" ) ; } // Need to retrieve the current principal, in order to know who "owns" this ACL // (can be changed later on) Authentication auth = SecurityContextHolder . getContext ( ) . getAuthentication ( ) ; PrincipalSid sid = new PrincipalSid ( auth ) ; // Create the acl_object_identity row createObjectIdentity ( objectIdentity , sid ) ; // Retrieve the ACL via superclass (ensures cache registration, proper retrieval // etc) Acl acl = readAclById ( objectIdentity ) ; Assert . isInstanceOf ( MutableAcl . class , acl , "MutableAcl should be been returned" ) ; return ( MutableAcl ) acl ; }
========================================================================================================
========================================================================================================