/** * <p>Returns a set containing all {@link org.picketlink.idm.model.AttributedType} supported by this configuration. * The resulting set is a combination of the supported types of each identity store supported by this configuration.</p> * * @return */ public Set<Class<? extends AttributedType>> getSupportedTypes() { HashSet<Class<? extends AttributedType>> supportedTypes = new HashSet<Class<? extends AttributedType>>(); for (IdentityStoreConfiguration storeConfiguration : getStoreConfiguration()) { supportedTypes.addAll(storeConfiguration.getSupportedTypes().keySet()); } return supportedTypes; } }
/** * <p>Returns a set containing all {@link org.picketlink.idm.model.AttributedType} supported by this configuration. * The resulting set is a combination of the supported types of each identity store supported by this configuration.</p> * * @return */ public Set<Class<? extends AttributedType>> getSupportedTypes() { HashSet<Class<? extends AttributedType>> supportedTypes = new HashSet<Class<? extends AttributedType>>(); for (IdentityStoreConfiguration storeConfiguration : getStoreConfiguration()) { supportedTypes.addAll(storeConfiguration.getSupportedTypes().keySet()); } return supportedTypes; } }
private void configureDefaultSupportedAccountTypes(final S store) { this.defaultAccountTypes = new ArrayList<Class<? extends Account>>(); for (Class<? extends AttributedType> supportedType : store.getConfig().getSupportedTypes().keySet()) { if (!Account.class.equals(supportedType) && Account.class.isAssignableFrom(supportedType)) { this.defaultAccountTypes.add((Class<? extends Account>) supportedType); } } if (this.defaultAccountTypes.isEmpty()) { throw MESSAGES.credentialNoAccountTypeProvided(); } }
private void configureDefaultSupportedAccountTypes(final S store) { this.defaultAccountTypes = new ArrayList<Class<? extends Account>>(); for (Class<? extends AttributedType> supportedType : store.getConfig().getSupportedTypes().keySet()) { if (!Account.class.equals(supportedType) && Account.class.isAssignableFrom(supportedType)) { this.defaultAccountTypes.add((Class<? extends Account>) supportedType); } } if (this.defaultAccountTypes.isEmpty()) { throw MESSAGES.credentialNoAccountTypeProvided(); } }
@Override protected Builder<T> readFrom(T configuration) { for (Class<? extends CredentialHandler> credentialHandler : configuration.getCredentialHandlers()) { addCredentialHandler(credentialHandler); } for (String credentialProperty : configuration.getCredentialHandlerProperties().keySet()) { Object value = configuration.getCredentialHandlerProperties().get(credentialProperty); setCredentialHandlerProperty(credentialProperty, value); } for (Class<? extends AttributedType> supportedType : configuration.getSupportedTypes().keySet()) { supportType(supportedType); if (Relationship.class.isAssignableFrom(supportedType)) { supportGlobalRelationship((Class<? extends Relationship>) supportedType); } } for (Class<? extends AttributedType> unsupportedType : configuration.getUnsupportedTypes().keySet()) { unsupportType(unsupportedType); } for (ContextInitializer contextInitializer : configuration.getContextInitializers()) { addContextInitializer(contextInitializer); } supportAttributes(configuration.supportsAttribute()); supportCredentials(configuration.supportsCredential()); supportPermissions(configuration.supportsPermissions()); return this; }
@Override protected Builder<T> readFrom(T configuration) { for (Class<? extends CredentialHandler> credentialHandler : configuration.getCredentialHandlers()) { addCredentialHandler(credentialHandler); } for (String credentialProperty : configuration.getCredentialHandlerProperties().keySet()) { Object value = configuration.getCredentialHandlerProperties().get(credentialProperty); setCredentialHandlerProperty(credentialProperty, value); } for (Class<? extends AttributedType> supportedType : configuration.getSupportedTypes().keySet()) { supportType(supportedType); if (Relationship.class.isAssignableFrom(supportedType)) { supportGlobalRelationship((Class<? extends Relationship>) supportedType); } } for (Class<? extends AttributedType> unsupportedType : configuration.getUnsupportedTypes().keySet()) { unsupportType(unsupportedType); } for (ContextInitializer contextInitializer : configuration.getContextInitializers()) { addContextInitializer(contextInitializer); } supportAttributes(configuration.supportsAttribute()); supportCredentials(configuration.supportsCredential()); supportPermissions(configuration.supportsPermissions()); return this; }
for (IdentityStoreConfiguration storeConfig : config.getStoreConfiguration()) { for (Class<? extends AttributedType> supportedType : storeConfig.getSupportedTypes().keySet()) { if (Relationship.class.isAssignableFrom(supportedType)) { this.privilegeChainQuery.registerRelationshipType((Class<Relationship>) supportedType);
for (IdentityStoreConfiguration storeConfig : config.getStoreConfiguration()) { for (Class<? extends AttributedType> supportedType : storeConfig.getSupportedTypes().keySet()) { if (Relationship.class.isAssignableFrom(supportedType)) { this.privilegeChainQuery.registerRelationshipType((Class<Relationship>) supportedType);
private void logConfiguration(final Collection<IdentityConfiguration> configurations) { for (IdentityConfiguration identityConfiguration : configurations) { if (ROOT_LOGGER.isDebugEnabled()) { ROOT_LOGGER.debug(" Identity Management Configuration: ["); ROOT_LOGGER.debugf(" Name: %s", identityConfiguration.getName()); ROOT_LOGGER.debugf(" Identity Store Configuration: %s", identityConfiguration.getStoreConfiguration()); ROOT_LOGGER.debugf(" Supports Partition: %s", this.partitionManagementConfig != null && this.partitionManagementConfig.equals(identityConfiguration)); ROOT_LOGGER.debugf(" Supports Attribute: %s", this.attributeManagementConfig != null && this.attributeManagementConfig.equals(identityConfiguration)); ROOT_LOGGER.debugf(" Supports Credential: %s", identityConfiguration.supportsCredential()); ROOT_LOGGER.debugf(" Supports Permission: %s", identityConfiguration.supportsPermission()); List<Class<?>> supportedTypes = new ArrayList<Class<?>>(); for (IdentityStoreConfiguration storeConfiguration : identityConfiguration.getStoreConfiguration()) { supportedTypes.addAll(storeConfiguration.getSupportedTypes().keySet()); } ROOT_LOGGER.debugf(" Supported Types: %s", supportedTypes); ROOT_LOGGER.debug(" ]"); } } }
private void logConfiguration(final Collection<IdentityConfiguration> configurations) { for (IdentityConfiguration identityConfiguration : configurations) { if (ROOT_LOGGER.isDebugEnabled()) { ROOT_LOGGER.debug(" Identity Management Configuration: ["); ROOT_LOGGER.debugf(" Name: %s", identityConfiguration.getName()); ROOT_LOGGER.debugf(" Identity Store Configuration: %s", identityConfiguration.getStoreConfiguration()); ROOT_LOGGER.debugf(" Supports Partition: %s", this.partitionManagementConfig != null && this.partitionManagementConfig.equals(identityConfiguration)); ROOT_LOGGER.debugf(" Supports Attribute: %s", this.attributeManagementConfig != null && this.attributeManagementConfig.equals(identityConfiguration)); ROOT_LOGGER.debugf(" Supports Credential: %s", identityConfiguration.supportsCredential()); ROOT_LOGGER.debugf(" Supports Permission: %s", identityConfiguration.supportsPermission()); List<Class<?>> supportedTypes = new ArrayList<Class<?>>(); for (IdentityStoreConfiguration storeConfiguration : identityConfiguration.getStoreConfiguration()) { supportedTypes.addAll(storeConfiguration.getSupportedTypes().keySet()); } ROOT_LOGGER.debugf(" Supported Types: %s", supportedTypes); ROOT_LOGGER.debug(" ]"); } } }
for (Class<? extends AttributedType> attributedType : storeConfiguration.getSupportedTypes().keySet()) { if (IdentityType.class.isAssignableFrom(attributedType)) { IdentityStereotype identityStereotype = attributedType.getAnnotation(IdentityStereotype.class);
@Override public void setup(C config) { IDENTITY_STORE_LOGGER.storeInitializing(getClass()); this.configuration = config; if (IDENTITY_STORE_LOGGER.isDebugEnabled()) { IDENTITY_STORE_LOGGER.debugf("[%s]: [", this.configuration); IDENTITY_STORE_LOGGER.debugf(" Type: %s", this.configuration.getIdentityStoreType()); IDENTITY_STORE_LOGGER.debugf(" Supports partition: %s", this.configuration.supportsPartition()); IDENTITY_STORE_LOGGER.debugf(" Supports attribute: %s", this.configuration.supportsAttribute()); IDENTITY_STORE_LOGGER.debugf(" Supports credential: %s", this.configuration.supportsCredential()); IDENTITY_STORE_LOGGER.debugf(" Credential Handlers: %s", this.configuration.getCredentialHandlers()); IDENTITY_STORE_LOGGER.debugf(" Supported types: %s", this.configuration.getSupportedTypes().keySet()); IDENTITY_STORE_LOGGER.debugf(" Unsupported types: %s", this.configuration.getUnsupportedTypes().keySet()); IDENTITY_STORE_LOGGER.debugf(" Context Initializers: %s", this.configuration.getContextInitializers()); IDENTITY_STORE_LOGGER.debug("]"); } if (config.supportsCredential()) { initializeCredentialHandlers(); } }
for (Class<? extends AttributedType> attributedType : storeConfiguration.getSupportedTypes().keySet()) { if (IdentityType.class.isAssignableFrom(attributedType)) { IdentityStereotype identityStereotype = attributedType.getAnnotation(IdentityStereotype.class);
@Override public void setup(C config) { IDENTITY_STORE_LOGGER.storeInitializing(getClass()); this.configuration = config; if (IDENTITY_STORE_LOGGER.isDebugEnabled()) { IDENTITY_STORE_LOGGER.debugf("[%s]: [", this.configuration); IDENTITY_STORE_LOGGER.debugf(" Type: %s", this.configuration.getIdentityStoreType()); IDENTITY_STORE_LOGGER.debugf(" Supports partition: %s", this.configuration.supportsPartition()); IDENTITY_STORE_LOGGER.debugf(" Supports attribute: %s", this.configuration.supportsAttribute()); IDENTITY_STORE_LOGGER.debugf(" Supports credential: %s", this.configuration.supportsCredential()); IDENTITY_STORE_LOGGER.debugf(" Credential Handlers: %s", this.configuration.getCredentialHandlers()); IDENTITY_STORE_LOGGER.debugf(" Supported types: %s", this.configuration.getSupportedTypes().keySet()); IDENTITY_STORE_LOGGER.debugf(" Unsupported types: %s", this.configuration.getUnsupportedTypes().keySet()); IDENTITY_STORE_LOGGER.debugf(" Context Initializers: %s", this.configuration.getContextInitializers()); IDENTITY_STORE_LOGGER.debug("]"); } if (config.supportsCredential()) { initializeCredentialHandlers(); } }
for (Class<? extends AttributedType> attributedType : storeConfiguration.getSupportedTypes().keySet()) { if (IdentityType.class.isAssignableFrom(attributedType)) { IdentityStereotype identityStereotype = attributedType.getAnnotation(IdentityStereotype.class);
for (Class<? extends AttributedType> attributedType : storeConfiguration.getSupportedTypes().keySet()) { if (IdentityType.class.isAssignableFrom(attributedType)) { IdentityStereotype identityStereotype = attributedType.getAnnotation(IdentityStereotype.class);
for (Class<? extends AttributedType> attributedType : storeConfiguration.getSupportedTypes().keySet()) { if (IdentityType.class.isAssignableFrom(attributedType)) { IdentityStereotype identityStereotype = attributedType.getAnnotation(IdentityStereotype.class);
for (Class<? extends AttributedType> attributedType : storeConfiguration.getSupportedTypes().keySet()) { if (IdentityType.class.isAssignableFrom(attributedType)) { IdentityStereotype identityStereotype = attributedType.getAnnotation(IdentityStereotype.class);