2 Replies Latest reply: Feb 22, 2012 12:04 AM by 917582 RSS

    How to create two different implementation class for a Control

    917582
      Hi,

      I am a newbie to beehieve. I want to know that is it possible to create two different 'Impl' classes for a Control. If yes then how do we instantiate them ? How can we chain them (something like calling one 'Impl' from the other one? Thanks in Advance!!!

      Regards,
      Abhishek
        • 1. Re: How to create two different implementation class for a Control
          Mpaterso-Oracle
          You'll have to provide a lot more details.Are you trying to use the Beehive BDK?
          • 2. Re: How to create two different implementation class for a Control
            917582
            hi mpaterso,

            Yes i am using beehieve BDK.

            My control Interface is



            import org.apache.beehive.controls.api.bean.ControlInterface;

            @ControlInterface
            public interface WomtConfigurationHelper {
                 ................................
            }


            The implementation class is:

            @ControlImplementation
            public class WomtConfigurationHelperImpl implements WomtConfigurationHelper, Serializable {

            @Control
                 private CodeMappingControl codeMappingsControl;

                 
                 @Control
                 private WomitWorkOrderHelper womitWorkOrderHelper;

                 @org.apache.beehive.controls.api.bean.Control
                 private com.telenorcinclus.fortum.womt.workorder.common.controls.WorkOrderValidationControl
            workOrderValidationControl;


            .......................
            ........................
            }


            Now i have created another implementation class (newly created)

            @ControlImplementation
            public class WomtConfigurationHelperRulesEngine implements WomtConfigurationHelper, Serializable {

            ....................
            }

            Now, what i need is whenever i add the WomtConfigurationHelper control like this : -

                 @org.apache.beehive.controls.api.bean.Control
                 WomtConfigurationHelper womtConfigurationHelper;

            the newly created class (WomtConfigurationHelperRulesEngine) should be instantiated and passed. and then from WomtConfigurationHelperRulesEngine i should be able to able to instantiate and access WomtConfigurationHelperImpl for redirecting the calls. All i want is to intercept the WomtConfigurationHelperImpl to do some pre-processing.



            -Abhishek