@Override public void init(InitConfig configuration) throws IdentityRuntimeException { if (configuration instanceof ModuleConfiguration) { this.configs = (ModuleConfiguration) configuration; } else { throw new IdentityRuntimeException("Initial configuration error"); } }
public static IdentityRuntimeException error(String errorCode, String message, Throwable cause) { return new IdentityRuntimeException(errorCode, message, cause); }
@Override public void init(InitConfig configuration) throws IdentityRuntimeException { if (configuration instanceof ModuleConfiguration) { this.configs = (ModuleConfiguration) configuration; } else { throw new IdentityRuntimeException("Initial configuration error"); } }
public static IdentityRuntimeException error(String message) { return new IdentityRuntimeException(message); }
public static IdentityRuntimeException error(String errorCode, String message) { return new IdentityRuntimeException(errorCode, message); }
public static IdentityRuntimeException error(String message, Throwable cause) { return new IdentityRuntimeException(message, cause); }
public static <T extends IdentityRuntimeException> T error(Class<T> exceptionClass, String message) { T exception = null; try { exception = exceptionClass.getConstructor(String.class).newInstance(message); } catch (Exception e) { throw new IdentityRuntimeException("Invalid Exception Type, " + e.getMessage()); } return exception; }
public static <T extends IdentityRuntimeException> T error(Class<T> exceptionClass, String message, Throwable cause) { T exception = null; try { exception = exceptionClass.getConstructor(String.class, Throwable.class).newInstance(message, cause); } catch (Exception e) { throw new IdentityRuntimeException("Invalid Exception Type, " + e.getMessage()); } return exception; }
public static <T extends IdentityException> T error(Class<T> exceptionClass, String errorCode, String message, Throwable cause) { T exception = null; try { exception = exceptionClass.getConstructor(String.class, String.class, Throwable.class). newInstance(errorCode, message, cause); } catch (Exception e) { throw new IdentityRuntimeException("Invalid Exception Type, " + e.getMessage()); } return exception; }
public static <T extends IdentityRuntimeException> T error(Class<T> exceptionClass, String errorCode, String message, Throwable cause) { T exception = null; try { exception = exceptionClass.getConstructor(String.class, String.class, Throwable.class). newInstance(errorCode, message, cause); } catch (Exception e) { throw new IdentityRuntimeException("Invalid Exception Type, " + e.getMessage()); } return exception; }
public static <T extends IdentityException> T error(Class<T> exceptionClass, String message) { T exception = null; try { exception = exceptionClass.getConstructor(String.class).newInstance(message); } catch (Exception e) { throw new IdentityRuntimeException("Invalid Exception Type, " + e.getMessage()); } return exception; }
public static <T extends IdentityException> T error(Class<T> exceptionClass, String errorCode, String message) { T exception = null; try { exception = exceptionClass.getConstructor(String.class, String.class).newInstance(errorCode, message); } catch (Exception e) { throw new IdentityRuntimeException("Invalid Exception Type, " + e.getMessage()); } return exception; }
public static <T extends IdentityRuntimeException> T error(Class<T> exceptionClass, String errorCode, String message) { T exception = null; try { exception = exceptionClass.getConstructor(String.class, String.class).newInstance(errorCode, message); } catch (Exception e) { throw new IdentityRuntimeException("Invalid Exception Type, " + e.getMessage()); } return exception; }
public static <T extends IdentityException> T error(Class<T> exceptionClass, String message, Throwable cause) { T exception = null; try { exception = exceptionClass.getConstructor(String.class, Throwable.class).newInstance(message, cause); } catch (Exception e) { throw new IdentityRuntimeException("Invalid Exception Type, " + e.getMessage()); } return exception; }
public static IdentityRuntimeException error(ErrorInfo errorInfo) { if(errorInfo == null || StringUtils.isBlank(errorInfo.errorDescription)){ throw new IllegalArgumentException("ErrorInfo object is null or Error Description is blank"); } IdentityRuntimeException identityRuntimeException = null; if(errorInfo.getCause() != null) { identityRuntimeException = new IdentityRuntimeException(errorInfo.getErrorDescription(), errorInfo.getCause()); } else { identityRuntimeException = new IdentityRuntimeException(errorInfo.getErrorDescription()); } identityRuntimeException.addErrorInfo(errorInfo); return identityRuntimeException; }
@Deprecated public static IdentityRuntimeException error(String errorDescription) { IdentityRuntimeException identityRuntimeException = new IdentityRuntimeException(errorDescription); ErrorInfo.ErrorInfoBuilder errorInfoBuilder = new ErrorInfo.ErrorInfoBuilder(errorDescription); identityRuntimeException.addErrorInfo(errorInfoBuilder.build()); return identityRuntimeException; }
@Deprecated public static IdentityRuntimeException error(String errorDescription, Throwable cause) { IdentityRuntimeException identityRuntimeException = new IdentityRuntimeException(errorDescription, cause); ErrorInfo.ErrorInfoBuilder errorInfoBuilder = new ErrorInfo.ErrorInfoBuilder(errorDescription); errorInfoBuilder.cause(cause); identityRuntimeException.addErrorInfo(errorInfoBuilder.build()); return identityRuntimeException; }
/** * Load properties file and set Module properties * */ private IdentityEventConfigBuilder() { try { notificationMgtConfigProperties = loadProperties(); } catch (IdentityEventException e) { throw new IdentityRuntimeException("Failed to initialize IdentityEventConfigBuilder.", e); } setThreadPoolSize(); resolveSecrets(); moduleConfiguration = new HashMap<>(); build(); }
/** * Load properties file and set Module properties * */ private IdentityEventConfigBuilder() { try { notificationMgtConfigProperties = loadProperties(); } catch (IdentityEventException e) { throw new IdentityRuntimeException("Failed to initialize IdentityEventConfigBuilder.", e); } setThreadPoolSize(); resolveSecrets(); moduleConfiguration = new HashMap<>(); build(); }