The client source is not availble.
If you want to take a look at the api which the client uses, you can head to collab.netbeans.org and take a look there (http://collab.netbeans.org/source/browse/collab/service/src/org/netbeans/lib/c ollab/).
What exactly are you looking for ?
If you want snippets on how to use the api, you can take a look at the various methods in http://collab.netbeans.org/source/browse/collab/service/src/org/netbeans/lib/co llab/tools/Shell.java
Regards,
Mridul
I am wanting to automate the creation of conference rooms. I want pull users from the LDAP based upon a role attribute and create conference rooms based upon these roles. I also want to continually sync the LDAP role query with the conference room (add and delete users based upon current role-based LDAP query). Should I be trying to use the Shell.java file as a shell to do this or should I just look at the way that it uses the interface?
Hi,
I am not sure how you will manage the ldap sync (dynamic query of some sort ?), but yes you can manage this with the IM api.
Essentially what you would do is : as and when a user 'gets' access to a conference or 'loses' access to a conference (or maybe just acl change - like read access or write access : whatever is your required behaviour) -> you will need to modify the room configuration data for that jid as the moderator/owner.
There should be api which allow you to (re)configure a public conference - you an refer to Shell.java for basic snippet of how this can be done.
You will essentially need
a) to lookup the Conference to be modified (if you have reference to this with you already, skip this step) as the moderator.
b) Change the acl using conference.setPrivilege() method to change the conference membership/permission.
c) Typically, you will have the default access in the conference set to Confereence.NONE (or Confereence.LISTEN if you want to allow users to always 'see' but not post) so that only user's who have been granted access explictly are allowed to read/write.
Hope this helps,
Regards,
Mridul
I have used the netbeans collab library files as a template for accessing the IM API. I have written an application to login into the IM server as the IM Administrator and display the access list of a given conference. It seems that the access enumerations are different between the Conference.java file and what I am receiving back from the API. NONE is the same, READ(LISTEN) is the same, but WRITE(6) is not the same enumeration as PUBLISH(4), and MANAGE(30 from API) is not the same as MANAGE(10 from Conference.java). How can I rectify this situation?
Hi,
The values in Conference.java (hex values actually) are bitmasks.
That is you will do something like
if ((level & Conference.MANAGE) == Conference.MANAGE) { /* manage allowed */ }
, etc
So do not try to equate the value with what is in Conference.java, but 'and' it with the bit masks there to get the supported level.
Regards,
Mridul
Thanks for the info. However, I am still a bit confused. Hexidecimal numbers 6 and 30 do not perform well when bit masked. For example, if 6 (binary 0110) is bit masked with 2 (binary 0010) the answer is 2 (binary 0010). Yet, the same value of 6 (binary 0110) bit masked with 4 (binary 0100) yields 4 (binary 0100) also. Thus, the value matched two separate cases. I have ordered the cases such that the answer comes out OK but this seems quite kludgy. Am I misunderstanding something?
The idea is like this :
A participant with manage access would typically also have read and write access.
So his access level would be "MANAGE | READ | WRITE".
But a participant with only write and read access will have his access level as "READ | WRITE"
In both cases, the participants have read and write access.
So, given their level L1, you can do this ->
To find if level has read : (L1 & Conference.READ) == Conference.READ
for write : (L1 & Conference.WRITE) == Conference.WRITE
and for moderate : (L1 & Conference.MODERATE) == Conference.MODERATE
Now, only the moderator will pass the last test, while both users above will pass the read and write test.
The value returned is populated as a bitfield, with each access level (read/write/moderate/etc) represented as a bit which is ON or OFF to indicate access or not.
So to answer your question, a single participant can have multiple access's - like moderator being able to read, write and moderate : so the bit field returned as access is not a single value but a combination of all access levels.
Hope this helps,
Regards,
Mridul