Changes for page Local Observation Module

Last modified by Manuel Leduc on 2023/10/10 13:59

<
From version < 5.1 >
edited by Thomas Mortagne
on 2014/01/17 13:44
To version < 6.1 >
edited by Thomas Mortagne
on 2014/02/13 14:40
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -39,8 +39,10 @@
39 39  import java.util.List;
40 40  import java.util.Map;
41 41  
42 +import javax.inject.Inject;
43 +import javax.inject.Named;
44 +
42 42  import org.xwiki.component.annotation.Component;
43 -import org.xwiki.component.annotation.Requirement;
44 44  import org.xwiki.component.manager.ComponentLookupException;
45 45  import org.xwiki.component.manager.ComponentManager;
46 46  import org.xwiki.model.reference.DocumentReference;
... ... @@ -53,10 +53,11 @@
53 53  
54 54  import com.example.event.UserCreationEvent;
55 55  
56 -@Component("usercreation")
58 +@Component
59 +@Named("usercreation")
57 57  public class UserCreationEventListener extends AbstractEventListener
58 58  {
59 - @Requirement
62 + @Inject
60 60   private ComponentManager componentManager;
61 61  
62 62   /**
... ... @@ -118,8 +118,10 @@
118 118  import java.util.List;
119 119  import java.util.Map;
120 120  
124 +import javax.inject.Inject;
125 +import javax.inject.Named;
126 +
121 121  import org.xwiki.component.annotation.Component;
122 -import org.xwiki.component.annotation.Requirement;
123 123  import org.xwiki.component.manager.ComponentLookupException;
124 124  import org.xwiki.component.manager.ComponentManager;
125 125  import org.xwiki.model.reference.DocumentReference;
... ... @@ -132,11 +132,11 @@
132 132  
133 133  import com.example.event.UserCreationEvent;
134 134  
135 -@Component("usercreation")
140 +@Component
141 +@Named("usercreation")
136 136  public class UserCreationEventListener implements EventListener
137 137  {
138 -
139 - @Requirement
144 + @Inject
140 140   private ComponentManager componentManager;
141 141  
142 142   /**

Get Connected