Changes for page Instance API
Last modified by Admin on 2024/03/28 10:57
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. Admin1 +xwiki:XWiki.VincentMassol
- EXOExtensionCode.ExtensionClass[0]
-
- Bundled With
-
... ... @@ -1,1 +1,1 @@ 1 -enterprise manager1 +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 - TheAPI 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