// ABHISHEK chnages for document search start. public void saveDocumentSearchConfig(String roleName, int numOfDays) throws ALNTApplicationException, ALNTSystemException { try { ALNTLogger.debug( this.getClass().getName(), "setDocumentSearchConfig()", "Saving the role and number of days details : "); ApplicationConfig roleConfig = new ApplicationConfig(); ApplicationConfig dayConfig = new ApplicationConfig(); roleConfig = applicationConfigDAO.load("DOCUMENT_CHANGE_ROLE"); dayConfig = applicationConfigDAO.load("DOCUMENT_CHANGE_DAYS"); roleConfig.setConfigParamValue(roleName); dayConfig.setConfigParamValue(String.valueOf(numOfDays)); applicationConfigDAO.saveDocumentSearchConfig(roleConfig); applicationConfigDAO.saveDocumentSearchConfig(dayConfig); try { ApplicationConfigCache.getInstance().reloadAll(); } catch (CacheEventException e) { ALNTLogger.debug(this.getClass().getName(), "setDocumentSearchConfig()", e); } } catch (Exception ex) { ALNTLogger.error(this.getClass().getName(), "setDocumentSearchConfig()", ex); handleException(ex); } }
public ApplicationConfig saveUserIDDataSourceType(String dataSourceType) throws ALNTApplicationException, ALNTSystemException { ApplicationConfig retApplConfig = null; try { ApplicationConfig exApplConfig = getConfigParam(CommonConstants.APPL_USERID_DATASOURCE_TYPE); if (null == exApplConfig) throw new ALNTApplicationException( ErrorCode.OBJECT_NOT_AVAILABLE, "Application cofig not exists: " + CommonConstants.APPL_USERID_DATASOURCE_TYPE); exApplConfig.setConfigParamValue(dataSourceType); retApplConfig = (ApplicationConfig) applicationConfigDAO.save(exApplConfig); ApplicationConfigCache.getInstance().reloadAll(); } catch (Exception ex) { ALNTLogger.error(this.getClass().getName(), "saveApplicationConfig()", ex); handleException(ex); } return retApplConfig; }