Example usage for org.springframework.security.acls.domain SpringCacheBasedAclCache SpringCacheBasedAclCache

List of usage examples for org.springframework.security.acls.domain SpringCacheBasedAclCache SpringCacheBasedAclCache

Introduction

In this page you can find the example usage for org.springframework.security.acls.domain SpringCacheBasedAclCache SpringCacheBasedAclCache.

Prototype

public SpringCacheBasedAclCache(Cache cache, PermissionGrantingStrategy permissionGrantingStrategy,
            AclAuthorizationStrategy aclAuthorizationStrategy) 

Source Link

Usage

From source file:com.cedac.security.acls.mongo.MongoMutableAclServiceTests.java

@Before
public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);

    Mongo mongo = embeddedMongoDbRule.getDatabaseOperation().connectionManager();
    final AclCache aclCache = new SpringCacheBasedAclCache(new NoOpCacheManager().getCache("acl"), pgs, aas);
    fixture = new MongoMutableAclService(mongo, "test", aclCache, pgs, aas);
    fixture.afterPropertiesSet();// www.j  a v  a2  s.  com

    SecurityContextHolder.getContext()
            .setAuthentication(new PreAuthenticatedAuthenticationToken("admin@cedac.com", "password"));
}

From source file:com.cedac.security.acls.mongo.MongoAclServiceTests.java

@Before
public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);

    Mongo mongo = embeddedMongoDbRule.getDatabaseOperation().connectionManager();
    final AclCache aclCache = new SpringCacheBasedAclCache(new NoOpCacheManager().getCache("acl"), pgs, aas);
    fixture = new MongoAclService(mongo, "test", aclCache, pgs, aas);
    fixture.afterPropertiesSet();// ww w.  j  av a  2s  .com
}