How to change the chat room settings/properties via code not Console

Hello all,

I want to make the permamnent/moderated chat rooms . It is needed to me. How can I do the same with the help of the code. I know how to make it from console but i dont know how to achieve it using the code.

Please help me. The below is my code to create a chat room.

MultiUserChat privateRoom = new MultiUserChat(connection, groupName+"@conference.abc.com");

try {

//create(CCMStaticVariable.loginUserId);

privateRoom.join(CCMStaticVariable.loginUserId);

privateRoom.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));

System.out.println(“Room Created!!!”);

privateRoom.grantMembership(CCMStaticVariable.loginUserId+"@abc. com");

privateRoom.sendMessage(" ");

I only know this much about the rooms creation. Can you please help me further in Room Chat and to set the room properties WITH THE HELP OF CODE.

Thanks

Waiting for your reply.