PL/SQL procedure documentation

PL/SQL procedure documentation

Following PL/SQL procedures and functions are invoked by the nsjabber-module. Please mind that some procedures are not useful for the datamodel of the OACS, specially those dealing with a conference room ID, because the conference room is implemented as an object so we cannot query the room ID, but this procedures have to be defined, because the nsjabber-module uses those procedures to be for general use.



Procedure jb_reg_validation

Overview

   Validates whether user is in the database. If the user is in the database his regstate is changed.

Syntax

   jb_reg_validation  screen_in  regstate

Return

   No return

Description

   Screen_in is the Jabber screen name of the user, who should be validated, and regstate is the new regstate for this user.




Procedure jb_update_status

Overview

   Update user's online status.

Syntax

   jb_update_status  status_in   resourc_in   screen_in   service_in

Return

   No return

Description

   Status_in is the new online status
   resourc_in is the resource of the user (whether he is at home or...)
   screen_in is the screen name of the user
   service_in is the IM service of the user




Procedure jb_clear_status

Overview

   Puts every status and resource on offline when the Jabber server logs in or out.

Syntax

   jb_clear_status

Return

   No return

Description

   When the Jabber server logs in or out every status and resource is put on offline.




Function jb_subscription_check

Overview

   Checks whether a certain Jabber ID is in our subscription table, which stores Jabber IDs, which need approval by the user.

Syntax

   jb_subscription_check  jid_in

Return

   Returns 0 if Jabber ID is not in jb_subscription_request, otherwise returns number n of subscription requests for this Jabber ID.

Description

   jid_in is the requested Jabber ID.




Procedure jb_subscription_insert

Overview

   Inserts a new subscription request into the database.

Syntax

   jb_subscription_insert  jid_in

Return

   No return

Description

   jid_in is the Jabber ID, which should be inserted.




Procedure jb_subscription_del

Overview

   Removes a subscription from the database.

Syntax

   jb_subscription_del  jid_in

Return

   No return

Description

   jid_in is the Jabber ID, which should be removed from the database.




Function jb_get_user_id

Overview

   Gets the user_id for a given Jabber screen name.

Syntax

   jb_get_user_id  screen_in

Return

   Returns the user_id

Description

   screen_in is the Jabber screen name for which you want to get the user ID.




Function jb_get_jid

Overview

   Gets the Jabber ID for a given user ID.

Syntax

   jb_get_jid  user_id_in

Return

   Returns the Jabber ID

Description

   user_id_in is the User ID for which you want to get the Jabber ID.




Procedure jb_conference_thread_finish

Overview

   Finishes a conference room thread.

Syntax

   jb_conference_thread_finish  thread_id_in

Return

   No return

Description

   thread_id_in is the Conference Room Thread ID for the thread, which should be finished.




Procedure jb_conference_thread_new

Overview

   Creates a new thread for a certain Conference Room.

Syntax

   jb_conference_thread_new  thread_id_in   room_id_in   subject_in   creator_jid   creator_user_id

Return

   No return

Description

   thread_id_in is the new Thread ID
   room_id_in is the Room ID for which a new thread is created
   subject_in is the subject for this thread
   creator_jid is the Jabber ID of the creator of this thread
   creator_user_id is the User ID of the creator of this thread




Procedure jb_conference_message

Overview

   Inserts a message in the database (jb_conference_protocols).

Syntax

   jb_conference_message  jid_in   message_in   room_id_in   thread_id_in   user_id_in

Return

   No return

Description

   jid_in is the Jabber ID of the user who has written the message
   message_in is the message
   room_id_in is the Conference Room in which this message was written
   thread_id_in is the Conference Room Thread in which this message was written
   user_id_in is the User ID of the user who has written the message




Function jb_conference_room_check

Overview

   Checks whether a Conference Room exists for a given room name.

Syntax

   jb_conference_room_check  room_name_in

Return

   Returns a room ID on success, otherwise -1 is returned

Description

   room_name_in is the room name, which should be checked.




Procedure jb_conference_rooms_new

Overview

   Creates a new Conference Room.

Syntax

   jb_conference_rooms_new  room_id_in   user_id_in   creator_jid_in   name_in   description_in

Return

   No return

Description

   room_id_in is irrelevant for OACS datamodel, because we get the ID from acs_objects, but we have to give the procedure a room ID to not generate an error
   user_id_in is the user ID of the creator
   creator_jid_in is the Jabber ID of the creator
   name_in is the name of the new Conference Room
   description_in is the description of the new Conference Room
  
   This procedure invokes the jb_conference_room.new procedure to create a new conference room




Function jb_conference_next_room_id

Overview

   Gets a room ID (irrelevant for OACS datamodel. Function returns an integer value so the nsjabber module doesn't generates an error.

Syntax

   jb_conference_next_room_id

Return

   Returns an integer value

Description

   This procedure doesn't get a room ID, it only returns an integer value. This ID is used to create a new Conference Room,
   but as seen in the procedure jb_conference_rooms_new we don't use the room_id.




Function jb_conference_next_thread_id

Overview

   Gets a new Conference Room Thread ID.

Syntax

   jb_conference_next_thread_id

Return

   Returns a thread ID

Description

   Gets a new thread ID from the corresponding sequence.