2 Replies Latest reply on Feb 6, 2014 7:36 AM by kyanring

    Jive 6 Override classes for adding activity to activity stream.

    valery_yahorau

      Hi all.

       

      So i researched how jive add Activity (for example about creating of new Social Group) in activity stream.

       

      But i can't understand how can override classe for this proccess. For example if i don't want to add Activity about creating of SocialGroup.


      This listener com.jivesoftware.community.eae.event.listeners.ContainerEventListener call
      com.jivesoftware.community.eae.event.handlers.GenericContainerEventHandler to handle event and call manager

      com.jivesoftware.community.eae.proxy.ActivityManagerProxy  to add new Activity.

       

      but I can't find any of these classes in spring.xml files.

       

      Any idea for this issue ? Ryan Rutan  Ryan King

        • Re: Jive 6 Override classes for adding activity to activity stream.
          dzmitry_h

          <bean id="containerActivitylistener" class="com.jivesoftware.community.impl.activity.ContainerEventListener">

                  <property name="activityManager" ref="oldActivityManagerImpl"/>

                  <property name="objectTypeManager" ref="objectTypeManagerImpl"/>

              </bean>

           

          spring-eventContext.xml

           

          <bean id="genericContainerEventHandler"

                    class="com.jivesoftware.community.eae.event.handlers.GenericContainerEventHandler"

                    parent="baseContainerEventHandler">

                  <property name="activityManager" ref="activityManager"/>

                  <property name="supportedModificationTypes">

                      <util:set>

                          <value>View</value>

                          <value>Create</value>

                          <value>Modify</value>

                      </util:set>

                  </property>

              </bean>

           

          <bean id="activityManager" class="com.jivesoftware.community.eae.proxy.ActivityManagerProxy">

                  <property name="activityManager" ref="activityManagerImpl"/>

                  <property name="streamManager" ref="streamManager"/>

                  <property name="authenticationProvider" ref="authenticationProvider"/>

              </bean>

           

          spring-eaeProxyContext.xml

          1 person found this helpful
          • Re: Jive 6 Override classes for adding activity to activity stream.

            If you're trying to add behavior in response to an action, such as adding a Social Group, all you need to do is create a listener that implements EventListener<T>.  Including this class in your plugin's spring.xml file will cause the event listener to be automatically registered to listen for events.

             

            However, if you're looking to modify existing behavior, overriding the core Spring beans, while discouraged, is the the way to go.  Just be mindful that if another plugin you install on your instance happens to override the same Spring bean, you'll run into a conflict and only one plugin will win.