/** * <p>Builds a {@link List} of {@link IdentityConfiguration}.</p> <p/> <p>This method should be used when multiple * configurations exists.</p> * * @return * @throws SecurityConfigurationException if any validation check fails or if any error occurs when building the * configuration. */ @Override public List<IdentityConfiguration> buildAll() throws SecurityConfigurationException { return create(); }
/** * <p>Builds a {@link List} of {@link IdentityConfiguration}.</p> <p/> <p>This method should be used when multiple * configurations exists.</p> * * @return * @throws SecurityConfigurationException if any validation check fails or if any error occurs when building the * configuration. */ @Override public List<IdentityConfiguration> buildAll() throws SecurityConfigurationException { return create(); }
/** * <p>Builds a single {@link IdentityConfiguration}.</p> <p/> <p>This method should be called when only a single * configuration was provided. Otherwise an exception will be thrown.</p> <p/> <p>For building multiple * configurations use the <code>buildAll</code> method instead.</p> * * @return * @throws SecurityConfigurationException if multiple configurations was defined, or if any validation check fails * or if any error occurs when building the configuration. */ @Override public IdentityConfiguration build() throws SecurityConfigurationException { if (this.namedIdentityConfigurationBuilders.size() > 1) { throw MESSAGES.configBuildMultipleConfigurationExists(); } List<IdentityConfiguration> identityConfigurations = create(); return identityConfigurations.get(0); }
/** * <p>Builds a single {@link IdentityConfiguration}.</p> <p/> <p>This method should be called when only a single * configuration was provided. Otherwise an exception will be thrown.</p> <p/> <p>For building multiple * configurations use the <code>buildAll</code> method instead.</p> * * @return * @throws SecurityConfigurationException if multiple configurations was defined, or if any validation check fails * or if any error occurs when building the configuration. */ @Override public IdentityConfiguration build() throws SecurityConfigurationException { if (this.namedIdentityConfigurationBuilders.size() > 1) { throw MESSAGES.configBuildMultipleConfigurationExists(); } List<IdentityConfiguration> identityConfigurations = create(); return identityConfigurations.get(0); }