Changes for page Instance API

Last modified by Admin on 2024/03/28 10:57

<
From version < 4.3 >
edited by Admin
on 2016/10/11 01:03
To version < 5.1 >
edited by Vincent Massol
on 2016/10/24 10:03
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.Admin
1 +xwiki:XWiki.VincentMassol
EXOExtensionCode.ExtensionClass[0]
Bundled With
... ... @@ -1,1 +1,1 @@
1 -enterprise manager
1 +enterprise
ExtensionCode.ExtensionClass[0]
Description
... ... @@ -4,11 +4,13 @@
4 4  
5 5  {{code language="java"}}
6 6  @Inject
7 -private InstanceIdManager idManager;
7 +private Provider<InstanceIdManager> idManagerProvider;
8 8  {{/code}}
9 9  
10 -The API is then:
10 +Note the usage of a ##Provider##. This is required only when the component in which you're injecting the Instance Id Manager is loaded **before** the XWiki Store has been initialized.
11 11  
12 +The API is:
13 +
12 12  {{code language="java"}}
13 13  public interface InstanceIdManager
14 14  {
... ... @@ -16,11 +16,6 @@
16 16   * @return the Instance id or null if it isn't set
17 17   */
18 18   InstanceId getInstanceId();
19 -
20 - /**
21 - * Generate and save a unique instance id in the database if one isn't already there.
22 - */
23 - void initializeInstanceId();
24 24  }
25 25  {{/code}}
26 26  

Get Connected