Projects tigase _server server-core Issues #1379
dynamic roster (#1379)
Closed
Unknown opened 5 years ago

Dynamic roster is not working.

i followed the documentation to configure a dynamic roster:

from tigase documentation:

Configuration DynamicRoster implementation class should be configured in the config.tdsl file. As it’s an extension to the PresenceState, PresenceSubscription and Roster plugins classes should be configured either for each plugin:

'sess-man' () {
    'jabber:iq:roster' () {
        'dynamic-roster-classes' = 'class1.tigase.com,class2.tigase.com'
    }
    'presence-state' () {
        'dynamic-roster-classes' = 'classList.rosterImplementation.tigase'
    }
    'presence-subscription' () {
        'dynamic-roster-classes' = 'class2.custom.roster,another.class.dynamicRoster'
    }
}

or globally:

'sess-man' () {
    'dynamic-rosters' () {
        class (class: custom.dynamicRoster.class) {}
    }
}

i did the same:

implement DynamicRosterIfc:

public class CmmsRosterPlugin implements DynamicRosterIfc {

in config.tdsl:

'dynamic-rosters' () {
'sess-man' () {
..
       class (class: com.audiocodes.tigase.CmmsRosterPlugin) {
            'roster-in-e164' = 'true'
           }
    }

..
}

i config i don't see the init function triggers.

Unknown commented 5 years ago

I assume this is a type-o in your config and you intended use:

'sess-man' () {
    'dynamic-rosters' () {
        class (class: com.audiocodes.tigase.CmmsRosterPlugin) {
            'roster-in-e164' = 'true'
        }
    }
}

init() methods are no longer use and you use TigaseKernel capabilities - you simply annote your fields with @ConfigField annotation:

public class CmmsRosterPlugin implements DynamicRosterIfc {
    @ConfigField(desc = "test")
    private boolean roster-in-e164; // you can initialise it here with default value as well
…
}

and with your above config your roster-in-e164 variable will be set to true

Unknown commented 5 years ago

Thanks it works for me now.

I guess the init method in the DynamicRosterIfc should be marked as deprecated.

Unknown commented 5 years ago
issue 1 of 1
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1379
Please wait...
Page is in error, reload to recover