Ticket #1000: telefones-1.patch
File telefones-1.patch, 29.3 KB (added by lucas.dacosta, 14 years ago) |
---|
-
src/main/java/br/com/prognus/psync/items/dao/PIMContactDAO.java
27 27 import java.sql.Timestamp; 28 28 import java.text.SimpleDateFormat; 29 29 import java.util.ArrayList; 30 import java.util.HashMap; 30 31 import java.util.List; 32 import java.util.Map; 31 33 32 34 import br.com.prognus.psync.exception.PIMDBAccessException; 33 35 import br.com.prognus.psync.items.model.ContactWrapper; … … 35 37 import br.com.prognus.psync.util.Def; 36 38 import br.com.prognus.psync.util.TypeAddress; 37 39 38 import com.funambol.common.pim.common.Property;39 40 import com.funambol.common.pim.contact.Address; 40 41 import com.funambol.common.pim.contact.BusinessDetail; 41 42 import com.funambol.common.pim.contact.Contact; … … 62 63 63 64 private static final String SQL_GET_CONTACT_BY_ID_USER = "SELECT id_contact, id_owner, last_update, last_status, given_names, family_names, birthdate, category, photo, notes, alias FROM phpgw_cc_contact WHERE id_contact = ? AND id_owner = ? LIMIT 1"; 64 65 65 private static final String SQL_GET_CONTACT_ITEM_BY_ID = "SELECT connection_ name, connection_value, id_typeof_contact_connection FROM phpgw_cc_connections AS CO LEFT JOIN phpgw_cc_contact_conns AS CC ON CO.id_connection = CC.id_connection WHERE id_contact = ?";66 private static final String SQL_GET_CONTACT_ITEM_BY_ID = "SELECT connection_is_default, connection_name, connection_value, id_typeof_contact_connection FROM phpgw_cc_connections AS CO LEFT JOIN phpgw_cc_contact_conns AS CC ON CO.id_connection = CC.id_connection WHERE id_contact = ?"; 66 67 67 68 private static final String SQL_GET_STATUS_BY_ID_USER_TIME = "SELECT last_status FROM phpgw_cc_contact WHERE id_contact = ? AND id_owner = ? AND last_update > ? LIMIT 1 "; 68 69 … … 88 89 private static final String SQL_ID_MAX_CONNECTIONS = "select max(id_connection) from phpgw_cc_connections"; 89 90 90 91 private static final String SQL_INSERT_INTO_FNBL_CONNECTIONS = "INSERT INTO phpgw_cc_contact_conns (id_contact, id_connection, id_typeof_contact_connection) VALUES (?, ?, ?)"; 92 93 private static final String SQL_UPDATE_INTO_FNBL_CONNECTIONS = "UPDATE phpgw_cc_connections SET connection_is_default = ? where id_connection = ?"; 91 94 92 95 private static final String SQL_UPDATE_FNBL_PIM_CONTACT_BEGIN = "UPDATE phpgw_cc_contact SET "; 93 96 … … 211 214 protected static final String SQL_FIELD_STATE_ID = "id_state"; 212 215 213 216 protected static final String SQL_FIELD_CITY_ID = "id_city"; 217 218 protected static final String SQL_FIELD_CON_IS_DEFAULT = "connection_is_default"; 214 219 215 220 private Sync4jPrincipal principal = null; 216 221 … … 432 437 } 433 438 434 439 // phones 435 i f (!phones.isEmpty()) {440 id_connection = insetPhones(phones, con, id_connection, id_contact); 436 441 437 Boolean type_phone = true;438 439 for (int i = 0, l = phones.size(); i < l; i++) {440 441 phone = phones.get(i);442 phoneType = phone.getPhoneType();443 444 if ((FIELD_PRIMARY_TELEPHONE_NUMBER).equals(phoneType)) {445 type = TYPE_PRIMARY_TELEPHONE_NUMBER;446 } else if ((FIELD_HOME_TELEPHONE_NUMBER).equals(phoneType)) {447 type = TYPE_HOME_TELEPHONE_NUMBER;448 } else if ((FIELD_MOBILE_TELEPHONE_NUMBER)449 .equals(phoneType)) {450 type = TYPE_MOBILE_TELEPHONE_NUMBER;451 } else if ((FIELD_BUSINESS_TELEPHONE_NUMBER)452 .equals(phoneType)) {453 type = TYPE_BUSINESS_TELEPHONE_NUMBER;454 } else if ((FIELD_BUSINESS_FAX_NUMBER).equals(phoneType)) {455 type = TYPE_BUSINESS_FAX_NUMBER;456 } else if ((FIELD_PAGER_NUMBER).equals(phoneType)) {457 type = TYPE_PAGER_NUMBER;458 } else {459 continue; // Unknown property: saves nothing460 }461 462 String phoneValue = phone.getPropertyValueAsString();463 464 if (phoneValue != null && phoneValue.length() != 0) {465 466 if (phoneValue.length() > SQL_PHONE_DIM) {467 phoneValue = phoneValue.substring(0, SQL_PHONE_DIM);468 }469 470 ps = con.prepareStatement(SQL_ID_MAX_CONNECTIONS);471 rs = ps.executeQuery();472 473 if (rs.next()) {474 long id = rs.getInt(1);475 id_connection = (id == 0) ? 1 : ++id;476 }477 478 // Insere os telefones do contato na tabela479 // phpgw_cc_connections480 ps = con.prepareStatement(SQL_INSERT_INTO_CONTACT_ITEM);481 ps.setLong(1, id_connection);482 ps.setString(2, type);483 ps.setString(3, phoneValue);484 ps.setBoolean(4, type_phone);485 ps.executeUpdate();486 487 type_phone = false; // os demais telefones serao setados488 // como nao padrao489 490 // Insere as referencias de telefones do contato na491 // tabela phpgw_cc_connections492 ps = con493 .prepareStatement(SQL_INSERT_INTO_FNBL_CONNECTIONS);494 ps.setLong(1, id_contact);495 ps.setLong(2, id_connection);496 ps.setLong(3, 2);497 ps.executeUpdate();498 }499 500 }501 }502 503 442 con.commit(); 504 443 con.setAutoCommit(true); 505 444 … … 539 478 BusinessDetail businessDetail = null; 540 479 541 480 Name name = null; 542 Phone phone = null;543 481 Email email = null; 544 482 String type = null; 545 483 … … 768 706 ps.setLong(1, id_contact); 769 707 ps.executeUpdate(); 770 708 771 if (!phones.isEmpty()) { 709 710 id_connection = insetPhones(phones, con, id_connection, id_contact); 772 711 773 boolean type_fone = true; // Seta o primeiro telefone como774 // principal no expresso775 776 for (int i = 0, l = phones.size(); i < l; i++) {777 778 phone = phones.get(i);779 phoneType = phone.getPhoneType();780 781 if ((FIELD_PRIMARY_TELEPHONE_NUMBER).equals(phoneType)) {782 type = TYPE_PRIMARY_TELEPHONE_NUMBER;783 } else if ((FIELD_HOME_TELEPHONE_NUMBER).equals(phoneType)) {784 type = TYPE_HOME_TELEPHONE_NUMBER;785 } else if ((FIELD_MOBILE_TELEPHONE_NUMBER)786 .equals(phoneType)) {787 type = TYPE_MOBILE_TELEPHONE_NUMBER;788 } else if ((FIELD_BUSINESS_TELEPHONE_NUMBER)789 .equals(phoneType)) {790 type = TYPE_BUSINESS_TELEPHONE_NUMBER;791 } else if ((FIELD_BUSINESS_FAX_NUMBER).equals(phoneType)) {792 type = TYPE_BUSINESS_FAX_NUMBER;793 } else if ((FIELD_PAGER_NUMBER).equals(phoneType)) {794 type = TYPE_PAGER_NUMBER;795 } else {796 continue; // Unknown property: saves nothing797 }798 799 String phoneValue = phone.getPropertyValueAsString();800 phoneValue = truncate(phoneValue, SQL_EMAIL_DIM);801 802 if (phoneValue != null && phoneValue.length() != 0) {803 804 // Verifica o id maximo da tabela phpgw_cc_connections805 ps = con.prepareStatement(SQL_ID_MAX_CONNECTIONS);806 rs = ps.executeQuery();807 808 if (rs.next()) {809 long id = rs.getInt(1);810 id_connection = (id == 0) ? 1 : ++id;811 }812 813 // Insere os telefones do contato na tabela814 // phpgw_cc_connections815 ps = con.prepareStatement(SQL_INSERT_INTO_CONTACT_ITEM);816 ps.setLong(1, id_connection);817 ps.setString(2, type);818 ps.setString(3, phoneValue);819 ps.setBoolean(4, type_fone);820 ps.executeUpdate();821 822 type_fone = false; // os demais telefones serao setados823 // como nao padrao824 825 // Insere as referencias de telefones do contato na826 // tabela phpgw_cc_connections827 ps = con828 .prepareStatement(SQL_INSERT_INTO_FNBL_CONNECTIONS);829 ps.setLong(1, id_contact);830 ps.setLong(2, id_connection);831 ps.setLong(3, 2);832 ps.executeUpdate();833 }834 }835 }836 837 712 838 713 // endereco 839 714 boolean syncAddress = true; … … 856 731 Address address = null; 857 732 boolean defaultAddress = false; 858 733 859 // se ambos sao nulos n ão faz nada aqui734 // se ambos sao nulos nï¿œo faz nada aqui 860 735 if (persoAddress == null && businAddress == null) { 861 736 break; 862 737 } … … 934 809 } 935 810 936 811 812 private Long insetPhones(List<Phone> phones, Connection con, Long id_connection, Long id_contact) throws Exception { 813 Phone phone = null; 814 815 PreparedStatement ps = null; 816 ResultSet rs = null; 817 818 if (!phones.isEmpty()) { 819 820 Phone defaultPhone = null; 821 822 for (int i = 0, l = phones.size(); i < l; i++) { 823 824 phone = phones.get(i); 825 // from "Home2TelephoneNumber" to "Telefone Residencial" 826 String type = getNameofPhone(phone.getPhoneType()); 827 828 String phoneValue = phone.getPropertyValueAsString(); 829 phoneValue = truncate(phoneValue, SQL_EMAIL_DIM); 830 831 if(type.equals("PrimaryTelephoneNumber")) { 832 defaultPhone = new Phone(); 833 defaultPhone.setPropertyType(phone.getPropertyType()); 834 defaultPhone.setPropertyValue(phone.getPropertyValue()); 835 continue; // o default sera setado no final do for 836 } 837 838 if (phoneValue != null && phoneValue.length() != 0) { 839 840 // Verifica o id maximo da tabela phpgw_cc_connections 841 ps = con.prepareStatement(SQL_ID_MAX_CONNECTIONS); 842 rs = ps.executeQuery(); 843 844 if (rs.next()) { 845 long id = rs.getInt(1); 846 id_connection = (id == 0) ? 1 : ++id; 847 } 848 849 // Insere os telefones do contato na tabela 850 // phpgw_cc_connections 851 ps = con.prepareStatement(SQL_INSERT_INTO_CONTACT_ITEM); 852 ps.setLong(1, id_connection); 853 ps.setString(2, type); 854 ps.setString(3, phoneValue); 855 ps.setBoolean(4, false); 856 ps.executeUpdate(); 857 858 // Insere as referencias de telefones do contato na 859 // tabela phpgw_cc_connections 860 ps = con 861 .prepareStatement(SQL_INSERT_INTO_FNBL_CONNECTIONS); 862 ps.setLong(1, id_contact); 863 ps.setLong(2, id_connection); 864 ps.setLong(3, 2); 865 ps.executeUpdate(); 866 } 867 } 868 // compara o defaultPhone com os outros Phones 869 if(defaultPhone!=null) { 870 for (Phone phone1: phones) { 871 // precisa procurar entre todos os telefones para saber 872 // qual numero eh o mesmo numero que esta em PrimaryTelephoneNumber 873 if(phone1.getPropertyValue().equals(defaultPhone.getPropertyValue())) { 874 // update no phone setando a propriedade is_default para true 875 ps = con.prepareStatement(SQL_UPDATE_INTO_FNBL_CONNECTIONS); 876 ps.setBoolean(1, true); 877 ps.setLong(2, id_connection); 878 ps.executeUpdate(); 879 break; 880 } 881 } 882 } 883 } 884 return id_connection;// sequencia da chave da tabela do banco de dados 885 } 886 887 937 888 private long searchStateId(Connection con, String stateName, String idCountry) throws Exception { 938 889 939 890 PreparedStatement ps = null; … … 1275 1226 } 1276 1227 1277 1228 1278 private staticvoid addAddress(Address address, ResultSet rs) throws Exception {1229 private void addAddress(Address address, ResultSet rs) throws Exception { 1279 1230 1280 1231 ResultSetMetaData rsmd = rs.getMetaData(); 1281 1232 … … 1477 1428 * @throws java.sql.SQLException 1478 1429 * @throws NotFoundException 1479 1430 */ 1480 private staticContactWrapper createContact(String wrapperId, ResultSet rs)1431 private ContactWrapper createContact(String wrapperId, ResultSet rs) 1481 1432 throws SQLException, NotFoundException { 1482 1433 1483 1434 if (!rs.next()) { … … 1571 1522 * @return the ContactWrapper object with extra information attached 1572 1523 * @throws java.sql.SQLException 1573 1524 */ 1574 private staticContactWrapper addPIMContactItems(ContactWrapper cw,1525 private ContactWrapper addPIMContactItems(ContactWrapper cw, 1575 1526 ResultSet rs) throws SQLException { 1576 1527 1577 1528 ResultSetMetaData rsmd = rs.getMetaData(); … … 1586 1537 1587 1538 Phone phone; 1588 1539 Email email; 1540 1541 Map<String, Phone> mapPhones = new HashMap<String, Phone>(); 1589 1542 1590 1543 while (rs.next()) { 1591 1544 1592 1545 columnCount = rsmd.getColumnCount(); 1593 1546 1547 boolean isDefault = false; 1548 1594 1549 for (int i = 1; i <= columnCount; ++i) { 1595 1550 1596 1551 column = rsmd.getColumnName(i); … … 1601 1556 value = rs.getString(i); 1602 1557 } else if (SQL_FIELD_ITEM_TYPE.equalsIgnoreCase(column)) { 1603 1558 type = rs.getString(i); 1559 } else if (SQL_FIELD_CON_IS_DEFAULT.equalsIgnoreCase(column)) { 1560 isDefault = rs.getBoolean(i); 1604 1561 } else { 1605 1562 throw new SQLException("\n=> Unhandled column: " + column); 1606 1563 } … … 1622 1579 } 1623 1580 1624 1581 if (type.equals("2")) { // telefone 1625 1626 if (TYPE_PRIMARY_TELEPHONE_NUMBER.equalsIgnoreCase(name)) { 1627 phone = new Phone(); 1628 phone.setPhoneType(FIELD_PRIMARY_TELEPHONE_NUMBER); 1629 phone.setPropertyValue(value); 1582 1583 // name from "Celular" to "MobileTelephoneNumber" 1584 String idType = getIdofPhone(name); 1585 1586 for (int i=2; mapPhones.containsKey(idType); i++) { 1587 // from "MobileTelephoneNumber" to "MobileiTelephoneNumber" , where i in (2,+] 1588 idType = idType.replaceAll("[0-9]", ""); 1589 idType = getPlusIdofPhone(idType, i); 1590 } 1591 1592 phone = new Phone(); 1593 phone.setPhoneType(idType); 1594 phone.setPropertyValue(value); 1595 1596 // TODO: arrumar quando o telefone eh default no BD para enviar pro Celular 1597 // if(isDefault) { 1598 // Phone phoneDefault = new Phone(); 1599 // phoneDefault.setPropertyType("PrimaryTelephoneNumber"); 1600 // phoneDefault.setPropertyValue(value); 1601 // c.getPersonalDetail().addPhone(phoneDefault); 1602 // } 1603 1604 if(type.matches(".*Business.*")) { 1630 1605 c.getBusinessDetail().addPhone(phone); 1631 } else if (TYPE_HOME_TELEPHONE_NUMBER.equalsIgnoreCase(name)) {1632 phone = new Phone();1633 phone.setPhoneType(FIELD_HOME_TELEPHONE_NUMBER);1634 phone.setPropertyValue(value);1635 c.getPersonalDetail().addPhone(phone);1636 } else if (TYPE_MOBILE_TELEPHONE_NUMBER.equalsIgnoreCase(name)) {1637 phone = new Phone();1638 phone.setPhoneType(FIELD_MOBILE_TELEPHONE_NUMBER);1639 phone.setPropertyValue(value);1640 c.getPersonalDetail().addPhone(phone);1641 } else if (TYPE_BUSINESS_TELEPHONE_NUMBER1642 .equalsIgnoreCase(name)) {1643 phone = new Phone();1644 phone.setPhoneType(FIELD_BUSINESS_TELEPHONE_NUMBER);1645 phone.setPropertyValue(value);1646 c.getBusinessDetail().addPhone(phone);1647 } else if (TYPE_BUSINESS_FAX_NUMBER.equalsIgnoreCase(name)) {1648 phone = new Phone();1649 phone.setPhoneType(FIELD_BUSINESS_FAX_NUMBER);1650 phone.setPropertyValue(value);1651 c.getBusinessDetail().addPhone(phone);1652 } else if (TYPE_PAGER_NUMBER.equalsIgnoreCase(name)) {1653 phone = new Phone();1654 phone.setPhoneType(FIELD_PAGER_NUMBER);1655 phone.setPropertyValue(value);1656 c.getBusinessDetail().addPhone(phone);1657 1606 } 1607 c.getPersonalDetail().addPhone(phone); 1608 mapPhones.put(idType, phone);// just to control repetition of type 1609 1658 1610 } 1659 1611 } 1612 1660 1613 1661 1614 return cw; 1662 1615 } 1616 1617 static Map<String,String> phoneType = new HashMap<String, String>(); 1618 static { 1619 phoneType.put("Celular", "MobileTelephoneNumber"); 1620 phoneType.put("Celular Residencial", "MobileHomeTelephoneNumber"); 1621 phoneType.put("Celular Comercial", "MobileBusinessTelephoneNumber"); 1622 phoneType.put("Telefone", "OtherTelephoneNumber"); 1623 phoneType.put("Telefone Residencial", "HomeTelephoneNumber"); 1624 phoneType.put("Telefone Comercial", "BusinessTelephoneNumber"); 1625 phoneType.put("Fax", "OtherFaxNumber"); 1626 phoneType.put("Fax Residencial", "HomeFaxNumber"); 1627 phoneType.put("Fax Comercial", "BusinessFaxNumber"); 1628 phoneType.put("Telefone Carro", "CarTelephoneNumber"); 1629 phoneType.put("Pager", "PagerNumber"); 1630 phoneType.put("Padrao", "PrimaryTelephoneNumber"); 1631 } 1632 1633 static public String getIdofPhone(String s) { 1634 return phoneType.get(s); 1635 } 1636 1637 static public String getNameofPhone(String s) { 1638 s = s.replaceAll("[0-9]", ""); 1639 for (String pt : phoneType.keySet()) { 1640 if(phoneType.get(pt).equals(s)) { 1641 return pt; 1642 } 1643 } 1644 return s; 1645 } 1646 1647 static public String getPlusIdofPhone(String s, int i) { 1648 return s.replaceAll("(.*)([A-Z][a-z]*)Number","$1"+i+"$2Number"); 1649 } 1663 1650 1664 1651 /** 1665 1652 * Retrieves the UID list of the contacts belonging to the user filtered -
src/main/java/com/funambol/server/security/LdapUserProvisioningOfficer.java
72 72 import javax.naming.directory.SearchControls; 73 73 import javax.naming.directory.SearchResult; 74 74 75 import sun.util.logging.resources.logging;76 75 76 77 77 import com.funambol.email.console.dao.ConsoleDAO; 78 78 import com.funambol.email.exception.DBAccessException; 79 79 import com.funambol.email.exception.InboxListenerConfigException; … … 376 376 return null; 377 377 } 378 378 } else { 379 if (log.isTraceEnabled()) { 380 log.trace(username+" to User '" + objLdap.getUid() + "' found"); 381 } 382 // Check the roles 383 // 384 if (isASyncUser(user)) { 385 // 386 // User authenticated 387 if (log.isTraceEnabled()) { 388 log.trace("User is a SyncUser"); 389 } 390 } else { 391 // User not authenticated 392 // 393 if (log.isTraceEnabled()) { 394 log.trace("The user is not a '" + ROLE_USER + "'"); 395 } 379 try { 380 updateUser(user, password); 381 if (log.isTraceEnabled()) { 382 log.trace(username + " to User '" + objLdap.getUid() 383 + "' found"); 384 } 385 // Check the roles 386 // 387 if (isASyncUser(user)) { 388 // 389 // User authenticated 390 if (log.isTraceEnabled()) { 391 log.trace("User is a SyncUser"); 392 } 393 } else { 394 // User not authenticated 395 // 396 if (log.isTraceEnabled()) { 397 log.trace("The user is not a '" + ROLE_USER + "'"); 398 } 399 return null; 400 } 401 } catch (Exception e) { 402 log.error("Error inserting a new user", e); 396 403 return null; 397 404 } 398 405 } 399 406 400 407 // … … 435 442 userManager.insertUser(user); 436 443 return user; 437 444 } 445 446 /** 447 * Update user with the given username and password 448 * 449 * @param userName the username 450 * @param password the password 451 * 452 * @return the user 453 * 454 * @throws AdminException in case of admin errors 455 * @throws PersistentStoreException if an error occurs 456 */ 457 protected void updateUser( 458 Sync4jUser user, String password) 459 throws AdminException, PersistentStoreException { 438 460 461 user.setPassword(password); 462 user.setFirstname(objLdap.getcn()); 463 user.setRoles(new String[]{ROLE_USER}); 464 user.setEmail(objLdap.getmail()); 465 466 userManager.setUser(user); 467 } 468 439 469 /** 440 470 * Returns the principal with the given username and deviceId. 441 471 * <code>null</code> if not found -
src/main/config/Funambol.xml
1 <?xml version="1.0" encoding="UTF-8" ?> 2 <java version="1.4.2" class="java.beans.XMLDecoder"> 3 <object class="com.funambol.server.config.ServerConfiguration"> 4 <void property="engineConfiguration"> 5 <object class="com.funambol.server.config.EngineConfiguration"> 6 <void property="officer"> 7 <string>com/funambol/server/security/LdapUserProvisioningOfficer.xml</string> 8 </void> 9 <void property="serverURI"> 10 <string></string> 11 </void> 12 <void property="sessionHandler"> 13 <string>com.funambol.server.session.SyncSessionHandler</string> 14 </void> 15 <void property="strategy"> 16 <string>com/funambol/server/engine/Strategy.xml</string> 17 </void> 18 <void property="userManager"> 19 <string>com/funambol/server/admin/DBUserManager.xml</string> 20 </void> 21 <void property="minMaxMsgSize"> 22 <long>1800</long> 23 </void> 24 <void property="deviceInventory"> 25 <string>com/funambol/server/inventory/PSDeviceInventory.xml</string> 26 </void> 27 <void property="dataTransformerManager"> 28 <string>com/funambol/server/engine/transformer/DataTransformerManager.xml</string> 29 </void> 30 <void property="checkForUpdates"> 31 <boolean>true</boolean> 32 </void> 33 </object> 34 </void> 35 <void property="serverInfo"> 36 <object class="com.funambol.framework.core.DevInf"> 37 <object class="com.funambol.framework.core.VerDTD"> 38 <!-- verDTD --> 39 <string>1.2</string> 40 </object> 41 <!-- man --> 42 <string>Funambol</string> 43 <!-- mod --> 44 <string>DS Server</string> 45 <!-- oem --> 46 <string>-</string> 47 <!-- fwV --> 48 <string>-</string> 49 <!-- swV --> 50 <string>8.0.0</string> 51 <!-- hwV --> 52 <string>-</string> 53 <!-- devID --> 54 <string>funambol</string> 55 <!-- devTyp --> 56 <string>server</string> 57 <!-- utc --> 58 <boolean>true</boolean> 59 <!-- supportLargeObjs --> 60 <boolean>true</boolean> 61 <!-- supportNumberOfChanges --> 62 <boolean>true</boolean> 63 <array class="com.funambol.framework.core.DataStore" length="0"/> 64 <array class="com.funambol.framework.core.Ext" length="1"> 65 <void index="0"> 66 <object class="com.funambol.framework.core.Ext"> 67 <string>X-funambol-smartslow</string> 68 <array class="java.lang.String" length="0"/> 69 </object> 70 </void> 71 </array> 72 </object> 73 </void> 74 </object> 75 </java> -
src/main/config/email/email/FunambolEmailConnector.xml
1 <?xml version="1.0" encoding="UTF-8"?> 2 <java version="1.5.0" class="java.beans.XMLDecoder"> 3 4 <object class="com.funambol.email.engine.source.EmailConnectorConfig"> 5 6 <void property="dataSource"> 7 <string>jdbc/fnblds</string> 8 </void> 9 10 <void property="saveOnlyHeader"> 11 <boolean>true</boolean> 12 </void> 13 14 <!-- timeout for mail server reads (in ms) --> 15 <void property="timeoutStore"> 16 <string>300000</string> 17 </void> 18 19 <!-- timeout for mail server connection (in ms) --> 20 <void property="timeoutConnection"> 21 <string>15000</string> 22 </void> 23 24 <!-- account registry table --> 25 <void property="pushRegistryTableName"> 26 <string>fnbl_email_push_registry</string> 27 </void> 28 29 <!-- must ssl certificates be validated ? --> 30 <void property="checkCertificates"> 31 <boolean>false</boolean> 32 </void> 33 34 </object> 35 </java> -
src/main/config/email/email/email-ss/mail.xml
1 <?xml version="1.0" encoding="UTF-8"?> 2 <java version="1.5.0_04" class="java.beans.XMLDecoder"> 3 <object class="com.funambol.email.engine.source.EmailSyncSource"> 4 5 <void property="sourceURI"> 6 <string>mail</string> 7 </void> 8 9 <void property="name"> 10 <string>mail</string> 11 </void> 12 13 <void property="type"> 14 <string>application/vnd.omads-email+xml,application/vnd.omads-folder+xml</string> 15 </void> 16 17 <void property="info"> 18 <object class="com.funambol.framework.engine.source.SyncSourceInfo"> 19 20 <void property="supportedTypes"> 21 <array class="com.funambol.framework.engine.source.ContentType" length="2"> 22 <void index="0"> 23 <object class="com.funambol.framework.engine.source.ContentType"> 24 <void property="type"> 25 <string>application/vnd.omads-email+xml</string> 26 </void> 27 <void property="version"> 28 <string>1.2</string> 29 </void> 30 </object> 31 </void> 32 <void index="1"> 33 <object class="com.funambol.framework.engine.source.ContentType"> 34 <void property="type"> 35 <string>application/vnd.omads-folder+xml</string> 36 </void> 37 <void property="version"> 38 <string>1.2</string> 39 </void> 40 </object> 41 </void> 42 </array> 43 </void> <!-- supportedTypes --> 44 45 <void property="supportHierarchicalSync"> 46 <boolean>true</boolean> 47 </void> <!-- supportHierarchicalSync --> 48 49 </object> 50 </void> <!-- info --> 51 52 53 </object> 54 </java> -
src/main/config/email/email/email-ss/expresso.xml
1 <?xml version="1.0" encoding="UTF-8"?> 2 <java version="1.6.0_12" class="java.beans.XMLDecoder"> 3 <object class="com.funambol.email.engine.source.EmailSyncSource"> 4 <void property="funambolSignature"> 5 <string>Dataprev :: Mobile</string> 6 </void> 7 <void property="info"> 8 <void property="supportHierarchicalSync"> 9 <boolean>true</boolean> 10 </void> 11 </void> 12 <void property="name"> 13 <string>expresso</string> 14 </void> 15 <void property="sourceURI"> 16 <string>expresso</string> 17 </void> 18 </object> 19 </java> -
src/main/config/com/funambol/server/db/db.xml
1 <?xml version="1.0" encoding="UTF-8"?> 2 <java version="1.6.0" class="java.beans.XMLDecoder"> 3 <object class="com.funambol.server.db.DataSourceConfiguration"> 4 <void method="setProperty"> 5 <string>url</string> 6 <string>jdbc:postgresql://localhost/expresso</string> 7 </void> 8 <void method="setProperty"> 9 <string>driverClassName</string> 10 <string>org.postgresql.Driver</string> 11 </void> 12 <void method="setProperty"> 13 <string>username</string> 14 <string>funambol</string> 15 </void> 16 <void method="setProperty"> 17 <string>password</string> 18 <string>funambol</string> 19 </void> 20 <void method="setProperty"> 21 <string>testWhileIdle</string> 22 <string>true</string> 23 </void> 24 <void method="setProperty"> 25 <string>timeBetweenEvictionRunsMillis</string> 26 <string>600000</string> 27 </void> 28 <void method="setProperty"> 29 <string>numTestsPerEvictionRun</string> 30 <string>5</string> 31 </void> 32 <void method="setProperty"> 33 <string>minEvictableIdleTimeMillis</string> 34 <string>1800000</string> 35 </void> 36 <void method="setProperty"> 37 <string>validationQuery</string> 38 <string>select 1</string> 39 </void> 40 <void method="setProperty"> 41 <string>testOnBorrow</string> 42 <string>false</string> 43 </void> 44 <void method="setProperty"> 45 <string>removeAbandoned</string> 46 <string>true</string> 47 </void> 48 <void method="setProperty"> 49 <string>logAbandoned</string> 50 <string>true</string> 51 </void> 52 </object> 53 </java> -
src/main/config/com/funambol/server/security/LdapUserProvisioningOfficer.xml
8 8 <string>389</string> 9 9 </void> 10 10 <void property="ldapIP"> 11 <string> mmldap</string>11 <string>10.82.0.207</string> 12 12 </void> 13 13 <void property="ldapStartSearchPath"> 14 14 <string>ou=Pessoas,ou=Usuarios,dc=previdencia,dc=gov,dc=br</string> -
pom.xml
40 40 <dependency> 41 41 <artifactId>server-framework</artifactId> 42 42 <groupId>funambol</groupId> 43 <version>8. 2.0</version>43 <version>8.0.0</version> 44 44 <scope>provided</scope> 45 45 </dependency> 46 46 <dependency> … … 58 58 <dependency> 59 59 <artifactId>ds-server</artifactId> 60 60 <groupId>funambol</groupId> 61 <version>8. 2.0</version>61 <version>8.0.0</version> 62 62 <scope>provided</scope> 63 63 </dependency> 64 64 <dependency> … … 103 103 <version>8.0.0</version> 104 104 <scope>provided</scope> 105 105 </dependency> 106 <dependency> 107 <groupId>funambol</groupId> 108 <artifactId>testing-tool</artifactId> 109 <version>1.0.10</version> 110 <scope>test</scope> 111 </dependency> 112 <dependency> 113 <groupId>funambol</groupId> 114 <artifactId>sync4j-clientframework</artifactId> 115 <version>2.3</version> 116 <scope>test</scope> 117 </dependency> 106 118 </dependencies> 107 119 108 120 <!--