{"id":24572,"date":"2024-02-15T14:53:34","date_gmt":"2024-02-15T22:53:34","guid":{"rendered":"https:\/\/docs.extraview.com\/v25\/book\/ucmaillistupdate-1\/"},"modified":"2024-02-15T14:53:34","modified_gmt":"2024-02-15T22:53:34","slug":"ucmaillistupdate-1","status":"publish","type":"page","link":"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/","title":{"rendered":"ucMailListUpdate"},"content":{"rendered":"<h3>\n\tPurpose<\/h3>\n<p>This exit allows modification or replacement of the Mailing List that is created by ExtraView.<\/p>\n<h3>\n\tApplies To<\/h3>\n<p><em>Add Issue<\/em> screen<\/p>\n<h3>\n\tSignature<\/h3>\n<pre class=\"code\">\r\n<code>public java.util.ArrayList ucMailListUpdate(\r\n      java.sql.Connection dbcon, \r\n      java.lang.String problemId, \r\n      Problem prob, \r\n      SesameSession session, \r\n      java.util.ArrayList mailList, \r\n      ProblemFormParam pfp)<\/code>\r\n<\/pre>\n<h3>\n\tNotes<\/h3>\n<p>It should return an ArrayList of MailList Objects. If null is returned then the normal Notification Mailing List will be generated.<\/p>\n<h3>\n\tExample<\/h3>\n<pre class=\"code\">\r\n<code>public ArrayList ucMailListUpdate (Connection con,\r\n                                       String itemId,\r\n                                       Problem item,\r\n                                       SesameSession session,\r\n                                       ArrayList mailList,\r\n                                       ProblemFormParam values)  {\r\n        \/\/ NOTE: THE VALUES PARAMETER SEEMS TO BE EMPTY OR CONTAIN JUST ccMail\r\n        String requestReview = values.getString(\"REQUEST_REVIEW\");\r\n        String addendumAlert = values.getString(\"ADDENDUM_ALERT\");\r\n        String areaId = values.getString(\"AREA\");\r\n        String projectId = getProjectId(values);\r\n\r\n        \/\/ THEREFORE, GET FIELDS FROM RECORD SAVED IN DATABASE\r\n        ArrayList udfs = Problem_UDF.getReference(con, itemId);\r\n\r\n        for (int i = 0; i &lt; udfs.size(); i++) {\r\n            Problem_UDF pudf = (Problem_UDF) udfs.get(i);\r\n            String name = pudf.getName();\r\n\r\n            if (\"REQUEST_REVIEW\".equals(name) )\r\n                requestReview = pudf.getUdfListId();\r\n            if (\"ADDENDUM_ALERT\".equals(name) )\r\n                addendumAlert = pudf.getUdfListId();\r\n        }\r\n\r\n        if (item != null) {\r\n            areaId = item.getAreaId();\r\n            projectId = item.getProjctId();\r\n        }\r\n        \r\n        \/\/ if Request Review or Addendum Alert is On, then add project Coordinators\r\n        \/\/ and backup Coordinators to mailing list\r\n        if (REQUEST_REVIEW__ON.equals(requestReview) \r\n         || ADDENDUM_ALERT__ON.equals(addendumAlert) ) {\r\n            String projectTitle = getProjectTitle(con, areaId, projectId);\r\n            String projectAdminId = getProjectAdminId(con, projectTitle);\r\n            ArrayList coordinators = getProjectUsers(con, \r\n                          projectAdminId, \r\n                          \"COORDINATORS\");\r\n            String usersList = \"\";\r\n\r\n            for (int i = 0; i &lt; coordinators.size(); i++) {\r\n                String user = (String) coordinators.get(i);\r\n                usersList += user + \";\";\r\n            }\r\n\r\n            Z.log.writeToLog(Z.log.INFO, \r\n             \" Request Review\/Addendum Alert is On, so send email to coordinators: \" \r\n              + coordinators;\r\n\r\n            ArrayList backupCoordinators = getProjectUsers(con, \r\n                      projectAdminId, \r\n                      \"BACKUP_COORDINATORS\");\r\n\r\n            for (int i = 0; i &lt; backupCoordinators.size(); i++) {\r\n                String user = (String) backupCoordinators.get(i);\r\n                usersList += user + \";\";\r\n            }\r\n\r\n            Z.log.writeToLog(Z.log.INFO, \r\n            \"Request Review\/Addendum Alert is On, so send email-backup coordinators: \" \r\n             + backupCoordinators);\r\n\r\n            \/\/ also, add project Translators to mailing list when Request Review is On\r\n            if (REQUEST_REVIEW__ON.equals(requestReview) ) {\r\n                ArrayList translators = getProjectUsers(con, \r\n                         projectAdminId, \r\n                         \"TRANSLATORS\");\r\n\r\n                for (int i = 0; i &lt; translators.size(); i++) {\r\n                    String user = (String) translators.get(i);\r\n                    usersList += user + \";\";\r\n                }\r\n\r\n                Z.log.writeToLog(Z.log.INFO, \r\n                    \"Request Review is On, so send email to translators: \" \r\n                     + translators);\r\n            }\r\n\r\n            Pr_Notify prNotify = new Pr_Notify(con, session);\r\n            ArrayList newMailList = prNotify.getCCMailList(usersList);\r\n\r\n            for (int i = 0; i &lt; newMailList.size(); i++) {\r\n                mailList.add(newMailList.get(i) );\r\n            }\r\n        }\r\n        return mailList;\r\n    }\r\n    \/**\r\n     * NOTE: This method is called by base code (instead of ucMailListUpdate), so\r\n     * re-directing to new method name implemented above.\r\n     *\/\r\n    public ArrayList replaceMailList (Connection dbcon,\r\n                                      String problemId,\r\n                                      Problem prob,\r\n                                      SesameSession session,\r\n                                      ArrayList mailList,\r\n                                      ProblemFormParam pfp) {\r\n        return ucMailListUpdate(dbcon, problemId, prob, session, mailList, pfp);\r\n    }<\/code>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Purpose This exit allows modification or replacement of the Mailing List that is created by ExtraView. Applies To Add Issue screen Signature public java.util.ArrayList ucMailListUpdate( java.sql.Connection dbcon, java.lang.String problemId, Problem prob, SesameSession session, java.util.ArrayList mailList, ProblemFormParam pfp) Notes It should return an ArrayList of MailList Objects. If null is returned then the normal Notification Mailing&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":24510,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_lmt_disableupdate":"","_lmt_disable":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"class_list":["post-24572","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ucMailListUpdate - Product Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ucMailListUpdate - Product Documentation\" \/>\n<meta property=\"og:description\" content=\"Purpose This exit allows modification or replacement of the Mailing List that is created by ExtraView. Applies To Add Issue screen Signature public java.util.ArrayList ucMailListUpdate( java.sql.Connection dbcon, java.lang.String problemId, Problem prob, SesameSession session, java.util.ArrayList mailList, ProblemFormParam pfp) Notes It should return an ArrayList of MailList Objects. If null is returned then the normal Notification Mailing...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/\" \/>\n<meta property=\"og:site_name\" content=\"Product Documentation\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/\",\"url\":\"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/\",\"name\":\"ucMailListUpdate - Product Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/docs.extraview.com\/v25\/#website\"},\"datePublished\":\"2024-02-15T22:53:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/docs.extraview.com\/v25\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ExtraView 25\",\"item\":\"https:\/\/docs.extraview.com\/v25\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"User Custom Guide\",\"item\":\"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Java Interface\",\"item\":\"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"User Custom Methods\",\"item\":\"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/\"},{\"@type\":\"ListItem\",\"position\":6,\"name\":\"ucMailListUpdate\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/docs.extraview.com\/v25\/#website\",\"url\":\"https:\/\/docs.extraview.com\/v25\/\",\"name\":\"ExtraView Product Documentation\",\"description\":\"ExtraView Documentation\",\"publisher\":{\"@id\":\"https:\/\/docs.extraview.com\/v25\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/docs.extraview.com\/v25\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/docs.extraview.com\/v25\/#organization\",\"name\":\"ExtraView Corporation\",\"url\":\"https:\/\/docs.extraview.com\/v25\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/docs.extraview.com\/v25\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/docs-stg.extraview.com\/wp-content\/uploads\/2024\/03\/favicon.png\",\"contentUrl\":\"https:\/\/docs-stg.extraview.com\/wp-content\/uploads\/2024\/03\/favicon.png\",\"width\":512,\"height\":512,\"caption\":\"ExtraView Corporation\"},\"image\":{\"@id\":\"https:\/\/docs.extraview.com\/v25\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ucMailListUpdate - Product Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/","og_locale":"en_US","og_type":"article","og_title":"ucMailListUpdate - Product Documentation","og_description":"Purpose This exit allows modification or replacement of the Mailing List that is created by ExtraView. Applies To Add Issue screen Signature public java.util.ArrayList ucMailListUpdate( java.sql.Connection dbcon, java.lang.String problemId, Problem prob, SesameSession session, java.util.ArrayList mailList, ProblemFormParam pfp) Notes It should return an ArrayList of MailList Objects. If null is returned then the normal Notification Mailing...","og_url":"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/","og_site_name":"Product Documentation","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/","url":"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/","name":"ucMailListUpdate - Product Documentation","isPartOf":{"@id":"https:\/\/docs.extraview.com\/v25\/#website"},"datePublished":"2024-02-15T22:53:34+00:00","breadcrumb":{"@id":"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/ucmaillistupdate-1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/docs.extraview.com\/v25\/"},{"@type":"ListItem","position":2,"name":"ExtraView 25","item":"https:\/\/docs.extraview.com\/v25\/"},{"@type":"ListItem","position":3,"name":"User Custom Guide","item":"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/"},{"@type":"ListItem","position":4,"name":"Java Interface","item":"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/"},{"@type":"ListItem","position":5,"name":"User Custom Methods","item":"https:\/\/docs.extraview.com\/v25\/extraview-25\/user-custom-guide-1\/java-interface-1\/user-custom-methods-1\/"},{"@type":"ListItem","position":6,"name":"ucMailListUpdate"}]},{"@type":"WebSite","@id":"https:\/\/docs.extraview.com\/v25\/#website","url":"https:\/\/docs.extraview.com\/v25\/","name":"ExtraView Product Documentation","description":"ExtraView Documentation","publisher":{"@id":"https:\/\/docs.extraview.com\/v25\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/docs.extraview.com\/v25\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/docs.extraview.com\/v25\/#organization","name":"ExtraView Corporation","url":"https:\/\/docs.extraview.com\/v25\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/docs.extraview.com\/v25\/#\/schema\/logo\/image\/","url":"https:\/\/docs-stg.extraview.com\/wp-content\/uploads\/2024\/03\/favicon.png","contentUrl":"https:\/\/docs-stg.extraview.com\/wp-content\/uploads\/2024\/03\/favicon.png","width":512,"height":512,"caption":"ExtraView Corporation"},"image":{"@id":"https:\/\/docs.extraview.com\/v25\/#\/schema\/logo\/image\/"}}]}},"taxonomy_info":[],"featured_image_src_large":false,"author_info":{"display_name":"carl.koppel","author_link":"https:\/\/docs.extraview.com\/v25\/author\/carl-koppel\/"},"comment_info":0,"_links":{"self":[{"href":"https:\/\/docs.extraview.com\/v25\/wp-json\/wp\/v2\/pages\/24572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.extraview.com\/v25\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.extraview.com\/v25\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.extraview.com\/v25\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.extraview.com\/v25\/wp-json\/wp\/v2\/comments?post=24572"}],"version-history":[{"count":0,"href":"https:\/\/docs.extraview.com\/v25\/wp-json\/wp\/v2\/pages\/24572\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/docs.extraview.com\/v25\/wp-json\/wp\/v2\/pages\/24510"}],"wp:attachment":[{"href":"https:\/\/docs.extraview.com\/v25\/wp-json\/wp\/v2\/media?parent=24572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}