List of usage examples for org.springframework.security.acls.domain SidRetrievalStrategyImpl SidRetrievalStrategyImpl
public SidRetrievalStrategyImpl()
From source file:org.bremersee.common.spring.autoconfigure.AclCommonAutoConfiguration.java
@Bean @ConditionalOnMissingBean({ SidRetrievalStrategy.class }) public SidRetrievalStrategy sidRetrievalStrategy() { SidRetrievalStrategyImpl impl = new SidRetrievalStrategyImpl(); LOG.info("Creating new 'SidRetrievalStrategy' ..."); return impl;/*from w ww .j ava 2 s . co m*/ }
From source file:net.projectmonkey.spring.acl.enhancement.voter.AclEntryVoter.java
private static SidRetrievalStrategyImpl defaultSidRetrievalStrategy() { return new SidRetrievalStrategyImpl(); }
From source file:org.zkoss.spring.security.SecurityUtil.java
private static void initializeIfRequired() { if (_applicationContext != null) { return;/*from ww w . jav a 2 s.c om*/ } _applicationContext = SpringUtil.getApplicationContext(); Map map = new HashMap(); ApplicationContext context = _applicationContext; while (context != null) { map.putAll(context.getBeansOfType(AclService.class)); context = context.getParent(); } if (map.size() != 1) { throw new UiException( "Found incorrect number of AclService instances in application context - you must have only have one!"); } _aclService = (AclService) map.values().iterator().next(); map = _applicationContext.getBeansOfType(SidRetrievalStrategy.class); if (map.size() == 0) { _sidRetrievalStrategy = new SidRetrievalStrategyImpl(); } else if (map.size() == 1) { _sidRetrievalStrategy = (SidRetrievalStrategy) map.values().iterator().next(); } else { throw new UiException("Found incorrect number of SidRetrievalStrategy instances in application " + "context - you must have only have one!"); } map = _applicationContext.getBeansOfType(ObjectIdentityRetrievalStrategy.class); if (map.size() == 0) { _objectIdentityRetrievalStrategy = new ObjectIdentityRetrievalStrategyImpl(); } else if (map.size() == 1) { _objectIdentityRetrievalStrategy = (ObjectIdentityRetrievalStrategy) map.values().iterator().next(); } else { throw new UiException("Found incorrect number of ObjectIdentityRetrievalStrategy instances in " + "application context - you must have only have one!"); } map = _applicationContext.getBeansOfType(PermissionFactory.class); if (map.size() == 0) { permissionFactory = new DefaultPermissionFactory(); } else if (map.size() == 1) { permissionFactory = (PermissionFactory) map.values().iterator().next(); } else { throw new UiException("Found incorrect number of PermissionFactory instances in " + "application context - you must have only have one!"); } }