当前位置: 首页>>代码示例>>Java>>正文


Java AclAuthorizationStrategy类代码示例

本文整理汇总了Java中org.springframework.security.acls.domain.AclAuthorizationStrategy的典型用法代码示例。如果您正苦于以下问题:Java AclAuthorizationStrategy类的具体用法?Java AclAuthorizationStrategy怎么用?Java AclAuthorizationStrategy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AclAuthorizationStrategy类属于org.springframework.security.acls.domain包,在下文中一共展示了AclAuthorizationStrategy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: insertAce

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
@Override
public void insertAce(int atIndexLocation, Permission permission, Sid sid, boolean granting) throws NotFoundException {
    aclAuthorizationStrategy.securityCheck(this, AclAuthorizationStrategy.CHANGE_GENERAL);
    Assert.notNull(permission, "Permission required");
    Assert.notNull(sid, "Sid required");
    if (atIndexLocation < 0) {
        throw new NotFoundException("atIndexLocation must be greater than or equal to zero");
    }
    if (atIndexLocation > this.aces.size()) {
        throw new NotFoundException("atIndexLocation must be less than or equal to the size of the AccessControlEntry collection");
    }

    AccessControlEntryImpl ace = new AccessControlEntryImpl.Builder()
            .acl(this)
            .sid(TenantSid.from(sid))
            .permission(permission)
            .granting(granting).build();

    synchronized (aces) {
        this.aces.add(atIndexLocation, ace);
    }
}
 
开发者ID:codeabovelab,项目名称:haven-platform,代码行数:23,代码来源:MutableAclImpl.java

示例2: MongodbAclService

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
public MongodbAclService(AclEntryRepository aclEntryRepository,
		AclObjectIdentityRepository objectIdentityRepository,
		AclSidRepository sidRepository,
		AclClassService aclClassService,
		AclCache aclCache,
		AclAuthorizationStrategy aclAuthorizationStrategy,
		PermissionFactory permissionFactory,
		PermissionGrantingStrategy grantingStrategy) {
	super();
	this.aclEntryRepository = aclEntryRepository;
	this.objectIdentityRepository = objectIdentityRepository;
	this.sidRepository = sidRepository;
	this.aclClassService = aclClassService;
	this.aclCache = aclCache;
	this.aclAuthorizationStrategy = aclAuthorizationStrategy;
	this.permissionFactory = permissionFactory;
	this.grantingStrategy = grantingStrategy;
	
	this.fieldAces.setAccessible(true);
	this.fieldAcl.setAccessible(true);
}
 
开发者ID:AlexCzar,项目名称:spring-security-acl-mongodb,代码行数:22,代码来源:MongodbAclService.java

示例3: initBeans

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Before
public void initBeans() {
       AclAuthorizationStrategy authorizationStrategy = new AclAuthorizationStrategyImpl(
       		new SimpleGrantedAuthority("ROLE_ADMINISTRATOR"),
       		new SimpleGrantedAuthority("ROLE_ADMINISTRATOR"),
       		new SimpleGrantedAuthority("ROLE_ADMINISTRATOR")
       		);
       cache = new EhCacheBasedAclCache(getCache());
       mongodbMutableAclService = new MongodbMutableAclService(
			aclEntryRepository, 
			objectIdentityRepository, 
			aclSidRepository,
			new SimpleCacheAclClassService(aclClassRepository), 
			cache, 
			authorizationStrategy, 
			new DefaultPermissionFactory(), 
			new DefaultPermissionGrantingStrategy(new ConsoleAuditLogger()));
	seedMongodbData();
}
 
开发者ID:AlexCzar,项目名称:spring-security-acl-mongodb,代码行数:21,代码来源:MongodbMutableAclServiceTest.java

示例4: initBeans

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Before
public void initBeans() {
       AclAuthorizationStrategy authorizationStrategy = new AclAuthorizationStrategyImpl(new SimpleGrantedAuthority("ROLE_ADMINISTRATOR"));
       EhCacheBasedAclCache cache = new EhCacheBasedAclCache(getCache());
	mongodbAclService = new MongodbAclService(
			aclEntryRepository, 
			objectIdentityRepository, 
			aclSidRepository,
			new SimpleCacheAclClassService(aclClassRepository), 
			cache, 
			authorizationStrategy, 
			new DefaultPermissionFactory(), 
			new DefaultPermissionGrantingStrategy(new ConsoleAuditLogger()));
	seedMongodbData();
}
 
开发者ID:AlexCzar,项目名称:spring-security-acl-mongodb,代码行数:17,代码来源:MongodbAclServiceTest.java

示例5: Neo4jLookupStrategy

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
/**
 * Constructor
 * 
 * @param graphDatabaseService - Graph Database Service
 * @param aclCache - Acl Cache
 * @param aclAuthorizationStrategy - Acl Authorization Strategy
 * @param permissionGrantingStrategy - Permission Granting Strategy
 */
public Neo4jLookupStrategy(GraphDatabaseService graphDatabaseService,
		AclCache aclCache,
		AclAuthorizationStrategy aclAuthorizationStrategy,
		PermissionGrantingStrategy permissionGrantingStrategy) {
	Assert.notNull(aclCache, "AclCache required");
	Assert.notNull(aclAuthorizationStrategy,
			"AclAuthorizationStrategy required");
	Assert.notNull(permissionGrantingStrategy,
			"permissionGrantingStrategy required");
	this.aclCache = aclCache;
	this.aclAuthorizationStrategy = aclAuthorizationStrategy;
	this.permissionGrantingStrategy = permissionGrantingStrategy;
	this.neo4jTemplate = new Neo4jTemplate(graphDatabaseService);
	fieldAces.setAccessible(true);
	fieldAcl.setAccessible(true);
}
 
开发者ID:shazin,项目名称:spring-security-acl-neo4j,代码行数:25,代码来源:Neo4jLookupStrategy.java

示例6: BasicLookupStrategy

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
public BasicLookupStrategy(DataSource dataSource, AclCache aclCache,
        AclAuthorizationStrategy aclAuthorizationStrategy, PermissionGrantingStrategy grantingStrategy) {
    Assert.notNull(dataSource, "DataSource required");
    Assert.notNull(aclCache, "AclCache required");
    Assert.notNull(aclAuthorizationStrategy, "AclAuthorizationStrategy required");
    Assert.notNull(grantingStrategy, "grantingStrategy required");
    jdbcTemplate = new JdbcTemplate(dataSource);
    this.aclCache = aclCache;
    this.aclAuthorizationStrategy = aclAuthorizationStrategy;
    this.grantingStrategy = grantingStrategy;
    fieldAces.setAccessible(true);
    fieldAcl.setAccessible(true);

}
 
开发者ID:GovernIB,项目名称:helium,代码行数:15,代码来源:BasicLookupStrategy.java

示例7: deleteAce

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
@Override
public void deleteAce(int aceIndex) throws NotFoundException {
    aclAuthorizationStrategy.securityCheck(this, AclAuthorizationStrategy.CHANGE_GENERAL);
    verifyAceIndexExists(aceIndex);

    synchronized (aces) {
        this.aces.remove(aceIndex);
    }
}
 
开发者ID:codeabovelab,项目名称:haven-platform,代码行数:10,代码来源:MutableAclImpl.java

示例8: updateAce

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
@Override
public void updateAce(int aceIndex, Permission permission)
    throws NotFoundException {
    aclAuthorizationStrategy.securityCheck(this, AclAuthorizationStrategy.CHANGE_GENERAL);
    verifyAceIndexExists(aceIndex);

    synchronized (aces) {
        AccessControlEntryImpl ace = (AccessControlEntryImpl) aces.get(aceIndex);
        aces.set(aceIndex, new AccessControlEntryImpl.Builder().from(ace).permission(permission).build());
    }
}
 
开发者ID:codeabovelab,项目名称:haven-platform,代码行数:12,代码来源:MutableAclImpl.java

示例9: updateAuditing

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
@Override
public void updateAuditing(int aceIndex, boolean auditSuccess, boolean auditFailure) {
    aclAuthorizationStrategy.securityCheck(this, AclAuthorizationStrategy.CHANGE_AUDITING);
    verifyAceIndexExists(aceIndex);

    synchronized (aces) {
        AccessControlEntryImpl ace = (AccessControlEntryImpl) aces.get(aceIndex);
        aces.set(aceIndex, new AccessControlEntryImpl.Builder().from(ace)
                .auditSuccess(auditSuccess)
                .auditFailure(auditFailure)
                .build());
    }
}
 
开发者ID:codeabovelab,项目名称:haven-platform,代码行数:14,代码来源:MutableAclImpl.java

示例10: MongoAclService

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
public MongoAclService(DB db, AclCache aclCache, PermissionGrantingStrategy permissionGrantingStrategy,
        AclAuthorizationStrategy aclAuthorizationStrategy) {
    this.db = db;
    this.aclCache = aclCache;
    this.permissionGrantingStrategy = permissionGrantingStrategy;
    this.aclAuthorizationStrategy = aclAuthorizationStrategy;
}
 
开发者ID:cedac-software,项目名称:spring-security-mongodb,代码行数:8,代码来源:MongoAclService.java

示例11: MongodbMutableAclService

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
public MongodbMutableAclService(AclEntryRepository aclEntryRepository,
		AclObjectIdentityRepository objectIdentityRepository,
		AclSidRepository aclSidRepository,
		AclClassService aclClassService,
		AclCache aclCache,
		AclAuthorizationStrategy aclAuthorizationStrategy,
		PermissionFactory permissionFactory,
		PermissionGrantingStrategy grantingStrategy) {
	super(aclEntryRepository, objectIdentityRepository, aclSidRepository, aclClassService,
			aclCache, aclAuthorizationStrategy,
			permissionFactory, grantingStrategy);
}
 
开发者ID:AlexCzar,项目名称:spring-security-acl-mongodb,代码行数:13,代码来源:MongodbMutableAclService.java

示例12: CassandraAclService

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
/**
 * Constructs a new <code>CassandraAclService</code> object.
 * 
 * @param aclRepository the {@link CassandraAclRepository} to use for access to the database.
 * @param aclCache the {@link AclCache} to use (can be <code>null</code>).
 * @param grantingStrategy the {@link PermissionGrantingStrategy} to use when creating {@link Acl} objects.
 * @param aclAuthorizationStrategy the {@link AclAuthorizationStrategy} to use when creating {@link Acl} objects.
 * @param permissionFactory the {@link PermissionFactory} to use when creating {@link AccessControlEntry} objects.
 */
public CassandraAclService(CassandraAclRepository aclRepository, AclCache aclCache, PermissionGrantingStrategy grantingStrategy,
		AclAuthorizationStrategy aclAuthorizationStrategy, PermissionFactory permissionFactory) {
	this.aclRepository = aclRepository;
	this.aclCache = aclCache;
	this.grantingStrategy = grantingStrategy;
	this.aclAuthorizationStrategy = aclAuthorizationStrategy;
	this.permissionFactory = permissionFactory;
	this.fieldAces.setAccessible(true);
}
 
开发者ID:RigasGrigoropoulos,项目名称:spring-security-acl-cassandra,代码行数:19,代码来源:CassandraAclService.java

示例13: getAclAuthorizationStrategy

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
public AclAuthorizationStrategy getAclAuthorizationStrategy() {
    return aclAuthorizationStrategy;
}
 
开发者ID:codeabovelab,项目名称:haven-platform,代码行数:4,代码来源:MutableAclImpl.java

示例14: setAclAuthorizationStrategy

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
public void setAclAuthorizationStrategy(AclAuthorizationStrategy aclAuthorizationStrategy) {
    this.aclAuthorizationStrategy = aclAuthorizationStrategy;
}
 
开发者ID:codeabovelab,项目名称:haven-platform,代码行数:4,代码来源:MutableAclImpl.java

示例15: setEntriesInheriting

import org.springframework.security.acls.domain.AclAuthorizationStrategy; //导入依赖的package包/类
@Override
public void setEntriesInheriting(boolean entriesInheriting) {
    aclAuthorizationStrategy.securityCheck(this, AclAuthorizationStrategy.CHANGE_GENERAL);
    this.entriesInheriting = entriesInheriting;
}
 
开发者ID:codeabovelab,项目名称:haven-platform,代码行数:6,代码来源:MutableAclImpl.java


注:本文中的org.springframework.security.acls.domain.AclAuthorizationStrategy类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。