reportJSONRuntime.setHideFormFieldsAfterRun(isHideFormFieldAfterRun());
reportJSONRuntime.setDisplayExcel(!isDisplayOptionHideExcelIcons());
reportJSONRuntime.setDisplayPDF(!isDisplayOptionHidePDFIcons());
- ArrayList<IdNameValue> formFieldValues = new ArrayList<IdNameValue>();
- ArrayList<FormFieldJSON> formFieldJSONList = new ArrayList<FormFieldJSON>();
+ ArrayList<IdNameValue> formFieldValues = new ArrayList<>();
+ ArrayList<FormFieldJSON> formFieldJSONList = new ArrayList<>();
if(getReportFormFields()!=null) {
- formFieldJSONList = new ArrayList<FormFieldJSON>(getReportFormFields().size());
+ formFieldJSONList = new ArrayList<>(getReportFormFields().size());
for (Iterator iter = getReportFormFields().iterator(); iter.hasNext();) {
- formFieldValues = new ArrayList<IdNameValue>();
+ formFieldValues = new ArrayList<>();
FormField ff = (FormField) iter.next();
ff.setDbInfo(getDbInfo());
FormFieldJSON ffJSON = new FormFieldJSON();
if(rd!=null) {
count = 0;
reportJSONRuntime.setTotalRows(getReportDataSize());
- ArrayList<ColumnHeader> colList = new ArrayList<ColumnHeader>();
- ArrayList<Map<String,Object>> reportDataRows = new ArrayList<Map<String,Object>>();
+ ArrayList<ColumnHeader> colList = new ArrayList<>();
+ ArrayList<Map<String,Object>> reportDataRows = new ArrayList<>();
for(rd.reportColumnHeaderRows.resetNext(); rd.reportColumnHeaderRows.hasNext(); ) {
count++;
ColumnHeaderRow chr = rd.reportColumnHeaderRows.getNext();
if(getReportDataSize() > 0) {
count = 0;
for(rd.reportDataRows.resetNext(); rd.reportDataRows.hasNext(); count++) {
- dvJSON = new HashMap<String,Object>();
+ dvJSON = new HashMap<>();
DataRow dr = rd.reportDataRows.getNext();
for(dr.resetNext(); dr.hasNext(); ) {
DataValue dv = dr.getNext();
reportJSONRuntime.setReportSubTitle(getReportSubTitle());
reportJSONRuntime.setAllowEdit(isAllowEdit(request));
reportJSONRuntime.setNumFormCols(getNumFormColsAsInt());
- ArrayList<IdNameValue> formFieldValues = new ArrayList<IdNameValue>();
- ArrayList<FormFieldJSON> formFieldJSONList = new ArrayList<FormFieldJSON>();
+ ArrayList<IdNameValue> formFieldValues = new ArrayList<>();
+ ArrayList<FormFieldJSON> formFieldJSONList = new ArrayList<>();
if(reportFormFields!=null) {
- formFieldJSONList = new ArrayList<FormFieldJSON>(reportFormFields.size());
+ formFieldJSONList = new ArrayList<>(reportFormFields.size());
for (Iterator iter = reportFormFields.iterator(); iter.hasNext();) {
- formFieldValues = new ArrayList<IdNameValue>();
+ formFieldValues = new ArrayList<>();
FormField ff = (FormField) iter.next();
FormFieldJSON ffJSON = new FormFieldJSON();
ffJSON.setFieldId(ff.getFieldName());
formFieldJSONList.add(ffJSON);
}
for (Iterator iter = reportFormFields.iterator(); iter.hasNext();) {
- formFieldValues = new ArrayList<IdNameValue>();
+ formFieldValues = new ArrayList<>();
FormField ff = (FormField) iter.next();
ff.setDbInfo(getDbInfo());
for (Iterator iter1 = formFieldJSONList.iterator(); iter1.hasNext();) {
lookup.trimToSize();
String requestValue = request.getParameter(ff.getFieldName());
- ArrayList<String> requestValueList = new ArrayList<String>();
+ ArrayList<String> requestValueList = new ArrayList<>();
requestValueList.add(requestValue);
/*if(ff.isTriggerThisFormfield()) {
private String parseAndFillOtherFormfieldValues(HttpServletRequest request, String SQL, String userId,
ArrayList<FormFieldJSON> formFieldJSONList) {
- ArrayList<IdNameValue> formFieldValues = new ArrayList<IdNameValue>();
+ ArrayList<IdNameValue> formFieldValues = new ArrayList<>();
String selectedValue = "";
String displayName = "";
for (Iterator iter1 = formFieldJSONList.iterator(); iter1.hasNext();) {
String fieldId = fft.getFieldId();
String fieldDisplay = getFormFieldDisplayName(fft);
String formfield_value = "";
- List<String> selectedItems = new ArrayList<String>();
+ List<String> selectedItems = new ArrayList<>();
//Added so that Combo Box in old RAPTOR definition is translated to List box
if(fft.getFieldType().equals(FormField.FFT_COMBO_BOX)) {
fft.setFieldType(FormField.FFT_LIST_BOX);
public class SearchResultJSON{
- public ArrayList<SearchResultColumn> searchResultColumns = new ArrayList<SearchResultColumn>();
+ public ArrayList<SearchResultColumn> searchResultColumns = new ArrayList<>();
- public ArrayList<SearchResultRow> searchResultRows = new ArrayList<SearchResultRow>();
+ public ArrayList<SearchResultRow> searchResultRows = new ArrayList<>();
public void sendEmail( String p_mail_server, String p_sender, String p_subject, String p_mail_text, String p_url, int p_file_type, int p_schedule_id, int p_time_interval, boolean p_send_attachment, int connectionTimeout) throws SQLException, ReportSQLException{
String allEmailAddr = "";
- final List<String> emailArr = new ArrayList<String>();
+ final List<String> emailArr = new ArrayList<>();
//int count1 = 0;
String schedular_email;
//v_hist_rec.file_blob = response.toString();
//v_hist_rec.file_size = v_hist_rec.file_blob.length();
- List<Object> params = new ArrayList<Object>();
- List<Integer> types = new ArrayList<Integer>();
+ List<Object> params = new ArrayList<>();
+ List<Integer> types = new ArrayList<>();
prepareHisRecUpdate(v_hist_rec, params, types);
schedulerUtil
/** Obtains user name by ID */
public static String getUserName(String userId) {
- Map<String, Long> params = new HashMap<String, Long>();
+ Map<String, Long> params = new HashMap<>();
params.put(USER_ID, new Long(userId));
List list = getDataAccessService().executeNamedQuery("getUserNameById", params, null);
}
public static String getUserEmail(String userId) {
- Map<String, Long> params = new HashMap<String, Long>();
+ Map<String, Long> params = new HashMap<>();
params.put(USER_ID, new Long(userId));
List list = getDataAccessService().executeNamedQuery("getUserEmail", params, null);
String email = "";
/** Obtains role name by ID */
public static String getRoleName(String roleId) {
- Map<String, Long> params = new HashMap<String, Long>();
+ Map<String, Long> params = new HashMap<>();
params.put("role_id", new Long(roleId));
List list = getDataAccessService().executeNamedQuery("getRoleNameById", params, null);
public static Map<Long, String> getAllRolesUsingCustomizedQuery(String customizedQuery, String param, boolean isAdmin) {
List roles = null;
- Map<Long, String> map = new LinkedHashMap<Long, String>();
+ Map<Long, String> map = new LinkedHashMap<>();
if(customizedQuery.length()>0 && !isAdmin) {
public static Set<Long> getActiveUsersRoleIds(Long userId) {
Set<Role> allActiveUserRoles = getActiveUserRoles(userId);
Iterator<Role> allActiveUserRolesIterator = allActiveUserRoles.iterator();
- Set<Long> allActiveUserRoleIds = new TreeSet<Long>();
+ Set<Long> allActiveUserRoleIds = new TreeSet<>();
while(allActiveUserRolesIterator.hasNext()){
Role role = allActiveUserRolesIterator.next();
allActiveUserRoleIds.add(role.getId());
public static Set<Long> getActiveUserRoleIds(Long userId) {
Set<Role> allActiveUserRoles = getActiveUserRoles(userId);
Iterator<Role> allActiveUserRolesIterator = allActiveUserRoles.iterator();
- Set<Long> allActiveUserRoleIds = new TreeSet<Long>();
+ Set<Long> allActiveUserRoleIds = new TreeSet<>();
while(allActiveUserRolesIterator.hasNext()){
Role role = allActiveUserRolesIterator.next();
allActiveUserRoleIds.add(role.getId());
public static Set<RoleFunction> getActiveRoleFunctions(Long userId) {
Set<Role> allActiveUserRoles = getActiveUserRoles(userId);
Iterator<Role> allActiveUserRolesIterator = allActiveUserRoles.iterator();
- Set<RoleFunction> allActiveRoleFunctions = new TreeSet<RoleFunction>();
+ Set<RoleFunction> allActiveRoleFunctions = new TreeSet<>();
while(allActiveUserRolesIterator.hasNext()){
Role role = allActiveUserRolesIterator.next();
allActiveRoleFunctions.addAll(role.getRoleFunctions());
public static Set<Role> getActiveUserRoles(Long userId) {
User user = (User)getDataAccessService().getDomainObject(User.class,userId,null);
- Set<Role> allActiveUserRoles = new TreeSet<Role>();
+ Set<Role> allActiveUserRoles = new TreeSet<>();
allActiveUserRoles.addAll(user.getRoles());
Iterator<Role> userRolesIterator = user.getRoles().iterator();
while(userRolesIterator.hasNext()){
return null;
} catch (Exception e) {
logger.error(EELFLoggerDelegate.debugLogger, ("Exception occurred..." + e.getMessage()));
- Map<String, Object> errView = new HashMap<String, Object>();
+ Map<String, Object> errView = new HashMap<>();
errView.put("error", "The requested resource was not found.");
//return new ModelAndView(getExceptionView(), "model", errView);
return null;
public @ResponseBody Map<String,String> removeSelectedReportRole(
@RequestBody String roleIdToRemove, HttpServletRequest request, HttpServletResponse response)
{
- Map<String, String> JsonResponse = new HashMap<String, String>();
+ Map<String, String> JsonResponse = new HashMap<>();
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION);
try {
JsonResponse.put("status","success");
@PathVariable("roleID") String roleId,
@RequestBody String readOnly, HttpServletRequest request, HttpServletResponse response)
{
- Map<String, String> JsonResponse = new HashMap<String, String>();
+ Map<String, String> JsonResponse = new HashMap<>();
ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION);
try {
String action ="";
int iCount = 0;
for(Iterator iter=reportUsers.iterator(); iter.hasNext(); iCount++) {
- Map<String, String> reportUserMap = new HashMap<String,String>();
+ Map<String, String> reportUserMap = new HashMap<>();
SecurityEntry rUser = (SecurityEntry) iter.next();
reportUserMapList.add(rUser);
}
wizardJSON.setDbInfo((rdef != null) ? rdef.getDBInfo() : "");
wizardJSON.setFormHelpText((rdef != null) ? rdef.getFormHelpText() : "");
wizardJSON.setPageSize((rdef != null) ? rdef.getPageSize() : 50);
- List<IdNameBooleanJSON> displayArea = new ArrayList<IdNameBooleanJSON>();
+ List<IdNameBooleanJSON> displayArea = new ArrayList<>();
IdNameBooleanJSON idNameJSON = new IdNameBooleanJSON();
String qMenu = "";
for (int i = 0; i < AppUtils.getQuickLinksMenuIDs().size(); i++) {
wizardJSON.setFrozenColumns((rdef != null) ? rdef.getFrozenColumns() : 0);
wizardJSON.setDataGridAlign((rdef != null) ? rdef.getDataGridAlign() : "left");
wizardJSON.setEmptyMessage((rdef != null) ? rdef.getEmptyMessage() : "No records found");
- List<NameBooleanJSON> displayOptions = new ArrayList<NameBooleanJSON>();
+ List<NameBooleanJSON> displayOptions = new ArrayList<>();
NameBooleanJSON nameBooleanJSON = new NameBooleanJSON();
nameBooleanJSON.setName("HideFormFields");
nameBooleanJSON.setSelected((rdef != null) ? rdef.isDisplayOptionHideForm() : false);
String schemaSql = Globals.getRemoteDbSchemaSql();
DataSet ds = null;
- ArrayList<IdNameBooleanJSON> dbInfoList = new ArrayList<IdNameBooleanJSON>();
+ ArrayList<IdNameBooleanJSON> dbInfoList = new ArrayList<>();
try {
ds = DbUtils.executeQuery(schemaSql);