powered by Jive Software

How to set the property of openfire using api's

Hi All,

Right now I am using openfire console to do different settings.for example for default room setting i m checking the check box and saving the settings.But I want some apis so that I can do it through my code ? any idea how we can do it?I don’t want to do it manually.

The Openfire API would only be available to a plugin. The code has to be running in the same VM. If you want remote access, you would have to write a plugin that you can send message to which will update the internal properties.

I don’t think any such plugin currently exists, but it wouldn’t be hard to write.

But I have searched for api’s I am not able to get any api.Can you please specify the api’s which can do that?

Most properties use JiveGlobals to get/set. But this only changes properties stored in the properties table in the database. Most general key/value pairs are stored there.

There may be others that are stored in more module specific locations, but you would have to track those down on a case by case basis.

I am trying the below code to do some configuration in openfire server But I am not able to that.If I open the console after running this code It doesn’t chage the peroperty in the openifire console.I have written the plugin to do this.Plugin is running fine but its not setting the propeties.

Map<String,String> m= new HashMap<String,String>();

m.put(“muc.room.canOccupantsChangeSubject”, “true”);



I used this also but this also don’t change the property in openfire console:

System.out.println(JiveGlobals.getBooleanProperty(“muc.room.canOccupantsChangeSu bject”,true));

any help?