oracle8.1.6
begin
:1 := chat_room.new (
pretty_name => :pretty_name,
moderated_p => :moderated_p,
description => :description,
active_p => :active_p,
archive_p => :archive_p,
context_id => :context_id,
creation_user => :creation_user,
creation_ip => :creation_ip
);
end;
begin
-- Automatic grant room privilege to creator of the room (must not be null).
if :creation_user <> ''
then
acs_permission.grant_permission(:room_id, :creation_user, 'chat_room_edit');
acs_permission.grant_permission(:room_id, :creation_user, 'chat_room_view');
acs_permission.grant_permission(:room_id, :creation_user, 'chat_room_delete');
acs_permission.grant_permission(:room_id, :creation_user, 'chat_transcript_create');
end if;
end;
select pretty_name from chat_rooms where room_id = :room_id
begin
:1 := person.name(:user_id);
end;
begin
acs_permission.grant_permission(:room_id, :party_id, 'chat_write');
acs_permission.grant_permission(:room_id, :party_id, 'chat_read');
end;
begin
acs_permission.revoke_permission(:room_id, :party_id, 'chat_write');
acs_permission.revoke_permission(:room_id, :party_id, 'chat_read');
end;
begin
acs_permission.grant_permission(:room_id, :party_id, 'chat_ban');
end;
begin
acs_permission.revoke_permission(:room_id, :party_id, 'chat_ban');
end;
begin
acs_permission.grant_permission(:room_id, :party_id, 'chat_room_moderate');
end;
begin
acs_permission.revoke_permission(:room_id, :party_id, 'chat_room_moderate');
end;
begin
chat_room.edit (
room_id => :room_id,
pretty_name => :pretty_name,
description => :description,
moderated_p => :moderated_p,
active_p => :active_p,
archive_p => :archive_p,
auto_flush_p => :auto_flush_p,
auto_transcript_p => :auto_transcript_p
);
end;
begin
:1 := chat_room.message_count(:room_id);
end;
begin
chat_room.delete_all_msgs(:room_id);
end;
begin
:1 := chat_transcript.new (
pretty_name => :pretty_name,
contents => empty_clob(),
description => :description,
room_id => :room_id,
context_id => :context_id,
creation_user => :creation_user,
creation_ip => :creation_ip
);
end;
begin
-- Automatic grant transcript privilege to creator of the transcript (must not be null).
if :creation_user is not null
then
acs_permission.grant_permission(:transcript_id, :creation_user, 'chat_transcript_edit');
acs_permission.grant_permission(:transcript_id, :creation_user, 'chat_transcript_view');
acs_permission.grant_permission(:transcript_id, :creation_user, 'chat_transcript_delete');
end if;
end;
begin
chat_transcript.del(:transcript_id);
end;
begin
chat_room.message_post (
room_id => :room_id,
msg => :msg,
creation_user => :creation_user,
creation_ip => :creation_ip
);
end;
begin
chat_room.del(:room_id);
end;
begin
chat_transcript.edit(
transcript_id => :transcript_id,
pretty_name => :pretty_name,
contents => empty_clob(),
description => :description);
end;