1
0
mirror of https://github.com/Kopano-dev/kopano-ol-extension.git synced 2023-10-10 13:37:40 +02:00

Add missing GAB fields

Added business street and department.

References: KOE-192.
Signed-off-by: Manfred Kutas <m.kutas@kopano.com>
This commit is contained in:
Manfred Kutas 2020-07-15 11:28:19 -03:00
parent 5120ddad99
commit df146f6141
4 changed files with 32 additions and 14 deletions

View File

@ -1,17 +1,17 @@
/// Copyright 2019 Kopano b.v. /// Copyright 2019 Kopano b.v.
/// ///
/// This program is free software: you can redistribute it and/or modify /// This program is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License, version 3, /// it under the terms of the GNU Affero General Public License, version 3,
/// as published by the Free Software Foundation. /// as published by the Free Software Foundation.
/// ///
/// This program is distributed in the hope that it will be useful, /// This program is distributed in the hope that it will be useful,
/// but WITHOUT ANY WARRANTY; without even the implied warranty of /// but WITHOUT ANY WARRANTY; without even the implied warranty of
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
/// GNU Affero General Public License for more details. /// GNU Affero General Public License for more details.
/// ///
/// You should have received a copy of the GNU Affero General Public License /// You should have received a copy of the GNU Affero General Public License
/// along with this program.If not, see<http://www.gnu.org/licenses/>. /// along with this program.If not, see<http://www.gnu.org/licenses/>.
/// ///
/// Consult LICENSE file for details /// Consult LICENSE file for details
using System; using System;
@ -249,7 +249,7 @@ namespace Acacia.Features.GAB
} }
} }
public const string PROP_LAST_PROCESSED = "ZPushLastProcessed"; public const string PROP_LAST_PROCESSED = "ZPushLastProcessed";
public const string PROP_SEQUENCE_CHUNK = "ZPushSequenceChunk"; public const string PROP_SEQUENCE_CHUNK = "ZPushSequenceChunk";
@ -607,6 +607,7 @@ namespace Acacia.Features.GAB
contact.Email1AddressType = "SMTP"; contact.Email1AddressType = "SMTP";
} }
if (Get<string>(value, "companyName") != null) contact.CompanyName = Get<string>(value, "companyName"); if (Get<string>(value, "companyName") != null) contact.CompanyName = Get<string>(value, "companyName");
if (Get<string>(value, "department") != null) contact.Department = Get<string>(value, "department");
if (Get<string>(value, "officeLocation") != null) contact.OfficeLocation = Get<string>(value, "officeLocation"); if (Get<string>(value, "officeLocation") != null) contact.OfficeLocation = Get<string>(value, "officeLocation");
if (Get<string>(value, "businessTelephoneNumber") != null) contact.BusinessTelephoneNumber = Get<string>(value, "businessTelephoneNumber"); if (Get<string>(value, "businessTelephoneNumber") != null) contact.BusinessTelephoneNumber = Get<string>(value, "businessTelephoneNumber");
if (Get<string>(value, "mobileTelephoneNumber") != null) contact.MobileTelephoneNumber = Get<string>(value, "mobileTelephoneNumber"); if (Get<string>(value, "mobileTelephoneNumber") != null) contact.MobileTelephoneNumber = Get<string>(value, "mobileTelephoneNumber");
@ -622,6 +623,7 @@ namespace Acacia.Features.GAB
if (Get<string>(value, "businessAddressPostalCode") != null) contact.BusinessAddressPostalCode = Get<string>(value, "businessAddressPostalCode"); if (Get<string>(value, "businessAddressPostalCode") != null) contact.BusinessAddressPostalCode = Get<string>(value, "businessAddressPostalCode");
if (Get<string>(value, "businessAddressPostOfficeBox") != null) contact.BusinessAddressPostOfficeBox = Get<string>(value, "businessAddressPostOfficeBox"); if (Get<string>(value, "businessAddressPostOfficeBox") != null) contact.BusinessAddressPostOfficeBox = Get<string>(value, "businessAddressPostOfficeBox");
if (Get<string>(value, "businessAddressStateOrProvince") != null) contact.BusinessAddressState = Get<string>(value, "businessAddressStateOrProvince"); if (Get<string>(value, "businessAddressStateOrProvince") != null) contact.BusinessAddressState = Get<string>(value, "businessAddressStateOrProvince");
if (Get<string>(value, "businessAddressStreet") != null) contact.BusinessAddressStreet = Get<string>(value, "businessAddressStreet");
if (Get<string>(value, "language") != null) contact.Language = Get<string>(value, "language"); if (Get<string>(value, "language") != null) contact.Language = Get<string>(value, "language");
// Thumbnail // Thumbnail
@ -879,7 +881,7 @@ namespace Acacia.Features.GAB
_items = null; _items = null;
} }
} }
} }
public ItemCache(GABHandler gab) public ItemCache(GABHandler gab)
{ {

View File

@ -1,17 +1,17 @@
/// Copyright 2016 Kopano b.v. /// Copyright 2016 Kopano b.v.
/// ///
/// This program is free software: you can redistribute it and/or modify /// This program is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License, version 3, /// it under the terms of the GNU Affero General Public License, version 3,
/// as published by the Free Software Foundation. /// as published by the Free Software Foundation.
/// ///
/// This program is distributed in the hope that it will be useful, /// This program is distributed in the hope that it will be useful,
/// but WITHOUT ANY WARRANTY; without even the implied warranty of /// but WITHOUT ANY WARRANTY; without even the implied warranty of
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
/// GNU Affero General Public License for more details. /// GNU Affero General Public License for more details.
/// ///
/// You should have received a copy of the GNU Affero General Public License /// You should have received a copy of the GNU Affero General Public License
/// along with this program.If not, see<http://www.gnu.org/licenses/>. /// along with this program.If not, see<http://www.gnu.org/licenses/>.
/// ///
/// Consult LICENSE file for details /// Consult LICENSE file for details
using System; using System;
@ -36,6 +36,7 @@ namespace Acacia.Stubs
string Email1Address { get; set; } string Email1Address { get; set; }
string Email1AddressType { get; set; } string Email1AddressType { get; set; }
string CompanyName { get; set; } string CompanyName { get; set; }
string Department { get; set; }
string JobTitle { get; set; } string JobTitle { get; set; }
string OfficeLocation { get; set; } string OfficeLocation { get; set; }
string BusinessTelephoneNumber { get; set; } string BusinessTelephoneNumber { get; set; }
@ -49,6 +50,7 @@ namespace Acacia.Stubs
string BusinessAddressPostalCode { get; set; } string BusinessAddressPostalCode { get; set; }
string BusinessAddressPostOfficeBox { get; set; } string BusinessAddressPostOfficeBox { get; set; }
string BusinessAddressState { get; set; } string BusinessAddressState { get; set; }
string BusinessAddressStreet { get; set; }
string Language { get; set; } string Language { get; set; }
void SetPicture(string path); void SetPicture(string path);

View File

@ -1,17 +1,17 @@
/// Copyright 2016 Kopano b.v. /// Copyright 2016 Kopano b.v.
/// ///
/// This program is free software: you can redistribute it and/or modify /// This program is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License, version 3, /// it under the terms of the GNU Affero General Public License, version 3,
/// as published by the Free Software Foundation. /// as published by the Free Software Foundation.
/// ///
/// This program is distributed in the hope that it will be useful, /// This program is distributed in the hope that it will be useful,
/// but WITHOUT ANY WARRANTY; without even the implied warranty of /// but WITHOUT ANY WARRANTY; without even the implied warranty of
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
/// GNU Affero General Public License for more details. /// GNU Affero General Public License for more details.
/// ///
/// You should have received a copy of the GNU Affero General Public License /// You should have received a copy of the GNU Affero General Public License
/// along with this program.If not, see<http://www.gnu.org/licenses/>. /// along with this program.If not, see<http://www.gnu.org/licenses/>.
/// ///
/// Consult LICENSE file for details /// Consult LICENSE file for details
using Acacia.Utils; using Acacia.Utils;
@ -94,6 +94,12 @@ namespace Acacia.Stubs.OutlookWrappers
set { _item.CompanyName = value; } set { _item.CompanyName = value; }
} }
public string Department
{
get { return _item.Department; }
set { _item.Department = value; }
}
public string JobTitle public string JobTitle
{ {
get { return _item.JobTitle; } get { return _item.JobTitle; }
@ -172,6 +178,12 @@ namespace Acacia.Stubs.OutlookWrappers
set { _item.BusinessAddressState = value; } set { _item.BusinessAddressState = value; }
} }
public string BusinessAddressStreet
{
get { return _item.BusinessAddressStreet; }
set { _item.BusinessAddressStreet = value; }
}
public string Language public string Language
{ {
get { return _item.Language; } get { return _item.Language; }

View File

@ -103,6 +103,7 @@ namespace Acacia.ZPush
if (token == "username") return _contact.CustomerID ?? ""; if (token == "username") return _contact.CustomerID ?? "";
if (token == "title") return _contact.JobTitle ?? ""; if (token == "title") return _contact.JobTitle ?? "";
if (token == "company") return _contact.CompanyName ?? ""; if (token == "company") return _contact.CompanyName ?? "";
if (token == "department") return _contact.Department ?? "";
if (token == "office") return _contact.OfficeLocation ?? ""; if (token == "office") return _contact.OfficeLocation ?? "";
if (token == "phone") return _contact.BusinessTelephoneNumber ?? _contact.MobileTelephoneNumber ?? ""; if (token == "phone") return _contact.BusinessTelephoneNumber ?? _contact.MobileTelephoneNumber ?? "";
if (token == "primary_email") return _contact.Email1Address ?? ""; if (token == "primary_email") return _contact.Email1Address ?? "";
@ -111,6 +112,7 @@ namespace Acacia.ZPush
if (token == "state") return _contact.BusinessAddressState ?? ""; if (token == "state") return _contact.BusinessAddressState ?? "";
if (token == "zipcode") return _contact.BusinessAddressPostalCode ?? ""; if (token == "zipcode") return _contact.BusinessAddressPostalCode ?? "";
if (token == "country") return _contact.BusinessAddressState ?? ""; if (token == "country") return _contact.BusinessAddressState ?? "";
if (token == "street") return _contact.BusinessAddressStreet ?? "";
if (token == "phone_business") return _contact.BusinessTelephoneNumber ?? ""; if (token == "phone_business") return _contact.BusinessTelephoneNumber ?? "";
if (token == "phone_fax") return _contact.BusinessFaxNumber ?? ""; if (token == "phone_fax") return _contact.BusinessFaxNumber ?? "";
if (token == "phone_home") return _contact.HomeTelephoneNumber ?? ""; if (token == "phone_home") return _contact.HomeTelephoneNumber ?? "";