Alberto wrote:
> Damian Krzeminski ha scritto:
>>
>>
>> There is a SpeedDialManager.getSpeedDialForUserId
>>
>> You'll need to inject "speadDialManager" bean into SnomPhone class. Check
>> out how it is injected in PhoneContextImpl - you need modify both the java
>> code and *.beans.xml file.
>>
>> And once you have a user you can call it like that:
>> m_speedDialManager.getSpeedDialForUserId(user.getId(), false);
>>
>> D.
>>
>>
>>   
> Hi Damian,
> I built the plug-in and tested it on a sipxecs 4.0.2 and it worked very
> well. Thanks.

Thanks. I fixed and updated couple of things in your patch. Please retest
it. It's attached here:
http://track.sipfoundry.org/browse/XX-5475

I would like you to review all the changes to expected-snom-360.xml. They
should corresponds to the changes in the settings that you made.

If you want to provide more detailed description for the commit (I only can
say BLF + some parameters changed ;-)  just add it as a comment to the issue.

> 
> On the other side while debugging the code in Eclipse I always see the
> m_speedDialManager object null.

Are you debugging tests? Or are you debugging running application. If you
are debugging tests - you will not really see Spring injections. Spring IOC
would only work in integration or DB tests and only for Spring beans (not
for phones or objects loaded from DB).
In tests we usually inject mocks or dummy objects into tested classes.
That's one of the advantages of using IoC (such as Spring): it makes
testing easy. Please have a look at the updated patch.


> I'm not very skilled with Spring so: is there any other thing I need to
> set in the snom plugin project to correctly inject the SpeedDialManager
> object at runtime?

Nope. You did great. The only thing is sipXconfig uses m_ convention for
private fields (checkstyle complained about it).

> Is the object null cause I'm not working on a EDE and I just checked out
> a couple of sipxecs projects on my Eclipse on Windows?

Not using EDE is fine: it might be an overkill if you are just working on
one plug-in. But please make sure your Eclipse is configured to use Unix
lien endings. Eclipse is usually pretty good about it: I think that by
default it keeps the line endings that are already in the file. But in your
patch there were many LFCR endings.

> 
> I know how to add a specific setting to different phone model. Can I do
> something similar with settings defaults?
> In other words: I'd like to have a different default for Snom 360 and
> 370 than for other models.

I am not sure. You probably need to add 2 settings and use conditionals.
Use different names but the same ProfileName. And of course different values...

> 
> Thanks in advance
> Alberto
> 

_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/

Reply via email to