@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; }
@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(); } }
@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(); } }