Browse code

Fix: iFix

Thomas Fricker authored on 06/05/2019 13:10:31
Showing 38 changed files
... ...
@@ -27,7 +27,7 @@ import java.util.TimeZone;
27 27
 import org.slf4j.Logger;
28 28
 import org.slf4j.LoggerFactory;
29 29
 
30
-import net.bluemind.addressbook.api.AddressBookUids;
30
+import net.bluemind.addressbook.api.IAddressBookUids;
31 31
 import net.bluemind.core.api.fault.ServerFault;
32 32
 import net.bluemind.core.container.api.IContainers;
33 33
 import net.bluemind.core.container.api.internal.IInternalContainerSync;
... ...
@@ -85,7 +85,7 @@ public class LdapAddressBookSyncJob implements IScheduledJob {
85 85
 		BmContext context = ServerSideServiceProvider.getProvider(SecurityContext.SYSTEM).getContext();
86 86
 		ContainersSyncStore store = new ContainersSyncStore(context.getDataSource());
87 87
 		List<String> uids = ContainersSyncStore
88
-				.doOrFail(() -> store.list(AddressBookUids.TYPE, from.getTime().getTime(), MAX, "baseDn"));
88
+				.doOrFail(() -> store.list(IAddressBookUids.TYPE, from.getTime().getTime(), MAX, "baseDn"));
89 89
 
90 90
 		if (uids.size() > 0) {
91 91
 			double total = 100d / uids.size();
... ...
@@ -17,7 +17,7 @@
17 17
   */
18 18
 package net.bluemind.addressbook.ldap.sync;
19 19
 
20
-import net.bluemind.addressbook.api.AddressBookUids;
20
+import net.bluemind.addressbook.api.IAddressBookUids;
21 21
 import net.bluemind.core.container.model.Container;
22 22
 import net.bluemind.core.container.sync.ISyncableContainer;
23 23
 import net.bluemind.core.container.sync.ISyncableContainerFactory;
... ...
@@ -32,7 +32,7 @@ public class LdapAddressBookContainerSyncFactory implements ISyncableContainerFa
32 32
 
33 33
 	@Override
34 34
 	public String support() {
35
-		return AddressBookUids.TYPE;
35
+		return IAddressBookUids.TYPE;
36 36
 	}
37 37
 
38 38
 }
39 39
deleted file mode 100644
... ...
@@ -1,105 +0,0 @@
1
-/* BEGIN LICENSE
2
- * Copyright © Blue Mind SAS, 2012-2016
3
- *
4
- * This file is part of BlueMind. BlueMind is a messaging and collaborative
5
- * solution.
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of either the GNU Affero General Public License as
9
- * published by the Free Software Foundation (version 3 of the License).
10
- *
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
- *
16
- * See LICENSE.txt
17
- * END LICENSE
18
- */
19
-package net.bluemind.addressbook.api;
20
-
21
-import javax.ws.rs.GET;
22
-import javax.ws.rs.Path;
23
-import javax.ws.rs.PathParam;
24
-
25
-import net.bluemind.core.api.BMApi;
26
-
27
-/**
28
- * Returns common addressbook container UIDs. All related entries are stored
29
- * within the container
30
- */
31
-@BMApi(version = "3")
32
-@Path("/addressbook/uids")
33
-public interface AddressBookUids {
34
-
35
-	public static final String TYPE = "addressbook";
36
-
37
-	/**
38
-	 * Returns the default user addressbook UID
39
-	 * 
40
-	 * @param userUid
41
-	 *                    the {@link net.bluemind.user.api.User} UID
42
-	 * @return default user addressbook UID
43
-	 */
44
-	@GET
45
-	@Path("{uid}/_default_addressbook")
46
-	public default String getDefaultUserAddressbook(@PathParam("uid") String userUid) {
47
-		return AddressBookUids.defaultUserAddressbook(userUid);
48
-	}
49
-
50
-	/**
51
-	 * Returns the UID of collected contacts
52
-	 * 
53
-	 * @param userUid
54
-	 *                    the {@link net.bluemind.user.api.User} UID
55
-	 * @return UID of collected contacts
56
-	 */
57
-	@GET
58
-	@Path("{uid}/_collected_contacts")
59
-	public default String getCollectedContactsUserAddressbook(@PathParam("uid") String userUid) {
60
-		return AddressBookUids.collectedContactsUserAddressbook(userUid);
61
-	}
62
-
63
-	/**
64
-	 * Returns the UID of user-created addressbooks
65
-	 * 
66
-	 * @param uniqueUid
67
-	 *                      A unique UID
68
-	 * @return the UID of the user-created addressbook
69
-	 */
70
-	@GET
71
-	@Path("{uid}/_other_addressbook")
72
-	public default String getUserCreatedAddressbook(@PathParam("uid") String uniqueUid) {
73
-		return AddressBookUids.userCreatedAddressbook(uniqueUid);
74
-	}
75
-
76
-	/**
77
-	 * Returns the UID of the domain addressbok
78
-	 * 
79
-	 * @param domainUid
80
-	 *                      the {@link net.bluemind.domain.api.Domain}'s UID
81
-	 * @return UID of the domain addressbok
82
-	 */
83
-	@GET
84
-	@Path("{domain}/_vcards")
85
-	public default String getUserVCards(@PathParam("domain") String domainUid) {
86
-		return AddressBookUids.userVCards(domainUid);
87
-	}
88
-
89
-	public static String defaultUserAddressbook(String userUid) {
90
-		return "book:Contacts_" + userUid;
91
-	}
92
-
93
-	public static String collectedContactsUserAddressbook(String userUid) {
94
-		return "book:CollectedContacts_" + userUid;
95
-	}
96
-
97
-	public static String userCreatedAddressbook(String randomSeed) {
98
-		return "book:UserCreated_" + randomSeed;
99
-	}
100
-
101
-	public static String userVCards(String domainUid) {
102
-		return "addressbook_" + domainUid;
103
-	}
104
-
105
-}
106 0
new file mode 100644
... ...
@@ -0,0 +1,105 @@
1
+/* BEGIN LICENSE
2
+ * Copyright © Blue Mind SAS, 2012-2016
3
+ *
4
+ * This file is part of BlueMind. BlueMind is a messaging and collaborative
5
+ * solution.
6
+ *
7
+ * This program is free software; you can redistribute it and/or modify
8
+ * it under the terms of either the GNU Affero General Public License as
9
+ * published by the Free Software Foundation (version 3 of the License).
10
+ *
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
+ *
16
+ * See LICENSE.txt
17
+ * END LICENSE
18
+ */
19
+package net.bluemind.addressbook.api;
20
+
21
+import javax.ws.rs.GET;
22
+import javax.ws.rs.Path;
23
+import javax.ws.rs.PathParam;
24
+
25
+import net.bluemind.core.api.BMApi;
26
+
27
+/**
28
+ * Returns common addressbook container UIDs. All related entries are stored
29
+ * within the container
30
+ */
31
+@BMApi(version = "3")
32
+@Path("/addressbook/uids")
33
+public interface IAddressBookUids {
34
+
35
+	public static final String TYPE = "addressbook";
36
+
37
+	/**
38
+	 * Returns the default user addressbook UID
39
+	 * 
40
+	 * @param userUid
41
+	 *                    the {@link net.bluemind.user.api.User} UID
42
+	 * @return default user addressbook UID
43
+	 */
44
+	@GET
45
+	@Path("{uid}/_default_addressbook")
46
+	public default String getDefaultUserAddressbook(@PathParam("uid") String userUid) {
47
+		return IAddressBookUids.defaultUserAddressbook(userUid);
48
+	}
49
+
50
+	/**
51
+	 * Returns the UID of collected contacts
52
+	 * 
53
+	 * @param userUid
54
+	 *                    the {@link net.bluemind.user.api.User} UID
55
+	 * @return UID of collected contacts
56
+	 */
57
+	@GET
58
+	@Path("{uid}/_collected_contacts")
59
+	public default String getCollectedContactsUserAddressbook(@PathParam("uid") String userUid) {
60
+		return IAddressBookUids.collectedContactsUserAddressbook(userUid);
61
+	}
62
+
63
+	/**
64
+	 * Returns the UID of user-created addressbooks
65
+	 * 
66
+	 * @param uniqueUid
67
+	 *                      A unique UID
68
+	 * @return the UID of the user-created addressbook
69
+	 */
70
+	@GET
71
+	@Path("{uid}/_other_addressbook")
72
+	public default String getUserCreatedAddressbook(@PathParam("uid") String uniqueUid) {
73
+		return IAddressBookUids.userCreatedAddressbook(uniqueUid);
74
+	}
75
+
76
+	/**
77
+	 * Returns the UID of the domain addressbok
78
+	 * 
79
+	 * @param domainUid
80
+	 *                      the {@link net.bluemind.domain.api.Domain}'s UID
81
+	 * @return UID of the domain addressbok
82
+	 */
83
+	@GET
84
+	@Path("{domain}/_vcards")
85
+	public default String getUserVCards(@PathParam("domain") String domainUid) {
86
+		return IAddressBookUids.userVCards(domainUid);
87
+	}
88
+
89
+	public static String defaultUserAddressbook(String userUid) {
90
+		return "book:Contacts_" + userUid;
91
+	}
92
+
93
+	public static String collectedContactsUserAddressbook(String userUid) {
94
+		return "book:CollectedContacts_" + userUid;
95
+	}
96
+
97
+	public static String userCreatedAddressbook(String randomSeed) {
98
+		return "book:UserCreated_" + randomSeed;
99
+	}
100
+
101
+	public static String userVCards(String domainUid) {
102
+		return "addressbook_" + domainUid;
103
+	}
104
+
105
+}
... ...
@@ -25,7 +25,7 @@ import org.apache.james.mime4j.stream.RawField;
25 25
 import org.slf4j.Logger;
26 26
 import org.slf4j.LoggerFactory;
27 27
 
28
-import net.bluemind.addressbook.api.AddressBookUids;
28
+import net.bluemind.addressbook.api.IAddressBookUids;
29 29
 import net.bluemind.core.api.fault.ServerFault;
30 30
 import net.bluemind.core.container.hooks.AbstractEmailHook;
31 31
 import net.bluemind.core.container.model.ContainerDescriptor;
... ...
@@ -44,7 +44,7 @@ public class AddressbookEmailHook extends AbstractEmailHook {
44 44
 	public void onAclChanged(BmContext context, ContainerDescriptor container, List<AccessControlEntry> previous,
45 45
 			List<AccessControlEntry> current) {
46 46
 		// FIXME define and use a constant for global.virt
47
-		if (AddressBookUids.TYPE.equals(container.type) && !"global.virt".equals(container.domainUid)) {
47
+		if (IAddressBookUids.TYPE.equals(container.type) && !"global.virt".equals(container.domainUid)) {
48 48
 			try {
49 49
 
50 50
 				RawField uid = new RawField("X-BM-FolderUid", container.uid);
... ...
@@ -39,7 +39,7 @@ import org.vertx.java.core.Handler;
39 39
 import com.google.common.collect.Lists;
40 40
 import com.google.common.util.concurrent.SettableFuture;
41 41
 
42
-import net.bluemind.addressbook.api.AddressBookUids;
42
+import net.bluemind.addressbook.api.IAddressBookUids;
43 43
 import net.bluemind.addressbook.api.IAddressBook;
44 44
 import net.bluemind.addressbook.api.VCard;
45 45
 import net.bluemind.addressbook.persistance.VCardIndexStore;
... ...
@@ -214,7 +214,7 @@ public abstract class AbstractServiceTests {
214 214
 		ContainerStore containerHome = new ContainerStore(context, dataDataSource, defaultSecurityContext);
215 215
 
216 216
 		String containerId = "test_" + System.nanoTime();
217
-		Container container = Container.create(containerId, AddressBookUids.TYPE, "test", userUid, domainUid,
217
+		Container container = Container.create(containerId, IAddressBookUids.TYPE, "test", userUid, domainUid,
218 218
 				true);
219 219
 		container = containerHome.create(container);
220 220
 		assertNotNull(container);
... ...
@@ -26,7 +26,7 @@ import org.elasticsearch.client.Client;
26 26
 
27 27
 import com.google.common.base.Throwables;
28 28
 
29
-import net.bluemind.addressbook.api.AddressBookUids;
29
+import net.bluemind.addressbook.api.IAddressBookUids;
30 30
 import net.bluemind.addressbook.service.internal.AddressBookService;
31 31
 import net.bluemind.core.api.fault.ErrorCode;
32 32
 import net.bluemind.core.api.fault.ServerFault;
... ...
@@ -60,7 +60,7 @@ public class InCoreAddressBookFactory
60 60
 			throw new ServerFault("container " + containerId + " not found", ErrorCode.NOT_FOUND);
61 61
 		}
62 62
 
63
-		if (!container.type.equals(AddressBookUids.TYPE)) {
63
+		if (!container.type.equals(IAddressBookUids.TYPE)) {
64 64
 			Throwables.propagate(new ServerFault(
65 65
 					"Incompatible addressbook container: " + container.type + ", uid: " + container.uid));
66 66
 		}
... ...
@@ -24,7 +24,7 @@ import javax.sql.DataSource;
24 24
 
25 25
 import org.elasticsearch.client.Client;
26 26
 
27
-import net.bluemind.addressbook.api.AddressBookUids;
27
+import net.bluemind.addressbook.api.IAddressBookUids;
28 28
 import net.bluemind.addressbook.api.IVCardService;
29 29
 import net.bluemind.addressbook.service.internal.AddressBookService;
30 30
 import net.bluemind.addressbook.service.internal.VCardService;
... ...
@@ -63,7 +63,7 @@ public class VCardServiceFactory implements ServerSideServiceProvider.IServerSid
63 63
 			throw new ServerFault("container " + containerId + " not found", ErrorCode.NOT_FOUND);
64 64
 		}
65 65
 
66
-		if (!container.type.equals(AddressBookUids.TYPE)) {
66
+		if (!container.type.equals(IAddressBookUids.TYPE)) {
67 67
 			throw new ServerFault("Incompatible addressbook container: " + container.type + ", uid: " + container.uid);
68 68
 		}
69 69
 
... ...
@@ -37,7 +37,7 @@ import com.google.common.collect.ImmutableList;
37 37
 import com.google.common.collect.ImmutableMap;
38 38
 
39 39
 import net.bluemind.addressbook.api.IAddressBook;
40
-import net.bluemind.addressbook.api.AddressBookUids;
40
+import net.bluemind.addressbook.api.IAddressBookUids;
41 41
 import net.bluemind.addressbook.api.VCard;
42 42
 import net.bluemind.addressbook.api.VCardChanges;
43 43
 import net.bluemind.addressbook.api.VCardChanges.ItemAdd;
... ...
@@ -108,7 +108,7 @@ public class AddressBookService implements IInCoreAddressBook {
108 108
 		this.eventProducer = new AddressBookEventProducer(container, securityContext, VertxPlatform.eventBus());
109 109
 		indexStore = new VCardIndexStore(esearchClient, container);
110 110
 		this.storeService = new VCardContainerStoreService(context, dataSource, securityContext, container,
111
-				AddressBookUids.TYPE, vcardStore, indexStore);
111
+				IAddressBookUids.TYPE, vcardStore, indexStore);
112 112
 
113 113
 		extSanitizer = new Sanitizer(context);
114 114
 		extValidator = new Validator(context);
... ...
@@ -37,7 +37,7 @@ import org.vertx.java.core.streams.ReadStream;
37 37
 import com.google.common.collect.Lists;
38 38
 
39 39
 import net.bluemind.addressbook.api.AddressBookDescriptor;
40
-import net.bluemind.addressbook.api.AddressBookUids;
40
+import net.bluemind.addressbook.api.IAddressBookUids;
41 41
 import net.bluemind.addressbook.api.IAddressBooksMgmt;
42 42
 import net.bluemind.addressbook.api.VCard;
43 43
 import net.bluemind.addressbook.persistance.VCardIndexStore;
... ...
@@ -149,7 +149,7 @@ public class AddressBooksMgmt implements IAddressBooksMgmt, IInCoreAddressBooksM
149 149
 	private void reindex(Container container, IServerTaskMonitor monitor) throws ServerFault {
150 150
 		DataSource ds = DataSourceRouter.get(context, container.uid);
151 151
 		VCardContainerStoreService storeService = new VCardContainerStoreService(context, ds,
152
-				context.getSecurityContext(), container, AddressBookUids.TYPE, new VCardStore(ds, container),
152
+				context.getSecurityContext(), container, IAddressBookUids.TYPE, new VCardStore(ds, container),
153 153
 				new VCardIndexStore(ESearchActivator.getClient(), container));
154 154
 		VCardIndexStore indexStore = new VCardIndexStore(ESearchActivator.getClient(), container);
155 155
 
... ...
@@ -196,7 +196,7 @@ public class AddressBooksMgmt implements IAddressBooksMgmt, IInCoreAddressBooksM
196 196
 		}
197 197
 
198 198
 		IContainers service = context.provider().instance(IContainers.class);
199
-		List<ContainerDescriptor> containers = service.all(ContainerQuery.type(AddressBookUids.TYPE));
199
+		List<ContainerDescriptor> containers = service.all(ContainerQuery.type(IAddressBookUids.TYPE));
200 200
 
201 201
 		monitor.begin(containers.size(), "begin addressbooks reindexation [" + containers.size() + "]");
202 202
 		for (ContainerDescriptor c : containers) {
... ...
@@ -231,7 +231,7 @@ public class AddressBooksMgmt implements IAddressBooksMgmt, IInCoreAddressBooksM
231 231
 		}
232 232
 
233 233
 		VCardContainerStoreService storeService = new VCardContainerStoreService(context, ds,
234
-				context.getSecurityContext(), container, AddressBookUids.TYPE, new VCardStore(ds, container),
234
+				context.getSecurityContext(), container, IAddressBookUids.TYPE, new VCardStore(ds, container),
235 235
 				new VCardIndexStore(ESearchActivator.getClient(), container));
236 236
 
237 237
 		ContainerChangeset<String> changeset = storeService.changeset(since, Long.MAX_VALUE);
... ...
@@ -303,7 +303,7 @@ public class AddressBooksMgmt implements IAddressBooksMgmt, IInCoreAddressBooksM
303 303
 		}
304 304
 
305 305
 		final VCardContainerStoreService storeService = new VCardContainerStoreService(context, ds,
306
-				context.getSecurityContext(), container, AddressBookUids.TYPE, new VCardStore(ds, container),
306
+				context.getSecurityContext(), container, IAddressBookUids.TYPE, new VCardStore(ds, container),
307 307
 				new VCardIndexStore(ESearchActivator.getClient(), container));
308 308
 
309 309
 		if (resetBeforeRestore) {
... ...
@@ -361,7 +361,7 @@ public class AddressBooksMgmt implements IAddressBooksMgmt, IInCoreAddressBooksM
361 361
 			throw ServerFault.sqlFault(e);
362 362
 		}
363 363
 		VCardContainerStoreService storeService = new VCardContainerStoreService(context, ds,
364
-				context.getSecurityContext(), container, AddressBookUids.TYPE, new VCardStore(ds, container),
364
+				context.getSecurityContext(), container, IAddressBookUids.TYPE, new VCardStore(ds, container),
365 365
 				new VCardIndexStore(ESearchActivator.getClient(), container));
366 366
 
367 367
 		storeService.prepareContainerDelete();
... ...
@@ -376,7 +376,7 @@ public class AddressBooksMgmt implements IAddressBooksMgmt, IInCoreAddressBooksM
376 376
 			return null;
377 377
 		}
378 378
 
379
-		if (cd.type.equals(AddressBookUids.TYPE)) {
379
+		if (cd.type.equals(IAddressBookUids.TYPE)) {
380 380
 			AddressBookDescriptor ret = AddressBookDescriptor.create(cd.name, cd.owner, cd.domainUid, cd.settings);
381 381
 			if (cd.owner.equals(uid)) {
382 382
 				// domain addressbook
... ...
@@ -413,12 +413,12 @@ public class AddressBooksMgmt implements IAddressBooksMgmt, IInCoreAddressBooksM
413 413
 			checkCanManageBook(descriptor, entry.kind);
414 414
 		}
415 415
 		if (descriptor.expectedId != null) {
416
-			String hierUid = ContainerHierarchyNode.uidFor(uid, AddressBookUids.TYPE, descriptor.domainUid);
416
+			String hierUid = ContainerHierarchyNode.uidFor(uid, IAddressBookUids.TYPE, descriptor.domainUid);
417 417
 			HierarchyIdsHints.putHint(hierUid, descriptor.expectedId);
418 418
 		}
419 419
 
420 420
 		ContainerDescriptor abContainerDescriptor = ContainerDescriptor.create(uid, descriptor.name, descriptor.owner,
421
-				AddressBookUids.TYPE, descriptor.domainUid, isDefault);
421
+				IAddressBookUids.TYPE, descriptor.domainUid, isDefault);
422 422
 
423 423
 		abContainerDescriptor.readOnly = Boolean.parseBoolean(descriptor.settings.getOrDefault("readonly", "false"));
424 424
 
... ...
@@ -514,12 +514,12 @@ public class AddressBooksMgmt implements IAddressBooksMgmt, IInCoreAddressBooksM
514 514
 
515 515
 		for (DataSource ds : dataSources) {
516 516
 			ContainerStore cs = new ContainerStore(context, ds, context.getSecurityContext());
517
-			List<Container> containers = cs.findByType(AddressBookUids.TYPE);
517
+			List<Container> containers = cs.findByType(IAddressBookUids.TYPE);
518 518
 			all.addAll(containers.stream().map(c -> c.uid).collect(Collectors.toList()));
519 519
 		}
520 520
 
521 521
 		ContainerStore cs = new ContainerStore(context, context.getDataSource(), context.getSecurityContext());
522
-		List<Container> containers = cs.findByType(AddressBookUids.TYPE);
522
+		List<Container> containers = cs.findByType(IAddressBookUids.TYPE);
523 523
 		all.addAll(containers.stream().map(c -> c.uid).collect(Collectors.toList()));
524 524
 
525 525
 		return all;
... ...
@@ -27,7 +27,7 @@ import org.slf4j.Logger;
27 27
 import org.slf4j.LoggerFactory;
28 28
 
29 29
 import net.bluemind.addressbook.api.IAddressBook;
30
-import net.bluemind.addressbook.api.AddressBookUids;
30
+import net.bluemind.addressbook.api.IAddressBookUids;
31 31
 import net.bluemind.addressbook.api.IAddressBooks;
32 32
 import net.bluemind.addressbook.api.VCardInfo;
33 33
 import net.bluemind.addressbook.api.VCardQuery;
... ...
@@ -59,7 +59,7 @@ public class AddressBooksService implements IAddressBooks {
59 59
 
60 60
 		List<ContainerSubscriptionDescriptor> containers = context.getServiceProvider()
61 61
 				.instance(IUserSubscription.class, context.getSecurityContext().getContainerUid())
62
-				.listSubscriptions(securityConext.getSubject(), AddressBookUids.TYPE);
62
+				.listSubscriptions(securityConext.getSubject(), IAddressBookUids.TYPE);
63 63
 
64 64
 		// make container order pertinant too
65 65
 		if (query.orderBy == OrderBy.Pertinance) {
... ...
@@ -25,7 +25,7 @@ import java.util.Set;
25 25
 
26 26
 import com.google.common.collect.ImmutableSet;
27 27
 
28
-import net.bluemind.addressbook.api.AddressBookUids;
28
+import net.bluemind.addressbook.api.IAddressBookUids;
29 29
 import net.bluemind.core.api.fault.ServerFault;
30 30
 import net.bluemind.core.api.report.DiagnosticReport;
31 31
 import net.bluemind.core.container.model.Container;
... ...
@@ -124,7 +124,7 @@ public class DomainBookRepairSupport implements IDirEntryRepairSupport {
124 124
 				return;
125 125
 			} else {
126 126
 				report.warn(REPAIR_AB_CONTAINER, "container " + entry.entryUid + " not found, going to recreate it");
127
-				container = Container.create(entry.entryUid, AddressBookUids.TYPE, entry.displayName, entry.entryUid,
127
+				container = Container.create(entry.entryUid, IAddressBookUids.TYPE, entry.displayName, entry.entryUid,
128 128
 						domainUid, true);
129 129
 				try {
130 130
 					container = cs.create(container);
... ...
@@ -26,7 +26,7 @@ import javax.sql.DataSource;
26 26
 import org.slf4j.Logger;
27 27
 import org.slf4j.LoggerFactory;
28 28
 
29
-import net.bluemind.addressbook.api.AddressBookUids;
29
+import net.bluemind.addressbook.api.IAddressBookUids;
30 30
 import net.bluemind.addressbook.persistance.VCardIndexStore;
31 31
 import net.bluemind.addressbook.persistance.VCardStore;
32 32
 import net.bluemind.core.api.fault.ServerFault;
... ...
@@ -61,7 +61,7 @@ public class TagEventConsumer implements ITagEventConsumer {
61 61
 
62 62
 		List<ItemUri> items = null;
63 63
 		try {
64
-			items = tagReferencesStore.referencedBy(AddressBookUids.TYPE, tagContainerUid, tagUid);
64
+			items = tagReferencesStore.referencedBy(IAddressBookUids.TYPE, tagContainerUid, tagUid);
65 65
 		} catch (SQLException e) {
66 66
 			logger.error("error during retrieving references ", e);
67 67
 			return;
... ...
@@ -94,7 +94,7 @@ public class TagEventConsumer implements ITagEventConsumer {
94 94
 			}
95 95
 
96 96
 			VCardContainerStoreService vcardContainerStore = new VCardContainerStoreService(context, dsCards,
97
-					SecurityContext.SYSTEM, currentContainer, AddressBookUids.TYPE,
97
+					SecurityContext.SYSTEM, currentContainer, IAddressBookUids.TYPE,
98 98
 					new VCardStore(dsCards, currentContainer),
99 99
 					new VCardIndexStore(ESearchActivator.getClient(), currentContainer));
100 100
 
... ...
@@ -111,7 +111,7 @@ public class TagEventConsumer implements ITagEventConsumer {
111 111
 		if (tag == null) {
112 112
 			logger.info("Remove references");
113 113
 			try {
114
-				tagReferencesStore.deleteReferences(AddressBookUids.TYPE, tagContainerUid, tagUid);
114
+				tagReferencesStore.deleteReferences(IAddressBookUids.TYPE, tagContainerUid, tagUid);
115 115
 			} catch (SQLException e) {
116 116
 				logger.error("Fail to remove references ", e);
117 117
 			}
... ...
@@ -25,7 +25,7 @@ import java.util.List;
25 25
 
26 26
 import javax.sql.DataSource;
27 27
 
28
-import net.bluemind.addressbook.api.AddressBookUids;
28
+import net.bluemind.addressbook.api.IAddressBookUids;
29 29
 import net.bluemind.addressbook.api.VCard;
30 30
 import net.bluemind.addressbook.api.VCard.Kind;
31 31
 import net.bluemind.addressbook.persistance.VCardIndexStore;
... ...
@@ -53,7 +53,7 @@ public class VCardContainerStoreService extends ContainerStoreService<VCard> {
53 53
 
54 54
 	public VCardContainerStoreService(BmContext context, DataSource dataSource, SecurityContext securityContext,
55 55
 			Container container) {
56
-		this(context, dataSource, securityContext, container, AddressBookUids.TYPE,
56
+		this(context, dataSource, securityContext, container, IAddressBookUids.TYPE,
57 57
 				new VCardStore(dataSource, container), new VCardIndexStore(ESearchActivator.getClient(), container));
58 58
 	}
59 59
 
... ...
@@ -32,7 +32,7 @@ import org.vertx.java.core.Handler;
32 32
 import com.google.common.collect.Lists;
33 33
 import com.google.common.util.concurrent.SettableFuture;
34 34
 
35
-import net.bluemind.addressbook.api.AddressBookUids;
35
+import net.bluemind.addressbook.api.IAddressBookUids;
36 36
 import net.bluemind.addressbook.api.AddressBookDescriptor;
37 37
 import net.bluemind.addressbook.api.IAddressBook;
38 38
 import net.bluemind.addressbook.api.IAddressBooksMgmt;
... ...
@@ -119,7 +119,7 @@ public class UserBookHookTests {
119 119
 
120 120
 		IUserSubscription userSubService = bmContext.getServiceProvider().instance(IUserSubscription.class, domainUid);
121 121
 		List<ContainerSubscriptionDescriptor> subs = userSubService.listSubscriptions(userUid,
122
-				AddressBookUids.TYPE);
122
+				IAddressBookUids.TYPE);
123 123
 
124 124
 		verifyContainerSubAndSync(subs, contacts, true);
125 125
 		verifyContainerSubAndSync(subs, collected, true);
... ...
@@ -24,7 +24,7 @@ import org.slf4j.Logger;
24 24
 import org.slf4j.LoggerFactory;
25 25
 
26 26
 import net.bluemind.addressbook.api.AddressBookDescriptor;
27
-import net.bluemind.addressbook.api.AddressBookUids;
27
+import net.bluemind.addressbook.api.IAddressBookUids;
28 28
 import net.bluemind.addressbook.api.IAddressBooksMgmt;
29 29
 import net.bluemind.core.api.report.DiagnosticReport;
30 30
 import net.bluemind.core.container.api.ContainerSubscription;
... ...
@@ -120,11 +120,11 @@ public class UserAddressbookRepair implements ContainerRepairOp {
120 120
 	}
121 121
 
122 122
 	private String getDefaultContainerUid(String userUid) {
123
-		return AddressBookUids.defaultUserAddressbook(userUid);
123
+		return IAddressBookUids.defaultUserAddressbook(userUid);
124 124
 	}
125 125
 
126 126
 	private String getCollectedContactsContainerUid(String userUid) {
127
-		return AddressBookUids.collectedContactsUserAddressbook(userUid);
127
+		return IAddressBookUids.collectedContactsUserAddressbook(userUid);
128 128
 	}
129 129
 
130 130
 	@Override
... ...
@@ -41,7 +41,7 @@ import org.vertx.java.core.Handler;
41 41
 import com.google.common.collect.Lists;
42 42
 import com.google.common.util.concurrent.SettableFuture;
43 43
 
44
-import net.bluemind.addressbook.api.AddressBookUids;
44
+import net.bluemind.addressbook.api.IAddressBookUids;
45 45
 import net.bluemind.addressbook.api.VCard;
46 46
 import net.bluemind.addressbook.api.VCard.Identification.Name;
47 47
 import net.bluemind.addressbook.api.VCard.Kind;
... ...
@@ -212,7 +212,7 @@ public abstract class AbstractCalendarTests {
212 212
 
213 213
 		ContainerStoreService<VCard> vcardStore = new ContainerStoreService<VCard>(
214 214
 				JdbcTestHelper.getInstance().getDataSource(), SecurityContext.SYSTEM, usersBook,
215
-				AddressBookUids.TYPE, new VCardStore(JdbcTestHelper.getInstance().getDataSource(), usersBook));
215
+				IAddressBookUids.TYPE, new VCardStore(JdbcTestHelper.getInstance().getDataSource(), usersBook));
216 216
 
217 217
 		// test user
218 218
 		testUser = defaultUser("testUser" + System.nanoTime(), "Doe", "John");
... ...
@@ -240,10 +240,10 @@ public abstract class AbstractCalendarTests {
240 240
 		userTagContainer = createTestContainer(userSecurityContext, TagsContainerType.TYPE, "tags",
241 241
 				TagsContainerType.TYPE + "_" + testUser.uid, testUser.uid);
242 242
 
243
-		Container contactsContainer = createTestContainer(userSecurityContext, AddressBookUids.TYPE,
243
+		Container contactsContainer = createTestContainer(userSecurityContext, IAddressBookUids.TYPE,
244 244
 				"My Contacts", "book:Contacts_" + testUser.uid, testUser.uid);
245 245
 
246
-		Container collectedContactsContainer = createTestContainer(userSecurityContext, AddressBookUids.TYPE,
246
+		Container collectedContactsContainer = createTestContainer(userSecurityContext, IAddressBookUids.TYPE,
247 247
 				"Collected contacts yay", "book:CollectedContacts_" + testUser.uid, testUser.uid);
248 248
 
249 249
 		// attendee 1
... ...
@@ -282,7 +282,7 @@ public abstract class AbstractCalendarTests {
282 282
 
283 283
 		// Dlist
284 284
 		vcardStore = new ContainerStoreService<VCard>(JdbcTestHelper.getInstance().getDataSource(),
285
-				SecurityContext.SYSTEM, contactsContainer, AddressBookUids.TYPE,
285
+				SecurityContext.SYSTEM, contactsContainer, IAddressBookUids.TYPE,
286 286
 				new VCardStore(JdbcTestHelper.getInstance().getDataSource(), contactsContainer));
287 287
 		VCardIndexStore vcardIndex = new VCardIndexStore(ElasticsearchTestHelper.getInstance().getClient(),
288 288
 				contactsContainer);
... ...
@@ -31,7 +31,7 @@ import org.slf4j.Logger;
31 31
 import org.slf4j.LoggerFactory;
32 32
 
33 33
 import net.bluemind.addressbook.api.IAddressBook;
34
-import net.bluemind.addressbook.api.AddressBookUids;
34
+import net.bluemind.addressbook.api.IAddressBookUids;
35 35
 import net.bluemind.addressbook.api.VCard;
36 36
 import net.bluemind.calendar.api.CalendarContainerType;
37 37
 import net.bluemind.calendar.api.CalendarLookupResponse;
... ...
@@ -102,7 +102,7 @@ public class CalendarAutocompleteService implements ICalendarAutocomplete {
102 102
 		List<ItemValue<VCard>> uids = new ArrayList<ItemValue<VCard>>();
103 103
 		String domainUid = context.getSecurityContext().getContainerUid();
104 104
 		IAddressBook book = context.su().provider().instance(IAddressBook.class,
105
-				AddressBookUids.userVCards(domainUid));
105
+				IAddressBookUids.userVCards(domainUid));
106 106
 		ItemValue<VCard> vcard = book.getComplete(uid);
107 107
 		if (vcard != null && vcard.value.organizational.member.size() > 0) {
108 108
 			List<ItemValue<VCard>> members = book.multipleGet(
... ...
@@ -34,7 +34,7 @@ import com.google.common.collect.Lists;
34 34
 import io.airlift.airline.Arguments;
35 35
 import io.airlift.airline.Command;
36 36
 import io.airlift.airline.Option;
37
-import net.bluemind.addressbook.api.AddressBookUids;
37
+import net.bluemind.addressbook.api.IAddressBookUids;
38 38
 import net.bluemind.addressbook.api.IAddressBook;
39 39
 import net.bluemind.addressbook.api.VCard;
40 40
 import net.bluemind.addressbook.api.VCard.Communications.Email;
... ...
@@ -91,7 +91,7 @@ public class DeduplicateAddressBookCommand implements ICmdLet, Runnable {
91 91
 		String userUid = cliUtils.getUserUidFromEmail(email);
92 92
 
93 93
 		if (addressBookUid == null) {
94
-			addressBookUid = AddressBookUids.collectedContactsUserAddressbook(userUid);
94
+			addressBookUid = IAddressBookUids.collectedContactsUserAddressbook(userUid);
95 95
 		}
96 96
 		
97 97
 		ctx.info("deduplicate addressbook : " + addressBookUid);
... ...
@@ -135,7 +135,7 @@ public class DeduplicateAddressBookCommand implements ICmdLet, Runnable {
135 135
 	private List<String> getAllEmailsInDomainAddressBook(String domain) {
136 136
 
137 137
 		IAddressBook domainAddressBook = ctx.adminApi().instance(IAddressBook.class,
138
-				AddressBookUids.userVCards(domain));
138
+				IAddressBookUids.userVCards(domain));
139 139
 		List<String> allUids = domainAddressBook.allUids();
140 140
 		List<String> emails = new ArrayList<>();
141 141
 
... ...
@@ -24,7 +24,7 @@ import java.util.Optional;
24 24
 
25 25
 import io.airlift.airline.Command;
26 26
 import io.airlift.airline.Option;
27
-import net.bluemind.addressbook.api.AddressBookUids;
27
+import net.bluemind.addressbook.api.IAddressBookUids;
28 28
 import net.bluemind.addressbook.api.IVCardService;
29 29
 import net.bluemind.cli.cmd.api.CliException;
30 30
 import net.bluemind.cli.cmd.api.ICmdLet;
... ...
@@ -57,7 +57,7 @@ public class ExportAddressBookCommand extends ExportCommand {
57 57
 
58 58
 	@Override
59 59
 	public String getcontainerType() {
60
-		return AddressBookUids.TYPE;
60
+		return IAddressBookUids.TYPE;
61 61
 	}
62 62
 
63 63
 	@Override
... ...
@@ -26,7 +26,7 @@ import java.util.Optional;
26 26
 import io.airlift.airline.Arguments;
27 27
 import io.airlift.airline.Command;
28 28
 import io.airlift.airline.Option;
29
-import net.bluemind.addressbook.api.AddressBookUids;
29
+import net.bluemind.addressbook.api.IAddressBookUids;
30 30
 import net.bluemind.addressbook.api.IVCardService;
31 31
 import net.bluemind.cli.cmd.api.CliContext;
32 32
 import net.bluemind.cli.cmd.api.CliException;
... ...
@@ -96,7 +96,7 @@ public class ImportAddressBookCommand implements ICmdLet, Runnable {
96 96
 		}
97 97
 
98 98
 		if(addressBookUid == null) {
99
-			addressBookUid = AddressBookUids.defaultUserAddressbook(userUid); 
99
+			addressBookUid = IAddressBookUids.defaultUserAddressbook(userUid); 
100 100
 		}
101 101
 
102 102
 		try{
... ...
@@ -26,7 +26,7 @@ import java.util.Optional;
26 26
 
27 27
 
28 28
 import io.airlift.airline.Command;
29
-import net.bluemind.addressbook.api.AddressBookUids;
29
+import net.bluemind.addressbook.api.IAddressBookUids;
30 30
 import net.bluemind.cli.cmd.api.ICmdLet;
31 31
 import net.bluemind.cli.cmd.api.ICmdLetRegistration;
32 32
 import net.bluemind.cli.directory.common.ListCommand;
... ...
@@ -54,6 +54,6 @@ public class ListAddressBooksCommand extends ListCommand {
54 54
 
55 55
 	@Override
56 56
 	public String getContainerType() {
57
-		return AddressBookUids.TYPE;
57
+		return IAddressBookUids.TYPE;
58 58
 	}
59 59
 }
... ...
@@ -22,7 +22,7 @@ import java.util.Optional;
22 22
 import io.airlift.airline.Arguments;
23 23
 import io.airlift.airline.Command;
24 24
 import io.airlift.airline.Option;
25
-import net.bluemind.addressbook.api.AddressBookUids;
25
+import net.bluemind.addressbook.api.IAddressBookUids;
26 26
 import net.bluemind.addressbook.api.IAddressBook;
27 27
 import net.bluemind.cli.cmd.api.CliContext;
28 28
 import net.bluemind.cli.cmd.api.CliException;
... ...
@@ -82,7 +82,7 @@ public class ResetAddressBookCommand implements ICmdLet, Runnable {
82 82
 		String userUid = cliUtils.getUserUidFromEmail(email);
83 83
 
84 84
 		if(addressBookUid == null) {
85
-			addressBookUid = AddressBookUids.collectedContactsUserAddressbook(userUid); 
85
+			addressBookUid = IAddressBookUids.collectedContactsUserAddressbook(userUid); 
86 86
 		}
87 87
 		try {
88 88
 			if (!dry) {
... ...
@@ -39,7 +39,7 @@ import com.google.common.collect.ImmutableMap;
39 39
 import com.google.common.collect.ImmutableSet;
40 40
 import com.google.common.collect.Lists;
41 41
 
42
-import net.bluemind.addressbook.api.AddressBookUids;
42
+import net.bluemind.addressbook.api.IAddressBookUids;
43 43
 import net.bluemind.addressbook.api.AddressBookDescriptor;
44 44
 import net.bluemind.addressbook.api.IAddressBook;
45 45
 import net.bluemind.addressbook.api.IAddressBooksMgmt;
... ...
@@ -213,7 +213,7 @@ public class RestoreAddresBooksTaskTests {
213 213
 	@Test
214 214
 	public void testRestoreDefaultAddressBook() throws Exception {
215 215
 		IAddressBook ab = testContext.provider().instance(IAddressBook.class,
216
-				AddressBookUids.defaultUserAddressbook(changUid));
216
+				IAddressBookUids.defaultUserAddressbook(changUid));
217 217
 		ab.create("test1", defaulVCard());
218 218
 		ab.create("test2", defaulVCard());
219 219
 		ab.create("test3", defaulVCard());
... ...
@@ -224,7 +224,7 @@ public class RestoreAddresBooksTaskTests {
224 224
 		new RestoreBooksTask(latestGen, restorable).run(new TestMonitor());
225 225
 
226 226
 		ab = testContext.provider().instance(IAddressBook.class,
227
-				AddressBookUids.defaultUserAddressbook(changUid));
227
+				IAddressBookUids.defaultUserAddressbook(changUid));
228 228
 		assertEquals(ImmutableSet.of("test1", "test2", "test3"), ImmutableSet.copyOf(ab.allUids()));
229 229
 	}
230 230
 
... ...
@@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory;
27 27
 
28 28
 import com.google.common.collect.Lists;
29 29
 
30
-import net.bluemind.addressbook.api.AddressBookUids;
30
+import net.bluemind.addressbook.api.IAddressBookUids;
31 31
 import net.bluemind.addressbook.api.IAddressBook;
32 32
 import net.bluemind.addressbook.api.VCard;
33 33
 import net.bluemind.addressbook.api.VCardChanges;
... ...
@@ -62,7 +62,7 @@ public class RestoreBooksTask implements IServerTask {
62 62
 			BmContext back = bdp.createContextWithData(backup, item);
63 63
 			BmContext live = ServerSideServiceProvider.getProvider(SecurityContext.SYSTEM).getContext();
64 64
 
65
-			ContainerQuery cq = ContainerQuery.ownerAndType(item.entryUid, AddressBookUids.TYPE);
65
+			ContainerQuery cq = ContainerQuery.ownerAndType(item.entryUid, IAddressBookUids.TYPE);
66 66
 
67 67
 			IContainers lContApi = live.provider().instance(IContainers.class);
68 68
 			List<ContainerDescriptor> liveABs = lContApi.all(cq);
... ...
@@ -38,7 +38,7 @@ import org.apache.james.mime4j.util.MimeUtil;
38 38
 import org.slf4j.Logger;
39 39
 import org.slf4j.LoggerFactory;
40 40
 
41
-import net.bluemind.addressbook.api.AddressBookUids;
41
+import net.bluemind.addressbook.api.IAddressBookUids;
42 42
 import net.bluemind.addressbook.api.IVCardService;
43 43
 import net.bluemind.core.api.fault.ServerFault;
44 44
 import net.bluemind.core.container.api.ContainerQuery;
... ...
@@ -87,7 +87,7 @@ public class SendUserBooksVCFTask implements IServerTask {
87 87
 			IServiceProvider live = ServerSideServiceProvider.getProvider(userContext);
88 88
 
89 89
 			IContainers containersService = live.instance(IContainers.class);
90
-			ContainerQuery cq = ContainerQuery.ownerAndType(userContext.getSubject(), AddressBookUids.TYPE);
90
+			ContainerQuery cq = ContainerQuery.ownerAndType(userContext.getSubject(), IAddressBookUids.TYPE);
91 91
 			List<ContainerDescriptor> books = containersService.all(cq);
92 92
 
93 93
 			Map<String, String> allVCards = new HashMap<String, String>(books.size());
... ...
@@ -32,7 +32,7 @@ import org.vertx.java.core.Handler;
32 32
 
33 33
 import com.google.common.collect.Lists;
34 34
 
35
-import net.bluemind.addressbook.api.AddressBookUids;
35
+import net.bluemind.addressbook.api.IAddressBookUids;
36 36
 import net.bluemind.addressbook.api.IAddressBook;
37 37
 import net.bluemind.addressbook.api.VCard;
38 38
 import net.bluemind.addressbook.api.VCard.Identification.FormatedName;
... ...
@@ -114,7 +114,7 @@ public class AddressBookXferTests {
114 114
 	@Test
115 115
 	public void testXferAB() {
116 116
 
117
-		String containerUid = AddressBookUids.defaultUserAddressbook(userUid);
117
+		String containerUid = IAddressBookUids.defaultUserAddressbook(userUid);
118 118
 
119 119
 		IAddressBook service = ServerSideServiceProvider.getProvider(context).instance(IAddressBook.class,
120 120
 				containerUid);
... ...
@@ -30,7 +30,7 @@ import com.google.common.collect.Sets;
30 30
 
31 31
 import io.airlift.airline.Arguments;
32 32
 import io.airlift.airline.Command;
33
-import net.bluemind.addressbook.api.AddressBookUids;
33
+import net.bluemind.addressbook.api.IAddressBookUids;
34 34
 import net.bluemind.backend.mail.replica.api.IDbByContainerReplicatedMailboxes;
35 35
 import net.bluemind.backend.mail.replica.api.MailReplicaContainerTypes;
36 36
 import net.bluemind.backend.mail.replica.api.MailboxReplica;
... ...
@@ -61,7 +61,7 @@ import net.bluemind.todolist.api.TodoListContainerType;
61 61
 @Command(name = "infos", description = "Show profile infos")
62 62
 public class ProfileInfosCommand implements ICmdLet, Runnable {
63 63
 
64
-	Set<String> mapiRelatedTypes = Sets.newHashSet(AddressBookUids.TYPE, CalendarContainerType.TYPE,
64
+	Set<String> mapiRelatedTypes = Sets.newHashSet(IAddressBookUids.TYPE, CalendarContainerType.TYPE,
65 65
 			MapiFolderContainer.TYPE, MapiFAIContainer.TYPE, MailReplicaContainerTypes.REPLICATED_MBOXES,
66 66
 			TodoListContainerType.TYPE);
67 67
 
... ...
@@ -23,7 +23,7 @@ import org.slf4j.Logger;
23 23
 import org.slf4j.LoggerFactory;
24 24
 import org.vertx.java.core.json.JsonObject;
25 25
 
26
-import net.bluemind.addressbook.api.AddressBookUids;
26
+import net.bluemind.addressbook.api.IAddressBookUids;
27 27
 import net.bluemind.calendar.api.CalendarContainerType;
28 28
 import net.bluemind.core.container.hooks.IAclHook;
29 29
 import net.bluemind.core.container.model.ContainerDescriptor;
... ...
@@ -47,7 +47,7 @@ public class DelegationEventsConsumer implements IAclHook {
47 47
 	public void onAclChanged(BmContext context, ContainerDescriptor container, List<AccessControlEntry> previous,
48 48
 			List<AccessControlEntry> current) {
49 49
 		switch (container.type) {
50
-		case AddressBookUids.TYPE:
50
+		case IAddressBookUids.TYPE:
51 51
 		case TodoListContainerType.TYPE:
52 52
 		case CalendarContainerType.TYPE:
53 53
 		case MailboxAclContainerType.TYPE:
... ...
@@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory;
27 27
 
28 28
 import com.google.common.base.Strings;
29 29
 
30
-import net.bluemind.addressbook.api.AddressBookUids;
30
+import net.bluemind.addressbook.api.IAddressBookUids;
31 31
 import net.bluemind.addressbook.api.IAddressBook;
32 32
 import net.bluemind.addressbook.api.VCardInfo;
33 33
 import net.bluemind.addressbook.api.VCardQuery;
... ...
@@ -73,7 +73,7 @@ public class MapiService implements IMapi {
73 73
 	@Override
74 74
 	public List<Long> searchGAL(String query) throws ServerFault {
75 75
 		IAddressBook addrApi = context.provider().instance(IAddressBook.class,
76
-				AddressBookUids.userVCards(domainUid));
76
+				IAddressBookUids.userVCards(domainUid));
77 77
 		ListResult<ItemValue<VCardInfo>> search = addrApi.search(VCardQuery.create(query));
78 78
 		List<String> uids = search.values.stream().map(val -> val.uid).collect(Collectors.toList());
79 79
 
... ...
@@ -22,7 +22,7 @@ import java.util.List;
22 22
 import org.slf4j.Logger;
23 23
 import org.slf4j.LoggerFactory;
24 24
 
25
-import net.bluemind.addressbook.api.AddressBookUids;
25
+import net.bluemind.addressbook.api.IAddressBookUids;
26 26
 import net.bluemind.core.api.fault.ServerFault;
27 27
 import net.bluemind.core.container.api.ContainerHierarchyNode;
28 28
 import net.bluemind.core.container.api.internal.IInternalContainersFlatHierarchy;
... ...
@@ -77,7 +77,7 @@ public class PublicFolderHierarchyHook implements IContainersHook {
77 77
 		if (owner == null) {
78 78
 			logger.warn("Owner not found in directory, Nothing to do on {} owned by {}", cd.uid, cd.owner);
79 79
 		} else if (owner.kind == Kind.MAILSHARE || owner.kind == Kind.CALENDAR || owner.kind == Kind.ADDRESSBOOK) {
80
-			if (cd.uid.equals(AddressBookUids.userVCards(cd.domainUid))) {
80
+			if (cd.uid.equals(IAddressBookUids.userVCards(cd.domainUid))) {
81 81
 				logger.warn("Nothing to do on directory ab {}", cd.uid);
82 82
 			} else {
83 83
 				logger.info("Operation with owner.kind {}", owner.kind);
... ...
@@ -22,7 +22,7 @@ import javax.xml.namespace.QName;
22 22
 
23 23
 import com.google.common.collect.ImmutableList;
24 24
 
25
-import net.bluemind.addressbook.api.AddressBookUids;
25
+import net.bluemind.addressbook.api.IAddressBookUids;
26 26
 import net.bluemind.dav.server.Proxy;
27 27
 import net.bluemind.dav.server.proto.IPropertyValue;
28 28
 import net.bluemind.dav.server.proto.NS;
... ...
@@ -53,7 +53,7 @@ public class AddressbookHomeSet extends HrefSet {
53 53
 	public void fetch(LoggedCore lc, DavResource dr) throws Exception {
54 54
 		String uid = dr.getUid();
55 55
 		hrefs = ImmutableList.of(Proxy.path + "/addressbooks/__uids__/" + dr.getUid() + "/"
56
-				+ AddressBookUids.defaultUserAddressbook(uid) + "/");
56
+				+ IAddressBookUids.defaultUserAddressbook(uid) + "/");
57 57
 	}
58 58
 
59 59
 }
... ...
@@ -29,7 +29,7 @@ import org.vertx.java.core.shareddata.Shareable;
29 29
 import com.google.common.base.Throwables;
30 30
 import com.google.common.collect.ImmutableMap;
31 31
 
32
-import net.bluemind.addressbook.api.AddressBookUids;
32
+import net.bluemind.addressbook.api.IAddressBookUids;
33 33
 import net.bluemind.addressbook.api.IAddressBook;
34 34
 import net.bluemind.authentication.api.AuthUser;
35 35
 import net.bluemind.authentication.api.IAuthentication;
... ...
@@ -144,7 +144,7 @@ public final class LoggedCore implements Shareable {
144 144
 	public Map<String, ContainerDescriptor> getBooks() {
145 145
 		try {
146 146
 			IContainers containers = core.instance(IContainers.class);
147
-			String bookUid = AddressBookUids.defaultUserAddressbook(user.uid);
147
+			String bookUid = IAddressBookUids.defaultUserAddressbook(user.uid);
148 148
 			ContainerDescriptor cd = containers.get(bookUid);
149 149
 			Map<String, ContainerDescriptor> ret = ImmutableMap.of(bookUid, cd);
150 150
 			return ret;
... ...
@@ -23,7 +23,7 @@ import java.util.List;
23 23
 import java.util.Optional;
24 24
 import java.util.stream.Collectors;
25 25
 
26
-import net.bluemind.addressbook.api.AddressBookUids;
26
+import net.bluemind.addressbook.api.IAddressBookUids;
27 27
 import net.bluemind.backend.mail.api.IMailboxFolders;
28 28
 import net.bluemind.backend.mail.api.MailboxFolder;
29 29
 import net.bluemind.backend.mail.replica.api.MailReplicaContainerTypes;
... ...
@@ -371,7 +371,7 @@ public class FolderBackend extends CoreConnect {
371 371
 			name = folder.value.name;
372 372
 			break;
373 373
 		case "addressbook":
374
-			if (AddressBookUids.defaultUserAddressbook(bs.getUser().getUid())
374
+			if (IAddressBookUids.defaultUserAddressbook(bs.getUser().getUid())
375 375
 					.equals(folder.value.containerUid)) {
376 376
 				type = FolderType.DEFAULT_CONTACTS_FOLDER;
377 377
 			} else {
... ...
@@ -433,7 +433,7 @@ public class FolderBackend extends CoreConnect {
433 433
 			name = h.value.name;
434 434
 			break;
435 435
 		case "addressbook":
436
-			if (AddressBookUids.defaultUserAddressbook(bs.getUser().getUid())
436
+			if (IAddressBookUids.defaultUserAddressbook(bs.getUser().getUid())
437 437
 					.equals(container.value.containerUid)) {
438 438
 				type = FolderType.DEFAULT_CONTACTS_FOLDER;
439 439
 			} else {
... ...
@@ -22,7 +22,7 @@ import org.slf4j.Logger;
22 22
 import org.slf4j.LoggerFactory;
23 23
 import org.vertx.java.core.eventbus.EventBus;
24 24
 
25
-import net.bluemind.addressbook.api.AddressBookUids;
25
+import net.bluemind.addressbook.api.IAddressBookUids;
26 26
 import net.bluemind.core.container.api.ContainerHierarchyNode;
27 27
 import net.bluemind.eas.backend.HierarchyNode;
28 28
 import net.bluemind.eas.dto.EasBusEndpoints;
... ...
@@ -59,7 +59,7 @@ public class ContactNotificationHandler implements OutOfProcessMessageHandler {
59 59
 
60 60
 		try {
61 61
 			HierarchyNode node = store.getHierarchyNode(domainUid, userUid,
62
-					ContainerHierarchyNode.uidFor(container, AddressBookUids.TYPE, domainUid));
62
+					ContainerHierarchyNode.uidFor(container, IAddressBookUids.TYPE, domainUid));
63 63
 			PushTrigger pt = PushTrigger.forCollection((int) node.collectionId);
64 64
 			LocalJsonObject<PushTrigger> jso = new LocalJsonObject<>(pt);
65 65
 			eb.send(EasBusEndpoints.PUSH_TRIGGER, jso);
... ...
@@ -18,7 +18,7 @@
18 18
  */
19 19
 package net.bluemind.ui.gwtuser.client;
20 20
 
21
-import net.bluemind.addressbook.api.AddressBookUids;
21
+import net.bluemind.addressbook.api.IAddressBookUids;
22 22
 import net.bluemind.core.container.api.ContainerSubscriptionDescriptor;
23 23
 import net.bluemind.gwtconsoleapp.base.editor.WidgetElement;
24 24
 import net.bluemind.gwtconsoleapp.base.editor.gwt.GwtWidgetElement;
... ...
@@ -32,7 +32,7 @@ public class BooksSubscriptionsEditor extends BaseSubscriptionsEditor {
32 32
 	public static final String TYPE = "bm.user.BooksSubscriptionsEditor";
33 33
 
34 34
 	public BooksSubscriptionsEditor() {
35
-		super(AddressBookUids.TYPE);
35
+		super(IAddressBookUids.TYPE);
36 36
 	}
37 37
 
38 38
 	@Override
... ...
@@ -18,7 +18,7 @@
18 18
  */
19 19
 package net.bluemind.ui.gwtuser.client;
20 20
 
21
-import net.bluemind.addressbook.api.AddressBookUids;
21
+import net.bluemind.addressbook.api.IAddressBookUids;
22 22
 import net.bluemind.core.container.api.ContainerSubscriptionDescriptor;
23 23
 import net.bluemind.gwtconsoleapp.base.editor.WidgetElement;
24 24
 import net.bluemind.gwtconsoleapp.base.editor.gwt.GwtWidgetElement;
... ...
@@ -31,7 +31,7 @@ public class UserBooksSubscriptionEditor extends BaseSubscriptionsEditor {
31 31
 	public static final String TYPE = "bm.user.BooksSubscriptionsEditor";
32 32
 
33 33
 	public UserBooksSubscriptionEditor() {
34
-		super(AddressBookUids.TYPE);
34
+		super(IAddressBookUids.TYPE);
35 35
 	}
36 36
 
37 37
 	@Override
... ...
@@ -18,7 +18,7 @@
18 18
  */
19 19
 package net.bluemind.ui.gwtuser.client;
20 20
 
21
-import net.bluemind.addressbook.api.AddressBookUids;
21
+import net.bluemind.addressbook.api.IAddressBookUids;
22 22
 import net.bluemind.gwtconsoleapp.base.editor.gwt.GwtModelHandler;
23 23
 import net.bluemind.gwtconsoleapp.base.editor.gwt.IGwtDelegateFactory;
24 24
 import net.bluemind.gwtconsoleapp.base.editor.gwt.IGwtModelHandler;
... ...
@@ -28,7 +28,7 @@ public class UserBooksSubscriptionModelHandler extends UserSubscriptionModelHand
28 28
 	public static final String TYPE = "bm.user.UserBooksSubscriptionModelHandler";
29 29
 
30 30
 	public UserBooksSubscriptionModelHandler() {
31
-		super(AddressBookUids.TYPE);
31
+		super(IAddressBookUids.TYPE);
32 32
 	}
33 33
 
34 34
 	public static void registerType() {