[jboss-svn-commits] JBL Code SVN: r33714 - labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/dao.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jul 1 05:27:47 EDT 2010
Author: lkrzyzanek
Date: 2010-07-01 05:27:47 -0400 (Thu, 01 Jul 2010)
New Revision: 33714
Modified:
labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/dao/NukesUserMapper.java
Log:
Added INTEREST_IN_JBOSS field
Modified: labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/dao/NukesUserMapper.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/dao/NukesUserMapper.java 2010-07-01 09:08:16 UTC (rev 33713)
+++ labs/jbosslabs/labs-3.0-build/integration/sbs-nukesauthentication/trunk/src/main/java/org/jboss/labs/sbs/plugin/nukesauth/dao/NukesUserMapper.java 2010-07-01 09:27:47 UTC (rev 33714)
@@ -77,6 +77,8 @@
public static final long CONTACTED = 5003;
+ public static final long INTEREST_IN_JBOSS = 5025;
+
private static Map<Long, Map<String, String>> profileDict;
static {
@@ -103,6 +105,8 @@
"(GMT +10:00 hours) EAST(East Australian Standard)", "46",
"(GMT +11:00 hours) Magadan, Solomon Islands, New Caledonia", "48",
"(GMT +12:00 hours) Auckland, Wellington, Fiji, Kamchatka, Marshall Island");
+ addDict(INTEREST_IN_JBOSS, "evaluating", "Evaluating", "development", "Development", "deployment", "Production",
+ "other", null);
}
private static void addDict(Long field, String... fields) {
@@ -140,12 +144,6 @@
return null;
}
- // profile.put(ADDRESS, "street1:" + rs.getString("pn_street") +
- // ",street2:,city:" + rs.getString("pn_city")
- // + ",state:" + rs.getString("pn_state") + ",country:" +
- // rs.getString("pn_country") + ",zip:"
- // + rs.getString("pn_zip") + ",type:WORK");
-
String address = sbsAddress;
if (address.endsWith(",type:WORK")) {
address = sbsAddress.substring(0, address.indexOf(",type:WORK"));
@@ -165,9 +163,8 @@
Map<Long, String> newProfile = new HashMap<Long, String>();
for (Long key : profile.keySet()) {
- String translatedField;
- if (profileDict.get(key) != null && ((translatedField = profileDict.get(key).get(profile.get(key))) != null)) {
-
+ if (profileDict.containsKey(key)) {
+ String translatedField = profileDict.get(key).get(profile.get(key));
newProfile.put(key, translatedField);
} else {
newProfile.put(key, profile.get(key));
@@ -264,9 +261,11 @@
profile.put(TYPE_OF_COMPANY, rs.getString("pn_usertype"));
- profile.put(ADDRESS, "street1:" + rs.getString("pn_street") + ",street2:,city:" + rs.getString("pn_city")
- + ",state:" + rs.getString("pn_state") + ",country:" + rs.getString("pn_country") + ",zip:"
- + rs.getString("pn_zip") + ",type:WORK");
+ profile.put(
+ ADDRESS,
+ "street1:" + rs.getString("pn_street") + ",street2:,city:" + rs.getString("pn_city") + ",state:"
+ + rs.getString("pn_state") + ",country:" + rs.getString("pn_country") + ",zip:" + rs.getString("pn_zip")
+ + ",type:WORK");
profile.put(CLICK_HERE_FOR_JBOSS_NEWSLETTER, rs.getString("pn_newsletter"));
@@ -276,6 +275,8 @@
profile.put(OPT_OUT, rs.getString("pn_salescontact"));
+ profile.put(INTEREST_IN_JBOSS, rs.getString("pn_interestinjboss"));
+
Map<Long, String> profileIt = new HashMap<Long, String>(profile);
// remove all null values associated to keys
More information about the jboss-svn-commits
mailing list