public void addParameter(T1 key, T2 value) { if (this.parameters.containsKey(key)) { throw IdentityRuntimeException.error("Parameters map trying to override existing key " + key); } parameters.put(key, value); }
@Override public void init(InitConfig configuration) throws IdentityRuntimeException { if (configuration instanceof ModuleConfiguration) { this.configs = (ModuleConfiguration) configuration; } else { throw new IdentityRuntimeException("Initial configuration error"); } }
@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; }
public void removeSessionData(String key, String type, long nanoTime) { if (!enablePersist) { return; } Connection connection = null; try { connection = IdentityDatabaseUtil.getDBConnection(); } catch (IdentityRuntimeException e) { log.error(e.getMessage(), e); return; } PreparedStatement preparedStatement = null; try { preparedStatement = connection.prepareStatement(sqlInsertDELETE); preparedStatement.setString(1, key); preparedStatement.setString(2, type); preparedStatement.setString(3, OPERATION_DELETE); preparedStatement.setLong(4, nanoTime); preparedStatement.executeUpdate(); if (!connection.getAutoCommit()) { connection.commit(); } } catch (Exception e) { log.error("Error while storing DELETE operation session data", e); } finally { IdentityDatabaseUtil.closeAllConnections(connection, null, preparedStatement); } }
connection = IdentityDatabaseUtil.getDBConnection(); } catch (IdentityRuntimeException e) { log.error(e.getMessage(), e); return;
public void addParameter(T1 key, T2 value){ if(this.parameters.containsKey(key)) { throw IdentityRuntimeException.error("Parameters map trying to override existing key " + key); } parameters.put(key, value); }
connection = IdentityDatabaseUtil.getDBConnection(); } catch (IdentityRuntimeException e) { log.error(e.getMessage(), e); return;
@Override public void init(InitConfig configuration) throws IdentityRuntimeException { if (configuration instanceof ModuleConfiguration) { this.configs = (ModuleConfiguration) configuration; } else { throw new IdentityRuntimeException("Initial configuration error"); } }
@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; }
public void addParameter(T1 key, T2 value){ if(this.parameters.containsKey(key)) { throw IdentityRuntimeException.error("Parameters map trying to override existing key " + key); } parameters.put(key, value); }
connection = IdentityDatabaseUtil.getDBConnection(); } catch (IdentityRuntimeException e) { log.error(e.getMessage(), e); return;
public static IdentityRuntimeException error(String errorCode, String message, Throwable cause) { return new IdentityRuntimeException(errorCode, message, cause); }
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; }
public void addParameter(T1 key, T2 value){ if(this.parameters.containsKey(key)) { throw IdentityRuntimeException.error("Parameters map trying to override existing key " + key); } parameters.put(key, value); }
connection = IdentityDatabaseUtil.getDBConnection(); } catch (IdentityRuntimeException e) { log.error(e.getMessage(), e); return;
public static IdentityRuntimeException error(String message) { return new IdentityRuntimeException(message); }
public void addParameters(Map<T1,T2> parameters){ for (Map.Entry<T1,T2> parameter : parameters.entrySet()) { if(this.parameters.containsKey(parameter.getKey())) { throw IdentityRuntimeException.error("Parameters map trying to override existing key " + parameter.getKey()); } parameters.put(parameter.getKey(), parameter.getValue()); } }
connection = IdentityDatabaseUtil.getDBConnection(); } catch (IdentityRuntimeException e) { log.error(e.getMessage(), e); return;
public static IdentityRuntimeException error(String errorCode, String message) { return new IdentityRuntimeException(errorCode, message); }
public void addParameters(Map<T1,T2> parameters){ for (Map.Entry<T1,T2> parameter : parameters.entrySet()) { if(this.parameters.containsKey(parameter.getKey())) { throw IdentityRuntimeException.error("Parameters map trying to override existing key " + parameter.getKey()); } parameters.put(parameter.getKey(), parameter.getValue()); } }