You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by si...@apache.org on 2007/02/14 19:29:07 UTC
svn commit: r507650 - in /ofbiz/trunk/applications:
content/src/org/ofbiz/content/email/EmailServices.java
party/entitydef/entitymodel.xml
Author: sichen
Date: Wed Feb 14 10:29:06 2007
New Revision: 507650
URL: http://svn.apache.org/viewvc?view=rev&rev=507650
Log:
Followup to OFBIZ-704 (Add CommunicationEvent.fromString, toString, ccString, headerString)
- Adding CommunicationEvent.bccString field and logic to populate it from email headers in storeIncomingEmail service
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java
ofbiz/trunk/applications/party/entitydef/entitymodel.xml
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java?view=diff&rev=507650&r1=507649&r2=507650
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/email/EmailServices.java Wed Feb 14 10:29:06 2007
@@ -821,6 +821,7 @@
Set emailAddressesFrom = new TreeSet();
Set emailAddressesTo = new TreeSet();
Set emailAddressesCC = new TreeSet();
+ Set emailAddressesBCC = new TreeSet();
for (int x = 0 ; x < addressesFrom.length ; x++) {
emailAddressesFrom.add(((InternetAddress) addressesFrom[x]).getAddress());
}
@@ -830,13 +831,18 @@
for (int x = 0 ; x < addressesCC.length ; x++) {
emailAddressesCC.add(((InternetAddress) addressesCC[x]).getAddress());
}
+ for (int x = 0 ; x < addressesBCC.length ; x++) {
+ emailAddressesBCC.add(((InternetAddress) addressesBCC[x]).getAddress());
+ }
String fromString = StringUtil.join(UtilMisc.toList(emailAddressesFrom), ",");
String toString = StringUtil.join(UtilMisc.toList(emailAddressesTo), ",");
String ccString = StringUtil.join(UtilMisc.toList(emailAddressesCC), ",");
+ String bccString = StringUtil.join(UtilMisc.toList(emailAddressesBCC), ",");
if (UtilValidate.isNotEmpty(toString)) commEventMap.put("toString", toString);
if (UtilValidate.isNotEmpty(ccString)) commEventMap.put("ccString", ccString);
if (UtilValidate.isNotEmpty(ccString)) commEventMap.put("fromString", fromString);
+ if (UtilValidate.isNotEmpty(bccString)) commEventMap.put("bccString", bccString);
// store from/to parties, but when not found make a note of the email to/from address in the workEffort Note Section.
String commNote = "";
Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?view=diff&rev=507650&r1=507649&r2=507650
==============================================================================
--- ofbiz/trunk/applications/party/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Wed Feb 14 10:29:06 2007
@@ -513,6 +513,7 @@
<field name="fromString" type="very-long"></field>
<field name="toString" type="very-long"></field>
<field name="ccString" type="very-long"></field>
+ <field name="bccString" type="very-long"></field>
<prim-key field="communicationEventId"/>
<relation type="one" fk-name="COM_EVNT_TYPE" rel-entity-name="CommunicationEventType">
<key-map field-name="communicationEventTypeId"/>