Index: openacs-4/contrib/obsolete-packages/bboard/ChangeLog =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/ChangeLog,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/ChangeLog 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,116 @@ +2001-01-03 Anukul Kapoor + + * www/message.tcl, www/message-threaded.tcl: fixed problem where + "deleted" messages are displayed + + * www/doc/index.html, www/doc/requirements.html: slight + documentation improvements + + * bboard.info: changed version to 4.0.2rc + + * sql/bboard-drop.sql: added support for dropping attachments and + email a friend droppings + + * www/forum-view.adp: fixed a buggy link to "All messages" + + * www/message-threaded.adp: added anchor support + + * www/message-list.adp: support for showing the date in search + results + + * www/search.adp, www/search.tcl: we know show the date on search + results + + * www/message-new-3.tcl: add support for user editable permissions + + * www/message-entry.adp: don't show attachments when replying + + * www/message.adp, www/message.tcl, www/messages-by-user.tcl, + www/search.tcl: support for anchored reference to replies + + * www/message-mail-2.tcl: fixed email a friend artifact messages + not to point with reply_to at parent message. also updated to use + new return redirect target + + * www/message-list.adp: support for last updated column + + * www/master.adp: context_bar is no longer required + + * www/forum-view.adp, www/forum.tcl: support for "last updated" + column on forum overview page as well as last_n_days of messages + being shown + + * www/attachment-delete.tcl, www/attachment.tcl, + www/message-attach.tcl, www/simple-message.adp, + www/simple-message.tcl, www/message-attach-2.tcl, + www/message-attach.adp: added attachment support + + * www/forum-by-category.tcl: formatting change + + * tcl/bboard-procs.tcl: added attachment support and a work around + for an acs-messaging bug + + * bboard.info: added parameters for: mailing a friend user posts + editable attachments enabled max attachment size display last N + days + +2000-12-04 Anukul Kapoor + + * bboard.info: updated file and version info + + * sql/upgrade-4.0.1-4.0.2.sql: removed a redundant index creation + +2000-12-01 Anukul Kapoor + + * bboard.info: updated file and version info + + * tcl/bboard-procs.tcl: Added bboard_n_spaces proc + + * www/forum-delete.tcl: + * www/forum-delete.adp: + * www/forum-delete-2.tcl: Added UI for deleting a forum. + + * www/index.tcl: Added querying for bboard_forum_delete permissions + * www/index.adp: Added links to deleting a forum + +2000-12-01 John Prevost + + * www/message-delete-2.tcl: Fixed typo in contract + + * sql/upgrade-4.0.1-4.0.2.sql: + * sql/bboard-create.sql: Added appropriate on delete cascade + clauses. + + * www/category-delete.tcl: + * www/category-delete.adp: + * www/category-delete-2.tcl: Added UI for deleting a category. + + * www/forum-view.adp: Now expects categories rows to have a + delete_p column. Provides a link to delete the category if it's + "t". + + * www/master.adp: Master template for bboard now calls out to the + default master (picking up appropriate colors and style from the + core-ui.) + +2000-11-30 John Prevost + + * www/message-mail.tcl: + * www/message-mail.adp: + * www/message-mail-2.tcl: Preliminary UI for mailing a friend. + + * www/simple-message.tcl: + * www/simple-message.adp: Added "send to a friend" link. + +2000-11-27 Anukul Kapoor + + * Released 4.0.1 + + * sql/upgrade-4.0b-4.0.sql: + * sql/upgrade-4.0-4.0.1.sql: Added bboard_im_convert to the + upgrade script. Incremented version number to be sure it gets + run. + +2000-11-27 Anukul Kapoor + + * Released 4.0 (initial production release) \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/bboard.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/bboard.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/bboard.info 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,116 @@ + + + + + Bboard + Bboard Forums + f + + + + oracle + postgresql + + Anukul Kapoor + John Prevost + ACS 4 bboard package. + 2001-02-13 + ArsDigita Corporation + This is the release candidate for bboard version 4.0.2. This package provides customizable discussion forums for a community of users. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-create.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,453 @@ +-- +-- packages/bboard/sql/bboard-create.sql +-- +-- @author Anukul Kapoor +-- @author John Prevost +-- @creation-date 2000-08-29 +-- @cvs-id $Id: bboard-create.sql,v 1.1 2001/04/20 20:51:09 donb Exp $ +-- + +set feedback off + +-- separate parts so that if one fails, the rest happens + +begin + + -- create the privileges + + acs_privilege.create_privilege('bboard_create_forum'); + acs_privilege.create_privilege('bboard_create_category'); + acs_privilege.create_privilege('bboard_create_message'); + acs_privilege.create_privilege('bboard_write_forum'); + acs_privilege.create_privilege('bboard_write_category'); + acs_privilege.create_privilege('bboard_write_message'); + acs_privilege.create_privilege('bboard_read_forum'); + acs_privilege.create_privilege('bboard_read_category'); + acs_privilege.create_privilege('bboard_read_message'); + acs_privilege.create_privilege('bboard_delete_forum'); + acs_privilege.create_privilege('bboard_delete_category'); + acs_privilege.create_privilege('bboard_delete_message'); + acs_privilege.create_privilege('bboard_moderate_forum'); + +end; +/ +show errors + +begin + + -- bind privileges to global names + + acs_privilege.add_child('create','bboard_create_forum'); + acs_privilege.add_child('create','bboard_create_category'); + acs_privilege.add_child('create','bboard_create_message'); + acs_privilege.add_child('write','bboard_write_forum'); + acs_privilege.add_child('write','bboard_write_category'); + acs_privilege.add_child('write','bboard_write_message'); + acs_privilege.add_child('read','bboard_read_forum'); + acs_privilege.add_child('read','bboard_read_category'); + acs_privilege.add_child('read','bboard_read_message'); + acs_privilege.add_child('delete','bboard_delete_forum'); + acs_privilege.add_child('delete','bboard_delete_category'); + acs_privilege.add_child('delete','bboard_delete_message'); + acs_privilege.add_child('admin','bboard_moderate_forum'); +end; +/ +show errors + + +declare + default_context acs_objects.object_id%TYPE; + registered_users acs_objects.object_id%TYPE; + the_public acs_objects.object_id%TYPE; +begin + + default_context := acs.magic_object_id('default_context'); + registered_users := acs.magic_object_id('registered_users'); + the_public := acs.magic_object_id('the_public'); + + -- give registered users the power to post by default + + acs_permission.grant_permission ( + object_id => default_context, + grantee_id => registered_users, + privilege => 'bboard_create_message' + ); + + -- give the public the power to read by default + + acs_permission.grant_permission ( + object_id => default_context, + grantee_id => the_public, + privilege => 'bboard_read_message' + ); + + acs_permission.grant_permission ( + object_id => default_context, + grantee_id => the_public, + privilege => 'bboard_read_category' + ); + + acs_permission.grant_permission ( + object_id => default_context, + grantee_id => the_public, + privilege => 'bboard_read_forum' + ); + + acs_object_type.create_type ( + supertype => 'acs_object', + object_type => 'bboard_forum', + pretty_name => 'BBoard Forum', + pretty_plural => 'BBoard Forum', + table_name => 'BBOARD_FORUMS', + id_column => 'FORUM_ID', + name_method => 'ACS_OBJECT.DEFAULT_NAME' + ); + + acs_object_type.create_type ( + supertype => 'acs_object', + object_type => 'bboard_category', + pretty_name => 'BBoard Category', + pretty_plural => 'BBoard Categories', + table_name => 'BBOARD_CATEGORIES', + id_column => 'CATEGORY_ID', + name_method => 'ACS_OBJECT.DEFAULT_NAME' + ); + +end; +/ +show errors + + +-- bboard forums +-- +-- these act as primary containers for messages +-- a message's context_id will point to its forum + +create table bboard_forums ( + forum_id integer + constraint bboard_forums_forum_id_fk + references acs_objects (object_id) + constraint bboard_forums_pk + primary key, + short_name varchar(400) + constraint bboard_forums_short_name_nn + not null, + charter varchar(4000), + moderated_p char(1) + constraint bboard_forums_moderated_p_nn + not null + constraint bboard_forums_moderated_p_ck + check (moderated_p in ('t','f')), + bboard_id integer + constraint bboard_forums_bboard_id_nn + not null + constraint bboard_forums_bboard_id_fk + references apm_packages (package_id) + on delete cascade +); + +create index bboard_forums_bboard_id_idx + on bboard_forums (bboard_id); + +create table bboard_forum_message_map ( + forum_id integer + constraint bboard_fmm_forum_id_fk + references bboard_forums (forum_id) + on delete cascade, + message_id integer + constraint bboard_fmm_message_id_fk + references acs_messages (message_id) + on delete cascade, + status varchar(20) + constraint bboard_fmm_status_ck + check (status in ('unmoderated', 'approved', 'rejected')) + constraint bboard_fmm_status_nn + not null, + constraint bboard_forum_message_map_pk + primary key (forum_id, message_id) +); + +create index bboard_fmm_message_id_idx + on bboard_forum_message_map (message_id); + +create index bboard_fmm_status_idx + on bboard_forum_message_map (status); + +-- bboard categories +-- +-- these are for intra-forum categorization +-- categories will be scoped to forums via their acs_object.context_id + +create table bboard_categories ( + category_id integer + constraint bboard_c_category_id_fk + references acs_objects (object_id) + constraint bboard_c_category_id_pk + primary key, + short_name varchar(400) + constraint bboard_c_short_name_nn + not null, + forum_id integer + constraint bboard_c_forum_id_fk + references bboard_forums (forum_id) + on delete cascade + constraint bboard_c_forum_id_nn + not null, + description varchar(4000) +); + +create index bboard_categories_forum_id_idx + on bboard_categories (forum_id); + +create table bboard_category_message_map ( + category_id integer + constraint bboard_cmm_category_id_fk + references bboard_categories (category_id) + on delete cascade, + message_id integer + constraint bboard_cmm_message_id_fk + references acs_messages (message_id) + on delete cascade, + constraint bboard_category_message_map_pk + primary key (category_id, message_id) +); + +create index bboard_cmm_message_id_idx + on bboard_category_message_map (message_id); + +@@ bboard-views + +-- Tables to track subscriptions + +create table bboard_forum_subscribers ( + forum_id integer + constraint bboard_fs_forum_id_fk + references bboard_forums (forum_id) + on delete cascade, + subscriber_id integer + constraint bboard_fs_subscriber_id_fk + references parties (party_id) + on delete cascade, + constraint bboard_forum_subscribers_pk + primary key (forum_id, subscriber_id) +); + +create index bboard_fs_subscriber_id_idx + on bboard_forum_subscribers (subscriber_id); + +create table bboard_category_subscribers ( + category_id integer + constraint bboard_cs_category_id_fk + references bboard_categories (category_id) + on delete cascade, + subscriber_id integer + constraint bboard_cs_subscriber_id_fk + references parties (party_id) + on delete cascade, + constraint bboard_category_subscribers_pk + primary key (category_id, subscriber_id) +); + +create index bboard_cs_subscriber_id_idx + on bboard_category_subscribers (subscriber_id); + +create table bboard_thread_subscribers ( + thread_id integer + constraint bboard_ts_thread_id_fk + references acs_messages (message_id) + on delete cascade, + subscriber_id integer + constraint bboard_ts_subscriber_id_fk + references parties (party_id) + on delete cascade, + constraint bboard_thread_subscribers_pk + primary key (thread_id, subscriber_id) +); + +create index bboard_ts_subscriber_id_idx + on bboard_thread_subscribers (subscriber_id); + +@@ bboard-packages + +insert into cr_mime_types (mime_type) + values ('text/plain; format=flowed'); + +set feedback on + +-- This was stolen from ACS 3.x www/doc/sql/site-wide-search.sql +-- to provide functionality until it is refactored into the ACS core + +-- Query to take free text user entered query and frob it into something +-- that will make interMedia happy. Provided by Oracle. + +create or replace function bboard_im_convert( + query in varchar2 default null + ) return varchar2 +is + i number :=0; + len number :=0; + char varchar2(1); + minusString varchar2(256); + plusString varchar2(256); + mainString varchar2(256); + mainAboutString varchar2(500); + finalString varchar2(500); + hasMain number :=0; + hasPlus number :=0; + hasMinus number :=0; + token varchar2(256); + tokenStart number :=1; + tokenFinish number :=0; + inPhrase number :=0; + inPlus number :=0; + inWord number :=0; + inMinus number :=0; + completePhrase number :=0; + completeWord number :=0; + code number :=0; +begin + + len := length(query); + +-- we iterate over the string to find special web operators + for i in 1..len loop + char := substr(query,i,1); + if(char = '"') then + if(inPhrase = 0) then + inPhrase := 1; + tokenStart := i; + else + inPhrase := 0; + completePhrase := 1; + tokenFinish := i-1; + end if; + elsif(char = ' ') then + if(inPhrase = 0) then + completeWord := 1; + tokenFinish := i-1; + end if; + elsif(char = '+') then + inPlus := 1; + tokenStart := i+1; + elsif((char = '-') and (i = tokenStart)) then + inMinus :=1; + tokenStart := i+1; + end if; + + if(completeWord=1) then + token := '{ '||substr(query,tokenStart,tokenFinish-tokenStart+1)||' }'; + if(inPlus=1) then + plusString := plusString||','||token||'*10'; + hasPlus :=1; + elsif(inMinus=1) then + minusString := minusString||'OR '||token||' '; + hasMinus :=1; + else + mainString := mainString||' NEAR '||token; + mainAboutString := mainAboutString||' '||token; + hasMain :=1; + end if; + tokenStart :=i+1; + tokenFinish :=0; + inPlus := 0; + inMinus :=0; + end if; + completePhrase := 0; + completeWord :=0; + end loop; + + -- find the last token + token := '{ '||substr(query,tokenStart,len-tokenStart+1)||' }'; + if(inPlus=1) then + plusString := plusString||','||token||'*10'; + hasPlus :=1; + elsif(inMinus=1) then + minusString := minusString||'OR '||token||' '; + hasMinus :=1; + else + mainString := mainString||' NEAR '||token; + mainAboutString := mainAboutString||' '||token; + hasMain :=1; + end if; + + + mainString := substr(mainString,6,length(mainString)-5); + mainAboutString := replace(mainAboutString,'{',' '); + mainAboutString := replace(mainAboutString,'}',' '); + mainAboutString := replace(mainAboutString,')',' '); + mainAboutString := replace(mainAboutString,'(',' '); + plusString := substr(plusString,2,length(plusString)-1); + minusString := substr(minusString,4,length(minusString)-4); + + -- we find the components present and then process them based on the specific combinations + code := hasMain*4+hasPlus*2+hasMinus; + if(code = 7) then + finalString := '('||plusString||','||mainString||'*2.0,about('||mainAboutString||')*0.5) NOT ('||minusString||')'; + elsif (code = 6) then + finalString := plusString||','||mainString||'*2.0'||',about('||mainAboutString||')*0.5'; + elsif (code = 5) then + finalString := '('||mainString||',about('||mainAboutString||')) NOT ('||minusString||')'; + elsif (code = 4) then + finalString := mainString; + finalString := replace(finalString,'*1,',NULL); + finalString := '('||finalString||')*2.0,about('||mainAboutString||')'; + elsif (code = 3) then + finalString := '('||plusString||') NOT ('||minusString||')'; + elsif (code = 2) then + finalString := plusString; + elsif (code = 1) then + -- not is a binary operator for intermedia text + finalString := 'totallyImpossibleString'||' NOT ('||minusString||')'; + elsif (code = 0) then + finalString := ''; + end if; + + return finalString; +end; +/ + +-- NOTE: this is only temporary until we figure out how +-- packages will register child types to an acs-message +declare + v_exists integer; +begin + + select decode(count(*),0,0,1) into v_exists + from cr_type_children + where parent_type = 'acs_message_revision' + and child_type = 'content_revision'; + + if v_exists = 0 then + content_type.register_child_type ( + parent_type => 'acs_message_revision', + child_type => 'content_revision' + ); + end if; + + select decode(count(*),0,0,1) into v_exists + from cr_type_children + where parent_type = 'acs_message_revision' + and child_type = 'content_revision'; + + if v_exists = 0 then + content_type.register_child_type ( + parent_type => 'acs_message_revision', + child_type => 'image' + ); + end if; + + select decode(count(*),0,0,1) into v_exists + from cr_type_children + where parent_type = 'acs_message_revision' + and child_type = 'content_revision'; + + if v_exists = 0 then + content_type.register_child_type ( + parent_type => 'acs_message_revision', + child_type => 'content_extlink' + ); + end if; + +end; +/ +show errors Index: openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-drop.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,144 @@ +-- +-- packages/message/sql/bboard-drop.sql +-- +-- @author jmp@arsdigita.com +-- @creation-date 2000-08-31 +-- @cvs-id $Id: bboard-drop.sql,v 1.1 2001/04/20 20:51:09 donb Exp $ +-- + +-- This drop script destroys all messages that belong to forums. +-- It should handle any permission changes that have been done since +-- install by removing any permissions having to do with the standard +-- bboard permissions. + +-- We need to get rid of things that might be referring to +-- bboard objects that would prevent removal. This includes: +-- email-a-friend droppings +-- attachments (files and images) + +-- if something else is pointing at one of our messages, this script +-- will fail and removing bboard will be icky. this is sort of hairy +-- problem with unknown potential intra-package references. + +declare + image_p integer; + + cursor children_cursor is + select object_id as child_id, object_type + from acs_objects + where (object_type = 'acs_message' + or object_type = 'content_item') + and context_id in (select distinct m.message_id + from acs_messages m, bboard_forum_message_map f + where m.message_id = f.message_id); +begin + for child_val in children_cursor loop + if child_val.object_type = 'acs_message' then + acs_message.delete(child_val.child_id); + elsif child_val.object_type = 'content_item' then + select count(*) into image_p + from images + where image_id = child_val.child_id; + if image_p = 1 then + acs_message.delete_image(child_val.child_id); + else + acs_message.delete_file(child_val.child_id); + end if; + end if; + end loop; +end; +/ +show errors + +-- Delete all messages that belong to forums +declare + cursor message_cursor is + select distinct m.message_id + from acs_messages m, bboard_forum_message_map f + where m.message_id = f.message_id; +begin + for message_val in message_cursor loop + acs_message.delete(message_val.message_id); + end loop; +end; +/ +show errors + +-- Delete all subscriptions +delete from bboard_thread_subscribers; +delete from bboard_category_subscribers; +delete from bboard_forum_subscribers; + +-- Delete all categories +delete from bboard_category_message_map; +delete from bboard_categories; +delete from acs_objects where object_type = 'bboard_category'; + +-- Delete all forums +delete from bboard_forum_message_map; +delete from bboard_forums; +delete from acs_objects where object_type = 'bboard_forum'; + +-- Drop all schema objects +drop package bboard_message; +drop package bboard_category; +drop package bboard_forum; +drop view bboard_messages_by_category; +drop view bboard_messages_all; +drop table bboard_thread_subscribers; +drop table bboard_category_subscribers; +drop table bboard_forum_subscribers; +drop table bboard_category_message_map; +drop table bboard_categories; +drop table bboard_forum_message_map; +drop table bboard_forums; + +-- Drop object type metadata +begin + acs_object_type.drop_type ('bboard_forum'); + acs_object_type.drop_type ('bboard_category'); +end; +/ +show errors + +-- Drop permission metadata +delete from acs_permissions + where privilege in + ('bboard_create_forum', 'bboard_create_category', + 'bboard_create_message', 'bboard_write_forum', + 'bboard_write_category', 'bboard_write_message', + 'bboard_read_forum', 'bboard_read_category', + 'bboard_read_message', 'bboard_delete_forum', + 'bboard_delete_category', 'bboard_delete_message', + 'bboard_moderate_forum'); + +delete from acs_privilege_hierarchy + where privilege in + ('bboard_create_forum', 'bboard_create_category', + 'bboard_create_message', 'bboard_write_forum', + 'bboard_write_category', 'bboard_write_message', + 'bboard_read_forum', 'bboard_read_category', + 'bboard_read_message', 'bboard_delete_forum', + 'bboard_delete_category', 'bboard_delete_message', + 'bboard_moderate_forum'); + +delete from acs_privilege_hierarchy + where child_privilege in + ('bboard_create_forum', 'bboard_create_category', + 'bboard_create_message', 'bboard_write_forum', + 'bboard_write_category', 'bboard_write_message', + 'bboard_read_forum', 'bboard_read_category', + 'bboard_read_message', 'bboard_delete_forum', + 'bboard_delete_category', 'bboard_delete_message', + 'bboard_moderate_forum'); + +delete from acs_privileges + where privilege in + ('bboard_create_forum', 'bboard_create_category', + 'bboard_create_message', 'bboard_write_forum', + 'bboard_write_category', 'bboard_write_message', + 'bboard_read_forum', 'bboard_read_category', + 'bboard_read_message', 'bboard_delete_forum', + 'bboard_delete_category', 'bboard_delete_message', + 'bboard_moderate_forum'); + Index: openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-packages.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-packages.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-packages.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,571 @@ +-- +-- packages/bboard/sql/bboard-packages.sql +-- +-- @author Anukul Kapoor +-- @author John Prevost +-- @creation-date 2000-11-22 +-- @cvs-id $Id: bboard-packages.sql,v 1.1 2001/04/20 20:51:09 donb Exp $ +-- + +create or replace package bboard_forum +as + + function forum_p ( + forum_id in bboard_forums.forum_id%TYPE + ) return char; + + function new ( + forum_id in bboard_forums.forum_id%TYPE default null, + short_name in bboard_forums.short_name%TYPE, + charter in bboard_forums.charter%TYPE default null, + moderated_p in bboard_forums.moderated_p%TYPE default 'f', + bboard_id in bboard_forums.bboard_id%TYPE, + context_id in acs_objects.context_id%TYPE default null, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'bboard_forum' + ) return acs_objects.object_id%TYPE; + + procedure delete ( + forum_id in bboard_forums.forum_id%TYPE + ); + + procedure set_attrs ( + forum_id in bboard_forums.forum_id%TYPE, + short_name in bboard_forums.short_name%TYPE default null, + charter in bboard_forums.charter%TYPE default null, + moderated_p in bboard_forums.moderated_p%TYPE default null, + bboard_id in acs_objects.context_id%TYPE default null + ); + + procedure subscribe ( + forum_id in bboard_forum_subscribers.forum_id%TYPE, + subscriber_id in bboard_forum_subscribers.subscriber_id%TYPE + ); + + function forum_containing_message ( + message_id in acs_messages.message_id%TYPE + ) return bboard_forums.forum_id%TYPE; + +end bboard_forum; +/ +show errors + +create or replace package bboard_category +as + + function category_p ( + category_id in bboard_categories.category_id%TYPE + ) return char; + + function new ( + category_id in bboard_categories.category_id%TYPE default null, + short_name in bboard_categories.short_name%TYPE, + description in bboard_categories.description%TYPE default null, + forum_id in bboard_forums.forum_id%TYPE, + context_id in acs_objects.context_id%TYPE default null, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'bboard_category' + ) return acs_objects.object_id%TYPE; + + procedure delete ( + category_id in bboard_categories.category_id%TYPE + ); + + procedure set_attrs ( + category_id in bboard_categories.category_id%TYPE, + short_name in bboard_categories.short_name%TYPE default null, + description in bboard_categories.description%TYPE default null, + forum_id in integer default null + ); + + procedure subscribe ( + category_id in bboard_category_subscribers.category_id%TYPE, + subscriber_id in bboard_category_subscribers.subscriber_id%TYPE + ); + +end bboard_category; +/ +show errors + +create or replace package bboard_message +as + + function new ( + message_id in acs_messages.message_id%TYPE default null, + reply_to in acs_messages.message_id%TYPE default null, + sent_date in acs_messages.sent_date%TYPE default sysdate, + sender in acs_messages.sender%TYPE default null, + rfc822_id in acs_messages.rfc822_id%TYPE default null, + title in cr_revisions.title%TYPE default null, + mime_type in cr_revisions.mime_type%TYPE default 'text/plain', + text in varchar2 default null, + data in cr_revisions.content%TYPE default null, + context_id in acs_objects.context_id%TYPE default 0, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'acs_message' + ) return acs_objects.object_id%TYPE; + + function message_p ( + message_id in acs_messages.message_id%TYPE + ) return char; + + procedure set_attrs ( + message_id in acs_messages.message_id%TYPE, + reply_to in acs_messages.reply_to%TYPE default null, + sent_date in acs_messages.sent_date%TYPE default null, + sender in acs_messages.sender%TYPE default null, + title in cr_revisions.title%TYPE default null, + mime_type in cr_revisions.mime_type%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ); + + procedure set_status ( + message_id in bboard_forum_message_map.message_id%TYPE, + forum_id in bboard_forum_message_map.forum_id%TYPE, + status in bboard_forum_message_map.status%TYPE + ); + + procedure add_category ( + message_id in bboard_category_message_map.message_id%TYPE, + category_id in bboard_category_message_map.category_id%TYPE + ); + + procedure remove_category ( + message_id in bboard_category_message_map.message_id%TYPE, + category_id in bboard_category_message_map.category_id%TYPE + ); + + procedure clear_categories ( + message_id in bboard_category_message_map.message_id%TYPE + ); + + procedure subscribe ( + thread_id in bboard_thread_subscribers.thread_id%TYPE, + subscriber_id in bboard_thread_subscribers.subscriber_id%TYPE + ); + +end bboard_message; +/ +show errors + + + + +create or replace package body bboard_forum +as + + function forum_p ( + forum_id in bboard_forums.forum_id%TYPE + ) return char + is + v_check_forum_id integer; + begin + select count(forum_id) into v_check_forum_id + from bboard_forums + where forum_id = forum_p.forum_id; + if v_check_forum_id = 1 then + return 't'; + else + return 'f'; + end if; + end forum_p; + + function new ( + forum_id in bboard_forums.forum_id%TYPE default null, + short_name in bboard_forums.short_name%TYPE, + charter in bboard_forums.charter%TYPE default null, + moderated_p in bboard_forums.moderated_p%TYPE default 'f', + bboard_id in bboard_forums.bboard_id%TYPE, + context_id in acs_objects.context_id%TYPE default null, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'bboard_forum' + ) return acs_objects.object_id%TYPE + is + v_context_id acs_objects.context_id%TYPE; + v_forum_id bboard_forums.forum_id%TYPE; + begin + v_context_id := nvl(context_id, bboard_id); + v_forum_id := acs_object.new ( + context_id => v_context_id, + object_id => forum_id, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + object_type => object_type + ); + insert into bboard_forums + (forum_id, short_name, charter, moderated_p, bboard_id) + values (v_forum_id, short_name, charter, moderated_p, bboard_id); + return v_forum_id; + end new; + + procedure delete ( + forum_id in bboard_forums.forum_id%TYPE + ) + is + begin + delete from bboard_forums + where forum_id = bboard_forum.delete.forum_id; + acs_object.delete(forum_id); + end delete; + + procedure set_attrs ( + forum_id in bboard_forums.forum_id%TYPE, + short_name in bboard_forums.short_name%TYPE default null, + charter in bboard_forums.charter%TYPE default null, + moderated_p in bboard_forums.moderated_p%TYPE default null, + bboard_id in acs_objects.context_id%TYPE default null + ) + is + v_check_forum_id integer; + begin + select count(forum_id) into v_check_forum_id + from bboard_forums + where forum_id = set_attrs.forum_id; + -- It's not a forum. Fail silently? + if v_check_forum_id <> 1 then + return; + end if; + if short_name is not null then + update bboard_forums set short_name = set_attrs.short_name + where forum_id = set_attrs.forum_id; + end if; + if charter is not null then + update bboard_forums set charter = set_attrs.charter + where forum_id = set_attrs.forum_id; + end if; + if moderated_p is not null then + update bboard_forums set moderated_p = set_attrs.moderated_p + where forum_id = set_attrs.forum_id; + end if; + if bboard_id is not null then + update bboard_forums set bboard_id = set_attrs.bboard_id + where forum_id = set_attrs.forum_id; + update acs_objects set context_id = set_attrs.bboard_id + where object_id = set_attrs.forum_id; + end if; + end set_attrs; + + procedure subscribe ( + forum_id in bboard_forum_subscribers.forum_id%TYPE, + subscriber_id in bboard_forum_subscribers.subscriber_id%TYPE + ) + is + begin + insert into bboard_forum_subscribers (forum_id, subscriber_id) + values (forum_id, subscriber_id); + end; + + function forum_containing_message ( + message_id in acs_messages.message_id%TYPE + ) return bboard_forums.forum_id%TYPE + is + v_forum_id bboard_forums.forum_id%TYPE; + begin + select max(forum_id) into v_forum_id + from bboard_forum_message_map + where message_id = forum_containing_message.message_id; + if v_forum_id is null then + return 0; + else + return v_forum_id; + end if; + end forum_containing_message; + +end bboard_forum; +/ +show errors + +create or replace package body bboard_category +as + + function category_p ( + category_id in bboard_categories.category_id%TYPE + ) return char + is + v_check_category_id integer; + begin + select count(category_id) into v_check_category_id + from bboard_categories + where category_id = category_p.category_id; + if v_check_category_id = 1 then + return 't'; + else + return 'f'; + end if; + end category_p; + + function new ( + category_id in bboard_categories.category_id%TYPE default null, + short_name in bboard_categories.short_name%TYPE, + description in bboard_categories.description%TYPE default null, + forum_id in bboard_forums.forum_id%TYPE, + context_id in acs_objects.context_id%TYPE default null, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'bboard_category' + ) return acs_objects.object_id%TYPE + is + v_category_id bboard_categories.category_id%TYPE; + v_context_id acs_objects.context_id%TYPE; + begin + v_context_id := nvl(context_id, forum_id); + v_category_id := acs_object.new ( + object_id => category_id, + context_id => forum_id, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + object_type => object_type + ); + insert into bboard_categories + (category_id, short_name, description, forum_id) + values (v_category_id, short_name, description, forum_id); + return v_category_id; + end new; + + procedure delete ( + category_id in bboard_categories.category_id%TYPE + ) + is + begin + delete from bboard_categories + where category_id = bboard_category.delete.category_id; + acs_object.delete(category_id); + end delete; + + procedure set_attrs ( + category_id in bboard_categories.category_id%TYPE, + short_name in bboard_categories.short_name%TYPE default null, + description in bboard_categories.description%TYPE default null, + forum_id in integer default null + ) + is + v_check_category_id integer; + begin + select count(category_id) into v_check_category_id + from bboard_categories + where category_id = set_attrs.category_id; + -- It's not a category. Fail silently? + if v_check_category_id <> 1 then + return; + end if; + -- It's a category. Go for it. + if short_name is not null then + update bboard_categories set short_name = set_attrs.short_name + where category_id = set_attrs.category_id; + end if; + if description is not null then + update bboard_categories set description = set_attrs.description + where category_id = set_attrs.category_id; + end if; + if forum_id is not null then + update bboard_categories set forum_id = set_attrs.forum_id + where category_id = set_attrs.category_id; + update acs_objects set context_id = set_attrs.forum_id + where object_id = set_attrs.category_id; + end if; + end set_attrs; + + procedure subscribe ( + category_id in bboard_category_subscribers.category_id%TYPE, + subscriber_id in bboard_category_subscribers.subscriber_id%TYPE + ) + is + begin + insert into bboard_category_subscribers (category_id, subscriber_id) + values (category_id, subscriber_id); + end; + +end bboard_category; +/ +show errors + + +create or replace package body bboard_message +as + + function new ( + message_id in acs_messages.message_id%TYPE default null, + reply_to in acs_messages.message_id%TYPE default null, + sent_date in acs_messages.sent_date%TYPE default sysdate, + sender in acs_messages.sender%TYPE default null, + rfc822_id in acs_messages.rfc822_id%TYPE default null, + title in cr_revisions.title%TYPE default null, + mime_type in cr_revisions.mime_type%TYPE default 'text/plain', + text in varchar2 default null, + data in cr_revisions.content%TYPE default null, + context_id in acs_objects.context_id%TYPE default 0, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'acs_message' + ) return acs_objects.object_id%TYPE + is + v_sent_date acs_messages.sent_date%TYPE; + begin + v_sent_date := nvl(sent_date, sysdate); + + return acs_message.new ( + message_id => message_id, + reply_to => reply_to, + sent_date => v_sent_date, + sender => sender, + title => title, + mime_type => mime_type, + text => text, + data => data, + context_id => context_id, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + object_type => object_type + ); + end new; + + function message_p ( + message_id in acs_messages.message_id%TYPE + ) return char + is + v_check_message_id integer; + begin + select count(message_id) into v_check_message_id + from acs_messages + where message_id = message_p.message_id; + if v_check_message_id = 1 then + return 't'; + else + return 'f'; + end if; + end message_p; + + procedure set_attrs ( + message_id in acs_messages.message_id%TYPE, + reply_to in acs_messages.reply_to%TYPE default null, + sent_date in acs_messages.sent_date%TYPE default null, + sender in acs_messages.sender%TYPE default null, + title in cr_revisions.title%TYPE default null, + mime_type in cr_revisions.mime_type%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) + is + v_check_message_id integer; + v_revision_id integer; + begin + if message_p(message_id) = 'f' then + return; + end if; + + -- modify the parts that are in acs_messages + + if reply_to is not null then + update acs_messages set reply_to = set_attrs.reply_to + where message_id = set_attrs.message_id; + end if; + if sent_date is not null then + update acs_messages set sent_date = set_attrs.sent_date + where message_id = set_attrs.message_id; + end if; + if sender is not null then + update acs_messages set sender = set_attrs.sender + where message_id = set_attrs.message_id; + end if; + + -- modify the parts that are in cr_revisions + if title is not null or mime_type is not null then + select live_revision into v_revision_id + from cr_items where item_id = set_attrs.message_id + for update; + if title is not null then + update cr_revisions set title = set_attrs.title + where revision_id = v_revision_id; + end if; + if mime_type is not null then + update cr_revisions set mime_type = set_attrs.mime_type + where revision_id = v_revision_id; + end if; + end if; + + -- modify the context_id is acs_objects + + if context_id is not null then + update acs_objects set context_id = set_attrs.context_id + where object_id = set_attrs.message_id; + end if; + + end set_attrs; + + procedure set_status ( + message_id in bboard_forum_message_map.message_id%TYPE, + forum_id in bboard_forum_message_map.forum_id%TYPE, + status in bboard_forum_message_map.status%TYPE + ) + is + begin + if message_p(message_id) = 'f' + or bboard_forum.forum_p(forum_id) = 'f' then + return; + end if; + delete from bboard_forum_message_map + where message_id = set_status.message_id + and forum_id = set_status.forum_id; + if status is not null then + insert into bboard_forum_message_map + (forum_id, message_id, status) + values (set_status.forum_id, set_status.message_id, + set_status.status); + end if; + end set_status; + + procedure add_category ( + message_id in bboard_category_message_map.message_id%TYPE, + category_id in bboard_category_message_map.category_id%TYPE + ) + is + begin + insert into bboard_category_message_map (message_id, category_id) + values (add_category.message_id, add_category.category_id); + end add_category; + + procedure remove_category ( + message_id in bboard_category_message_map.message_id%TYPE, + category_id in bboard_category_message_map.category_id%TYPE + ) + is + begin + delete from bboard_category_message_map + where category_id = remove_category.category_id + and message_id = remove_category.message_id; + end remove_category; + + procedure clear_categories ( + message_id in bboard_category_message_map.message_id%TYPE + ) + is + begin + delete from bboard_category_message_map + where message_id = clear_categories.message_id; + end clear_categories; + + procedure subscribe ( + thread_id in bboard_thread_subscribers.thread_id%TYPE, + subscriber_id in bboard_thread_subscribers.subscriber_id%TYPE + ) + is + begin + insert into bboard_thread_subscribers (thread_id, subscriber_id) + values (thread_id, subscriber_id); + end; + +end bboard_message; +/ +show errors Index: openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-views.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-views.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-views.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,34 @@ +-- +-- packages/bboard/sql/bboard-views.sql +-- +-- @author Anukul Kapoor +-- @author John Prevost +-- @creation-date 2001-02-05 +-- @cvs-id $Id: bboard-views.sql,v 1.1 2001/04/20 20:51:09 donb Exp $ +-- + + + +create or replace view bboard_messages_all as + select m.message_id, m.reply_to, m.sent_date, m.sender, + m.title, m.mime_type, m.content, f.forum_id, f.status, + (select count(1) from acs_messages m2 + where m2.message_id in (select mf.message_id + from bboard_forum_message_map mf + where mf.forum_id = f.forum_id) + start with m2.message_id = m.message_id + connect by m2.reply_to = prior m2.message_id) as num_replies, + (select max(sent_date) from acs_messages m2 + where m2.message_id in (select mf.message_id + from bboard_forum_message_map mf + where mf.forum_id = f.forum_id) + start with m2.message_id = m.message_id + connect by m2.reply_to = prior m2.message_id) as last_reply_date + from acs_messages_all m, bboard_forum_message_map f + where m.message_id = f.message_id; + +create or replace view bboard_messages_by_category as + select msg.*, cat.category_id + from bboard_messages_all msg, bboard_category_message_map cat + where msg.message_id = cat.message_id(+); + Index: openacs-4/contrib/obsolete-packages/bboard/sql/oracle/index_sync.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/oracle/index_sync.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/sql/oracle/index_sync.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,11 @@ +-- Resync the interMedia index every hour. + +DECLARE + v_job number; +BEGIN + dbms_job.submit(v_job, + 'ctx_ddl.sync_index(''cr_rev_content_index'');', + interval => 'sysdate + 1/24'); +END; +/ +show errors \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0-4.0.1.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0-4.0.1.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0-4.0.1.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,139 @@ +-- +-- packages/bboard/sql/upgrade-4.0-4.0.1.sql +-- +-- @author Anukul Kapoor +-- @creation-date 2000-11-27 +-- @cvs-id $Id: upgrade-4.0-4.0.1.sql,v 1.1 2001/04/20 20:51:09 donb Exp $ +-- + +-- This was stolen from ACS 3.x www/doc/sql/site-wide-search.sql +-- to provide functionality until it is refactored into the ACS core + +-- Query to take free text user entered query and frob it into something +-- that will make interMedia happy. Provided by Oracle. + +create or replace function bboard_im_convert( + query in varchar2 default null + ) return varchar2 +is + i number :=0; + len number :=0; + char varchar2(1); + minusString varchar2(256); + plusString varchar2(256); + mainString varchar2(256); + mainAboutString varchar2(500); + finalString varchar2(500); + hasMain number :=0; + hasPlus number :=0; + hasMinus number :=0; + token varchar2(256); + tokenStart number :=1; + tokenFinish number :=0; + inPhrase number :=0; + inPlus number :=0; + inWord number :=0; + inMinus number :=0; + completePhrase number :=0; + completeWord number :=0; + code number :=0; +begin + + len := length(query); + +-- we iterate over the string to find special web operators + for i in 1..len loop + char := substr(query,i,1); + if(char = '"') then + if(inPhrase = 0) then + inPhrase := 1; + tokenStart := i; + else + inPhrase := 0; + completePhrase := 1; + tokenFinish := i-1; + end if; + elsif(char = ' ') then + if(inPhrase = 0) then + completeWord := 1; + tokenFinish := i-1; + end if; + elsif(char = '+') then + inPlus := 1; + tokenStart := i+1; + elsif((char = '-') and (i = tokenStart)) then + inMinus :=1; + tokenStart := i+1; + end if; + + if(completeWord=1) then + token := '{ '||substr(query,tokenStart,tokenFinish-tokenStart+1)||' }'; + if(inPlus=1) then + plusString := plusString||','||token||'*10'; + hasPlus :=1; + elsif(inMinus=1) then + minusString := minusString||'OR '||token||' '; + hasMinus :=1; + else + mainString := mainString||' NEAR '||token; + mainAboutString := mainAboutString||' '||token; + hasMain :=1; + end if; + tokenStart :=i+1; + tokenFinish :=0; + inPlus := 0; + inMinus :=0; + end if; + completePhrase := 0; + completeWord :=0; + end loop; + + -- find the last token + token := '{ '||substr(query,tokenStart,len-tokenStart+1)||' }'; + if(inPlus=1) then + plusString := plusString||','||token||'*10'; + hasPlus :=1; + elsif(inMinus=1) then + minusString := minusString||'OR '||token||' '; + hasMinus :=1; + else + mainString := mainString||' NEAR '||token; + mainAboutString := mainAboutString||' '||token; + hasMain :=1; + end if; + + + mainString := substr(mainString,6,length(mainString)-5); + mainAboutString := replace(mainAboutString,'{',' '); + mainAboutString := replace(mainAboutString,'}',' '); + mainAboutString := replace(mainAboutString,')',' '); + mainAboutString := replace(mainAboutString,'(',' '); + plusString := substr(plusString,2,length(plusString)-1); + minusString := substr(minusString,4,length(minusString)-4); + + -- we find the components present and then process them based on the specific combinations + code := hasMain*4+hasPlus*2+hasMinus; + if(code = 7) then + finalString := '('||plusString||','||mainString||'*2.0,about('||mainAboutString||')*0.5) NOT ('||minusString||')'; + elsif (code = 6) then + finalString := plusString||','||mainString||'*2.0'||',about('||mainAboutString||')*0.5'; + elsif (code = 5) then + finalString := '('||mainString||',about('||mainAboutString||')) NOT ('||minusString||')'; + elsif (code = 4) then + finalString := mainString; + finalString := replace(finalString,'*1,',NULL); + finalString := '('||finalString||')*2.0,about('||mainAboutString||')'; + elsif (code = 3) then + finalString := '('||plusString||') NOT ('||minusString||')'; + elsif (code = 2) then + finalString := plusString; + elsif (code = 1) then + -- not is a binary operator for intermedia text + finalString := 'totallyImpossibleString'||' NOT ('||minusString||')'; + elsif (code = 0) then + finalString := ''; + end if; + + return finalString; +end; +/ Index: openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.1-4.0.2.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.1-4.0.2.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.1-4.0.2.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,163 @@ +-- +-- packages/bboard/sql/upgrade-4.0.1-4.0.2.sql +-- +-- @author John Prevost +-- @creation-date 2000-12-01 +-- @cvs-id $Id: upgrade-4.0.1-4.0.2.sql,v 1.1 2001/04/20 20:51:09 donb Exp $ +-- + +set feedback off + +-- arrgh. This isn't entirely safe, but we can't do anything about it! +-- locking the table fails (alter table commands hit the lock, bounce, +-- and the transaction aborts, since DDL isn't transactional.) Can't +-- create another constraint with the same behavior to change behind the +-- back. Lose lose lose. + +alter table bboard_forums + drop constraint bboard_forums_bboard_id_fk; + +alter table bboard_forums add ( + constraint bboard_forums_bboard_id_fk + foreign key (bboard_id) + references apm_packages (package_id) + on delete cascade +); + +create index bboard_forums_bboard_id_idx + on bboard_forums (bboard_id); + +alter table bboard_forum_message_map + drop constraint bboard_fmm_forum_id_fk; +alter table bboard_forum_message_map + drop constraint bboard_fmm_message_id_fk; + +alter table bboard_forum_message_map add ( + constraint bboard_fmm_forum_id_fk + foreign key (forum_id) + references bboard_forums (forum_id) + on delete cascade, + constraint bboard_fmm_message_id_fk + foreign key (message_id) + references acs_messages (message_id) + on delete cascade +); + +alter table bboard_categories + drop constraint bboard_c_forum_id_fk; + +alter table bboard_categories add ( + constraint bboard_c_forum_id_fk + foreign key (forum_id) + references bboard_forums (forum_id) + on delete cascade +); + +create index bboard_categories_forum_id_idx + on bboard_categories (forum_id); + +alter table bboard_forum_subscribers + drop constraint bboard_fs_forum_id_fk; +alter table bboard_forum_subscribers + drop constraint bboard_fs_subscriber_id_fk; + +alter table bboard_forum_subscribers add ( + constraint bboard_fs_forum_id_fk + foreign key (forum_id) + references bboard_forums (forum_id) + on delete cascade, + constraint bboard_fs_subscriber_id_fk + foreign key (subscriber_id) + references parties (party_id) + on delete cascade +); + +create index bboard_fs_subscriber_id_idx + on bboard_forum_subscribers (subscriber_id); + +alter table bboard_category_subscribers + drop constraint bboard_cs_category_id_fk; +alter table bboard_category_subscribers + drop constraint bboard_cs_subscriber_id_fk; + +alter table bboard_category_subscribers add ( + constraint bboard_cs_category_id_fk + foreign key (category_id) + references bboard_categories (category_id) + on delete cascade, + constraint bboard_cs_subscriber_id_fk + foreign key (subscriber_id) + references parties (party_id) + on delete cascade +); + +create index bboard_cs_subscriber_id_idx + on bboard_category_subscribers (subscriber_id); + +alter table bboard_thread_subscribers + drop constraint bboard_ts_thread_id_fk; +alter table bboard_thread_subscribers + drop constraint bboard_ts_subscriber_id_fk; + +alter table bboard_thread_subscribers add ( + constraint bboard_ts_thread_id_fk + foreign key (thread_id) + references acs_messages (message_id) + on delete cascade, + constraint bboard_ts_subscriber_id_fk + foreign key (subscriber_id) + references parties (party_id) + on delete cascade +); + +create index bboard_ts_subscriber_id_idx + on bboard_thread_subscribers (subscriber_id); + + +@@ bboard-views + +-- NOTE: this is only temporary until we figure out how +-- packages will register child types to an acs-message +declare + v_exists integer; +begin + + select decode(count(*),0,0,1) into v_exists + from cr_type_children + where parent_type = 'acs_message_revision' + and child_type = 'content_revision'; + + if v_exists = 0 then + content_type.register_child_type ( + parent_type => 'acs_message_revision', + child_type => 'content_revision' + ); + end if; + + select decode(count(*),0,0,1) into v_exists + from cr_type_children + where parent_type = 'acs_message_revision' + and child_type = 'content_revision'; + + if v_exists = 0 then + content_type.register_child_type ( + parent_type => 'acs_message_revision', + child_type => 'image' + ); + end if; + + select decode(count(*),0,0,1) into v_exists + from cr_type_children + where parent_type = 'acs_message_revision' + and child_type = 'content_revision'; + + if v_exists = 0 then + content_type.register_child_type ( + parent_type => 'acs_message_revision', + child_type => 'content_extlink' + ); + end if; + +end; +/ +show errors Index: openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.2b3-4.0.2b4.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.2b3-4.0.2b4.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.2b3-4.0.2b4.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,55 @@ +-- +-- packages/bboard/sql/upgrade-4.0.2b3-4.0.2b4.sql +-- +-- @author Anukul Kapoor +-- @creation-date 2001-01-15 +-- @cvs-id $Id: upgrade-4.0.2b3-4.0.2b4.sql,v 1.1 2001/04/20 20:51:09 donb Exp $ +-- + +set feedback off + +-- NOTE: this is only temporary until we figure out how +-- packages will register child types to an acs-message +declare + v_exists integer; +begin + + select decode(count(*),0,0,1) into v_exists + from cr_type_children + where parent_type = 'acs_message_revision' + and child_type = 'content_revision'; + + if v_exists = 0 then + content_type.register_child_type ( + parent_type => 'acs_message_revision', + child_type => 'content_revision' + ); + end if; + + select decode(count(*),0,0,1) into v_exists + from cr_type_children + where parent_type = 'acs_message_revision' + and child_type = 'content_revision'; + + if v_exists = 0 then + content_type.register_child_type ( + parent_type => 'acs_message_revision', + child_type => 'image' + ); + end if; + + select decode(count(*),0,0,1) into v_exists + from cr_type_children + where parent_type = 'acs_message_revision' + and child_type = 'content_revision'; + + if v_exists = 0 then + content_type.register_child_type ( + parent_type => 'acs_message_revision', + child_type => 'content_extlink' + ); + end if; + +end; +/ +show errors Index: openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.2b5-4.0.2b6.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.2b5-4.0.2b6.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.2b5-4.0.2b6.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,11 @@ +-- +-- packages/bboard/sql/upgrade-4.0.2b5-4.0.2b6.sql +-- +-- @author John Prevost +-- @creation-date 2000-12-01 +-- @cvs-id $Id: upgrade-4.0.2b5-4.0.2b6.sql,v 1.1 2001/04/20 20:51:09 donb Exp $ +-- + +set feedback off + +@@ bboard-views \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0b-4.0.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0b-4.0.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0b-4.0.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,152 @@ +-- +-- packages/bboard/sql/upgrade-4.0b-4.0.sql +-- +-- @author John Prevost +-- @creation-date 2000-11-22 +-- @cvs-id $Id: upgrade-4.0b-4.0.sql,v 1.1 2001/04/20 20:51:09 donb Exp $ +-- + +create table bboard_category_subscribers ( + category_id integer + constraint bboard_cs_category_id_fk + references bboard_categories (category_id), + subscriber_id integer + constraint bboard_cs_subscriber_id_fk + references parties (party_id), + constraint bboard_category_subscribers_pk + primary key (category_id, subscriber_id) +); + +@@ bboard-packages + +-- This was stolen from ACS 3.x www/doc/sql/site-wide-search.sql +-- to provide functionality until it is refactored into the ACS core + +-- Query to take free text user entered query and frob it into something +-- that will make interMedia happy. Provided by Oracle. + +create or replace function bboard_im_convert( + query in varchar2 default null + ) return varchar2 +is + i number :=0; + len number :=0; + char varchar2(1); + minusString varchar2(256); + plusString varchar2(256); + mainString varchar2(256); + mainAboutString varchar2(500); + finalString varchar2(500); + hasMain number :=0; + hasPlus number :=0; + hasMinus number :=0; + token varchar2(256); + tokenStart number :=1; + tokenFinish number :=0; + inPhrase number :=0; + inPlus number :=0; + inWord number :=0; + inMinus number :=0; + completePhrase number :=0; + completeWord number :=0; + code number :=0; +begin + + len := length(query); + +-- we iterate over the string to find special web operators + for i in 1..len loop + char := substr(query,i,1); + if(char = '"') then + if(inPhrase = 0) then + inPhrase := 1; + tokenStart := i; + else + inPhrase := 0; + completePhrase := 1; + tokenFinish := i-1; + end if; + elsif(char = ' ') then + if(inPhrase = 0) then + completeWord := 1; + tokenFinish := i-1; + end if; + elsif(char = '+') then + inPlus := 1; + tokenStart := i+1; + elsif((char = '-') and (i = tokenStart)) then + inMinus :=1; + tokenStart := i+1; + end if; + + if(completeWord=1) then + token := '{ '||substr(query,tokenStart,tokenFinish-tokenStart+1)||' }'; + if(inPlus=1) then + plusString := plusString||','||token||'*10'; + hasPlus :=1; + elsif(inMinus=1) then + minusString := minusString||'OR '||token||' '; + hasMinus :=1; + else + mainString := mainString||' NEAR '||token; + mainAboutString := mainAboutString||' '||token; + hasMain :=1; + end if; + tokenStart :=i+1; + tokenFinish :=0; + inPlus := 0; + inMinus :=0; + end if; + completePhrase := 0; + completeWord :=0; + end loop; + + -- find the last token + token := '{ '||substr(query,tokenStart,len-tokenStart+1)||' }'; + if(inPlus=1) then + plusString := plusString||','||token||'*10'; + hasPlus :=1; + elsif(inMinus=1) then + minusString := minusString||'OR '||token||' '; + hasMinus :=1; + else + mainString := mainString||' NEAR '||token; + mainAboutString := mainAboutString||' '||token; + hasMain :=1; + end if; + + + mainString := substr(mainString,6,length(mainString)-5); + mainAboutString := replace(mainAboutString,'{',' '); + mainAboutString := replace(mainAboutString,'}',' '); + mainAboutString := replace(mainAboutString,')',' '); + mainAboutString := replace(mainAboutString,'(',' '); + plusString := substr(plusString,2,length(plusString)-1); + minusString := substr(minusString,4,length(minusString)-4); + + -- we find the components present and then process them based on the specific combinations + code := hasMain*4+hasPlus*2+hasMinus; + if(code = 7) then + finalString := '('||plusString||','||mainString||'*2.0,about('||mainAboutString||')*0.5) NOT ('||minusString||')'; + elsif (code = 6) then + finalString := plusString||','||mainString||'*2.0'||',about('||mainAboutString||')*0.5'; + elsif (code = 5) then + finalString := '('||mainString||',about('||mainAboutString||')) NOT ('||minusString||')'; + elsif (code = 4) then + finalString := mainString; + finalString := replace(finalString,'*1,',NULL); + finalString := '('||finalString||')*2.0,about('||mainAboutString||')'; + elsif (code = 3) then + finalString := '('||plusString||') NOT ('||minusString||')'; + elsif (code = 2) then + finalString := plusString; + elsif (code = 1) then + -- not is a binary operator for intermedia text + finalString := 'totallyImpossibleString'||' NOT ('||minusString||')'; + elsif (code = 0) then + finalString := ''; + end if; + + return finalString; +end; +/ Index: openacs-4/contrib/obsolete-packages/bboard/tcl/bboard-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/tcl/bboard-init.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/tcl/bboard-init.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,11 @@ +ad_library { + + bboard init - sets up scheduled procs + + @cvs-id $Id: bboard-init.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + @author Anukul Kapoor + @date 2001-02-13 + +} + +ad_schedule_proc -thread t 86400 bboard_garbage_collect \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/tcl/bboard-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/tcl/bboard-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/tcl/bboard-procs.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,1010 @@ +ad_library { + + Provides functions for creating and updating bboard messages, forums, + and categories. Also provides functions for constructing queries + for bboard messages. + + @creation-date 2000-10-21 + @author John Prevost + @cvs-id $Id: bboard-procs.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} + +ad_proc -public bboard_forum_p { + {forum_id} +} { + Check if an integer is a valid bboard forum id. +} { + return [string equal [db_exec_plsql bboard_forum_p { + begin + :1 := bboard_forum.forum_p(:forum_id); + end; + }] "t"] +} + +ad_page_contract_filter bboard_forum_id { name value } { + Checks whether the value (assumed to be an integer) is the id of + an already-existing bboard forum. +} { + # empty is okay (handled by notnull) + if [empty_string_p $value] { + return 1 + } + if ![bboard_forum_p $value] { + ad_complain "$name ($value) does not refer to a valid bboard forum" + return 0 + } + return 1 +} + +ad_proc -public bboard_forum_new { + {-forum_id ""} + {-short_name:required} + {-charter ""} + {-moderated_p f} + {-bboard_id:required} + {-context_id ""} + {-creation_user ""} + {-creation_ip ""} +} { + Create a new forum. +} { + return [db_exec_plsql create_forum { + begin + :1 := bboard_forum.new ( + forum_id => :forum_id, + short_name => :short_name, + charter => :charter, + moderated_p => :moderated_p, + bboard_id => :bboard_id, + context_id => :context_id, + creation_user => :creation_user, + creation_ip => :creation_ip + ); + end; + }] +} + +ad_proc -public bboard_forum_set { + {-forum_id:required} + {-short_name ""} + {-charter ""} + {-moderated_p ""} + {-bboard_id ""} +} { + Modify some or all of a forum's attributes. +} { + db_exec_plsql update_forum { + begin + bboard_forum.set_attrs ( + forum_id => :forum_id, + short_name => :short_name, + charter => :charter, + moderated_p => :moderated_p, + bboard_id => :bboard_id + ); + end; + } +} + +ad_proc -public bboard_forum_get { + {-forum_id:required} + {-column_array:required} +} { + Get the columns for a given forum into an array variable. +} { + upvar $rowvar row + db_1row forum_get { + select * from bboard_forums where forum_id = :forum_id + } -column_array row +} + +ad_proc -public bboard_category_p { + {category_id} +} { + Check if an integer is a valid bboard category id. +} { + return [string equal [db_exec_plsql bboard_category_p { + begin + :1 := bboard_category.category_p(:category_id); + end; + }] "t"] +} + +ad_page_contract_filter bboard_category_id { name value } { + Checks whether the value (assumed to be an integer) is the id of + an already-existing bboard category. +} { + # empty is okay (handled by notnull) + if [empty_string_p $value] { + return 1 + } + if ![bboard_category_p $value] { + ad_complain "$name ($value) does not refer to a valid bboard category" + return 0 + } + return 1 +} + +ad_proc -public bboard_category_new { + {-category_id ""} + {-short_name:required} + {-description ""} + {-forum_id:required} +} { + Create a new category. +} { + return [db_exec_plsql create_category { + begin + :1 := bboard_category.new ( + category_id => :category_id, + short_name => :short_name, + description => :description, + forum_id => :forum_id + ); + end; + }] +} + +ad_proc -public bboard_category_set { + {-category_id:required} + {-short_name ""} + {-description ""} + {-forum_id ""} +} { + Modify some or all of a category's attributes. +} { + db_exec_plsql update_category { + begin + bboard_category.set_attrs ( + category_id => :category_id, + short_name => :short_name, + description => :description, + forum_id => :forum_id + ); + end; + } +} + +ad_proc -public bboard_category_get { + {-category_id:required} + {-column_array:required} +} { + Get the columns for a given category into an array variable. +} { + upvar $rowvar row + db_1row category_get { + select * from bboard_categories where category_id = :category_id + } -column_array row +} + +ad_proc -public bboard_message_new { + {-message_id ""} + {-reply_to ""} + {-sent_date ""} + {-sender ""} + {-title ""} + {-mime_type ""} + {-content ""} + {-context_id ""} + {-creation_user ""} + {-creation_ip ""} +} { + Create a new message. +} { + set result [db_exec_plsql message_new { + begin + :1 := bboard_message.new ( + message_id => :message_id, + reply_to => :reply_to, + sent_date => :sent_date, + sender => :sender, + title => :title, + mime_type => :mime_type, + data => empty_blob(), + context_id => :context_id, + creation_user => :creation_user, + creation_ip => :creation_ip + ); + end; + }] + + + if [string equal $message_id ""] { + set message_id $result + } + + db_1row message_new_revision { + select live_revision as revision_id + from cr_items + where item_id = :message_id + for update + } + + db_dml message_new_set_blob { + update cr_revisions + set content = empty_blob() + where revision_id = :revision_id + returning content into :1 + } -blobs [list $content] + + return $result +} + +ad_proc -public bboard_message_set { + {-message_id:required} + {-reply_to ""} + {-sent_date ""} + {-sender ""} + {-title ""} + {-mime_type ""} + {-context_id ""} + {-content ""} +} { + Modify one or more attributes of a given message. +} { + db_exec_plsql message_set_attr { + begin + bboard_message.set_attrs ( + message_id => :message_id, + reply_to => :reply_to, + sent_date => :sent_date, + sender => :sender, + title => :title, + mime_type => :mime_type, + context_id => :context_id + ); + end; + } + db_1row message_revision { + select live_revision as revision_id from cr_items + where item_id = :message_id + for update + } + db_dml message_set_content { + update cr_revisions + set content = empty_blob() + where revision_id = :revision_id + returning content into :1 + } -blobs [list $content] +} + +ad_proc -public bboard_message_clear_categories { + {-message_id:required} +} { + Clear all category associations from one message. +} { + db_dml bboard_message_clear_categories { + begin + bboard_message.clear_categories ( :message_id ); + end; + } +} + +ad_proc -public bboard_message_add_category { + {-message_id:required} + {-category_id:required} +} { + Add one category relationship to a message. +} { + db_dml bboard_message_add_category { + begin + bboard_message.add_category ( + message_id => :message_id, + category_id => :category_id + ); + end; + } +} + +ad_proc -public bboard_message_remove_category { + {-message_id:required} + {-category_id:required} +} { + Remove one category relationship from a message. +} { + db_dml bboard_message_remove_category { + begin + bboard_message.remove_category ( + message_id => :message_id, + category_id => :category_id + ); + end; + } +} + +ad_proc -public bboard_message_set_status { + {-message_id:required} + {-forum_id:required} + {-status:required} +} { + Modify the status of a message in a particular forum. Null status is + not in the forum. Acceptable statuses are unmoderated, approved, and + rejected. +} { + db_exec_plsql bboard_message_set_status { + begin + bboard_message.set_status ( + message_id => :message_id, + forum_id => :forum_id, + status => :status + ); + end; + } +} + +ad_proc -public bboard_message_get { + {-message_id:required} + {-column_array:required} +} { + Get the columns for a given message into an array variable. +} { + upvar $rowvar row + db_1row message_get { + select * from acs_messages_all where message_id = :message_id + } -column_array row +} + +ad_proc -public bboard_schedule_sends { + {-message_id:required} + {-email_message_id} +} { + Schedule all message sends for the given message. + + Supports sending an email version of the message given the + optional email_message_id. In this case the message stored with + $email_message_id is sent out to whoever is subscribed to + $message_id. +} { + + # If we don't have a specific message that is to be sent, just use + # the original. + + if ![info exists email_message_id] { + set email_message_id $message_id + } + + # Thread based sends + acs_messaging_send_query -message_id $email_message_id -query { + select subscriber_id as recipient_id, thread_id as grouping_id, + sysdate as wait_until + from bboard_thread_subscribers s + where s.thread_id in (select message_id from acs_messages + start with message_id = :message_id + connect by message_id = prior reply_to) + } -bind [list message_id $message_id] + + # Category based sends + acs_messaging_send_query -message_id $email_message_id -query { + select s.subscriber_id as recipient_id, s.category_id as grouping_id, + sysdate as wait_until + from bboard_category_subscribers s, bboard_category_message_map m + where m.message_id = :message_id + and s.category_id = m.category_id + } -bind [list message_id $message_id] + + # Forum based sends + acs_messaging_send_query -message_id $email_message_id -query { + select s.subscriber_id as recipient_id, s.forum_id as grouping_id, + sysdate as wait_until + from bboard_forum_subscribers s, bboard_forum_message_map m + where m.message_id = :message_id + and s.forum_id = m.forum_id + } -bind [list message_id $message_id] +} + +ad_proc -public bboard_subscribe_forum { + {-forum_id:required} + {-subscriber_id:required} +} { + Subscribe a user to the given forum (for instant updates, right now.) +} { + db_exec_plsql forum_subscribe { + begin + bboard_forum.subscribe ( + forum_id => :forum_id, + subscriber_id => :subscriber_id + ); + end; + } +} + +ad_proc -public bboard_unsubscribe_forum { + {-forum_id:required} + {-subscriber_id:required} +} { + Unsubscribe a user from the given forum. +} { + db_dml forum_unsubscribe { + delete from bboard_forum_subscribers + where forum_id = :forum_id + and subscriber_id = :subscriber_id + } +} + +ad_proc -public bboard_subscribe_category { + {-category_id:required} + {-subscriber_id:required} +} { + Subscribe a user to the given category (for instant updates, right now.) +} { + db_exec_plsql category_subscribe { + begin + bboard_category.subscribe ( + category_id => :category_id, + subscriber_id => :subscriber_id + ); + end; + } +} + +ad_proc -public bboard_unsubscribe_category { + {-category_id:required} + {-subscriber_id:required} +} { + Unsubscribe a user from the given category. +} { + db_dml category_unsubscribe { + delete from bboard_category_subscribers + where category_id = :category_id + and subscriber_id = :subscriber_id + } +} + +ad_proc -public bboard_subscribe_thread { + {-thread_id:required} + {-subscriber_id:required} +} { + Subscribe a user to the given thread (for instant updates, right now.) +} { + db_exec_plsql thread_subscribe { + begin + bboard_message.subscribe ( + thread_id => :thread_id, + subscriber_id => :subscriber_id + ); + end; + } +} + +ad_proc -public bboard_unsubscribe_thread { + {-thread_id:required} + {-subscriber_id:required} +} { + Unsubscribe a user from the given thread. +} { + db_dml thread_unsubscribe { + delete from bboard_thread_subscribers + where thread_id = :thread_id + and subscriber_id = :subscriber_id + } +} + +ad_proc -public bboard_category_subscribed_p { + {-direct:boolean} + user_id + category_id +} { + Returns "t" or "f" based on whether a user is subscribed to a + particular category. The -direct switch checks only category + subscriptions whereas leaving it off checks for the category, + and any forums the category is in. +} { + db_0or1row check_category_subscribed { + select count(*) as subscribed_p from bboard_category_subscribers + where category_id = :category_id + and subscriber_id = :user_id + } + + if {$subscribed_p > 0} { + return "t" + } else { + if {!$direct_p} { + # if direct isn't defined, we should also check + # for + + db_0or1row check_category_forums_subscribed { + select count(*) as subscribed_p from bboard_forum_subscribers + where subscriber_id = :user_id + and forum_id in (select bc.forum_id + from bboard_categories bc + where bc.category_id = + :category_id) + } + + if {$subscribed_p > 0} { + return "t" + } + } + } + + return "f" +} + +ad_proc -public bboard_forum_subscribed_p { + user_id + forum_id +} { + Returns "t" or "f" based on whether a user is subscribed to a + particular forum, category, or thread. +} { + db_0or1row check_forum_subscribed { + select count(*) as subscribed_p + from bboard_forum_subscribers + where forum_id = :forum_id + and subscriber_id = :user_id + } + + if {$subscribed_p > 0} { + return "t" + } else { + return "f" + } +} + +ad_proc -public bboard_message_subscribed_p { + {-direct:boolean} + user_id + message_id +} { + Returns "t" or "f" based on whether a user is subscribed to a + particular thread. +} { + db_1row check_message_subscribed { + select count(*) as subscribed_p from bboard_thread_subscribers + where subscriber_id = :user_id + and thread_id in (select message_id + from acs_messages b + connect by b.message_id = prior b.reply_to + start with message_id = :message_id) + + } + + if {$subscribed_p > 0} { + return "t" + } else { + if {! $direct_p } { + db_1row check_message_cats_subscribed { + select count(*) as subscribed_p + from bboard_category_subscribers + where subscriber_id = :user_id + and category_id in (select bcmm.category_id + from bboard_category_message_map bcmm + where bcmm.message_id = :message_id) + + } + + if {$subscribed_p > 0} { + return "t" + } else { + db_0or1row check_message_forums_subscribed { + select count(*) as subscribed_p + from bboard_forum_subscribers + where subscriber_id = :user_id + and forum_id in (select bfmm.forum_id + from bboard_forum_message_map bfmm + where bfmm.message_id = :message_id) + } + + if {$subscribed_p > 0} { + return "t" + } + } + } + } + return "f" +} + +ad_proc -public bboard_message_forum { + {message_id} +} { + Returns a forum_id for a forum that the supplied message is in. Returns 0 + if the message id isn't found. +} { + db_1row bboard_forum_containing_message { + select bboard_forum.forum_containing_message(:message_id) as forum_id + from dual + } + + return $forum_id +} + +ad_proc -public bboard_forum_moderated_p { + {forum_id} +} { + Returns "t" if the forum is moderated, "f" otherwise +} { + db_1row forum_moderated_p { + select moderated_p + from bboard_forums + where forum_id = :forum_id + } + + return $moderated_p +} + +ad_proc bboard_message_page { +} { + Returns the appropriate page name to display a message. This + proc consults preferences to determine different display styles. +} { + if {[string compare [ad_parameter "ThreadingEnabledP"] "t"] == 0} { + return "message-threaded" + } else { + return "message" + } +} + +ad_proc -public bboard_message_url { + {-absolute:boolean} + {message_id} + {forum_id ""} +} { + Returns the proper URL for displaying the message with the supplied message_id. + + If given the -absolute flag it will return a full url. + + When the absolute flag is specified, this proc must be called from + within a live page since it depends on ad_conn being around. + +} { + # This is a workaround to a bug in acs-messaging-procs/first_ancestor + # that won't be deployed until after this next bboard release -akk + + db_1row first_ancestor { + select acs_message.first_ancestor(:message_id) as ancestor_id + from dual + } + + if { $message_id == $ancestor_id } { + set anchor "" + } else { + set anchor "#$message_id" + } + + # if we don't have a forum_id, let's pick one! + + # use of this violates the assumption + # that messages can be in multiple forums + + if [string equal $forum_id ""] { + set forum_id [bboard_message_forum $ancestor_id] + } + + set message_id $ancestor_id + if {$absolute_p} { + set prefix "[ad_conn location][ad_conn package_url]" + } else { + set prefix "" + } + + return "$prefix[bboard_message_page]?message_id=$message_id&forum_id=$forum_id$anchor" +} + +# if i were cool, i'd implement an Omega(log n) solution for this +# i am not however, cool + +ad_proc -public bboard_n_spaces { + {n} +} { + Returns a string containg n HTML spaces i.e &nbsp; +} { + set spaces "" + for {set i 0} {$i < $n} {incr i} { + append spaces " " + } + return $spaces +} + + +ad_proc -public bboard_upload_extension { + {filename} +} { + This proc returns the stripped file extensions of a filename. +} { + # get the file extension + set file_extension [string tolower [file extension $filename]] + + # remove the first . from the file extension + regsub {\.} $file_extension "" file_extension + + return $file_extension +} + +ad_proc -public bboard_upload_basename { + {filename} +} { + This proc attempts to return the base of a passed in filename i.e. + it strips off the C:\directories and associated crud. + e.g. C:\bar\baz\qux.flad -> qux.flad +} { + # strip off the C:\directories... crud and just get the file name + if ![regexp {([^/\\]+)$} $filename match filename] { + # couldn't find a match + set filename $filename + } + + return $filename +} + +ad_proc -public bboard_image_size { + {file_extension} + {filename} +} { + This proc returns a list [width height] from an image if it can determine + this information from the file and file extension. +} { + + set what_aolserver_told_us "" + + if { $file_extension == "jpeg" || $file_extension == "jpg" } { + catch { set what_aolserver_told_us [ns_jpegsize $filename] } + } elseif { $file_extension == "gif" } { + catch { set what_aolserver_told_us [ns_gifsize $filename] } + } + + # the AOLserver jpegsize command has some bugs where the height comes + # through as 1 or 2 + if { ![empty_string_p $what_aolserver_told_us] && + [lindex $what_aolserver_told_us 0] > 10 && + [lindex $what_aolserver_told_us 1] > 10 } { + return $what_aolserver_told_us + } else { + return [list "" ""] + } +} + +ad_proc -public bboard_check_and_register_mime_type { + {type} +} { + This proc checks for or registers a mime_type in the content + repository type registry. +} { + # we don't do this as a transaction. + # or god forbid hold an exclusive lock + + # since if someone else adds this type at the same + # moment, we don't care. + + db_0or1row check_mime_type { + select mime_type + from cr_mime_types + where mime_type = :type + } + + if ![info exists mime_type] { + db_dml insert_mime { + insert into cr_mime_types (mime_type) + values (:type) + } + } +} + +ad_proc -public bboard_attach_image { + {-message_id:required} + {-file_id ""} + {-short_filename:required} + {-local_filename:required} + {-mime_type:required} + {-width ""} + {-height ""} + {-title ""} + {-user_id ""} + {-creation_ip ""} +} { + Creates a message image attachment. +} { + db_exec_plsql insert_image { + begin + :1 := acs_message.new_image ( + message_id => :message_id, + image_id => :file_id, + file_name => :short_filename, + title => :title, + mime_type => :mime_type, + content => empty_blob(), + width => :width, + height => :height, + creation_user => :user_id, + creation_ip => :creation_ip, + is_live => 't' + ); + end; + } + + db_1row get_revision { + select content_item.get_latest_revision(:file_id) as revision_id + from dual + } + + db_dml set_content { + update cr_revisions + set content = empty_blob() + where revision_id = :revision_id + returning content into :1 + } -blob_files [list $local_filename] +} + +ad_proc -public bboard_attach_file { + {-message_id:required} + {-file_id ""} + {-short_filename:required} + {-local_filename:required} + {-mime_type:required} + {-title ""} + {-user_id ""} + {-creation_ip ""} +} { + Creates a new bboard attachment. +} { + db_exec_plsql insert_file { + begin + :1 := acs_message.new_file ( + message_id => :message_id, + file_id => :file_id, + file_name => :short_filename, + title => :title, + mime_type => :mime_type, + content => empty_blob(), + creation_user => :user_id, + creation_ip => :creation_ip, + is_live => 't' + ); + end; + } + + db_1row get_revision { + select content_item.get_latest_revision(:file_id) as revision_id + from dual + } + + db_dml set_content { + update cr_revisions + set content = empty_blob() + where revision_id = :revision_id + returning content into :1 + } -blob_files [list $local_filename] +} + + +ad_proc -public bboard_delete_attachment { + {file_id} +} { + Deletes an attachment. +} { + if [db_0or1row is_file_image { + select image_id + from images + where image_id = content_item.get_latest_revision(:file_id) + }] { + db_exec_plsql delete_image { + begin + acs_message.delete_image(:file_id); + end; + } + } else { + db_exec_plsql delete_file { + begin + acs_message.delete_file(:file_id); + end; + } + } +} + +ad_proc -public bboard_alert_from_address { +} { + Returns an appropriate from address for bboard alerts. +} { + return "bboard-robot@[ad_conn host]" +} + +ad_proc -public bboard_alert_message { + {-mime_type:required} + {-content:required} + {-message_id:required} + {-forum_id:required} + {-sender:required} +} { + Takes a bboard message and returns a text message +} { + db_1row forum_info { + select short_name as forum_name + from bboard_forums + where forum_id = :forum_id + } + + if {[string equal $mime_type "text/plain"]} { + set result $content + } elseif {[string equal $mime_type "text/plain; format=flowed"]} { + set result [wrap_string $content] + } elseif {[string equal $mime_type "text/html"]} { + set result [ad_html_to_text $content] + } else { + set result "Error display bboard posting as email! +Out bboard system has received a post we don't know how to +send via email. Please go to the below URL for a better shot +at displaying." + } + + set header "Posted by: $sender" + + set footer "-------------------- +This is a posting from the $forum_name bboard. +To reply you can go to: +[bboard_message_url -absolute $message_id $forum_id]" + + return "${header} + +${result} + +${footer}" +} + +ad_proc -public bboard_alert_one_mesg { + {-message_id:required} + {-forum_id:required} + {-user_id:required} + {-creation_ip ""} +} { + This proc does generates the appropriate alerts for a new bboard post. + + This proc must be called from within a live page since it depends on + ad_conn being around. +} { + db_1row bboard_mesg_info { + select reply_to, sender, title, mime_type, content, email, + first_names||' '||last_name as full_name + from acs_messages_all, persons, parties + where message_id = :message_id + and person_id = sender + and party_id = person_id + } + + db_1row forum_info { + select short_name as forum_name + from bboard_forums + where forum_id = :forum_id + } + + set email_mesg_id [bboard_message_new -sender $user_id \ + -title "$forum_name - $title" \ + -mime_type "text/plain" \ + -content [bboard_alert_message -mime_type $mime_type \ + -content $content \ + -sender "$full_name <$email>" \ + -message_id $message_id \ + -forum_id $forum_id] \ + -context_id $message_id -creation_user $user_id \ + -creation_ip $creation_ip] + + bboard_schedule_sends -message_id $message_id \ + -email_message_id $email_mesg_id +} + +ad_proc -private bboard_garbage_collect { +} { + +} { + acs_messaging_process_queue + db_dml bboard_alert_clean { + declare + cursor alerts_cursor is + select object_id + from acs_objects + where object_type = 'acs_message' + and object_id not in (select message_id + from bboard_forum_message_map) + and (context_id in (select message_id + from bboard_forum_message_map) + or + context_id in (select object_id + from acs_objects + where object_type = + 'bboard_forum')); + begin + for alert_val in alerts_cursor loop + acs_message.delete(alert_val.object_id); + end loop; + end; + } +} \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/attachment-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/attachment-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/attachment-delete.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,16 @@ +ad_page_contract { + Delete an attachment. + + @author Anukul Kapoor (akk@arsdigita.com) + @creation-date 2000-12-30 + @cvs $Id: attachment-delete.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + file_id:integer,notnull + message_id:integer,notnull +} + +ad_require_permission $file_id bboard_write_message + +bboard_delete_attachment $file_id + +ad_returnredirect [bboard_message_url $message_id] \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/attachment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/attachment.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/attachment.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,32 @@ +ad_page_contract { + This serves an attachment file. + + @author Anukul Kapoor + @creation-date 2000-12-30 + @cvs-id $Id: attachment.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + file_id:integer,notnull +} + +if [string equal [ad_parameter "AttachmentsEnabledP"] "t"] { + ad_require_permission $file_id bboard_read_message + + db_0or1row get_mime_type { + select mime_type + from cr_revisions + where revision_id = content_item.get_live_revision(:file_id) + } + + if ![info exists mime_type] { + ad_return_complaint 1 "The file_id does not refer to a valid file attachment." + } + + ReturnHeaders $mime_type + + db_write_blob get_file " + select content + from cr_revisions + where revision_id = content_item.get_live_revision($file_id)" +} else { + ad_return_complaint 1 "Attachments are currently disabled" +} Index: openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,25 @@ +ad_page_contract { + + Delete a category + + @author John Prevost + @creation-date 2000-12-01 + @cvs-id $Id: category-delete-2.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + category_id:integer,notnull,bboard_category_id +} + +ad_require_permission $category_id bboard_delete_category + +db_1row forum_id { + select forum_id from bboard_categories where category_id = :category_id +} + +db_dml delete_category { + begin + bboard_category.delete (:category_id); + end; +} + +ad_returnredirect "forum?forum_id=$forum_id" \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/category-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-delete.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-delete.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,13 @@ + +@context_bar@ +Delete a Category + +You are going to delete the category "@category_name@", causing all +@message_count@ messages in it to be placed in the category "Unknown". + +
+

Are you sure you want to delete this category?

+ +Yes     +No +

Index: openacs-4/contrib/obsolete-packages/bboard/www/category-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-delete.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,40 @@ +ad_page_contract { + + Displays a confirmation of "do you really want to delete this category?" + + @author John Prevost + @creation-date 2000-12-01 + @cvs-id $Id: category-delete.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + category_id:integer,notnull,bboard_category_id +} -properties { + context_bar:onevalue + category_id:onevalue + category_name:onevalue + message_count:onevalue +} + +ad_require_permission $category_id bboard_delete_category + +db_1row forum_short_name_id { + select f.short_name as forum_name, f.forum_id + from bboard_forums f, bboard_categories c + where c.category_id = :category_id + and c.forum_id = f.forum_id +} + +db_1row category_short_name { + select short_name as category_name + from bboard_categories + where category_id = :category_id +} + +db_1row category_message_count { + select count(*) as message_count + from bboard_category_message_map + where category_id = :category_id +} + +set context_bar [list [list "forum?[export_url_vars forum_id]" $forum_name] \ + {"Delete Category"}] Index: openacs-4/contrib/obsolete-packages/bboard/www/category-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-edit-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,26 @@ +ad_page_contract { + + Edit a category + + @author John Prevost + @creation-date 2000-09-07 + @cvs-id $Id: category-edit-2.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + @param category_id The ID of the category to update + @param short_name The short name of the forum + @param forum_id The forum ID the category is in (to redirect back to) + +} { + category_id:integer,notnull,bboard_category_id + short_name:notnull,trim + forum_id:integer,notnull,bboard_forum_id +} + +ad_require_permission $category_id bboard_write_category + +db_transaction { + bboard_category_set -category_id $category_id -short_name $short_name +} +# on error ... + +ad_returnredirect "forum?[export_url_vars forum_id]" Index: openacs-4/contrib/obsolete-packages/bboard/www/category-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-edit.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,44 @@ +ad_page_contract { + + Displays a form for editing a category in a forum. + + @author John Prevost + @creation-date 2000-09-07 + @cvs-id $Id: category-edit.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + category_id:integer,notnull,bboard_category_id +} -properties { + context_bar:onevalue + forum_name:onevalue + forum_id:onevalue + category_id:onevalue + action:onevalue + title:onevalue +} + +ad_require_permission $category_id bboard_write_category + +set action "category-edit-2" +set submit_label "Save Changes" +set title "Edit a Category" + +# bboard_category_get -category_id $category_id -column_array category +# bboard_forum_get -forum_id $category(forum_id) -column_array forum + +# set forum_name $forum(short_name) +# set forum_id $forum(forum_id) +# set short_name $category(short_name) + +db_1row category_info { + select f.short_name as forum_name, f.forum_id, c.short_name + from bboard_forums f, bboard_categories c + where c.category_id = :category_id + and f.forum_id = c.forum_id +} + +set context_bar \ + [list [list "forum?[export_url_vars forum_id]" $forum_name] \ + "Edit a Category"] + +ad_return_template category-entry Index: openacs-4/contrib/obsolete-packages/bboard/www/category-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-entry.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-entry.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,20 @@ + +@forum_name@: @title@ +@context_bar@ + +
+ + +
+ + + + + + + + +
Short Name:
+
+
+ Index: openacs-4/contrib/obsolete-packages/bboard/www/category-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-new-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-new-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,26 @@ +ad_page_contract { + + Create a new category in a forum. + + @author John Prevost + @creation-date 2000-08-30 + @cvs-id $Id: category-new-2.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + @param category_id The ID of the new category to be created (debounce) + @param forum_id The ID of the forum to create it in + @param short_name The short name of the forum +} { + category_id:integer,notnull + forum_id:integer,notnull,bboard_forum_id + short_name:notnull,trim +} + +ad_require_permission $forum_id bboard_create_category + +db_transaction { + bboard_category_new -category_id $category_id -forum_id $forum_id \ + -short_name $short_name +} +# on error ... + +ad_returnredirect "forum?[export_url_vars forum_id]" Index: openacs-4/contrib/obsolete-packages/bboard/www/category-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-new.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-new.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,39 @@ +ad_page_contract { + + Displays a form for creating a category in a forum. + + @author John Prevost + @creation-date 2000-08-31 + @cvs-id $Id: category-new.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + forum_id:integer,notnull,bboard_forum_id +} -properties { + context_bar:onevalue + forum_name:onevalue + forum_id:onevalue + short_name:onevalue + submit_label:onevalue + category_id:onevalue + action:onevalue + title:onevalue +} + +ad_require_permission $forum_id bboard_create_category + +set action "category-new-2" +set short_name "" +set submit_label "Create Category" +set title "Create a Category" + +db_1row forum_short_name { + select short_name as forum_name from bboard_forums + where forum_id = :forum_id +} + +set context_bar \ + [list [list "forum?[export_url_vars forum_id]" $forum_name] \ + "Create a Category"] + +set category_id [db_nextval acs_object_id_seq] + +ad_return_template category-entry Index: openacs-4/contrib/obsolete-packages/bboard/www/category-subscribe.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-subscribe.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-subscribe.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,25 @@ +ad_page_contract { + + Unsubscribe the current user from a given category. + + @author John Prevost + @creation-date 2000-10-28 + @cvs-id $Id: category-subscribe.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + category_id:integer,notnull,bboard_category_id +} + +db_1row category_forum { + select forum_id from bboard_categories where category_id = :category_id +} + +# Not strictly right +ad_require_permission $forum_id bboard_create_message + +catch { + bboard_subscribe_category \ + -category_id $category_id -subscriber_id [ad_verify_and_get_user_id] +} + +ad_returnredirect "forum-by-category?category_id=$category_id" \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/category-unsubscribe.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-unsubscribe.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-unsubscribe.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,25 @@ +ad_page_contract { + + Unsubscribe the current user from a given category. + + @author John Prevost + @creation-date 2000-10-28 + @cvs-id $Id: category-unsubscribe.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + category_id:integer,notnull,bboard_category_id +} + +db_1row category_forum { + select forum_id from bboard_categories where category_id = :category_id +} + +# Not strictly right +ad_require_permission $forum_id bboard_create_message + +catch { + bboard_unsubscribe_category \ + -category_id $category_id -subscriber_id [ad_verify_and_get_user_id] +} + +ad_returnredirect "forum-by-category?category_id=$category_id" \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,161 @@ +ad_page_contract { + + Displays a list of messages in a forum + + @author John Prevost (jmp@arsdigita.com) + @creation-date 2000-08-29 + @cvs-id $Id: forum-by-category.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + category_id:integer,bboard_category_id + forum_id:integer,notnull,bboard_forum_id +} -properties { + forum_write_p:onevalue + forum_create_p:onevalue + context_bar:onevalue + title:onevalue + forum_name:onevalue + forum_id:onevalue + category_id:onevalue + messages:multirow + categories:multirow + moderator_p:onevalue + unapproved:multirow + rejected:multirow + subscribed_p:onevalue + subscribe_p:onevalue +} + +ad_require_permission $forum_id bboard_read_forum + +set moderator_p 0 + +set message_create_p [ad_permission_p $forum_id bboard_create_message] +set category_create_p 0 + +set user_id [ad_verify_and_get_user_id] + +set subscribe_p 0 +set subscribed_p 0 + +db_1row forum_info { + select f.short_name as forum_name, f.moderated_p + from bboard_forums f + where f.forum_id = :forum_id +} + + +if ![string eq $category_id ""] { + db_1row category_info { + select f.forum_id, f.short_name as forum_name, f.moderated_p + from bboard_categories c, bboard_forums f + where c.category_id = :category_id + and c.forum_id = f.forum_id + } + + if [string equal $moderated_p "t"] { + set moderator_p [ad_permission_p $forum_id bboard_moderate_forum] + } + + db_1row category_info { + select short_name as category_name from bboard_categories + where category_id = :category_id + } + +} else { + set category_name "Uncategorized" +} + + +if [ad_permission_p $forum_id bboard_create_message] { + set subscribe_p 1 + + + if { ![string eq $category_id ""] && [string equal [bboard_category_subscribed_p -direct $user_id $category_id] "t"]} { + set subscribed_p 1 + } else { + set subscribed_p 0 + } +} + +set context_bar [list [list "forum?[export_url_vars forum_id]" $forum_name] \ + $category_name] +set title "$forum_name: $category_name" + +set package_id [ad_conn package_id] + +db_multirow categories categories_select_none { + select 1 from dual where 0 = 1 +} + +if [string equal $moderated_p "f"] { + set moderated_sql "" +} else { + set moderated_sql "and status = 'approved'" +} + +if {[string eq $category_id ""]} { + set category_sql "and category_id is null" +} else { + set category_sql "and category_id = :category_id" +} + + +db_multirow messages messages_select_by_cat " + select message_id, title, num_replies, + first_names||' '||last_name as full_name, + to_char(last_reply_date,'MM/DD/YY hh12:Mi am') as last_updated + from bboard_messages_by_category b, persons + where person_id = sender + and reply_to is null + $category_sql + $moderated_sql + and exists (select 1 from acs_object_party_privilege_map + where object_id = message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_read_message') + order by sent_date desc + " + +if { !$moderator_p } { + + db_multirow unapproved unapproved_none { + select 1 from dual where 1 = 0 + } + + db_multirow rejected rejected_none { + select 1 from dual where 1 = 0 + } + +} else { + + db_multirow unapproved messages_select_unmoderated { + select message_id, title, num_replies, + first_names||' '||last_name as full_name + from bboard_messages_by_category, persons + where category_id = :category_id + and person_id = sender + and reply_to is null + and status = 'unmoderated' + and exists (select 1 from acs_object_party_privilege_map + where object_id = message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_read_message') + } + + db_multirow rejected rejected_messages_select { + select message_id, title, num_replies, + first_names||' '||last_name as full_name + from bboard_messages_by_category, persons + where category_id = :category_id + and person_id = sender + and reply_to is null + and status = 'rejected' + and exists (select 1 from acs_object_party_privilege_map + where object_id = message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_read_message') + } + +} + +ad_return_template "forum-view" Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,53 @@ +ad_page_contract { + Presents confirmation screen for deleting a forum. + + @author Anukul Kapoor (akk@arsdigita.com) + @creation-date 2000-30-11 + @cvs-id $Id: forum-delete-2.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + forum_id:integer,notnull,bboard_forum_id +} -properties { + forum_id:onevalue + short_name:onevalue + charter:onevalue +} + +set user_id [ad_verify_and_get_user_id] + +ad_require_permission $forum_id bboard_delete_forum + +db_transaction { + db_dml messages_delete { + declare + cursor message_cursor is + select distinct m.message_id + from acs_messages m, bboard_forum_message_map f + where m.message_id = f.message_id + and f.forum_id = :forum_id; + begin + for message_val in message_cursor loop + acs_message.delete(message_val.message_id); + end loop; + end; + } + + db_dml categories_delete { + declare + cursor category_cursor is + select distinct category_id + from bboard_categories c + where c.forum_id = :forum_id; + begin + for category_val in category_cursor loop + bboard_category.delete(category_val.category_id); + end loop; + end; + } + + db_dml forum_delete { + begin + bboard_forum.delete (:forum_id); + end; + } +} +ad_returnredirect "" Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,14 @@ + +@context_bar@ +@forum_name@ + +

Delete @forum_name@ forum?

+ +You have chosen to delete the @forum_name@ forum.

This forum and its +messages (@message_count@) will be irrevocably deleted.

+ +

+ + +
+ Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,35 @@ +ad_page_contract { + Presents confirmation screen for deleting a forum. + + @author Anukul Kapoor (akk@arsdigita.com) + @creation-date 2000-30-11 + @cvs-id $Id: forum-delete.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + forum_id:integer,notnull,bboard_forum_id +} -properties { + forum_id:onevalue + short_name:onevalue + charter:onevalue +} + +set package_id [ad_conn package_id] + +set context_bar {} +set user_id [ad_verify_and_get_user_id] + +# ad_require_permission $forum_id bboard_read_forum +ad_require_permission $forum_id bboard_delete_forum + +db_1row forum_info { + select short_name as forum_name, charter as forum_charter + from bboard_forums + where forum_id = :forum_id +} + +db_1row forum_message_count { + select count(*) as message_count + from bboard_forum_message_map bfmm + where bfmm.forum_id = :forum_id +} + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-edit-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,36 @@ +ad_page_contract { + + Save changes to a forum. + + @author John Prevost + @creation-date 2000-09-07 + @cvs-id $Id: forum-edit-2.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + @param forum_id The ID of the forum to be changed + @param short_name The short name of the forum + @param charter The long description (charter) of the forum + @param moderated_p Should the forum be moderated? +} { + forum_id:integer,notnull,bboard_forum_id + short_name:notnull,trim + charter:notnull,trim + {moderated_p:optional ""} +} + +ad_require_permission $forum_id bboard_write_forum + +if [empty_string_p $moderated_p] { + set moderated_p "f" +} else { + set moderated_p "t" +} + +set package_id [ad_conn package_id] + +db_transaction { + bboard_forum_set -forum_id $forum_id -short_name $short_name \ + -charter $charter -moderated_p $moderated_p +} +# on error ... + +ad_returnredirect "." Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-edit.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,34 @@ +ad_page_contract { + + Displays a form for editing a forum. + + @author John Prevost (jmp@arsdigita.com) + @creation-date 2000-09-07 + @cvs-id $Id: forum-edit.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + forum_id:integer,notnull,bboard_forum_id +} -properties { + context_bar:onevalue + forum_id:onevalue + title:onevalue + action:onevalue + submit_label:onevalue + short_name:onevalue + charter:onevalue + moderated_p:onevalue +} + +ad_require_permission $forum_id bboard_write_forum + +db_1row forum_info { + select short_name, charter, moderated_p from bboard_forums + where forum_id = :forum_id +} + +set context_bar {"Edit a Forum"} +set title "Edit a Forum" +set action "forum-edit-2" +set submit_label "Save Changes" + +ad_return_template "forum-entry" Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-entry.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-entry.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,31 @@ + +@context_bar@ +@title@ + +
+ +
+ + + + + + + + + + + + + + + + + + +
Short Name:

Charter: +
Moderated: + +
+
+
Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-new-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-new-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,38 @@ +ad_page_contract { + + Create a new forum. + + @author John Prevost + @creation-date 2000-08-30 + @cvs-id $Id: forum-new-2.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + @param forum_id The ID of the new forum to be created (debounce) + @param short_name The short name of the forum + @param charter The long description (charter) of the forum + @param moderated_p Should the forum be moderated? +} { + forum_id:integer,notnull + short_name:notnull,trim + charter:notnull,trim + {moderated_p:optional ""} +} + +ad_require_permission [ad_conn package_id] bboard_create_forum + +if [empty_string_p $moderated_p] { + set moderated_p "f" +} else { + set moderated_p "t" +} + +set package_id [ad_conn package_id] + +db_transaction { + bboard_forum_new -forum_id $forum_id -short_name $short_name \ + -charter $charter -moderated_p $moderated_p \ + -bboard_id $package_id -creation_user [ad_verify_and_get_user_id] \ + -creation_ip [ad_conn peeraddr] -context_id $package_id +} +# on error ... + +ad_returnredirect "." Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-new.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-new.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,31 @@ +ad_page_contract { + + Displays a form for creating a new forum. + + @author John Prevost (jmp@arsdigita.com) + @creation-date 2000-08-29 + @cvs-id $Id: forum-new.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { +} -properties { + context_bar:onevalue + forum_id:onevalue + title:onevalue + action:onevalue + submit_label:onevalue + short_name:onevalue + charter:onevalue +} + +ad_require_permission [ad_conn package_id] bboard_create_forum + +set context_bar {"Create a Forum"} +set title "Create a Forum" +set action "forum-new-2" +set submit_label "Create Forum" +set short_name "" +set charter "" +set moderated_p "f" + +set forum_id [db_nextval acs_object_id_seq] + +ad_return_template "forum-entry" Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-subscribe.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-subscribe.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-subscribe.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,21 @@ +ad_page_contract { + + Subscribe the current user to a given forum. + + @author John Prevost + @creation-date 2000-10-28 + @cvs-id $Id: forum-subscribe.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + forum_id:integer,notnull,bboard_forum_id +} + +# Not strictly right +ad_require_permission $forum_id bboard_create_message + +catch { + bboard_subscribe_forum \ + -forum_id $forum_id -subscriber_id [ad_verify_and_get_user_id] +} + +ad_returnredirect "forum?forum_id=$forum_id" \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-unsubscribe.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-unsubscribe.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-unsubscribe.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,18 @@ +ad_page_contract { + + Unsubscribe the current user from a given forum. + + @author John Prevost + @creation-date 2000-10-28 + @cvs-id $Id: forum-unsubscribe.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + forum_id:integer,notnull,bboard_forum_id +} + +catch { + bboard_unsubscribe_forum \ + -forum_id $forum_id -subscriber_id [ad_verify_and_get_user_id] +} + +ad_returnredirect "forum?forum_id=$forum_id" \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-view.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-view.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,108 @@ + +@context_bar@ +@title@ + + + +
+[ + + Post a message + + + Post a message + + + + | + + + + Create a category + + | + + + + + + + Subscribe to Category + + + Subscribe to Forum + + + + + Unsubscribe from Category + + + Unsubscribe from Forum + + + + ] + + Last @last_n_days@ days. Show All Messages. + +
+ +

Messages

+ + + +

Not Yet Approved

+ +

Approved

+
+
+ + + + + +

Rejected

+ +
+
+ + +

Categories

+ +
+ +

Search

+
+ + + +
+ Index: openacs-4/contrib/obsolete-packages/bboard/www/forum.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,220 @@ +ad_page_contract { + + Displays a list of messages in a forum + + @author John Prevost (jmp@arsdigita.com) + @creation-date 2000-08-29 + @cvs-id $Id: forum.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + forum_id:integer,notnull,bboard_forum_id + {last_n_days:integer,optional ""} +} -properties { + forum_write_p:onevalue + forum_create_p:onevalue + context_bar:onevalue + title:onevalue + forum_name:onevalue + forum_id:onevalue + messages:multirow + categories:multirow + moderator_p:onevalue + unapproved:multirow + rejected:multirow + subscribed_p:onevalue + subscribe_p:onevalue + last_n_days:onevalue + uncategorized_count:onevalue +} + +ad_require_permission $forum_id bboard_read_forum + +db_1row forum_info { + select short_name as forum_name, moderated_p from bboard_forums + where forum_id = :forum_id +} + +# subscribe_p is whether or not this page allows subscriptions +set subscribed_p 0 + +# subscribed_p is whether or not this particular user is scribed +set subscribe_p 0 + +set user_id [ad_verify_and_get_user_id] + +if [ad_permission_p $forum_id bboard_create_message] { + set subscribe_p 1 + + if [string equal [bboard_forum_subscribed_p $user_id $forum_id] "t"] { + set subscribed_p 1 + } else { + set subscribed_p 0 + } +} + +if [string equal $last_n_days ""] { + set last_n_days [ad_parameter DisplayLastNDays] + + if [string equal $last_n_days ""] { + set last_n_days "0" + } +} + +set moderator_p 0 + +if [string equal $moderated_p "t"] { + set moderator_p [ad_permission_p $forum_id bboard_moderate_forum] +} + +set message_create_p [ad_permission_p $forum_id bboard_create_message] +set category_create_p [ad_permission_p $forum_id bboard_create_category] + +set context_bar [list $forum_name] +set title $forum_name + +set package_id [ad_conn package_id] + +if [string equal $moderated_p "f"] { + + db_multirow messages messages_select { + select message_id, title, num_replies, + first_names||' '||last_name as full_name, + to_char(last_reply_date,'MM/DD/YY hh12:Mi am') as last_updated + from bboard_messages_all b, persons + where forum_id = :forum_id + and sent_date > decode(:last_n_days, 0, '1976-01-01', sysdate - :last_n_days) + and person_id = sender + and reply_to is null + and exists (select 1 from acs_object_party_privilege_map + where object_id = message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_read_message') + order by sent_date desc + } + + db_multirow categories categories_select { + select c.category_id, short_name, count(m.message_id) as message_count, + acs_permission.permission_p(c.category_id, :user_id, + 'bboard_write_category') as write_p, + acs_permission.permission_p(c.category_id, :user_id, + 'bboard_delete_category') as delete_p + from bboard_categories c, + bboard_category_message_map m + where c.forum_id = :forum_id + and m.category_id(+) = c.category_id + and (m.message_id is null + or m.message_id in (select f.message_id + from bboard_forum_message_map f + where f.forum_id = :forum_id)) + group by c.category_id, short_name + } + + db_1row uncategorized_count { + select count(*) as uncategorized_count + from bboard_messages_by_category b + where category_id is null + and forum_id = :forum_id + and exists (select 1 from acs_object_party_privilege_map + where object_id = message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_read_message') + } + + +} else { + + db_multirow messages messages_select_approved { + select message_id, title, num_replies, + first_names||' '||last_name as full_name, + to_char(last_reply_date,'MM/DD/YY hh12:Mi am') as last_updated + from bboard_messages_all b, persons + where forum_id = :forum_id + and sent_date > decode(:last_n_days, 0, '1976-01-01', sysdate - :last_n_days) + and person_id = sender + and reply_to is null + and status = 'approved' + and exists (select 1 from acs_object_party_privilege_map + where object_id = message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_read_message') + order by sent_date desc + } + + db_multirow categories categories_select_approved { + select c.category_id, c.short_name, + count(m.message_id) as message_count, + acs_permission.permission_p(c.category_id, :user_id, + 'bboard_write_category') as write_p, + acs_permission.permission_p(c.category_id, :user_id, + 'bboard_delete_category') as delete_p + from bboard_categories c, + (select c.category_id, c.message_id + from bboard_category_message_map c, + bboard_forum_message_map f + where c.message_id = f.message_id + and f.status = 'approved' + and f.forum_id = :forum_id) m + where c.forum_id = :forum_id + and m.category_id(+) = c.category_id + and (m.message_id is null + or m.message_id in (select f.message_id + from bboard_forum_message_map f + where f.forum_id = :forum_id)) + group by c.category_id, short_name + } + + db_1row uncategorized_approved_count { + select count(*) as uncategorized_count + from bboard_messages_by_category b + where category_id is null + and forum_id = :forum_id + and exists (select 1 from acs_object_party_privilege_map + where object_id = message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_read_message') + } + +} + +if { !$moderator_p } { + + db_multirow unapproved unapproved_none { + select 1 from dual where 1 = 0 + } + + db_multirow rejected rejected_none { + select 1 from dual where 1 = 0 + } + +} else { + + db_multirow unapproved messages_select_unmoderated { + select message_id, title, num_replies, + first_names||' '||last_name as full_name + from bboard_messages_all, persons + where forum_id = :forum_id + and person_id = sender + and reply_to is null + and status = 'unmoderated' + and exists (select 1 from acs_object_party_privilege_map + where object_id = message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_read_message') + } + + db_multirow rejected rejected_messages_select { + select message_id, title, num_replies, + first_names||' '||last_name as full_name + from bboard_messages_all, persons + where forum_id = :forum_id + and person_id = sender + and reply_to is null + and status = 'rejected' + and exists (select 1 from acs_object_party_privilege_map + where object_id = message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_read_message') + } + +} + +ad_return_template "forum-view" Index: openacs-4/contrib/obsolete-packages/bboard/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/index.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,33 @@ + +@context_bar@ +Forums + + + [Create a forum]

+ + + + There are no forums available.

+ + + +

+ + Index: openacs-4/contrib/obsolete-packages/bboard/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/index.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,37 @@ +ad_page_contract { + + Displays a list of forums on the site + + @author John Prevost (jmp@arsdigita.com) + @creation-date 2000-08-29 + @cvs-id $Id: index.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { +} -properties { + context_bar:onevalue + package_id:onevalue + user_id:onevalue + forum:multirow +} + +set package_id [ad_conn package_id] + +set context_bar {} + +set user_id [ad_verify_and_get_user_id] + +set forum_create_p [ad_permission_p $package_id bboard_create_forum] + +db_multirow forums forums_select { + select forum_id, short_name, moderated_p, charter, + acs_permission.permission_p(forum_id, :user_id, + 'bboard_write_forum') as write_p, + acs_permission.permission_p(forum_id, :user_id, + 'bboard_delete_forum') as delete_p + + from bboard_forums f + where bboard_id = :package_id + and acs_permission.permission_p(forum_id,:user_id,'bboard_read_forum') = 't' + order by short_name +} + +ad_return_template Index: openacs-4/contrib/obsolete-packages/bboard/www/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/Attic/master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/master.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,9 @@ + +@title@ + +

@title@

+ + <%= [eval ad_context_bar $context_bar] %> + +
+ Index: openacs-4/contrib/obsolete-packages/bboard/www/message-approve.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-approve.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-approve.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,27 @@ +ad_page_contract { + + Marks a message as approved for display in a moderated forum. + + @author John Prevost + @creation-date 2000-09-10 + @cvs-id $Id: message-approve.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + message_id:integer,notnull,acs_message_id + forum_id:integer,notnull,bboard_forum_id +} + +ad_require_permission $forum_id bboard_moderate_forum + +bboard_message_set_status -message_id $message_id -forum_id $forum_id \ + -status "approved" + +db_1row sender_info { + select sender from acs_messages where message_id = :message_id +} + +# Should this check if it was already approved? +bboard_alert_one_mesg -message_id $message_id -forum_id $forum_id \ + -user_id $sender -creation_ip [ad_conn peeraddr] + +ad_returnredirect "forum?forum_id=$forum_id" Index: openacs-4/contrib/obsolete-packages/bboard/www/message-attach-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-attach-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-attach-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,72 @@ +ad_page_contract { + + We will do the grunt work here of creating an attachment. + + @author Anukul Kapoor (akk@arsdigita.com) + @creation-date 2000-12-18 + @cvs $Id: message-attach-2.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + message_id:integer,notnull + file_id:integer,notnull + file_title:notnull + upload_file:notnull + upload_file.tmpfile:tmpfile +} + +ad_require_permission $message_id bboard_write_message + +# authenticate the user +set user_id [ad_verify_and_get_user_id] + +# aolserver will give us a guessed mime type for the upload +set guessed_file_type [ns_guesstype $upload_file] + +# let us get the useful bits out of the long filename +set full_filename ${upload_file.tmpfile} +set base_filename [bboard_upload_basename $upload_file] +set file_ext [bboard_upload_extension $full_filename] + +# check file size against user parameters + +set n_bytes [file size $full_filename] +set max_file_size [ad_parameter MaxAttachmentSize] + +if { $n_bytes > $max_file_size && $max_file_size > 0 } { + ad_return_complaint 1 "Your file is too large. The publisher of + [ad_system_name] has chosen to limit attachments to + [util_commify_number $max_file_size] bytes.\n" +} +if { $n_bytes == 0 } { + ad_return_complaint 1 "Your file is zero-length. Either you attempted to + upload a zero length file, a file which does not exists, + or something went wrong during the transfer.\n" +} + + +# insert the file into the database + +db_transaction { + + # check for and add MIME types missing from cr mime types table + bboard_check_and_register_mime_type $guessed_file_type + + if { $file_ext == "jpeg" || $file_ext == "jpg" || $file_ext == "gif" } { + set image_size [bboard_image_size $file_ext $upload_file] + set width [lindex $image_size 0] + set height [lindex $image_size 1] + + bboard_attach_image -message_id $message_id -file_id $file_id \ + -short_filename $base_filename -local_filename $full_filename\ + -mime_type $guessed_file_type -user_id $user_id \ + -creation_ip [ad_conn peeraddr] -title $file_title \ + -width $width -height $height + } else { + bboard_attach_file -message_id $message_id -file_id $file_id \ + -short_filename $base_filename -local_filename $full_filename\ + -mime_type $guessed_file_type -user_id $user_id \ + -creation_ip [ad_conn peeraddr] -title $file_title + } +} + +ad_returnredirect [bboard_message_url $message_id] Index: openacs-4/contrib/obsolete-packages/bboard/www/message-attach.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-attach.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-attach.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,28 @@ + +@title@ +@context_bar@ + +
+<%= [export_form_vars file_id message_id] %> + +
+ + + + + + + + + +
Title:
Filename: +
+ Use the "Browse..." button to locate your file, then click "Open". +
+
+ +

+

+ +
+
Index: openacs-4/contrib/obsolete-packages/bboard/www/message-attach.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-attach.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-attach.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,27 @@ +ad_page_contract { + + This page presents a form for creating a message attachment. + + @author Anukul Kapoor (akk@arsdigita.com) + @creation-datee 2000-12-18 + @cvs $Id: message-attach.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + forum_id:integer,notnull,bboard_forum_id + message_id:integer,notnull +} -properties { + title:onevalue + context_bar:onevalue + file_id:onevalue + message_id:onevalue + forum_id:onevalue +} + +ad_require_permission $message_id bboard_write_message + +set title "Upload message attachment" +set context_bar "" + +set file_id [db_nextval acs_object_id_seq] + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,37 @@ +ad_page_contract { + + Delete a message + + @author John Prevost + @creation-date 2000-09-06 + @cvs-id $Id: message-delete-2.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + message_id:integer,notnull,acs_message_id + forum_id:integer,notnull,bboard_forum_id + {replies ""} +} + +ad_require_permission $message_id bboard_delete_message + +set user_id [ad_verify_and_get_user_id] + +if [string eq $replies ""] { + bboard_message_set_status -message_id $message_id -forum_id $forum_id \ + -status [db_null] +} else { + db_dml bboard_delete_threads { + delete from bboard_forum_message_map bfm + where message_id in (select message_id + from acs_messages m + connect by prior message_id = reply_to + start with message_id = :message_id) + and exists (select 1 from acs_object_party_privilege_map + where object_id = bfm.message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_delete_message') + + } +} + +ad_returnredirect "forum?forum_id=$forum_id" \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/message-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-delete.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-delete.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,24 @@ + +@context_bar@ +Delete a Message + + + +
+ + +

Are you sure you want to delete this message?

+ +Yes + + +

Are you sure you want to delete this message and all of its replies?

+ +Yes     + +    +No +

Index: openacs-4/contrib/obsolete-packages/bboard/www/message-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-delete.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,45 @@ +ad_page_contract { + + Displays a confirmation of "do you really want to delete this message?" + + @author John Prevost + @creation-date 2000-09-06 + @cvs-id $Id: message-delete.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + message_id:integer,notnull,acs_message_id + forum_id:integer,notnull,bboard_forum_id + {replies ""} +} -properties { + context_bar:onevalue + message_id:onevalue + forum_id:onevalue + message:onerow + replies:onevalue +} + +ad_require_permission $message_id bboard_delete_message + +if ![db_0or1row message_info { + select m.message_id, m.reply_to, m.title, + m.sent_date, m.mime_type, m.content, + p.first_names ||' '||p.last_name as full_name + from acs_messages_all m, persons p, bboard_forum_message_map f + where m.message_id = :message_id + and f.message_id = :message_id + and f.forum_id = :forum_id + and p.person_id = m.sender + } -column_array message] { + # It's not in that forum! + ad_returnredirect "forum?forum_id=$forum_id" +} + +db_1row forum_short_name { + select short_name as forum_name from bboard_forums + where forum_id = :forum_id +} + +set context_bar [list [list "forum?[export_url_vars forum_id]" $forum_name] \ + {"Delete Message"}] + +ad_return_template Index: openacs-4/contrib/obsolete-packages/bboard/www/message-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-edit-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,71 @@ +ad_page_contract { + + Confirmation page for editing a message. + + @author John Prevost + @creation-datee 2000-09-08 + @cvs $Id: message-edit-2.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + @param message_id The message to update + @param title The new title + @param content The new content + @param mime_type The new mime type + @param category_id The new category +} { + message_id:integer,notnull,acs_message_id + forum_id:integer,notnull,bboard_forum_id + title:notnull,trim + content:notnull,allhtml,trim + mime_type:notnull + category_id:integer,bboard_category_id +} -validate { + content_html -requires {content mime_type} { + if [string eq $mime_type "text/html"] { + set complaint [ad_check_for_naughty_html $content] + if ![empty_string_p $complaint] { + ad_complain $complaint + return 0 + } + } + return 1 + } +} -properties { + forum_id:onevalue + page_title:onevalue + context_bar:onevalue + forum_name:onevalue + content_for_display:onevalue + title:onevalue + message_id:onevalue + form_vars:onevalue + reply_to:onevalue + target:onevalue +} + +ad_require_permission $message_id bboard_write_message + +db_1row forum_short_name { + select short_name as forum_name from bboard_forums + where forum_id = :forum_id +} + +set target "message-edit-3" + +db_1row forum_short_name { + select short_name as forum_name from bboard_forums + where forum_id = :forum_id +} + +set page_title "Confirm Message Changes in $forum_name" + +set context_bar [list \ + [list "forum?[export_url_vars forum_id]" $forum_name] \ + "Confirm Message Edit"] + +set content_for_display [acs_messaging_format_as_html $mime_type $content] + + +set form_vars [export_form_vars message_id forum_id title content \ + mime_type category_id reply_to] + +ad_return_template "message-preview" Index: openacs-4/contrib/obsolete-packages/bboard/www/message-edit-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-edit-3.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-edit-3.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,50 @@ +ad_page_contract { + + Update edited message + + @author John Prevost + @creation-datee 2000-09-08 + @cvs $Id: message-edit-3.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + @param message_id The message to update + @param category_id The new category + @param title The new title + @param content The new content + @param mime_type The new mime type + +} { + forum_id:integer,notnull,bboard_forum_id + message_id:integer,notnull,acs_message_id + category_id:integer,bboard_category_id + title:notnull,trim + content:allhtml,notnull,trim + mime_type:notnull +} -validate { + content_html -requires {content mime_type} { + if [string eq $mime_type "text/html"] { + set complaint [ad_check_for_naughty_html $content] + if ![empty_string_p $complaint] { + ad_complain $complaint + } + } + } +} + +ad_require_permission $message_id bboard_write_message + +db_transaction { + + bboard_message_clear_categories -message_id $message_id + + if ![empty_string_p $category_id] { + bboard_message_add_category -message_id $message_id \ + -category_id $category_id + } + + bboard_message_set -message_id $message_id -title $title \ + -mime_type $mime_type -content $content + +} +# on error ... + +ad_returnredirect "forum?[export_url_vars forum_id]" Index: openacs-4/contrib/obsolete-packages/bboard/www/message-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-edit.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,83 @@ +ad_page_contract { + + A form for editing a message + + @author John Prevost + @creation-datee 2000-09-08 + @cvs $Id: message-edit.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + @param message_id The message to edit + +} { + message_id:integer,notnull,acs_message_id + forum_id:integer,notnull,bboard_forum_id +} -properties { + context_bar:onevalue + forum_id:onevalue + forum_name:onevalue + categories:multirow + category_id:onevalue + reply_to:onevalue + quote:onerow + has_quote:onevalue + page_title:onevalue + target:onevalue + title:onevalue + content:onevalue + submit_label:onevalue + message_id:onevalue + msg_mime_type:onevalue +} + +ad_require_permission $message_id bboard_write_message + +db_1row message_info { + select message_id, reply_to, title, mime_type, content + from acs_messages_all m + where message_id = :message_id +} + +set msg_mime_type $mime_type + +set category_id "" + +db_0or1row first_category { + select min(category_id) as category_id from bboard_category_message_map + where message_id = :message_id + group by message_id +} + +db_1row forum_short_name { + select short_name as forum_name from bboard_forums + where forum_id = :forum_id +} + +set page_title "Edit a Message in $forum_name" + +set target "message-edit-2" +set submit_label "Confirm Changes" + +set context_bar \ + [list [list "forum?[export_url_vars forum_id]" $forum_name] \ + "Edit a Message"] + +set user_id [ad_verify_and_get_user_id] + +set category_pulldown_list "" + +db_0or1row quote_info { + select m.reply_to, m.title, m.sent_date, + m.mime_type, m.content, + p.first_names||' '||p.last_name as full_name + from acs_messages_all m, persons p + where message_id = :reply_to + and person_id = sender +} -column_array quote + +db_multirow categories category_list { + select c.category_id, c.short_name + from bboard_categories c + where forum_id = :forum_id +} + +ad_return_template "message-entry" Index: openacs-4/contrib/obsolete-packages/bboard/www/message-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-entry.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-entry.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,63 @@ + +@page_title@ +@context_bar@ + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
In Reply To: + + +
+
Subject:
Category: + +

Message: +
Text type? + +
+
+
Index: openacs-4/contrib/obsolete-packages/bboard/www/message-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-list.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-list.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,46 @@ + + There are no messages available.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ScoreSubjectAuthorRepliesLast updateDate
@messages.the_score@@messages.title@@messages.full_name@<%= [expr @messages.num_replies@-1] %>@messages.last_updated@@messages.sent_date@
+
Index: openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,59 @@ +ad_page_contract { + + Confirmation page for a new posting. + + @author Anukul Kapoor (akk@arsdigita.com) + @creation-datee 2000-08-29 + @cvs $Id: message-mail-2.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + @param forum_id The forum ID to return to + @param message_id The message ID to copy and return to + @param new_message_id Debounce for the new message creation + @param email Recipient of email +} { + forum_id:integer,notnull,bboard_forum_id + message_id:integer,notnull,acs_message_id + new_message_id:integer,notnull + email:notnull,trim +} + +ad_require_permission $forum_id bboard_create_message + +set user_id [ad_verify_and_get_user_id] +set creation_ip [ad_conn peeraddr] + +db_transaction { + + db_1row user_email { + select email as user_email from parties where party_id = :user_id + } + + db_1row message_info { + select reply_to, sender, title, mime_type, content + from acs_messages_all + where message_id = :message_id + } + + bboard_message_new -message_id $new_message_id \ + -sender $user_id -title "\[Fwd by $user_email\] $title" \ + -mime_type $mime_type -content $content -context_id $message_id + + if ![string equal [bboard_forum_moderated_p $forum_id] "t"] { + bboard_schedule_sends -message_id $message_id + } + + # queue it up to be sent + db_dml forward_queue { + begin + acs_message.send ( + message_id => :new_message_id, + to_address => :email, + grouping_id => :new_message_id, + wait_until => sysdate + ); + end; + } + +} + +ad_returnredirect "[bboard_message_url $message_id $forum_id]" Index: openacs-4/contrib/obsolete-packages/bboard/www/message-mail.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-mail.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-mail.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,29 @@ + +Mail to a friend +@context_bar@ + +

+ + + +
+ + + + + + + + + + +
Forwarding: + + +
Recipient Email: +
+
+
Index: openacs-4/contrib/obsolete-packages/bboard/www/message-mail.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-mail.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-mail.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,54 @@ +ad_page_contract { + + A form for posting a new message to a bboard forum. + + @author Anukul Kapoor (akk@arsdigita.com) + @creation-datee 2000-08-29 + @cvs $Id: message-mail.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + @param forum_id The forum to post in + @param category_id The default category for the message + @param reply_to The message this post should be in reply to + +} { + forum_id:integer,notnull,bboard_forum_id + message_id:integer,notnull,acs_message_id +} -properties { + context_bar:onevalue + forum_id:onevalue + message:onerow + message_id:onevalue + new_message_id:onevalue + sender_email:onevalue +} + +ad_require_permission $forum_id bboard_create_message + +db_1row forum_short_name { + select short_name as forum_name from bboard_forums + where forum_id = :forum_id +} + +set user_id [ad_verify_and_get_user_id] + +db_1row sender_email { + select email as sender_email from parties + where party_id = :user_id +} + +set new_message_id [db_nextval acs_object_id_seq] + +set context_bar \ + [list [list "forum?[export_url_vars forum_id]" $forum_name] \ + "Post"] + +db_0or1row message_info { + select reply_to, title, sent_date, + mime_type, content, + first_names||' '||last_name as full_name + from acs_messages_all m, persons p + where message_id = :message_id + and person_id = sender +} -column_array quote + +ad_return_template "message-mail" Index: openacs-4/contrib/obsolete-packages/bboard/www/message-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-new-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-new-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,84 @@ +ad_page_contract { + + Confirmation page for a new posting. + + @author Anukul Kapoor (akk@arsdigita.com) + @creation-datee 2000-08-29 + @cvs $Id: message-new-2.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + @param forum_id The forum to post to + @param title The message title + @param content The message contents + @param category_id The category to post to + @param reply_to The message this is in reply to +} { + forum_id:integer,notnull,bboard_forum_id + title:notnull,trim + content:notnull,allhtml,trim + mime_type:notnull + category_id:integer,bboard_category_id + {reply_to:integer,acs_message_id ""} +} -validate { + content_html -requires {content mime_type} { + if [string eq $mime_type "text/html"] { + set complaint [ad_html_security_check $content] + if ![empty_string_p $complaint] { + ad_complain $complaint + } + } + } +} -properties { + page_title:onevalue + context_bar:onevalue + forum_name:onevalue + content_for_display:onevalue + title:onevalue + message_id:onevalue + form_vars:onevalue + reply_to:onevalue + target:onevalue + subscribe_p:onevalue + msg_mime_type:onevalue +} + +ns_log Notice "mime_type is $mime_type" +set subscribe_p 1 + +set user_id [ad_verify_and_get_user_id] + +ad_require_permission $forum_id bboard_create_message + +set target "message-new-3" + +db_1row forum_short_name { + select short_name as forum_name from bboard_forums + where forum_id = :forum_id +} + +set page_title "Confirm Message for Posting in $forum_name" + +set context_bar [list \ + [list "forum?[export_url_vars forum_id]" $forum_name] \ + "Post"] + +set content_for_display [acs_messaging_format_as_html $mime_type $content] + +set message_id [db_nextval acs_object_id_seq] + +set msg_mime_type $mime_type + +set form_vars [export_form_vars message_id forum_id title content \ + mime_type category_id reply_to] + +if ![string equal $reply_to ""] { + set subscribe_p 0 +} else { + if {[string equal [bboard_category_subscribed_p $user_id $category_id] "t"] || + [string equal [bboard_forum_subscribed_p $user_id $forum_id] "t"]} { + set subscribe_p 0 + } else { + set subscribe_p 1 + } +} + +ad_return_template "message-preview" Index: openacs-4/contrib/obsolete-packages/bboard/www/message-new-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-new-3.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-new-3.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,63 @@ +ad_page_contract { + + Confirmation page for a new posting. + + @author Anukul Kapoor (akk@arsdigita.com) + @creation-datee 2000-08-29 + @cvs $Id: message-new-3.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + @param forum_id + @param short_name + @param content + @param mime_type +} { + message_id:integer,notnull + forum_id:integer,notnull,bboard_forum_id + category_id:integer,bboard_category_id + title:notnull,trim + content:allhtml,notnull,trim + mime_type:notnull + {reply_to:integer,acs_message_id ""} + {subscribe_p:optional ""} +} + +ad_require_permission $forum_id bboard_create_message + +set user_id [ad_verify_and_get_user_id] +set creation_ip [ad_conn peeraddr] + +db_transaction { + + bboard_message_new -message_id $message_id -reply_to $reply_to \ + -sender $user_id -title $title -mime_type $mime_type \ + -content $content -context_id $forum_id \ + -creation_ip $creation_ip + + bboard_message_set_status \ + -message_id $message_id -forum_id $forum_id -status "unmoderated" + + if {![empty_string_p $category_id]} { + bboard_message_add_category \ + -message_id $message_id -category_id $category_id + } + + if ![empty_string_p $subscribe_p] { + bboard_subscribe_thread -thread_id $message_id -subscriber_id $user_id + } + + if ![string equal [bboard_forum_moderated_p $forum_id] "t"] { + bboard_alert_one_mesg -message_id $message_id -forum_id $forum_id \ + -user_id $user_id -creation_ip $creation_ip + } + + if [string equal [ad_parameter "UserPostsEditableP"] "t"] { + db_dml grant { + begin + acs_permission.grant_permission(:message_id, :user_id, 'bboard_write_message'); + end; + } + } + +} + +ad_returnredirect "forum?[export_url_vars forum_id]" Index: openacs-4/contrib/obsolete-packages/bboard/www/message-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-new.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-new.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,86 @@ +ad_page_contract { + + A form for posting a new message to a bboard forum. + + @author Anukul Kapoor (akk@arsdigita.com) + @creation-datee 2000-08-29 + @cvs $Id: message-new.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + @param forum_id The forum to post in + @param category_id The default category for the message + @param reply_to The message this post should be in reply to + +} { + forum_id:integer,notnull,bboard_forum_id + {category_id:integer,bboard_category_id ""} + {reply_to:integer,acs_message_id ""} +} -properties { + context_bar:onevalue + forum_id:onevalue + forum_name:onevalue + categories:multirow + category_id:onevalue + reply_to:onevalue + quote:onerow + has_quote:onevalue + page_title:onevalue + target:onevalue + title:onevalue + content:onevalue + submit_label:onevalue + message_id:onevalue +} + +ad_require_permission $forum_id bboard_create_message + +db_1row forum_short_name { + select short_name as forum_name from bboard_forums + where forum_id = :forum_id +} + +set page_title "Post a New Message to $forum_name" + +set target "message-new-2" +set submit_label "Post Message" + +set title "" +set content "" + +set context_bar \ + [list [list "forum?[export_url_vars forum_id]" $forum_name] \ + "Post"] + +set user_id [ad_verify_and_get_user_id] + +set category_pulldown_list "" + +db_0or1row quote_info { + select reply_to, title, sent_date, + mime_type, content, + first_names||' '||last_name as full_name + from acs_messages_all m, persons p + where message_id = :reply_to + and person_id = sender +} -column_array quote + +if ![empty_string_p $reply_to] { + if [string equal -length 4 -nocase "Re: " $quote(title)] { + set title $quote(title) + } else { + set title "Re: $quote(title)" + } +} + +db_0or1row quote_first_category { + select min(category_id) as category_id from bboard_category_message_map + where message_id = :reply_to + group by message_id +} + +db_multirow categories category_list { + select category_id, short_name + from bboard_categories + where forum_id = :forum_id +} + +ad_return_template "message-entry" Index: openacs-4/contrib/obsolete-packages/bboard/www/message-preview.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-preview.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-preview.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,14 @@ + +@page_title@ +@context_bar@ + +
+ @form_vars@ + +
+
+ +   Subscribe to replies +
+ Index: openacs-4/contrib/obsolete-packages/bboard/www/message-reject.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-reject.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-reject.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,19 @@ +ad_page_contract { + + Marks a message as rejected for display in a moderated forum. + + @author John Prevost + @creation-date 2000-09-10 + @cvs-id $Id: message-reject.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + message_id:integer,notnull,acs_message_id + forum_id:integer,notnull,bboard_forum_id +} + +ad_require_permission $forum_id bboard_moderate_forum + +bboard_message_set_status \ + -message_id $message_id -forum_id $forum_id -status "rejected" + +ad_returnredirect "forum?forum_id=$forum_id" Index: openacs-4/contrib/obsolete-packages/bboard/www/message-subscribe.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-subscribe.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-subscribe.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,22 @@ +ad_page_contract { + + Subscribe the current user to a given message thread. + + @author John Prevost + @creation-date 2000-10-28 + @cvs-id $Id: message-subscribe.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + forum_id:integer,notnull,bboard_forum_id + message_id:integer,notnull,acs_message_id +} + +# Not strictly right +ad_require_permission $forum_id bboard_create_message + +catch { + bboard_subscribe_thread \ + -thread_id $message_id -subscriber_id [ad_verify_and_get_user_id] +} + +ad_returnredirect "[bboard_message_page]?forum_id=$forum_id&message_id=$message_id" \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,32 @@ + +@context_bar@ +@forum_name@: @title@ + + + + + + +
+ + +
+
+ + [ + + Subscribe to replies + + + Unsubscribe from replies + + + + ] + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,83 @@ +ad_page_contract { + + Displays a single message, and all replies in a threaded fashion. + + @author John Prevost + @creation-date 2000-09-01 + @cvs-id $Id: message-threaded.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + message_id:integer,notnull,acs_message_id + forum_id:integer,notnull,bboard_forum_id +} -properties { + message_create_p:onevalue + context_bar:onevalue + forum_name:onevalue + forum_id:onevalue + message:onerow + replies:multirow + title:onevalue + subscribe_p:onevalue + subscribed_p:onevalue +} + +ad_require_permission $message_id bboard_read_message + +set user_id [ad_verify_and_get_user_id] + +set subscribed_p 0 +set subscribe_p 0 + +if [ad_permission_p $forum_id bboard_create_message] { + set subscribe_p 1 + + if [string equal [bboard_message_subscribed_p -direct $user_id $message_id] "t"] { + set subscribed_p 1 + } else { + set subscribed_p 0 + } +} + +set message_create_p [ad_permission_p $forum_id bboard_create_message] + +db_1row forum_short_name { + select short_name as forum_name from bboard_forums + where forum_id = :forum_id +} + +db_1row thread_title { + select title + from acs_messages_all + where message_id = :message_id +} + +set context_bar [list [list "forum?[export_url_vars forum_id]" $forum_name] \ + "One Message"] + +db_multirow replies message_replies { + select m.message_id, m.reply_to, m.title, m.sent_date, m.mime_type, + to_char(m.sent_date, 'Month DD, YYYY HH:Mi am') as pretty_date, + m.content, p.first_names||' '||p.last_name as full_name, + p.person_id as user_id, + mt.depth - 1 as thread_depth, + acs_permission.permission_p(m.message_id, :user_id, + 'bboard_write_message') as write_p, + acs_permission.permission_p(m.message_id, :user_id, + 'bboard_delete_message') as delete_p + from acs_messages_all m, persons p, + (select message_id, level as depth, rownum as seqnum + from acs_messages + connect by prior message_id = reply_to + start with message_id = :message_id) mt + where p.person_id = m.sender + and m.message_id = mt.message_id + and m.message_id in (select bfmm.message_id + from bboard_forum_message_map bfmm + where bfmm.forum_id = :forum_id) + and exists (select 1 from acs_object_party_privilege_map + where object_id = m.message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_read_message') + order by seqnum +} + +ad_return_template Index: openacs-4/contrib/obsolete-packages/bboard/www/message-unsubscribe.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-unsubscribe.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-unsubscribe.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,19 @@ +ad_page_contract { + + Unsubscribe the current user from a given mesage thread. + + @author John Prevost + @creation-date 2000-10-28 + @cvs-id $Id: message-unsubscribe.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + forum_id:integer,notnull,bboard_forum_id + message_id:integer,notnull,acs_message_id +} + +catch { + bboard_unsubscribe_thread \ + -thread_id $message_id -subscriber_id [ad_verify_and_get_user_id] +} + +ad_returnredirect "[bboard_message_page]?forum_id=$forum_id&message_id=$message_id" \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/message.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,46 @@ + +@context_bar@ +@forum_name@: @message.title@ + +

Message:

+
+ +
+ +

Replies:

+ +
+ + +
+ +
+
+
+
+ +[ +Post a reply + + | + + Subscribe to replies + + + Unsubscribe from replies + + + + + | Delete Thread + + +] \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/message.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/message.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,89 @@ +ad_page_contract { + + Displays a single message, and all replies. + + @author John Prevost + @creation-date 2000-09-01 + @cvs-id $Id: message.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + message_id:integer,notnull,acs_message_id + forum_id:integer,notnull,bboard_forum_id +} -properties { + message_create_p:onevalue + context_bar:onevalue + forum_name:onevalue + forum_id:onevalue + message:onerow + replies:multirow + subscribe_p:onevalue + subscribed_p:onevalue +} + +ad_require_permission $message_id bboard_read_message + +set user_id [ad_verify_and_get_user_id] + +set subscribed_p 0 +set subscribe_p 0 + +if [ad_permission_p $forum_id bboard_create_message] { + set subscribe_p 1 + + if [string equal [bboard_message_subscribed_p -direct $user_id $message_id] "t"] { + set subscribed_p 1 + } else { + set subscribed_p 0 + } +} + +db_1row message_info { + select message_id, reply_to, title, + to_char(sent_date, 'Month DD, YYYY HH:Mi am') as pretty_date, sender as user_id, + mime_type, content, first_names||' '||last_name as full_name, + acs_permission.permission_p(message_id, :user_id, + 'bboard_write_message') as write_p, + acs_permission.permission_p(message_id, :user_id, + 'bboard_delete_message') as delete_p + from acs_messages_all m, persons p + where message_id = :message_id + and person_id = sender +} -column_array message + +set message_create_p [ad_permission_p $forum_id bboard_create_message] + +db_1row forum_short_name { + select short_name as forum_name from bboard_forums + where forum_id = :forum_id +} + +set context_bar [list [list "forum?[export_url_vars forum_id]" $forum_name] \ + "One Message"] + +db_multirow replies message_replies { + select m.message_id, m.reply_to, m.title, m.mime_type, m.content, + to_char(m.sent_date,'Month DD, YYYY HH:Mi am') as pretty_date, sender as user_id, + p.first_names||' '||p.last_name as full_name, + mt.depth - 1 as thread_depth, rownum, + acs_permission.permission_p(m.message_id, :user_id, + 'bboard_write_message') as write_p, + acs_permission.permission_p(m.message_id, :user_id, + 'bboard_delete_message') as delete_p + from acs_messages_all m, persons p, + (select message_id, level as depth, rownum as seqnum + from acs_messages + connect by prior message_id = reply_to + start with message_id = :message_id) mt + where m.message_id <> :message_id + and p.person_id = m.sender + and m.message_id = mt.message_id + and m.message_id in (select bfmm.message_id + from bboard_forum_message_map bfmm + where bfmm.forum_id = :forum_id) + and exists (select 1 from acs_object_party_privilege_map + where object_id = m.message_id + and party_id in (:user_id, -1) + and privilege = 'bboard_read_message') + order by m.sent_date +} + +ad_return_template Index: openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,21 @@ + +@context_bar@ +@title@ + + + + There are no messages for this user this forum.

+ + + + + + +

+ +Posting History in Other Forums: +

\ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,88 @@ +ad_page_contract { + + Displays a given user's posting history. + + @author Anukul Kapoor + @creation-date 2000-11-22 + @cvs-id $Id: messages-by-user.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + +} { + user_id:integer,notnull + forum_id:integer,notnull,bboard_forum_id +} -properties { + context_bar:onevalue + title:onevalue + forum_name:onevalue + forum_id:onevalue + messages:multirow +} + +set current_user_id [ad_verify_and_get_user_id] + +ad_require_permission $forum_id bboard_read_forum + +db_1row user_info { + select first_names||' '||last_name as full_name + from persons + where person_id = :user_id +} + +db_1row forum_info { + select short_name as forum_name, moderated_p from bboard_forums + where forum_id = :forum_id +} + +if [string equal $moderated_p f] { + + db_multirow messages messages_select { + select title, num_replies, message_id, + first_names||' '||last_name as full_name + from bboard_messages_all, persons + where sender = :user_id + and forum_id = :forum_id + and person_id = sender + and exists (select 1 from acs_object_party_privilege_map + where object_id = message_id + and party_id in (:current_user_id, -1) + and privilege = 'bboard_read_message') + } +} else { + db_multirow messages messages_select { + select title, num_replies, message_id, + first_names||' '||last_name as full_name + from bboard_messages_all, persons + where sender = :user_id + and forum_id = :forum_id + and person_id = sender + and status = 'approved' + and exists (select 1 from acs_object_party_privilege_map + where object_id = message_id + and party_id in (:current_user_id, -1) + and privilege = 'bboard_read_message') + + } +} + + +set package_id [ad_conn package_id] + +db_multirow alt_forums alt_forums_select { + select forum_id, short_name + from bboard_forums bf + where not forum_id = :forum_id + and bboard_id = :package_id + and exists (select 1 + from bboard_messages_all bma + where sender = :user_id + and bma.forum_id = bf.forum_id) + and exists (select 1 from acs_object_party_privilege_map + where object_id = bf.forum_id + and party_id in (:current_user_id, -1) + and privilege = 'bboard_read_forum') +} + +set title "Posting History for $full_name in $forum_name" + +set context_bar [list $forum_name] + +ad_return_template Index: openacs-4/contrib/obsolete-packages/bboard/www/search.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/search.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/search.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,7 @@ + +@context_bar@ +@title@ + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/search.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/search.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,70 @@ +ad_page_contract { + + Displays search results from a user query. + + @author Anukul Kapoor + @creation-date 2000-10-26 + @cvs-id $Id: search.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + query:notnull + forum_id:integer,notnull,bboard_forum_id +} -properties { + query:onevalue + results:multirow + forum_id:onevalue + context_bard:onevalue + title:onevalue +} + +set user_id [ad_verify_and_get_user_id] + +set title "Search Results for \"$query\"" +set context_bar [list "Search"] + +set package_id [ad_conn package_id] + +ad_require_permission $forum_id bboard_read_forum + +# convert query string to im happy query string + +db_1row im_convert_query { + select bboard_im_convert(:query) as query from dual +} + +# if you're not running context, you'll need to run this by hand +# alter index cr_rev_content_index rebuild online parameters('sync memory 45M'); + +if [string equal [bboard_forum_moderated_p $forum_id] "f"] { + db_multirow results bboard_search { + select score(10) as the_score, message_id, + m.title, m.num_replies, to_char(m.sent_date,'MM/DD/YYYY') as sent_date, + p.first_names||' '||p.last_name as full_name + from bboard_messages_all m, persons p, bboard_forums f + where contains(content, :query, 10) > 0 + and acs_permission.permission_p(message_id, :user_id, + 'bboard_read_message') = 't' + and m.sender = p.person_id + and m.forum_id = :forum_id + and f.forum_id = m.forum_id + and f.bboard_id = :package_id + order by score(10) desc + } +} else { + db_multirow results bboard_search { + select score(10) as the_score, message_id, + m.title, m.num_replies, to_char(m.sent_date,'MM/DD/YYYY') as sent_date, + p.first_names||' '||p.last_name as full_name + from bboard_messages_all m, persons p, bboard_forums f + where contains(content, :query, 10) > 0 + and acs_permission.permission_p(message_id, :user_id, + 'bboard_read_message') = 't' + and m.sender = p.person_id + and m.forum_id = :forum_id + and f.forum_id = m.forum_id + and status = 'approved' + and f.bboard_id = :package_id + order by score(10) desc + } +} + +ad_return_template Index: openacs-4/contrib/obsolete-packages/bboard/www/simple-message.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/simple-message.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/simple-message.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,75 @@ +<% # A simple single message + # This should, in the future, use a row variable rather than many + # single values, but row variables are not yet supported. %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Subject: + + @title@ + + + @title@ + +   + + + [edit] + + [add attachment] + + + + [delete] + + + [forward as email] + + + [reply] + +
Message:
<%= @formatted_content@ %>
 
+ + -- @author@, @date@ + + + -- @author@, @date@ + +
Attachment: + + @attachments.name@ - @attachments.title@ + + [delete] +
+
Index: openacs-4/contrib/obsolete-packages/bboard/www/simple-message.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/simple-message.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/simple-message.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,35 @@ +ad_page_contract { + Display a single message in a reasonable way. + + @author John Prevost + @author Anukul Kapoor + @creation-date 2000-11-30 + @cvs-id $Id: simple-message.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { +} -properties { + mail_friend_p:onevalue + attachments_p:onevalue + attachments:multirow + formatted_content:onevalue +} + +set mail_friend_p [ad_parameter "MailFriendEnabledP"] +set attachments_p [ad_parameter "AttachmentsEnabledP"] + +set formatted_content [acs_messaging_format_as_html $mime_type $content] + +# we don't want to stomp on the +set current_user_id [ad_conn user_id] + +if {[string equal $attachments_p "t"] && [info exists id]} { + db_multirow attachments get_attachments { + select object_id as file_id, cr.title, ci.name, + acs_permission.permission_p(object_id, :current_user_id, + 'bboard_write_message') as delete_p + from acs_objects ao, cr_items ci, cr_revisions cr + where object_id = ci.item_id and + live_revision = revision_id and + object_type = 'content_item' and + context_id = :id + } +} Index: openacs-4/contrib/obsolete-packages/bboard/www/spacer.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/spacer.gif,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/bboard/www/test.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/test.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/test.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,15 @@ + + +test + +
<%=[ns_quotehtml "{}{}{}<><><>bar"]%>
+ +
<%=[ad_conn location] [ad_conn package_url] %>
+
<%= [bboard_message_url 8035 1592]%>
+
<%= [bboard_message_url -absolute 8035 1592]%>
+
<%= %>
+
<%= %>
+
<%= %>
+ + +<% bboard_garbage_collect %> \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/bboard/www/doc/acs-messaging-and-bboard-dm.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/doc/acs-messaging-and-bboard-dm.gif,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/bboard/www/doc/design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/doc/design.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/doc/design.html 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,273 @@ + + +ACS Messaging & BBoard Design Document + + + + +

ACS Message & BBoard Design Document

+by Anukul Kapoor + +
+ +

I. Essentials

+ + + + +

II. Introduction

+ +

bboard is an ACS application package built to provide +scalable discussion forums to a community of users. As in older +versions, bboard provides: +

    +
  • posting, browsing, and reading of messages in discussion forums +
  • tools for moderators to maintain editorial standards +
  • categorization and retrieval for knowledge management +
+ +The initial 4.0 implementation adds the following new features: + +
    +
  • fully templated presentation layer for easy customization +
  • improved access control on bboard operations to support a wide +variety of publisher policies +
  • support for multiple distinct configurations of the bboard package +(e.g. different forums and options at http://foo.com/bboard/ and +http://foo.com/pittsburgh/bboard/) +
+

+ +

The ACS 4.0 version of bboard is a re-engineering of +the data model and presentation layer without certain capabilities +present in the ACS 3.4 bboard. In future releases we intend to +achieve the same level of maturity as the older bboard +while building on the flexibility of the new design.

+ +In particular this implementation (9/2000) does not include the +following features found in prior versions: + +
    +
  • support for expiring messages +
  • facilities for spamming dynamic classes of bboard users +
  • bboard messages with rich media attachments +
  • email alert functionality +
  • full text messages searching +
+ +

bboard is not intended to be the ultimate +customizable web based discussion system. It is intended to be a +practical and useful system that supports forums much like the +photo.net Q&A forum. Publishers with special needs are encouraged to +implement their solution as a module, much like bboard, built atop the +framework acs-messaging provides. + +

acs-messaging is a general purpose component that +provides threaded messaging services to higher level applications such +as bboard. The motivation is to provide a base level +data model and reusable presentation code that enables the rapid +customization of messaging applications. acs-messaging is intended to +simplify modules like general comments and +webmail, as well as specialized messaging applications +such as scorecard's geospatial +bboard. Such a framework keeps custom organizational metadata, +pageflow and navigation, and publishing and moderation policy separate +from the basic tools needed for discussion.

+ +

III. Historical Considerations

+ +Over the course of ACS development, bboard has grown to +encompass a wide variety of functionality. Much of this functionality +was developed first for bboard and only later adapted +into more general mechanisms (e.g. alerts, security, group scoping, +etc.,). However bboard wasn't refactored to take +advantage of the more general facilities, and its complexity +challenged those in need of custom features. Furthermore there was a +lot of ad hoc mechanism in both the data model and page flow to +support different presentation styles, navigation schemes, and access +control models. Although this bboard proved to be +useful, scalable, and reliable, the ability to maintain and extend +this code suffered.

+ +The ACS 4.0 release of bboard mimics the basic functionality of older +bboard versions but built atop new ACS 4.0 general +mechanisms (objects, persmissions, templating, acs-messaging, +etc.,).

. + +

IV. Competitive Analysis

+ +An analysis of the bboard feature space should be added here. + +
    +
  • USENET a la gnus +
  • slashdot +
  • Userland +
  • ???? +
+ +

V. Design Tradeoffs

+ +

How does one reconcile all the possible discussion forums mentioned +above into a single module? One does not! bboard is +precisely one way to implement a discussion forum and should not be +all things. In time, there should be a toolkit of components (user +interface, data model, and procedural) for developers to assemble +their custom.

+ +

Although many of the entities in the data model are implemented as +subtyples of ACS object, we avoid using information from the ACS +object table for anything but auditing purposes. For example, we +could store a message's author in the ACS object creation_user field, +however to keep query performance in line we rather use the author field +in acs_messages.

+ +

VI. API

+ +

As of the initial ACS 4.0 release, acs-messaging and +bboard do not provide well defined programming +interfaces.

+ +

Although convenience functions will be provided for basic +transactions on the acs-messaging and bboard +entities, it remains to be seen what sort of abstraction layer is most +appropriate.

+ +

VII. Data Model Discussion

+ +

acs-messaging defines the view +acs_messages_all for the storage and access of threaded +text messages and assorted information relevant to their display, +access, and creation. Under the covers acs-messaging use the +content repository for underlying storage.

+ +

bboard uses acs-messaging messages, and +organizes them into forums and categories. For the purposed of the +ACS permissions system, forums contain messages, and so any +permissions on a forum will default to being inherited for individual +messages.

+ +

A forum may be designated as moderated, in which case explicit +approvals or denials are stored in the +bboard_message_moderation. Messages without entries in +the moderation table are considered unseen, and will be displayed or +hidden in moderated forums based on policy.

+ +

Each forum may have some number of categories, tags denoting further +specialization within a forum. Messages of a forum may be tagged as being +in any of the categories pertaining to that forum.

+ +

Permissions

+ +Permissions in ACS 4.0 involve 3 interrelated hierarchies: users & +groups, objects, and privileges. The user and group hiearchy is +generally explained elsewhere. + +The short explanation:

+ +The long explanation:
+ +BBoard defines the following permissions: +

    + +
  • nested under the create permission: +
  • bboard_create_forum +
  • bboard_create_category +
  • bboard_create_message +
  • +
  • nested under the write permission: +
  • bboard_write_forum +
  • bboard_write_category +
  • bboard_write_message +
  • +
  • nested under the read permission: +
  • bboard_read_forum +
  • bboard_read_category +
  • bboard_read_message +
  • +
  • nested under the delete permission: +
  • bboard_delete_forum +
  • bboard_delete_category +
  • bboard_delete_message +
  • +
  • nested under the moderate permission: +
  • bboard_moderate_forum +
+ +

VIII. User Interface

+ +

IX. Configuration/Parameters

+ +

X. Acceptance Tests

+ +

XI. Future Improvements/Areas of Likely Change

+ +

Much of the functionality of the ACS content repository will +eventually provide tangible benefits to bboard and any +acs-messaging application. Foremost among these features +will be full text searching and rich media attachments.

+ +

When ACS provides a general mechanism for an installation to send and +receive email, bboard can provide email alerts and +email based reply and post.

+ +

XII. Authors

+ +Anukul Kapoor + +

XIII. Revision History

+ + + + + + + + + + + + + + + + + + + + + + + +
Document Revision #Action Taken, NotesWhen?By Whom?
0.1Creation09/01/2000Anukul Kapoor
0.2Revision09/19/2000Anukul Kapoor
+ + + +

+ +


+ +akk@arsdigita.com + + + + Index: openacs-4/contrib/obsolete-packages/bboard/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/doc/index.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/doc/index.html 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,225 @@ + +BBoard documentation + +

BBoard documentation

+
+

Release Notes

+ +Version 4.0.2b6 of BBoard is Yet Another Attempt to get 4.0.2 +released. This version requires ACS 4.0.1 but has been tested against +4.1 as well. A lot of bugs have been fixed and minor features implemented: + +
    +
  • emailing a friend or email alerts should no longer leave persistent garbage around. +
  • a link is now provided for uncategorized messages. +
  • cleaner views +
  • deletion of threads as well as just messages +
  • email alerts show a link to the message and indicate which forum they came from +
+ +For improved functionality you should upgrade to the latest version of +ACS 4.1 and the latest version of ACS Messaging (as of 2/13/01 4.1.1 +NOT included in ACS 4.1).

+ +For more details on bugfixes and improvements, visit the bboard +section of the ArsDigita +SDM.

+ +Note: This documentation has not been reviewed and is +not considered up to standards. More comprehensive and more refined +documentation will be available in an upcoming point release. If you +have further questions, feel free to ask on the applications +bboard.

+ + +

Overview

+ +BBoard implements a system for persistent asynchronous web based +discussions. A BBoard instance as configured from ACS-Admin can +contain some number for discussion forums. Each forums provides a +context for users with appropriate access to read and post messages. +Messages may optionally be tagged in a list categories to facilitate +sorting and searching. + +

Installation

+ +Using bboard requires an operating ACS 4.0.1 installation. If you +haven't upgraded, do so first! Installing and enabling the bboard +package should be relatively painless: just go to your server's +/acs-admin/apm/package-load page and enter +"http://www.arsdigita.com/acs-repository/download/apm/bboard-4.0.2r1.apm". +If you're reading this on your own server, you've already done +this.

+ +Once the package is installed and enabled, a subsite administrator can +then mount instances on their subsite. If you're the lone +über-admin of your site, you can just go to your site's +/admin/site-nodes/ page and create a new subfolder under the "/" +directory. Pick a creative label for your subfolder like "bboard" or +"dg". Select "new application" for that subfolder, and choose BBoard +from the pulldown menu. It is probably best to label the application +instance the same as your subfolder; do otherwise if it helps you keep +your site straight.

+ +At this point you should have a BBoard instance mounted in the +subfolder directory, let's say you chose "/bboard". Before delving +into configuration, let's run over BBoard's permissions model. + +

Initial Configuration

+ +Once mounted, you can surf over to /bboard as an administrator, create +some forums, and start discussing that crazy U.S. election! + +The following parameters are configurable on a package instance basic from the +appropirate node in /admin/site-nodes/. + +
+ +
ThreadingEnabledP + +
This enables or disables threading indentation on a single thread +basis. "t" enables threading and "f" (the default) turns it off. + +
MailFriendEnabledP + +
This enables the option for users to mail copies of a bboard +posting to a friend (or themselves). Since this functionality can be +abused, consider disabling the functionality. + +
UserPostsEditableP + +
This grants users privileges to edit their own message. Note: +toggling this parameter will not change the ability of user to edit +existing messages. This parameter only effects whether users are +granted rights to edit at the message's posting time. This must be +enabled for attachments to work. + +
AttachmentsEnabledP + +
This lets users who have edit capability on a message upload file +or image attachments. + +
MaxAttachmentSize + +
This specifies the maximum size in bytes to accept for binary +attachments. The default is 1 megabyte. + +
DisplayLastNDays + +
This parameter controls how many days worth of recent messages are +displayed on the forum overview page by default. 0 specifies +that all messages should be displayed. + +
+ +

Advanced Configuration and Permissions Overview

+ +The ACS 4.0 permissions system is about hierarchies and in particular +hiearchical containment. There are three important hiearchies: the +user hierarchy (users, groups, and parties), the object hierarchy +(objects nested in the contexts of others), and the privilege hiearchy +(privileges can entail other entails). This complexity of mechanism +is designed to allow for simplicity of use for programmers and +administrators. Unfortunately, interfaces to facilitate this +simplicity of use are not here yet. Until then, sophisticated control +and configuration of BBoard necessitates an understanding of these +details.

+ +The first hierarchy is straightforward. There are users and groups +(or together parties). Privileges granted to groups inherit to their +members.

+ +Unless explicitly disabled (see below), privileges granted to parties +are inherited down an object hierarchy. The nature of the BBoard +hierarchy is as follows: subsites contain bboard package instances; +bboard package instances contain forums; forums contain both +categories and messages. Privileges granted to parties on the package +instance are inherited to all the forums nested within and so on.

+ +The third hiearchy is the least clear. Privileges can be nested into +other privileges. This lets us group related privileges like those +for reading a message and reading a forum together to allow us to +easily grant "read access" on a hiearchy of objects to a party even +though there are separate notions of "read a message" and "read a +forum". All the bboard privileges are nested in one of the following +system level "super"-privileges: "read", "write", "create", "delete", +and "admin".

+ +The full set of self explanatory bboard privileges is listed here: +

    +
  • bboard_create_forum +
  • bboard_create_category +
  • bboard_create_message +
  • bboard_write_forum +
  • bboard_write_category +
  • bboard_write_message +
  • bboard_read_forum +
  • bboard_read_category +
  • bboard_read_message +
  • bboard_delete_forum +
  • bboard_delete_category +
  • bboard_delete_message +
  • bboard_moderate_forum +
+ + +Permissions on package instances are controlled through the "set +permissions" options on the appropriate folder in the admin site map +(/admin/site-map/). While in principal, the system should allow you +to grant permissions on lower level objects like forums or even +individual messages and categories, right now the UI is limited to +granting permissions on the application instance. SQL*Plus users or +even URL hackers can probably figure out how to do this if they're so +inclined.

+ +The default set of permissions granted in a bboard system are those +inherited from the main site: + +

    +
  • Registered Users have bboard_create_message +
  • The Public has bboard_read_category +
  • The Public has bboard_read_forum +
  • The Public has bboard_read_message +
  • The Public has read +
  • [Admin user] admin +
+ +Granting additional privileges to parties is fairly straightforward. +For moderated forums, creating a moderators group and granting them +"bboard_moderate_forum" (or "admin" if you're feeling lucky) will let +you delegate more of the discussion culling.

+ +For significantly different configurations you might need to revoke +privileges already granted by the defaults. In this case you must +configure the package instance not to inherit permissions from the +main site and then add back any permissions needed. Granting "read" +to registered users and bboard_create_message to "Elite d00ds" will +give you a pseudo-private forum.

+ +Note: To facilitate usability in the common case, BBoard pages present +the option to post or reply even if the user doesn't have the +bboard_create_message privilege. If you remove posting ability from +registered users, you may wish to alter the templates to appropriately +display options.

+ +

Miscellaneous Notes

+ +Text searching requires the maintaince of the content repository +cr_rev_content_index index; either by hand or by +context.

+ +As usual, please file bugs and feature requests in the bboard +SDM. + +

Engineering Documentss

+ + +
+
akk@arsdigita.com
+ Index: openacs-4/contrib/obsolete-packages/bboard/www/doc/requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/doc/requirements.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/bboard/www/doc/requirements.html 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,359 @@ + + + + Bulletin Board Requirements + + + +

Bulletin Board Requirements

+ by Anukul Kapoor, Pete Su, and Mark Thomas +
+ +

I. Introduction

+ +

This document outlines necessary functionality and behavior of + the new ACS 4.0 Bulletin Board system (herein referred to as bboard). + +

Our intent (as of 8/2000) is to start with a simple + implementation that can accomodate future advanced functionality. + As a result, these requirements may not prescribe functionality + present in the ACS 3.4 bboard system. We are using the + uslaw-bboard module as inspiration for a lightweight + implementation. + +

Futhermore, this document is conservative in attempting to + describe the ultimate framework for modular web based messaging. + We hope such an architecture may well be born out of iterative + process when designing this system. However, the scope is being + primarily limited to functional requirements. + +

The future requirements (section VII) should inform the design + process if not initially implemented. + +

II. Vision Statement

+ +

An electronic bulletin board system is one of the simplest and + most effective forms of collaboration between people separated in + space and time. Bboards provide a centralized and shared venue + for discussion that save communication costs over ad-hoc + mechanisms (like arbitrary email lists). Since messages are + organized by topic as well as temporally, bboard can provide + lightweight interfaces for rapidly navigating to interesting + messages. This low barrier to participation encourages + spontaneous collaboration between disperse parties in the + community. + +

The bboard system also serves as a useful archive and ad-hoc + knowledge management tool by virtue of its persistence, light + weight organizational structure, and flexible browse and search + facilities. This sort of knowledge base can be easily leveraged + to provide long term pedagogical value as well as aid in future + problem solving. + +

When integrated with an email system, bboards radically improve + email based collaboration. Email notifications can encourage + continuous awareness of community issues. Email based reply + functionality further lowers the barrier to participation, + encouraging more Interaction around the TransactionTM. + +

III. System/Application Overview

+ +

The bboard system allows users to browse, read, and + post messages organized into forums. Messages consist of short + text messages with optional attachments such as image files or + html documents. Messages are organized into threads when users + reply to each other, maintaining the temporal flow of a particular + discussion. + +

Forums are contexts for discussion relating to a particular + domain of interest. Examples include the photo.net Q&A forum, the + ArsDigita Web/DB forum, and the away.com discussion forum. + Messages within a particular forum can optionally be tagged as + being in certain categories to assist searching and navigation. + Forums are always created in the context of a subsite. + +

IV. Use-cases and User Scenarios

+ +

Administrator: Phillis Goodsport is a world famous + lithographer who wants to share her knowledge about lithography + and encourage interaction between a community of lithographers on + her new site litho.net. Although she likes the idea of a broad + forum for general lithography discussion, she wants browsing to be + tractable when traffic increases. If quality goes down, she'd + like to dedicate one of her minions to moderating traffic to + maintain her high standards. + +

Casual browser and poster: Joe Schmoe goes to photo.net + for the first time and wants to ask what zoom lens to buy. He + needs to find the appropriate category/topic to post his message. + +

Compulsive reader and expert poster: Jane Developer is a + web development guru and wants to keep up with as much of the + traffic on the web/db forum as possible. She wants to become + aware of posts that might become relevant to her in the future + as well as help out folks who have problems she knows how to + solve. Since Jane is on lots of developer mailing lists, her + preferred form of interaction is via email. + +

Moderator: Dave Balderdash is a chatter.net moderator and + wants to delete redundant or useless posts. He's short + on time, so he wants a quick interface for rejecting and approving + posts. + +

Targeted researcher: Ted Stetson is an ACS developer who + remembers someone mentioning something about his Oracle problem on + a bboard. He wants to find records of similar problems and any + related solutions. + +

V. Related Links

+ + + + +

VI.A Requirements: User Interface

+

End User Basics

+ +

10.10.10 The bboard system must provide + mechanism for users to effectively choose which messages to read + within a forum. Bboard must provide an overview interface to + enable users to find messages of interest or relevant to them. + This overview should provide the user with cursory information to + facilitate quick scanning and meaningful evaluation of message + contents. + +

10.10.15 The full text of bboard messages + should be searchable by user queries. + +

10.10.20 [unimplemented] Bboard should consistently provide + a mechanism to limit or sort displayed posts by categories, posters, + and date range as well as to perform a text search. + +

10.10.30 [unimplemented] Most users primarily want + to browse and read new posts or replies since their last visit. + The bboard interface must allow users to ignore messages they've + already read. + +

10.10.40 [unimplemented] Users should be able to search within + and limit scope to messages they have already read as well as + messages they have not read at all. + +

10.10.50 Users must be able to easily post new + messages to a bboard, or reply to existing messages they have come + across. When replying, users must be presenting with enough + context to assist their composition. + +

Email Integration

+ +

10.20.10 Users can register for email + notification of new messages in a particular forums. + +

10.20.13 Users can register for email + notifications on a particular thread. + +

10.20.16 Users can register for email + notifications on a particular category. + +

10.20.20 [unimplemented] Notifications can be sent as each + message arrives or in an organized digest form over a configurable + time period. + +

10.20.30 Individual messages will have appropriate RFC 822 + headers to enable threading in the mail client. + +

10.20.40 [unimplemented] + Email from the alert system should be tagged in the + header with the site and forum name to enable easy filtering in + mail clients. Well, as easy as the mail clients make it anyway. + +

10.20.50 [unimplemented] + If the user requests it, email generated should use MIME + encoding to deliver attachements and appropriately encode HTML. + Otherwise plain text emails should be augmented with URLs and + styling cues in place of rich content. + +

Administrative Requirements

+ +

10.30.10 The bboard system must support a + flexible presentation layer that allows custom layout of bboard + content. + +

10.30.15 Publishers should have the option of + displaying discussions in a flat linear fashion or in an indented + threaded view. + +

10.30.20 Parties with administrative + privileges on a particular subsite can create, delete, and edit + forums scoped to that subsite. + +

10.30.30 Forums can be designated moderated in + which case parties with sufficient privileges must approve + messages before they are displayed generally. + +

Access Control Requirements

+ + Objects must be structured to allow the flexible configuration and + assignment of the following privileges: + +

10.40.10 Reading forums + +

10.40.20 Reading messages + +

10.40.30 Posting new messages + +

10.40.50 Approving and rejecting posted messages + (for moderated groups) + +

10.40.60 Managing the forum (editing title and + description, determining moderation and restriction policies, + granting approval privileges to others, banning users) + +

10.40.70 Managing categories (editing, deleting, + combining categories) + +

VI.B Requirements: Datamodel

+ +

Messages

+ +

10.80.10 Messages are the basic units of the + bboard module. The bboard system will provide a repository to + store text messages. + +

10.80.20 Messages will be tagged as having + HTML, plain text, or preformatted text in their body. + +

10.80.30 Messages will have a brief plain text + subject line. + +

10.80.40 Messages will be related to their + creating user. + +

10.80.50 Messages may optionally have + binary attachments. + +

10.80.60 The bboard system must store relations + between messages and their replies to enable threaded views. + +

Forums

+ +

10.90.10 Forums are the main administrative + units of the bboard system. Forums are containers to which + messages uniquely belong. + +

10.90.20 Forums must have a brief text + descriptions and optionally a longer description called a charter. + +

Categories

+ +

10.100.10 There must be a mechanism for + intra-forum categorization to facilitate filter, searching, and + tractability. + +

VI.C Requirements: API

+ + No requirements in this section are met by the + current implementation. + +

Since bboard is primarily an end user application any exposed + APIs will come out of the design rather than nailed down + requirements from the start. Stay tuned. + +

VI.D Possible Future Requirements

+ +

10.255.10 bboard should provide a framework + for extending the generic messaging repository with meta-data + and in tandem extending the user interface to take advantage of + this meta-data. This would let developers properly layer + functionality such as geo-spatial messaging and slashdot style + scoring. This is actually provided via ACS messaging and the ACS + Object system. + +

10.255.20 bboard should support replying to + and initiating threads from email. Administrative email list + functionality should be developed or integrated. + +

10.255.30 Bboard should let users register + interests (categories, certain users, keywords) for the purpose of + filtering and sorting message displays. + +

10.255.40 Users should have the option of + enabling spell checking on their posts. A framework for filtering + (removing bad words, promoting text URLs to html links, auto + detecting HTML vs. plain text, etc.,) should exist. + +

10.255.50 Allow users to configure how big the + textareas editing widgets they get are. + +

10.255.60 Moderators should be given the + option of making notes on a given discussion that appear + prominently in the discussion display. + +

10.255.70 Moderators should be able to set + posts to expire at a configurable time in the future. + +

10.255.80 Mega bonus points: an nntp gateway to + bboards for access from standard news clients. + +

10.255.90 The bboard system should be able to + take advantage of a caching system that stores the results of + database queries for optimal scalability. + +

10.255.100 Publishers should have the option + of allowing users to edit various parts of messages after they are + posted (e.g. the text body, the subject, the text presentaiton + style etc.,) + +

10.255.110 A user interface should allow + administrators to easily categorize or recategorize existing + messages. + +

10.255.120 Publishers should be able to + classify users based on their forum contributions and + appropriately target them for email, promotions, etc., + +

10.255.130 Explicit permissions for posting + new messages vs. posting replies. + +

10.255.140 Explicit permissions for posting + attachments. + +

Performance requirements

+ +

VII. Revision History

+ + + + + + + + + + + + + + + + + + + + + + + + +
Document Revision #Action Taken, NotesWhen?By Whom?
0.1Creation08/23/2000Anukul Kapoor
0.2Revision: More standard style, more detailed requirements.08/24/2000Anukul Kapoor
+ +
+
+Last modified: $Id: requirements.html,v 1.1 2001/04/20 20:51:09 donb Exp $ + + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/mp3jukebox.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/Attic/mp3jukebox.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/mp3jukebox.info 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,92 @@ + + + + + MP3 JukeBox + MP3 Jukeboxes + f + + + + oracle + postgresql + + Peter Vessenes + An MP3 Jukebox for Locally stored MP3 files. + 2001-03-20 + Ybos Corporation + An MP3 Jukebox for Locally stored MP3 files. It doesn't stream. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/bin/mp3_file_scan =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/bin/Attic/mp3_file_scan,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/bin/mp3_file_scan 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,22 @@ +#!/usr/bin/perl + +use MPEG::MP3Info; + +my $file = shift; + +my $tag = get_mp3tag($file); + +my $info = get_mp3info($file); + + + +for (keys %$tag) { + printf " { %s {%s} } ", $_, $tag->{$_}; +} + +for (keys %$info) { + printf " { %s {%s} } ", $_, $info->{$_}; +} + + + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/bin/mp3_info_determine =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/bin/Attic/mp3_info_determine,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/bin/mp3_info_determine 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,35 @@ +#!/usr/bin/perl + +use MPEG::MP3Info; + +$scanned = 0; +$total = 0; +while () { + + $total++; + chop; + my $file = $_; + + my $tag = get_mp3tag($file) or next; + + + my $info = get_mp3info($file); + + print "--Start Track--\n"; + + for (keys %$tag) { + printf "%s => %s\n", $_, $tag->{$_}; + } + + for (keys %$info) { + printf "%s => %s\n", $_, $info->{$_}; +} + + print "--End Track--\n"; + undef $tag; + undef $info; + + $scanned++; +} + +print "\n-----\nTotal Songs: $total\nScanned Songs: $scanned\n-----\n"; Index: openacs-4/contrib/obsolete-packages/mp3jukebox/sql/oracle/mp3jukebox-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/sql/oracle/Attic/mp3jukebox-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/sql/oracle/mp3jukebox-create.sql 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,545 @@ +-- @author tigre@ybos.net +-- @author jennie@ybos.net + +begin + acs_object_type.create_type ( + supertype => 'acs_object', + object_type => 'mp3', + pretty_name => 'MP3', + pretty_plural => 'MP3s', + table_name => 'MP3_MP3S', + id_column => 'MP3_ID' + ); + + acs_object_type.create_type ( + supertype => 'acs_object', + object_type => 'mp3_playlist', + pretty_name => 'Playlist', + pretty_plural => 'Playlists', + table_name => 'MP3_PLAYLISTS', + id_column => 'PLAYLIST_ID' + ); +end; +/ + +create table mp3_mp3s ( + mp3_id constraint mp3_mp3_id_fk + references acs_objects (object_id) + constraint mp3_mp3s_pk + primary key, + file_path varchar(200) + constraint mp3_mp3s_nn + not null + constraint mp3_mp3s_file_unique + unique, + title varchar(200) + constraint mp3_mp3s_title_nn + not null, + artist varchar(100), + bitrate varchar(50), + album varchar(200), + tracknum integer, + genre varchar(100), + year varchar(10), + layer integer, + copyright_p char(1) default 'f' + constraint mp3_mp3s_copyright_p_ck + check(copyright_p in ('t','f')), + version integer, + mode_num integer, + stereo_p char(1) default 'f' + constraint mp3_mp3s_stereo_p_ck + check(stereo_p in ('t','f')), + frequency number, + minutes integer, + seconds integer, + comments varchar(200), + vbr_p char(1) default 'f' + constraint mp3_mp3s_vbr_p_ck + check(vbr_p in ('t','f')), + state varchar(50), + deleted_p char(1) default 'f' + constraint mp3_mp3s_deleted_p_ck + check(deleted_p in ('t','f')) +); + +create table mp3_playlists ( + playlist_id constraint mp3_playlist_id_fk + references acs_objects (object_id) + constraint mp3_playlists_pk + primary key, + name varchar(100), + shuffle_p char(1) default 'f' + constraint mp3_playlists_shuffle_p_ck + check(shuffle_p in ('f','t')), + remove_threshold integer +); + +create table mp3_mp3_playlist_map ( + mp3_id constraint mp3_map_mp3_id_fk + references mp3_mp3s (mp3_id), + playlist_id constraint mp3_map_playlist_id_fk + references mp3_playlists (playlist_id), + sort_key integer, + -- This pk constraint will have ot be changed, maybe add a column + -- for the pk, thus allowing multiple instances of a given song + -- on a playlist + constraint mp3_map_pk + primary key (mp3_id,playlist_id) +); + +create table mp3_mp3_stats ( + mp3_id constraint mp3_mp3_stats_mp3_id_fk + references mp3_mp3s (mp3_id), + user_id constraint mp3_mp3_stats_user_id_fk + references users(user_id), + access_date date + constraint mp3_mp3_stats_access_date_nn + not null +); + +create table mp3_playlist_stats ( + playlist_id constraint mp3_playlist_stats_playlist_fk + references mp3_playlists (playlist_id), + user_id constraint mp3_playlists_stats_user_id_fk + references users(user_id), + access_date date + constraint mp3_playlist_stats_date_nn + not null +); + +create table mp3_votes ( + mp3_id constraint mp3_votes_mp3_id_fk + references mp3_mp3s (mp3_id), + playlist_id constraint mp3_votes_playlist_id_fk + references mp3_playlists (playlist_id), + user_id constraint mp3_votes_user_id_fk + references users(user_id), + vote integer + constraint mp3_votes_vote_nn + not null, + vote_date date +); + +create or replace view mp3_mp3_playlist_map_view as + select m.mp3_id, + m.playlist_id, + m.sort_key, + nvl(v.total,0) as total + from mp3_mp3_playlist_map m, + (select mp3_id, + playlist_id, + sum(vote) as total + from mp3_votes + group by mp3_id, playlist_id) v + where m.mp3_id = v.mp3_id (+) + and m.playlist_id = v.playlist_id (+); + +create or replace view mp3_mp3s_not_deleted as + select * + from mp3_mp3s + where deleted_p = 'f'; + +create or replace view mp3_playlist_song_count as + select mpv.playlist_id, count(*) as songs + from mp3_mp3_playlist_map_view mpv, + mp3_mp3s_not_deleted mnd, + mp3_playlists mp + where mpv.mp3_id = mnd.mp3_id + and mpv.playlist_id = mp.playlist_id + and mpv.total > mp.remove_threshold + group by mpv.playlist_id; + +create or replace package mp3 +as + function new ( + mp3_id in mp3_mp3s.mp3_id%TYPE default null, + file_path in mp3_mp3s.file_path%TYPE, + title in mp3_mp3s.title%TYPE, + artist in mp3_mp3s.artist%TYPE default null, + bitrate in mp3_mp3s.bitrate%TYPE default null, + album in mp3_mp3s.album%TYPE default null, + tracknum in mp3_mp3s.tracknum%TYPE default null, + genre in mp3_mp3s.genre%TYPE default null, + year in mp3_mp3s.year%TYPE default null, + layer in mp3_mp3s.layer%TYPE default null, + copyright_p in mp3_mp3s.copyright_p%TYPE default null, + version in mp3_mp3s.version%TYPE default null, + mode_num in mp3_mp3s.mode_num%TYPE default null, + stereo_p in mp3_mp3s.stereo_p%TYPE default null, + frequency in mp3_mp3s.frequency%TYPE default null, + minutes in mp3_mp3s.minutes%TYPE default null, + seconds in mp3_mp3s.seconds%TYPE default null, + comments in mp3_mp3s.comments%TYPE default null, + vbr_p in mp3_mp3s.vbr_p%TYPE default null, + state in mp3_mp3s.state%TYPE default null, + deleted_p in mp3_mp3s.deleted_p%TYPE default 'f', + object_type in acs_objects.object_type%TYPE default 'mp3', + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) return acs_objects.object_id%TYPE; + + procedure delete ( + mp3_id in mp3_mp3s.mp3_id%TYPE + ); + + procedure mark_as_deleted ( + mp3_id in mp3_mp3s.mp3_id%TYPE + ); + +end mp3; +/ +show errors + +create or replace package body mp3 +as + function new ( + mp3_id in mp3_mp3s.mp3_id%TYPE default null, + file_path in mp3_mp3s.file_path%TYPE, + title in mp3_mp3s.title%TYPE, + artist in mp3_mp3s.artist%TYPE default null, + bitrate in mp3_mp3s.bitrate%TYPE default null, + album in mp3_mp3s.album%TYPE default null, + tracknum in mp3_mp3s.tracknum%TYPE default null, + genre in mp3_mp3s.genre%TYPE default null, + year in mp3_mp3s.year%TYPE default null, + layer in mp3_mp3s.layer%TYPE default null, + copyright_p in mp3_mp3s.copyright_p%TYPE default null, + version in mp3_mp3s.version%TYPE default null, + mode_num in mp3_mp3s.mode_num%TYPE default null, + stereo_p in mp3_mp3s.stereo_p%TYPE default null, + frequency in mp3_mp3s.frequency%TYPE default null, + minutes in mp3_mp3s.minutes%TYPE default null, + seconds in mp3_mp3s.seconds%TYPE default null, + comments in mp3_mp3s.comments%TYPE default null, + vbr_p in mp3_mp3s.vbr_p%TYPE default null, + state in mp3_mp3s.state%TYPE default null, + deleted_p in mp3_mp3s.deleted_p%TYPE default 'f', + object_type in acs_objects.object_type%TYPE default 'mp3', + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) return acs_objects.object_id%TYPE + is + v_mp3_id mp3_mp3s.mp3_id%TYPE; + begin + v_mp3_id := acs_object.new ( + object_id => mp3_id, + object_type => object_type, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + context_id => context_id + ); + insert into mp3_mp3s + (mp3_id, file_path, title, artist, bitrate, album, tracknum, genre, year, layer, + copyright_p, version, mode_num, stereo_p, frequency, minutes, seconds, comments, + vbr_p, state, deleted_p) + values + (v_mp3_id, file_path, title, artist, bitrate, album, tracknum, genre, + year, layer, copyright_p, version, mode_num, stereo_p, frequency, + minutes, seconds, comments, vbr_p, state, deleted_p); + + return v_mp3_id; + end new; + + + + procedure delete ( + mp3_id in mp3_mp3s.mp3_id%TYPE + ) + is + begin + delete from mp3_mp3s where mp3_id = mp3.delete.mp3_id; + acs_object.delete(mp3_id); + end delete; + + + + procedure mark_as_deleted ( + mp3_id in mp3_mp3s.mp3_id%TYPE + ) + is + begin + + update mp3_mp3s + set deleted_p ='t' + where mp3_id = mp3.mark_as_deleted.mp3_id; + + end mark_as_deleted; + +end mp3; +/ +show errors + + +create or replace package mp3_playlist +as + + function new ( + playlist_id in mp3_playlists.playlist_id%TYPE default null, + name in mp3_playlists.name%TYPE default null, + shuffle_p in mp3_playlists.shuffle_p%TYPE default 'f', + remove_threshold in mp3_playlists.remove_threshold%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'mp3_playlist', + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE + ) return acs_objects.object_id%TYPE; + + procedure delete ( + playlist_id in mp3_playlists.playlist_id%TYPE + ); + + procedure item_add ( + mp3_id in mp3_mp3s.mp3_id%TYPE, + playlist_id in mp3_playlists.playlist_id%TYPE, + sort_key in mp3_mp3_playlist_map.sort_key%TYPE default null + ); + + procedure item_remove ( + mp3_id in mp3_mp3s.mp3_id%TYPE, + playlist_id in mp3_playlists.playlist_id%TYPE + ); + + function vote_cast ( + user_id in users.user_id%TYPE, + playlist_id in mp3_playlists.playlist_id%TYPE, + mp3_id in mp3_mp3s.mp3_id%TYPE, + vote in mp3_votes.vote%TYPE, + vote_date in mp3_votes.vote_date%TYPE default sysdate + ) return mp3_mp3_playlist_map_view.total%TYPE; + + procedure item_order_swap ( + playlist_id in mp3_playlists.playlist_id%TYPE, + sort_key in mp3_mp3_playlist_map.sort_key%TYPE + ); + +end mp3_playlist; +/ +show errors + + + +create or replace package body mp3_playlist +as + function new ( + playlist_id in mp3_playlists.playlist_id%TYPE default null, + name in mp3_playlists.name%TYPE default null, + shuffle_p in mp3_playlists.shuffle_p%TYPE default 'f', + remove_threshold in mp3_playlists.remove_threshold%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'mp3_playlist', + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE + ) return acs_objects.object_id%TYPE + is + v_playlist_id mp3_playlists.playlist_id%TYPE; + begin + v_playlist_id := acs_object.new ( + object_id => playlist_id, + object_type => object_type, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + context_id => context_id + ); + insert into mp3_playlists + (playlist_id, name, shuffle_p, remove_threshold) + values + (v_playlist_id, name, shuffle_p, remove_threshold); + return v_playlist_id; + end new; + + procedure delete ( + playlist_id in mp3_playlists.playlist_id%TYPE + ) + is + begin + delete from mp3_votes + where playlist_id = mp3_playlist.delete.playlist_id; + delete from mp3_mp3_playlist_map + where playlist_id = mp3_playlist.delete.playlist_id; + delete from mp3_playlists + where playlist_id = mp3_playlist.delete.playlist_id; + acs_object.delete(playlist_id); + end delete; + + -- Note: item_add uses "insert after" ordering, so "order" points to + -- the last record _not_ to be updated + procedure item_add ( + mp3_id in mp3_mp3s.mp3_id%TYPE, + playlist_id in mp3_playlists.playlist_id%TYPE, + sort_key in mp3_mp3_playlist_map.sort_key%TYPE default 0 + ) + is + cursor map_cur is + select mmpm.mp3_id, mmpm.playlist_id, mmpm.sort_key + from mp3_mp3_playlist_map mmpm, mp3_mp3s_not_deleted mmnd + where mmpm.mp3_id = mmnd.mp3_id + and mmpm.playlist_id = mp3_playlist.item_add.playlist_id + and mmpm.sort_key > mp3_playlist.item_add.sort_key + order by mmpm.sort_key; + l_sort_key mp3_mp3_playlist_map.sort_key%TYPE; + l_max_sort_key mp3_mp3_playlist_map.sort_key%TYPE; + l_new_sort_key mp3_mp3_playlist_map.sort_key%TYPE; + begin + select nvl(max(sort_key),0) into l_max_sort_key + from mp3_mp3_playlist_map + where playlist_id = mp3_playlist.item_add.playlist_id; + if sort_key > l_max_sort_key + then + l_sort_key := l_max_sort_key; + else + l_sort_key := sort_key; + end if; + l_new_sort_key := l_sort_key + 2; + for map_rec in map_cur + loop + update mp3_mp3_playlist_map + set sort_key = l_new_sort_key + where mp3_id = map_rec.mp3_id + and playlist_id = map_rec.playlist_id; + l_new_sort_key := l_new_sort_key + 1; + end loop; + insert into mp3_mp3_playlist_map + (mp3_id, playlist_id, sort_key) + values + (mp3_id, playlist_id, l_sort_key + 1); + end item_add; + + -- We'll just delete the mapping and it's corresponding votes + -- We won't worry about gaps in the order + procedure item_remove ( + mp3_id in mp3_mp3s.mp3_id%TYPE, + playlist_id in mp3_playlists.playlist_id%TYPE + ) + is + begin + delete from mp3_votes + where mp3_id = mp3_playlist.item_remove.mp3_id + and playlist_id = mp3_playlist.item_remove.playlist_id; + delete from mp3_mp3_playlist_map + where mp3_id = mp3_playlist.item_remove.mp3_id + and playlist_id = mp3_playlist.item_remove.playlist_id; + end item_remove; + + function vote_cast ( + user_id in users.user_id%TYPE, + playlist_id in mp3_playlists.playlist_id%TYPE, + mp3_id in mp3_mp3s.mp3_id%TYPE, + vote in mp3_votes.vote%TYPE, + vote_date in mp3_votes.vote_date%TYPE default sysdate + ) return mp3_mp3_playlist_map_view.total%TYPE + is + l_vote_sum mp3_votes.vote%TYPE; + begin + insert into mp3_votes + (mp3_id, playlist_id, user_id, vote, vote_date) + values + (mp3_id, playlist_id, user_id, vote, vote_date); + select total into l_vote_sum + from mp3_mp3_playlist_map_view + where mp3_id = mp3_playlist.vote_cast.mp3_id + and playlist_id = mp3_playlist.vote_cast.playlist_id; + return l_vote_sum; + end vote_cast; + + -- "swap w/ next" + procedure item_order_swap ( + playlist_id in mp3_playlists.playlist_id%TYPE, + sort_key in mp3_mp3_playlist_map.sort_key%TYPE + ) + is + l_next_order mp3_mp3_playlist_map.sort_key%TYPE; + begin + select min(sort_key) into l_next_order + from mp3_mp3_playlist_map m, mp3_mp3s_not_deleted d + where m.mp3_id = d.mp3_id + and m.sort_key > mp3_playlist.item_order_swap.sort_key; + + update mp3_mp3_playlist_map mmpm + set sort_key = decode(mmpm.sort_key, + mp3_playlist.item_order_swap.sort_key, + mp3_playlist.item_order_swap.sort_key + 1, + mp3_playlist.item_order_swap.sort_key) + where sort_key in (mp3_playlist.item_order_swap.sort_key, + l_next_order); + end item_order_swap; + +end mp3_playlist; +/ +show errors + + +-- permissions don't quite work with the file system we've set up; most +-- would be useful under /admin, where the admin permission is required. + +--declare +-- default_context acs_objects.object_id%TYPE; +-- registered_users acs_objects.object_id%TYPE; +-- the_public acs_objects.object_id%TYPE; + +--begin +-- acs_privilege.create_privilege('mp3_view_mp3'); +-- acs_privilege.create_privilege('mp3_create_mp3'); +-- acs_privilege.create_privilege('mp3_delete_mp3'); +-- acs_privilege.create_privilege('mp3_modify_mp3'); +-- acs_privilege.create_privilege('mp3_view_playlist'); +-- acs_privilege.create_privilege('mp3_create_playlist'); +-- acs_privilege.create_privilege('mp3_delete_playlist'); +-- acs_privilege.create_privilege('mp3_modify_playlist'); +-- acs_privilege.create_privilege('mp3_admin_mp3'); +-- acs_privilege.create_privilege('mp3_admin_playlist'); +-- acs_privilege.create_privilege('mp3_admin'); +-- acs_privilege.add_child('mp3_admin_mp3', 'mp3_view_mp3'); +-- acs_privilege.add_child('mp3_admin_mp3', 'mp3_create_mp3'); +-- acs_privilege.add_child('mp3_admin_mp3', 'mp3_delete_mp3'); +-- acs_privilege.add_child('mp3_admin_mp3', 'mp3_modify_mp3'); +-- acs_privilege.add_child('mp3_admin_playlist', 'mp3_view_playlist'); +-- acs_privilege.add_child('mp3_admin_playlist', 'mp3_create_playlist'); +-- acs_privilege.add_child('mp3_admin_playlist', 'mp3_delete_playlist'); +-- acs_privilege.add_child('mp3_admin_playlist', 'mp3_modify_playlist'); +-- acs_privilege.add_child('mp3_admin', 'mp3_admin_playlist'); +-- acs_privilege.add_child('mp3_admin', 'mp3_admin_mp3'); + +-- -- bind privileges to global names + +-- acs_privilege.add_child('create','mp3_create_mp3'); +-- acs_privilege.add_child('create','mp3_create_playlist'); +-- acs_privilege.add_child('write','mp3_modify_mp3'); +-- acs_privilege.add_child('write','mp3_modify_playlist'); +-- acs_privilege.add_child('read','mp3_view_mp3'); +-- acs_privilege.add_child('read','mp3_view_playlist'); +-- acs_privilege.add_child('delete','mp3_delete_mp3'); +-- acs_privilege.add_child('delete','mp3_delete_playlist'); +-- acs_privilege.add_child('admin','mp3_admin'); + +-- default_context := acs.magic_object_id('default_context'); +-- registered_users := acs.magic_object_id('registered_users'); +-- the_public := acs.magic_object_id('the_public'); + +-- -- give the public the power to view playlists by default + +-- acs_permission.grant_permission ( +-- object_id => acs.magic_object_id('default_context'), +-- grantee_id => acs.magic_object_id('the_public'), +-- privilege => 'mp3_view_playlist' +-- ); + + +-- -- give the public the power to view mp3s by default + +-- acs_permission.grant_permission ( +-- object_id => acs.magic_object_id('default_context'), +-- grantee_id => acs.magic_object_id('the_public'), +-- privilege => 'mp3_view_mp3' +-- ); + +-- end; +-- / Index: openacs-4/contrib/obsolete-packages/mp3jukebox/sql/oracle/mp3jukebox-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/sql/oracle/Attic/mp3jukebox-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/sql/oracle/mp3jukebox-drop.sql 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,67 @@ +-- @author jennie@ybos.net +-- @author wirth@ybos.net + +-- dropping permissions +delete from acs_permissions + where privilege in + ('mp3_view_mp3','mp3_create_mp3','mp3_delete_mp3','mp3_modify_mp3', + 'mp3_view_playlist','mp3_create_playlist','mp3_delete_playlist', + 'mp3_modify_playlist','mp3_admin_mp3','mp3_admin_playlist', + 'mp3_admin'); + +delete from acs_privilege_hierarchy + where privilege in + ('mp3_view_mp3','mp3_create_mp3','mp3_delete_mp3','mp3_modify_mp3', + 'mp3_view_playlist','mp3_create_playlist','mp3_delete_playlist', + 'mp3_modify_playlist','mp3_admin_mp3','mp3_admin_playlist', + 'mp3_admin'); + +delete from acs_privilege_hierarchy + where child_privilege in + ('mp3_view_mp3','mp3_create_mp3','mp3_delete_mp3','mp3_modify_mp3', + 'mp3_view_playlist','mp3_create_playlist','mp3_delete_playlist', + 'mp3_modify_playlist','mp3_admin_mp3','mp3_admin_playlist', + 'mp3_admin'); + +delete from acs_privileges + where privilege in + ('mp3_view_mp3','mp3_create_mp3','mp3_delete_mp3','mp3_modify_mp3', + 'mp3_view_playlist','mp3_create_playlist','mp3_delete_playlist', + 'mp3_modify_playlist','mp3_admin_mp3','mp3_admin_playlist', + 'mp3_admin'); + + +declare + cursor play_cur is + select playlist_id from mp3_playlists; + cursor mp3_cur is + select mp3_id from mp3_mp3s; +begin + for play_rec in play_cur loop + mp3_playlist.delete(play_rec.playlist_id); + end loop; + for mp3_rec in mp3_cur loop + mp3.delete(mp3_rec.mp3_id); + end loop; +end; +/ +show errors + +drop package mp3_playlist; +drop package mp3; +drop view mp3_playlist_song_count; +drop view mp3_mp3s_not_deleted; +drop view mp3_mp3_playlist_map_view; +drop table mp3_mp3_playlist_map; +drop table mp3_mp3_stats; +drop table mp3_playlist_stats; +drop table mp3_votes; +drop table mp3_playlists; +drop table mp3_mp3s; + +begin + acs_object_type.drop_type ('mp3_playlist'); + acs_object_type.drop_type ('mp3'); +end; +/ +show errors \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/tcl/mp3-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/tcl/Attic/mp3-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/tcl/mp3-procs.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,29 @@ +ad_library { + + general procs for the MP3 Jukebox. + + @author wirth@ybos.net + @creation-date Mar-12-2001 + taken largely from cm-defs.tcl +} + + +ad_proc -public mp3_search_select_sql { + { + -order_by "upper(title)" + -conditions "" + } + search_string_name +} { + Returns the sql to perform the file search based on the search string + stored in the named variable and any additional search criteria. + Additional conditions must be valid SQL with a leading 'and' +} { + return " +select title, artist, album, mp3_id +from mp3_mp3s_not_deleted +where upper(title) like '%' || upper(:$search_string_name) || '%' +or upper(artist) like '%' || upper(:$search_string_name) || '%' +$conditions +order by $order_by" +} Index: openacs-4/contrib/obsolete-packages/mp3jukebox/tcl/scanner-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/tcl/Attic/scanner-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/tcl/scanner-procs.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,33 @@ +ad_library { + + The Scanner procs for the MP3 Jukebox + + @author peterv@ybos.net + @creation-date Mar-02-2001 + @cvs-id $Id: scanner-procs.tcl,v 1.1 2001/04/20 20:51:11 donb Exp $ +} + + + + +ad_proc -public get_list_of_mp3s { +} { + This proc uses the package_id to check an appropriate directory. + It uses ad_parameter to check the MP3FileLocation variable. +} { + set package_id [ad_conn package_id] + set file_list [exec /usr/bin/find [ad_parameter -package_id $package_id MP3StagingLocation] ] + + return $file_list +} + +ad_proc -public mp3_name_from_file { filename } { + +} { + if { [regexp {([^/]*)\.[mM][Pp]3$} $filename match mp3_name] } { + return $mp3_name + } else { + return "Not AN MP3 File Name!" + } +} + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/Attic/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/index.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,27 @@ + +@context_bar@ +@page_title@ +@title@ + +

Available Playlists

+ + +There are currently no playlists available.

+ + + + + + + + + +
+ @playlists.name@ + + + Listen + +
+
+ Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/Attic/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/index.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,26 @@ +#/mp3/www/index.tcl +ad_page_contract { + @author tigre@ybos.net + @creation-date 8 March 2001 +} { +} -properties { + + playlists:multirow +} + +set title "MP3 Jukebox" +set context_bar "" +set page_title "MP3 Jukebox" +set package_id [ad_conn package_id] + + +# @author jennie@ybos.net +db_multirow playlists playlist_info " + select name, mp.playlist_id, nvl(sc.songs,0) as songs + from acs_objects, mp3_playlists mp, + mp3_playlist_song_count sc + where object_id = mp.playlist_id + and context_id = :package_id + and mp.playlist_id = sc.playlist_id(+) + order by name +" Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/Attic/master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/master.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,7 @@ + +@page_title@ + +

@page_title@

+<%= [eval ad_context_bar $context_bar] %> +
+ Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/one-playlist.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/Attic/one-playlist.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/one-playlist.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,71 @@ + +@context_bar@ +@page_title@ +@title@ + +

Information for playlist: @name@

+Name: @name@ +
+Score required to remove song: @remove_threshold@ + + +
+Listen: listen to @name@ +
+ +
+MP3s associated with @name@ + +

+ There are no mp3s associated with this playlist. + + + + + + + + + + + + + + + + + + + + + + + +
ScoreVoteTitleArtist 
+ + + + @playlist_mp3s.total@ + + + + + + + @playlist_mp3s.title@ + + + @playlist_mp3s.title@ + +   + + + @playlist_mp3s.artist@ + + + @playlist_mp3s.artist@ + + + listen to @playlist_mp3s.title@ +
+
\ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/one-playlist.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/Attic/one-playlist.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/one-playlist.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,62 @@ +#mp3/www/one-playlist.tcl +ad_page_contract { + + Lists properties of one playlist including related mp3s + + @author wirth@ybos.net + @creation-date 2000-03-02 + +} { + + playlist_id:naturalnum,notnull + +} -properties { + + page_title:onevalue + context_bar:onevalue + name:onevalue + playlist_mp3s:multirow + playlist_info + remove_threshold + playlist_id:onevalue + yes_vote:onevalue + no_vote:onevalue +} + + +set title "One Playlist" +set context_bar [list $title] +set page_title "One Playlist" + + +# @author jennie@ybos.net +db_1row playlist_info " + select name, remove_threshold, nvl(sc.songs,0) as songs, mp.playlist_id + from mp3_playlists mp, + mp3_playlist_song_count sc + where mp.playlist_id=:playlist_id + and sc.playlist_id(+) = mp.playlist_id +" + +db_1row vote_info " + select remove_threshold + from mp3_playlists + where playlist_id=:playlist_id +" + +db_multirow playlist_mp3s mp3_info " + select sort_key, + mp.title as title, map.mp3_id as mp3_id, total, artist, + decode (sign (total - :remove_threshold),1,'t','f') as active_p + from mp3_mp3_playlist_map_view map, + mp3_mp3s_not_deleted mp + where map.playlist_id = :playlist_id + and map.mp3_id=mp.mp3_id + order by sort_key +" + +set yes_vote "up" +set no_vote "down" +set ui_remove_threshold [expr -1 * $remove_threshold] + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/vote-thankyou.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/Attic/vote-thankyou.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/vote-thankyou.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,9 @@ + +@page_title@ +@page_title@ +@context_bar@ + +Thank you for your vote @vote_words@ @mp3_title@ in playlist @name@. +


+You may now return to @name@. + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/vote-thankyou.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/Attic/vote-thankyou.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/vote-thankyou.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,46 @@ +#mp3/www/vote-thankyou.tcl +ad_page_contract { + + Thanks user for vote and returns to one-playlist.tcl + + @author wirth@ybos.net + @creation-date 2000-03-02 + + @param mp3_id + @param playlist_id + @param vote + +} { + mp3_id:naturalnum,notnull + playlist_id:naturalnum,notnull + vote_num:integer,notnull + +} -properties { + context_bar:onevalue + page_title:onevalue + mp3_id:onevalue + playlist_id:onevalue + vote_num:onevalue + vote_words:onevalue + name:onevalue + title:onevalue +} + +set title "Thanks for your vote" +set context_bar [list $title] +set page_title "Thanks for your vote" +set remove_p "" + +if { $vote_num==-1 } { + set vote_words "against" +} else { + set vote_words "for" +} + +db_1row name_info "select title as mp3_title, name + from mp3_mp3s, + mp3_playlists + where playlist_id=:playlist_id and mp3_id=:mp3_id" + + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/vote.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/Attic/vote.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/vote.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,60 @@ +#mp3/www/vote.tcl +ad_page_contract { + + Vote to keep/remove mp3 in playlist + + @author wirth@ybos.net + @creation-date 2000-03-02 + + @param mp3_id + @param playlist_id + @param vote + +} { + mp3_id:naturalnum,notnull + playlist_id:naturalnum,notnull + vote:notnull +} + +set user_id [ad_verify_and_get_user_id] + +if {[string compare $vote "up"] == 0 } { + + set vote_num 1 + +} elseif {[string compare $vote "down"] == 0 } { + + set vote_num -1 + +} else { + + set complaint "Your vote was not valid. Please back up using the back button on your browser and try again." + ad_return_error "Error" "$complaint" + + return -code return + +} + +if [catch { + db_exec_plsql vote_cast " + begin + :1 := mp3_playlist.vote_cast ( + mp3_id => :mp3_id, + playlist_id => :playlist_id, + user_id => :user_id, + vote_date => sysdate, + vote => :vote_num + ); + end; + " +} errmsg ] { + + set complaint " The database did not accept your input. + See details for the error message below\n\n\t

$errmsg" + ad_return_error "Database Error" "$complaint" + return -code return + +} else { + + ad_returnredirect one-playlist?[export_url_vars playlist_id] +} \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/file-search.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/file-search.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/file-search.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,42 @@ + +@context_bar@ +@page_title@ +@title@ + +File search for string "@search_string@" + +


+ + + No files matched your criteria. Try another search: +
+
+ + +
+
+ + + + + + + + + + + + + + + + +
TitleArtistAlbum 
@mp3s.title@@mp3s.artist@@mp3s.album@edit | + listen | + delete + + | + Add to Playlist + +
+
\ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/file-search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/file-search.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/file-search.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,33 @@ +# mp3/www/admin/file-search.tcl + +# Search to pick a file and give options for what to do + +ad_page_contract { + + @author wirth@ybos.net +} { + search_string + playlist_id:optional + +} -properties { + + mp3s:multirow + playlist_id:onevalue +} + +set user_id [ad_verify_and_get_user_id] +#requires admin permission as under /admin + +if { ![info exists search_string] } { + set search_string "" +} + +set select_sql [mp3_search_select_sql search_string] + +set title "File Search" +set context_bar [list $title] +set page_title "File Search" + +db_multirow mp3s mp3_search "$select_sql" + +ad_return_template Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/index.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,56 @@ + +@context_bar@ +@page_title@ +@title@ + + +

Available Playlists

+ + + There are currently no playlists available.

+ + +

+ +Add a Playlist + +

MP3 Administration

+ +
  • Recently Uploaded MP3s + + There are currently no mp3s available.

    + + +

    + +
    +
  • + Find an MP3 + + +
  • +
  • + Add an MP3 + +
  • + Scan the staging location for new MP3s (This can take +a long time; be patient!) + + + + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/index.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,39 @@ +#/mp3/admin/index.tcl +ad_page_contract { + @author tigre@ybos.net + @creation-date 8 March 2001 +} { +} -properties { + + playlists:multirow + mp3s:multirow + playlist_permission_p:onevalue + mp3_permission_p:onevalue +} + +set title "MP3 Jukebox Administration" +set context_bar "" +set page_title "MP3 Jukebox Administration" + +#requires admin permission as under /admin +set package_id [ad_conn package_id] + +# @author jennie@ybos.net +db_multirow playlists playlist_info " + select name, mp.playlist_id, nvl(sc.songs,0) as songs + from acs_objects, mp3_playlists mp, + mp3_playlist_song_count sc + where object_id = mp.playlist_id + and context_id = :package_id + and mp.playlist_id = sc.playlist_id(+) + order by name +" +db_multirow mp3s mp3_info " +select title, mp3_id, creation_date +from (select title, mp3_id, creation_date + from mp3_mp3s_not_deleted, acs_objects + where mp3_id = object_id + and creation_date > sysdate - 1 + order by creation_date desc) +where rownum < 10 +" Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/master.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,8 @@ + +@page_title@ + +

    @page_title@

    +<%= [eval ad_context_bar $context_bar] %> +
    + + \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-add-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/mp3-add-2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-add-2.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,13 @@ + +@context_bar@ +@page_title@ +@title@ + +Successfully added the MP3: @mp3_title@ +

    +Used the following sql: +
    +

    +@sql@
    +
    + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/mp3-add-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-add-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,204 @@ +#mp3/admin/mp3-add-2.tcl +ad_page_contract { + Read in the file specified by the form, store it in the file system, + parse out the relevant data and store it in the database. +} { + {upload_file ""} + mp3_id +} -properties { + sql:onevalue + page_title:onevalue + context_bar:onevalue +} + +set title "Add an MP3" +set context_bar [list $title] +set page_title "MP3 Added" + +#requires admin permission as under /admin +set package_id [ad_conn package_id] + +set exception_text "" +set exception_count 0 + +if { ![exists_and_not_null upload_file] } { + append exception_text "
  • You need to upload a file\n" + incr exception_count +} + +if { $exception_count > 0 } { + ad_return_complaint $exception_count $exception_text + return 0 +} + +set creation_ip [ad_conn "peeraddr"] +set creation_user [ad_conn "user_id"] + +set max_n_bytes [ad_parameter MaxNumberOfBytes fs] + +set tmp_filename [ns_queryget upload_file.tmpfile] +#set version_content [read [open $tmp_filename] $max_n_bytes] + +set file_extension [string tolower [file extension $upload_file]] +# remove the first . from the file extension +regsub "\." $file_extension "" file_extension + +set guessed_file_type [ns_guesstype $upload_file] + +set n_bytes [file size $tmp_filename] + +# strip off the C:\directories... crud and just get the file name +if {![regexp {([^//\\]+)$} $upload_file match client_filename]} { + # couldn't find a match + set client_filename $upload_file +} + +if [db_0or1row check_file_name " + select deleted_p + from mp3_mp3s + where file_path = :client_filename"] { + if { $deleted_p == "f" } { + ad_return_complaint 1 "That file seems to already exist in the database" + return + } else { + set update_entry_p 1 + } +} else { + set update_entry_p 0 +} + +set target_filename "[ad_parameter MP3FileLocation]/$client_filename" + +file copy -force $tmp_filename $target_filename + +#regsub www [acs_root_dir] "bin/mp3_file_scan" script_path + +set mp3_info_list [exec "[acs_root_dir]/bin/mp3_file_scan" $target_filename] + +foreach info_item $mp3_info_list { + set info_key [string tolower [lindex $info_item 0]] + set info_val [lindex $info_item 1] + switch -exact $info_key { + title { + set mp3_title [db_nullify_empty_string $info_val] + # title is included in the standard sql, so no need to add to info_pairs + } + mm { + set minutes [db_nullify_empty_string $info_val] + set info_pairs(minutes) ":minutes" + } + ss { + set seconds [db_nullify_empty_string $info_val] + set info_pairs(seconds) ":seconds" + } + comment { + set comments [db_nullify_empty_string $info_val] + set info_pairs(comments) ":comments" + } + mode { + set mode_num [db_nullify_empty_string [expr int($info_val)]] + set info_pairs(mode_num) ":mode_num" + } + copyright - + vbr - + stereo { + set "${info_key}_p" [db_nullify_empty_string \ + [ad_decode $info_val 1 "t" 0 "f" ""]] + set "info_pairs(${info_key}_p)" ":${info_key}_p" + } + default { + set $info_key [db_nullify_empty_string $info_val] + set info_pairs($info_key) ":$info_key" + } + } +} +# Do we need to make sure numbers get handled properly? +# If so, this needs to be stuck back into the switch statement above: +# layer - +# tracknum - +# version { +# set $info_key [db_nullify_empty_string [expr int($info_val)]] +# set info_pairs($info_key) ":$info_key" +# } + +# If no title just use the file_name +if {![info exists mp3_title]} { + set mp3_title [mp3_name_from_file $client_filename] +} + +if $update_entry_p { + set mp3_id [db_string get_mp3_id " +select mp3_id +from mp3_mp3s +where file_path = :client_filename"] + + set sql " +update mp3_mp3s +set title = :mp3_title," + + foreach i_key [array names info_pairs] { + append sql "\n $i_key = $info_pairs($i_key)," + } + append sql " + deleted_p = 'f' +where mp3_id = :mp3_id +" + + set sql2 " +update acs_objects +set creation_user = :creation_user, + creation_ip = :creation_ip, + creation_date = sysdate, + context_id = :package_id +where object_id = :mp3_id +" + + if [catch { + db_transaction { + db_dml undelete_mp3 $sql + db_dml fix_creation $sql2 + } + } errmsg ] { + + set complaint " The database did not accept your input. + See details for the error message below\n\n\t

    $errmsg" + ad_return_error "Database Error" "$complaint" + return -code return + + } + +} else { + set sql " +begin + :1 := mp3.new( + mp3_id => :mp3_id, + file_path => :client_filename, + title => :mp3_title," + + foreach i_key [array names info_pairs] { + append sql "\n $i_key => $info_pairs($i_key)," + } + append sql " + creation_user => :creation_user, + creation_ip => :creation_ip, + creation_date => sysdate, + context_id => :package_id +); +end; +" + + if [catch { + db_exec_plsql add_mp3 $sql + } errmsg ] { + + set complaint " The database did not accept your input. + See details for the error message below\n\n\t

    $errmsg" + ad_return_error "Database Error" "$complaint" + return -code return + + } +} + +ad_return_template + + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/mp3-add.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-add.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,31 @@ + +@context_bar@ +@page_title@ +@title@ + +

    Use the following form to add an mp3. +

    + +

    +@hidden_vars@ + + + + + + + + + + + + + + +
    filename
     Use the "Browse..." button to locate your file, + then click "Open".
      + +
    + +

    +

    Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/mp3-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-add.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,32 @@ +# mp3jukebox/www/admin/mp3-add.tcl + +ad_page_contract { + + This page serves as a UI to add an mp3 + + @author wirth@ybos.net + @creation-date 2000-03-08 + +} { + + +} -properties { + + page_title:onevalue + context_bar:onevalue + form_action:onevalue + hidden_vars:onevalue +} + +set title "Add an MP3" +set context_bar [list $title] +set page_title "Add an MP3" + +#requires admin permission as under /admin + +#set playlist_id here for double-click protection +set mp3_id [db_nextval acs_object_id_seq] +set form_action mp3-add-2 +set hidden_vars [export_form_vars mp3_id] + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/mp3-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-delete.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,27 @@ +#/mp3/admin/mp3-delete.tcl + +ad_page_contract { + + delete an mp3 + @author Elizabeth Wirth (wirth@ybos.net) + @creation-date 2001-03-05 + +} { + + mp3_id:naturalnum,notnull + +} +#requires admin permission as under /admin + +db_transaction { + db_exec_plsql delete_mp3 { + begin + mp3.mark_as_deleted ( + mp3_id => :mp3_id + ); + end; + } + +} + +ad_returnredirect "index" Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-edit-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/mp3-edit-2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-edit-2.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1 @@ + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/mp3-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-edit-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,83 @@ +# /packages/mp3jukebox/www/admin/mp3-edit-2.tcl + +ad_page_contract { + + This page edits an mp3 in the database + and redirects to admin/index.tcl + + @author wirth@ybos.net + @creation-date 2000-03-08 + +} { + mp3_id:naturalnum,notnull + file_path:notnull + title:notnull + artist + bitrate + album + genre + year + layer + {copyright_p ""} + tracknum + version + mode_num + {stereo_p ""} + frequency + minutes + seconds + comments + {vbr_p ""} + +} + +#requires admin permission as under /admin + +# take empty strings and make them null values before inserting them in db +set mp3_variables [list file_path title artist bitrate album genre year layer copyright_p tracknum version mode_num stereo_p frequency minutes seconds comments vbr_p] + +foreach var $mp3_variables { + + if { [empty_string_p [set $var]] } { + set var [db_nullify_empty_string [set $var]] + } +} + +if [catch { + db_dml mp3_edit "update mp3_mp3s +set + file_path = :file_path, + title = :title, + artist = :artist, + bitrate = :bitrate, + album = :album, + genre = :genre, + year = :year, + tracknum = :tracknum, + layer = :layer, + copyright_p = :copyright_p, + version = :version, + mode_num = :mode_num, + stereo_p = :stereo_p, + frequency = :frequency, + minutes = :minutes, + seconds = :seconds, + comments = :comments, + vbr_p = :vbr_p +where mp3_id = :mp3_id +" +} errmsg ] { + + set complaint " The database did not accept your input. + See details for the error message below\n\n\t

    $errmsg" + ad_return_error "Database Error" "$complaint" + return -code return + +} else { + + ad_returnredirect index + +} + + + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/mp3-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-edit.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,97 @@ + +@context_bar@ +@page_title@ +@title@ + +

    Use the following form to edit information for MP3: @escape_title@. +

    + +

    +@hidden_vars@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Title
    File Path
    Year
    Artist
    Comment
    Album
    Genre
    Bitrate
    Variable Bitrateyes  + no
    Layer
    Copyrightyes  + no
    Track Number
    Version
    Mode
    Stereoyes  + no
    Frequency
    MM
    SS
    + +
    + +

    +

    Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/mp3-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-edit.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,65 @@ +# mp3jukebox/www/admin/mp3-add.tcl + +ad_page_contract { + + This page serves as a UI to edit an mp3 + + @author wirth@ybos.net + @creation-date 2000-03-08 + +} { + + mp3_id:naturalnum,notnull + + +} -properties { + + page_title:onevalue + context_bar:onevalue + form_action:onevalue + hidden_vars:onevalue +} + +#requires admin permission as under /admin + +set title "Edit an MP3" + +set page_title "Edit an MP3:$title" +set context_bar [list $page_title] + +set form_action mp3-edit-2 +set hidden_vars [export_form_vars mp3_id] + +if {![db_0or1row mp3_information " + select * from mp3_mp3s where mp3_id=:mp3_id +"] } { + ad_return_error "Error" "There is no mp3 with id number $mp3_id. Please hit the back button on your browser and try again." + return -code return +} + +set page_title "Edit MP3:$title" +set context_bar [list $page_title] + +set variables_p [list copyright_p stereo_p vbr_p] +foreach variable $variables_p { + if { [set $variable] == "f"} { + set "${variable}_f" "checked" + set "${variable}_t" "" + } elseif { [set $variable] == "t"} { + set "${variable}_t" "checked" + set "${variable}_f" "" + } else { + set "${variable}_t" "" + set "${variable}_f" "" + } +} +set varchars [list file_path title artist bitrate album genre comments state] +foreach var $varchars { + set "escape_${var}" "[ad_quotehtml [set $var]]" + +} + +set page_title "Edit MP3:$escape_title" +set context_bar [list $page_title] + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-mark-as-deleted.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/mp3-mark-as-deleted.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/mp3-mark-as-deleted.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,29 @@ +#/mp3/admin/mp3-mark-as-deleted.tcl + +ad_page_contract { + + mark an mp3 as deleted but don't delete from database + @author Elizabeth Wirth (wirth@ybos.net) + @creation-date 2001-03-05 + +} { + + mp3_id:naturalnum,notnull + +} +set package_id [ad_conn package_id] + +#ad_require_permission... + +db_transaction { + db_exec_plsql mark_mp3_as_deleted { + begin + mp3_mp3s.mark_as_deleted ( + mp3_id => :mp3_id + ); + end; + } + +} + +ad_returnredirect "index" Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/one-playlist.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/one-playlist.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/one-playlist.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,71 @@ + +@context_bar@ +@page_title@ +@title@ + + +

    Information for playlist @name@ (edit)

    +Name: @name@ +
    +Score required to remove song: @remove_threshold@ + + +
    +listen to playlist +
    + +
    +MP3s associated with @name@: + +

    + There are no mp3s associated with this playlist. + + (insert mp3 here)

    + + + + + + + + + + + + + + + + + + + +
    ScoreTitle 
    + + + + @playlist_mp3s.total@ + + + + @playlist_mp3s.title@ + + + @playlist_mp3s.title@ + + + ( + remove + + | swap with next + + | listen +) +
    +
    +

    + Add an MP3 to this playlist: + + + +
    \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/one-playlist.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/one-playlist.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/one-playlist.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,65 @@ +#mp3/www/admin/one-playlist.tcl +ad_page_contract { + + Lists properties of one playlist including related mp3s + + @author wirth@ybos.net + @creation-date 2000-03-02 + +} { + + playlist_id:naturalnum,notnull + new_mp3:optional + +} -properties { + + page_title:onevalue + context_bar:onevalue + name:onevalue + playlist_mp3s:multirow + playlist_info + remove_threshold + playlist_id:onevalue + shuffle_y_or_n + new_mp3:onevalue +} + +#requires admin permission as under /admin + +# @author jennie@ybos.net +db_1row playlist_info " + select name, remove_threshold, nvl(sc.songs,0) as songs, mp.playlist_id + from mp3_playlists mp, + mp3_playlist_song_count sc + where mp.playlist_id=:playlist_id + and sc.playlist_id(+) = mp.playlist_id +" + +set title "Playlist: $name" +set context_bar [list $title] +set page_title "Playlist: $name" + +set package_id [ad_conn package_id] +#ad_require_permission $package_id mp3_view_playlist + +db_multirow playlist_mp3s mp3_info " + select sort_key, + mp.title as title, map.mp3_id as mp3_id, total, + decode (sign ((total - :remove_threshold)),1,'t','f') as active_p + from mp3_mp3_playlist_map_view map, + mp3_mp3s_not_deleted mp + where playlist_id=:playlist_id + and map.mp3_id=mp.mp3_id + order by sort_key +" + +#remove_threshold is usually a negative number in the database - we make it +#positive here for user interface +set ui_remove_threshold [expr -1 * $remove_threshold] + +set highest_sortkey_in_list [db_string order_maxkey_get "select max(sort_key) + from mp3_mp3_playlist_map + where playlist_id=:playlist_id + "] + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/order-choose.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/order-choose.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/order-choose.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,22 @@ + +@context_bar@ +@page_title@ +@title@ + + +

    Place @mp3_title@ in playlist: @name@

    + +
    + + +
      + (insert at beginning)

      + +

    1. + @playlist_mp3s.title@ + ( + insert after + ) +
    2. + +
    Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/order-choose.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/order-choose.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/order-choose.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,45 @@ +# mp3/www/admin/file-search.tcl + +# Search to pick a file and give options for what to do + +ad_page_contract { + + @author wirth@ybos.net +} { + + playlist_id + new_mp3 + +} -properties { + + mp3s:multirow + playlist_id:onevalue + new_mp3:onevalue + name:onevalue +} + +set user_id [ad_verify_and_get_user_id] + +#requires admin permission as under /admin + +set title "Choose Order" +set context_bar [list $title] +set page_title "Order MP3 in Playlist" + +db_1row playlist_name "select name from mp3_playlists where playlist_id=$playlist_id" +set mp3_title [db_string mp3_name "select title from mp3_mp3s where mp3_id=:new_mp3"] + +db_multirow playlist_mp3s mp3_info " + select sort_key, + mp.title as title, map.mp3_id as mp3_id + from mp3_mp3_playlist_map map, + mp3_mp3s mp + where playlist_id=:playlist_id + and map.mp3_id=mp.mp3_id + order by sort_key +" {} if_no_rows { + ad_returnredirect playlist-item-add-2?playlist_id=$playlist_id&insert_after_id=-1&mp3_id=$new_mp3 + return -code return +} + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-create-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-create-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-create-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,62 @@ +# /packages/mp3jukebox/www/admin/playlist-create-2.tcl + +ad_page_contract { + + This page adds a playlist to the database + and redirects to index.tcl + + @author wirth@ybos.net + @creation-date 2000-03-02 + +} { + playlist_name:notnull + remove_threshold:integer,notnull + playlist_id +} + +#requires admin permission as under /admin + +set package_id [ad_conn package_id] + +set creation_ip [ad_conn "peeraddr"] +set creation_user [ad_conn "user_id"] + +#remove_threshold expects a negative number for vote threshold, but the user +#will expect to type in a positive number. So we change it to negative behind +#the scenes for them. If they type in a negative number or zero, we input the number as is. + +if {$remove_threshold > 0} { + set neg_remove_threshold [expr $remove_threshold * -1] +} else { + set neg_remove_threshold $remove_threshold +} + +if [catch { + db_exec_plsql create_playlist " + begin + :1 := mp3_playlist.new( + playlist_id => :playlist_id, + name => :playlist_name, + remove_threshold => :neg_remove_threshold, + creation_ip => :creation_ip, + creation_user => :creation_user, + creation_date => sysdate, + context_id => :package_id +); +end; +" +} errmsg ] { + + set complaint " The database did not accept your input. + See details for the error message below\n\n\t

    $errmsg" + ad_return_error "Database Error" "$complaint" + return -code return + +} else { + + ad_returnredirect one-playlist?playlist_id=$playlist_id + +} + + + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-create.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-create.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-create.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,36 @@ + +@context_bar@ +@page_title@ +@title@ + + +

    Use the following form to create a new playlist. +

    + +

    +@hidden_vars@ + + + + + + + + + + + + + + + + + + +
    Title
    Net votes required to remove mp3 from playlist
    + +
    + +

    +

    + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-create.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-create.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,32 @@ +# /packages/mp3jukebox/www/admin/playlist-create.tcl + +ad_page_contract { + + This page serves as a UI to add a playlist + + @author wirth@ybos.net + @creation-date 2000-03-02 + +} { + + +} -properties { + + page_title:onevalue + context_bar:onevalue + form_action:onevalue + hidden_vars:onevalue +} + +set title "Create a Playlist" +set context_bar [list $title] +set page_title "Create a Playlist" + +#requires admin permission as under /admin + +#set playlist_id here for double-click protection +set playlist_id [db_nextval acs_object_id_seq] +set form_action playlist-create-2 +set hidden_vars [export_form_vars playlist_id] + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-delete-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-delete-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,27 @@ +#/mp3/admin/playlist-delete-2.tcl + +ad_page_contract { + + delete a playlist + @author Elizabeth Wirth (wirth@ybos.net) + @creation-date 2001-03-05 + +} { + + playlist_id:naturalnum,notnull + +} +#requires admin permission as under /admin + +db_transaction { + db_exec_plsql delete_playlist { + begin + mp3_playlist.delete ( + playlist_id => :playlist_id + ); + end; + } + +} + +ad_returnredirect "index" Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-delete.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-delete.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,12 @@ + +@context_bar@ +@page_title@ +@title@ + + +

    +You are about to delete the playlist @playlist_name@. Are you sure you want to proceed? +

    + +Delete + | Back to Playlist \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-delete.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,32 @@ +# /packages/mp3jukebox/www/admin/playlist-delete.tcl + +ad_page_contract { + + This page serves as a warning before deleting a playlist + + @author wirth@ybos.net + @creation-date 2000-03-02 + +} { + playlist_id:naturalnum,notnull + +} -properties { + + page_title:onevalue + context_bar:onevalue + playlist_id:onevalue + playlist_name:onevalue +} + +set title "Delete a Playlist" +set context_bar [list $title] +set page_title "Delete a Playlist" + +#requires admin permission as under /admin + +#set playlist_id here for double-click protection + +set playlist_name "[db_1row playlist_info "select name from mp3_playlists where playlist_id=:playlist_id" ]" + + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-edit-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,66 @@ +# /packages/mp3jukebox/www/admin/playlist-edit-2.tcl + +ad_page_contract { + + This page edits a playlist + + @author wirth@ybos.net + @creation-date 2000-03-02 + +} { + + playlist_id:naturalnum,notnull + remove_threshold:integer,notnull + playlist_name + +} -properties { + + page_title:onevalue + context_bar:onevalue + form_action:onevalue + hidden_vars:onevalue + name + remove_threshold:onevalue +} + +set title "Edit a Playlist" +set context_bar [list $title] +set page_title "Edit a Playlist" + +#requires admin permission as under /admin + +set creation_ip [ad_conn "peeraddr"] +set creation_user [ad_conn "user_id"] + +#remove_threshold expects a negative number for vote threshold, but the user +#will expect to type in a positive number. So we change it to negative behind +#the scenes for them. If they type in a negative number or zero, we input the number as is. + +if {$remove_threshold > 0} { + set neg_remove_threshold [expr $remove_threshold * -1] +} else { + set neg_remove_threshold $remove_threshold +} + +if [catch { + db_dml update_playlist " + update mp3_playlists set + name=:playlist_name, + remove_threshold=:neg_remove_threshold + where playlist_id=:playlist_id +" +} errmsg ] { + + set complaint " The database did not accept your input. + See details for the error message below\n\n\t

    $errmsg" + ad_return_error "Database Error" "$complaint" + return -code return + + } else { + + ad_returnredirect one-playlist?playlist_id=$playlist_id + + } + + + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-edit.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,34 @@ + +@context_bar@ +@page_title@ +@title@ + + +

    Edit playlist: @escape_name@ +

    + +
    +@hidden_vars@ + + + + + + + + + + + + + + + + +
    Title
    Net votes required to remove mp3 from playlist
    + +
    + +

    +

    + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-edit.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,52 @@ +# /packages/mp3jukebox/www/admin/playlist-create.tcl + +ad_page_contract { + + This page serves a UI to edit a playlist + + @author wirth@ybos.net + @creation-date 2000-03-02 + +} { + + playlist_id:naturalnum,notnull + +} -properties { + + page_title:onevalue + context_bar:onevalue + form_action:onevalue + hidden_vars:onevalue + name + remove_threshold:onevalue + f_checked:onevalue + t_checked:onevalue + escape_name:onevalue +} + +set title "Edit a Playlist" +set context_bar [list $title] +set page_title "Edit a Playlist" + +#requires admin permission as under /admin + +set form_action playlist-edit-2 +set hidden_vars [export_form_vars playlist_id] + +if {![db_0or1row playlist_info " + select name, remove_threshold + from mp3_playlists + where playlist_id=:playlist_id +"]} { + + ad_return_error "There is no playlist with the id @playlist_id@. Please use the back button on your browser and try again." + return -code return + +} + +set ui_remove_threshold [expr -1 * $remove_threshold] + +set escape_name [ad_quotehtml $name] + +ad_return_template + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-item-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-item-add-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-item-add-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,54 @@ +#mp3/www/admin/playlist-item-add-2.tcl + +ad_page_contract { + + Adds an item (e.g. an mp3) to a playlist + + @author Elizabeth Wirth (wirth@ybos.net) + @creation-date 2001-03-05 +} { + + mp3_id:naturalnum,notnull + playlist_id:naturalnum,notnull + insert_after_id:integer,notnull +} + +#requires admin permission as under /admin + + +#Always insert after another item, and pass the sort_key of that item in +#as insert_after_sort_key. +#If there are no items (insert_after_id was passed as -1), pass 0 in as sort_key. + +if {$insert_after_id != -1 } { + + set insert_after_sort_key [db_string sort_key "select sort_key from mp3_mp3_playlist_map + where mp3_id=:insert_after_id + and playlist_id=:playlist_id"] +} else { + + set insert_after_sort_key 0 + +} + +if [catch { + db_exec_plsql add_item " + begin + mp3_playlist.item_add ( + mp3_id => :mp3_id, + playlist_id => :playlist_id, + sort_key => :insert_after_sort_key + ); + end; +" + } errmsg ] { + + set complaint " The database did not accept your input. + See details for the error message below\n\n\t

    $errmsg" + ad_return_error "Database Error" "$complaint" + return -code return + +} else { + + ad_returnredirect one-playlist?playlist_id=$playlist_id +} Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-item-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-item-add.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-item-add.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,8 @@ + +@context_bar@ +@page_title@ +@title@ + + +

    +Need to set up a form here to choose mp3 from... where? I think the secrets here lie with Peter... \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-item-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-item-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-item-add.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,30 @@ +#mp3/www/admin/playlist-item-add.tcl +ad_page_contract { + + UI to add an mp3 to a playlist + + @author wirth@ybos.net + @creation-date 2000-03-02 + +} { + playlist_id:naturalnum,notnull + insert_after_id:integer,optional + +} -properties { + + page_title:onevalue + context_bar:onevalue + playlist_id:onevalue + name:onevalue +} + + +#requires admin permission as under /admin + +db_1row playlist_name "select name from mp3_playlists where playlist_id=:playlist_id" + +set title "Add item to playlist $name" +set context_bar [list $title] +set page_title "Add item to playlist $name" + +set hidden_vars [export_form_vars insert_after_id, playlist_id] \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-item-remove.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/playlist-item-remove.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/playlist-item-remove.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,37 @@ +#mp3/www/admin/playlist-item-remove.tcl + +ad_page_contract { + + Removes an item (e.g. an mp3) from a playlist + + @author Elizabeth Wirth (wirth@ybos.net) + @creation-date 2001-03-05 +} { + + mp3_id:naturalnum,optional + playlist_id:naturalnum,notnull +} + +#requires admin permission as under /admin + +if [catch { + db_exec_plsql remove_item " + begin + mp3_playlist.item_remove ( + mp3_id => :mp3_id, + playlist_id => :playlist_id + ); + end; + " +} errmsg ] { + + set complaint " The database did not accept your input. + See details for the error message below\n\n\t

    $errmsg" + ad_return_error "Database Error" "$complaint" + return -code return + +} else { + + ad_returnredirect one-playlist?[export_url_vars playlist_id] + +} \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/scanner.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/scanner.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/scanner.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,9 @@ + +@context_bar@ +@page_title@ +@title@ + + +

    Scanning MP3StagingLocation: @staging_location@

    + +@page_html@ \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/scanner.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/scanner.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/scanner.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,183 @@ +ad_page_contract { + Scan the MP3StagingLocation directory for new files +} { +} + +set user_id [ad_verify_and_get_user_id] +set package_id [ad_conn package_id] +set creation_ip [ad_conn "peeraddr"] +set creation_user [ad_conn "user_id"] + +set file_list [get_list_of_mp3s] + + +foreach file_name $file_list { + if {![regexp {(([^/]*)\.[mM][Pp]3)$} $file_name match client_filename mp3_name] } { + append page_html "Broke on $file_name
    \n" + continue + } + + if [db_0or1row check_file_name " + select deleted_p + from mp3_mp3s + where file_path = :client_filename"] { + if { $deleted_p == "f" } { + append page_html "$file_name is already in the db. Continuing.
    \n" + continue + } else { + set update_entry_p 1 + } + } else { + set update_entry_p 0 + } +# if {[db_string mp3_exists "select count(*) from mp3_mp3s where file_path = :client_filename"] != 0} { +# append page_html "$file_name is already in the db. Continuing.
    " +# continue +# } + + set target_filename "[ad_parameter MP3FileLocation]/$client_filename" + file copy -force $file_name $target_filename + + set file_info [exec "[acs_root_dir]/packages/mp3jukebox/bin/mp3_file_scan" $target_filename] + + set file_ct 0 + set plsql_arguments "" + set plsql_arguments_list [list] + + set file_info_vars [ns_set create] + + foreach info_pair $file_info { + set key [string tolower [lindex $info_pair 0]] + set value [lindex $info_pair 1] + + # Munge the ID3 formats into our column names + # This totally sucks, but you've gotta do it + # somewhere... : (. +# regsub {title$} $key "mp3_title" key + regsub {comment$} $key "comments" key + regsub {mm$} $key "minutes" key + regsub {ss$} $key "seconds" key + if { [regsub {copyright$} $key "copyright_p" key]} { + if {$value == 1} { + set value t + } else { + set value f + } + } + + + if { [regsub {stereo$} $key "stereo_p" key] } { + if {$value == 1} { + set value t + } else { + set value f + } + } + + if { [regsub {vbr$} $key "vbr_p" key] } { + if {$value == 1} { + set value t + } else { + set value f + } + } + + regsub {mode$} $key "mode_num" key +# regsub {file$} $key "file_path" key + +# ns_set put $file_info_vars $key $value + set $key $value + +# lappend plsql_arguments_list "$key => :$key" + + set "info_pairs($key)" ":$key" + } + + # Is there a title defined? + if { ![llength [array get info_pairs title]] } { + set info_pairs(title) ":mp3_name" + } + + if $update_entry_p { + set mp3_id [db_string get_mp3_id " +select mp3_id +from mp3_mp3s +where file_path = :client_filename"] + + set sql " +update mp3_mp3s +set deleted_p = 'f' +" + + foreach i_key [array names info_pairs] { + append sql ",\n $i_key = $info_pairs($i_key)" + } + append sql " +where mp3_id = :mp3_id +" + + set sql2 " +update acs_objects +set creation_user = :creation_user, + creation_ip = :creation_ip, + creation_date = sysdate, + context_id = :package_id +where object_id = :mp3_id +" + + + if [catch { + db_transaction { + db_dml undelete_mp3 $sql + db_dml fix_creation $sql2 + } + } errmsg ] { + + set complaint " The database did not accept your input. + See details for the error message below\n\n\t

    $errmsg" + ad_return_error "Database Error" "$complaint" + return -code return + + } + + } else { + set sql " +begin + :1 := mp3.new( + file_path => :client_filename," + + foreach i_key [array names info_pairs] { + append sql "\n $i_key => $info_pairs($i_key)," + } + append sql " + creation_user => :creation_user, + creation_ip => :creation_ip, + creation_date => sysdate, + context_id => :package_id +); +end; +" + + if [catch { + db_exec_plsql add_mp3 $sql + } errmsg ] { + + set complaint " The database did not accept your input. + See details for the error message below\n\n\t

    $errmsg" + ad_return_error "Database Error" "$complaint" + return -code return + } + } + + unset info_pairs + + append page_html "

    Completed $file_name.

    \n" + +} + +# Stuck all this here so that title wouldn't collide in the namespace + +set staging_location [ad_parameter MP3StagingLocation] +set page_title "Scanning MP3 Staging Location" +set title $page_title +set context_bar [list $title] Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/swap.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/Attic/swap.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/admin/swap.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,43 @@ +# /packages/mp3jukebox/www/admin/swap.tcl +ad_page_contract { + + Swaps current item with next item + + @author wirth@ybos.net + @creation-date 2000-03-02 + + @param mp3_id (the id of the mp3 to be swapped with the next in order) + @param playlist_id + +} { + mp3_id:naturalnum,notnull + playlist_id:naturalnum,notnull +} + +set package_id [ad_conn package_id] +#ad_require_permission $package_id mp3_modify_playlist + +db_1row get_sort_key "select sort_key from mp3_mp3_playlist_map +where playlist_id=:playlist_id and mp3_id=:mp3_id" + +if [catch { + db_exec_plsql swap_item " + begin + mp3_playlist.item_order_swap ( + playlist_id => :playlist_id, + sort_key => :sort_key + ); + end; + " +} errmsg ] { + + set complaint " The database did not accept your input. + See details for the error message below\n\n\t

    $errmsg" + ad_return_error "Database Error" "$complaint" + return -code return + +} else { + + ad_returnredirect one-playlist?[export_url_vars playlist_id] + +} \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/Attic/design.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/design.html 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,173 @@ + + + MP3 Design Document + + + +

    MP3Jukebox Design Document

    +by Jennie Kim Housman some text by Peter Vessenes +
    +MP3 Jukebox : Design Document +

    I. Essentials

    + + + +

    II. Introduction

    +This document outlines the design and use of the Ybos MP3Jukebox application, built on the ACS 4.1 platform. + +

    III. Historical Considerations

    +Small Office Pic +We like MP3s. We work together. Also, once we were in a tiny little +office, with only like 300 square feet, and we all worked at one big +table. Really! One corner of the office looked like the picture on the +right. This meant we could listen to the same stereo, (especially Abba) +without serious problems.

    +Now, we work in a large office, with multiple bays, and better lighting. +We can't listen to the same songs all the time. People like me (Peter) +get blasted out by the Abba, when it's loud enough for other people to hear. +And, my enthusiasm for Abba is fading after a few years of Dancing Queen. +

    +Now, we can each, as groups, create shared playlists, and download them +to stereos in our bays. This keeps us from being a group of people with +headphones on that never talk, and it also makes me less annoyed with +the office. + +

    IV. Competitive Analysis

    +Combine the cost of Oracle, a server, and a network topology that +doesn't mind sending out MP3s without streaming, plus ACS installation, +and you've got yourself at least 1,000 or so CDs plus 5 CD changers to +hold them. +

    +On the other hand, you can't vote on the web with your CD changers. +

    +I'd call us neck and neck with the competition. + +

    V. Design

    + +The system allows +
      +
    • Voting +
    • Playlist Creation +
    • Downloading +
    +It fits our rationality test for community applications -- you can annoy +other people with it. (If you can't annoy someone, it's not a community +application.) +

    +We don't +

      +
    • Stream +
    • keep tight controls on the MP3 files (no BFILE columns) +
    + +

    VI. API

    +Much of the API is covered in the mp3-create.sql file. The mp3 package body and the mp3_playlist package body holds all of the PL/SQL functions and procedures. +
      +
    • mp3.new: creates a mp3jukebox mp3 item +
    • mp3.delete: deletes a mp3jukebox mp3 item +
    • mp3.mark_as_deleted: marks a mp3jukebox mp3 item, without removing it from the file system +
    • mp3_playlist.new: creates a mp3jukebox playlist item +
    • mp3_playlist.delete: deletes a mp3jukebox playlist item +
    • mp3_playlist.item_add: adds a mp3jukebox mp3 item to a playlist +
    • mp3_playlist.item_remove: removes a mp3jukebox mp3 item from a playlist +
    • mp3_playlist.vote_cast: adds a vote for or against an mp3jukebox mp3 item on a playlist +
    • mp3_playlist.item_order_swap: swap the order of a mp3 on a playlist with one listed after it +
    • +
    +

    +The TCL procedures are in the /tcl/mp3-procs.tcl, /tcl/scanner-procs.tcl files. +

      +
    • mp3_search_select_sql: returns sql to perform file search according passed parameters +
    • get_list_of_mp3s: returns the list of mp3 from the approriate mp3 file location +
    • mp3_name_from_file: returns the mp3 name from the file name +
    • +
    + + +

    VII. Data Model Discussion

    +The MP3Jukebox package makes use of the ACS objects system. The creation of an mp3 item adds a row in the mp3_mp3s table as well as the acs_objects table, where the usual meta-information about this object is stored. This is also true for creation of a playlist item (that adds a row to the mp3_playlists table). +

    +Currently, only the playlists are distinguished according to the different mount instances of the mp3jukebox. This functionality is available for mp3s, however, was not utilized in this version of the application. + +

    VIII. User Interface

    +How to use it +
      +
    • Create a playlist +
    • Add some MP3s to the playlist +
    • Click the headphones +
    • Enjoy! +
    + +Clicking the headphones when they refer to a playlist will download +an m3u file. Both xmms and winamp should be able to recognize this. +You'll need to set up Netscape to deal with the .m3u files correctly; +check out www.xmms.org for more information. + +

    + +Clicking the headphones when they refer to an MP3 will download the MP3 +directly from AOLServer. We don't, for instance, stream. +

    + +The publicly accessible pages are in the root directory of the mounted instance. The administrative pages are under the root directory of the mounted instance (/root directory/admin). You must be granted admin on the node to have access to the admin pages. +

    +The public is allowed to view and download available playlists for each mount instance (playlists are mount-specific). The public is also allowed to vote for currently available mp3s on a playlist. Their votes only affect whether an mp3 is included when a playlist is played. Only administrators can remove an mp3 from a playlist. An mp3 is no longer included when a playlist is served, when the total of the votes submitted is less than or equal to the vote total (to remove an mp3), which is set by a site-wide administrator. +

    +Site-wide administrators may create and delete playlists, add and remove mp3s from playlists, choose the vote total, and add and mark_as_deleted mp3s. +Please note that currently, administrators only mark an mp3 as deleted, i.e. an mp3 is not deleted from the mp3_mp3s table, the acs_objects table, or the file system. (The PL/SQL procedure for that is avavilable +but just not used.) + + +

    IX. Configuration/Parameters

    +This package was built on the ACS 4.1 platform. +
    +During installation of a package instance, an administrator needs to set up two parameters: +
      +
    • 'MP3FileLocation,' the location of the MP3 Files on your server +
    • 'MP3StagingLocation', an open directory where MP3s will be placed before they are moved to the MP3FileLocation by the scanner. + +
    +The general concept is that the MP3StagingLocation should be world writable. +People will dump MP3s into that directory, via whatever means available. +As the scanner is run, the files will be picked up, inserted into the +database, and moved over to the MP3FileLocation. +

    +We use an ID3 scanner written in Perl to check the information in the +MP3s. If none is returned, we just insert based on the title. +

    X. Acceptance Tests

    + + +

    XI. Future Improvements/Areas of Likely Change

    +
      +
    • More highly refined permissioning system +
    • Playlist administrators and mp3 administrators? +
    • feature allowing users to "suggest" an mp3, that maybe voted into a playlist +
    • One user / one vote.. +
    • MP3s, like playlists, context-dependent (we're not sure on this one.) +
    • +
    + + +

    XII. Authors

    +Of the software +
      +
    • Titi Ala'ilima +
    • Jennie Kim Housman +
    • Peter J. Vessenes +
    • Elizabeth Wirth +
    +

    XIII. Revision History

    + + + + + + + + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/Attic/index.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/index.html 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,45 @@ + + +MP3-Jukebox + + + + +

    MP3-Jukebox

    +by Jennie Kim Housman +
    + +

    Document Overview

    + + +Requirements +
    +Design + +

    Release Notes

    +

    +The current release version is 1.0. + +

    Permissions

    +Currently, site-wide administrators are given full permission for any function in the mp3-jukebox package. Users may view, vote, and download available playlists of mp3s. Only site-wide administrators can manipulate playlists and mp3s. + +

    Installation Guide

    +After downloading this package and mounting it on the site-map, the administrator needs to do a few things before the package will work: + +
      +
    1. Create a staging directory for your MP3s. This directory should be world writeable. Users will place MP3s here to be scanned. We usually call it '/var/shared/mp3s'. +
    2. Create a final destination for your MP3s. Only nsadmin needs to be able to read / write here. This creates a semi-clean directory where the MP3s are kept, separate from the craziness of a world writeable directory. We usually place it in the servers hierarchy, but NOT in the package's directory. Currently, our final destination directory is '/web/servername/mp3_files'. +
    3. Edit the parameters for your application, and set 'MP3StagingLocation' to your staging directory's location. +
    4. Change MP3FileLocation to the final destination directory. +
    5. Place some MP3s in the staging directory. +
    6. Run the scanner from the admin directory. +
    7. Enjoy! + + + +
      +
      +Jennie Housman +
      + + Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/Attic/requirements.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/requirements.html 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,69 @@ + + + + MP3 Jukebox Package Requirements + + + + +

      MP3 Jukebox Package Requirements

      +by Elizabeth Wirth +
      +MP3 JukeBox : Requirements +

      I. Introduction

      +This document outlines the requirements for the Ybos MP3 Jukebox application built on the ACS 4.1 platform. + +

      II. Vision Statement

      +MP3 Jukebox was written to allow a community to share common playlists of MP3s, with community members able to vote to keep or remove songs from playlists. + + + +

      III. System/Application Overview

      + +

      IV. Use-cases and User-scenarios

      +The different classes of users are administrators and readers. Administrative power is currently based on site-wide administrative power. Typical user scenarios include: +
        +
      • Community members use the MP3 Jukebox to listen to a playlist or vote songs on or off of an existing playlist
      • +
      • Administrators create the playlists and add MP3s to playlists. Administrators also decide the threshold at which an MP3 is voted out of the playlist by the community.
      • +
      +For example, an administrator decides that her office needs a "Cool Office Songs" playlist. She downloads MP3s into the MP3 staging location as defined by the "MP3StagingLocation" parameter. She then scans the staging directory for new MP3s, using the link on the admin/index page. She creates a new playlist and names it "Cool Office Songs," deciding that 10 net votes against a song will remove it from the playlist. She then searches for the MP3s she wishes to add to the playlist using the search function on the one-playlist page. After choosing each song, she decides what order that song will appear on the list. When she is done, she clicks "listen to playlist" and enjoys the tunes.

      +A co-worker also enjoys the "Cool Office Songs" playlist but cannot stand "Dancing Queen" by ABBA, one of the songs on the playlist. He votes against the song and encourages 9 other officemates to do so. The song reaches its threshold at 10 net votes against, and no longer is included in the playlist. + +

      V. Related Links

      + +

      VI. Requirements

      + +

      VI.1 Data Model

      +

      10.30. Privilege +
      10.30.10 The only available privileges are admin and non-admin privileges, which currently correspond to site-wide privileges. A party can be granted "admin" permission on MP3 Jukebox. + +

      10.40 Parameters +
      10.40.10 Provide a parameter 'MP3FileLocation,' an abolute path +which indicates the location of the MP3 Files on your server. +
      10.40.20 Provide a 'MP3StagingLocation' parameter which indicates the +Open Directory where MP3s will be placed before they are moved to the MP3FileLocation by the scanner. + + +

      VI.2 General User Interface

      +

      20.10 Provide a list of available playlists with a link to listen to the playlist if it contains MP3s +
      20.20 Provide a one-item view of each playlist, including the current score of each MP3 within the playlist and links to vote for or against the song in the playlist. + +

      VI.3 Registered User Interface

      +

      30.10 Same requirements as under 20.x. + +

      VI.4 Administrator Interface

      +

      40.10 Same as under 20.x, except that voting si only available on the non-administration pages. +
      40.20 Provide links to recently uploaded MP3s +
      40.30 Provide links to add or delete MP3s or Playlists +
      40.40 On one-playlist page, provide links to change the order of MP3s within a playlist or to forcibly remove an MP3 from a playlist (as opposed to voting for its removal). +
      40.50 Provide a link to scan the staging location (see parameters) for new MP3s. + +

      VI.5 Template Administration

      + +

      VI.6 Additional Requirements

      + +
      + +
      + + \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/ybos-sad-2.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/Attic/ybos-sad-2.jpg,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/ybos_office_80_60.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/doc/Attic/ybos_office_80_60.jpg,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/images/delete.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/images/Attic/delete.gif,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/images/frowney_face.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/images/Attic/frowney_face.gif,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/images/headphones-16.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/images/Attic/headphones-16.gif,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/images/smiley_face.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/images/Attic/smiley_face.gif,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/m3u/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/m3u/Attic/index.vuh,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/m3u/index.vuh 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,24 @@ +# This file will process all m3u requests + + +set path_info [ad_conn path_info] + +# assume we get playlistid/playlist_name.m3u as the path + +set playlist_id [lindex [split $path_info /] 0] + +db_1row playlist_threshold "select remove_threshold from mp3_playlists where playlist_id=:playlist_id" + +db_foreach mp3_list "select m.mp3_id, s.title, m.total from mp3_mp3_playlist_map_view m, mp3_mp3s_not_deleted s + where m.playlist_id = :playlist_id + and s.mp3_id = m.mp3_id + and m.total > :remove_threshold + order by m.sort_key + + " { + append page_text "http://jk30.ybos.net/mp3/mp3s/$mp3_id/$title.mp3\n" + } if_no_rows { + set page_text "" + } + +ns_return 200 audio/x-mpegurl $page_text Index: openacs-4/contrib/obsolete-packages/mp3jukebox/www/mp3s/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3jukebox/www/mp3s/Attic/index.vuh,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/mp3jukebox/www/mp3s/index.vuh 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,14 @@ +# This file will process all mp3 requests + +set path_info [ad_conn path_info] + +# assume we get mp3id/mp3title.mp3 as the path + +set mp3_id [lindex [split $path_info /] 0] + +set file_path "[ad_parameter MP3FileLocation]/[db_string get_file_location " + select file_path from mp3_mp3s where mp3_id = :mp3_id +"]" + + +ns_returnfile 200 audio/mpeg $file_path Index: openacs-4/contrib/obsolete-packages/photo-album-lite/photo-album-lite.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/photo-album-lite.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/photo-album-lite.info 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,97 @@ + + + + + Photo Album Lite + Photo Album Lites + f + + + + oracle + postgresql + + Andrew Grumet + A full-featured, easy-to-use photo storage and display application. + 2001-02-21 + ArsDigita Corporation + Photo Album Lite is a simple application for storing photo files. Users can upload multiple photos and ZIP archives at a time and organize them into folders. Proper configuration of ImageMagick and Intermedia are assumed. For more information, please install the package and point your browser to /doc/photo-album-lite. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/cleanup-failed-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/cleanup-failed-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/cleanup-failed-drop.sql 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,51 @@ +-- Run this when dropping fails due to integrity constraints. +-- This script destroys undeleted data. + +----- PHOTOS ----- +create table pl_photos as + select object_id as photo_id from acs_objects where object_type = 'pl_photo'; + +declare + v_gc_installed_p integer; + cursor cur is + select photo_id as id from pl_photos; +begin + select count(1) into v_gc_installed_p + from user_tables where table_name = 'GENERAL_COMMENTS'; + for photo in cur loop + if v_gc_installed_p = 1 then + execute immediate 'begin + for message in (select comment_id as id from general_comments + where object_id = ' || photo.id || ') loop + acs_message.delete(message.id); + end loop; +end;'; + end if; + delete from acs_permissions where object_id = photo.id; + acs_object.delete(photo.id); + end loop; + acs_object_type.drop_type('pl_photo'); +end; +/ +show errors + +drop table pl_photos; + +----- FOLDERS ----- +create table pl_folders as + select object_id as folder_id from acs_objects where object_type = 'pl_folder'; + +declare + cursor cur is + select folder_id as id from pl_folders; +begin + for folder in cur loop + delete from acs_permissions where object_id = folder.id; + acs_object.delete(folder.id); + end loop; + acs_object_type.drop_type('pl_folder'); +end; +/ +show errors + +drop table pl_folders; Index: openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-create.sql 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,164 @@ +-- +-- $Id: photo-album-lite-create.sql,v 1.1 2001/04/20 20:51:11 donb Exp $ +-- +-- We are going to subclass acs_object as opposed to using +-- the content repository. + +create table pl_folders ( + folder_id integer + constraint pl_folders_id_nn + not null + constraint pl_folders_pk + primary key + constraint pl_folders_obj_fk + references acs_objects(object_id), + title varchar(100) + constraint pl_folders_title_nn + not null, + descr varchar(4000), + default_exp_date date, + default_prefix varchar(250), + deleted_p char(1) default 'f' + constraint pl_folders_deleted_p_ck + check (deleted_p in ('t','f')) +); + +create table pl_photos ( + photo_id integer + constraint pl_photos_id_nn + not null + constraint pl_photos_pk + primary key + constraint pl_photos_obj_fk + references acs_objects(object_id), + folder_id integer + constraint pl_photos_folder_nn + not null + constraint pl_photos_folder_fk + references pl_folders, + exposure_date date, + sort_n integer + constraint pl_photos_sort_nn + not null, + caption varchar(3000), + client_filename varchar(256) + constraint pl_photos_file_nn + not null, + file_extension varchar(4) + constraint pl_photos_file_xtn_nn + not null, + thumb_width integer, + thumb_height integer, + thumb_kbytes integer, + med_width integer, + med_height integer, + med_kbytes integer, + orig_width integer, + orig_height integer, + orig_kbytes integer, + indexable_stuff varchar(4000), + deleted_p char(1) default 'f' + constraint pl_photos_deleted_p_ck + check (deleted_p in ('t','f')) +); + +-- we use this temp table to avoid the "table is mutating" problem +-- when re-calculating the sort_n's after a photo is deleted. +create table pl_reshuffle_queue ( + folder_id integer +); + +-- We use this sequence to make sure we can give +-- photos a unique sort_n when we move them into +-- a new folder. We assume no folder will have +-- more than a million photos +create sequence pl_moved_photo_sort_n_seq start with 1000000; + +-- object system support + +-- I. photos + +begin + acs_object_type.create_type ( + supertype => 'acs_object', + object_type => 'pl_photo', + pretty_name => 'Photo', + pretty_plural => 'Photos', + table_name => 'PL_PHOTOS', + id_column => 'PHOTO_ID' + ); +end; +/ +show errors; + +-- II. folders + +begin + acs_object_type.create_type ( + supertype => 'acs_object', + object_type => 'pl_folder', + pretty_name => 'Folder', + pretty_plural => 'Folders', + table_name => 'PL_FOLDERS', + id_column => 'FOLDER_ID' + ); +end; +/ +show errors; + +@@ photo-album-lite-views +@@ photo-album-lite-plsql +@@ photo-album-lite-triggers + +create index pl_photo_idx +on pl_photos(indexable_stuff) +indextype is ctxsys.context; + +prompt ** +prompt ** Setting up search... +prompt ** NOTE: this requires that you grant the execute privilege +prompt ** on ctx_ddl to your server user. +prompt ** For more information see +prompt ** @yourserver/packages/photo-album-lite/sql/photo-album-lite-create.sql +prompt ** +prompt ** Don't worry if this fails...the package will still work just fine +prompt ** except that the search index will not be rebuilt automatically. +prompt ** + +-- keep this index in sync with a dbms_job +-- WARNING: you need to explicitly grant execute +-- privileges on ctx_ddl to the aolserver database user +-- for this to work!!!! +-- +-- Here's how: +-- +-- 1. log in to sql*plus as ctxsys +-- 2. SQL> grant execute on ctx_ddl to yourservicename; +-- + +-- this table should have just one row +-- to hold the dbms job for rebuilding the +-- search index. +create table pl_jobs ( + job integer not null primary key +); + +create or replace procedure pl_rebuild_idx +is +begin + ctx_ddl.sync_index('pl_photo_idx'); +end; +/ +show errors; + +variable pl_rebuild_idx_job number; +begin + dbms_job.submit(:pl_rebuild_idx_job, + 'pl_rebuild_idx;', + interval => 'sysdate + 1/6'); + insert into pl_jobs values (:pl_rebuild_idx_job); +end; +/ +show errors; +print pl_rebuild_idx_job + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-drop.sql 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,99 @@ +-- +-- $Id: photo-album-lite-drop.sql,v 1.1 2001/04/20 20:51:11 donb Exp $ +-- + +prompt ** +prompt ** NOTE: This script will fail if you did not delete all photos and +prompt ** folders on your system. +prompt ** +prompt ** You can recover from a failed drop attempt by running this script: +prompt ** @yourserver/packages/photo-album-lite/sql/cleanup-failed-drop.sql +prompt ** + +-- remove all rows associated with deleted objects. +declare + v_gc_installed_p integer; + cursor cur1 is + select photo_id from pl_photos + where deleted_p = 't'; + cursor cur2 is + select folder_id from pl_folders + where deleted_p = 't'; + v_id integer; +begin + select count(1) into v_gc_installed_p + from user_tables where table_name = 'GENERAL_COMMENTS'; + + open cur1; + loop + fetch cur1 into v_id; + exit when cur1%NOTFOUND; + delete from acs_permissions where object_id = v_id; + if v_gc_installed_p = 1 then + execute immediate 'begin + for message in (select comment_id as id from general_comments + where object_id = ' || v_id || ') loop + acs_message.delete(message.id); + end loop; +end;'; + end if; + acs_object.delete (v_id); + end loop; + close cur1; + + open cur2; + loop + fetch cur2 into v_id; + exit when cur2%NOTFOUND; + delete from acs_permissions where object_id = v_id; + acs_object.delete (v_id); + end loop; + +end; +/ +show errors + +-- this will fail if you haven't deleted +-- all photos and folders. +begin + acs_object_type.drop_type ('pl_photo'); + acs_object_type.drop_type ('pl_folder'); +end; +/ +show errors + +drop procedure pl_rebuild_idx; + +-- shut off the dbms_job +declare + cursor cur1 is + select job from pl_jobs; + v_job integer; +begin + open cur1; + loop + fetch cur1 into v_job; + exit when cur1%NOTFOUND; + dbms_job.remove(v_job); + end loop; + close cur1; +end; +/ +show errors + +drop table pl_jobs; +drop table pl_reshuffle_queue; + +drop function pl_photo_date_format; +drop function pl_relative_date; + +drop view pl_v_photos; +drop view pl_v_folders; + +drop table pl_photos; +drop table pl_folders; + +drop package pl_photo; +drop package pl_folder; + +drop sequence pl_moved_photo_sort_n_seq; Index: openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-plsql.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-plsql.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-plsql.sql 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,427 @@ +-- +-- $Id: photo-album-lite-plsql.sql,v 1.1 2001/04/20 20:51:11 donb Exp $ +-- + +set define off; + +-- 1. photos + +create or replace package pl_photo +as + function new ( + photo_id in pl_photos.photo_id%TYPE default null, + folder_id in pl_photos.folder_id%TYPE default null, + exposure_date in pl_photos.exposure_date%TYPE default null, + caption in pl_photos.caption%TYPE default null, + client_filename in pl_photos.client_filename%TYPE default null, + file_extension in pl_photos.file_extension%TYPE default null, + object_type in acs_object_types.object_type%TYPE default 'pl_photo', + creation_date in acs_objects.creation_date%TYPE + default sysdate, + creation_user in acs_objects.creation_user%TYPE + default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) return pl_photos.photo_id%TYPE; + + function next_photo_id ( + folder_id in pl_folders.folder_id%TYPE, + sort_n in pl_photos.sort_n%TYPE, + party_id in parties.party_id%TYPE + default acs.magic_object_id('the_public'), + privilege in acs_privileges.privilege%TYPE default 'read' + ) return pl_photos.photo_id%TYPE; + + function prev_photo_id ( + folder_id in pl_folders.folder_id%TYPE, + sort_n in pl_photos.sort_n%TYPE, + party_id in parties.party_id%TYPE + default acs.magic_object_id('the_public'), + privilege in acs_privileges.privilege%TYPE default 'read' + ) return pl_photos.photo_id%TYPE; + + function exp_date ( + photo_id in pl_photos.photo_id%TYPE + ) return date; + + function folder_title ( + photo_id in pl_photos.photo_id%TYPE + ) return pl_folders.title%TYPE; + + function name ( + photo_id in pl_photos.photo_id%TYPE + ) return pl_photos.client_filename%TYPE; + + function default_name ( + photo_id in pl_photos.photo_id%TYPE + ) return pl_photos.client_filename%TYPE; + + procedure apply_default_name ( + photo_id in pl_photos.photo_id%TYPE + ); + + procedure delete ( + photo_id in pl_photos.photo_id%TYPE + ); +end pl_photo; +/ +show errors + +create or replace package body pl_photo +as + -- Note: you must call pl_reshuffle within the same transaction. + function new ( + photo_id in pl_photos.photo_id%TYPE default null, + folder_id in pl_photos.folder_id%TYPE default null, + exposure_date in pl_photos.exposure_date%TYPE default null, + caption in pl_photos.caption%TYPE default null, + client_filename in pl_photos.client_filename%TYPE default null, + file_extension in pl_photos.file_extension%TYPE default null, + object_type in acs_object_types.object_type%TYPE default 'pl_photo', + creation_date in acs_objects.creation_date%TYPE + default sysdate, + creation_user in acs_objects.creation_user%TYPE + default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) return pl_photos.photo_id%TYPE + is + v_photo_id integer; + begin + v_photo_id := acs_object.new ( + object_id => photo_id, + object_type => object_type, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + context_id => context_id + ); + + insert into pl_photos ( + photo_id, + folder_id, + exposure_date, + sort_n, + caption, + client_filename, + file_extension ) + values ( + v_photo_id, + folder_id, + exposure_date, + v_photo_id, + caption, + client_filename, + file_extension ); + + acs_permission.grant_permission ( + object_id => v_photo_id, + grantee_id => creation_user, + privilege => 'admin' + ); + + return v_photo_id; + end new; + + function next_photo_id ( + folder_id in pl_folders.folder_id%TYPE, + sort_n in pl_photos.sort_n%TYPE, + party_id in parties.party_id%TYPE + default acs.magic_object_id('the_public'), + privilege in acs_privileges.privilege%TYPE default 'read' + ) return pl_photos.photo_id%TYPE + is + v_photo_id pl_photos.photo_id%TYPE; + begin + select p.photo_id into v_photo_id + from pl_v_photos p + where p.folder_id = pl_photo.next_photo_id.folder_id + and p.sort_n in (select min(sort_n) + from pl_v_photos p2 + where p2.folder_id = pl_photo.next_photo_id.folder_id + and p2.sort_n > pl_photo.next_photo_id.sort_n + and acs_permission.permission_p(p2.photo_id, + pl_photo.next_photo_id.party_id, + pl_photo.next_photo_id.privilege) = 't'); + return v_photo_id; + end next_photo_id; + + function prev_photo_id ( + folder_id in pl_folders.folder_id%TYPE, + sort_n in pl_photos.sort_n%TYPE, + party_id in parties.party_id%TYPE + default acs.magic_object_id('the_public'), + privilege in acs_privileges.privilege%TYPE default 'read' + ) return pl_photos.photo_id%TYPE + is + v_photo_id pl_photos.photo_id%TYPE; + begin + select p.photo_id into v_photo_id + from pl_v_photos p + where p.folder_id = pl_photo.prev_photo_id.folder_id + and p.sort_n in (select max(sort_n) + from pl_v_photos p2 + where p2.folder_id = pl_photo.prev_photo_id.folder_id + and p2.sort_n < pl_photo.prev_photo_id.sort_n + and acs_permission.permission_p(p2.photo_id, + pl_photo.prev_photo_id.party_id, + pl_photo.prev_photo_id.privilege) = 't'); + return v_photo_id; + end prev_photo_id; + + function exp_date ( + photo_id in pl_photos.photo_id%TYPE + ) return date + is + v_exp_date date; + begin + select exposure_date into v_exp_date + from pl_photos p + where p.photo_id = pl_photo.exp_date.photo_id; + + return v_exp_date; + end exp_date; + + function folder_title ( + photo_id in pl_photos.photo_id%TYPE + ) return pl_folders.title%TYPE + is + v_title pl_folders.title%TYPE; + begin + select f.title into v_title + from pl_folders f, pl_photos p + where p.photo_id = pl_photo.folder_title.photo_id + and f.folder_id = p.folder_id; + + return v_title; + end folder_title; + + function name ( + photo_id in pl_photos.photo_id%TYPE + ) return pl_photos.client_filename%TYPE + is + v_client_filename pl_photos.client_filename%TYPE; + begin + select client_filename into v_client_filename + from pl_photos + where photo_id = pl_photo.name.photo_id; + return 'Photo: ' || v_client_filename; + end; + + function default_name ( + photo_id in pl_photos.photo_id%TYPE + ) return pl_photos.client_filename%TYPE + is + v_client_filename pl_photos.client_filename%TYPE; + begin + select decode(f.default_prefix,NULL,p.client_filename,f.default_prefix || '-' || to_char(p.sort_n,'TM') || p.file_extension) into v_client_filename + from pl_photos p, + pl_folders f + where p.photo_id = pl_photo.default_name.photo_id + and p.folder_id = f.folder_id; + + return v_client_filename; + end; + + procedure apply_default_name ( + photo_id in pl_photos.photo_id%TYPE + ) + is + v_client_filename pl_photos.client_filename%TYPE; + begin + select pl_photo.default_name(pl_photo.apply_default_name.photo_id) + into v_client_filename from dual; + update pl_photos + set client_filename = v_client_filename + where photo_id = pl_photo.apply_default_name.photo_id; + end apply_default_name; + + procedure delete ( + photo_id in pl_photos.photo_id%TYPE + ) + is + begin + delete from pl_photos + where photo_id = pl_photo.delete.photo_id; + end delete; + +end pl_photo; +/ +show errors; + +-- 2. folders + +create or replace package pl_folder +as + function new ( + folder_id in pl_folders.folder_id%TYPE default null, + title in pl_folders.title%TYPE default null, + descr in pl_folders.descr%TYPE default null, + default_exp_date in pl_folders.default_exp_date%TYPE default null, + default_prefix in pl_folders.default_prefix%TYPE default null, + object_type in acs_object_types.object_type%TYPE default 'pl_folder', + creation_date in acs_objects.creation_date%TYPE + default sysdate, + creation_user in acs_objects.creation_user%TYPE + default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) return pl_folders.folder_id%TYPE; + + function photo_count ( + folder_id in pl_folders.folder_id%TYPE + ) return integer; + + function name ( + folder_id in pl_folders.folder_id%TYPE + ) return pl_folders.title%TYPE; + + procedure delete ( + folder_id in pl_folders.folder_id%TYPE + ); + +end pl_folder; +/ +show errors + +create or replace package body pl_folder +as + function new ( + folder_id in pl_folders.folder_id%TYPE default null, + title in pl_folders.title%TYPE default null, + descr in pl_folders.descr%TYPE default null, + default_exp_date in pl_folders.default_exp_date%TYPE default null, + default_prefix in pl_folders.default_prefix%TYPE default null, + object_type in acs_object_types.object_type%TYPE default 'pl_folder', + creation_date in acs_objects.creation_date%TYPE + default sysdate, + creation_user in acs_objects.creation_user%TYPE + default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) return pl_folders.folder_id%TYPE + is + v_folder_id integer; + begin + v_folder_id := acs_object.new ( + object_id => folder_id, + object_type => object_type, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + context_id => context_id + ); + + insert into pl_folders ( + folder_id, + title, + descr, + default_exp_date, + default_prefix + ) values ( + v_folder_id, + title, + descr, + default_exp_date, + default_prefix ); + + acs_permission.grant_permission ( + object_id => v_folder_id, + grantee_id => creation_user, + privilege => 'admin' + ); + + return v_folder_id; + + end new; + + function photo_count ( + folder_id in pl_folders.folder_id%TYPE + ) return integer + is + v_photo_count integer; + begin + select count(photo_id) into v_photo_count + from pl_v_photos + where folder_id = pl_folder.photo_count.folder_id; + + return v_photo_count; + end photo_count; + + function name ( + folder_id in pl_folders.folder_id%TYPE + ) return pl_folders.title%TYPE + is + v_title pl_folders.title%TYPE; + begin + select title into v_title + from pl_folders + where folder_id = pl_folder.name.folder_id; + return 'Folder: ' || v_title; + end; + + procedure delete ( + folder_id in pl_folders.folder_id%TYPE + ) + is + begin + delete from pl_folders where folder_id = pl_folder.delete.folder_id; + end delete; + +end pl_folder; +/ +show errors; + +create or replace function pl_photo_date_format ( + date_to_format in date +) +return varchar +is +begin + if date_to_format is null then + return null; + end if; + + return to_char(date_to_format,'fmDD') || ' ' || to_char(date_to_format,'fmMon') || ' ' || to_char(date_to_format,'YYYY'); +end pl_photo_date_format; +/ +show errors; + +create or replace function pl_relative_date ( + the_date date +) +return varchar +is +begin + if trunc(the_date) = trunc(sysdate) then + return to_char(the_date,'fmHH:fmMI:SSam'); + else + return pl_photo_date_format(the_date); + end if; +end pl_relative_date; +/ +show errors; + +create or replace procedure pl_reshuffle +is + cursor cur is + select distinct folder_id as id + from pl_reshuffle_queue; +begin + for folder in cur loop + for photo in (select p.*, + rownum as row_num + from (select photo_id as id + from pl_v_photos + where folder_id = folder.id + order by sort_n) p) loop + update pl_photos set sort_n = photo.row_num where photo_id = photo.id; + end loop; + delete from pl_reshuffle_queue + where folder_id = folder.id; + end loop; +end pl_reshuffle; +/ +show errors; + +set define on; Index: openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-triggers.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-triggers.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-triggers.sql 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,67 @@ +-- +-- $Id: photo-album-lite-triggers.sql,v 1.1 2001/04/20 20:51:11 donb Exp $ +-- + +create or replace trigger pl_photos_ins_update_tr +before insert or update on pl_photos +for each row +declare + v_creation_user integer; + v_email varchar(100); + v_sort_n integer; +begin + select creation_user into v_creation_user from acs_objects where object_id = :new.photo_id; + select email into v_email from parties where party_id = v_creation_user; + + :new.indexable_stuff := :new.client_filename || ' ' || :new.caption || ' ' || person.name(v_creation_user) || ' ' || v_email; + + if :old.folder_id is null or + :new.folder_id != :old.folder_id then + -- new photo or moved photo + insert into pl_reshuffle_queue (folder_id) + values (:new.folder_id); + + if :old.folder_id is not null then + -- moved photo + insert into pl_reshuffle_queue (folder_id) + values (:old.folder_id); + + -- Assign a large, unique sort_n to the moved photo. + -- Call pl_reshuffle within the transaction to bump it back down. + select pl_moved_photo_sort_n_seq.nextval into v_sort_n from dual; + :new.sort_n := v_sort_n; + + end if; + + end if; + +end pl_photos_ins_update_tr; +/ +show errors + +create or replace trigger pl_photos_post_update_tr +after update on pl_photos +for each row +begin + update acs_objects + set last_modified = sysdate, + context_id = :new.folder_id + where object_id = :new.photo_id; + + if :new.deleted_p = 't' then + insert into pl_reshuffle_queue (folder_id) + values (:new.folder_id); + end if; +end pl_photos_post_update_tr; +/ +show errors + +create or replace trigger pl_folders_update_tr +after update on pl_folders +for each row +begin + update acs_objects set last_modified = sysdate + where object_id = :new.folder_id; +end pl_folders_update_tr; +/ +show errors Index: openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-views.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-views.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/photo-album-lite-views.sql 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,27 @@ +-- +-- $Id: photo-album-lite-views.sql,v 1.1 2001/04/20 20:51:11 donb Exp $ +-- + +create or replace view pl_v_photos +as + select p.*, + o.creation_date, + o.creation_user, + o.context_id, + o.last_modified + from pl_photos p, + acs_objects o + where p.photo_id = o.object_id + and p.deleted_p = 'f'; + +create or replace view pl_v_folders +as + select f.*, + o.creation_date, + o.creation_user, + o.context_id, + o.last_modified + from pl_folders f, + acs_objects o + where f.folder_id = o.object_id + and f.deleted_p = 'f'; Index: openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/upgrade-4.0.1-4.1.1b.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/upgrade-4.0.1-4.1.1b.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/upgrade-4.0.1-4.1.1b.sql 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,73 @@ +-- Help the object system construct pretty names +update acs_object_types +set name_method = 'pl_photo.name' +where object_type = 'pl_photo'; + +update acs_object_types +set name_method = 'pl_folder.name' +where object_type = 'pl_folder'; + +-- Grant 'admin' privilege to the creater of each +-- pl_photo and pl_folder. +begin + for folder in (select p.folder_id as id, + o.creation_user + from pl_folders p, + acs_objects o + where p.folder_id = o.object_id) loop + acs_permission.grant_permission ( + object_id => folder.id, + grantee_id => folder.creation_user, + privilege => 'admin' + ); + end loop; + + for photo in (select p.photo_id as id, + o.creation_user + from pl_photos p, + acs_objects o + where p.photo_id = o.object_id) loop + acs_permission.grant_permission ( + object_id => photo.id, + grantee_id => photo.creation_user, + privilege => 'admin' + ); + end loop; +end; +/ +show errors + +-- All photos in a folder +-- get this exposure date by default +alter table pl_folders add (default_exp_date date); + +-- Helpful for over-writing computer-generated names. +alter table pl_folders add (default_prefix varchar(250)); + +-- Deprecated table. +drop table pl_deleted_photos; + +-- we use this temp table to avoid the "table is mutating" problem +-- when re-calculating the sort_n's after a photo is deleted. +create table pl_reshuffle_queue ( + folder_id integer +); + +-- We use this sequence to make sure we can give +-- photos a unique sort_n when we move them into +-- a new folder. We assume no folder will have +-- more than a million photos +create sequence pl_moved_photo_sort_n_seq start with 1000000; + +@@ photo-album-lite-plsql +@@ photo-album-lite-triggers +@@ photo-album-lite-views + +-- Fix any sort bugs in previous installation +begin + insert into pl_reshuffle_queue (folder_id) + select folder_id from pl_v_folders; + pl_reshuffle; +end; +/ +show errors Index: openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/upgrade-4.0.1a-4.0.1b.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/upgrade-4.0.1a-4.0.1b.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/upgrade-4.0.1a-4.0.1b.sql 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,26 @@ +-- +-- upgrade-4.0.1a-4.0.1b.sql +-- +-- aegrumet@arsdigita.com +-- +-- create pa_jobs table and put an entry in it + +-- this table should have just one row +-- to hold the dbms job for rebuilding the +-- search index. +create table pa_jobs ( + job integer not null primary key +); + +declare + cursor cur is + select job + from user_jobs + where what = 'pa_rebuild_idx;'; +begin + for job in cur loop + insert into pa_jobs (job) values (job.job); + end loop; +end; +/ +show errors Index: openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/upgrade-4.0.1b-4.0.1.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/upgrade-4.0.1b-4.0.1.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/sql/oracle/upgrade-4.0.1b-4.0.1.sql 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,189 @@ +-- +-- upgrade-4.0.1b-4.0.1.sql +-- +-- Upgrades from the beta. +-- We had to rename everything from pa_* to pl_* +-- to avoid conflicts with the photo-album package. +-- This is pretty heavy-duty stuff. +-- +-- There is also some code at the bottom to remap the sort_n's +-- to always start at 1 for each folder. + +-- plan: +-- 1. disable object_type fk constraint +-- 2. rename the object type for each of pa_photo and pa_folder: +-- a. update these columns in acs_object_types +-- object_type +-- table_name +-- b. update acs_objects table +-- 3. enable the object_type fk constraint +-- 4. rename the pa_photo and pa_folder tables +-- 5. rename all the constraints by dropping and adding them +-- 6. drop the index rebuild job +-- 7. drop old views/triggers/plsql +-- 8. re-run all views/triggers/plsql +-- 9. add the index rebuild job + +-- AND HERE WE GO... + +alter table acs_objects disable constraint acs_objects_object_type_fk; + +update acs_object_types + set object_type = 'pl_photo', + table_name = 'PL_PHOTOS' + where object_type = 'pa_photo'; + +update acs_objects + set object_type = 'pl_photo' + where object_type = 'pa_photo'; + +update acs_object_types + set object_type = 'pl_folder', + table_name = 'PL_FOLDERS' + where object_type = 'pa_folder'; + +update acs_objects + set object_type = 'pl_folder' + where object_type = 'pa_folder'; + +alter table acs_objects enable constraint acs_objects_object_type_fk; + +alter table pa_photos rename to pl_photos; +alter table pa_folders rename to pl_folders; + +alter table pl_photos drop constraint pa_photos_id_nn; +alter table pl_photos drop constraint pa_photos_pk; +alter table pl_photos drop constraint pa_photos_obj_fk; +alter table pl_photos drop constraint pa_photos_folder_nn; +alter table pl_photos drop constraint pa_photos_folder_fk; +alter table pl_photos drop constraint pa_photos_sort_nn; +alter table pl_photos drop constraint pa_photos_file_nn; +alter table pl_photos drop constraint pa_photos_file_xtn_nn; +alter table pl_photos drop constraint pa_photos_deleted_p_ck; +alter table pl_photos drop constraint pa_photos_folder_sort_un; +alter table pl_folders drop constraint pa_folders_id_nn; +alter table pl_folders drop constraint pa_folders_pk; +alter table pl_folders drop constraint pa_folders_obj_fk; +alter table pl_folders drop constraint pa_folders_title_nn; +alter table pl_folders drop constraint pa_folders_deleted_p_ck; + +alter table pl_folders add constraint pl_folders_pk + primary key (folder_id); +alter table pl_folders add constraint pl_folders_obj_fk + foreign key (folder_id) references acs_objects(object_id); +alter table pl_folders add constraint pl_folders_title_nn + check (title is not null); +alter table pl_folders add constraint pl_folders_deleted_p_ck + check (deleted_p in ('t','f')); + +alter table pl_photos add constraint pl_photos_pk + primary key (photo_id); +alter table pl_photos add constraint pl_photos_obj_fk + foreign key (photo_id) references acs_objects(object_id); +alter table pl_photos add constraint pl_photos_folder_nn + check (folder_id is not null); +alter table pl_photos add constraint pl_photos_folder_fk + foreign key (folder_id) references pl_folders; +alter table pl_photos add constraint pl_photos_sort_nn + check (sort_n is not null); +alter table pl_photos add constraint pl_photos_file_nn + check (client_filename is not null); +alter table pl_photos add constraint pl_photos_file_xtn_nn + check (file_extension is not null); +alter table pl_photos add constraint pl_photos_deleted_p_ck + check (deleted_p in ('t','f')); + +declare + cursor cur1 is + select job from pa_jobs; + v_job integer; +begin + open cur1; + loop + fetch cur1 into v_job; + exit when cur1%NOTFOUND; + dbms_job.remove(v_job); + end loop; + close cur1; +end; +/ +show errors + +delete from pa_jobs; + +alter table pa_jobs rename to pl_jobs; + +drop procedure pa_rebuild_idx; +drop package pa_photo; +drop package pa_folder; +drop function pa_photo_date_format; +drop function pa_relative_date; +drop trigger pa_photos_ins_update_tr; +drop trigger pa_photos_post_update_tr; +drop trigger pa_folders_update_tr; +drop view pa_v_photos; +drop view pa_v_folders; + +-- we use this temp table to avoid the "table is mutating" problem +-- when re-calculating the sort_n's after a photo is deleted. + +create table pl_deleted_photos ( + folder_id integer + constraint pl_deleted_photos_folder_nn + not null, + sort_n integer + constraint pl_delete_photos_sort_n_nn + not null, + swept_p char(1) default 'f' + constraint pl_deleted_photos_swept_p_ck + check (swept_p in ('t','f')) +); + +@@ photo-album-lite-views +@@ photo-album-lite-plsql +@@ photo-album-lite-triggers + +alter index pa_photo_idx rename to pl_photo_idx; + +create or replace procedure pl_rebuild_idx +is +begin + ctx_ddl.sync_index('pl_photo_idx'); +end; +/ +show errors; + +variable pl_rebuild_idx_job number; +begin + dbms_job.submit(:pl_rebuild_idx_job, + 'pl_rebuild_idx;', + interval => 'sysdate + 1/6'); + insert into pl_jobs values (:pl_rebuild_idx_job); +end; +/ +show errors; +print pl_rebuild_idx_job + +-- Make sort_n start at 1 for each folder so +-- that we can easily display "Photo 3 of 12". +-- Since we preserve the original order +-- we don't need to defer the unique constraint +-- on (sort_n,folder_id). +declare + v_count integer; + cursor cur is + select folder_id as id + from pl_folders; +begin + for folder in cur loop + v_count := 0; + for photo in (select photo_id as id from pl_v_photos where folder_id = folder.id order by sort_n) loop + v_count := v_count + 1; + update pl_photos set sort_n = v_count + where photo_id = photo.id; + end loop; + end loop; +end; +/ +show errors + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/tcl/bulk-upload-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/tcl/bulk-upload-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/tcl/bulk-upload-procs.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,60 @@ +ad_library { + @author Andrew Grumet + @cvs-id: $Id: bulk-upload-procs.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ +} + +ad_proc pl_bulk_insert { + {-use_default_date 0} + {-use_default_prefix 0} + folder_id + server_tempnam +} { + + Upload a zip file full of pictures. + Shamelessly copied from Wimpy Point. + Thank You Nuno Santos . + +} { + # Step 1: Create temp directory. + + set tmp_dir [file dirname $server_tempnam] + append tmp_dir "/[ns_mktemp "$folder_id-XXXXXX"]" + if [catch { ns_mkdir $tmp_dir } errMsg ] { + ns_log Notice "photo-album-lite: Error creating directory $tmp_dir: $errMsg" + return -code error "photo-album-lite: there was an error unzipping your file. Please contact the server administrator for assistance." + } + + # Step 2: Unzip the archive + + set unzip_home [ad_parameter PathToUnzip photo-album-lite /usr/bin] + + # unzip -C -j zipfile *.gif *.jpg -d directory + # only extract GIFs and JPGs (-C=case-insensitive) into directory; + # don't create subdirs (-j); + # ignore "caution: filename not matched" unzip message + # (if one of the formats is not present in the archive) + + if { [catch { exec $unzip_home/unzip -C -j $server_tempnam *.gif *.jpg -d $tmp_dir } errMsg] && ![regexp {caution: filename not matched} $errMsg]} { + ns_log Notice "photo-album-lite: Error unzipping $server_tempnam: $errMsg" + file delete -force $tmp_dir + return -code error "photo-album-lite: there was an error unzipping your file. Please contact the server administrator for assistance." + } + + # Step 3: use glob to get a list of files in the directory + set file_exts {[Gg][Ii][Ff],[Jj][Pp][Gg]} + set image_file_list [lsort [glob -nocomplain $tmp_dir/*.{$file_exts}]] + + # Step 4: loop through the files and do the insert + + foreach image_file $image_file_list { + if [catch {pl_photo_insert -use_default_date $use_default_date -use_default_prefix $use_default_prefix $folder_id $image_file} errMsg] { + global errorInfo + return -code error "photo-album-lite: sorry, there was an error: $errMsg" + } + } + + # Step 5: clean up + + file delete -force $tmp_dir + +} Index: openacs-4/contrib/obsolete-packages/photo-album-lite/tcl/photo-album-lite-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/tcl/photo-album-lite-init.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/tcl/photo-album-lite-init.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,248 @@ +ad_library { + + Photo album helper procedures. + @author Andrew Grumet + @creation-date 12 Dec 2000 + @cvs-id: $Id: photo-album-lite-init.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + +} + +ad_proc pl_photo_cleanup_filename { + filename +} { +
      +    # Regsub out spaces and other characters from the client filename.
      +    
      +} { + set root [file rootname $filename] + regsub -all {[^0-9a-zA-Z_\-]} $root {} result + return "$result[file extension $filename]" +} + +ad_proc pl_photo_commentable_p { + photo_id +} { +
      +    # Returns 1 if both general comments is installed
      +    # and GeneralCommentsEnabledP is 1, otherwise returns 0.
      +    # HINT: This would be a good place to add fancy permission checks.
      +    
      +} { + + if ![ad_parameter GeneralCommentsEnabledP photo-album-lite pl_photos] { + # general-comments is disabled for this package + return 0 + } + + if [empty_string_p [namespace eval :: {info procs general_comments_get_comments}]] { + # general-comments is not installed + return 0 + } + + # If we made it here, comments are okay. + return 1 +} + +ad_proc pl_base_directory { + {-read_only:boolean} + photo_id +} { +
      +    # returns a destination directory for this photo.
      +    # creates the directory if necessary
      +    
      +} { + + regexp {(.*)/[^/]+} [ns_info pageroot] match server_base + set pl_photo_base $server_base/[ad_parameter PhotoBaseDirectory photo-album-lite pl_photos] + set first_subdir $pl_photo_base/[expr $photo_id % 10] + set second_subdir $first_subdir/[expr [expr $photo_id / 10] % 10] + + if { !$read_only_p } { + foreach dir [list $pl_photo_base $first_subdir $second_subdir] { + if ![file exists $dir] { + ns_mkdir $dir + } + } + } + return $second_subdir +} + +proc_doc pl_delete_photo photo_id { +
      +    # Deletes a photo.  First, flag the table row as deleted,
      +    # then nuke the associated files.
      +    
      +} { + + db_transaction { + + db_dml pl_photo_delete { + update pl_photos + set deleted_p = 't' + where photo_id in ( select photo_id + from pl_v_photos + where photo_id = :photo_id ) + } + + set n_deleted [db_resultrows] + + # note this will be somewhat inefficient for deleting an + # entire folder. + db_exec_plsql pl_reshuffle {begin pl_reshuffle; end;} + } + + if $n_deleted { + set file_extension [db_string pl_photo_file_ext { select file_extension from pl_photos where photo_id = :photo_id }] + set base_directory [pl_base_directory -read_only $photo_id] + foreach size [list thumb med orig] { + ns_unlink -nocomplain $base_directory/$photo_id-$size$file_extension + } + } +} + +proc_doc pl_delete_folder folder_id { +
      +    # Deletes a folder and all of its contents.
      +    
      +} { + set user_id [ad_conn user_id] + + db_dml pl_folder_delete { + update pl_folders + set deleted_p = 't' + where folder_id in ( select folder_id + from pl_v_folders + where folder_id = :folder_id ) + } + if [db_resultrows] { + db_foreach pl_folder_photo_delete { + select photo_id from pl_photos where folder_id = :folder_id + } { + pl_delete_photo $photo_id + } + } +} + +ad_proc pl_photo_insert { + {-use_default_date 0} + {-use_default_prefix 0} + folder_id + server_tempnam + {full_client_filename ""} +} { +
      +    # insert a row for the pic; copy and scale the tempfile
      +    
      +} { + + set caller_id [ad_conn user_id] + set caller_ip [ns_conn peeraddr] + set im_home [ad_parameter ImageMagickBinDir photo-album-lite /usr/X11R6/bin] + + if [empty_string_p $im_home] { + ns_log Notice "photo-album-lite: warning: ad_parameter has set the ImageMagickBinDir to the empty string!" + } + + if [empty_string_p $full_client_filename] { + set full_client_filename $server_tempnam + } + + set file_extension [string tolower [file extension $full_client_filename]] + + # strip off the C:\directories... crud and just get the file name + if ![regexp {([^/\\]+)$} $full_client_filename match client_filename] { + # couldn't find a match + set client_filename $full_client_filename + } + + set client_filename [pl_photo_cleanup_filename $client_filename] + db_transaction { + set photo_id [db_exec_plsql pl_photo_add " +begin + :1 := pl_photo.new ( + folder_id => :folder_id, + client_filename => :client_filename, + file_extension => :file_extension, + object_type => 'pl_photo', + creation_date => sysdate, + creation_user => :caller_id, + creation_ip => :caller_ip, + context_id => :folder_id ); +end; +"] + # note this will be somewhat inefficient when bulk uploading + # but we need it to guarantee sort_n integrity. + db_exec_plsql pl_reshuffle {begin pl_reshuffle; end;} + } + + set base_directory [pl_base_directory $photo_id] + set orig_name $base_directory/$photo_id-orig$file_extension + set med_name $base_directory/${photo_id}-med$file_extension + set thumb_name $base_directory/${photo_id}-thumb$file_extension + + ns_cp $server_tempnam $orig_name + + # get info for original image + if [catch {set identify_output [exec $im_home/identify -ping -format %h,%w,%b $orig_name]} errMsg] { + pl_delete_photo $photo_id + return -code error "photo-album-lite: identify failed for photo $photo_id with error message: $errMsg" + } + foreach {orig_height orig_width orig_kbytes_kb} [split $identify_output ,] {} + regsub {[^0-9]+$} $orig_kbytes_kb {} orig_kbytes + + # scale down and get info + if [catch {set convert_output [exec $im_home/convert -verbose -geometry ${orig_width}x[ad_parameter MediumHeight photo-album-lite 400] -sharpen 3 -quality 90 $orig_name $med_name 2>/dev/null]} errMsg] { + pl_delete_photo $photo_id + return -code error "photo-album-lite: convert failed for photo $photo_id with error message: $errMsg" + } + + if [catch {set identify_output [exec $im_home/identify -ping -format %h,%w,%b $med_name]} errMsg] { + pl_delete_photo $photo_id + return -code error "photo-album-lite: identify failed for photo $photo_id with error message: $errMsg" + } + foreach {med_height med_width med_kbytes_kb} [split $identify_output ,] {} + regsub {[^0-9]+$} $med_kbytes_kb {} med_kbytes + + if [catch {set convert_output [exec $im_home/convert -verbose -geometry ${orig_width}x[ad_parameter ThumbHeight photo-album-lite 100] -sharpen 3 -quality 90 $orig_name $thumb_name 2>/dev/null]} errMsg] { + pl_delete_photo $photo_id + return -code error "photo-album-lite: convert failed for photo $photo_id with error message: $errMsg" + } + + if [catch {set identify_output [exec $im_home/identify -ping -format %h,%w,%b $thumb_name]} errMsg] { + pl_delete_photo $photo_id + return -code error "photo-album-lite: identify failed for photo $photo_id with error message: $errMsg" + } + foreach {thumb_height thumb_width thumb_kbytes_kb} [split $identify_output ,] {} + regsub {[^0-9]+$} $thumb_kbytes_kb {} thumb_kbytes + + db_dml pl_photos_update { + update pl_photos + set orig_width = :orig_width, + orig_height = :orig_height, + orig_kbytes = :orig_kbytes, + med_width = :med_width, + med_height = :med_height, + med_kbytes = :med_kbytes, + thumb_width = :thumb_width, + thumb_height = :thumb_height, + thumb_kbytes = :thumb_kbytes + where photo_id = :photo_id + } + + if $use_default_date { + db_dml pl_photo_default_date_dml { + update pl_photos + set exposure_date = (select default_exp_date + from pl_folders + where folder_id = :folder_id) + where photo_id = :photo_id + } + } + + if $use_default_prefix { + db_exec_plsql pl_photo_default_name_dml { + begin pl_photo.apply_default_name(:photo_id); end; + } + } +} Index: openacs-4/contrib/obsolete-packages/photo-album-lite/templates/slideshow-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/templates/slideshow-master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/templates/slideshow-master.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,30 @@ + + <% # Setting the default attributes for page display. + set bgcolor [ad_parameter -package_id [ad_core_ui_id] bgcolor acs-core-ui white] + set fgcolor [ad_parameter -package_id [ad_core_ui_id] textcolor acs-core-ui black] + set attributes "bgcolor=$bgcolor fgcolor=$fgcolor" %> + + + <% # Set a default email address to sign the bottom of each page. + set signatory [ad_parameter SystemOwner "admin@yourservername"] %> + + + +@title@ + + + + + + + + + + + +
      + +
      @signatory@
      +@ds_link@ + + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/templates/slideshow-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/templates/slideshow-master.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/templates/slideshow-master.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,57 @@ +# /www/master-default.tcl +# +# Set basic attributes and provide the logical defaults for variables that +# aren't provided by the slave page. +# +# Author: Kevin Scaldeferri (kevin@arsdigita.com) +# Creation Date: 14 Sept 2000 +# default-master.tcl,v 1.2 2000/09/27 20:32:06 lars Exp +# + +# Slideshow Interval +set slideshow_interval [ad_parameter SlideShowInterval photo-album-lite 5] + +# Title + +if ![exists_and_not_null title] { + set title [ad_system_name] +} + +# Signatory + +if ![exists_and_not_null signatory] { + set signatory [ad_system_owner] +} + +# Attributes + +array set attrs [list] + +if { [info exists prefer_text_only_p] && $prefer_text_only_p == "f" && [ad_graphics_site_available_p] } { + set attrs(bgcolor) [ad_parameter bgcolor "" "white"] + set attrs(background) [ad_parameter background "" "/graphics/bg.gif"] + set attrs(text) [ad_parameter textcolor "" "black"] +} else { + set attrs(bgcolor) [ad_parameter bgcolor "" "white"] + set attrs(text) [ad_parameter textcolor "" "black"] +} + +if { [exists_and_not_null focus] } { + set attrs(onLoad) "javascript:document.${focus}.focus()" +} + +foreach attr [array names attrs] { + lappend attr_list "$attr=\"$attrs($attr)\"" +} + +set attributes [join $attr_list " "] + + + +# Developer-support + +if { [llength [namespace eval :: info procs ds_link]] == 1 } { + set ds_link "[ds_link]" +} else { + set ds_link "" +} Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/bulk-image-upload-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/bulk-image-upload-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/bulk-image-upload-2.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,74 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: bulk-image-upload-2.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Upload a zip file full of pictures. + Shamelessly copied from Wimpy Point. + Thank You Nuno Santos . + +} { + + folder_id:notnull,naturalnum + file:notnull + file.tmpfile:notnull + +} + +# ad_maybe_redirect_for_registration +# doesn't work with file attachments :( +set caller_id [ad_conn user_id] + +if !$caller_id { + ad_return_complaint 1 "Sorry, you don't appear to be logged in. Please log in and try again." +} + +ad_require_permission $folder_id write + +# Step 1: Create temp directory. + +set tmp_dir [file dirname ${file.tmpfile}] +append tmp_dir "/[ns_mktemp "$folder_id-XXXXXX"]" +if [catch { ns_mkdir $tmp_dir } errMsg ] { + ns_log Notice "photo-album-lite: Error creating directory $tmp_dir: $errMsg" + ad_return_error "Unzip Error" "There was an error unzipping your file. Please contact the server administrator for assistance." + ad_script_abort +} + +# Step 2: Unzip the archive + +set unzip_home [ad_parameter PathToUnzip photo-album-lite /usr/bin] + +# unzip -C -j zipfile *.gif *.jpg -d directory +# only extract GIFs and JPGs (-C=case-insensitive) into directory; +# don't create subdirs (-j); +# ignore "caution: filename not matched" unzip message +# (if one of the formats is not present in the archive) + +if { [catch { exec $unzip_home/unzip -C -j ${file.tmpfile} *.gif *.jpg -d $tmp_dir } errMsg] && ![regexp {caution: filename not matched} $errMsg]} { + + ns_log Notice "photo-album-lite: Error unzipping $file.tmpfile: $errMsg" + ad_return_error "Unzip Error" "There was an error unzipping your file. Please contact the server administrator for assistance." + file delete -force $tmp_dir + ad_script_abort +} + + +# Step 3: use glob to get a list of files in the directory +set file_exts {[Gg][Ii][Ff],[Jj][Pp][Gg]} +set image_file_list [lsort [glob -nocomplain $tmp_dir/*.{$file_exts}]] + +# Step 4: loop through the files and do the insert + +foreach image_file $image_file_list { + if [catch {pl_photo_insert $folder_id $image_file} errMsg] { + global errorInfo + doc_return 200 text/plain "sorry, there was an error: $errMsg" + } +} + +# Step 5: clean up + +file delete -force $tmp_dir + +ad_returnredirect photo-add?folder_id=$folder_id Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-ae-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-ae-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-ae-2.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,69 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: folder-ae-2.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + If folder_id is passed in, update that folder. + Otherwise, add a new folder. + +} { + return_url:notnull + title:notnull + descr:optional + exp_date:array,date + default_prefix:optional + folder_id:optional,naturalnum +} + +ad_maybe_redirect_for_registration + +set caller_id [ad_conn user_id] +set caller_ip [ns_conn peeraddr] +set package_id [ad_conn package_id] + +if ![info exists descr] { + set descr [db_null] +} + +if [empty_string_p $exp_date(year)] { + set default_exp_date [db_null] +} else { + set default_exp_date "$exp_date(year)-$exp_date(month)-$exp_date(day)" +} + +if [empty_string_p default_prefix] { + set default_prefix [db_null] +} else { + set default_prefix [pl_photo_cleanup_filename $default_prefix] +} + +if [info exists folder_id] { + #check permissions + ad_require_permission $folder_id admin + + db_dml pl_folder_update { + update pl_folders + set title = :title, + descr = :descr, + default_exp_date = :default_exp_date, + default_prefix = :default_prefix + where folder_id in (:folder_id) + } +} else { + db_exec_plsql pl_folder_create " +declare + v_folder_id integer; +begin + v_folder_id := pl_folder.new ( + title => :title, + descr => :descr, + default_exp_date => :default_exp_date, + default_prefix => :default_prefix, + creation_user => :caller_id, + creation_ip => :caller_ip, + context_id => :package_id ); +end; +" +} + +ad_returnredirect $return_url Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-ae.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-ae.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-ae.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,33 @@ +
      + + + + + +
      +@heading@ + + + + + + + + + + + + + + + + + + + + + + +
      Folder name:
      Description:
      (optional)
      Default Exposure
      Date (optional):
      @date_entry_widget@
      Default Filename
      Prefix (optional):

      (spaces and punctuation will be removed)
      Last modified @modified_date@
      +
      +
      Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-ae.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-ae.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,5 @@ +if [info exists default_exp_date] { + set date_entry_widget [ad_dateentrywidget exp_date $default_exp_date] +} else { + set date_entry_widget [ad_dateentrywidget exp_date ""] +} Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-delete-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-delete-2.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,16 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: folder-delete-2.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Delete the folder and all of its contents. + +} { + folder_id:notnull,naturalnum +} + +ad_require_permission $folder_id admin + +pl_delete_folder $folder_id + +ad_returnredirect folder-list?mode=mine Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-delete.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-delete.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,13 @@ + +Confirm delete +

      Confirm delete

      +@context_bar@ +
      +
      +Really delete @title@ and all its photos (@photo_count@)?

      +
      + + + +
      +
      Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-delete.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,18 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: folder-delete.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Confirm deletion. + +} { + folder_id:notnull,naturalnum +} + +db_1row pl_folder_info { + select title, pl_folder.photo_count(:folder_id) as photo_count + from pl_v_folders + where folder_id = :folder_id +} + +set context_bar [ad_context_bar [list "folder-view?folder_id=$folder_id" $title] "Delete"] Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-edit.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,29 @@ + +Edit Folder +

      Edit Folder

      +@context_bar@ +
      + +
      done editing +
      + +
      + + + + +
      +Change photo sequence: + + + +Set exposure dates to default +

      + +Apply default name +
      +
      +
      Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-edit.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,29 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: folder-edit.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Edit a folder. + +} { + folder_id:notnull,naturalnum + return_url:optional +} + +if ![info exists return_url] { + set return_url folder-view?folder_id=$folder_id +} + +set dml_return_url [ns_conn url]?[ns_conn query] + +set heading "" +set submit "Save Changes" +db_1row pl_folder_info { + select title, descr, pl_relative_date(last_modified) as modified_date, + default_exp_date, pl_folder.photo_count(:folder_id) as photo_count, + default_prefix + from pl_v_folders + where folder_id = :folder_id +} + +set context_bar [ad_context_bar [list folder-view?folder_id=$folder_id $title] Edit] Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-list.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-list.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,67 @@ + +Folders + + +

      All Folders

      +
      + +

      Folders writable by @person_name@

      +
      + +@context_bar@ +
      + + + + + + +
      + + +
        +
      • Sorry, we can't find any folders created by you. + + +
      • You can either create a new folder using the dialog box + to the right, or add photos to someone else's folder. +
      • If you'd like to add photos, please start by creating
        + a new folder using the dialog box to the right. + + +
      +
      + Folders created by you: + + + + + + + +@writable:rowcount@ folders created by other users. +Folders created by other users: +[ hide ] + + + + + +
      + +
      Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-list.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-list.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,84 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: folder-list.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Show a list of folders, in various contexts: + + 1. me, looking at a list of folders to add photos to, + with an option to create a new one. + 2. anyone, looking at a list of one photographer's folders + 3. anyone, looking at a list of all folders by anyone + +} { + pl_user_id:optional,naturalnum + all_p:optional,boolean + {mode:optional all} +} + +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set return_url [ad_urlencode folder-list?mode=mine] + +set sql " +select folder_id, + title, + person.name(creation_user) as creator, + pl_photo_date_format(creation_date) as pretty_creation_date, + pl_folder.photo_count(folder_id) as photo_count +from pl_v_folders +where context_id = :package_id " + +switch $mode { + mine { + if !$user_id { + ad_redirect_for_registration + ad_script_abort + } + append sql " +and creation_user = :user_id" + set folders_by_id $user_id + + # Also query for folders this user can write to. + db_multirow writable writable_q { + select folder_id, + title, + creation_user, + person.name(creation_user) as creator, + pl_photo_date_format(creation_date) as pretty_creation_date, + pl_folder.photo_count(folder_id) as photo_count, + decode(acs_permission.permission_p(folder_id,:user_id,'admin'),'t',1,0) as admin_p + from pl_v_folders + where context_id = :package_id + and acs_permission.permission_p(folder_id,:user_id,'write') = 't' + and creation_user not in (:user_id) + order by creation_date desc + } + } + user { + if ![info exists pl_user_id] { + ad_return_error "Application error." "mode=user requires pl_user_id" + ad_script_abort + } + append sql " +and creation_user = :pl_user_id" + set folders_by_id $pl_user_id + } +} + +db_multirow folder pl_folder_list "$sql order by creation_date desc" + +# just in case there are no rows +if [info exists folders_by_id] { + set person_name [db_string pl_folders_by_name {select person.name(:folders_by_id) from dual}]} + +# determine whether to show extra writable rows. +if { [string equal $mode mine] && ![info exists all_p] } { + if { [template::multirow size writable] > 10 } { + set all_p 0 + } else { + set all_p 1 + } +} + +set context_bar [ad_context_bar Folders] Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-set-defaults.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-set-defaults.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-set-defaults.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,32 @@ +ad_page_contract { + Set the photo names or dates to the folder default. +} { + folder_id:notnull,naturalnum + mode:notnull +} + +ad_require_permission $folder_id admin + +switch $mode { + date { + db_dml pl_photo_date_update { + update pl_photos + set exposure_date = (select default_exp_date + from pl_folders + where folder_id = :folder_id) + where folder_id = :folder_id + } + } + name { + db_exec_plsql pl_photo_name_update { +begin + for photo in (select photo_id as id from pl_v_photos + where folder_id = :folder_id) loop + pl_photo.apply_default_name(photo.id); + end loop; +end; + } + } +} + +ad_returnredirect folder-view?folder_id=$folder_id Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-view.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-view.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,36 @@ + +@folder_title@ + + + + + + +
      +

      @folder_title@

      +
      Created By: @photographer@
      Created On:@post_date@
      @context_bar@
      @photo_count@ photos
      + +
      + + + + + + +
      slide show (not recommended if your connection is slow) + + + + + +add + + | edit | delete +
      + + +
      Description: @descr@ +(@default_exp_date@) +
      + +@photo_table@ Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-view.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/folder-view.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,74 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: folder-view.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Display contents of one folder. + +} { + folder_id:notnull,naturalnum +} + +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set return_url [ad_urlencode [ns_conn url]?[ns_conn query]] +set default_height [ad_parameter ThumbHeight photo-album-lite 100] +set preload_p [ad_parameter ImagePreloadingEnabledP photo-album-lite 1] + +set write_p [ad_permission_p $folder_id write] +set admin_p [ad_permission_p $folder_id admin] + +db_1row folder_info { + select f.title as folder_title, + f.descr, + to_char(f.creation_date,'DD Mon YYYY') as post_date, + person.name(f.creation_user) as photographer, + f.creation_user, + pl_folder.photo_count(:folder_id) as photo_count, + pl_photo_date_format(default_exp_date) as default_exp_date + from pl_v_folders f + where f.folder_id = :folder_id + and f.context_id = :package_id +} + +set context_bar [ad_context_bar Folder] + +set line_break [ad_parameter RightMargin photo-album-lite 450] +set running_width 0 + +set photo_table "" + +set first_p 1 +db_foreach folder_photos { + select client_filename, + photo_id, + decode(thumb_width,NULL,'','width="' || thumb_width || '"') as width_tag, + 'height="' || nvl(thumb_height,:default_height) || '"' as height_tag, + nvl(thumb_width,round(:default_height * 1.33)) as thumb_width + from pl_v_photos + where folder_id = :folder_id + order by sort_n +} { + if $first_p { set first_photo_id $photo_id; set first_client_filename $client_filename; set first_p 0 } + + if { $running_width > $line_break } { + append photo_table "
      " + set running_width 0 + } + + append photo_table "" + + incr running_width $thumb_width + +} if_no_rows { unset photo_table } + + +if [info exists photo_table] { + append photo_table "
      \"$client_filename\"
      " +} else { + set photo_table "Empty folder." + set creation_user [db_string pl_folder_creation_user "select creation_user from pl_v_folders where folder_id = :folder_id"] + if { $creation_user == $user_id } { + append photo_table "You may add photos to this folder if you'd like." + } +} Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/index.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,54 @@ + +@instance_name@ + + + + + + +

      @instance_name@

      last upload: @last_upload@
      +

      + + + + + +
      @context_bar@@photo_count@ photos +
      Search:
      + +


      + +
      +New Photos + + + + + + + + + + + + +
      New Folders
      @new_folders.title@
       
      +view all
      +
      +
      + + + + + + + + + + +
      Your Folders
      @your_folders.title@
       
      +view all
      +
      +
      +@photo_table@ +
      +
      +Add photos | Browse
      Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/index.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,104 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: index.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Show recent photos and summary info. + +} {} + +# Give a friendly warning for fresh installs, or set a parameter +# for use below. +if [catch {set default_height [ad_parameter ThumbHeight photo-album-lite 100]}] { + ad_return_error "Error calling ad_parameter." "There was an error calling ad_parameter. If this is a fresh install, please restart your server." +} + +set context_bar [ad_context_bar] + +set package_id [ad_conn package_id] + +set instance_name [db_string pl_instance_name { + select instance_name from apm_packages where package_id = :package_id +}] + +set photo_count [db_string pl_photo_count { + select count(p.photo_id) + from pl_v_photos p, + pl_v_folders f + where p.folder_id = f.folder_id + and f.context_id = :package_id +}] + +set last_upload [db_string pl_last_upload { + select pl_relative_date(max(p.creation_date)) + from pl_v_photos p, + pl_v_folders f + where p.folder_id = f.folder_id + and f.context_id = :package_id +}] + +set line_break [ad_parameter RightMargin photo-album-lite 450] +set line_count 1 +set running_width 0 + +set photo_table "" + +# assumption: 20 photos is enough to fill the page. +# don't think you can do this with pure templating logic. +# we do some goofy nvl'ing and arithmetic to handle +# missing heights and widths +db_foreach new_photos { + select * from ( + select p.client_filename, + p.photo_id, + decode(p.thumb_width,NULL,'','width="' || p.thumb_width || '"') as width_tag, + 'height="' || nvl(p.thumb_height,:default_height) || '"' as height_tag, + nvl(p.thumb_width,round(:default_height * 1.33)) as thumb_width + from pl_v_photos p, + pl_v_folders f + where p.folder_id = f.folder_id + and f.context_id = :package_id + order by p.creation_date desc ) + where rownum < 20 +} { + if { $running_width > $line_break } { + incr line_count + set running_width 0 + if { $line_count < 4 } { + append photo_table "
      " + } + } + if { $line_count < 4} { + + append photo_table "" + + incr running_width $thumb_width + } +} + +append photo_table "
      \"$client_filename\"
      " + +set new_folder_table { + } + +db_multirow new_folders pl_new_folders { + select * from ( + select title, folder_id + from pl_v_folders + where sysdate < creation_date + 7 + and context_id = :package_id + order by creation_date desc + ) where rownum < 5 +} + +set user_id [ad_conn user_id] + +db_multirow your_folders pl_your_folders { + select * from ( + select title, folder_id + from pl_v_folders + where creation_user = :user_id + and context_id = :package_id + order by creation_date desc + ) where rownum < 5 +} Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-add-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-add-2.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,64 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: photo-add-2.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Add up to 6 photos. + +} { + folder_id:notnull,naturalnum + file1:optional + file1.tmpfile:optional,tmpfile + file2:optional + file2.tmpfile:optional,tmpfile + file3:optional + file3.tmpfile:optional,tmpfile + file4:optional + file4.tmpfile:optional,tmpfile + file5:optional + file5.tmpfile:optional,tmpfile + file6:optional + file6.tmpfile:optional,tmpfile + {use_default_date:optional,naturalnum 0} + {use_default_prefix:optional,naturalnum 0} +} + +# ad_maybe_redirect_for_registration +# doesn't work with file attachments :( +set caller_id [ad_conn user_id] + +if !$caller_id { + ad_return_complaint 1 "Sorry, you don't appear to be logged in. Please log in and try again." +} + +ad_require_permission $folder_id write + +foreach num [list 1 2 3 4 5 6] { + if { [info exists file$num] && ![empty_string_p [set file$num]] } { + set guessed_file_type [string tolower [ns_guesstype [set file$num]]] + if { [lsearch [list image/gif image/jpeg application/x-zip-compressed] $guessed_file_type] < 0 } { + ad_return_complaint 1 "Sorry, only GIF, JPEG, and ZIP formats are allowed at this time. Please make sure your images are in the correct format and that your filenames end in .gif or .jpg." + } + } +} + +foreach num [list 1 2 3 4 5 6] { + if { [info exists file$num] && ![empty_string_p [set file$num]] } { + + set guessed_file_type [string tolower [ns_guesstype [set file$num]]] + if [string equal $guessed_file_type application/x-zip-compressed] { + if [catch {pl_bulk_insert -use_default_date $use_default_date -use_default_prefix $use_default_prefix $folder_id [set file${num}.tmpfile]} errMsg] { + global errorInfo + doc_return 200 text/plain "sorry, there was an error: $errMsg" + } + } else { + if [catch {pl_photo_insert -use_default_date $use_default_date -use_default_prefix $use_default_prefix $folder_id [set file${num}.tmpfile] [set file$num]} errMsg] { + global errorInfo + doc_return 200 text/plain "sorry, there was an error: $errMsg" + } + + } + } +} + +ad_returnredirect photo-add?folder_id=$folder_id Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-add.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-add.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,53 @@ + +Add photos + +

      Add photos to @title@

      +@context_bar@ +
      + +

      + +Add image files or Zip archives from your hard drive +
      (you'll be able to add more information after the photos +are on the server;
      +for best results, limit the total upload to 10MB or less)
      + +

      New Folders
      + + +
      +
      + + +File: 
      +File: 
      +File: 
      +File: 
      +File: 
      +File: 
      +
      + + +Set exposure dates to @default_exp_date@
      +
      + + +Rename files to @default_prefix@-<photo number>
      +
      +
      +
      (uploading may take a minute or more. Please be patient.) + +
      + +
      This folder currently contains: +
      + + +@files.client_filename@
      +
      +
      + +
      + + + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-add.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,27 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: photo-add.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Get filenames to add. + +} { + folder_id:notnull,naturalnum +} + +db_1row pl_folder_info { + select title, + pl_photo_date_format(default_exp_date) as default_exp_date, + default_prefix + from pl_folders + where folder_id = :folder_id +} + +db_multirow files pl_file_names { + select client_filename + from pl_v_photos + where folder_id = :folder_id + order by lower(client_filename) +} + +set context_bar [ad_context_bar [list "folder-view?folder_id=$folder_id" $title] Add] Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-delete-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-delete-2.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,17 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: photo-delete-2.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Really delete the photo. + +} { + photo_id:notnull,naturalnum + folder_id:notnull,naturalnum +} + +ad_require_permission $photo_id admin + +pl_delete_photo $photo_id + +ad_returnredirect folder-view?folder_id=$folder_id Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-delete.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-delete.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,15 @@ + +Confirm delete +

      Confirm delete

      +@context_bar@ +
      +
      +

      +Really delete this photo?

      +
      + + + + +
      +
      Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-delete.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,19 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: photo-delete.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Confirm deletion of a photo. + +} { + photo_id:notnull,naturalnum +} + +db_1row pl_photo_folder { + select client_filename, folder_id, + pl_photo.folder_title(:photo_id) as folder_title + from pl_v_photos + where photo_id = :photo_id +} + +set context_bar [ad_context_bar [list "folder-view?folder_id=$folder_id" $folder_title] [list "photo-view?photo_id=$photo_id" $client_filename] Delete] Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-edit-2.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,50 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: photo-edit-2.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Update photo information. + +} { + photo_id:notnull,naturalnum + folder_id:notnull,naturalnum + exp_date:array,date + caption:optional + root_name:notnull + file_extension:notnull +} + +ad_require_permission $photo_id admin +ad_require_permission $folder_id write + +if [empty_string_p $exp_date(year)] { + set exposure_date [db_null] +} else { + set exposure_date "$exp_date(year)-$exp_date(month)-$exp_date(day)" +} + +set client_filename [pl_photo_cleanup_filename "$root_name$file_extension"] + +if { ![info exists caption] || [empty_string_p caption] } { + set caption [db_null] +} + +db_transaction { + # super-simple security: no dml and no warnings + # if file_extension looks funny. + db_dml pl_photo_update { + update pl_photos + set caption = :caption, + client_filename = :client_filename, + exposure_date = to_date(:exposure_date,'YYYY-MM-DD'), + folder_id = :folder_id + where photo_id in ( select photo_id + from pl_v_photos + where photo_id = :photo_id + and file_extension = :file_extension ) + } + # maintain the sort_n's if/when the photo moves to a different folder. + db_exec_plsql pl_reshuffle {begin pl_reshuffle; end;} +} + +ad_returnredirect photo-edit?photo_id=$photo_id Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-edit.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,68 @@ + + + + + + +
      +

      Edit @client_filename@

      + +@context_bar@
      +
      Folder: @folder_title@
      Posted:@post_date@
      +
      + + + + +
      done editing +
      + +<Back   + +     + +Next> + +
      + +
      + +
      + +
      + + + + + + + +
      + + + + + + + + + + + + +
      Name: @file_extension@
      (spaces and punctuation will be removed)

      Caption:

      Exposure Date: @date_entry_widget@

      Folder: +[ mine | all +mine | all ] +
      Last modified @modified_date@
      + +
      +
      +
      + + + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-edit.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,59 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: photo-edit.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Edit a photo. + +} { + photo_id:notnull,naturalnum + {all_folders_p:optional,boolean 0} +} + +set caller_id [ad_conn user_id] +set package_id [ad_conn package_id] + +db_1row one_photo { + select to_char(nvl(a.exposure_date,pl_photo.exp_date(pl_photo.prev_photo_id(a.folder_id,a.sort_n))),'YYYY-MM-DD') as exp_date, + pl_photo_date_format(a.creation_date) as post_date, + a.caption, + a.client_filename, + a.file_extension, + a.folder_id, + a.sort_n, + pl_folder.photo_count(a.folder_id) as photo_count, + pl_photo.folder_title(a.photo_id) as folder_title, + pl_photo.next_photo_id(a.folder_id,a.sort_n,:caller_id,'admin') + as next_photo_id, + pl_photo.prev_photo_id(a.folder_id,a.sort_n,:caller_id,'admin') + as prev_photo_id, + pl_relative_date(a.last_modified) as modified_date + from pl_v_photos a + where a.photo_id = :photo_id +} + +set date_entry_widget [ad_dateentrywidget exp_date $exp_date] + +set root_name [file rootname $client_filename] + +set context_bar [ad_context_bar [list folder-view?folder_id=$folder_id $folder_title] "Edit photo $sort_n of $photo_count"] + +if $all_folders_p { + set my_folders_clause "" +} else { + set my_folders_clause "and creation_user = :caller_id" +} + +# Also query for folders this user can write to. +db_multirow writable writable_q " + select folder_id, + title + from pl_v_folders + where context_id = :package_id + and acs_permission.permission_p(folder_id,:caller_id,'write') = 't' + and folder_id != :folder_id + $my_folders_clause + order by lower(title) +" + +set folder_urlvars [export_ns_set_vars url all_folders_p] Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-search.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-search.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-search.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,11 @@ + +Search Results +

      Search results matching "@query@"

      +@context_bar@ +
      + + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-search.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-search.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,28 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: photo-search.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Search for photos whose captions contain the query string. + +} { + query:notnull +} + +set context_bar [ad_context_bar "Search results"] +set package_id [ad_conn package_id] + +# Plain old "contains" queries leave a lot to be desired +# but I can seem to get "about" queries to work :( +db_multirow results pl_query_results { + select p.client_filename, + p.photo_id, + p.caption + from pl_photos p, + pl_v_folders f + where p.deleted_p = 'f' + and p.folder_id = f.folder_id + and f.context_id = :package_id + and contains(indexable_stuff,:query,1) > 0 + order by score(1) desc +} Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-view.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-view.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,72 @@ + +@next_photo_id@ +@folder_id@ +@slide_show_p@ +@paused_p@ + + + + +
      +

      @client_filename@

      + +@context_bar@
      +
      Photographer: @photographer@
      Posted:@post_date@
      +
      + + + + + +
      + + continue + pause + + +edit | delete +
      + + + + + + + + + + + + + + + +
      + +<Back   +TOP   +Next> +

      + + + + +
      +@caption@ + +(@exp_date@) + +
      Original size: @orig_width@ x @orig_height@ (@orig_kbytes@KB)
      + +
      @client_filename@ 
      + +

      +

      @general_comments_link@
      +

      + +Comments +

        +@the_comments@ +
      +
      + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-view.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo-view.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,78 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: photo-view.tcl,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Display a photo. + +} { + photo_id:notnull,naturalnum + slide_show_p:optional,boolean + paused_p:optional,boolean +} + +set slideshow_interval [ad_parameter SlideShowInterval photo-album-lite 10] +set preload_p [ad_parameter ImagePreloadingEnabledP photo-album-lite 1] + +set admin_p [ad_permission_p $photo_id admin] + +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] +set default_height [ad_parameter MediumHeight photo-album-lite 400] + +db_1row one_photo { + select a.client_filename, + decode(a.med_width,NULL,'','width="' || a.med_width || '"') as width_tag, + 'height="' || nvl(a.med_height,:default_height) || '"' as height_tag, + a.folder_id, + pl_photo.folder_title(a.photo_id) as folder_title, + nvl(pl_photo.next_photo_id(a.folder_id,a.sort_n),0) as next_photo_id, + nvl(pl_photo.prev_photo_id(a.folder_id,a.sort_n),0) as prev_photo_id, + pl_photo_date_format(a.creation_date) as post_date, + pl_photo_date_format(a.exposure_date) as exp_date, + a.caption, + a.creation_user, + person.name(a.creation_user) as photographer, + a.sort_n, + pl_folder.photo_count(a.folder_id) as photo_count, + a.orig_width, + a.orig_height, + a.orig_kbytes, + a.med_height + from pl_v_photos a, + pl_v_folders f + where a.photo_id = :photo_id + and a.folder_id = f.folder_id + and f.context_id = :package_id +} + +if ![exists_and_not_null slide_show_p] { + set slide_show_p 0 +} else { + db_0or1row next_client_filename { + select client_filename as next_client_filename + from pl_v_photos + where photo_id = :next_photo_id + } +} + +if ![exists_and_not_null paused_p] { set paused_p 0 } + +set context_bar [ad_context_bar [list "folder-view?folder_id=$folder_id" $folder_title] "Photo $sort_n of $photo_count"] + +foreach way [list next prev] { + if [set ${way}_photo_id] { + set ${way}_url photo-view?photo_id=[set ${way}_photo_id] + } else { + set ${way}_url folder-view?folder_id=$folder_id + } +} + +set top_url folder-view?folder_id=$folder_id + +set photo_commentable_p [pl_photo_commentable_p $photo_id] + +if $photo_commentable_p { + set the_comments [general_comments_get_comments $photo_id] + set general_comments_link [general_comments_create_link $photo_id [ns_conn url]?[ns_conn query]] +} Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photos-reorder-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photos-reorder-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photos-reorder-2.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,43 @@ +ad_page_contract { + Update the photo sort order for a folder. + If photo_id_list doesn't exist, reorder by the exposure date. +} { + folder_id:notnull,naturalnum + photo_id_list:optional,naturalnum,multiple + {rename:optional,boolean false} +} + +ns_log Notice "rename: $rename" + +ad_require_permission $folder_id admin + +db_transaction { + + set id_list [db_list photo_ids_by_date { + select photo_id + from pl_photos + where folder_id = :folder_id + and deleted_p = 'f' + order by exposure_date + for update + }] + + if ![info exists photo_id_list] { set photo_id_list $id_list } + + set counter 0 + + foreach photo_id $photo_id_list { + incr counter + db_dml update_sort_n { + update pl_photos + set sort_n = :counter + where photo_id = :photo_id + } + } +} + +if [string equal $rename true] { + ad_returnredirect folder-set-defaults?folder_id=$folder_id&mode=name +} else { + ad_returnredirect folder-view?folder_id=$folder_id&o=[ns_time] +} Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photos-reorder.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photos-reorder.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photos-reorder.adp 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,80 @@ + +Change Photo Sequence +

      Change Photo Sequence

      +@context_bar@ +
      + +To move a photo in your folder, select its title and click the +Up or Down arrow. When you're done, click Save Changes. + + + +
      + +

      +

      + + + + + + + + + + +
      + +
       Apply default names
      +
      +
      + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photos-reorder.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photos-reorder.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photos-reorder.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,22 @@ +ad_page_contract { + Reorder photos in a folder. Shamelessly copied from + Wimpy Point. Thank You Jon Salz. +} { + folder_id:notnull,naturalnum +} + +db_multirow photos photos { + select photo_id, + client_filename + from pl_v_photos + where folder_id = :folder_id + order by sort_n +} + +db_1row folder_info { + select title, + default_prefix + from pl_folders where folder_id = :folder_id +} + +set context_bar [ad_context_bar [list folder-view?folder_id=$folder_id $title] Sequence] Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/admin/upgrade-4.0.1a-4.0.1b.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/admin/upgrade-4.0.1a-4.0.1b.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/admin/upgrade-4.0.1a-4.0.1b.tcl 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,20 @@ +# 1. Run me to upgrade your alpha site. +# 2. Run me from within whichever package instance +# you want your legacy photos to belong to. +# 3. I only work the first time! + +set package_id [ad_conn package_id] + +db_dml pa_401_alpha_beta_upgrade { + update acs_objects + set context_id = :package_id + where object_id in (select folder_id from pa_v_folders + where context_id = 0) +} + +ns_log Notice "photo-album-lite: upgrade-401a-401b modified [db_resultrows] rows" + +set urlv [ad_conn urlv] +set last [expr [llength $urlv] - 3] + +ad_returnredirect /[join [lrange $urlv 0 $last] /] Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/changelog.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/changelog.txt,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/changelog.txt 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,60 @@ +4.1.1 beta +---------- +1. added name method for pl_photos and pl_folders +2. now using acs-permissions: 'admin' privilege is automatically + granted to all new pl_photos and pl_folders +3. move parameters to ad_parameter. +4. fixed a bug in photo-album-lite-plsql.sql + which led to erroneous sort_n's in folders with + deleted photos. +5. pl_photo.prev_photo_id and pl_photo.next_photo_id now take optional + party_id and privlege arguments to constuct the correct Next and Back + links in photo-edit in folders with many photographers. +6. Added photo count and description to folder-view. +7. Added "writable folders created by other users" + to folder-list?mode=mine. (still need to write UI to support priv. grants) +8. Added default exposure date to pl_folders. +9. Added default prefix name to pl_folders. +10. Added folder-set-defaults to make bulk changes to photo names + and exposure dates. +11. Image files and zip archives are now handled by the same target; + no good reason to expose the user to the difference in backend processing. +12. Added commentability. +13. Replaced pl_deleted_photos with pl_reshuffle_queue. +14. A bunch of changes were made to make sort_n handling a little bit + cleaner transactionally. +15. Photos can now be moved between folders from the photo-edit page. +16. Added link to original-sized photo when default view is smaller. +17. Use pl_photo_cleanup_filename to regsub out disallowed characters + from the filename. + +4.0.1 final (02/01/01) +---------------------- +1. Changed prefixes from pa_ to pl_ to resolve + conflicts with photo-album package. +2. Added ad-hoc permission checks to photo-add-2.tcl and + bulk-image-upload-2.tcl. Only a folder's creator can + add photos. [ to be replaced with permission system + calls in the next version ] +3. Added upgrade script for 4.0.1b users. +4. Added cleanup-failed-drop.sql to clean up after + a failed drop attempt with photo-album-lite-drop.sql. +5. The sort_n's now all start at 1 for each folder, so + that we can easily display e.g. "Photo 5 of 12". + Code added to the upgrade script to remap sort_n's. +6. Added "Photo n of m" to photo-view.tcl. + +4.0.1 beta (12/31/00) +--------------------- +1. added -ping parameter to identify calls, for better performance. +2. fixed a bug in prev/next_photo_id +3. added slideshow (caveat: buggy on slow connections) +4. now using object_id for the initial value of sort_n +5. added sort by exposure date +6. added arbitrary sort order +7. The dbms_job is now dropped by the drop script. +8. Added parameter ImagePreloadingEnabledP so you can turn off preloading + (useful only for slideshow). +9. Package is subsite aware. +10. Bulk image upload from zip archive added. Added parameter PathToUnzip. +11. Added sql upgrade script. Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/index-4.0.1.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/index-4.0.1.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/index-4.0.1.html 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,183 @@ + + +Photo Album Lite + + +

      Photo Album Lite

      +by Andrew Grumet +
      + +

      Essentials

      + +
        +
      • Version: 4.0.1, Release date: 2000-02-01 +
      • This is the final release of the Photo Album Lite package, version 4.0.1. (view beta documentation) +
      • The most significant change in 4.0.1 is the re-prefixing of the ACS objects and others from pa_* to pl_* so that photo-album-lite and photo-album can be installed on the same ACS without confict. (view changelog) +
      • Beta users need to run an upgrade script and to reset package parameters. +

        +

      • This package assumes that ImageMagick and Oracle InterMedia are installed and properly configured on your system. For a few pointers see the Gotchas section below. +
      • Quick Install: +
          +
        1. Grab the .apm file from http://www.arsdigita.com/acs-repository/index?&type=acs4x and install through Package Manager. +
        2. Check for the correct path to ImageMagick in /serverroot/packages/photo-album-lite/tcl/photo-album-lite-init.tcl +
        3. Make sure that the aolserver user can write to the serverroot directory. +
        4. Check your InterMedia settings if you want to use search. See detail near the bottom of /serverroot/packages/photo-album-lite/sql/photo-album-lite-create.sql +
        5. Solaris only: make sure that your server's LD_LIBRARY_PATH contains /usr/openwin/lib [hint: check nsd-oracle and /etc/shell-mods.sh] +
        6. Restart your server. +
        7. Mount a package instance and go! +
        +
      + +

      Introduction

      + +The Photo Album Lite package provides a way for users to share digital +photos with their friends and family. Photos can be uploaded and +collected into folders (think: rolls of film), and then displayed back +either as thumbnail images, medium-sized images, or at the original +size. + +

      + +This package is intended for novices, both to photography and +computers. Throughout the package, emphasis is placed on simplicity +of interface and minimizing the number of clicks needed to achieve the +desired function. Only a small number of fields are stored for each +photograph; these fields are filled out while looking at the image, +after upload. + +

      + +This package is not an image manipulation program. Though the +underlying software makes use of the powerful ImageMagick libraries, we will +mostly shield the end user from these capabilities (perhaps adding +rotations in a later release). + +

      Why Photo Album Lite?

      + +I'm calling this package Photo Album Lite because it is +intentionally light-weight. The permission model, for example, is +rat-simple: everybody can look at every photo, and only the photo's +owner can modify or delete it. The Lite name was also chosen to +distinguish this package from the Photo Album package which uses the +ACS Content Repository and provides more permission options. + +

      Application Design

      + +I tried to keep this package pretty uncomplicated. The package +creates two tables, one for storing photos and one for storing +folders. Both of these are extension tables for +acs_object which generates a certain amount of overhead, +but I did it with the idea that I may actually do some real +permissioning before long. For now, all photos are publicly viewable +but can only be modified by the person who created them. + +

      + +The tables are laid out so that every photo must be a part of exactly +one folder. Or, in data-modeler speak: +

      Each folder may contain zero or more photos.
      Every photo must belong to one and only one folder.
      + +

      + +Images are served from a virtual URL having the following format: +

      +http://your.server.domain/package_instance_url/photo/type/photo_id/filename.ext
      +
      where type is orig +(original size), med ("medium"-sized, default +is 400pixels in height) or thumb (thumbnail, default is +100pixels in height). There is currently no link to the original size +image from the web interface, since images with heights > 400pixels +are too big for most computer screens. In any case this is easy to +add and will happen before long. + +

      + +The photos are themselves are stored in the Unix filesystem (i.e. not +as BLOBS), in a subdirectory of the server root, as +photo_id-type.ext. I experimented a bit with +InterMedia's ORDImage type but it doesn't deliver quite +enough oomph to justify the performance hit we'd take from storing +everything in the database. More specifically, scaling an image down +(using the process method) produces notable image +degradation. + +

      + +When an image is deleted through the web interface, all associated +image files are deleted from the filesystem. + + +

      Gotchas

      + +

      1. Installation

      +
        +
      • This package requires ImageMagick. You can download it from the ImageMagick site at http://www.imagemagick.org. +
      • You have to tell the server where ImageMagick lives. The package should be correctly configured for RedHat7 out-of-the-box. For everybody else, you can set the correct path by editing the pa_param values at the top of /serverroot/packages/photo-album-lite/tcl/photo-album-lite-init.tcl [Note: in later versions we will use ad_parameter, As It Should Be]. +
      • Solaris users need to add /usr/openwin/lib to the LD_LIBRARY_PATH. ImageMagick/Solaris requires a library called libdpstk.so. This may not be included in your aolserver's environment by default. If you use the standard aD architecture, you can set this variable in /home/aol32/bin/nsd-oracle. +
      • The server root must be writable by the aolserver user. Image files are stored in the UNIX filesystem under the serverroot, so this directory must be writable by the user running aolserver. +
      • The install script sets up a dbms_job to update the InterMedia index. This requires that your database user have the execute privilege on ctx_ddl. This privilege must be granted explicitly; granting through the ctxapp role alone will not work. +
      • Remember to restart your server after installing and configuring the package. +
      + +

      2. Uninstall

      + +
        +
      • You must delete all photos and folders through the web +interface before uninstalling the package. This is a failsafe +against unintentionally deleting content. Alternatively, you can run +the following commands in SQL*Plus: +
        +SQL> update pa_photos set deleted_p = 't'; 
        +
        +SQL> update pa_folders set deleted_p ='t';
        +
        + +
      • Use +cleanup-failed-drop.sql if the drop script +fails. The drop script may fail to drop the +pa_photo and pa_folder object types if there +are any objects of those types lying around. Your first impulse might +be to use acs_object.delete(). And it might work. If it +doesn't work, it's probably because the extension +tables--pa_photos and pa_folders--have +already been dropped. The script +/serverroot/packages/photo-album-lite/sql/cleanup-failed-drop.sql +fools the object system into doing the right thing by: recreating +straw-man pa_photos and pa_folders tables +with just the primary key column, filling them with entries that have +id's corresponding to the objects of the same type in +acs_objects, re-running acs_object.delete() +to delete the objects, and re-running +acs_object_type.drop_type() to delete the types. + +
      + + +

      The future

      + +Features: +
        +
      • Tag images with location. +
      • Deal with timezones intelligently. +
      • Add thumbnails to the search results. +
      • Lots of little navigation improvements. +
      • Load image from URL. +
      • Load a bunch of images from e.g. http://www.photoworks.com +
      • Signed java applet for image uploading. For ideas check out the crazy ActiveX thingee at http://photos.yahoo.com, or the simpler drag-and-drop interface at http://www.ofoto.com. +
      +Implementation details: +
        +
      • Use ad_parameter instead of pa_parameter +
      • Use acs-permissions +
      • More error checking. +
      • Make the code that does the ImageMagick calls modular. +
      + +

      +


      +
      +aegrumet@arsdigita.com +
      + + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/index-4.0.1a.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/index-4.0.1a.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/index-4.0.1a.html 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,201 @@ + + +Photo Album Lite + + +

      Photo Album Lite

      +by Andrew Grumet +
      + +

      Essentials

      + +
        +
      • Version: 4.0.1a, Release date: 2000-12-20 +
      • This is the alpha release of the Photo Album Lite package. +
      • This alpha version is not subsite-aware, so +should be treated as a singleton. +
      • This package assumes that ImageMagick and Oracle InterMedia are installed and properly configured on your system. For a few pointers see the Gotchas section below. +
      • Quick Install: +
          +
        1. Grab the .apm file from http://www.arsdigita.com/acs-repository/index?&type=acs4x and install through Package Manager. +
        2. Check for the correct path to ImageMagick in /serverroot/packages/photo-album-lite/tcl/photo-album-lite-init.tcl +
        3. Make sure that the aolserver user can write to the serverroot directory. +
        4. Check your InterMedia settings if you want to use search. See detail near the bottom of /serverroot/packages/photo-album-lite/sql/photo-album-lite-create.sql +
        5. Solaris only: make sure that your server's LD_LIBRARY_PATH contains /usr/openwin/lib [hint: check nsd-oracle and /etc/shell-mods.sh] +
        6. Restart your server. +
        7. Mount a package instance and go! +
        +
      + +

      Introduction

      + +The Photo Album Lite package provides a way for users to share digital +photos with their friends and family. Photos can be uploaded and +collected into folders (think: rolls of film), and then displayed back +either as thumbnail images, medium-sized images, or at the original +size. + +

      + +This package is intended for novices, both to photography and +computers. Throughout the package, emphasis is placed on simplicity +of interface and minimizing the number of clicks needed to achieve the +desired function. Only a small number of fields are stored for each +photograph; these fields are filled out while looking at the image, +after upload. + +

      + +This package is not an image manipulation program. Though the +underlying software makes use of the powerful ImageMagick libraries, we will +mostly shield the end user from these capabilities (perhaps adding +rotations in a later release). + +

      Why Photo Album Lite?

      + +I'm calling this package Photo Album Lite because it is +intentionally light-weight. The permission model, for example, is +rat-simple: everybody can look at every photo, and only the photo's +owner can modify or delete it. The Lite name was also chosen to +distinguish this package from an industrial-strength one currently +under development at arsDigita, +which will probably be called Photo Album. + +

      Application Design

      + +I tried to keep this package pretty uncomplicated. The package +creates two tables, one for storing photos and one for storing +folders. Both of these are extension tables for +acs_object which generates a certain amount of overhead, +but I did it with the idea that I may actually do some real +permissioning before long. For now, all photos are publicly viewable +but can only be modified by the person who created them. Also, a +moderately savvy hacker can add photos to someone else's folder in +this alpha release. + +

      + +The tables are laid out so that every photo must be a part of exactly +one folder. Or, in data-modeler speak: +

      Each folder may contain zero or more photos.
      Every photo must belong to one and only one folder.
      + +

      + +Images are served from a virtual URL having the following format: +

      +http://your.server.domain/package_instance_url/photo/type/photo_id/filename.ext
      +
      where type is orig +(original size), med ("medium"-sized, default +is 400pixels in height) or thumb (thumbnail, default is +100pixels in height). There is currently no link to the original size +image from the web interface, since images with heights > 400pixels +are too big for most computer screens. In any case this is easy to +add and will happen before long. + +

      + +The photos are themselves are stored in the Unix filesystem (i.e. not +as BLOBS), in a subdirectory of the server root, as +photo_id-type.ext. I experimented a bit with +InterMedia's ORDImage type but it doesn't deliver quite +enough oomph to justify the performance hit we'd take from storing +everything in the database. More specifically, scaling an image down +(using the process method) produces notable image +degradation. + +

      + +When an image is deleted through the web interface, all associated +image files are deleted from the filesystem. + + +

      Gotchas

      + +

      1. Installation

      +
        +
      • This package requires ImageMagick. You can download it from the ImageMagick site at http://www.imagemagick.org. +
      • You have to tell the server where ImageMagick lives. The package should be correctly configured for RedHat7 out-of-the-box. For everybody else, you can set the correct path by editing the pa_param values at the top of /serverroot/packages/photo-album-lite/tcl/photo-album-lite-init.tcl [Note: in later versions we will use ad_parameter, As It Should Be]. +
      • Solaris users need to add /usr/openwin/lib to the LD_LIBRARY_PATH. ImageMagick/Solaris requires a library called libdpstk.so. This may not be included in your aolserver's environment by default. If you use the standard aD architecture, you can set this variable in /home/aol32/bin/nsd-oracle. +
      • The server root must be writable by the aolserver user. Image files are stored in the UNIX filesystem under the serverroot, so this directory must be writable by the user running aolserver. +
      • The install script sets up a dbms_job to update the InterMedia index. This requires that your database user have the execute privilege on ctx_ddl. This privilege must be granted explicitly; granting through the ctxapp role alone will not work. +
      • Remember to restart your server after installing and configuring the package. +
      + +

      2. Uninstall

      + +
        +
      • You must delete all photos and folders through the web interface before uninstalling the package. This is a failsafe against unintentionally deleting content. Alternatively, you can run the following commands in SQL*Plus: +
        +SQL> update pa_photos set deleted_p = 't';
        +SQL> update pa_folders set deleted_p = 't';
        +
        +
      • You need to manually remove the +dbms_job. By default, the Intermedia index is +rebuilt every 4 hours with a dbms_job. If you're observant, you will have noticed that the install script prints out a numerical id for the job. This is the job you want to remove. In any case, it is easy to look the job up like so: +
        +SQL> select job from user_jobs where what = 'pa_rebuild_idx;';
        +
        +You can then drop the job by running this script: +
        +SQL> begin dbms_job.remove(the_job); end;
        +SQL> /
        +
        +Automatic job removal will be added to the drop script in the next version of this package. + +
      • Create fake objects if acs_object.delete() +fails. The drop script may fail to drop the +pa_photo and pa_folder object types if there +are any objects of those types lying around. Your first impulse might +be to use acs_object.delete(). And it might work. If it +doesn't work, it's probably because the extension +tables--pa_photos and pa_folders--have +already been dropped. Here is a quick and dirty way to fool the +object system into doing the right thing: recreate straw-man +pa_photos and pa_folders tables with just +the primary key column, fill them with entries that have id's +corresponding to the objects of the same type in +acs_objects, and you're good to go. + +
      + + +

      The future

      +

      1. Easy stuff

      +Features: +
        +
      • Make the code subsite-aware. +
      • Add thumbnails to the search results. +
      • Handle zip files for uploading. +
      • Add ability to change photo order. +
      • Lots of little navigation improvements. +
      • Lots more error checking. +
      +Implementation details: +
        +
      • Automatic removal of the dbms_job. +
      • Make the code that does the ImageMagick calls modular. +
      • Use ad_parameter instead of pa_parameter +
      • Allow photos to be stored outside the webroot? +
      + +

      Harder stuff

      +
        +
      • Deal with timezones intelligently. +
      • Load image from URL. +
      • Load a bunch of images from e.g. http://www.photoworks.com +
      • Tag images with location. + +
      • Signed java applet for image uploading? Lots of work, but great +payoff if people are willing to take the security risk (insane, I +know). For ideas check out the crazy ActiveX thingee at http://photos.yahoo.com, or the simpler drag-and-drop interface at http://www.ofoto.com. + +
      + +

      +


      +
      +aegrumet@arsdigita.com +
      + + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/index-4.0.1b.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/index-4.0.1b.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/index-4.0.1b.html 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,185 @@ + + +Photo Album Lite + + +

      Photo Album Lite

      +by Andrew Grumet +
      + +

      Essentials

      + +
        +
      • Version: 4.0.1b, Release date: 2000-12-31 +
      • This is the beta release of the Photo Album Lite package. (view alpha documentation) +
      • A number of features have been added since the alpha release. (view changelog) +
      • Alpha users need to run two upgrade scripts. +

        +

      • This package assumes that ImageMagick and Oracle InterMedia are installed and properly configured on your system. For a few pointers see the Gotchas section below. +
      • Quick Install: +
          +
        1. Grab the .apm file from http://www.arsdigita.com/acs-repository/index?&type=acs4x and install through Package Manager. +
        2. Check for the correct path to ImageMagick in /serverroot/packages/photo-album-lite/tcl/photo-album-lite-init.tcl +
        3. Make sure that the aolserver user can write to the serverroot directory. +
        4. Check your InterMedia settings if you want to use search. See detail near the bottom of /serverroot/packages/photo-album-lite/sql/photo-album-lite-create.sql +
        5. Solaris only: make sure that your server's LD_LIBRARY_PATH contains /usr/openwin/lib [hint: check nsd-oracle and /etc/shell-mods.sh] +
        6. Restart your server. +
        7. Mount a package instance and go! +
        +
      + +

      Introduction

      + +The Photo Album Lite package provides a way for users to share digital +photos with their friends and family. Photos can be uploaded and +collected into folders (think: rolls of film), and then displayed back +either as thumbnail images, medium-sized images, or at the original +size. + +

      + +This package is intended for novices, both to photography and +computers. Throughout the package, emphasis is placed on simplicity +of interface and minimizing the number of clicks needed to achieve the +desired function. Only a small number of fields are stored for each +photograph; these fields are filled out while looking at the image, +after upload. + +

      + +This package is not an image manipulation program. Though the +underlying software makes use of the powerful ImageMagick libraries, we will +mostly shield the end user from these capabilities (perhaps adding +rotations in a later release). + +

      Why Photo Album Lite?

      + +I'm calling this package Photo Album Lite because it is +intentionally light-weight. The permission model, for example, is +rat-simple: everybody can look at every photo, and only the photo's +owner can modify or delete it. The Lite name was also chosen to +distinguish this package from an industrial-strength one currently +under development at arsDigita, +which will probably be called Photo Album. + +

      Application Design

      + +I tried to keep this package pretty uncomplicated. The package +creates two tables, one for storing photos and one for storing +folders. Both of these are extension tables for +acs_object which generates a certain amount of overhead, +but I did it with the idea that I may actually do some real +permissioning before long. For now, all photos are publicly viewable +but can only be modified by the person who created them. Also, a +moderately savvy hacker can add photos to someone else's folder in +this beta release. + +

      + +The tables are laid out so that every photo must be a part of exactly +one folder. Or, in data-modeler speak: +

      Each folder may contain zero or more photos.
      Every photo must belong to one and only one folder.
      + +

      + +Images are served from a virtual URL having the following format: +

      +http://your.server.domain/package_instance_url/photo/type/photo_id/filename.ext
      +
      where type is orig +(original size), med ("medium"-sized, default +is 400pixels in height) or thumb (thumbnail, default is +100pixels in height). There is currently no link to the original size +image from the web interface, since images with heights > 400pixels +are too big for most computer screens. In any case this is easy to +add and will happen before long. + +

      + +The photos are themselves are stored in the Unix filesystem (i.e. not +as BLOBS), in a subdirectory of the server root, as +photo_id-type.ext. I experimented a bit with +InterMedia's ORDImage type but it doesn't deliver quite +enough oomph to justify the performance hit we'd take from storing +everything in the database. More specifically, scaling an image down +(using the process method) produces notable image +degradation. + +

      + +When an image is deleted through the web interface, all associated +image files are deleted from the filesystem. + + +

      Gotchas

      + +

      1. Installation

      +
        +
      • This package requires ImageMagick. You can download it from the ImageMagick site at http://www.imagemagick.org. +
      • You have to tell the server where ImageMagick lives. The package should be correctly configured for RedHat7 out-of-the-box. For everybody else, you can set the correct path by editing the pa_param values at the top of /serverroot/packages/photo-album-lite/tcl/photo-album-lite-init.tcl [Note: in later versions we will use ad_parameter, As It Should Be]. +
      • Solaris users need to add /usr/openwin/lib to the LD_LIBRARY_PATH. ImageMagick/Solaris requires a library called libdpstk.so. This may not be included in your aolserver's environment by default. If you use the standard aD architecture, you can set this variable in /home/aol32/bin/nsd-oracle. +
      • The server root must be writable by the aolserver user. Image files are stored in the UNIX filesystem under the serverroot, so this directory must be writable by the user running aolserver. +
      • The install script sets up a dbms_job to update the InterMedia index. This requires that your database user have the execute privilege on ctx_ddl. This privilege must be granted explicitly; granting through the ctxapp role alone will not work. +
      • Remember to restart your server after installing and configuring the package. +
      + +

      2. Uninstall

      + +
        +
      • You must delete all photos and folders through the web interface before uninstalling the package. This is a failsafe against unintentionally deleting content. Alternatively, you can run the following commands in SQL*Plus: +
        +SQL> update pa_photos set deleted_p = 't';
        +SQL> update pa_folders set deleted_p = 't';
        +
        +
      • Create fake objects if acs_object.delete() +fails. The drop script may fail to drop the +pa_photo and pa_folder object types if there +are any objects of those types lying around. Your first impulse might +be to use acs_object.delete(). And it might work. If it +doesn't work, it's probably because the extension +tables--pa_photos and pa_folders--have +already been dropped. Here is a quick and dirty way to fool the +object system into doing the right thing: recreate straw-man +pa_photos and pa_folders tables with just +the primary key column, fill them with entries that have id's +corresponding to the objects of the same type in +acs_objects, and you're good to go. + +
      + + +

      The future

      +

      1. Easy stuff

      +Features: +
        +
      • Add thumbnails to the search results. +
      • Lots of little navigation improvements. +
      • Lots more error checking. +
      +Implementation details: +
        +
      • Make the code that does the ImageMagick calls modular. +
      • Use ad_parameter instead of pa_parameter +
      • Allow photos to be stored outside the webroot? +
      + +

      Harder stuff

      +
        +
      • Deal with timezones intelligently. +
      • Load image from URL. +
      • Load a bunch of images from e.g. http://www.photoworks.com +
      • Tag images with location. + +
      • Signed java applet for image uploading? Lots of work, but great +payoff if people are willing to take the security risk (insane, I +know). For ideas check out the crazy ActiveX thingee at http://photos.yahoo.com, or the simpler drag-and-drop interface at http://www.ofoto.com. + +
      + +

      +


      +
      +aegrumet@arsdigita.com +
      + + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/index.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/index.html 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,208 @@ + + +Photo Album Lite + + +

      Photo Album Lite

      +by Andrew Grumet +
      + +

      Essentials

      + +
        +
      • Version: 4.1.1 beta, Release date: 2000-02-28 +
      • This is the 4.1.1 beta release of the Photo Album Lite package. (view 4.0.1 documentation) +
      • This version requires acs411, and will be buggy (if functional at all) on earlier versions of acs. +
      • A substantial number of new features have been added. (view changelog) +
      • 4.0.1 users need to run an upgrade script in SQL*Plus. +

        +

      • The next version will have real documentation (I promise!) +

        +

      • This package assumes that ImageMagick and Oracle InterMedia are installed and properly configured on your system. For a few pointers see the Gotchas section below. +
      • Quick Install: +
          +
        1. Grab the .apm file from http://www.arsdigita.com/acs-repository/index?&type=acs4x and install through Package Manager. +
        2. Check for the correct path to ImageMagick in /serverroot/packages/photo-album-lite/tcl/photo-album-lite-init.tcl +
        3. Make sure that the aolserver user can write to the serverroot directory. +
        4. Check your InterMedia settings if you want to use search. See detail near the bottom of /serverroot/packages/photo-album-lite/sql/photo-album-lite-create.sql +
        5. Solaris only: make sure that your server's LD_LIBRARY_PATH contains /usr/openwin/lib [hint: check nsd-oracle and /etc/shell-mods.sh] +
        6. Restart your server. +
        7. Mount a package instance and go! +
        +
      + +

      Introduction

      + +The Photo Album Lite package provides a way for users to share digital +photos with their friends and family. Photos can be uploaded and +collected into folders (think: rolls of film), and then displayed back +either as thumbnail images, medium-sized images, or at the original +size. + +

      + +This package is intended for novices, both to photography and +computers. Throughout the package, emphasis is placed on simplicity +of interface and minimizing the number of clicks needed to achieve the +desired function. Only a small number of fields are stored for each +photograph; these fields are filled out while looking at the image, +after upload. + +

      + +This package is not an image manipulation program. Though the +underlying software makes use of the powerful ImageMagick libraries, we will +mostly shield the end user from these capabilities (perhaps adding +rotations in a later release). + +

      Why Photo Album Lite?

      + +I'm calling this package Photo Album Lite because it is +intentionally light-weight. The permission model, for example, is +rat-simple: everybody can look at every photo, and only the photo's +owner can modify or delete it [Note: we have added a permissioning +backend but kept the user interface simple -02/2001]. +As another example, we do not provide a full filesystem-like hierarchy +of folders, but instead store folders one-level deep. Finally, we +do not provide any provisions in the backend or user interface for +revisioning or workflow ala ACS Content Repository. Users interested +in these features should consider using the photo-album package. + +

      + +So why use photo-album-lite? + +

        +
      • Simple, intuitive user interfaces +
      • A full host of useful features, including: +
          +
        • Bulk file-upload. +
        • Bulk photo naming and dating. +
        • Re-ordering of photos within a folder. +
        • Photos are commentable. +
        • Photos can be viewed as a slideshow. +
        • Up-to-the minute activity summaries on the index page. +
        • Fulltext search of photo names, authors, and captions. +
        • Photos are available in up to 3 sizes. +
        • Package is fully subsite aware. +
        +
      + +

      Application Design

      + +I tried to keep this package pretty uncomplicated. The package +creates two tables, one for storing photos and one for storing +folders. Both of these are extension tables for +acs_object which generates a certain amount of overhead, +but I did it with the idea that I may actually do some real +permissioning before long. For now, all photos are publicly viewable +but can only be modified by the person who created them. + +

      + +The tables are laid out so that every photo must be a part of exactly +one folder. Or, in data-modeler speak: +

      Each folder may contain zero or more photos.
      Every photo must belong to one and only one folder.
      + +

      + +Images are served from a virtual URL having the following format: +

      +http://your.server.domain/package_instance_url/photo/type/photo_id/filename.ext
      +
      where type is orig +(original size), med ("medium"-sized, default +is 400pixels in height) or thumb (thumbnail, default is +100pixels in height). There is currently no link to the original size +image from the web interface, since images with heights > 400pixels +are too big for most computer screens. In any case this is easy to +add and will happen before long. + +

      + +The photos are themselves are stored in the Unix filesystem (i.e. not +as BLOBS), in a subdirectory of the server root, as +photo_id-type.ext. I experimented a bit with +InterMedia's ORDImage type but it doesn't deliver quite +enough oomph to justify the performance hit we'd take from storing +everything in the database. More specifically, scaling an image down +(using the process method) produces notable image +degradation. + +

      + +When an image is deleted through the web interface, all associated +image files are deleted from the filesystem. + + +

      Gotchas

      + +

      1. Installation

      +
        +
      • This package requires ImageMagick. You can download it from the ImageMagick site at http://www.imagemagick.org. +
      • You have to tell the server where ImageMagick lives. The package should be correctly configured for RedHat7 out-of-the-box. For everybody else, you can set the correct path by editing the package parameters using the acs admin pages. +
      • Solaris users need to add /usr/openwin/lib to the LD_LIBRARY_PATH. ImageMagick/Solaris requires a library called libdpstk.so. This may not be included in your aolserver's environment by default. If you use the standard aD architecture, you can set this variable in /home/aol32/bin/nsd-oracle. +
      • The server root must be writable by the aolserver user. Image files are stored in the UNIX filesystem under the serverroot, so this directory must be writable by the user running aolserver. +
      • The install script sets up a dbms_job to update the InterMedia index. This requires that your database user have the execute privilege on ctx_ddl. This privilege must be granted explicitly; granting through the ctxapp role alone will not work. +
      • Remember to restart your server after installing and configuring the package. +
      + +

      2. Uninstall

      + +
        +
      • You must delete all photos and folders through the web +interface before uninstalling the package. This is a failsafe +against unintentionally deleting content. Alternatively, you can run +the following commands in SQL*Plus: +
        +SQL> update pa_photos set deleted_p = 't'; 
        +
        +SQL> update pa_folders set deleted_p ='t';
        +
        + +
      • Use +cleanup-failed-drop.sql if the drop script +fails. The drop script may fail to drop the +pa_photo and pa_folder object types if there +are any objects of those types lying around. Your first impulse might +be to use acs_object.delete(). And it might work. If it +doesn't work, it's probably because the extension +tables--pa_photos and pa_folders--have +already been dropped. The script +/serverroot/packages/photo-album-lite/sql/cleanup-failed-drop.sql +fools the object system into doing the right thing by: recreating +straw-man pa_photos and pa_folders tables +with just the primary key column, filling them with entries that have +id's corresponding to the objects of the same type in +acs_objects, re-running acs_object.delete() +to delete the objects, and re-running +acs_object_type.drop_type() to delete the types. + +
      + + +

      The future

      + +Features: +
        +
      • Tag images with location. +
      • Deal with timezones intelligently. +
      • Add thumbnails to the search results. +
      • Lots of little navigation improvements. +
      • Load image from URL. +
      • Load a bunch of images from e.g. http://www.photoworks.com +
      • Signed java applet for image uploading. For ideas check out the crazy ActiveX thingee at http://photos.yahoo.com, or the simpler drag-and-drop interface at http://www.ofoto.com. +
      +Implementation details: +
        +
      • More error checking. +
      • Make the code that does the ImageMagick calls modular. +
      + +

      +


      +
      +aegrumet@arsdigita.com +
      + + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/upgrade-4.0.1-4.1.1b.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/upgrade-4.0.1-4.1.1b.txt,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/upgrade-4.0.1-4.1.1b.txt 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,8 @@ +Upgrading from 4.0.1 to 4.1.1b +------------------------------ + +You will need to run the following script through SQL*Plus: + + @yourserverroot/packages/photo-album-lite/sql/upgrade-4.0.1-4.1.1b.sql + +Run it manually if the package manager doesn't offer to run it for you. Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/upgrade-4.0.1a-4.0.1b.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/upgrade-4.0.1a-4.0.1b.txt,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/upgrade-4.0.1a-4.0.1b.txt 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,21 @@ +Upgrading from 4.0.1a to 4.0.1b +------------------------------- + +1. If you've got photos installed on a 4.0.1a package, the subsite + code in this beta release will cause them to disappear from the + index page. + + You can fix this by navigating your browser to + /photo-album-lite-url/admin/upgrade-4.0.1a-4.0.1b + + This one-time update will assign the correct package/context id to + your photos. + +2. If you'd like the new drop script to automatically remove the + dbms_job that rebuilds the search index, run this script through SQL*Plus: + + /serverroot/packages/photo-album-lite/sql/upgrade-4.0.1a-4.0.1b.sql + + This script sets up a table called pa_jobs and inserts a row for + each dbms_job where what = 'pa_rebuild_idx;'. + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/upgrade-4.0.1b-4.0.1.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/upgrade-4.0.1b-4.0.1.txt,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/doc/upgrade-4.0.1b-4.0.1.txt 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,38 @@ +Upgrading from 4.0.1b to 4.0.1 +------------------------------ + +1. We had to rename everything from pa_* to pl_* to avoid conflicts + with the photo-album package. Running the following script: + + /serverroot/packages/photo-album-lite/sql/upgrade-4.0.1b-4.0.1.sql + + will effect all of the necessary changes. The package manager + should correctly detect and offer to run this script. + + Be warned that this script temporarily disables the foreign key + constraint on the object_type column in acs_objects. Try to run + the script off-hours and make sure not to interrupt execution. + + Should the script be interrupted for some reason you can always + manually re-enable the constraint like so: + + SQL> alter table acs_objects enable constraint acs_objects_object_type_fk; + + This script also renames and re-enters the dbms_job that rebuilds the + search index. The job interval is reset to the package's default + (every 4 hours) so you should edit the script if you want to use a + different value. + + Also, note that the default directory for uploaded images is now + + /serverroot/pl_photos + + so you'll need to either edit the PhotoBaseDirectory parameter or rename + the pa_photos directory to pl_photos (recommended). + +2. The upgrade script also remaps your sort_n's so that they always + start with 1 for each folder (they used to be driven off the + photo_id). This makes it easier to display a photo's context in + the folder, i.e. "Photo 5 of 12". + + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo/index.vuh,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo/index.vuh 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,34 @@ +ad_page_contract { + + @author Andrew Grumet + @cvs-id: $Id: index.vuh,v 1.1 2001/04/20 20:51:12 donb Exp $ + + Serve up a photo. + +} {} + +foreach {type photo_id client_filename} [split [ad_conn path_info] /] {} + +set guessed_type [ns_guesstype $client_filename] +set file_extension [string tolower [file extension $client_filename]] +set full_path [pl_base_directory -read_only $photo_id]/$photo_id-$type$file_extension + + +if [string equal $client_filename notfound] { + regexp {(.*)/[^/]+} [ns_info pageroot] match server_base + set this $server_base/packages/[ad_conn package_key]/www/photo + switch $type { + thumb { ns_returnfile 200 image/jpeg $this/unavail-thumb.jpg } + default { ns_returnfile 200 image/jpeg $this/unavail-med.jpg } + } + ad_script_abort +} + +if ![file exists $full_path] { + ns_log Notice "photo-album-lite: file $full_path was requested but could not be found" + set urlv [ad_conn urlv] + ad_returnredirect /[join [lrange $urlv 0 [expr [llength $urlv] - 3]] /]/0000/notfound +} else { + ns_returnfile 200 $guessed_type $full_path +} + Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo/unavail-med.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo/unavail-med.jpg,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo/unavail-thumb.jpg =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/photo/unavail-thumb.jpg,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/pics/down.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/pics/down.gif,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/photo-album-lite/www/pics/up.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/www/pics/up.gif,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/postcard/postcard.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/postcard.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/postcard.info 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,48 @@ + + + + + Postcard + Postcards + f + + + + oracle + postgresql + + Henry Minsky + Send electronics postcards + 2001-01-03 + This lets create and send postcards. It is a simple +demo application which uses ACS 4 templating. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/contrib/obsolete-packages/postcard/sql/oracle/postcard-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/sql/oracle/postcard-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/sql/oracle/postcard-create.sql 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,23 @@ +-- electronic postcard +create sequence postcard_seq; +create sequence postcard_image_seq; + +create table postcard_images ( + card_image_id integer primary key, + image blob default empty_blob(), + mime_type varchar2(100), + title varchar2(1000), + description varchar2(4000) +); + +create table postcards ( + card_id integer primary key, + card_picture references postcard_images, + recipient varchar2(1000), + sender varchar2(1000), + message varchar2(4000), + pickup_code varchar2(1000), + picked_up date +); + + Index: openacs-4/contrib/obsolete-packages/postcard/sql/oracle/postcard-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/sql/oracle/postcard-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/sql/oracle/postcard-drop.sql 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,5 @@ +drop table postcard_images; +drop table postcards; +drop sequence postcard_seq; +drop sequence postcard_image_seq; + Index: openacs-4/contrib/obsolete-packages/postcard/www/add-picture-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/add-picture-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/add-picture-2.tcl 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,47 @@ +# postcard/add-picture-2.tcl + +ad_page_contract { + Add comment + + @author Henry Minsky (hqm@arsdigita.com) + @creation-date 6 Nov 2000 + @cvs-id $Id: add-picture-2.tcl,v 1.1 2001/04/20 20:51:22 donb Exp $ +} { + upload_file + {title:notnull} + {description:notnull} +} + +set user_id [ad_conn user_id] +set tmp_filename [ns_queryget upload_file.tmpfile] +ad_require_permission [ad_conn package_id] admin + +set file_extension [string tolower [file extension $upload_file]] + +# remove the first . from the file extension +regsub "\." $file_extension "" file_extension + +set what_aolserver_told_us "" +if { $file_extension == "jpeg" || $file_extension == "jpg" } { + set mime_type "image/jpeg" + catch { set what_aolserver_told_us [ns_jpegsize $tmp_filename] } +} elseif { $file_extension == "gif" } { + set mime_type "image/gif" + catch { set what_aolserver_told_us [ns_gifsize $tmp_filename] } +} + +if { ![empty_string_p $what_aolserver_told_us] && [lindex $what_aolserver_told_us 0] > 10 && [lindex $what_aolserver_told_us 1] > 10 } { + set original_width [lindex $what_aolserver_told_us 0] + set original_height [lindex $what_aolserver_told_us 1] +} else { + set original_width "" + set original_height "" +} + +db_dml add_picture { + insert into postcard_images (card_image_id, image, mime_type, title, description) + values (postcard_image_seq.nextval, empty_blob(), :mime_type, :title, :description) + returning image into :1 +} -blob_files [list $tmp_filename] + +ad_returnredirect "." Index: openacs-4/contrib/obsolete-packages/postcard/www/add-picture.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/add-picture.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/add-picture.tcl 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,44 @@ +# postcard/add-picture.tcl + +ad_page_contract { + Add a picture for postcard + + @author Henry Minsky (hqm@arsdigita.com) + @creation-date 6 Nov 2000 + @cvs-id $Id: add-picture.tcl,v 1.1 2001/04/20 20:51:22 donb Exp $ +} { +} + +ad_require_permission [ad_conn package_id] admin + +append page_content [ad_header "Add Comment"] + +append page_content " +
      +
      +Add a picture
      + + + + + + + + + + + + + +
      Select Image
      Title
      Description
      + +
      +
      +" +append page_content [ad_footer] + + +doc_return 200 text/html $page_content + + + Index: openacs-4/contrib/obsolete-packages/postcard/www/confirm.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/confirm.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/confirm.adp 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,43 @@ + + +

      Confirm Your Message

      +

      +

      + +

      +

      +<%= [export_form_vars image_id] %> +<%= [export_form_vars recipient] %> +<%= [export_form_vars sender] %> +<%= [export_form_vars subject] %> +<%= [export_form_vars message] %> + + + + + + + + + + + + + + +
      + To: @recipient@ +
      + From: @sender@ +
      + Subject: @subject@ +
      + Message:
      + <% + regsub -all "\n" $message "
      " formatted_message + adp_puts $formatted_message + %> +
      + +
      +
      Index: openacs-4/contrib/obsolete-packages/postcard/www/confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/confirm.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/confirm.tcl 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,26 @@ +# confirm.tcl + +ad_page_contract { + confirm a message + + @author hqm@ai.mit.edu + @creation-date 2000-10-23 + @cvs-id $Id: confirm.tcl,v 1.1 2001/04/20 20:51:22 donb Exp $ +} { + image_id:integer,notnull + sender:notnull + recipient:notnull + subject:notnull + message:notnull + +} -properties { + card_id:onevalue + sender:onevalue + recipient:onevalue + subject:onevalue + message:onevalue +} + +# Insert a new postcard in the database, set card_id to the card id value + +ad_return_template Index: openacs-4/contrib/obsolete-packages/postcard/www/dump-cards.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/dump-cards.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/dump-cards.adp 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,6 @@ + + + + <%= [ns_quotehtml $cards(message)]%> + + Index: openacs-4/contrib/obsolete-packages/postcard/www/dump-cards.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/dump-cards.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/dump-cards.tcl 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,19 @@ +# dump-card.tcl + +ad_page_contract { + send a post card + + @author hqm@ai.mit.edu + @creation-date 2000-10-23 + @cvs-id $Id: dump-cards.tcl,v 1.1 2001/04/20 20:51:22 donb Exp $ +} -properties { + message:onevalue +} + +db_multirow cards cards { + select card_id, card_picture, recipient, sender, message + from postcards + order by card_id +} + +ad_return_template Index: openacs-4/contrib/obsolete-packages/postcard/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/index.adp 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,38 @@ + + +@message@ + +

      + + + + + + + + + + +
      + + + + + + + + + + + + + +
      Title@images.title@
      Description@images.description@
      Image +
      + Click image to select +
      +
      +

      (no images)
       
      + +

      + Add a picture
      Index: openacs-4/contrib/obsolete-packages/postcard/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/index.tcl 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,21 @@ +# index.tcl + +ad_page_contract { + send a post card + + @author hqm@ai.mit.edu + @creation-date 2000-10-23 + @cvs-id $Id: index.tcl,v 1.1 2001/04/20 20:51:22 donb Exp $ +} -properties { + message:onevalue +} + +db_multirow images images { + select card_image_id, mime_type, title, description + from postcard_images + order by card_image_id +} + +set message "Select image and send a Card" + +ad_return_template Index: openacs-4/contrib/obsolete-packages/postcard/www/load-cards.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/load-cards.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/load-cards.tcl 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,58 @@ +# load-cards.tcl + +ad_page_contract { + Display all cards parsing XML. + @author Henry Minsky (hqm@arsdigita.com) + @creation-date 6 Nov 2000 + @cvs-id $Id: load-cards.tcl,v 1.1 2001/04/20 20:51:22 donb Exp $ +} { +} + +apm_load_xml_packages + +set xml_data [ns_httpget "http://kiki7/postcard/dump-cards"] + +set tree [dom::DOMImplementation parse $xml_data] +#set doc [dom::node cget $tree -firstChild] +set results_node [dom::element getElementsByTagName $tree "cards"] +set cards [dom::element getElementsByTagName $results_node "card"] + +proc nodeValue {token} { + return [dom::node cget [dom::node cget $token -firstChild] -nodeValue] +} + +set page_content "" + +foreach card $cards { + set id [dom::element getAttribute $card "id"] + set imageid [dom::element getAttribute $card "image-id"] + set recipient [dom::element getAttribute $card "recipient"] + set sender [dom::element getAttribute $card "sender"] + + append page_content " + + + + + + + + + + + + + +
      To: $recipient
      From: $sender
      Message:
      [nodeValue $card]
      " +} + + +# element tagName +# element get +# attribute +# getElementsByTagName + + + +doc_return 200 text/html $page_content + Index: openacs-4/contrib/obsolete-packages/postcard/www/postcard-picture.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/postcard-picture.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/postcard-picture.tcl 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,25 @@ +# psets/image.tcl + +ad_page_contract { + Put out BLOB image + + @author Henry Minsky (hqm@arsdigita.com) + @creation-date 6 Nov 2000 + @cvs-id $Id: postcard-picture.tcl,v 1.1 2001/04/20 20:51:22 donb Exp $ +} { + {image_id:notnull} +} + + +ReturnHeaders [db_string mime_type { + select mime_type + from postcard_images + where card_image_id = :image_id}] + +db_write_blob select_image " +select image + from postcard_images + where card_image_id = $image_id +" + + Index: openacs-4/contrib/obsolete-packages/postcard/www/send-card.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/send-card.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/send-card.adp 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,15 @@ + + +

      + +Your card has been sent to @recipient@! + +

      + +You may go to @url@ +to pick up your card! + +

      + + +Return to main postcard page Index: openacs-4/contrib/obsolete-packages/postcard/www/send-card.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/send-card.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/send-card.tcl 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,52 @@ +# send_card.tcl + +ad_page_contract { + send an email message + + @author hqm@ai.mit.edu + @creation-date 2000-10-23 + @cvs-id $Id: send-card.tcl,v 1.1 2001/04/20 20:51:22 donb Exp $ +} { + image_id:integer,notnull + sender:notnull + recipient:notnull + subject:notnull + message:notnull +} -properties { + recipient:onevalue + message:onevalue + url:onevalue +} + +set card_id [db_nextval postcard_seq] + +set pickup_code [ns_crypt $card_id foobar] + +db_dml add_message { + insert into postcards (card_id, pickup_code, card_picture, recipient, sender, message) + values (:card_id, :pickup_code, :image_id, :recipient, :sender, :message) +} + +db_0or1row select_card_id { + select max(card_id) as card_id from postcards +} + +set url "[util_current_location][ad_conn package_url]show-card?pickup_code=$pickup_code" + + +# If we're doing Japanese, encode the subject line in MIME 7bit ISO-2022-JP + +if { [string compare [string tolower [ns_config ns/parameters DefaultCharset ""]] "shift_jis"] == 0} { + set subject [encoding convertto "iso2022-jp" $subject] + set subject [ns_uuencode $subject] + set subject "=?ISO-2022-JP?B?$subject?=" +} + +set message " +You have received a postcard from $sender. + +You may go to $url to pick up your card! + +" +ns_sendmail $recipient $sender $subject $message + Index: openacs-4/contrib/obsolete-packages/postcard/www/show-card.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/show-card.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/show-card.adp 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,24 @@ + + + + + + + + + + + + + +
      + To: @recipient@ +
      + From: @sender@ +
      + Message:
      + <% + regsub -all "\n" $message "
      " formatted_message + adp_puts $formatted_message + %> +
      Index: openacs-4/contrib/obsolete-packages/postcard/www/show-card.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/show-card.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/show-card.tcl 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,34 @@ +# show-card.tcl + +ad_page_contract { + show a postcard + + @author hqm@ai.mit.edu + @creation-date 2000-10-23 + @cvs-id $Id: show-card.tcl,v 1.1 2001/04/20 20:51:22 donb Exp $ +} { + pickup_code:notnull +} -properties { + image_id:onevalue + sender:onevalue + recipient:onevalue + message:onevalue +} + +# Get Record +db_0or1row select_card_id { + select card_id, card_picture as image_id, recipient, sender, message, picked_up + from postcards + where pickup_code = :pickup_code +} + +# Set picked_up date +if [empty_string_p $picked_up] { + db_dml set_date { + update postcards + set picked_up = sysdate + where pickup_code = :pickup_code + } +} + +ad_return_template Index: openacs-4/contrib/obsolete-packages/postcard/www/write-card.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/write-card.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/write-card.adp 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,41 @@ + + +Write your message below +

      + +

      +

      +<%= [export_form_vars image_id] %> + + + + + + + + + + + + + + +
      + To: (email address) + + +
      + From: (email address) + + +
      + Subject + + +
      + Message
      + +
      + +
      +
      Index: openacs-4/contrib/obsolete-packages/postcard/www/write-card.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/postcard/www/write-card.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/postcard/www/write-card.tcl 20 Apr 2001 20:51:22 -0000 1.1 @@ -0,0 +1,16 @@ +# write-card.tcl + +ad_page_contract { + compose a message + + @author hqm@ai.mit.edu + @creation-date 2000-10-23 + @cvs-id $Id: write-card.tcl,v 1.1 2001/04/20 20:51:22 donb Exp $ +} { + image_id:integer,notnull +} -properties { + image_id:onevalue + image_value:onevalue +} + +ad_return_template Index: openacs-4/contrib/obsolete-packages/ticket-tracker/ticket-tracker.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/ticket-tracker.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/ticket-tracker.info 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,102 @@ + + + + + Ticket Tracker + Ticket Trackers + f + + + + oracle + postgresql + + Tony Tseng + Phong Nguyen + Ticket Tracker 4.0 + 2001-02-15 + ArsDigita Corporation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/category-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/category-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/category-create.sql 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,96 @@ +-- +-- packages/ticket-tracker/sql/category-create.sql +-- +-- +-- @author Tony Tseng (tony@arsidigta.com) +-- @author Phong Nguyen (phong@arsdigita.com) +-- +-- @creation-date 2000-11-16 +-- +-- @cvs-id $Id: category-create.sql,v 1.1 2001/04/20 20:51:25 donb Exp $ +-- + +---------------------------------- +-- KNOWLEDGE LEVEL OBJECTS +---------------------------------- +declare + attr_id acs_attributes.attribute_id%TYPE; +begin + acs_object_type.create_type ( + object_type => 'ttracker_category', + pretty_name => 'Ticket Tracker Category', + pretty_plural => 'Ticket Tracker Categories', + supertype => 'acs_object', + table_name => 'ttracker_categories', + id_column => 'category_id', + package_name => 'ttracker_category', + name_method => 'ttracker_category.name' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'ttracker_category', + attribute_name => 'name', + datatype => 'string', + pretty_name => 'Name', + pretty_plural => 'Names' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'ttracker_category', + attribute_name => 'description', + datatype => 'string', + pretty_name => 'Description', + pretty_plural => 'Descriptions' + ); +end; +/ +show errors + +---------------------------------- +-- OPERATIONAL LEVEL +---------------------------------- + +create table ttracker_categories ( + category_id integer + constraint ttracker_categories_pk + primary key + constraint ttracker_categories_fk + references acs_objects(object_id) on delete cascade, + package_id constraint ttkr_cat_package_id_fk + references apm_packages (package_id) on delete cascade + constraint ttkr_cat_package_id_nn + not null, + name varchar2(100) + constraint ttracker_categories_name_nn + not null, + description varchar2(4000), + default_assignee constraint ttracker_categories_assgn_fk + references parties(party_id) +); + +-- to prevent ttracker_categories from getting locked when persons table is being updated +create index ttkr_cat_assignee_idx on ttracker_categories (default_assignee); + +-- to speed up duplication check +create index ttkr_cat_upper_name_idx on ttracker_categories upper(name); + +-- people often query ttracker_categories to find out the categories within a package +create unique index ttkr_cat_pkg_name_cat_idx on ttracker_categories (package_id, name, category_id); + +comment on table ttracker_categories is ' + This table holds information about ticket tracker categories +'; +comment on column ttracker_categories.package_id is ' + The package instance that contains this category. + Right now it is set as "on delete cascade" + so that we can delete the instance of the package right after we mount it +'; +comment on column ttracker_categories.name is ' + The name of the category +'; +comment on column ttracker_categories.description is ' + The detailed description of the category +'; +comment on column ttracker_categories.default_assignee is ' + The default assignee of this category. +'; Index: openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/options-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/options-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/options-create.sql 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,63 @@ +-- +-- packages/ticket-tracker/sql/options-create.sql +-- +-- +-- @author Phong Nguyen (phong@arsdigita.com) +-- @author Tony Tseng (tony@arsidigta.com) +-- +-- @creation-date 2000-12-15 +-- +-- @cvs-id $Id: options-create.sql,v 1.1 2001/04/20 20:51:25 donb Exp $ +-- + +create table ttracker_options ( + option_id integer + constraint ttracker_options_pk + primary key, + name varchar2(100) + constraint ttkr_options_name_nn + not null, + value integer + constraint ttkr_options_value_nn + not null, + package_id integer + constraint ttkr_options_package_id_fk + references apm_packages(package_id) on delete cascade, + function varchar2(10) + constraint ttkr_options_function_nn + not null + constraint ttkr_options_function_ck + check (function in ('severity', 'priority')), + constraint ttkr_opt_pkg_fun_val_un unique(package_id, function, value), + constraint ttkr_opt_pkg_fun_nam_un unique(package_id, function, name) +); + +-- generating a sequence for the primary key +-- since we're not using acs_object +create sequence ttracker_option_id_seq; + +comment on table ttracker_options is ' + A table to store priority/severity options. + Basically just pairs of name/value. +'; + +comment on column ttracker_options.option_id is ' + The integer primary key. +'; + +comment on column ttracker_options.package_id is ' + The package instance that uses this option. +'; + +comment on column ttracker_options.name is ' + The user readable name of the priority/severity option. +'; + +comment on column ttracker_options.value is ' + The actual integer value of the priority/severity +'; + +comment on column ttracker_options.function is ' + The function of this entry. Either priority or severity +'; + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ticket-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ticket-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ticket-create.sql 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,125 @@ +-- +-- packages/ticket-tracker/sql/ticket-create.sql +-- +-- +-- @author Phong Nguyen (phong@arsdigita.com) +-- @author Tony Tseng (tony@arsidigta.com) +-- +-- @creation-date 2000-11-15 +-- +-- @cvs-id $Id: ticket-create.sql,v 1.1 2001/04/20 20:51:25 donb Exp $ +-- + +---------------------------------- +-- KNOWLEDGE LEVEL OBJECTS +---------------------------------- +declare + attr_id acs_attributes.attribute_id%TYPE; +begin + acs_object_type.create_type ( + object_type => 'ttracker_ticket', + pretty_name => 'Ticket Tracker Ticket', + pretty_plural => 'Ticket Tracker Tickets', + supertype => 'acs_message', + table_name => 'ttracker_tickets', + id_column => 'ticket_id', + package_name => 'ttracker_ticket', + name_method => 'ttracker_ticket.name' + ); + attr_id := acs_attribute.create_attribute ( + object_type => 'ttracker_ticket', + attribute_name => 'category_id', + datatype => 'integer', + pretty_name => 'Category ID', + pretty_plural => 'Category IDs' + ); + attr_id := acs_attribute.create_attribute ( + object_type => 'ttracker_ticket', + attribute_name => 'subject', + datatype => 'string', + pretty_name => 'Subject', + pretty_plural => 'Subjects' + ); + attr_id := acs_attribute.create_attribute ( + object_type => 'ttracker_ticket', + attribute_name => 'severity', + datatype => 'integer', + pretty_name => 'Severity', + pretty_plural => 'Severities' + ); + attr_id := acs_attribute.create_attribute ( + object_type => 'ttracker_ticket', + attribute_name => 'priority', + datatype => 'integer', + pretty_name => 'Priority', + pretty_plural => 'Priorities' + ); +end; +/ +show errors + +---------------------------------- +-- OPERATIONAL LEVEL +---------------------------------- + +create table ttracker_tickets ( + ticket_id integer + constraint ttkr_tkt_pk + primary key + constraint ttkr_tkt_fk + references acs_messages (message_id) on delete cascade, + category_id integer + constraint ttkr_tkt_category_id_fk + references ttracker_categories (category_id) on delete cascade, + creation_user constraint ttkr_tkt_creation_user_fk + references persons(person_id) + constraint ttkr_tkt_creation_user_nn + not null, + creation_date date default sysdate + constraint ttkr_tkt_date_nn + not null, + subject varchar2(1000) + constraint ttkr_tkt_subject_nn + not null, + severity integer + constraint ttkr_tkt_severity_nn + not null, + priority integer + constraint ttkr_tkt_priority_nn + not null +); + +-- to prevent ttracker_tickets from getting locked when ttracker_categories table is being updated +create index tt_category_id_idx on ttracker_tickets (category_id); + +-- to prevent ttracker_tickets from getting locked when persons table is being updated +create index tt_creation_user_idx on ttracker_tickets (creation_user); + +comment on table ttracker_tickets is ' + The contents of a ticket is stored as an acs-message. This table + extends the the acs_messages table to hold additional knowledge + level attributes for a ticket type. +'; +comment on column ttracker_tickets.creation_user is ' + The id of the user who submitted the ticket. It is stored + redundantly to avoid joining acs-objects. +'; +comment on column ttracker_tickets.creation_date is ' + The creation date of the ticket. It is stored redundantly to + avoid joining against cr_items and cr_revisions. +'; +comment on column ttracker_tickets.category_id is ' + The id of the category to associate this ticket to. +'; +comment on column ttracker_tickets.subject is ' + The subject of the ticket. It is stored redundantly to avoid + joining against cr_items and cr_revisions. +'; +comment on column ttracker_tickets.severity is ' + The severity level of the ticket. +'; +comment on column ttracker_tickets.priority is ' + The priority level of the ticket. +'; + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ticket-tracker-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ticket-tracker-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ticket-tracker-create.sql 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,21 @@ +-- +-- packages/ticket-tracker/sql/ticket-tracker-create.sql +-- +-- +-- @author Phong Nguyen (phong@arsdigita.com) +-- @author Tony Tseng (tony@arsidigta.com) +-- +-- @creation-date 2000-11-15 +-- +-- @cvs-id $Id: ticket-tracker-create.sql,v 1.1 2001/04/20 20:51:25 donb Exp $ +-- + +@@ options-create.sql +@@ category-create.sql +@@ ticket-create.sql +@@ ttracker-workflow-create.sql +@@ ticket-tracker-packages.sql + + + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ticket-tracker-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ticket-tracker-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ticket-tracker-drop.sql 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,63 @@ +-- +-- packages/ticket-tracker/sql/ttracker-drop.sql +-- +-- +-- @author Phong Nguyen (phong@arsdigita.com) +-- @author Tony Tseng (tony@arsidigta.com) +-- +-- @creation-date 2000-11-15 +-- +-- @cvs-id $Id: ticket-tracker-drop.sql,v 1.1 2001/04/20 20:51:25 donb Exp $ +-- + +-- drop the workflow process +@@ ttracker-workflow-drop.sql + +declare + -- the cursor to iterate through all comments on tickets + cursor comment_cur is + select gc.comment_id + from general_comments gc, + ttracker_tickets tt + where gc.object_id = tt.ticket_id; + + -- the curser to iterate through all tickets + cursor ticket_cur is + select ticket_id + from ttracker_tickets; + -- the cursor to iterate through all categories + cursor category_cur is + select category_id + from ttracker_categories; +begin + -- delete all comments on tickets + for comment_rec in comment_cur loop + acs_message.delete(comment_rec.comment_id); + end loop; + + -- delete all tickets + for ticket_rec in ticket_cur loop + ttracker_ticket.delete(ticket_rec.ticket_id); + end loop; + + -- delete all categories + for category_rec in category_cur loop + ttracker_category.delete(category_rec.category_id); + end loop; + + acs_object_type.drop_type ('ttracker_ticket'); + acs_object_type.drop_type ('ttracker_category'); +end; +/ +show errors + +drop table ttracker_tickets; +drop table ttracker_categories; +drop table ttracker_options; + +drop sequence ttracker_option_id_seq; + +drop package ttracker_util; +drop package ttracker_callback; +drop package ttracker_category; +drop package ttracker_ticket; Index: openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ticket-tracker-packages.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ticket-tracker-packages.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ticket-tracker-packages.sql 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,877 @@ +-- +-- packages/ticket-tracker/sql/ticket-tracker-packages.sql +-- +-- +-- @author Phong Nguyen (phong@arsdigita.com) +-- @author Tony Tseng (tony@arsidigta.com) +-- +-- @creation-date 2000-11-30 +-- +-- @cvs-id $Id: ticket-tracker-packages.sql,v 1.1 2001/04/20 20:51:25 donb Exp $ +-- + +---------------------------------- +-- PACKAGE HEADERS +---------------------------------- + +create or replace package ttracker_ticket +as + function new ( + ticket_id in ttracker_tickets.ticket_id%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'ttracker_ticket', + context_id in acs_objects.context_id%TYPE default null, + subject in cr_revisions.title%TYPE, + description in varchar2, + mime_type in cr_revisions.mime_type%TYPE default 'text/plain', + category_id in ttracker_categories.category_id%TYPE, + severity in ttracker_tickets.severity%TYPE, + priority in ttracker_tickets.priority%TYPE, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE, + creation_ip in acs_objects.creation_ip%TYPE default null + ) return ttracker_tickets.ticket_id%TYPE; + + procedure delete ( + ticket_id in ttracker_tickets.ticket_id%TYPE + ); + + function name ( + ticket_id in ttracker_tickets.ticket_id%TYPE + ) return varchar2; + + -- return 't' if the ticket id is valid and the ticket belongs to the package instance + function id_valid_p ( + ticket_id in ttracker_tickets.ticket_id%TYPE, + package_id in apm_packages.package_id%TYPE + ) return char; + + -- update mime_type, subject, and description + -- (the fields that are not directly stored in ttracker_tickets table) + -- note this procedure does NOT update the subject field in ttracker_tickets + procedure update_mime_subj_desc ( + ticket_id in ttracker_tickets.ticket_id%TYPE, + mime_type in cr_revisions.mime_type%TYPE, + subject in cr_revisions.title%TYPE, + description in varchar2 + ); + +end ttracker_ticket; +/ +show errors + + +create or replace package ttracker_category +as + + function new ( + category_id in ttracker_categories.category_id%TYPE default null, + package_id in ttracker_categories.package_id%TYPE, + object_type in acs_objects.object_type%TYPE default 'ttracker_category', + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null, + name in ttracker_categories.name%TYPE, + default_assignee in ttracker_categories.default_assignee%TYPE default null, + description in ttracker_categories.description%TYPE default null + ) return acs_objects.object_id%TYPE; + + procedure delete ( + category_id in ttracker_categories.category_id%TYPE + ); + + function name ( + category_id in ttracker_categories.category_id%TYPE + ) return varchar2; + +end ttracker_category; +/ +show errors + +create or replace package ttracker_option +as + -- to add a priority or severity option + procedure add_option ( + option_id in ttracker_options.option_id%TYPE default null, + package_id in ttracker_options.package_id%TYPE, + function in ttracker_options.function%TYPE, + name in ttracker_options.name%TYPE, + value in ttracker_options.value%TYPE + ); + + -- to update a priority or severity option + procedure update_option ( + option_id in ttracker_options.option_id%TYPE, + name in ttracker_options.name%TYPE, + value in ttracker_options.value%TYPE + ); + + -- given the package_id, function, and value + -- return the human readable name of the option + function option_name ( + package_id in ttracker_options.package_id%TYPE, + function in ttracker_options.function%TYPE, + value in ttracker_options.value%TYPE + ) return ttracker_options.name%TYPE; + + -- given the package_id, function, and name + -- return the integer value + function option_value ( + package_id in ttracker_options.package_id%TYPE, + function in ttracker_options.function%TYPE, + name in ttracker_options.value%TYPE + ) return ttracker_options.value%TYPE; + +end ttracker_option; +/ +show errors + +create or replace package ttracker_util +as + -- return the value of the NotificationSender parameter + function notification_sender ( + package_id in apm_packages.package_id%TYPE + ) return parties.party_id%TYPE; + + -- depending on the argument, it can return either absolute or relative url + -- pointing to acs-workflow + function workflow_url ( + absolute_p in char default 't' + ) return varchar2; + + -- installs the default category and priority/severity info + procedure install ( + package_id in apm_packages.package_id%TYPE + ); + +end ttracker_util; +/ +show errors + +-- This package contains callbacks used by acs-workflow +create or replace package ttracker_callback +as + -- assign the task to the ticket submitter + procedure assign_task_to_submitter ( + task_id in number, + custom_arg in varchar2 + ); + + -- assign the task to the ticket assignee + procedure assign_task_to_assignee ( + task_id in number, + custom_arg in varchar2 + ); + + -- set need_clarification to 'f' + procedure clarify_fire ( + case_id in number, + transition_key in varchar2, + custom_arg in varchar2 + ); + + -- set verified to 't' + procedure resolve_fire ( + case_id in number, + transition_key in varchar2, + custom_arg in varchar2 + ); + + procedure notification ( + task_id in number, + custom_arg in varchar2, + party_to in integer, + party_from in out integer, + subject in out varchar2, + body in out varchar2 + ); + + -- unassigned callback + -- email the admin when a task is unassigned + procedure notify_admin ( + task_id in number, + custom_arg in varchar2 + ); + +end ttracker_callback; +/ +show errors + +---------------------------------- +-- PACKAGE BODIES +---------------------------------- + +create or replace package body ttracker_ticket +as + function new ( + ticket_id in ttracker_tickets.ticket_id%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'ttracker_ticket', + context_id in acs_objects.context_id%TYPE default null, + subject in cr_revisions.title%TYPE, + description in varchar2, + mime_type in cr_revisions.mime_type%TYPE default 'text/plain', + category_id in ttracker_categories.category_id%TYPE, + severity in ttracker_tickets.severity%TYPE, + priority in ttracker_tickets.priority%TYPE, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE, + creation_ip in acs_objects.creation_ip%TYPE default null + ) return ttracker_tickets.ticket_id%TYPE + is + v_ticket_id ttracker_tickets.ticket_id%TYPE; + v_case_id wf_cases.case_id%TYPE; + begin + -- create a new acs-message to hold the contents of the ticket + v_ticket_id := acs_message.new ( + message_id => new.ticket_id, + title => new.subject, + text => new.description, + mime_type => new.mime_type, + context_id => new.context_id, + object_type => new.object_type, + creation_date => new.creation_date, + creation_user => new.creation_user, + creation_ip => new.creation_ip + ); + -- insert additional ticket info + insert into ttracker_tickets + (ticket_id, + creation_user, + creation_date, + category_id, + subject, + severity, + priority) + values + (v_ticket_id, + new.creation_user, + new.creation_date, + new.category_id, + new.subject, + new.severity, + new.priority); + + -- create a new case + v_case_id := workflow_case.new ( + workflow_key => 'ttracker_wf', + object_id => v_ticket_id, + creation_user => new.creation_user, + creation_ip => new.creation_ip + ); + + -- start the case + workflow_case.start_case ( + case_id => v_case_id, + creation_user => new.creation_user, + creation_ip => new.creation_ip + ); + + return v_ticket_id; + end new; + + procedure delete ( + ticket_id in ttracker_tickets.ticket_id%TYPE + ) + is + cursor case_cur is + select case_id + from wf_cases + where object_id = ticket_id; + case_rec case_cur%ROWTYPE; + begin + open case_cur; + fetch case_cur into case_rec; + + -- delete the workflow case that's associated with this ticket + + if case_cur%FOUND then + workflow_case.delete(case_rec.case_id); + end if; + + close case_cur; + acs_message.delete(ticket_id); + end delete; + + function name ( + ticket_id in ttracker_tickets.ticket_id%TYPE + ) return varchar2 + is + v_result ttracker_tickets.subject%TYPE; + begin + select subject into v_result + from ttracker_tickets + where ticket_id = name.ticket_id; + + return v_result; + end name; + + function id_valid_p ( + ticket_id in ttracker_tickets.ticket_id%TYPE, + package_id in apm_packages.package_id%TYPE + ) return char + is + v_result char(1); + begin + select decode(count(tt.ticket_id), 0, 'f', 't') into v_result + from ttracker_tickets tt + where exists (select tc.category_id + from ttracker_categories tc + where tc.category_id = tt.category_id + and tc.package_id = id_valid_p.package_id) + and tt.ticket_id = id_valid_p.ticket_id; + + return v_result; + end id_valid_p; + + procedure update_mime_subj_desc ( + ticket_id in ttracker_tickets.ticket_id%TYPE, + mime_type in cr_revisions.mime_type%TYPE, + subject in cr_revisions.title%TYPE, + description in varchar2 + ) + is + v_cr_revision_id cr_revisions.revision_id%TYPE; + begin + v_cr_revision_id := content_revision.new ( + title => subject, + mime_type => update_mime_subj_desc.mime_type, + text => description, + item_id => ticket_id + ); + content_item.set_live_revision(v_cr_revision_id); + end update_mime_subj_desc; + +end ttracker_ticket; +/ +show errors + + +create or replace package body ttracker_category +as + + function new ( + category_id in ttracker_categories.category_id%TYPE default null, + package_id in ttracker_categories.package_id%TYPE, + object_type in acs_objects.object_type%TYPE default 'ttracker_category', + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null, + name in ttracker_categories.name%TYPE, + default_assignee in ttracker_categories.default_assignee%TYPE default null, + description in ttracker_categories.description%TYPE default null + ) return acs_objects.object_id%TYPE + is + v_category_id acs_objects.object_id%TYPE; + begin + v_category_id := acs_object.new ( + object_id => new.category_id, + object_type => new.object_type, + creation_date => new.creation_date, + creation_user => new.creation_user, + context_id => new.context_id + ); + insert into ttracker_categories (category_id, package_id, name, default_assignee, description) + values (v_category_id, new.package_id, new.name, new.default_assignee, new.description); + return v_category_id; + end new; + + procedure delete ( + category_id in ttracker_categories.category_id%TYPE + ) + is + v_ticket_number integer; + begin + -- check if any ticket exists for this category before deleting + select decode(count(ticket_id), 0, 0, 1) into v_ticket_number + from ttracker_tickets + where category_id = ttracker_category.delete.category_id; + + if v_ticket_number > 0 then + raise_application_error(-20000, 'Invalid severity.'); + end if; + + acs_object.delete(category_id); + end delete; + + function name ( + category_id in ttracker_categories.category_id%TYPE + ) return varchar2 + is + v_result ttracker_categories.name%TYPE; + begin + select name into v_result + from ttracker_categories + where category_id = name.category_id; + + return v_result; + end name; + +end ttracker_category; +/ +show errors + +create or replace package body ttracker_option +as + procedure add_option ( + option_id in ttracker_options.option_id%TYPE default null, + package_id in ttracker_options.package_id%TYPE, + function in ttracker_options.function%TYPE, + name in ttracker_options.name%TYPE, + value in ttracker_options.value%TYPE + ) + is + v_option_id ttracker_options.option_id%TYPE; + begin + if package_id is null or function is null or name is null or value is null then + raise_application_error(-2000, 'Arguments, with the exception of option_id, cannot be null'); + end if; + + if option_id is null then + select ttracker_option_id_seq.nextval into v_option_id + from dual; + else + v_option_id := add_option.option_id; + end if; + + insert into ttracker_options (option_id, package_id, function, name, value) values + (v_option_id, add_option.package_id, add_option.function, add_option.name, add_option.value); + + end add_option; + + procedure update_option ( + option_id in ttracker_options.option_id%TYPE, + name in ttracker_options.name%TYPE, + value in ttracker_options.value%TYPE + ) + is + begin + if option_id is null or name is null or value is null then + raise_application_error(-2000, 'Arguments cannot be null'); + end if; + + update ttracker_options + set name = update_option.name, + value = update_option.value + where option_id = update_option.option_id; + + end update_option; + + function option_name ( + package_id in ttracker_options.package_id%TYPE, + function in ttracker_options.function%TYPE, + value in ttracker_options.value%TYPE + ) return ttracker_options.name%TYPE + is + cursor option_cur is + select name + from ttracker_options + where package_id = option_name.package_id + and function = option_name.function + and value = option_name.value; + option_rec option_cur%ROWTYPE; + begin + open option_cur; + fetch option_cur into option_rec; + if option_cur%NOTFOUND then + close option_cur; + raise_application_error(-20000, 'Invalid option.'); + end if; + close option_cur; + return option_rec.name; + end option_name; + + -- given the package_id, function, and name + -- return the integer value + function option_value ( + package_id in ttracker_options.package_id%TYPE, + function in ttracker_options.function%TYPE, + name in ttracker_options.value%TYPE + ) return ttracker_options.value%TYPE + is + cursor option_cur is + select value + from ttracker_options + where package_id = option_value.package_id + and function = option_value.function + and upper(name) = upper(option_value.name); + option_rec option_cur%ROWTYPE; + begin + open option_cur; + fetch option_cur into option_rec; + if option_cur%NOTFOUND then + raise_application_error(-20000, 'Invalid option.'); + end if; + close option_cur; + return option_rec.value; + end option_value; + +end ttracker_option; +/ +show errors + +create or replace package body ttracker_util +as + function notification_sender ( + package_id in apm_packages.package_id%TYPE + ) return parties.party_id%TYPE + is + cursor value_cur is + select apv.attr_value + from apm_parameter_values apv, + apm_parameters ap + where apv.package_id = notification_sender.package_id + and ap.package_key = 'ticket-tracker' + and ap.parameter_name = 'NotificationSender'; + value_rec value_cur%ROWTYPE; + v_result parties.party_id%TYPE; + begin + open value_cur; + fetch value_cur into value_rec; + if value_cur%NOTFOUND then + v_result := -1; + else + v_result := to_number(value_rec.attr_value); + end if; + close value_cur; + + return v_result; + + -- in case somebody tempered with the parameter + exception + when others then + return -1; + end notification_sender; + + function workflow_url ( + absolute_p in char default 't' + ) return varchar2 + is + v_system_url apm_parameter_values.attr_value%TYPE; + cursor node_cur is + select sn.node_id + from site_nodes sn, + apm_packages ap + where ap.package_key = 'acs-workflow' + and sn.object_id = ap.package_id; + node_rec node_cur%ROWTYPE; + begin + -- try to get the id of the site node that contains acs workflow + open node_cur; + fetch node_cur into node_rec; + if node_cur%NOTFOUND then + close node_cur; + raise_application_error(-20000, 'ACS Workflow must be mounted'); + end if; + close node_cur; + + -- if only relative url is needed + if absolute_p <> 't' then + return site_node.url(node_rec.node_id); + end if; + + -- since there's only 1 instance of the kernel + -- it's ok to use select.. into.. + select apv.attr_value into v_system_url + from apm_parameter_values apv, + apm_parameters ap + where ap.package_key = 'acs-kernel' + and ap.parameter_name = 'SystemURL' + and ap.parameter_id = apv.parameter_id; + + return v_system_url||site_node.url(node_rec.node_id); + + end workflow_url; + + procedure install ( + package_id in apm_packages.package_id%TYPE + ) + is + v_category_id ttracker_categories.category_id%TYPE; + v_ttracker_url varchar2(4000); + v_cat_cnt integer; + begin + -- check if there's any existing category + -- if yes, quit + select count(category_id) into v_cat_cnt + from ttracker_categories + where package_id = install.package_id; + if v_cat_cnt > 0 then + return; + end if; + + -- create the default category + v_category_id := ttracker_category.new ( + package_id => install.package_id, + name => 'General', + description => 'Default category' + ); + + -- insert the default severity/priority info + ttracker_option.add_option ( + package_id => install.package_id, + function => 'severity', + name => 'critical', + value => 0 + ); + + ttracker_option.add_option ( + package_id => install.package_id, + function => 'severity', + name => 'serious', + value => 1 + ); + + ttracker_option.add_option ( + package_id => install.package_id, + function => 'severity', + name => 'medium', + value => 2 + ); + + ttracker_option.add_option ( + package_id => install.package_id, + function => 'severity', + name => 'low', + value => 3 + ); + + ttracker_option.add_option ( + package_id => install.package_id, + function => 'severity', + name => 'wishlist', + value => 4 + ); + + ttracker_option.add_option ( + package_id => install.package_id, + function => 'priority', + name => 'high', + value => 0 + ); + + ttracker_option.add_option ( + package_id => install.package_id, + function => 'priority', + name => 'medium', + value => 1 + ); + + ttracker_option.add_option ( + package_id => install.package_id, + function => 'priority', + name => 'low', + value => 2 + ); + + end install; + +end ttracker_util; +/ +show errors + +create or replace package body ttracker_callback +as + procedure assign_task_to_submitter ( + task_id in number, + custom_arg in varchar2 + ) + is + cursor ticket_cur is + select tt.creation_user, + wt.case_id, + wt.transition_key + from ttracker_tickets tt, + wf_tasks wt, + wf_cases wc + where wt.task_id = assign_task_to_submitter.task_id + and wt.case_id = wc.case_id + and wc.object_id = tt.ticket_id; + ticket_rec ticket_cur%ROWTYPE; + begin + -- find the creation user of the ticket (submitter) + open ticket_cur; + fetch ticket_cur into ticket_rec; + close ticket_cur; + + -- assign the task to the ticket submitter + workflow_case.add_task_assignment(assign_task_to_submitter.task_id, ticket_rec.creation_user); + workflow_case.add_manual_assignment ( + case_id => ticket_rec.case_id, + transition_key => ticket_rec.transition_key, + party_id => ticket_rec.creation_user + ); + + end assign_task_to_submitter; + + procedure assign_task_to_assignee ( + task_id in number, + custom_arg in varchar2 + ) + is + cursor assignee_cur is + select tc.default_assignee, + wt.case_id, + wt.transition_key + from wf_tasks wt, + wf_cases wc, + ttracker_tickets tt, + ttracker_categories tc + where wt.task_id = assign_task_to_assignee.task_id + and wt.case_id = wc.case_id + and wc.object_id = tt.ticket_id + and tt.category_id = tc.category_id; + assignee_rec assignee_cur%ROWTYPE; + begin + + open assignee_cur; + fetch assignee_cur into assignee_rec; + close assignee_cur; + + if assignee_rec.default_assignee is null then + return; + end if; + + -- assign the task + workflow_case.add_task_assignment(assign_task_to_assignee.task_id, assignee_rec.default_assignee); + workflow_case.add_manual_assignment ( + case_id => assignee_rec.case_id, + transition_key => assignee_rec.transition_key, + party_id => assignee_rec.default_assignee + ); + + end assign_task_to_assignee; + + procedure clarify_fire ( + case_id in number, + transition_key in varchar2, + custom_arg in varchar2 + ) + is + v_journal_id journal_entries.journal_id%TYPE; + begin + v_journal_id := journal_entry.new ( + object_id => case_id, + action => 'modify', + action_pretty => 'Attribute Change', + msg => 'Automatic action by the workflow process' + ); + workflow_case.set_attribute_value ( + journal_id => v_journal_id, + attribute_name => 'need_clarification', + value => 'f' + ); + end clarify_fire; + + procedure resolve_fire ( + case_id in number, + transition_key in varchar2, + custom_arg in varchar2 + ) + is + v_journal_id journal_entries.journal_id%TYPE; + begin + v_journal_id := journal_entry.new ( + object_id => case_id, + action => 'modify', + action_pretty => 'Attribute Change', + msg => 'Automatic action by the workflow process' + ); + workflow_case.set_attribute_value ( + journal_id => v_journal_id, + attribute_name => 'verified', + value => 't' + ); + end resolve_fire; + + procedure notification ( + task_id in number, + custom_arg in varchar2, + party_to in integer, + party_from in out integer, + subject in out varchar2, + body in out varchar2 + ) + is + v_url varchar2(1000); + cursor ticket_cur is + select tt.ticket_id, + tt.subject, + tc.package_id + from ttracker_tickets tt, + ttracker_categories tc, + wf_tasks wt, + wf_cases wc + where wt.task_id = notification.task_id + and wt.case_id = wc.case_id + and wc.object_id = tt.ticket_id + and tt.category_id = tc.category_id; + ticket_rec ticket_cur%ROWTYPE; + begin + open ticket_cur; + fetch ticket_cur into ticket_rec; + if ticket_cur%NOTFOUND then + close ticket_cur; + raise_application_error(-20000, 'Invalid task id'); + end if; + close ticket_cur; + + party_from := ttracker_util.notification_sender(ticket_rec.package_id); + subject := 'Ticket #'||ticket_rec.ticket_id||' -- '||custom_arg; + body := 'Subject: '||ticket_rec.subject||' +'||'To do: '||custom_arg||' +'||'Manage via: '||ttracker_util.workflow_url||'task?task_id='||task_id; + + end notification; + + procedure notify_admin ( + task_id in number, + custom_arg in varchar2 + ) + is + -- uses 2 separate queries to find out who has 'admin' privilege on this package + -- because we don't want to join any table with acs_object_party_privilege_map + -- unless we absolutely have to (in this case, users table) + -- the first query is only used to gather ticket info and package id + cursor ticket_cur is + select tt.ticket_id, + tt.subject, + tc.package_id + from ttracker_tickets tt, + ttracker_categories tc, + wf_cases wc, + wf_tasks wt + where wt.task_id = notify_admin.task_id + and wc.case_id = wt.case_id + and wc.object_id = tt.ticket_id + and tt.category_id = tc.category_id; + ticket_rec ticket_cur%ROWTYPE; + cursor admin_cur is + select u.user_id + from users u, + acs_object_party_privilege_map m + where m.object_id = ticket_rec.package_id + and m.party_id = u.user_id + and m.privilege = 'admin'; + v_request_id integer; + begin + open ticket_cur; + fetch ticket_cur into ticket_rec; + close ticket_cur; + for admin_rec in admin_cur loop + v_request_id := nt.post_request ( + party_from => ttracker_util.notification_sender(ticket_rec.package_id), + party_to => admin_rec.user_id, + expand_group => 'f', + subject => 'Ticket #'||ticket_rec.ticket_id||' -- '||'Assign Ticket', + message => 'Subject: '||ticket_rec.subject||' +'||'To do: '||'Assign Ticket'||' +'||'Manage via: '||ttracker_util.workflow_url||'task?task_id='||task_id, + max_retries => 3 + ); + end loop; + end notify_admin; + +end ttracker_callback; +/ +show errors Index: openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ttracker-workflow-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ttracker-workflow-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ttracker-workflow-create.sql 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,351 @@ +-- +-- packages/ticket-tracker/sql/ttracker-workflow-create.sql +-- +-- +-- @author Phong Nguyen (phong@arsdigita.com) +-- @author Tony Tseng (tony@arsidigta.com) +-- +-- @creation-date 2000-11-15 +-- +-- @cvs-id $Id: ttracker-workflow-create.sql,v 1.1 2001/04/20 20:51:25 donb Exp $ +-- + +-- This table will hold one row for each case using this workflow. +create table wf_ttracker_cases ( + case_id integer + constraint wf_ttkr_cases_pk + primary key + constraint wf_ticket_cases_case_fk + references wf_cases +); + + +declare + v_workflow_key wf_workflows.workflow_key%TYPE; +begin + v_workflow_key := workflow.create_workflow( + workflow_key => 'ttracker_wf', + pretty_name => 'Ticket Tracker Process', + pretty_plural => 'Ticket Tracker Process', + description => 'Workflow for processing a ticket in the ticket-tracker', + table_name => 'wf_ttracker_cases' + ); + + -- Creating places + workflow.add_place ( + workflow_key => 'ttracker_wf', + place_key => 'start', + place_name => 'Needs to be resolved', + sort_order => 1 + ); + workflow.add_place ( + workflow_key => 'ttracker_wf', + place_key => 'to_be_clarified', + place_name => 'Needs to be clarified', + sort_order => 2 + ); + workflow.add_place ( + workflow_key => 'ttracker_wf', + place_key => 'to_be_verified', + place_name => 'Needs to be verified', + sort_order => 3 + ); + workflow.add_place ( + workflow_key => 'ttracker_wf', + place_key => 'end', + place_name => 'Closed', + sort_order => 4 + ); + + -- Creating transitions + workflow.add_transition ( + workflow_key => 'ttracker_wf', + transition_key => 'resolve', + transition_name => 'Resolve ticket', + sort_order => 1, + trigger_type => 'user' + ); + workflow.add_transition ( + workflow_key => 'ttracker_wf', + transition_key => 'clarify', + transition_name => 'Clarify ticket description', + sort_order => 2, + trigger_type => 'user' + ); + workflow.add_transition ( + workflow_key => 'ttracker_wf', + transition_key => 'verify', + transition_name => 'Verify result', + sort_order => 3, + trigger_type => 'user' + ); +end; +/ +show errors + +begin + -- creating arcs + -- resolve in + -- in + workflow.add_arc ( + workflow_key => 'ttracker_wf', + transition_key => 'resolve', + place_key => 'start', + direction => 'in' + ); + -- out + workflow.add_arc ( + workflow_key => 'ttracker_wf', + transition_key => 'resolve', + place_key => 'to_be_clarified', + direction => 'out', + guard_callback => 'wf_callback.guard_attribute_true', + guard_custom_arg => 'need_clarification', + guard_description => 'Description needs clarification' + ); + workflow.add_arc ( + workflow_key => 'ttracker_wf', + transition_key => 'resolve', + place_key => 'to_be_verified', + direction => 'out', + guard_callback => '#', + guard_description => 'Description clear; issue resolved' + ); + + -- verify + -- in + workflow.add_arc ( + workflow_key => 'ttracker_wf', + transition_key => 'verify', + place_key => 'to_be_verified', + direction => 'in' + ); + -- out + workflow.add_arc ( + workflow_key => 'ttracker_wf', + transition_key => 'verify', + place_key => 'end', + direction => 'out', + guard_callback => 'wf_callback.guard_attribute_true', + guard_custom_arg => 'verified', + guard_description => 'Result okay' + ); + workflow.add_arc ( + workflow_key => 'ttracker_wf', + transition_key => 'verify', + place_key => 'start', + direction => 'out', + guard_callback => '#', + guard_custom_arg => '', + guard_description => 'Result not okay' + ); + + -- clarify + -- in + workflow.add_arc ( + workflow_key => 'ttracker_wf', + transition_key => 'clarify', + place_key => 'to_be_clarified', + direction => 'in' + ); + -- out + workflow.add_arc ( + workflow_key => 'ttracker_wf', + transition_key => 'clarify', + place_key => 'start', + direction => 'out' + ); + +end; +/ +show errors + +declare + v_attribute_id acs_attributes.attribute_id%TYPE; +begin + v_attribute_id := workflow.create_attribute( + workflow_key => 'ttracker_wf', + attribute_name => 'need_clarification', + datatype => 'boolean', + pretty_name => 'Description needs clarification', + default_value => 'f' + ); + + insert into wf_transition_attribute_map + (workflow_key, transition_key, attribute_id, sort_order) + values + ('ttracker_wf', 'resolve', v_attribute_id, 1); + + v_attribute_id := workflow.create_attribute( + workflow_key => 'ttracker_wf', + attribute_name => 'verified', + datatype => 'boolean', + pretty_name => 'Result is okay', + default_value => 't' + ); + + insert into wf_transition_attribute_map + (workflow_key, transition_key, attribute_id, sort_order) + values + ('ttracker_wf', 'verify', v_attribute_id, 1); +end; +/ +show errors + +insert into wf_context_transition_info ( + context_key, + workflow_key, + transition_key, + assignment_callback, + fire_callback, + notification_callback, + notification_custom_arg, + unassigned_callback, + access_privilege +) values ( + 'default', + 'ttracker_wf', + 'resolve', + 'ttracker_callback.assign_task_to_assignee', + 'ttracker_callback.resolve_fire', + 'ttracker_callback.notification', + 'Resolve Ticket', + 'ttracker_callback.notify_admin', + 'admin' +); + +insert into wf_context_transition_info ( + context_key, + workflow_key, + transition_key, + assignment_callback, + fire_callback, + notification_callback, + notification_custom_arg, + access_privilege +) values ( + 'default', + 'ttracker_wf', + 'clarify', + 'ttracker_callback.assign_task_to_submitter', + 'ttracker_callback.clarify_fire', + 'ttracker_callback.notification', + 'Clarify Description', + 'admin' +); + +insert into wf_context_transition_info ( + context_key, + workflow_key, + transition_key, + assignment_callback, + notification_callback, + notification_custom_arg, + access_privilege +) values ( + 'default', + 'ttracker_wf', + 'verify', + 'ttracker_callback.assign_task_to_submitter', + 'ttracker_callback.notification', + 'Verify Result', + 'admin' +); + + +insert into wf_context_task_panels ( + context_key, + workflow_key, + transition_key, + sort_key, + header, + template_url +) values ( + 'default', + 'ttracker_wf', + 'resolve', + 1, + 'Ticket Info', + '/packages/ticket-tracker/wf-templates/ticket-info' +); + +insert into wf_context_task_panels ( + context_key, + workflow_key, + transition_key, + sort_key, + header, + template_url +) values ( + 'default', + 'ttracker_wf', + 'resolve', + 2, + 'What to do', + '/packages/ticket-tracker/wf-templates/resolve' +); + +insert into wf_context_task_panels ( + context_key, + workflow_key, + transition_key, + sort_key, + header, + template_url +) values ( + 'default', + 'ttracker_wf', + 'clarify', + 1, + 'Ticket Info', + '/packages/ticket-tracker/wf-templates/ticket-info' +); + +insert into wf_context_task_panels ( + context_key, + workflow_key, + transition_key, + sort_key, + header, + template_url +) values ( + 'default', + 'ttracker_wf', + 'clarify', + 2, + 'What to do', + '/packages/ticket-tracker/wf-templates/clarify' +); + +insert into wf_context_task_panels ( + context_key, + workflow_key, + transition_key, + sort_key, + header, + template_url +) values ( + 'default', + 'ttracker_wf', + 'verify', + 1, + 'Ticket Info', + '/packages/ticket-tracker/wf-templates/ticket-info' +); + +insert into wf_context_task_panels ( + context_key, + workflow_key, + transition_key, + sort_key, + header, + template_url +) values ( + 'default', + 'ttracker_wf', + 'verify', + 2, + 'What to do', + '/packages/ticket-tracker/wf-templates/verify' +); + \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ttracker-workflow-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ttracker-workflow-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/sql/oracle/ttracker-workflow-drop.sql 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,25 @@ +-- +-- packages/ticket-tracker/sql/ttracker-workflow-drop.sql +-- +-- +-- @author Phong Nguyen (phong@arsdigita.com) +-- @author Tony Tseng (tony@arsidigta.com) +-- +-- @creation-date 2000-11-15 +-- +-- @cvs-id $Id: ttracker-workflow-drop.sql,v 1.1 2001/04/20 20:51:25 donb Exp $ +-- + +begin + workflow.delete_cases('ttracker_wf'); +end; +/ +show errors + +drop table wf_ttracker_cases; + +begin + workflow.drop_workflow('ttracker_wf'); +end; +/ +show errors Index: openacs-4/contrib/obsolete-packages/ticket-tracker/tcl/ttracker-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/tcl/ttracker-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/tcl/ttracker-procs.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,128 @@ +# /packages/ticket-tracker/tcl/ttracker-procs.tcl + +ad_library { + + Procs for ticket tracker. + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-27 + @cvs-id $Id: ttracker-procs.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} + +ad_page_contract_filter ttracker_ticket_id { name value } { + Checks whether the value (assumed to be an integer) is the id of an ticket + that belongs to the current ttracker instance. +} { + set package_id [ad_conn package_id] + db_1row check_ticket_id { + select decode(ttracker_ticket.id_valid_p(:value, :package_id), 't', 1, 0) as id_valid_p from dual + } + + if { !$id_valid_p } { + ad_complain "$value is not a valid ticket id for this ticket tracker instance" + return 0 + } + + return 1 +} + +ad_page_contract_filter ttracker_option_id { name value } { + Checks whether the value (assumed to be an integer) is the id of an option + that belongs to the current ttracker instance. +} { + set package_id [ad_conn package_id] + db_1row check_option_id { + select decode(count(option_id), 0, 0, 1) as id_valid_p + from ttracker_options + where option_id = :value + and package_id = :package_id + } + + if { !$id_valid_p } { + ad_complain "$value is not a valid option id for this ticket tracker instance" + return 0 + } + + return 1 + +} + + +ad_page_contract_filter ttracker_task_id { name value } { + Checks whether the value (assumed to be an integer) is the id of a task + that relates to the current ttracker instance. +} { + set package_id [ad_conn package_id] + db_1row check_task_id { + select decode(count(wt.task_id), 0, 0, 1) as id_valid_p + from wf_tasks wt + where exists (select wc.case_id + from wf_cases wc, + ttracker_tickets tt, + ttracker_categories tc + where wt.case_id = wc.case_id + and wc.object_id = tt.ticket_id + and tt.category_id = tc.category_id + and tc.package_id = :package_id) + and wt.task_id = :value + } + + if { !$id_valid_p } { + ad_complain "$value is not a valid task id for this ticket tracker instance" + return 0 + } + + return 1 +} + +ad_proc -public ttracker_workflow_url { + -absolute:boolean +} { + If absolute flag is set, return the absolute url to acs-workflow. + Otherwise return the relative url. +} { + if { $absolute_p } { + set absolute_p "t" + } else { + set absolute_p "f" + } + + return [db_string get_url { select ttracker_util.workflow_url(:absolute_p) from dual }] +} + +ad_proc -public ttracker_category_exists_p { + -package_id +} { + Check if the ttracker instance has at least one category +} { + if { ![info exists package_id] } { + set package_id [ad_conn package_id] + } + + return [db_string check_category { + select decode(count(1), 0, 0, 1) + from ttracker_categories + where package_id = :package_id + }] +} + +ad_proc -public ttracker_install { + -package_id +} { + Installs the default category and severity/priority options for this ttracker instance. +} { + if { ![info exists package_id] } { + set package_id [ad_conn package_id] + } + + db_exec_plsql install { + begin + ttracker_util.install(:package_id); + end; + } +} + + + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/clarify.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/clarify.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/clarify.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,5 @@ +
        +
      1. Hit 'Start task' +
      2. Clarify ticket description. +
      3. Hit 'Task done' +
      \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/resolve.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/resolve.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/resolve.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,6 @@ +
        +
      1. Hit 'Start task' +
      2. Check to see if the description is clear to you. +
      3. If it's not, select the appropriate option and hit 'Task done' +
      4. If the description is clear, resolve the ticket and hit 'Task done' +
      Index: openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/ticket-info.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/ticket-info.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/ticket-info.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + +
      @category_name@:@ticket.category@
      Priority:@ticket.pretty_priority@
      Severity:@ticket.pretty_severity@
      Subject:@ticket.subject@
      Description:@ticket.description@
      + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/ticket-info.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/ticket-info.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/ticket-info.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,41 @@ +# /packages/ticket-tracker/wf-templates/ticket-info.tcl + +ad_page_contract { + Return info about a ticket. + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-26 + @cvs-id $Id: ticket-info.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} -properties { + category_name:onevalue + ticket:onerow +} + +# task is one of the datasources specified in the tag in /packages/acs-workflow/www/task.adp +set ticket_id $task(object_id) +set category_name [ad_parameter CategoryName ticket-tracker Category] + +db_1row ticket_info_select { + select tt.ticket_id, + ttracker_option.option_name(tc.package_id, 'severity', tt.severity) as pretty_severity, + ttracker_option.option_name(tc.package_id, 'priority', tt.priority) as pretty_priority, + tt.subject, + tc.name as category, + cr.content as description, + cr.mime_type + from ttracker_tickets tt, + ttracker_categories tc, + cr_revisions cr + where tt.ticket_id = :ticket_id + and tt.category_id = tc.category_id + and cr.revision_id = content_item.get_live_revision(:ticket_id) +} -column_array {ticket} + +# if it's plain text, escape the html stuff +if [string equal $ticket(mime_type) "text/plain"] { + set ticket(description) [ad_quotehtml $ticket(description)] +} + + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/verify.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/verify.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/wf-templates/verify.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,7 @@ +
        +
      1. Hit 'Start task' +
      2. Verify that the result is as you expected. +
      3. If it is, select 'yes' at the right. +
      4. If not, select 'no' at the right. +
      5. Hit 'Task done' +
      \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/category-summary.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/category-summary.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/category-summary.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,85 @@ +# /packages/ticket-tracker/www/category-summary.tcl + +ad_page_contract { + Displays a summary of tickets by category + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-20 + @cvs-id $Id: category-summary.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + {orderby {category}} + {order {}} +} -properties { + context_bar:onevalue + summary_table:onevalue +} + +set category_name [ad_parameter CategoryName "ticket-tracker" "Category"] +set page_title "$category_name Summaries" +set context_bar [list "$category_name Summaries"] +set package_id [ad_conn package_id] + +# dimensional slider definition +set dimensional { + {posted "In the last" any { + {year "year" { where "creation_date + 365 > sysdate" }} + {3month "3 months" { where "creation_date + 90 > sysdate" }} + {month "month" { where "creation_date + 30 > sysdate" }} + {any "all" {}} + }} +} + +set dimensional_bar [ad_dimensional $dimensional] + +# this is the table defn we'll feed to ad_table +set table_def [list] +lappend table_def [list category "$category_name" {} \ + {$category} ] +lappend table_def [list active "Active" {} c ] +lappend table_def [list suspended "Suspended" {} c ] +lappend table_def [list canceled "Canceled" {} c ] +lappend table_def [list finished "Closed" {} c ] +lappend table_def [list total "Total" {} c ] + +set sql " + select * + from (select tc.category_id, + tc.name as category, + count(tt.ticket_id) as total, + sum(decode(lower(state),'active',1,0)) as active, + sum(decode(lower(state),'suspended',1,0)) as suspended, + sum(decode(lower(state),'canceled',1,0)) as canceled, + sum(decode(lower(state),'finished',1,0)) as finished + from ttracker_categories tc, ttracker_tickets tt, wf_cases wfc + where tc.package_id = :package_id and + tt.category_id = tc.category_id and + tt.ticket_id = wfc.object_id + [ad_dimensional_sql $dimensional] + group by tc.category_id, tc.name + union all + select tc1.category_id, + tc1.name as category, + 0 as total, + 0 as active, + 0 as suspended, + 0 as canceled, + 0 as finished + from ttracker_categories tc1 + where tc1.package_id = :package_id + and not exists (select tt1.ticket_id + from ttracker_tickets tt1 + where tt1.category_id = tc1.category_id + [ad_dimensional_sql $dimensional])) + [ad_order_by_from_sort_spec $orderby $table_def] +" + +set bind_ns_set [ad_tcl_vars_to_ns_set package_id] +set summary_table [ad_table -Torderby $orderby \ + -Tmissing_text {No tickets available.} \ + -Ttable_extra_html "width=100%" \ + -bind $bind_ns_set \ + tasks_select $sql $table_def] + +ad_return_template "summary" + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/category.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/category.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/category.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,23 @@ + +@page_title@ +@context_bar@ + + + + + + + + + + + + + + +
      @category_name@:@name@
      Description:@description@
      Default assignee:@assignee_name@
      + +

      +@dimensional_bar@ +

      +@ticket_table@ Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/category.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/category.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/category.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,95 @@ +# /packages/ticket-tracker/www/category.tcl + +ad_page_contract { + Lists all tickets in this category + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-26 + @cvs-id $Id: category.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + category_id:integer,notnull + {orderby {ticket_id}} + {order {}} +} -properties { + page_title:onevalue + context_bar:onevalue + name:onevalue + description:onevalue + category_id:onevalue + assignee_name:onevalue + category_name:onevalue + dimensional_bar:onevalue + ticket_table:onevalue +} + +set package_id [ad_conn package_id] + +# get the category info +db_1row category_info_select { + select name, + description, + nvl(acs_object.name(default_assignee), 'N/A') as assignee_name + from ttracker_categories + where category_id = :category_id +} + +set page_title $name +set context_bar [list "$name"] +set category_name [ad_parameter CategoryName "ticket-tracker" "Category"] + +# dimensional slider definition +set dimensional { + {created "Creation Time" any { + {1d "last 24hrs" {where "tt.creation_date + 1 > sysdate"}} + {1w "last week" {where "tt.creation_date + 7 > sysdate"}} + {1m "last month" {where "tt.creation_date + 30 > sysdate"}} + {any "all" {}} + }} +} + +set dimensional_bar [ad_dimensional $dimensional] + +# this is the table defn we'll feed to ad_table +set table_def [list] +lappend table_def [list ticket_id "Ticket ID" {} \ + {$ticket_id} ] +lappend table_def [list pretty_priority "Priority" {priority $order} c ] +lappend table_def [list pretty_severity "Severity" {severity $order} c ] +lappend table_def [list state "Status" {} c ] +lappend table_def [list subject "Subject" {} c ] +lappend table_def [list creator_id "Submitted by" {upper(creator_name) $order} \ + {$creator_name} ] +lappend table_def [list created "Created" {creation_date $order} c ] + +set sql " + select ttracker_option.option_name(:package_id, 'severity', tt.severity) as pretty_severity, + ttracker_option.option_name(:package_id, 'priority', tt.priority) as pretty_priority, + tt.ticket_id, + tt.subject, + to_char(tt.creation_date, 'MM/DD/YYYY HH24:MI') as created, + c.state, + tt.creation_user as creator_id, + acs_object.name(tt.creation_user) as creator_name + from wf_cases c, + ttracker_tickets tt + where tt.category_id = :category_id + and c.object_id = tt.ticket_id + [ad_dimensional_sql $dimensional] + [ad_order_by_from_sort_spec $orderby $table_def] +" + +# render the table +set bind_ns_set [ad_tcl_vars_to_ns_set category_id package_id] +set ticket_table [ad_table -Torderby $orderby \ + -Tmissing_text "No tickets available." \ + -Ttable_extra_html "width=100%" \ + -bind $bind_ns_set \ + tasks_select $sql $table_def] + +ad_return_template + + + + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/index.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,50 @@ + +@page_title@ +@context_bar@ + +[ Add Ticket + + | Administer + +] +

      +Summarize by: +@category_name_lower@ | +submitting user | +assigned party + +

      +Enter ticket #: + +
      + + +

      Description

      + + + + +
      @description@
      +
      + +

      Your Tasks

      + + @user_task_table@ + + + +

      Unassigned Tasks

      + + @unassigned_task_table@ + +
      + +

      @category_plural_name@

      + + +

      Tickets

      + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/index.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,158 @@ +# /packages/ticket-tracker/www/index.tcl + +ad_page_contract { + Display task list, categories, and options to view tickets + + @author Tony Tseng (tony@arsdigita.com) + @author Phong Nguyen (phong@arsdigita.com) + @creation-date 2000-11-20 + @cvs-id $Id: index.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + {orderby {ticket_id}} + {order {}} +} -properties { + page_title:onevalue + context_bar:onevalue + admin_p:onevalue + category_name:onevalue + category_name_lower:onevalue + user_task_table:onevalue + category_plural_name:onevalue + category:multirow +} + +# authenticate user +set user_id [ad_conn user_id] + +# check for admin priviledges +set package_id [ad_conn package_id] +set admin_p [ad_permission_p $package_id admin] + +# template variables +set package_name [db_string package_name {select apm_package.name(:package_id) from dual}] +set page_title "$package_name" +set context_bar {} + +# this is the return_url we'll give to the task page under acs-workflow +set return_url [ad_conn url] + +set category_name [ad_parameter CategoryName "ticket-tracker" "Category"] +set category_name_lower [string tolower $category_name] +set category_plural_name [ad_parameter CategoryPluralName "ticket-tracker" "Categories"] +set description [ad_quotehtml [ad_parameter Description "ticket-tracker" ""]] + +# checking if at least one category exists +# if not, redirects to the install directory +if { ![ttracker_category_exists_p] } { + ad_returnredirect "admin/install/" + set user_task_table "" + set unassigned_task_table "" + return +} + +# table definition for user's outstanding tasks +# NOTE: [list]'s are used here instead of {}'s because ad_table +# does not evaluate $category_name +set table_def [list] +lappend table_def [list ticket_id "Ticket ID" {} \ + {$ticket_id} ] +lappend table_def [list category "$category_name" {} c ] +lappend table_def [list pretty_priority "Priority" {priority $order} c ] +lappend table_def [list pretty_severity "Severity" {severity $order} c ] +lappend table_def [list subject "Subject" {} c ] +lappend table_def [list created "Created" {creation_date $order} c ] +lappend table_def [list to_do "To do" {} \ + {$to_do} ] + +# get the user's outstanding tasks +set user_task_sql " + select tt.ticket_id, + tt.subject, + ttracker_option.option_name(:package_id, 'severity', tt.severity) as pretty_severity, + ttracker_option.option_name(:package_id, 'priority', tt.priority) as pretty_priority, + tt.creation_date as created, + ca.case_id, + tc.name as category, + ta.task_id, + ta.transition_key as to_do + from ttracker_tickets tt, + wf_cases ca, + ttracker_categories tc, + wf_task_assignments w, + wf_tasks ta, party_approved_member_map map + where ca.object_id = tt.ticket_id + and ca.state = 'active' + and tt.category_id = tc.category_id + and tc.package_id = :package_id + and w.party_id = map.party_id + and map.member_id = :user_id + and ta.case_id = ca.case_id + and ta.task_id = w.task_id + and (ta.state='enabled' or (ta.state='started' and ta.holding_user=:user_id)) + [ad_order_by_from_sort_spec $orderby $table_def] +" +set bind_ns_set [ad_tcl_vars_to_ns_set package_id user_id] +set user_task_table [ad_table -Torderby $orderby \ + -Tmissing_text "No tasks available." \ + -Ttable_extra_html "width=100%" \ + -bind $bind_ns_set \ + tasks_select $user_task_sql $table_def] + +# get unassigned tasks for the admin to assign +set unassigned_task_sql " + select tt.ticket_id, + ttracker_option.option_name(:package_id, 'severity', tt.severity) as pretty_severity, + ttracker_option.option_name(:package_id, 'priority', tt.priority) as pretty_priority, + tt.subject, + to_char(tt.creation_date, 'MM/DD/YYYY HH24:MI') as created, + tc.name as category, + ta.task_id + from ttracker_tickets tt, + ttracker_categories tc, + wf_cases ca, + wf_tasks ta + where tc.package_id = :package_id + and tt.category_id = tc.category_id + and ca.object_id = tt.ticket_id + and ca.state = 'active' + and ta.case_id = ca.case_id + and not exists (select tasn.task_id + from wf_task_assignments tasn + where tasn.task_id = ta.task_id) + [ad_order_by_from_sort_spec $orderby $table_def] +" + +if { $admin_p } { + # this is the table def for unassigned tasks + # NOTE: [list]'s are used here instead of {}'s because ad_table + # does not evaluate $category_name + set table_def2 [list] + lappend table_def2 [list ticket_id "Ticket ID" {} \ + {$ticket_id} ] + lappend table_def2 [list category "$category_name" {} c ] + lappend table_def2 [list pretty_priority "Priority" {priority $order} c ] + lappend table_def2 [list pretty_severity "Severity" {severity $order} c ] + lappend table_def2 [list subject "Subject" {} c ] + lappend table_def2 [list created "Created" {creation_date $order} c ] + lappend table_def2 [list to_do "To do" no_sort \ + {assign} ] + + set unassigned_task_table [ad_table -Torderby $orderby \ + -Tmissing_text "There are no unassigned tasks." \ + -Ttable_extra_html "width=100%" \ + -bind $bind_ns_set \ + unassigned_tasks_select $unassigned_task_sql $table_def2] +} + +# get categories +db_multirow category categories_select { + select category_id, name + from ttracker_categories + where package_id = :package_id + order by upper(name) +} + +ad_return_template + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/Attic/master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/master.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,7 @@ + +@title@ + +

      @title@

      +<%= [eval ad_context_bar $context_bar] %> +
      + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/selection-bar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/selection-bar.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/selection-bar.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,57 @@ +
      + + + + + + + + + + + + + + + + + + + +
      Submitted byAssigned toStatusCreatedPrioritySeverity 
      + + + + + + + +
      +
      \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/selection-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/selection-bar.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/selection-bar.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,54 @@ +# /packages/ticket-tracker/www/selection-bar.tcl + +ad_page_contract { + Display a selection bar used for viewing tickets + + @author Tony Tseng (tony@arsdigita.com) + @author Phong Nguyen (phong@arsdigita.com) + @creation-date 2000-11-20 + @cvs-id $Id: selection-bar.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { +} -properties { + option:multirow + status:multirow + time:multirow +} + +set package_id [ad_conn package_id] + +set options_list [db_list_of_lists options_select { + select name, + function, + value + from ttracker_options + where package_id = :package_id + order by function,value +}] + +template::multirow create option name function value +foreach o $options_list { + template::multirow append option "[lindex $o 0]" "[lindex $o 1 ]" "[lindex $o 2]" +} +template::multirow append option "all" "severity" "any" +template::multirow append option "all" "priority" "any" + + +set status_list [list "active" "suspended" "canceled" "finished" "all"] +template::multirow create status name value +foreach s $status_list { + if [string equal $s "all"] { + template::multirow append status $s "any" + } else { + template::multirow append status $s $s + } +} + + +set time_list [list [list "last 24hrs" "1d"] [list "last week" "1w"] \ + [list "last month" "1m"] [list "all" "any"]] +template::multirow create time name value +foreach t $time_list { + template::multirow append time [lindex $t 0] [lindex $t 1] +} + +ad_return_template Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/state-change.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/state-change.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/state-change.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,43 @@ +# /packages/ticket-tracker/www/state-change.tcl + +ad_page_contract { + Change a ticket's state + + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-20 + @cvs-id $Id: state-change.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + ticket_id:integer,ttracker_ticket_id + action:notnull +} + +# only admin can change the state of a case +ad_require_permission $ticket_id admin + +# get the state and case_id +db_1row case_id_select { + select case_id, state + from wf_cases + where object_id = :ticket_id +} + +switch $action { + suspend { + if [string equal $state "active"] { + wf_case_suspend $case_id + } + } + resume { + if { [string equal $state "suspended"] || [string equal $state "canceled"] } { + wf_case_resume $case_id + } + } + cancel { + if { [string equal $state "suspended"] || [string equal $state "active"] } { + wf_case_cancel $case_id + } + } +} + +ad_returnredirect "ticket-view?[export_url_vars ticket_id]" + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/summary.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/summary.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/summary.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,8 @@ + +@page_title@ +@context_bar@ + +@dimensional_bar@ +

      +@summary_table@ + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-add-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-add-2.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,51 @@ +# /packages/ticket-tracker/www/ticket-add-2.tcl + +ad_page_contract { + Add a new ticket + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-22 + @cvs-id $Id: ticket-add-2.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + priority:integer + severity:integer + category_id:integer + subject:nohtml,notnull + description:html,notnull + mime_type:notnull +} + +set user_id [ad_maybe_redirect_for_registration] +set package_id [ad_conn package_id] +set creation_ip [ad_conn peeraddr] + +# We are granting 'write' permissions instead of 'admin' since +# we do not want the user to have privileges of managing +# permissions on this ticket. +db_exec_plsql insert_ticket { + declare + v_ticket_id acs_objects.object_id%TYPE; + begin + v_ticket_id := ttracker_ticket.new ( + context_id => :package_id, + subject => :subject, + description => :description, + mime_type => :mime_type, + category_id => :category_id, + severity => :severity, + priority => :priority, + creation_user => :user_id, + creation_ip => :creation_ip + ); + + acs_permission.grant_permission( + object_id => v_ticket_id, + grantee_id => :user_id, + privilege => 'write' + ); + end; +} + +ad_returnredirect "" + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-add.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,59 @@ +# /packages/ticket-tracker/www/ticket-add.tcl + +ad_page_contract { + Present a form to add a ticket + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-22 + @cvs-id $Id: ticket-add.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { +} -properties { + page_title:onevalue + context_bar:onevalue + target:onevalue + submit:onevalue + category_name:onevalue + ticket:onerow + categories:multirow + option:multirow +} + +# check if user is logged in +ad_maybe_redirect_for_registration + +# get the package_id +set package_id [ad_conn package_id] + +# retrieve all categories within the package +db_multirow categories get_categories { + select category_id, name + from ttracker_categories + where package_id = :package_id + order by upper(name) +} + +set page_title "Add a ticket" +set context_bar {"Add ticket"} +set target "ticket-add-2" +set submit "Create" +set category_name [ad_parameter CategoryName "ticket-tracker" "Category"] + +set ticket(id) "" +set ticket(priority) "" +set ticket(severity) "" +set ticket(category_id) "" +set ticket(subject) "" +set ticket(description) "" +set ticket(mime_type) "" + +db_multirow option get_options { + select name, + value, + function + from ttracker_options + where package_id = :package_id +} + +ad_return_template "ticket-ae" + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-ae.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-ae.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-ae.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,100 @@ + +@page_title@ +@context_bar@ + +

      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Priority: +
      Severity: +
      @category_name@: +
      Subject:
      Description
      + Text above is + +
      + +
      +
      + + +
      + + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-edit-2.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,56 @@ +# /packages/ticket-tracker/www/ticket-edit-2.tcl + +ad_page_contract { + Edit an existing ticket + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-28 + @cvs-id $Id: ticket-edit-2.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + ticket_id:integer,ttracker_ticket_id + task_id:integer,optional + priority:integer + severity:integer + category_id:integer + subject:nohtml,notnull + description:html,notnull + mime_type:notnull +} + +# Make sure user has write privilege on this ticket +ad_require_permission $ticket_id write + +db_transaction { + db_dml update_ttracker_tickets { + update ttracker_tickets + set category_id = :category_id, + subject = :subject, + severity = :severity, + priority = :priority + where ticket_id = :ticket_id + } + + # update mime_type, subject, and description + db_exec_plsql update_mime_subj_desc { + begin + ttracker_ticket.update_mime_subj_desc ( + ticket_id => :ticket_id, + mime_type => :mime_type, + subject => :subject, + description => :description + ); + end; + } +} on_error { + ns_log Error $errmsg + ad_return_complaint 0 "There was an error updating the ticket information.

      + Here is the full error message:

      $errmsg
      " +} + +if {[exists_and_not_null task_id]} { + ad_returnredirect "task?[export_url_vars task_id]" +} else { + ad_returnredirect "ticket-view?[export_url_vars ticket_id]" +} + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-edit.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,66 @@ +# /packages/ticket-tracker/www/ticket-edit.tcl + +ad_page_contract { + Present a form to edit an existing ticket + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-29 + @cvs-id $Id: ticket-edit.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + ticket_id:integer,ttracker_ticket_id + task_id:integer,optional +} -properties { + page_title:onevalue + context_bar:onevalue + task_id:onevalue + target:onevalue + submit:onevalue + category_name:onevalue + ticket:onerow + categories:multirow + option:multirow +} + +# Make sure user has write privilege on this ticket +ad_require_permission $ticket_id write + +set context_bar {"Edit a ticket"} +set package_id [ad_conn package_id] + +set page_title "Edit a ticket" +set target "ticket-edit-2" +set submit "Edit" +set category_name [ad_parameter CategoryName "ticket-tracker" "Category"] + +# get categories within this ticket tracker +db_multirow categories get_categories { + select category_id, name + from ttracker_categories + where package_id = :package_id +} + +# get the ticket info +db_1row ticket_info_select { + select tt.ticket_id as id, + tt.subject, + tt.priority, + tt.severity, + tt.category_id, + cr.mime_type, + cr.content as description + from ttracker_tickets tt, + cr_revisions cr + where tt.ticket_id = :ticket_id + and cr.revision_id = content_item.get_live_revision(:ticket_id) +} -column_array {ticket} + +db_multirow option get_options { + select name, + value, + function + from ttracker_options + where package_id = :package_id +} + +ad_return_template "ticket-ae" \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-view.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-view.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,67 @@ + +Ticket #@ticket_id@ +@context_bar@ +[ @option_bar@ ] + +

      + +

      Details

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      State:@ticket.state@
      @category_name@:@ticket.category@
      Priority:@ticket.pretty_priority@
      Severity:@ticket.pretty_severity@
      Subject:@ticket.subject@ +
      Description:@ticket.description@
      Created:@ticket.created@
      Submitted by:@ticket.submitted_by@
      Assigned to: + Nobody + + + + @assignee.name@, + + +
      + +

      + + + +

      Comments

      +
        + +
      • None. + + + @comments@ + +
      Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-view.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/ticket-view.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,103 @@ +# /packages/ticket-tracker/www/ticket-view.tcl + +ad_page_contract { + Detailed view of a ticket + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-28 + @cvs-id $Id: ticket-view.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + ticket_id:trim,integer,ttracker_ticket_id + {orderby {task_id*}} + {order {}} +} -properties { + context_bar:onevalue + option_bar:onevalue + category_name:onevalue + progress_table:onevalue + ticket:onerow + assignee:multirow +} +# The trim filter is used on ticket_id since the ticket_id may +# be entered manually from the index page. + +set user_id [ad_verify_and_get_user_id] +set package_id [ad_conn package_id] +set category_name [ad_parameter CategoryName "ticket-tracker" "Category"] +set context_bar [list "Ticket #$ticket_id"] +set option_bar [general_comments_create_link -object_name "Ticket #$ticket_id" \ + "$ticket_id" "[ad_conn package_url]ticket-view?ticket_id=$ticket_id"] + +# get permission info +# instead of calling ad_permission_p twice and query db twice, use one query instead +db_1row get_permission { + select decode(acs_permission.permission_p(:ticket_id, :user_id, 'write'), 't', 1, 0) as write_p, + decode(acs_permission.permission_p(:ticket_id, :user_id, 'admin'), 't', 1, 0) as admin_p + from dual +} + +# if user has write privilege, allow them edit the ticket +if { $write_p } { + append option_bar " | Edit" +} + +# gather the ticket info +db_1row ticket_info_select { + select tt.subject, + cr.content as description, + cr.mime_type, + ttracker_option.option_name(:package_id, 'severity', tt.severity) as pretty_severity, + ttracker_option.option_name(:package_id, 'priority', tt.priority) as pretty_priority, + to_char(tt.creation_date, 'MM/DD/YYYY HH24:MI') as created, + tc.name as category, + tc.category_id, + acs_object.name(tt.creation_user) as submitted_by, + wc.state, + wc.case_id + from ttracker_tickets tt, + ttracker_categories tc, + wf_cases wc, + cr_revisions cr + where tt.ticket_id = :ticket_id + and tc.category_id = tt.category_id + and wc.object_id = :ticket_id + and cr.revision_id = content_item.get_live_revision(tt.ticket_id) +} -column_array {ticket} + +# if it's plain text, escape the html stuff +if [string equal $ticket(mime_type) "text/plain"] { + set ticket(description) [ad_quotehtml $ticket(description)] +} + +# if user is an admin, display the action stuff +if { $admin_p } { + if { [string equal $ticket(state) "suspended"] || [string equal $ticket(state) "canceled"] } { + append option_bar " | Resume" + } + if [string equal $ticket(state) "active"] { + append option_bar " | Suspend" + } + if { [string equal $ticket(state) "active"] || [string equal $ticket(state) "suspended"] } { + append option_bar " | Cancel" + } +} + + +# get all the assignees +db_multirow assignee assignees_select { + select acs_object.name(wta.party_id) as name + from wf_task_assignments wta + where wta.task_id = (select max(wt.task_id) + from wf_tasks wt, + wf_cases wc + where wc.object_id = :ticket_id + and wt.case_id = wc.case_id + and wt.transition_key = 'resolve') +} + +# get the comments from general comments +set comments [general_comments_get_comments "$ticket_id" "[ad_conn package_url]ticket-view?ticket_id=$ticket_id"] + +ad_return_template + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/tickets.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/tickets.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/tickets.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,60 @@ + +@page_title@ +@context_bar@ + + + @view_print_bar@ +

      + @dimensional_bar@ +

      + @ticket_table@ + + + + No tickets available. + + + +

      + #@tickets.ticket_id@ @tickets.subject@
      + + + + + + + + + + + + + + + + + + + + + +
      @category_name@:@tickets.category@
      Priority:@tickets.pretty_priority@
      Severity:@tickets.pretty_severity@
      Creation Date:@tickets.created@
      Assigned to: + unassigned + + + @tickets.assignee_list@ +
      + + +

      + @tickets.content@ +
      +
        + <%= [general_comments_get_comments -print_content_p 1 "@tickets.ticket_id@" ""] %> +
      +
      + + + + +

      \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/tickets.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/tickets.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/tickets.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,392 @@ +# /packages/ticket-tracker/www/tickets.tcl + +ad_page_contract { + Displays a list of tickets + + @author Tony Tseng (tony@arsdigita.com) + @author Phong Nguyen (phong@arsdigita.com) + @creation-date 11/22/2000 + @cvs-id $Id: tickets.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + {orderby {ticket_id}} + {view {}} + {assign {me}} +} -properties { + page_title:onevalue + context_bar:onevalue + view:onevalue + dimensional_bar:onevalue + ticket_table:onevalue + tickets:multirow + category_name:onevalue +} + +# template variables +set package_id [ad_conn package_id] +set user_id [ad_verify_and_get_user_id] +set category_name [ad_parameter CategoryName "ticket-tracker" "Category"] +set page_title "Tickets" +set context_bar {"Tickets"} + +# dimensional slider definition +set dimensional { + {submitby "Submitted by" any { + {me "me" {where "tt.creation_user = $user_id"}} + {any "anyone" {}} + }} + {assign "Assigned to" me { + {me "me" {}} + {any "anyone" {}} + {noass "unassigned" {}} + }} + {state "Status" any { + {created "created" {where "wc.state = 'created'"}} + {active "active" {where "wc.state = 'active'"}} + {suspended "suspended" {where "wc.state = 'suspended'"}} + {canceled "canceled" {where "wc.state = 'canceled'"}} + {finished "finished" {where "wc.state = 'finished'"}} + {any "all" {}} + }} + {created "Creation Time" any { + {1d "last 24hrs" {where "tt.creation_date + 1 > sysdate"}} + {1w "last week" {where "tt.creation_date + 7 > sysdate"}} + {1m "last month" {where "tt.creation_date + 30 > sysdate"}} + {any "all" {}} + }} +} + +# dynamically generating the dimensional list for priority options +set priority_slider [list priority "Priority" any] +set priority_list [list] +db_foreach get_priorities { + select name, + value + from ttracker_options + where package_id = :package_id + and function = 'priority' +} { + lappend priority_list [list $value $name "where \"tt.priority = $value\""] +} +lappend priority_list [list any all [list]] +lappend priority_slider $priority_list + +# dynamically generating the dimensional list for severity options +set severity_slider [list severity "Severity" any] +set severity_list [list] +db_foreach get_priorities { + select name, + value + from ttracker_options + where package_id = :package_id + and function = 'severity' +} { + lappend severity_list [list $value $name "where \"tt.severity = $value\""] +} +lappend severity_list [list any all [list]] +lappend severity_slider $severity_list + +# adding the priority and severity options to the opion bar +lappend dimensional $priority_slider $severity_slider + +set dimensional_bar [ad_dimensional $dimensional] + +# ad_table definition +# NOTE: 1) [list]'s are used here instead of {}'s because ad_table +# does not evaluate $category_name +# 2) The link generated for submitted_by does not work if +# it references a group. An SDM ticket has been created +# requesting this feature. +set table_def [list] +lappend table_def [list line_number "Num" {} {$Tcount} ] +lappend table_def [list ticket_id "ID#" {} \ + {$ticket_id} ] +lappend table_def [list category "$category_name" {} c ] +lappend table_def [list pretty_priority "Priority" {priority $order} c ] +lappend table_def [list pretty_severity "Severity" {severity $order} c ] +lappend table_def [list state "Status" {} c ] +lappend table_def [list subject "Subject" {} c ] +lappend table_def [list creator_id "Submitted by" {upper(creator_name) $order} \ + {$creator_name} ] +lappend table_def [list assignee_id "Assigned to" {upper(assignee_name) $order} \ + {$assignee_name} ] +lappend table_def [list created "Created" {creation_date $order} c ] + + +# sql to retrieve selected tickets +set view_select "" +set view_from "" +set view_where "" +# only getting the content and mime type if it's a full view +if [string equal $view "full"] { + set view_select ", cr.mime_type, cr.content" + set view_from ", cr_revisions cr " + set view_where "and cr.revision_id = content_item.get_live_revision(tt.ticket_id) " +} + + +# this is the ugly part +# 3 different queries for 3 different assignee types +set dimensional [lreplace $dimensional 1 1] +if {[string equal $assign "me"]} { + # this query is specifically for tickets assigned to the user + # the "exists" clause asks if there's any 'resolved' tasks assigned to the user + set sql "select tt.ticket_id, + ttracker_option.option_name(:package_id, 'severity', tt.severity) as pretty_severity, + ttracker_option.option_name(:package_id, 'priority', tt.priority) as pretty_priority, + tt.subject, + to_char(tt.creation_date, 'MM/DD/YYYY HH24:MI') as created, + tc.category_id, + tc.name as category, + tt.creation_user as creator_id, + acs_object.name(tt.creation_user) as creator_name, + wc.state, + :user_id as assignee_id, + 'me' as assignee_name + $view_select + from ttracker_categories tc, + ttracker_tickets tt, + wf_cases wc + $view_from + where tc.package_id = :package_id and + tt.category_id = tc.category_id and + wc.object_id = tt.ticket_id and + exists (select wt.task_id + from wf_task_assignments wta, + wf_tasks wt, + party_approved_member_map m + where wt.transition_key = 'resolve' + and wt.task_id = wta.task_id + and wta.party_id = m.party_id + and m.member_id = :user_id + and wt.case_id = wc.case_id + and wt.task_id = (select max(wt1.task_id) + from wf_tasks wt1 + where wt1.case_id = wc.case_id + and wt1.transition_key = 'resolve')) + $view_where + [ad_dimensional_sql $dimensional] + [ad_order_by_from_sort_spec $orderby $table_def]" +} elseif {[string equal $assign "noass"]} { + # the "not exists" clause specifies that there must be no assignees + # assigned to the "resolve" task for this case + # the reason to use "max" is that we want to find the most recent task + # there might be many tasks associated with a case + set sql "select tt.ticket_id, + ttracker_option.option_name(:package_id, 'severity', tt.severity) as pretty_severity, + ttracker_option.option_name(:package_id, 'priority', tt.priority) as pretty_priority, + tt.subject, + to_char(tt.creation_date, 'MM/DD/YYYY HH24:MI') as created, + tc.category_id, + tc.name as category, + tt.creation_user as creator_id, + acs_object.name(tt.creation_user) as creator_name, + wc.state, + 0 as assignee_id, + '' as assignee_name + $view_select + from ttracker_categories tc, + ttracker_tickets tt, + wf_cases wc + $view_from + where tc.package_id = :package_id and + tt.category_id = tc.category_id and + wc.object_id = tt.ticket_id and + not exists (select wta1.task_id + from wf_task_assignments wta1 + where wta1.task_id = (select max(wt.task_id) + from wf_tasks wt + where wt.case_id = wc.case_id + and wt.transition_key = 'resolve')) + $view_where + [ad_dimensional_sql $dimensional] + [ad_order_by_from_sort_spec $orderby $table_def]" +} else { + # the first query is for tickets with assignees + # the second one is for tickets with no assignees + # the reason to use "union all" is for performance issue + # tried to compress them into one query using outer join with a view, but it's too slow + set sql " + select results.* from + (select tt.ticket_id, + ttracker_option.option_name(:package_id, 'severity', tt.severity) as pretty_severity, + ttracker_option.option_name(:package_id, 'priority', tt.priority) as pretty_priority, + tt.subject, + to_char(tt.creation_date, 'MM/DD/YYYY HH24:MI') as created, + tc.category_id, + tc.name as category, + tt.creation_user as creator_id, + acs_object.name(tt.creation_user) as creator_name, + wc.state, + wta.party_id as assignee_id, + acs_object.name(wta.party_id) as assignee_name + $view_select + from ttracker_categories tc, + ttracker_tickets tt, + wf_cases wc, + wf_task_assignments wta + $view_from + where tc.package_id = :package_id and + tt.category_id = tc.category_id and + wc.object_id = tt.ticket_id and + wta.task_id = (select max(wt.task_id) + from wf_tasks wt + where wt.case_id = wc.case_id + and wt.transition_key = 'resolve') + $view_where + [ad_dimensional_sql $dimensional] + union all + select tt.ticket_id, + ttracker_option.option_name(:package_id, 'severity', tt.severity) as pretty_severity, + ttracker_option.option_name(:package_id, 'priority', tt.priority) as pretty_priority, + tt.subject, + to_char(tt.creation_date, 'MM/DD/YYYY HH24:MI') as created, + tc.category_id, + tc.name as category, + tt.creation_user as creator_id, + acs_object.name(tt.creation_user) as creator_name, + wc.state, + 0 as assignee_id, + '' as assignee_name + $view_select + from ttracker_categories tc, + ttracker_tickets tt, + wf_cases wc + $view_from + where tc.package_id = :package_id and + tt.category_id = tc.category_id and + wc.object_id = tt.ticket_id and + not exists (select wta1.task_id + from wf_task_assignments wta1 + where wta1.task_id = (select max(wt.task_id) + from wf_tasks wt + where wt.case_id = wc.case_id + and wt.transition_key = 'resolve')) + $view_where + [ad_dimensional_sql $dimensional]) results + [ad_order_by_from_sort_spec $orderby $table_def]" +} + +# ad_table manipulating code +set remove_column {} +set rowcode {} +switch [ad_sort_primary_key $orderby] { + creator_id { + lappend remove_column submitby + set rowcode { + [if {![ad_table_same creator_id]} { + ad_table_span [subst {Submitted by: $creator_name}] {bgcolor=cccccc} + }] + } + } + assignee_id { + lappend remove_column assignee_id + set rowcode { + [if {![ad_table_same assignee_id]} { + ad_table_span [switch $assignee_id { + "" {subst {Assigned to: unassigned}} + default {subst {Assigned to: $assignee_name}} + }] {bgcolor=cccccc} + }] + } + } + category { + lappend remove_column category + set rowcode { + [if {![ad_table_same category]} { + ad_table_span [subst {$category}] {bgcolor=cccccc} + }] + } + } +} + +# set which columns we really want to be displayed +set all_columns {line_number ticket_id category pretty_priority pretty_severity state subject creator_id assignee_id created} +set col [list] +foreach acol $all_columns { + if {[lsearch -exact $remove_column $acol] < 0} { + lappend col $acol + } +} + +# create the table to display the tickets +if { [empty_string_p $view] } { + set bind_ns_set [ad_tcl_vars_to_ns_set package_id user_id] + # this is ugly, ad_table should have some option of turning off + # the audit if the primary sort key is the column that changes + if { [ad_sort_primary_key $orderby] == "assignee_id" } { + set ticket_table [ad_table -Torderby $orderby \ + -Tpre_row_code $rowcode \ + -Tcolumns $col \ + -Tmissing_text {No tickets available.} \ + -Ttable_extra_html "width=100%" \ + -bind $bind_ns_set \ + ticket_select $sql $table_def] + } else { + set ticket_table [ad_table -Torderby $orderby \ + -Taudit {ticket_id} \ + -Tpre_row_code $rowcode \ + -Tcolumns $col \ + -Tmissing_text {No tickets available.} \ + -Ttable_extra_html "width=100%" \ + -bind $bind_ns_set \ + ticket_select $sql $table_def] + } +} + +# creating the data source for report view +if { ![empty_string_p $view] } { + set old_ticket_id "" + set assignees "" + set i 1 + # create a custom datasource for easier processing in the template page + template::multirow create tickets ticket_id pretty_severity pretty_priority subject created \ + category_id category creator_id creator_name state assignee_id assignee_name content \ + assignee_list + + db_foreach ticket $sql { + # add a row in the datasource for new tickets + # if we sorted by assignee_id, then always create a new row + if { $old_ticket_id != $ticket_id || [ad_sort_primary_key $orderby] == "assignee_id"} { + if { ![empty_string_p $old_ticket_id] } { + # we have already transitioned into another ticket + # set the accumulated assignee names into the old row + # before we start adding the new row + template::multirow set tickets $i assignee_list $assignees + incr i + } + + template::multirow append tickets $ticket_id $pretty_severity $pretty_priority $subject \ + $created $category_id $category $creator_id $creator_name $state $assignee_id \ + $assignee_name + + # quote the content if it's plain text + if [string equal $view "full"] { + if [string equal $mime_type "text/plain"] { + template::multirow set tickets $i content [ad_quotehtml $content] + } else { + template::multirow set tickets $i content $content + } + } + + if { ![empty_string_p $assignee_name] } { + set assignees "$assignee_name" + } else { + set assignees "" + } + + # accumulate the assignee_name otherwise + } else { + append assignees ", $assignee_name" + } + set old_ticket_id $ticket_id + } + template::multirow set tickets $i assignee_list $assignees +} + +set view_print_bar " +View/Print: +Full Report | +Summary Report (no comments/descriptions) +" + +ad_return_template Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/user-assign-summary.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/user-assign-summary.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/user-assign-summary.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,81 @@ +# /packages/ticket-tracker/www/user-assign-summary.tcl + +ad_page_contract { + Displays a summary of tickets by category + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-20 + @cvs-id $Id: user-assign-summary.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + {orderby {party_id}} + {order {}} +} -properties { + context_bar:onevalue + summary_table:onevalue +} + +set page_title "Ticket Assignment Summaries" +set context_bar { "Ticket Assignment Summaries" } +set category_name [ad_parameter CategoryName "ticket-tracker" "Category"] +set package_id [ad_conn package_id] + +# dimensional slider definition +set dimensional { + {posted "In the last" any { + {year "year" {where "tt.creation_date + 365 > sysdate"}} + {3month "3 months" {where "tt.creation_date + 90 > sysdate"}} + {month "month" {where "tt.creation_date + 30 > sysdate"}} + {any "all" {}} + }} +} + +set dimensional_bar [ad_dimensional $dimensional] + +# this is the table defn we'll feed to ad_table +set table_def [list] +lappend table_def [list party_name "Party" {upper(party_name) $order} \ + {$party_name} ] +lappend table_def [list total "Total" {} c ] +lappend table_def [list active "Active" {} c ] +lappend table_def [list suspended "Suspended" {} c ] +lappend table_def [list canceled "Canceled" {} c ] +lappend table_def [list finished "Closed" {} c ] +lappend table_def [list latest "Latest" {} c ] +lappend table_def [list oldest "Oldest" {} c ] + +set sql " + select wta.party_id, + acs_object.name(wta.party_id) as party_name, + count(ticket_id) as total, + sum(decode(lower(wc.state),'active',1,0)) as active, + sum(decode(lower(wc.state),'suspended',1,0)) as suspended, + sum(decode(lower(wc.state),'canceled',1,0)) as canceled, + sum(decode(lower(wc.state),'finished',1,0)) as finished, + max(tt.creation_date) as latest, + min(tt.creation_date) as oldest + from ttracker_tickets tt, + ttracker_categories tc, + wf_cases wc, + wf_task_assignments wta + where tc.package_id = :package_id + and tt.category_id = tc.category_id + and tt.ticket_id = wc.object_id + and wta.task_id = (select max(wt.task_id) + from wf_tasks wt + where wt.case_id = wc.case_id + and wt.transition_key = 'resolve') + [ad_dimensional_sql $dimensional] + group by wta.party_id + [ad_order_by_from_sort_spec $orderby $table_def] +" + +set bind_ns_set [ad_tcl_vars_to_ns_set package_id] +set summary_table [ad_table -Torderby $orderby \ + -Tmissing_text {No tickets available.} \ + -Ttable_extra_html "width=100%" \ + -bind $bind_ns_set \ + tasks_select $sql $table_def] + + +ad_return_template "summary" Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/user-summary.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/user-summary.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/user-summary.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,76 @@ +# /packages/ticket-tracker/www/user-summary.tcl + +ad_page_contract { + Displays a summary of tickets by category + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-20 + @cvs-id $Id: user-summary.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + {orderby {user_id}} + {order {}} +} -properties { + context_bar:onevalue + summary_table:onevalue +} + +set page_title "Ticket Submission Summaries" +set context_bar { "Ticket Submission Summaries" } +set category_name [ad_parameter CategoryName "ticket-tracker" "Category"] +set package_id [ad_conn package_id] + +# dimensional slider definition +set dimensional { + {posted "In the last" any { + {year "year" {where "tt.creation_date + 365 > sysdate"}} + {3month "3 months" {where "tt.creation_date + 90 > sysdate"}} + {month "month" {where "tt.creation_date + 30 > sysdate"}} + {any "all" {}} + }} +} + +set dimensional_bar [ad_dimensional $dimensional] + +# this is the table defn we'll feed to ad_table +set table_def [list] +lappend table_def [list user_id "User" {upper(user_name) $order} \ + {$user_name} ] +lappend table_def [list active "Active" {} c ] +lappend table_def [list suspended "Suspended" {} c ] +lappend table_def [list canceled "Canceled" {} c ] +lappend table_def [list finished "Closed" {} c ] +lappend table_def [list total "Total" {} c ] +lappend table_def [list latest "Lastest" {} c ] +lappend table_def [list earliest "Earliest" {} c ] + +set sql " + select tt.creation_user as user_id, + acs_object.name(tt.creation_user) as user_name, + count(ticket_id) as total, + sum(decode(lower(wfc.state),'active',1,0)) as active, + sum(decode(lower(wfc.state),'suspended',1,0)) as suspended, + sum(decode(lower(wfc.state),'canceled',1,0)) as canceled, + sum(decode(lower(wfc.state),'finished',1,0)) as finished, + max(tt.creation_date) as latest, + min(tt.creation_date) as earliest + from ttracker_tickets tt, + ttracker_categories tc, + wf_cases wfc + where tc.package_id = :package_id and + tt.category_id = tc.category_id and + tt.ticket_id = wfc.object_id + [ad_dimensional_sql $dimensional] + group by tt.creation_user + [ad_order_by_from_sort_spec $orderby $table_def] +" + +set bind_ns_set [ad_tcl_vars_to_ns_set package_id] +set summary_table [ad_table -Torderby $orderby \ + -Tmissing_text {No tickets available.} \ + -Ttable_extra_html "width=100%" \ + -bind $bind_ns_set \ + tasks_select $sql $table_def] + + +ad_return_template "summary" Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-add-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-add-2.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,56 @@ +# /packages/ticket-tracker/www/admin/category-add-2.tcl + +ad_page_contract { + Add a new category + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-22 + @cvs-id $Id: category-add-2.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + name:nohtml,notnull + description:nohtml,optional + default_assignee:integer +} -validate { + name_is_ok -requires {name:notnull} { + set package_id [ad_conn package_id] + db_1row check_duplicate { + select count(1) as duplicate + from ttracker_categories + where upper(name) = upper(:name) and + package_id = :package_id + } + if { $duplicate } { + ad_complain + } + } +} -errors { + name_is_ok { A category with the same name already exists. } +} + +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] +set creation_ip [ad_conn peeraddr] + + +# if default_assignee == none +if { $default_assignee == 0 } { + set default_assignee [db_null] +} + +db_exec_plsql create_new_category { + begin + :1 := ttracker_category.new ( + context_id => :package_id, + creation_user => :user_id, + creation_ip => :creation_ip, + package_id => :package_id, + name => :name, + default_assignee => :default_assignee, + description => :description + ); + end; +} + +ad_returnredirect "." + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-add.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,54 @@ +# /packages/ticket-tracker/www/admin/category-add.tcl + +ad_page_contract { + Presents a form to add a new category + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-26 + @cvs-id $Id: category-add.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} -properties { + context_bar:onevalue + page_title:onevalue + target:onevalue + submit:onevalue + name:onevalue + description:onevalue + default_assignee:onevalue + category_id:onevalue + assignee:multirow +} + +set package_id [ad_conn package_id] +set category_name [string tolower [ad_parameter CategoryName "ticket-tracker" "Category"]] +set page_title "Create a $category_name" +set context_bar { "Create a $category_name" } +set target "category-add-2" +set submit "Create" + +# creating a brand new category; no default values exist +set name "" +set description "" +set default_assignee "" +set category_id "" + +# get the potential assignees +db_multirow assignee assignees_select { + select 0 as party_id, 'Nobody' as party_name from dual + UNION ALL + select p.party_id, acs_object.name(p.party_id) as party_name + from parties p +} + +ad_return_template "category-ae" + + + + + + + + + + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-ae.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-ae.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-ae.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,55 @@ + +@page_title@ +@context_bar@ +@category_name@ + + + [ Delete this @category_name@ ] + + +

      +

      + + + + + + + + + + + + + + + + + +
      Name: +
      Description in plain text:
      Default assignee: +
      +
      +
      +
      + + + + + + + + + + + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-delete-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-delete-2.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,59 @@ +# /packages/ticket-tracker/www/admin/category-delete-2.tcl + +ad_page_contract { + Deletes a category + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-26 + @cvs-id $Id: category-delete-2.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + category_id:integer + { transfer_id:integer 0 } + submit:notnull +} + +if { $submit == "Proceed" } { + set package_id [ad_conn package_id] + # check that more than 1 category exists + db_1row check_category { + select count(category_id) as num_categories + from ttracker_categories + where package_id = :package_id + } + + if { $num_categories > 1 } { + db_transaction { + # transfer the tickets over + db_dml transfer_tickets { + update ttracker_tickets + set category_id = :transfer_id + where category_id = :category_id + } + + # delete the category + db_dml delete_category { + delete from ttracker_categories + where category_id = :category_id + } + + # check to see that there is STILL one category left + # since we do not know if another user is deleting + # at the same time + if { ![db_0or1row check_category_again { + select count(category_id) + from ttracker_categories + where package_id = :package_id }] } { + db_abort_transaction + ad_return_complaint 1 "
    8. You cannot delete this category. There needs to be at least one category for each ticket tracker instance." + } + } on_error { + ns_log Error "$errmsg" + } + } else { + ad_return_complaint 1 "You cannot delete this category. There needs to be at least one category for each ticket tracker instance." + } +} + +ad_returnredirect "" + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-delete.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-delete.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,37 @@ + +@page_title@ +@context_bar@ +@category_name@ + + +You cannot delete this @category_name@. There needs to be at least +one @category_name@ for each ticket tracker instance. + + + +Are you sure you want to delete this @category_name@? +
      + + + +
      + There is at least one ticket in this @category_name@.
      + Select the @category_name@ to transfer tickets to: + +
      +
      + +

      + +

      + + +
      + +
      + +
      \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-delete.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,48 @@ +# /packages/ticket-tracker/www/admin/category-delete.tcl + +ad_page_contract { + Provides datesource to build a form to delete category + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-26 + @cvs-id $Id: category-delete.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + category_id:integer +} -properties { + category_name:onevalue + page_title:onevalue + context_bar:onevalue + num_categories:onevalue + num_tickets:onevalue + categorie:multirow +} + +set package_id [ad_conn package_id] +set category_name [string tolower [ad_parameter CategoryName "ticket-tracker" "Category"]] +set page_title "Delete $category_name" +set context_bar { "Delete $category_name" } + +# number of categories within this ticket tracker +set num_categories [db_string get_num_categories { + select count(category_id) + from ttracker_categories + where package_id = :package_id +}] + +# number of tickets within this category +set num_tickets [db_string get_num_tickets { + select count(ticket_id) + from ttracker_tickets + where category_id = :category_id +}] + +# get other categories +db_multirow category category_select { + select name, category_id + from ttracker_categories + where package_id = :package_id + and category_id <> :category_id +} + +ad_return_template Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-edit-2.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,45 @@ +# /packages/ticket-tracker/www/admin/category-edit-2.tcl + +ad_page_contract { + Edit an existing category + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-22 + @cvs-id $Id: category-edit-2.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + category_id:integer,notnull + name:nohtml,notnull + description:nohtml,optional + default_assignee:integer +} -validate { + name_is_ok -requires {name:notnull category_id:integer} { + set package_id [ad_conn package_id] + if { [db_0or1row check_duplicate { + select category_id + from ttracker_categories + where upper(name) = upper(:name) and + package_id = :package_id and + category_id != :category_id}] } { + ad_complain + } + } +} -errors { + name_is_ok { Another category with the same name already exists. } +} + +# if default_assigness == none +if { $default_assignee == 0 } { + set default_assignee [db_null] +} + +db_dml category_update { + update ttracker_categories + set name = :name, + description = :description, + default_assignee = :default_assignee + where category_id = :category_id +} + +ad_returnredirect "" + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/category-edit.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,54 @@ +# /packages/ticket-tracker/www/admin/categor-edit.tcl + +ad_page_contract { + Presents a form to edit an existing category + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-26 + @cvs-id $Id: category-edit.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + category_id:integer +} -properties { + context_bar:onevalue + page_title:onevalue + name:onevalue + description:onevalue + default_assignee:onevalue + category_id:onevalue + target:onevalue + submit:onevalue + potential_assignee:multirow +} + +set package_id [ad_conn package_id] +set category_name [string tolower [ad_parameter CategoryName "ticket-tracker" "Category"]] +set page_title "Edit a $category_name" +set context_bar { "Edit a $category_name" } +set target "category-edit-2" +set submit "Edit" + +# get the category information +db_1row category_info_select { + select name, description, default_assignee + from ttracker_categories + where category_id = :category_id +} + +if [empty_string_p $default_assignee] { + set default_assignee 0 +} + +# get the potential assignees +db_multirow assignee assignees_select { + select 0 as party_id, 'Nobody' as party_name from dual + UNION + select p.party_id, acs_object.name(p.party_id) as party_name + from parties p +} + +ad_return_template "category-ae" + + + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/description-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/description-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/description-edit.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,13 @@ + +Edit description +@context_bar@ + +
      +Description: +
      + +

      + +

      + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/index.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,54 @@ + +Ticket Tracker Administration +@context_bar@ + +[ Create a @category_name@ | + Set parameters | + Add a priority/severity option | + Designate notification sender +] + +

      + +

      @category_plural_name@

      + + +

      Severity Options

      + + + + + + + + + + + + + +
      NameValue
      @option.name@@option.value@
      + +

      Priority Options

      + + + + + + + + + + + + + +
      NameValue
      @option.name@@option.value@
      + +

      + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/index.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,43 @@ +# /packages/ticket-tracker/www/admin/index.tcl + +ad_page_contract { + Returns a list of categories and potential assignees under this ttracker + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-11-26 + @cvs-id $Id: index.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} -properties { + context_bar:onevalue + category:multirow + assignee:multirow + option:multirow + category_name:onevalue + category_plural_name:onevalue +} + +set package_id [ad_conn package_id] +set context_bar {} +set category_name [string tolower [ad_parameter CategoryName "ticket-tracker" "Category"]] +set category_plural_name [ad_parameter CategoryPluralName "ticket-tracker" "Categories"] + +# get the categories belong to this ticket tracker +db_multirow category categories_select { + select name, category_id + from ttracker_categories + where package_id = :package_id + order by name +} + +# get the options +db_multirow option options_select { + select name, + value, + function, + option_id + from ttracker_options + where package_id = :package_id + order by function,value +} + +ad_return_template Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/Attic/master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/master.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,7 @@ + +@title@ + +

      @title@

      +<%= [eval ad_context_bar $context_bar] %> +
      + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-add-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-add-2.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,52 @@ +# /packages/ticket-tracker/www/admin/option-add-2.tcl + +ad_page_contract { + Add a new severity or priority option + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-12-14 + @cvs-id $Id: option-add-2.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + function:notnull + name:trim,notnull + value:trim,integer +} -validate { + check_function -requires {function:notnull} { + if { ![string equal $function "severity"] && ![string equal $function "priority"] } { + ad_complain + } + } + + check_duplicate -requires {check_function value:integer name:notnull} { + set package_id [ad_conn package_id] + db_1row duplicate_count { + select count(*) as duplicate + from dual + where exists (select option_id + from ttracker_options + where package_id = :package_id + and function = :function + and (value = :value or upper(name) = upper(:name))) + } + if { $duplicate } { + ad_complain + } + } +} -errors { + check_function { Invalid function. } + check_duplicate { An entry with the same name or value already exists } +} + +db_exec_plsql add_option { + begin + ttracker_option.add_option ( + package_id => :package_id, + function => :function, + name => :name, + value => :value + ); + end; +} + +ad_returnredirect "" Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-add.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,32 @@ +# /packages/ticket-tracker/www/admin/option-add.tcl + +ad_page_contract { + Presents a form to add a new severity or priority name/value pair + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-12-14 + @cvs-id $Id: option-add.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} -properties { + context_bar:onevalue + page_title:onevalue + name:onevalue + value:onevalue + submit:onevalue + target:onevalue + option_id:onevalue + action_bar:onevalue +} + +set context_bar [list "Create a new option" ] +set page_title "Create a new option" + +set name "" +set value "" +set option_id "" + +set submit "Add" +set target "option-add-2.tcl" +set action_bar "" + +ad_return_template "option-ae" Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-ae.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-ae.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-ae.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,36 @@ + +@page_title@ +@context_bar@ +@action_bar@ +

      +

      + + + + + + + + + + + + + + + + + + + +
      Name: +
      Value: +
      Function: +
      +
      +
      +
      + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-delete.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,54 @@ +# /packages/ticket-tracker/www/admin/option-delete.tcl + +ad_page_contract { + Delete a name-value option pair. + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2001-01-08 + @cvs-id $Id: option-delete.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + option_id:integer,ttracker_option_id +} -validate { + is_in_use -requires {option_id:ttracker_option_id} { + # check if this option is not being used by any of the tickets + db_1row ticket_count { + select count(*) as in_use + from dual + where exists (select tt.ticket_id + from ttracker_options ts, + ttracker_tickets tt, + ttracker_categories tc + where ts.option_id = :option_id + and tt.category_id = tc.category_id + and tc.package_id = ts.package_id + and ((ts.function = 'severity' and ts.value = tt.severity) or + (ts.function = 'priority' and ts.value = tt.priority))) + } + + + if { $in_use } { + ad_complain + } + } +} -errors { + is_in_use { This option is being used right now. \ + You must make sure none of the tickets is using this option before deleting it } +} + +db_dml delete_option { + delete from ttracker_options + where option_id = :option_id + and not exists (select tt.ticket_id + from ttracker_options ts, + ttracker_tickets tt, + ttracker_categories tc + where ts.option_id = :option_id + and tt.category_id = tc.category_id + and tc.package_id = ts.package_id + and ((ts.function = 'severity' and ts.value = tt.severity) or + (ts.function = 'priority' and ts.value = tt.priority))) +} + +ad_returnredirect "" + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-edit-2.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,48 @@ +# /packages/ticket-tracker/www/admin/option-edit-2.tcl + +ad_page_contract { + Add a new severity or priority option + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-12-14 + @cvs-id $Id: option-edit-2.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + option_id:integer,ttracker_option_id + function:notnull + name:trim,notnull + value:trim,integer +} -validate { + is_duplicate -requires { option_id:ttracker_option_id + function:notnull + name:notnull + value:integer} { + set package_id [ad_conn package_id] + db_1row duplicate_count { + select count(*) as duplicate + from dual + where exists (select option_id + from ttracker_options + where package_id = :package_id + and function = :function + and option_id <> :option_id + and (value = :value or upper(name) = upper(:name))) + } + if { $duplicate } { + ad_complain + } + } +} -errors { + is_duplicate { Another entry with the same name or value already exists. } +} + +db_dml update_option { + update ttracker_options + set name = :name, + value = :value + where option_id = :option_id +} + +ad_returnredirect "" + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/option-edit.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,43 @@ +# /packages/ticket-tracker/www/admin/option-edit.tcl + +ad_page_contract { + Presents a form to edit an existing severity or priority name/value pair + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2000-12-14 + @cvs-id $Id: option-edit.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + option_id:integer,ttracker_option_id +} -properties { + context_bar:onevalue + page_title:onevalue + name:onevalue + value:onevalue + submit:onevalue + target:onevalue + option_id:onevalue + action_bar:onevalue +} + +set package_id [ad_conn package_id] + +db_1row option_select { + select name, + value, + function + from ttracker_options + where option_id = :option_id +} + + + +set context_bar [list "Edit a $function option"] +set page_title "Edit a $function option" + +set submit "Edit" +set target "option-edit-2" +set action_bar "\[ delete \]" + +ad_return_template "option-ae" + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/sender-designate-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/sender-designate-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/sender-designate-2.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,17 @@ +ad_page_contract { + Designate a user as the sender of email notifications in this ticket tracker. + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2001-01-06 + @cvs-id $Id: sender-designate-2.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} { + party_id:integer +} + +set package_id [ad_conn package_id] + +ad_parameter -set $party_id NotificationSender "ticket-tracker" + +ad_returnredirect "" + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/sender-designate.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/sender-designate.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/sender-designate.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,25 @@ + +Designate Notification Sender +@context_bar@ + +Current designated sender: @designated_sender.name@ +

      +Please select a party from the list below as the sender of email notifications. +

      +The party will be in the "from" field in emails sent out by the ticket tracker. +

      +

      + +

      + +

      + \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/sender-designate.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/sender-designate.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/sender-designate.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,35 @@ +# /packages/ticket-tracker/www/admin/sender-designate.tcl + +ad_page_contract { + Present a list of all parties for user to select the notification sender. + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2001-01-06 + @cvs-id $Id: sender-designate.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} -properties { + context_bar:onevalue + party:multirow + designated_sender:onerow +} + +set context_bar {} +set package_id [ad_conn package_id] + +# current designated sender +db_1row sender_select { + select ttracker_util.notification_sender(:package_id) as party_id, + acs_object.name(ttracker_util.notification_sender(:package_id)) as name + from dual +} -column_array {designated_sender} + + + +# get all parties +# this wouldn't look good on a site w/ more than 100 parties +# hopefully somebody would implement something like a public /admin/users/search for parties soon +db_multirow party parties_select { + select party_id, + acs_object.name(party_id) as name + from parties +} Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/install/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/install/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/install/index.adp 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,31 @@ + +Install +@context_bar@ + +

      + + + + During the package installation, we've discovered the following error(s): +

        + +
      • The General Comments package is not mounted. + + +
      • The ACS Workflow package is not mounted. + + +
      • The SystemUrl parameter under acs-kernel/system-information still has its default value, which is @dubious_url@ + +
      + Please go to Site Map to correct the error(s). + + + Package has been installed successfully. +

      + Please click here to customize it. + + +

      + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/install/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/install/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/admin/install/index.tcl 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,58 @@ +# /packages/ticket-tracker/www/admin/install/index.tcl + +ad_page_contract { + Admin will be redirected to this page to finish the installation + + @author Phong Nguyen (phong@arsdigita.com) + @author Tony Tseng (tony@arsdigita.com) + @creation-date 2001-01-04 + @cvs-id $Id: index.tcl,v 1.1 2001/04/20 20:51:25 donb Exp $ +} -properties { + context_bar:onevalue + gc_mounted_p:onevalue + workflow_mounted_p:onevalue + has_error_p:onevalue +} + +set context_bar {} + +# check to see if general comments has been mounted +db_1row check_gc { + select count(*) as gc_mounted_p + from site_nodes sn, + apm_packages ap + where ap.package_key = 'general-comments' + and sn.object_id = ap.package_id +} + +# check to see if workflow has been mounted +db_1row check_workflow { + select count(*) as workflow_mounted_p + from site_nodes sn, + apm_packages ap + where ap.package_key = 'acs-workflow' + and sn.object_id = ap.package_id +} + +# check to see if SystemUrl still has its default value +if { ![db_0or1row dubious_sys_url { + select apv.attr_value as dubious_url + from apm_parameter_values apv, + apm_parameters ap + where ap.package_key = 'acs-kernel' + and ap.parameter_name = 'SystemURL' + and ap.parameter_id = apv.parameter_id + and ap.default_value = apv.attr_value +}] } { + set dubious_url "" +} + +if { !$gc_mounted_p || !$workflow_mounted_p || ![empty_string_p $dubious_url] } { + set has_error_p 1 +} else { + set has_error_p 0 + ttracker_install +} + +ad_return_template + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/ad-doc.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/ad-doc.css,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/ad-doc.css 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,12 @@ +code {font-family:monospace} +tt {font-family:monospace} + +..shaded{background-color:#dddddd} +...topshaded{background-color:#9999ff} +...shadedquote{background-color:#ffffcc} + +..codeblock{background-color:#eeeedd;font-family:monospace} + +p.listitem { margin-top: 0; margin-bottom: 0; } +ul { margin-bottom: 0; } +dt.listitem { margin-top: 0.5em; } Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/design.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/design.html 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,1081 @@ + +Ticket Tracker Design Document

      Ticket Tracker
      PrevChapter 1. Developer's guide 

      1.2. Ticket Tracker Design Document

      by Tony Tseng, + Phong Nguyen +

      1.2.2. Introduction

      Ticket Tracker is an ACS 4.0 package that provides end users + with a centralized collaborative means for managing tickets. Ticket + Tracker uses the workflow engine to track and manage tickets (i.e., + state of the ticket, who is assigned to the ticket).

      1.2.3. Historical Considerations

      In past 3.x ACS releases, the Ticket Tracker was mainly used to + track bugs and feature requests for projects. The SDM package has + since emerged from the Ticket Tracker to handle just this. The + Ticket Tracker is a more of a general-purpose issue management + service intended to handle any type of project. The SDM can be seen + as a specific ticket-tracker.

      Ticket Tracker for ACS 4.0 does not implement all features + provided by the 3.x version. This version has been redesigned from + scratch in order to take advantage of the object model in ACS + 4.0.

      The most noticeable feature change is that users no longer + define "Projects". Instead users would mount another instance of + the ticket tracker package. This solutions allows administration + for different ticket trackers through the site-map admin pages.

      1.2.5. Design Tradeoffs

      The main problem with the 3.x ticket tracker was that it was too + slow. During the data model redesign, we kept this in mind and came + up with some ideas to help speed up access to ticket + information:

      • Stored duplicate data. The + creation_user and + creation_date are almost always + needed when retrieving data for a ticket. Instead of adding the + extra overhead of joining against the + acs_objects table, this + information was also stored in the + ttracker_tickets table. +

      • Minimize number of tables. Since we also had to join + with the acs-workflow tables to + retrieve ticket state and other information, we had to cut down on + the number of tables to hold Ticket Tracker relevant data. + Ticket-tracker has two tables: + ttracker_tickets and + ttracker_categories +

      • Used other ACS packages to store information + Subsites allowed us to get rid of projects, thus each Ticket Tracker + package instance serves as a project container in which tickets are + grouped. Tickets are further separated by the + ttracker_category table. Subsite + parameters are also used to hold extra instance level data. For now + they hold customization strings for category aliasing. The usage of + the workflow case assignments table saves us from making an extra + mapping table for ticket assignments.

      The main work of the Ticket Tracker really lies within the + workflow engine. The workflow engine keeps track of the current + state of the ticket, who is assigned to the ticket, and other + important information. We had to keep in mind that the + ticket-tracker was going to serve a very general audience in terms + of project management, thus the workflow used had to be simple. + There are plans of a customizable workflow on a + per-package-instance level for future releases of the Ticket + Tracker.

      However, using workflow also introduces additional complexity. + In most SQL queries, multiple workflow tables need to be joined and + performance is hindered as a result.

      1.2.6. API

      No API is provided right now. Although there's an idea that the + ticket tracker pacakge might be able to talk to the portal package + later on...

      1.2.7. Data Model Discussion

      The datamodel is quite simple, since the majority of the work is + done in ACS-workflow. There are three tables: +

      • ttracker_categories + +

        • Contains infomation about categories and default + assignees.

        • 0 or 1 default assignee per category.

        +

      • ttracker_tickets + +

        • Contains information about tickets.

        • ACS-message is the super type of ttracker_ticket so that we can + send out tickets as emails in the future.

        • Duplicates the creations_user and creation_date fields in + acs-objects to imporve performance.

        • Duplicates the subject field in acs-message (or more + accurately, in cr_revision) to improve performance.

        +

      • ttracker_options + +

        • A simple mapping table that contains the name/value pair of + priority and severity options.

        • Not hooked up to the ACS-object system.

        +

      The diagram above is the workflow process used in the Ticket + Tracker. The process is started whenever a new ticket is entered. + Within the process, several custom callbacks in the + ttracker_callback package are used: +

      • assign_task_to_submitter + +

        • An assignment callback.

        • It assigns the task to the submitter of the ticket.

        • It is registered to "Clarify ticket description".

        +

      • assign_task_to_assignee + +

        • An assignment callback.

        • If there is a default assignee for the ticket category, it assigns the task to that party.

        • It is registered to "Resolve ticket".

        +

      • clarify_fire + +

        • A fire callback.

        • It sets the attribute "need_clarification" to false.

        • It is called when "Clarify ticket description" is fired.

        • Reason for existence: When "Clarify ticket description" is + fired, it implies that the ticket description has been clarified + already.

        +

      • resolve_fire: + +

        • A fire callback.

        • It sets the attribute "verified" to true.

        • It is called when "Resolve ticket" is fired.

        • Reason for existence: When "Resolve ticket" is fired, it + implies that the ticket has been resolved. This is only needed if + the users changes the value of "verified" to false in the previous + state.

        +

      • notification: + +

        • A notification callback.

        • It sets the party_from, subject, and body values to send to + acs-notification.

        • It obtains the party_from field from the "Notification Sender" parameter.

        • Based on the custom_arg value, it let's the receiver know of + what action to take. (Since all three transitions use this + callback)

        +

      • notify_admin: + +

        • An unassigned callback.

        • It sends emails to people who have the admin privilege on the + ticket tracker instance to notify them of unassigned tasks.

        • Unlike notification, which only modifies the values of its + argument, notify_admin actually calls nt.post_request to send the + message.

        +

      Originally, another workflow process was used for the ticket + tracker. (shown below) It is more complex than the current workflow + process, mainly because "Assign ticket" is a task in itself. There + are two reasons for it:

      1. We need to email the admin whenever a ticket is + unassigned.

      2. If the user feels the ticket assignment is not adequate, we + need to somehow notify the admin.

      It turns out that [1] can be solved with the new version of + acs-workflow. As for [2], we decide to allow the user to change the + ticket assignment. Also an option to remove all the parties that a + user is a member of is given to the user as well. Therefore, if the + ticket assignee knows the right party to assign to, he or she can + make the change right away. In the worst case, if nobody knows whom + to give the ticket to, the users at least can remove themselves. If + all ticket assignees are removed, the ticket becomes unassigned and + shows up on the admin's unassigned list again. +

      1.2.9. Configuration/Parameters

      • CategoryName:Alternative name for a category

      • CategoryPluralName:Alternative plural name for a + category

      • NotificationSender:Party ID of the email notification sender. This party's email address will appear in the "from" field in all notifications sent out by the ticket tracker.

      1.2.10. Future Improvements/Areas of Likely Change

      • Advanced search.

      • Customizable ticket tracker workflow on a per package + instance.

      • Moving/copying tickets from one ticket-tracker instance to + another.

      1.2.12. Revision History

      Document Revision # Action Taken, NotesWhen?By Whom?
      0.1Creation12/04/2000Phong Nguyen

      phong@arsdigita.com +

      Last modified: $Id: design.html,v 1.1 2001/04/20 20:51:25 donb Exp $


      PrevHome 
      Developer's guideUp 
      \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/dev-guide.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/dev-guide.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/dev-guide.html 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,1072 @@ + +Developer's guide
      Ticket Tracker
      PrevNext

      Chapter 1. Developer's guide

      1.1. Ticket Tracker Requirements

      by Tony Tseng, + Phong Nguyen

      1.1.1. Introduction

      The ticket tracker is a general purpose tool for managing and + resolving issues.

      The following is a requirement document for the ticket tracker + package.

      1.1.2. Vision Statement

      The ticket tracker is designed to let people work + collaboratively on tasks. A ticket represents a task that needs to + be done, such as fixing a broken computer or buying more food. In + order to fulfill its purpose, the ticket tracker must ensure that + the right person is notified promptly of all requests and that the + interested parties can continuously monitor the progress.

      All tickets are archived so that users are able to view past + ticket history. Additionally, users can analyze the performance of + the ticket tracker so that they are able to spot bottlenecks, find + overdue tasks, etc.

      1.1.3. System/Application Overview

      A ticket tracker is composed of categories that group tickets + together. For example, if a ticket tracker is used for city + planning, then the categories can be "irrigation," + "transportation," "crime control," etc. Or, if a ticket tracker is + simply used to keep the men's restroom clean, then the categories + might be "stall A", "stall B", "stall C", etc. In other words, + categories are used to classify tickets.

      The ticket tracker consists of two parts:

      • End user interface: users can + +

        • enter new tickets

        • view individual ticket details

        • interact with tickets that they are involved with (e.g., + clarify ticket description)

        • view summary of tickets by different criteria

        + +

      • Admin interface: administrators can + +

        • add new categories

        • edit existing categories

        • edit priority/severity options

        • specify default assignees for categories

        +

      The ticket tracker uses the permission system to determine:

      • Who can view tickets

      • Who can edit tickets

      • Who can assign tickets

      • Who can administer categories

      1.1.4. Use-cases and User-scenarios

      + Site administrators can and probably should create multiple ticket + trackers. For example, in a typical website, users might create a + hierarchy of ticket trackers like this: +

          
      +    Main Site ticket tracker 
      +      |
      +      +-- Customer Service ticket tracker
      +      +-- Office Administration ticket tracker 
      +            |
      +            +-- Noise ticket tracker
      +            +-- Storage ticket tracker
      +        

      Creating a ticket tracker:

      Adam Smith finds the conditions of the office kitchen unacceptable. + He goes to the ACS Administration page and creates a new ticket + tracker for the purpose of keeping the kitchen clean. In order to + classify tickets, he also creates three categories: "floor," + "sink," and "counter." Since the interns in the office are not + doing anything, Adam designates them to be the default assignees of + the categories. Thus when a new ticket is entered, the interns are + notified immediately via email and, hopefully, will attempt to + clean up the mess in the kitchen.

      Entering new tickets:

      Nancy Nerd is hungry. She goes to the refrigerator and sees that + it's empty. She then goes to the food supply ticket tracker to open + a ticket for people to buy food. Eric Errand-boy immediately + receives an email about the incoming ticket and goes to the + supermarket. Once he's filled the refrigerator with the food, he + marks the ticket as "finished". Nancy then gets an email saying + food has been bought, and she goes to the refrigerator again, only + to discover that her favorite food, Celeste Frozen Pizza, wasn't on + Eric's shopping list. She goes back and rejects Eric's proclaimed + fix, so Eric gets emailed again. He buys the pizza, returns, and + once again hits "done". This time, Nancy heats up a pizza, and + while the pizza is in the microwave, she acknowledges Eric's fix + and closes the ticket.

      Viewing summary:

      Joe Allocator has two new hires. The project he is currently + managing has five different feature areas, and he is not sure which + feature area he should assign the newbies to work on. He opens up + the project-management ticket tracker and goes to the summary page. + It lists the total number of tickets, number of tickets + outstanding, number of tickets suspended, and number of tickets + closed from each feature area. Based on this information, Joe is + able to decide the allocation of his new employees. +

      Searching through tickets:

      Alisa P. Hacker finds the vending machine in the office broken. She + wants to enter a ticket for it, but she is not sure if somebody + else has filed one already. Being a courteous person, Alisa does + not want to enter duplicate tickets. Rather than running around the + office and asking every one of her officemates about it, she + decides to use the search feature. She enters "vending machine" as + the search string, and the ticket tracker immediately returns 10 + entries. Sorting them by date, she then discovers a ticket for the + same issue has just been entered five minutes earlier. +

      1.1.6. Requirements: Technical

      0.0 Speed - Performance is the major drawback for + the 3.x ticket tracker. Should make sure each page in the 4.x + ticket tracker would load at a decent speed, especially the index + page.

      0.10 Portability - Use as much PL/SQL as + possible to improve portability to ACS Java.

      1.1.7. Requirements: Data Model

      Tickets

      10.0 Tickets have the following + information:

      • subject

      • detailed description (may be in either plain text or HTML)

      • priority in integer (how important this issue is)

      • severity in integer (how bad the symptoms/effects of the issue + are)

      • the category this ticket belongs to

      Categories

      10.10 Categories have the following + information:

      • name

      • optionally, a detailed description

      • optionally, the default assignees for this feature area (i.e., + when a new ticket is entered for this category, it'll be + automatically assigned to them)

      • the ticket tracker instance this category belongs to

      Priority/Severity Options

      10.20 There should a mapping table dealing with + the priority/severity options. It shall contain the name-value pair + for each priority and severity option.

      10.30 The term "Category" is customizable. For + example, instead of calling it "Category", users can name it + "Feature Area" or "Floor Number".

      1.1.8. Requirements: User

      20.0 User Basics

      • 20.0.0 Users shall be able to see a summary of + their tickets across multiple instances of the ticket tracker. The + instances we use depend on the mount points in the site map.

      • 20.0.10 Users shall be able to add new tickets + into the ticket tracker.

      • 20.0.20 Users shall be able to interact with + the tickets they are involved with. (e.g., users can mark tickets + assigned to them as fixed; users can clarify tickets that need + their clarification)

      • 20.0.30 Users shall be notified by email + whenever the status of a ticket with which they are involved + changes.

      • 20.0.40 Users shall be able to add comments to + a ticket.

      20.1 Ticket Overview

      • 20.1.0 By default, the interface displays a + list of tasks that users need to do. The tasks are: + +

        • resolve ticket

        • clarify description

        • assign ticket

        • verify result

        +

      • 20.1.20 Users have the option to see: + +

        • Tickets submitted by them

        • Tickets assigned to them

        • All tickets

        +

      • 20.1.10 The list of tickets can be sorted by + ticket attributes such as date or priority.

      20.2 Summary + +

      • 20.2.0 The summary includes the following + information for each category: + +

        • number of total tickets

        • number of unassigned tickets

        • number of outstanding tickets

        • number of total suspended tickets

        • number of resolved tickets

        +

      20.3 Individual Ticket View

      • 20.3.0 Displays the following information: + +

        • subject

        • description

        • priority

        • severity

        • the ticket's current status

        • the ticket's previous states in the process

        • users associated with the ticket

        • the category this ticket belongs to

        +

      20.4 Search + +

      • 20.4.0 User shall be able to search for + tickets by entering a search string. All tickets in the current + ticket tracker containing the search string within either subject + or detailed description should be shown.

      • 20.4.10 The returned list of tickets should be + sortable by the ticket attributes.

      1.1.9. Requirements: Admin

      30.0 Admin Basics

      • 30.0.0 Administrators shall be able to add new + categories

      • 30.0.10 Administrators shall be able to edit + existing categories

      • 30.0.20 Administrators shall be able to + specify the default assignees for categories

      • 30.0.30 Administrators shall be able to change + the state of any ticket in the ticket tracker process (e.g., moving + a ticket from "closed" to "open")

      1.1.10. Requirements: Possible Future Requirements

      40.0 Advanced search. + +

      40.10 Customized ticket tracker workflow.

      40.20 The capability to move tickets from one + ticket tracker to another.

      40.30 Users shall be able to turn off email + notification.

      1.1.11. Revision History

      Document Revision # Action Taken, NotesWhen?By Whom?
      0.1Creation11/11/2000Tony Tseng
      0.2Revision11/16/2000Tony Tseng
      0.3Revision12/16/2000Tony Tseng

      tony@arsdigita.com +

      Last modified: $Id: dev-guide.html,v 1.1 2001/04/20 20:51:25 donb Exp $ +


      PrevHomeNext
      Ticket Tracker Ticket Tracker Design Document
      \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/index.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/index.html 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,272 @@ + +Ticket Tracker

        Next
        Developer's guide
      \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/images/workflow-new.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/images/workflow-new.gif,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/images/workflow-old.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/images/workflow-old.gif,v diff -u -N Binary files differ Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/xml/design.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/xml/design.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/xml/design.xml 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,413 @@ + + Ticket Tracker Design Document + + + by Tony Tseng, + Phong Nguyen + + + + Essentials + + + User directory + + Administrator directory + + Tcl API + + PL/SQL API + + + + ttracker_ticket + + + ttracker_category + + + ttracker_util + + + ttracker_callback + + + + Data model: + + + + ticket-tracker-create.sql + + + ticket-tracker-drop.sql + + + ticket-tracker-packages.sql + + + ticket-create.sql + + + category-create.sql + + + options-create.sql + + + ttracker-workflow-create.sql + + + ttracker-workflow-drop.sql + + + + + + + + + Introduction + + Ticket Tracker is an ACS 4.0 package that provides end users + with a centralized collaborative means for managing tickets. Ticket + Tracker uses the workflow engine to track and manage tickets (i.e., + state of the ticket, who is assigned to the ticket). + + + + Historical Considerations + + In past 3.x ACS releases, the Ticket Tracker was mainly used to + track bugs and feature requests for projects. The SDM package has + since emerged from the Ticket Tracker to handle just this. The + Ticket Tracker is a more of a general-purpose issue management + service intended to handle any type of project. The SDM can be seen + as a specific ticket-tracker. + + Ticket Tracker for ACS 4.0 does not implement all features + provided by the 3.x version. This version has been redesigned from + scratch in order to take advantage of the object model in ACS + 4.0. + + The most noticeable feature change is that users no longer + define "Projects". Instead users would mount another instance of + the ticket tracker package. This solutions allows administration + for different ticket trackers through the site-map admin pages. + + + + Competitive Analysis + + incomplete + + + + Design Tradeoffs + + The main problem with the 3.x ticket tracker was that it was too + slow. During the data model redesign, we kept this in mind and came + up with some ideas to help speed up access to ticket + information: + + + + Stored duplicate data. The + creation_user and + creation_date are almost always + needed when retrieving data for a ticket. Instead of adding the + extra overhead of joining against the + acs_objects table, this + information was also stored in the + ttracker_tickets table. + + + + Minimize number of tables. Since we also had to join + with the acs-workflow tables to + retrieve ticket state and other information, we had to cut down on + the number of tables to hold Ticket Tracker relevant data. + Ticket-tracker has two tables: + ttracker_tickets and + ttracker_categories + + + + Used other ACS packages to store information + Subsites allowed us to get rid of projects, thus each Ticket Tracker + package instance serves as a project container in which tickets are + grouped. Tickets are further separated by the + ttracker_category table. Subsite + parameters are also used to hold extra instance level data. For now + they hold customization strings for category aliasing. The usage of + the workflow case assignments table saves us from making an extra + mapping table for ticket assignments. + + + The main work of the Ticket Tracker really lies within the + workflow engine. The workflow engine keeps track of the current + state of the ticket, who is assigned to the ticket, and other + important information. We had to keep in mind that the + ticket-tracker was going to serve a very general audience in terms + of project management, thus the workflow used had to be simple. + There are plans of a customizable workflow on a + per-package-instance level for future releases of the Ticket + Tracker. + + However, using workflow also introduces additional complexity. + In most SQL queries, multiple workflow tables need to be joined and + performance is hindered as a result. + + + + API + + No API is provided right now. Although there's an idea that the + ticket tracker pacakge might be able to talk to the portal package + later on... + + + + Data Model Discussion + + The datamodel is quite simple, since the majority of the work is + done in ACS-workflow. There are three tables: + + + ttracker_categories + + + Contains infomation about categories and default + assignees. + + 0 or 1 default assignee per category. + + + + ttracker_tickets + + + Contains information about tickets. + + ACS-message is the super type of ttracker_ticket so that we can + send out tickets as emails in the future. + + Duplicates the creations_user and creation_date fields in + acs-objects to imporve performance. + + Duplicates the subject field in acs-message (or more + accurately, in cr_revision) to improve performance. + + + + ttracker_options + + + A simple mapping table that contains the name/value pair of + priority and severity options. + + Not hooked up to the ACS-object system. + + + + + + The diagram above is the workflow process used in the Ticket + Tracker. The process is started whenever a new ticket is entered. + Within the process, several custom callbacks in the + ttracker_callback package are used: + + + assign_task_to_submitter + + + An assignment callback. + + It assigns the task to the submitter of the ticket. + + It is registered to "Clarify ticket description". + + + + assign_task_to_assignee + + + An assignment callback. + + If there is a default assignee for the ticket category, it assigns the task to that party. + + It is registered to "Resolve ticket". + + + + clarify_fire + + + A fire callback. + + It sets the attribute "need_clarification" to false. + + It is called when "Clarify ticket description" is fired. + + Reason for existence: When "Clarify ticket description" is + fired, it implies that the ticket description has been clarified + already. + + + + resolve_fire: + + + A fire callback. + + It sets the attribute "verified" to true. + + It is called when "Resolve ticket" is fired. + + Reason for existence: When "Resolve ticket" is fired, it + implies that the ticket has been resolved. This is only needed if + the users changes the value of "verified" to false in the previous + state. + + + + notification: + + + A notification callback. + + It sets the party_from, subject, and body values to send to + acs-notification. + + It obtains the party_from field from the "Notification Sender" parameter. + + Based on the custom_arg value, it let's the receiver know of + what action to take. (Since all three transitions use this + callback) + + + + notify_admin: + + + An unassigned callback. + + It sends emails to people who have the admin privilege on the + ticket tracker instance to notify them of unassigned tasks. + + Unlike notification, which only modifies the values of its + argument, notify_admin actually calls nt.post_request to send the + message. + + + + + Originally, another workflow process was used for the ticket + tracker. (shown below) It is more complex than the current workflow + process, mainly because "Assign ticket" is a task in itself. There + are two reasons for it: + + + We need to email the admin whenever a ticket is + unassigned. + + If the user feels the ticket assignment is not adequate, we + need to somehow notify the admin. + + + + It turns out that [1] can be solved with the new version of + acs-workflow. As for [2], we decide to allow the user to change the + ticket assignment. Also an option to remove all the parties that a + user is a member of is given to the user as well. Therefore, if the + ticket assignee knows the right party to assign to, he or she can + make the change right away. In the worst case, if nobody knows whom + to give the ticket to, the users at least can remove themselves. If + all ticket assignees are removed, the ticket becomes unassigned and + shows up on the admin's unassigned list again. + + + + + + User Interface + + incomplete + + + + Configuration/Parameters + + + CategoryName:Alternative name for a category + + CategoryPluralName:Alternative plural name for a + category + + NotificationSender:Party ID of the email notification sender. This party's email address will appear in the "from" field in all notifications sent out by the ticket tracker. + + + + + Future Improvements/Areas of Likely Change + + + Advanced search. + + Customizable ticket tracker workflow on a per package + instance. + + Moving/copying tickets from one ticket-tracker instance to + another. + + + + + Authors + + + Tony Tseng + + Phong Nguyen + + + + + Revision History + + + + + + Document Revision # + + Action Taken, Notes + When? + By Whom? + + + + + + 0.1 + Creation + 12/04/2000 + Phong Nguyen + + + + + + phong@arsdigita.com + + + Last modified: $Id: design.xml,v 1.1 2001/04/20 20:51:25 donb Exp $ + + + + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/xml/index.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/xml/index.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/xml/index.xml 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,58 @@ + + + +]> + + + Ticket Tracker + + + + Tony + Tseng + +
      tony@arsdigita.com
      +
      +
      + + Phong + Nguyen + +
      phong@arsdigita.com
      +
      +
      +
      +
      + + + + + Developer's guide + &requirements; + &design; + + + +
      Index: openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/xml/requirements.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/xml/requirements.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker/www/doc/xml/requirements.xml 20 Apr 2001 20:51:25 -0000 1.1 @@ -0,0 +1,435 @@ + + Ticket Tracker Requirements + +by Tony Tseng, + Phong Nguyen + + + Introduction + + The ticket tracker is a general purpose tool for managing and + resolving issues. + + The following is a requirement document for the ticket tracker + package. + + + + Vision Statement + + The ticket tracker is designed to let people work + collaboratively on tasks. A ticket represents a task that needs to + be done, such as fixing a broken computer or buying more food. In + order to fulfill its purpose, the ticket tracker must ensure that + the right person is notified promptly of all requests and that the + interested parties can continuously monitor the progress. + + All tickets are archived so that users are able to view past + ticket history. Additionally, users can analyze the performance of + the ticket tracker so that they are able to spot bottlenecks, find + overdue tasks, etc. + + + + System/Application Overview + + A ticket tracker is composed of categories that group tickets + together. For example, if a ticket tracker is used for city + planning, then the categories can be "irrigation," + "transportation," "crime control," etc. Or, if a ticket tracker is + simply used to keep the men's restroom clean, then the categories + might be "stall A", "stall B", "stall C", etc. In other words, + categories are used to classify tickets. + + The ticket tracker consists of two parts: + + + End user interface: users can + + + enter new tickets + + view individual ticket details + + interact with tickets that they are involved with (e.g., + clarify ticket description) + + view summary of tickets by different criteria + + + + + Admin interface: administrators can + + + add new categories + + edit existing categories + + edit priority/severity options + + specify default assignees for categories + + + + + The ticket tracker uses the permission system to determine: + + + Who can view tickets + + Who can edit tickets + + Who can assign tickets + + Who can administer categories + + + + + Use-cases and User-scenarios + + Site administrators can and probably should create multiple ticket + trackers. For example, in a typical website, users might create a + hierarchy of ticket trackers like this: + + +Main Site ticket tracker + | + +-- Customer Service ticket tracker + +-- Office Administration ticket tracker + | + +-- Noise ticket tracker + +-- Storage ticket tracker + + + Creating a ticket tracker: + + + Adam Smith finds the conditions of the office kitchen unacceptable. + He goes to the ACS Administration page and creates a new ticket + tracker for the purpose of keeping the kitchen clean. In order to + classify tickets, he also creates three categories: "floor," + "sink," and "counter." Since the interns in the office are not + doing anything, Adam designates them to be the default assignees of + the categories. Thus when a new ticket is entered, the interns are + notified immediately via email and, hopefully, will attempt to + clean up the mess in the kitchen. + + Entering new tickets: + + Nancy Nerd is hungry. She goes to the refrigerator and sees that + it's empty. She then goes to the food supply ticket tracker to open + a ticket for people to buy food. Eric Errand-boy immediately + receives an email about the incoming ticket and goes to the + supermarket. Once he's filled the refrigerator with the food, he + marks the ticket as "finished". Nancy then gets an email saying + food has been bought, and she goes to the refrigerator again, only + to discover that her favorite food, Celeste Frozen Pizza, wasn't on + Eric's shopping list. She goes back and rejects Eric's proclaimed + fix, so Eric gets emailed again. He buys the pizza, returns, and + once again hits "done". This time, Nancy heats up a pizza, and + while the pizza is in the microwave, she acknowledges Eric's fix + and closes the ticket. + + Viewing summary: + + Joe Allocator has two new hires. The project he is currently + managing has five different feature areas, and he is not sure which + feature area he should assign the newbies to work on. He opens up + the project-management ticket tracker and goes to the summary page. + It lists the total number of tickets, number of tickets + outstanding, number of tickets suspended, and number of tickets + closed from each feature area. Based on this information, Joe is + able to decide the allocation of his new employees. + + + Searching through tickets: + + Alisa P. Hacker finds the vending machine in the office broken. She + wants to enter a ticket for it, but she is not sure if somebody + else has filed one already. Being a courteous person, Alisa does + not want to enter duplicate tickets. Rather than running around the + office and asking every one of her officemates about it, she + decides to use the search feature. She enters "vending machine" as + the search string, and the ticket tracker immediately returns 10 + entries. Sorting them by date, she then discovers a ticket for the + same issue has just been entered five minutes earlier. + + + + + Related Links + + + ACS + Workflow + + + + + Requirements: Technical + + 0.0 Speed - Performance is the major drawback for + the 3.x ticket tracker. Should make sure each page in the 4.x + ticket tracker would load at a decent speed, especially the index + page. + + 0.10 Portability - Use as much PL/SQL as + possible to improve portability to ACS Java. + + + + Requirements: Data Model + + Tickets + 10.0 Tickets have the following + information: + + + subject + + detailed description (may be in either plain text or HTML) + + priority in integer (how important this issue is) + + severity in integer (how bad the symptoms/effects of the issue + are) + + the category this ticket belongs to + + + Categories + + 10.10 Categories have the following + information: + + + name + + optionally, a detailed description + + optionally, the default assignees for this feature area (i.e., + when a new ticket is entered for this category, it'll be + automatically assigned to them) + + the ticket tracker instance this category belongs to + + + Priority/Severity Options + + 10.20 There should a mapping table dealing with + the priority/severity options. It shall contain the name-value pair + for each priority and severity option. + + 10.30 The term "Category" is customizable. For + example, instead of calling it "Category", users can name it + "Feature Area" or "Floor Number". + + + + Requirements: User + + 20.0 User Basics + + + 20.0.0 Users shall be able to see a summary of + their tickets across multiple instances of the ticket tracker. The + instances we use depend on the mount points in the site map. + + 20.0.10 Users shall be able to add new tickets + into the ticket tracker. + + 20.0.20 Users shall be able to interact with + the tickets they are involved with. (e.g., users can mark tickets + assigned to them as fixed; users can clarify tickets that need + their clarification) + + 20.0.30 Users shall be notified by email + whenever the status of a ticket with which they are involved + changes. + + 20.0.40 Users shall be able to add comments to + a ticket. + + + 20.1 Ticket Overview + + + 20.1.0 By default, the interface displays a + list of tasks that users need to do. The tasks are: + + + resolve ticket + + clarify description + + assign ticket + + verify result + + + + 20.1.20 Users have the option to see: + + + Tickets submitted by them + + Tickets assigned to them + + All tickets + + + + 20.1.10 The list of tickets can be sorted by + ticket attributes such as date or priority. + + + 20.2 Summary + + + 20.2.0 The summary includes the following + information for each category: + + + number of total tickets + + number of unassigned tickets + + number of outstanding tickets + + number of total suspended tickets + + number of resolved tickets + + + + + 20.3 Individual Ticket View + + + 20.3.0 Displays the following information: + + + subject + + description + + priority + + severity + + the ticket's current status + + the ticket's previous states in the process + + users associated with the ticket + + the category this ticket belongs to + + + + + 20.4 Search + + + 20.4.0 User shall be able to search for + tickets by entering a search string. All tickets in the current + ticket tracker containing the search string within either subject + or detailed description should be shown. + + 20.4.10 The returned list of tickets should be + sortable by the ticket attributes. + + + + + Requirements: Admin + + 30.0 Admin Basics + + + 30.0.0 Administrators shall be able to add new + categories + + 30.0.10 Administrators shall be able to edit + existing categories + + 30.0.20 Administrators shall be able to + specify the default assignees for categories + + 30.0.30 Administrators shall be able to change + the state of any ticket in the ticket tracker process (e.g., moving + a ticket from "closed" to "open") + + + + + Requirements: Possible Future Requirements + + 40.0 Advanced search. + + 40.10 Customized ticket tracker workflow. + + 40.20 The capability to move tickets from one + ticket tracker to another. + + 40.30 Users shall be able to turn off email + notification. + + + + Revision History + + + + + + Document Revision # + + Action Taken, Notes + When? + By Whom? + + + + + + 0.1 + Creation + 11/11/2000 + Tony Tseng + + + + 0.2 + Revision + 11/16/2000 + Tony Tseng + + + + 0.3 + Revision + 12/16/2000 + Tony Tseng + + + + tony@arsdigita.com + + + + Last modified: $Id: requirements.xml,v 1.1 2001/04/20 20:51:25 donb Exp $ + + + + + + + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/ticket-tracker-lite.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/ticket-tracker-lite.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/ticket-tracker-lite.info 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,77 @@ + + + + + Ticket Tracker Lite + Ticket Tracker Lites + f + + + + oracle + postgresql + + David Rodriguez + A simple ticket tracker application. Compared to the standard aD ticket tracker, this version has a simpler interface that should be easier for non-technical users to learn. + + 2001-02-20 + ArsDigita Corporation + Learn more at http://oscar.arsdigita.com/ticketdemo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/oracle/ticket-tracker-lite-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/oracle/ticket-tracker-lite-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/oracle/ticket-tracker-lite-create.sql 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,151 @@ +-- /packages/ticket-tracker-lite/sql/ticket-tracker-lite-create.sql +-- +-- @author dvr@arsdigita.com +-- @created 2001-02-18 +-- +--------------------------------------------------- + +begin + + acs_object_type.create_type ( + object_type => 'ticket_tracker_lite_area', + pretty_name => 'Ticket Tracker Lite Feature Area', + pretty_plural => 'Ticket Tracker Lite Feature Area', + table_name => 'ttl_areas', + id_column => 'area_id' + ); + + acs_object_type.create_type ( + object_type => 'ticket_tracker_lite_ticket', + pretty_name => 'Ticket Tracker Lite Ticket', + pretty_plural => 'Ticket Tracker Lite Tickets', + table_name => 'ttl_tickets', + id_column => 'ticket_id' + ); +end; +/ + +create table ttl_areas ( + area_id integer + constraint ttl_areas_object_fk + references acs_objects + constraint ttl_areas_pk + primary key, + active_p char(1) default 't' + constraint ttl_areas_active_ck + check(active_p in ('t','f')), + name varchar(200) + constraint ttl_areas_name_nn + not null +); + +create table ttl_status ( + status varchar(20) + constraint ttl_status_pk + primary key, + status_name varchar(100) + constraint ttl_status_name_nn + not null, + sort_key integer +); + +insert into ttl_status (status, status_name, sort_key) values ('queued', 'Queued', 1); +insert into ttl_status (status, status_name, sort_key) values ('dev', 'Development', 2); +insert into ttl_status (status, status_name, sort_key) values ('staging', 'Staging', 3); +insert into ttl_status (status, status_name, sort_key) values ('completed', 'Completed', 4); +insert into ttl_status (status, status_name, sort_key) values ('revision', 'Needs revision', 5); +insert into ttl_status (status, status_name, sort_key) values ('deferred', 'Deferred', 6); + +create table ttl_tickets ( + ticket_id integer + constraint ttl_tickets_fk + references acs_objects + constraint ttl_tickets_pk + primary key, + active_p char(1) default 't' + constraint ttl_tickets_active_ck + check(active_p in ('t','f')), + area_id integer + constraint ttl_tickets_area_fk + references ttl_areas, + name varchar(200) + constraint ttl_tickets_name_nn + not null, + type varchar(20), + status varchar(20) + constraint ttl_tickets_status_fk + references ttl_status, + url varchar(400), + deadline date, + message clob, + message_format varchar(10) default 'formatted' + constraint ttl_tickets_message_format_ck + check(message_format in ('plain','formatted','html')), + priority integer default 2 +); + +create table ttl_comments ( + comment_id integer + constraint ttl_comments_pk + primary key, + active_p char(1) default 't' + constraint ttl_comments_active_ck + check(active_p in ('t','f')), + ticket_id integer + constraint ttl_comments_ticket_nn + not null + constraint ttl_comments_ticket_fk + references ttl_tickets, + creation_user integer + constraint ttl_comments_user_fk + references users + constraint ttl_comments_user_nn + not null, + creation_date date default sysdate, + message clob, + message_format varchar(10) default 'formatted' + constraint ttl_comments_message_format_ck + check(message_format in ('plain','formatted','html')) +); + +create table ttl_assignments ( + ticket_id integer + constraint ttl_assignments_ticket_fk + references ttl_tickets, + user_id integer + constraint ttl_assignments_user_fk + references users, + constraint ttl_assignments_pk + primary key(ticket_id, user_id), + date_assigned date default sysdate +); + +create table ttl_area_assignments ( + area_id integer + constraint ttl_area_assignments_ticket_fk + references ttl_areas, + user_id integer + constraint ttl_area_assignments_user_fk + references users, + constraint ttl_area_assignments_pk + primary key(area_id, user_id), + date_assigned date default sysdate +); + +create table ttl_prefs ( + user_id integer + constraint ttl_prefs_user_ref + references users + constraint ttl_prefs_user_pk + primary key, + sort varchar(100), + mine_p char(1) default 't' + constraint ttl_prefs_mine_ck + check(mine_p in ('t', 'f')), + status varchar(100), + area_id integer + constraint ttl_pref_area_fk + references ttl_areas +); + +@@ views-and-plsql Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/oracle/ticket-tracker-lite-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/oracle/ticket-tracker-lite-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/oracle/ticket-tracker-lite-drop.sql 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,29 @@ +-- /packages/ticket-tracker-lite/sql/ticket-tracker-lite-drop.sql +-- +-- @author dvr@arsdigita.com +-- @created 2001-02-18 +-- +--------------------------------------------------- + +drop table ttl_prefs; +drop table ttl_area_assignments; +drop table ttl_assignments; +drop table ttl_comments; +drop table ttl_tickets; +drop table ttl_status; +drop table ttl_areas; + +delete from acs_permissions +where object_id in (select package_id + from apm_packages + where package_key = 'ticket-tracker-lite'); + +delete from acs_objects where object_type like 'ticket_tracker_lite%'; + +begin + acs_object_type.drop_type('ticket_tracker_lite_area'); + acs_object_type.drop_type('ticket_tracker_lite_ticket'); +end; +/ + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/oracle/views-and-plsql.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/oracle/views-and-plsql.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/oracle/views-and-plsql.sql 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,108 @@ +-- /packages/ticket-tracker-lite/sql/views-and-plsql.sql +-- +-- @author dvr@arsdigita.com +-- @created 2001-02-18 +-- +--------------------------------------------------- + +-- All areas + +create or replace view ttl_v_areas as +select o.*, a.* +from acs_objects o, ttl_areas a +where o.object_id = a.area_id; + +-- All active areas + +create or replace view ttl_va_areas as +select * from ttl_v_areas where active_p = 't'; + +-- All tickets + +create or replace view ttl_v_tickets as +select o.*, t.* +from acs_objects o, ttl_tickets t +where t.ticket_id = o.object_id; + +-- All active tickets + +create or replace view ttl_va_tickets as +select * from ttl_v_tickets where active_p = 't'; + +-- All active comments + +create or replace view ttl_va_comments +as select * from ttl_comments where active_p = 't'; + +-- The time of the last comment for each ticket + +create or replace view ttl_v_comments_latest as +select * from ttl_va_comments c +where c.comment_id = (select max(c2.comment_id) + from ttl_comments c2 + where c.ticket_id = c2.ticket_id); + +-- All users who assignable to tickets + +create or replace view ttl_v_users as +select + object_id as package_id, + grantee_id as user_id, + privilege +from acs_permissions +where privilege = 'write'; + +create or replace function ttl_relative_date ( + -- + -- if the date is today, show just the time. Otherwise + -- return the date. + -- + v_date IN date +) return varchar +as + v_sysdate date; +begin + + v_sysdate := sysdate; + + if trunc(v_date) = trunc(sysdate) then + return to_char(v_date, 'fmhh:fmmi am'); + else + return to_char(v_date, 'month fmdd, yyyy'); + end if; + +end ttl_relative_date; +/ +show errors + +create or replace function ttl_top_privilege_for_object ( + -- + -- Return the top privilege the user has for this object + -- At the moment this is either 'admin' or 'write' + -- + v_object_id in integer, + v_user_id in integer +) return acs_privileges.privilege%TYPE +as + v_privilege acs_privileges.privilege%TYPE; + v_admin_p integer; +begin + + select count(*) into v_admin_p + from dual + where acs_permission.permission_p(v_object_id, v_user_id, 'admin') = 't'; + + if v_admin_p = 1 then + v_privilege := 'admin'; + else + select privilege into v_privilege + from acs_permissions + where object_id = v_object_id + and grantee_id = v_user_id + and privilege = 'write'; + end if; + + return v_privilege; + +end; +/ Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/tcl/ticket-tracker-lite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/tcl/ticket-tracker-lite-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/tcl/ticket-tracker-lite-procs.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,347 @@ +ad_proc ttl_master_template {} { + return /packages/ticket-tracker-lite/www/master +} + +ad_proc ttl_restrict_to_ttl_users {} { + + set user_id [ad_maybe_redirect_for_registration] + set package_id [ad_conn package_id] + + db_1row t { + select + ttl_top_privilege_for_object(:package_id, :user_id) as privilege + from dual + } + + if [string equal "" $privilege] { + ttl_return_complaint "Access denied" "You're not allowed to access this page" + ad_script_abort + } + + return $privilege +} + +ad_proc ttl_text_format_widget { + -name + {-default formatted} +} { + return "" +} + +ad_proc ttl_format_text_for_display { + {-format formatted} + {-wrap 60} + text +} { + + if [string equal $format formatted] { + return "
      [ttl_paragraph_wrap $text $wrap]
      " + } else { + return $text + } +} + +proc_doc ttl_paragraph_wrap {paragraph max_line_length} { +
      +    # 
      +    # Converts a parargraph with long lines into a paragraph with lines
      +    # no longer than $max_line_length characters. If the paragraph
      +    # contains words longer than $max_line_length, they'll be given
      +    # their own line.
      +    #
      +    # Useful for converting form input into emails. Better than using
      +    # WRAP=HARD in your forms because that will break long strings
      +    # (like URLs.)
      +    #
      +    # -dvr 1/14/2001
      +    #
      +    
      +} { + + set new_paragraph "" + + regsub -all "\r\n" $paragraph "\n" paragraph + + set lines [split [string trimright $paragraph] \n] + + foreach line $lines { + + if {[string length $line] <= $max_line_length} { + append new_paragraph "$line\n" + } else { + set counter 0 + + while {[string length $line] > $max_line_length} { + incr counter + + if {$counter > 1000} { + error "Infinite loop in gf_word_wrap" + } + + # Find me the last space in the string within + # the first $max_line_length characters + set last_space [string last " " $line $max_line_length] + + if {$last_space != -1} { + append new_paragraph "[string range $line 0 $last_space]\n" + set line [string range $line [expr $last_space + 1] end] + # set line [string trimleft $line] + } else { + # two things could be happening: either the first + # word is longer than $max_line_length characters, or + # we have no spaces in this line. + + set first_space [string first " " $line] + + if {$first_space == -1} { + # there are no spaces + append new_paragraph "$line\n" + set line "" + } else { + # The first word is longer than $max_line_length + append new_paragraph "[string range $line 0 $first_space]\n" + set line [string range $line [expr $first_space + 1] end] + # set line [string trimleft $line] + } + } + } + append new_paragraph "$line\n" + } + } + return "[string trimright $new_paragraph]" +} + +proc ttl_return_url_clause {} { + + set url [ns_conn url] + set url_variables [ns_conn query] + + if ![string match "" $url_variables] { + append url "?$url_variables" + } + return "return_url=[ns_urlencode $url]" +} + +ad_proc ttl_type_optionlist { + {default_type ""} +} { + set external_list [list Defect Enhancement Task] + set internal_list [list defect enhancement task] + + return "" +} + +ad_proc ttl_area_optionlist { + -all_option:boolean + {default ""} +} { + + set package_id [ad_conn package_id] + + set area_query "select name, area_id from ttl_va_areas where context_id = $package_id order by name" + if { $all_option_p } { + return [ad_db_select_widget -default $default -option_list {{"" "All areas"}} ttl $area_query area_id] + } else { + return [ad_db_select_widget -default $default ttl $area_query area_id] + } +} + +ad_proc ttl_priority_optionlist { + {default_priority 2} +} { + set external_list [list High Medium Low] + set internal_list [list 1 2 3] + + return "" + +} + +ad_proc ttl_status_optionlist { + {default_status ""} +} { + set status_query "select status_name, status from ttl_status order by sort_key" + set status_optionlist [ad_db_select_widget -default $default_status ttl $status_query status] +} + +ad_proc ttl_navbar_list { + -admin:boolean + -nohome:boolean + {navbar_list_list ""} +} { + + set package_home [ad_conn package_url] + + set default_elements {{/pvt/home "My workspace"}} + + if { !$nohome_p } { + lappend default_elements [list $package_home "Ticket Tracker"] + } + + if { $admin_p } { + lappend default_elements [list $package_home/admin "Administration"] + } + + set navbar_list_list [concat $default_elements $navbar_list_list] + + set navbar_list {} + + foreach pair $navbar_list_list { + lappend navbar_list "[lindex $pair 1]" + } + + return $navbar_list +} + +proc_doc ttl_pref_choices {var_name args} { +
      +    #
      +    
      +} { + upvar $var_name pref_key + + set list_of_links {} + + foreach {var_value linktitle} $args { + if {[info exists pref_key] && [string equal $var_value $pref_key]} { + lappend list_of_links "$linktitle" + } else { + lappend list_of_links "$linktitle" + } + } + + if {[llength $list_of_links] > 1} { + return "\[ [join $list_of_links " | "] \]" + } else { + return [lindex $list_of_links 0] + } +} + +proc ttl_pref_sliders_off {variable_name extra_url_vars target args} { + + upvar $variable_name $variable_name + + set choices_l {} + + foreach option $args { + set pretty_name [lindex $option 0] + set value [lindex $option 1] + + set url "$target?" + if ![empty_string_p $extra_url_vars] { + append url "$extra_url_vars&" + } + if ![empty_string_p $value] { + append url "$variable_name=[ns_urlencode $value]" + } + + if ![info exists $variable_name] { + if [empty_string_p $value] { + lappend choices_l $pretty_name + } else { + lappend choices_l "$pretty_name" + } + } else { + if {[set $variable_name] == "$value"} { + lappend choices_l $pretty_name + } else { + lappend choices_l "$pretty_name" + } + } + } + + set num_choices [llength $choices_l] + + if {$num_choices == 0} { + return + } elseif {$num_choices == 1} { + return [lindex $choices_l 0] + } else { + return "\[ [join $choices_l " | "] \]" + } +} + +ad_proc ttl_return_complaint { + page_title + {page_body ""} +} { + + set master_template [ttl_master_template] + ns_return 200 text/html " + [ad_header $page_title] + +

      $page_title

      + +

      $page_body + [ad_footer]" +} + +ad_proc ttl_util_default {variable_name {default_value ""}} { +

      +    # 
      +    # If the variable exists and isn't equal to the empty string, 
      +    # returns the variable's value. Otherwise, returns $default_value.
      +    # Use like:
      +    #
      +    #    set all_or_nothing [default all_or_nothing "nothing"]
      +    #
      +    
      +} { + upvar 1 $variable_name $variable_name + + if {![info exists $variable_name] || [empty_string_p [set $variable_name]]} { + return $default_value + } else { + return [set $variable_name] + } +} + +ad_proc ttl_util_boolean {variable {true_value 1} {false_value 0} {default_action false}} { +
      +    # 
      +    # Looks inside $variable to see whether it's "true" or "false"
      +    #
      +    # 1) A variable is "true" if it's 1, "True", "T", "Yes", or "Y"
      +    # 2) A variable is "false" if it's 0, "False", "F", "No", or "N"
      +    # 3) If it's neither of these, the value of $default_action decides
      +    #    whether it's true or false.
      +    #
      +    # Example: if a variable is probably 1 or 0, but might not exist or
      +    # might be set to the empty string. Instead of doing:
      +    #
      +    #       if {[info exists something_p] && [string equal $something_p "f"]}...
      +    #
      +    # You can do...
      +    #
      +    #       if [boolean something_p] ...
      +    #
      +    
      +} { + upvar $variable $variable + + if {![info exists $variable] || [empty_string_p [set $variable]]} { + if {[string match $default_action false] == 1} { + return $false_value + } else { + return $true_value + } + } + + set lower_value [string tolower [set $variable]] + + if {[lsearch -exact [list f false off no 0] $lower_value] != -1} { + return $false_value + } elseif {[lsearch -exact [list t true on yes 1] $lower_value] != -1} { + return $true_value + } else { + if {[string match $default_action false] == 1} { + return $false_value + } else { + return $true_value + } + } +} + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/assignment-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/assignment-ae.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/assignment-ae.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,31 @@ +ad_page_contract {} { + user_id:integer,notnull + ticket_id:integer,notnull + {action add} +} + +ttl_restrict_to_ttl_users + +set caller_id [ad_conn user_id] + +if [string equal $action add] { + + db_dml t { + insert into ttl_assignments (user_id, ticket_id) + select :user_id, :ticket_id + from dual + where not exists (select 1 from ttl_assignments + where user_id = :user_id + and ticket_id = :ticket_id) + } + +} else { + + db_dml t { + delete from ttl_assignments + where user_id = :user_id + and ticket_id = :ticket_id + } +} + +ad_returnredirect ticket?ticket_id=$ticket_id Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comment-ae-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comment-ae-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comment-ae-2.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,78 @@ +ad_page_contract {} { + comment_id:integer,notnull + ticket_id:integer,optional + message:allhtml,trim,notnull + message_format:notnull +} + +ttl_restrict_to_ttl_users + +set caller_id [ad_conn user_id] + +db_dml t { + update ttl_comments set + message = :message, + message_format = :message_format + where comment_id = :comment_id +} + +if {[db_resultrows] == 0} { + + db_dml t { + insert into ttl_comments ( + comment_id, ticket_id, creation_user, + message, message_format + ) values ( + :comment_id, :ticket_id, :caller_id, + :message, :message_format + ) + } + + db_foreach t { + select p.email + from parties p, ttl_assignments ta + where ta.ticket_id = :ticket_id + and ta.user_id = p.party_id + UNION + select p.email + from ttl_v_tickets t, parties p + where t.ticket_id = :ticket_id + and t.creation_user = p.party_id + } { + lappend email_recipiants $email + } + + if [info exists email_recipiants] { + + set formatted_message [ttl_format_text_for_display -format $message_format -wrap 60 $message] + + db_1row t { + select + name as ticket_name, + person.name(:caller_id) as sender_fullname, + (select email from parties + where party_id = :caller_id) as sender_email + from ttl_v_tickets + where ticket_id = :ticket_id + } + + ns_sendmail "[join $email_recipiants ,]" "$sender_email" "Re: $ticket_name" \ +"$sender_fullname wrote: + +$message + +[util_current_location][ad_conn package_url]ticket?ticket_id=$ticket_id" + + } +} else { + # We need to get the ticket_id so we know where to redirect + # the user + + db_1row t { + select ticket_id from ttl_comments where comment_id = :comment_id + } +} + +ad_returnredirect ticket?ticket_id=$ticket_id + + \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comment-ae.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comment-ae.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comment-ae.adp 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,23 @@ + +@title@ +@navbar_list@ + +
      +@hidden_vars@ + + + + + + + + +
      + +
      Message is @format_widget@ +
      + +
      + + + \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comment-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comment-ae.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comment-ae.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,57 @@ +ad_page_contract {} { + comment_id:integer,optional + ticket_id:integer,optional +} -validate { + one_of_two_exists { + if {![info exists comment_id] && ![info exists ticket_id]} { + ad_complain "Need either a comment_id or a ticket_id" + } + } +} + +ttl_restrict_to_ttl_users + +set caller_id [ad_conn user_id] + +set master_template [ttl_master_template] + +if [info exists comment_id] { + + db_1row t { + select + c.message, + c.message_format, + t.ticket_id, + t.name as ticket_name + from ttl_comments c, ttl_v_tickets t + where comment_id = :comment_id + and c.ticket_id = t.ticket_id + } + + set title "Edit comment for \"$ticket_name\"" + set button_name "Update" + + set Q_message [ns_quotehtml $message] + set format_widget [ttl_text_format_widget -name message_format -default $message_format] + +} else { + + db_1row t { + select + acs_object_id_seq.nextval as comment_id, + name as ticket_name + from ttl_v_tickets t + where ticket_id = :ticket_id + } + + set title "Attach comment to \"$ticket_name\"" + set button_name "Add comment" + + set Q_message "" + + set format_widget [ttl_text_format_widget -name message_format] +} + +set navbar_list [ttl_navbar_list [list [list ticket?ticket_id=$ticket_id "Ticket $ticket_id"]]] + +set hidden_vars [export_form_vars ticket_id comment_id] Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comments.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comments.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comments.adp 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,14 @@ + + + +

      Comments

      + + +

      @comments.message@ + + (edit) + +

      -- @comments.comment_username@, @comments.comment_date@

      +
      + +
      Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comments.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comments.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/comments.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,21 @@ +set caller_id [ad_conn user_id] + +db_multirow comments t { + select + r.comment_id, + p.first_names || ' ' || p.last_name as comment_username, + r.message, + r.message_format, + ttl_relative_date(r.creation_date) as comment_date, + decode(:caller_id, r.creation_user, 1, 0) as can_edit_p, + null as edit_url + from ttl_va_comments r, persons p + where r.ticket_id = :ticket_id + and r.creation_user = p.person_id +} { + set message [ttl_format_text_for_display -format $message_format -wrap 60 $message] + if { $can_edit_p } { + set edit_url "comment-ae?comment_id=$comment_id" + } +} + Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.adp 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,65 @@ + + +@title@ +@navbar_list@ +@admin_url@ + + + + + +
      [ Add a ticket | Help ]
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      @name_slider@@status_slider@@activity_slider@@area_slider@@priority_slider@@deadline_slider@
      @tickets.ticket_name@@tickets.status@@tickets.last_comment@@tickets.area_name@@tickets.ticket_priority@@tickets.ticket_deadline@
      No tickets found
      Add a ticket
      + +
      + + + + + + + + + + + + +
      Ticket assignmentsTicket statusArea
      @ticket_owner_slider@@ticket_state_slider@@area_optionlist@
      + +
      Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,150 @@ +set caller_privilege [ttl_restrict_to_ttl_users] + +if [string equal admin $caller_privilege] { + set admin_url "[ad_conn package_url]admin" +} else { + set admin_url "" +} + +set package_id [ad_conn package_id] +set caller_id [ad_conn user_id] + +set master_template [ttl_master_template] + +set navbar_list [ttl_navbar_list -nohome] + +db_0or1row t { + select + sort, + mine_p, + status, + area_id, + (select name from ttl_va_areas a + where a.area_id = p.area_id) as area_name + from ttl_prefs p + where user_id = :caller_id +} + +# +# 1) Whose tickets we're viewing +# + +set mine_p [ttl_util_default mine_p f] + +if [ttl_util_boolean mine_p] { + set user_id_clause " +and exists (select 1 from ttl_assignments ta + where ta.user_id = :caller_id + and ta.ticket_id = t.ticket_id)" + +} else { + set user_id_clause "" +} + +# +# 2) Which states we're viewing +# + +set status [ttl_util_default status all] + +if [string equal $status active] { + set state_list {queued dev staging revision} +} elseif [string equal $status all] { + set state_list {} +} else { + set state_list $status +} + +if ![empty_string_p $state_list] { + set status_clause "\nand s.status in ('[join $state_list ',']')" +} else { + set status_clause "" +} + +# +# 3) How we're going to sort the results +# + +set sort [ttl_util_default sort priority] + +switch $sort { + deadline { + set order_clause "order by deadline asc, nvl(c.creation_date, t.last_modified) desc" + } + activity { + set order_clause "order by nvl(c.creation_date, t.last_modified) desc" + } + name { + set order_clause "order by upper(ticket_name)" + } + area { + set order_clause "order by lower(area_name) asc, priority asc, nvl(c.creation_date, t.last_modified) desc" + } + status { + set order_clause "order by lower(s.sort_key) asc, priority asc, nvl(c.creation_date, t.last_modified) desc" + } + default { + set order_clause "order by priority asc, nvl(c.creation_date, t.last_modified) desc" + } +} + +# +# 4) Which area we're viewing +# + +set area_id [ttl_util_default area_id all] + +if [string equal all $area_id] { + set area_clause "" +} else { + set area_clause "\nand t.area_id = :area_id" +} + + +# 5) Figure the page title + +if [ttl_util_boolean mine_p] { + set title "Your tickets" +} else { + set title "Tickets" +} + +if [exists_and_not_null area_name] { + append title " in \"$area_name\"" +} + +db_multirow tickets t " + select + t.ticket_id, + a.name as area_name, + decode(t.priority, 1, 'High', + 2, 'Medium', + 3, 'Low', + t.priority) as ticket_priority, + t.status, + s.sort_key, + t.name as ticket_name, + ttl_relative_date(nvl(c.creation_date, t.last_modified)) as last_comment, + decode(deadline, null, null, to_char(deadline, 'Mon DD')) as ticket_deadline + from ttl_va_tickets t, ttl_status s, ttl_va_areas a, ttl_v_comments_latest c + where a.context_id = :package_id + and a.area_id = t.area_id + and t.status = s.status + and t.ticket_id = c.ticket_id(+) $user_id_clause $status_clause $area_clause + $order_clause" + +# +# For dimensional sliders +# + +set name_slider [ttl_pref_choices sort name Subject] +set status_slider [ttl_pref_choices sort status Status] +set activity_slider [ttl_pref_choices sort activity "Last Activity"] +set area_slider [ttl_pref_choices sort area "Area"] +set priority_slider [ttl_pref_choices sort priority Priority] +set deadline_slider [ttl_pref_choices sort deadline Deadline] + +set ticket_owner_slider [ttl_pref_choices mine_p f All t Mine] +set ticket_state_slider [ttl_pref_choices status all all queued queued active active] + +set area_optionlist [ttl_area_optionlist -all_option $area_id] Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/master.adp 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,68 @@ + + + @title@ + + + + + + + + + + + + + + +
      + Admin view +
      @title@ + @right_header_html@ +
      + + + +
      +@system_owner@ Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/master.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/master.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1 @@ +set system_owner [ad_system_owner] Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/prefs-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/prefs-ae.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/prefs-ae.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,36 @@ +ad_page_contract {} { + sort:trim,optional + status:trim,optional + mine_p:trim,optional + area_id:integer,trim,optional +} + +ttl_restrict_to_ttl_users + +set caller_id [ad_conn user_id] + +foreach variable_name [list sort status mine_p area_id] { + if [info exists $variable_name] { + append update_clause "\n $variable_name = :$variable_name," + } +} + + +if [info exists update_clause] { + + db_dml t "update ttl_prefs set [string trimright $update_clause ,] where user_id = :caller_id" + + if {[db_resultrows] == 0} { + + set sort [ttl_util_default sort priority] + set status [ttl_util_default status active] + set mine_p [ttl_util_default mine_p t] + set area_id [ttl_util_default area_id] + + db_dml t { + insert into ttl_prefs (user_id, sort, status, mine_p, area_id) + values (:caller_id, :sort, :status, :mine_p, :area_id)} + } +} + +ad_returnredirect index Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-add-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-add-2.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,82 @@ +ad_page_contract {} { + ticket_id:integer,notnull + area_id:integer,notnull + type:trim,optional + name:trim,notnull + message:trim,optional + message_format:trim,notnull + priority:trim,notnull + deadline:date,array + {status queued} +} + +ttl_restrict_to_ttl_users + +set caller_id [ad_conn user_id] +set caller_ip [ad_conn peeraddr] + +set deadline_date $deadline(date) + +db_transaction { + + db_dml t { + declare + v_object_id integer; + begin + v_object_id := acs_object.new ( + object_id => :ticket_id, + object_type => 'ticket_tracker_lite_ticket', + creation_user => :caller_id, + creation_ip => :caller_ip, + context_id => :area_id + ); + + insert into ttl_tickets ( + ticket_id, area_id, name, type, status, deadline, + message, message_format, priority + ) values ( + :ticket_id, :area_id, :name, :type, :status, :deadline_date, + :message, :message_format, :priority + ); + end; + } + + db_dml t { + insert into ttl_assignments (user_id, ticket_id) + select user_id, :ticket_id + from ttl_area_assignments + where area_id = :area_id + } +} + +# now that the transaction is over, let's send out the email + +db_foreach t { + select p.email + from parties p, ttl_assignments a + where a.ticket_id = :ticket_id + and a.user_id = p.party_id +} { + lappend people_to_email $email +} + +if [exists_and_not_null people_to_email] { + db_1row t { + select + p1.first_names || ' ' || p1.last_name as ticket_creator_name, + p2.email as ticket_creator_email, + (select name from ttl_va_areas where area_id = :area_id) as area_name + from persons p1, parties p2 + where p1.person_id = p2.party_id + and p1.person_id = :caller_id + } + + ns_sendmail "[join $people_to_email ,]" $ticket_creator_email $name " +Ticket added by $ticket_creator_name in '$area_name' + +$message + +[util_current_location][ad_conn package_url]ticket?ticket_id=$ticket_id" +} + +ad_returnredirect ticket?ticket_id=$ticket_id Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-add.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-add.adp 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,45 @@ + +@title@ +@navbar_list@ + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Name  + +
      + Description
      + +
      Message is @format_widget@ +
      Ticket type:@type_optionlist@
      Area of site:@area_optionlist@
      Priority:@priority_optionlist@
      Deadline:@deadline_widget@
      + +
      + \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-add.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,42 @@ +set caller_privilege [ttl_restrict_to_ttl_users] + +set caller_id [ad_conn user_id] +set package_id [ad_conn package_id] + +set master_template [ttl_master_template] + +db_1row t { + select + acs_object_id_seq.nextval as ticket_id, + (select count(*) + from ttl_va_areas + where context_id = :package_id) as num_areas + from dual +} + +if { $num_areas == 0 } { + if [string equal $caller_privilege admin] { + set message " + Before you can add a ticket, you need to + add a feature area + so the ticket can be categoried." + } else { + set message " + Before you can add a ticket, you need an administrator + to create feature areas so tickets can be categorized." + } + + ttl_return_complaint "Wait!" $message + ad_script_abort +} + +set title "Add a ticket" +set navbar_list [ttl_navbar_list] + +set type_optionlist [ttl_type_optionlist] +set area_optionlist [ttl_area_optionlist] +set priority_optionlist [ttl_priority_optionlist] +set status_optionlist [ttl_status_optionlist] +set deadline_widget [ad_dateentrywidget deadline] + +set format_widget [ttl_text_format_widget -name message_format] Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-edit-2.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,30 @@ +ad_page_contract {} { + ticket_id:integer,notnull + name:trim,notnull + message:trim,optional,allhtml + message_format:trim,notnull +} + +ttl_restrict_to_ttl_users + +set caller_id [ad_conn user_id] +set package_id [ad_conn package_id] +set caller_ip [ns_conn peeraddr] + +db_dml t { + begin + update acs_objects set + last_modified = sysdate, + modifying_user = :caller_id, + modifying_ip = :caller_ip + where object_id = :ticket_id; + + update ttl_tickets set + name = :name, + message = :message, + message_format = :message_format + where ticket_id = :ticket_id; + end; +} + +ad_returnredirect ticket?ticket_id=$ticket_id Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-edit.adp 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,28 @@ + +@title@ +@navbar_list@ + +
      + + + + + + + + + + + + + +
      Name  + +
      + Description
      + +
      Message is @format_widget@ +
      + +
      + \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-edit.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,32 @@ +ad_page_contract {} { + ticket_id:integer,optional +} + +ttl_restrict_to_ttl_users + +set caller_id [ad_conn user_id] +set package_id [ad_conn package_id] + +set master_template [ttl_master_template] + +db_1row t { + select + t.name, + t.message, + t.message_format + from ttl_v_tickets t, ttl_va_areas a + where a.context_id = :package_id + and t.ticket_id = :ticket_id + and t.area_id = a.area_id +} + +set title "Update ticket $ticket_id" +set navbar_list [ttl_navbar_list [list [list "ticket?ticket_id=$ticket_id" "$name"]]] + +set Q_name [ns_quotehtml $name] +set Q_message [ns_quotehtml $message] + + +set format_widget [ttl_text_format_widget -name message_format -default $message_format] + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-update.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-update.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket-update.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,41 @@ +ad_page_contract { + + A page to update the deadline, status, and priority information + +} { + ticket_id:integer,notnull + area_id:integer,notnull + type:trim,optional + status:trim,optional + message:trim,optional + priority:trim,optional + deadline:date,array +} + +ttl_restrict_to_ttl_users + +set caller_id [ad_conn user_id] +set caller_ip [ns_conn peeraddr] +set package_id [ad_conn package_id] + +set deadline_date $deadline(date) + +db_dml t { + begin + update ttl_tickets set + area_id = :area_id, + type = :type, + status = :status, + deadline = :deadline_date, + priority = :priority + where ticket_id = :ticket_id; + + update acs_objects set + last_modified = sysdate, + modifying_user = :caller_id, + modifying_ip = :caller_ip + where object_id = :ticket_id; + end; +} + +ad_returnredirect ticket?ticket_id=$ticket_id Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket.adp 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,92 @@ + +@title@ +@navbar_list@ + + + + + + + + + + + + + + + + + + +
      + +

      @name@ + +

      @message@ + + (edit) + +

      Added @posting_date@ by @posting_name@

      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Ticket type:@type_optionlist@
      Area of site:@area_optionlist@
      Priority:@priority_optionlist@
      Deadline:@deadline_widget@
      Status:@status_optionlist@

      +
      + + + +
      Assigned usersNot assigned
      + +
        + +
      • @assigned_users:item@ + +
      +
      + + Nobody is assigned to this ticket + +
      + @unassigned_optionlist@ + Everyone available has been assigned +
      + + + +
      +

      Add a comment +

      + +
      + + + \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/ticket.tcl 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,91 @@ +ad_page_contract {} { + ticket_id:integer,optional +} + +ttl_restrict_to_ttl_users + +set caller_id [ad_conn user_id] +set package_id [ad_conn package_id] + +set master_template [ttl_master_template] + +set edit_url "ticket-edit?ticket_id=$ticket_id" + +# +# 1) Get the ticket info +# + +db_1row t { + select + t.area_id, + a.name as area_name, + t.name, + t.type, + t.status, + t.message, + t.message_format, + t.priority, + t.deadline, + t.url, + ttl_relative_date(t.creation_date) as posting_date, + person.name(t.creation_user) as posting_name + from ttl_v_tickets t, ttl_va_areas a + where a.context_id = :package_id + and t.ticket_id = :ticket_id + and t.area_id = a.area_id +} + +set title "Ticket $ticket_id" +set navbar_list [ttl_navbar_list [list [list "prefs-ae?area_id=$area_id" "$area_name"]]] + +set message [ttl_format_text_for_display -format $message_format -wrap 60 $message] + +# +# 2) Get people assigned to this ticket +# + +db_foreach t { + select * from ( + select + p.first_names || ' ' || p.last_name as full_name, + t.user_id, + decode(a.user_id, null, 0, 1) as already_assigned_p + from persons p, ttl_v_users t, + (select user_id + from ttl_assignments + where ticket_id = :ticket_id) a + where t.package_id = :package_id + and p.person_id = t.user_id + and t.user_id = a.user_id(+) + order by upper(full_name) + ) where rownum < 50 +} { + + if $already_assigned_p { + lappend assigned_users "$full_name remove" + } else { + append unassigned_options "
    9. Generate WML templates from ADP templates. To help developers port an existing web service to a WAP-compatible format, we considered automatically converting ADP templates to WML templates, by replacing HTML tags with their appropriate WML conterparts. However, since WAP devices have significantly smaller screen spaces, it does not make sense to use the same page flow and layouts of regular HTML pages. We thus opted to have developers specify a new WML template for a page to be served to a WAP device. +

      +

      IV. API

      +
        +
      • User Agent Determinition: the WAP package provide tcl procedures that help developers determine the user agent type: WAP or non-WAP. +

        +

      • User-interface Components: currently the WAP package only has a few procedures that help developers return certain WML widgets, such as the correct header, ACS login/logout links, etc. +

        +

      • Data management: the WAP package provide a number of tcl wrappers for PL/SQL procedures that accomplishes legal database transactions. These transactions include the adding, modifying, and deletion of WAP user agents, toggling user agents' active status, etc. +
      +

      V. Data Model Discussion

      +The core of the WAP data model is one table that stores user agent types: +
      +create table wap_user_agents ( + user_agent_id integer references acs_objects(object_id) primary key, + name varchar(200) + constraint wap_user_agent_name_nn not null, + creation_comment varchar(4000), + active_p char(1) + constraint wap_user_agt_act_p_chk check(active_p in('t', 'f')) +); +
      +Recognized WAP user agents include: ALV UP/4.0.7, Alcatel-BE3/1.0 UP/4.0.6c, EricssonR320/R1A, etc. The list of valid WAP user agents is used to check against all incoming user agents to determine the request user agent type, and the type of template being returned (.adp, or .wml). +

      +

      VI. User Interface

      +
        +
      • Site-wide Administrators: +

        The site-wide adimnistrator can manage WAP package parameters by going through the interface provided by the ACS Package Manager. Through this interface, the administrator can manage WapUAStringCompareLength and WapUADbRefresh parameters as described below in VIII. Configuration/Parameters. +

        +WAP Administrator Directory provides administrators an interface to add, delete, and edit system-recognized WAP user agents. +

        +

      • Public User Directory +

        The public directory, /wap, allows any user to view the currently recognizable WAP user agents. +

      + +

      VII. Configuration/Parameters

      +There are two site-wide parameters that are used by the WAP package: +
        +
      • WapUAStringCompareLength: A number, indicates how many letters, starting from position 1, that the requesting user agent is compared to the list of know user agents to determine requesting user agent type. +
      • WapUADbRefresh: A number, indicates how often, in seconds, cached user agent names would be refreshed from the database. +
      + +

      VIII. Future Improvements/Areas of Likely Change

      +
        +
      • Control WAP-accessibility by package instance. The current version of WAP does not know what package instance is WAP-enabled and what isn't. When a WAP request comes in for a non-WAP-enabled package instance, the template system will try to reply with a .wml template. When it fails to find such a template, it simply fails with a server error. In future versions, WAP package should keep track of package accesibility and return a more graceful message when a non-WAP-enabled page is being accessed by a WAP device. Vice versa, when a regular browser is trying to access a WAP-only package, a message should be returned informing the users that the package is only accessibly via WAP devices. +

        +

      • More WAP utility functions. ACS has a full set of utility functions that help developers to generate formatted html (i.e ad_table). We would like to develop a full set of functions to help developers to generate different wml widgets, as well. These widgets can include select lists, wml forms, etc. +
      • All error-handling functions need to be WAP-compliant. Often times, users will be shown a page of error messages or redirected to /register/login.tcl. These messages and redirects are generated by various authentication and error-handling functions in ACS. They need to be WAP-compliant and return pages depending on the requesting user agent types. +
      + +

      IX. Authors

      + + +

      X. Revistion History

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      Document Revision #Action Taken, NotesWhen?By Whom?
      0.1Creation12/05/2000Shan Shan Huang
      0.2Revised for new requirements12/13/2000Shan Shan Huang
      0.3Final revision before making an apm.01/21/2001Shan Shan Huang
      +
      +
      shuang@arsdigita.com
      + + \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/wap/www/doc/wap-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wap/www/doc/wap-requirements.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wap/www/doc/wap-requirements.html 20 Apr 2001 20:51:23 -0000 1.1 @@ -0,0 +1,104 @@ + +WAP Module Requirements + +

      ACS WAP Module Requirements

      +by Shan Shan Huang +
      +

      I. Introduction

      +This document specifies the requirements for the ACS4.0 WAP module. WAP4.0 takes the WAP module developed by Andrew Grumet for ACS 3.4 and integrates it with ACS4.0's templating system. This integration allows easy development of applications that serve both WAP and regular desktop browsers, as well as stand-alone WAP-compliant applications. + +

      II. Vision Statement

      +According to a study in the Industry Standard, by 2005, the number of people accessing the Internet via wireless devices will have grown to about 484 million. To hold a competitive edge in the market of web service/content providers, it is inevitable that the services/contents delivered to desktop browsers today will have to be accessible via mobile devices -- phones, palm pilots, etc. The ACS WAP module provides programmers a painless way to build wireless extensions to existing ACS applicationswithout much change to existing code and data model, as well as building wireless-only applications that integrates seamlessly with other ACS packages. + +

      III. System Overview

      +A request for a page would be fulfilled in the following manner: +
        +
      • A registered filter in WAP package compares the requesting user agent to a list of wireless agents known to the WAP module (i.e. EricssonR320/R1A, Nokia-WAP-Toolkit/1.2). If the user agent is indentified as a WAP user agent, a content type is set for the text to be returned (text/vnd.wap.wml). +

        +

      • After determining the user agent type, the requested page is processed and appropriate database operations are executed to generate data needed by the templates. +

        +

      • The templating system finds the correct template to parse based on the content type to be returned. It then returns the parsed template with appropriate header information. +
      + +Possible Performance Drawbacks: +
        +
      • There is an extra step in each page-serve to determine the user agent type. This step is called regardless whether the service requested provide a wireless port. +
      • Templating system, before returning a template, needs to figure out the appropriate template depending on the user agent. +
      + +

      IV. Use-cases and User-scenarios

      +Developer +
      +The developer needs to be minimally concerned with what user agent his page is serving. The developer takes care of the database operations as he would for any ACS-backed application, as long as data needed by templates are produced. +

      +Graphic Designer +
      +The graphic designer define different page flow for different browser types by working with the templates. For a particular page, the graphic designer can define one .adp template for the desktop browsers, and a .wdp template for the wireless browsers. The template system figures out what the correct template is for individual user agents. +

      +Site Adiministrator +
      +The site administrator can manage what user agents are recognized as valid WAP agents through the WAP admin interface. +

      +Web surfer +
      +To request a certain page, the user need not to do anything different whether he is using a desktop browser or a WAP-compliant device. The integration of WAP module with the request processor and the templating system serves up the correct page format to the user. +

      + +

      V. Related Links

      + + +

      VI.A Requirements:Data Model

      +
        +
      • 4.00 Browser Type Identification

        +A table of known WAP user agents is used by WAP package to identify the browser and set the correct content type to be returned. +

      + +

      VI.B Requirements:Templating System

      +
        +
      • 5.00 Template Identification

        +The template system identifies the appropriate template to return given the desired output content type. +

      + +

      VII Revision History

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Document Revision #Action Taken, NotesWhen?By Whom?
      0.1Creation11/25/2000Shan Shan Huang
      Reviewed11/26/2000Andrew Grumet
      0.2Revised11/30/2000Shan Shan Huang
      0.3Revised to conform to new requirements12/13/2000Shan Shan Huang
      + +
      +shuang@arsdigita.com + + + Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/wf-ticket-tracker.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/wf-ticket-tracker.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/wf-ticket-tracker.info 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,44 @@ + + + + + Ticket Tracker based on Workflow Package + Ticket Trackers based on Workflow Package + f + + + + oracle + postgresql + + Lars Pind + This is a sample workflow application, only for demonstration purposes. + 2000-12-08 + ArsDigita Corporation + This package illustrates how to use workflow in a rat-simple ticket-tracker clone. Definitely not a full application, only for training purposes. + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/oracle/ticket-workflow-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/oracle/ticket-workflow-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/oracle/ticket-workflow-create.sql 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,126 @@ +/* This table will hold one row for each case using this workflow. */ +create table wf_ticket_cases ( + case_id integer primary key + constraint wf_ticket_cases_case_fk + references wf_cases +); + + +declare + v_workflow_key varchar(40); +begin + v_workflow_key := workflow.create_workflow( + workflow_key => 'ticket_wf', + pretty_name => 'Ticket Tracker Process', + pretty_plural => 'Ticket Tracker Process', + description => 'Workflow for processing a ticket in the ticket-tracker', + table_name => 'wf_ticket_cases' + ); +end; +/ +show errors + + + + +insert into wf_places(place_key, workflow_key, place_name, sort_order) + values ('start', 'ticket_wf', 'Needs to be fixed', 1); +insert into wf_places(place_key, workflow_key, place_name, sort_order) + values ('to_be_acknowledged', 'ticket_wf', 'Needs to be acknowledged', 2); +insert into wf_places(place_key, workflow_key, place_name, sort_order) + values ('to_be_clarified', 'ticket_wf', 'Needs to be clarified', 3); +insert into wf_places(place_key, workflow_key, place_name, sort_order) + values ('end', 'ticket_wf', 'End state', 4); + + +insert into wf_transitions(transition_key, transition_name, workflow_key, sort_order, trigger_type) + values ('fix', 'Fix problem', 'ticket_wf', 1, 'user'); +insert into wf_transitions(transition_key, transition_name, workflow_key, sort_order, trigger_type) + values ('acknowledge', 'Acknowledge fix', 'ticket_wf', 2, 'user'); +insert into wf_transitions(transition_key, transition_name, workflow_key, sort_order, trigger_type) + values ('clarify', 'Clarify problem', 'ticket_wf', 3, 'user'); + + +-- fix -- +-- in +insert into wf_arcs(workflow_key, transition_key, place_key, direction) + values ('ticket_wf', 'fix', 'start', 'in'); +-- out +insert into wf_arcs(workflow_key, transition_key, place_key, direction, guard_callback, guard_custom_arg, guard_description) + values ('ticket_wf', 'fix', 'to_be_acknowledged', 'out', 'wf_callback.guard_attribute_true', 'clear', 'Problem clear and fixed'); +insert into wf_arcs(workflow_key, transition_key, place_key, direction, guard_callback, guard_custom_arg, guard_description) + values ('ticket_wf', 'fix', 'to_be_clarified', 'out', '#', '', 'Problem not clear'); + + +-- acknowledge +-- in +insert into wf_arcs(workflow_key, transition_key, place_key, direction) + values ('ticket_wf', 'acknowledge', 'to_be_acknowledged', 'in'); +-- out +insert into wf_arcs(workflow_key, transition_key, place_key, direction, guard_callback, guard_custom_arg, guard_description) + values ('ticket_wf', 'acknowledge', 'end', 'out', 'wf_callback.guard_attribute_true', 'acknowledged', 'Fix okay'); +insert into wf_arcs(workflow_key, transition_key, place_key, direction, guard_callback, guard_custom_arg, guard_description) + values ('ticket_wf', 'acknowledge', 'start', 'out', '#', '', 'Fix not okay'); + + +-- clarify +-- in +insert into wf_arcs(workflow_key, transition_key, place_key, direction) + values ('ticket_wf', 'clarify', 'to_be_clarified', 'in'); +-- out +insert into wf_arcs(workflow_key, transition_key, place_key, direction) + values ('ticket_wf', 'clarify', 'start', 'out'); + + +declare + v_attribute_id acs_attributes.attribute_id%TYPE; +begin + v_attribute_id := workflow.create_attribute( + workflow_key => 'ticket_wf', + attribute_name => 'clear', + datatype => 'boolean', + pretty_name => 'Problem is clear', + default_value => 't' + ); + + insert into wf_transition_attribute_map + (workflow_key, transition_key, attribute_id, sort_order) + values + ('ticket_wf', 'fix', v_attribute_id, 1); + + v_attribute_id := workflow.create_attribute( + workflow_key => 'ticket_wf', + attribute_name => 'acknowledged', + datatype => 'boolean', + pretty_name => 'Fix is okay', + default_value => 't' + ); + + insert into wf_transition_attribute_map + (workflow_key, transition_key, attribute_id, sort_order) + values + ('ticket_wf', 'acknowledge', v_attribute_id, 1); +end; +/ +show errors; + +insert into wf_context_task_panels(context_key, workflow_key, transition_key, sort_key, header, template_url) +values ('default', 'ticket_wf', 'fix', 1, 'Ticket', '/wf-ticket-tracker/panel-ticket'); + +insert into wf_context_task_panels(context_key, workflow_key, transition_key, sort_key, header, template_url) +values ('default', 'ticket_wf', 'fix', 2, 'What To Do', '/wf-ticket-tracker/panel-fix-to-do'); + +insert into wf_context_task_panels(context_key, workflow_key, transition_key, sort_key, header, template_url) +values ('default', 'ticket_wf', 'clarify', 1, 'Ticket', '/wf-ticket-tracker/panel-ticket'); + +insert into wf_context_task_panels(context_key, workflow_key, transition_key, sort_key, header, template_url) +values ('default', 'ticket_wf', 'clarify', 2, 'What To Do', '/wf-ticket-tracker/panel-clarify-to-do'); + +insert into wf_context_task_panels(context_key, workflow_key, transition_key, sort_key, header, template_url) +values ('default', 'ticket_wf', 'acknowledge', 1, 'Ticket', '/wf-ticket-tracker/panel-ticket'); + +insert into wf_context_task_panels(context_key, workflow_key, transition_key, sort_key, header, template_url) +values ('default', 'ticket_wf', 'acknowledge', 2, 'What To Do', '/wf-ticket-tracker/panel-acknowledge-to-do'); + + +commit; Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/oracle/tony@sfsun.sf.arsdigita.com =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/oracle/tony@sfsun.sf.arsdigita.com,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/oracle/tony@sfsun.sf.arsdigita.com 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,117 @@ +/* This table will hold one row for each case using this workflow. */ +create table wf_ticket_cases ( + case_id integer primary key + constraint wf_ticket_cases_case_fk + references wf_cases +); + + +declare + v_workflow_key varchar(40); +begin + v_workflow_key := workflow.create_workflow( + workflow_key => 'ticket_wf', + pretty_name => 'Ticket Tracker Process', + pretty_plural => 'Ticket Tracker Process', + description => 'Workflow for processing a ticket in the ticket-tracker', + table_name => 'wf_ticket_cases' + ); +end; +/ +show errors + + + + +insert into wf_places(place_key, workflow_key, place_name, sort_order) + values ('start', 'ticket_wf', 'Needs to be fixed', 1); +insert into wf_places(place_key, workflow_key, place_name, sort_order) + values ('to_be_acknowledged', 'ticket_wf', 'Needs to be acknowledged', 2); +insert into wf_places(place_key, workflow_key, place_name, sort_order) + values ('to_be_clarified', 'ticket_wf', 'Needs to be clarified', 3); +insert into wf_places(place_key, workflow_key, place_name, sort_order) + values ('end', 'ticket_wf', 'End state', 4); + + +insert into wf_transitions(transition_key, transition_name, workflow_key, sort_order, trigger_type) + values ('fix', 'Fix problem', 'ticket_wf', 1, 'user'); +insert into wf_transitions(transition_key, transition_name, workflow_key, sort_order, trigger_type) + values ('acknowledge', 'Acknowledge fix', 'ticket_wf', 2, 'user'); +insert into wf_transitions(transition_key, transition_name, workflow_key, sort_order, trigger_type) + values ('clarify', 'Clarify problem', 'ticket_wf', 3, 'user'); + + +-- fix -- +-- in +insert into wf_arcs(workflow_key, transition_key, place_key, direction) + values ('ticket_wf', 'fix', 'start', 'in'); +-- out +insert into wf_arcs(workflow_key, transition_key, place_key, direction, guard_callback, guard_custom_arg, guard_description) + values ('ticket_wf', 'fix', 'to_be_acknowledged', 'out', 'wf_callback.guard_attribute_true', 'clear', 'Problem clear and fixed'); +insert into wf_arcs(workflow_key, transition_key, place_key, direction, guard_callback, guard_custom_arg, guard_description) + values ('ticket_wf', 'fix', 'to_be_clarified', 'out', '#', '', 'Problem not clear'); + + +-- acknowledge +-- in +insert into wf_arcs(workflow_key, transition_key, place_key, direction) + values ('ticket_wf', 'acknowledge', 'to_be_acknowledged', 'in'); +-- out +insert into wf_arcs(workflow_key, transition_key, place_key, direction, guard_callback, guard_custom_arg, guard_description) + values ('ticket_wf', 'acknowledge', 'end', 'out', 'wf_callback.guard_attribute_true', 'acknowledged', 'Fix okay'); +insert into wf_arcs(workflow_key, transition_key, place_key, direction, guard_callback, guard_custom_arg, guard_description) + values ('ticket_wf', 'acknowledge', 'start', 'out', '#', '', 'Fix not okay'); + + +-- clarify +-- in +insert into wf_arcs(workflow_key, transition_key, place_key, direction) + values ('ticket_wf', 'clarify', 'to_be_clarified', 'in'); +-- out +insert into wf_arcs(workflow_key, transition_key, place_key, direction) + values ('ticket_wf', 'clarify', 'start', 'out'); + + +declare + v_attribute_id acs_attributes.attribute_id%TYPE; +begin + v_attribute_id := workflow.create_attribute( + workflow_key => 'ticket_wf', + attribute_name => 'clear', + datatype => 'boolean', + pretty_name => 'Problem is clear', + default_value => 't' + ); + + insert into wf_transition_attribute_map + (workflow_key, transition_key, attribute_id, sort_order) + values + ('ticket_wf', 'fix', v_attribute_id, 1); + + v_attribute_id := workflow.create_attribute( + workflow_key => 'ticket_wf', + attribute_name => 'acknowledged', + datatype => 'boolean', + pretty_name => 'Fix is okay', + default_value => 't' + ); + + insert into wf_transition_attribute_map + (workflow_key, transition_key, attribute_id, sort_order) + values + ('ticket_wf', 'acknowledge', v_attribute_id, 1); +end; +/ +show errors; + +insert into wf_context_transition_info (context_key, workflow_key, transition_key, panels_callback_tcl) +values ('default', 'ticket_wf', 'fix', 'wf_ticket_panel_fix'); + +insert into wf_context_transition_info (context_key, workflow_key, transition_key, panels_callback_tcl) +values ('default', 'ticket_wf', 'clarify', 'wf_ticket_panel_clarify'); + +insert into wf_context_transition_info (context_key, workflow_key, transition_key, panels_callback_tcl) +values ('default', 'ticket_wf', 'acknowledge', 'wf_ticket_panel_acknowledge'); + + +commit; Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/oracle/wf-ticket-tracker-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/oracle/wf-ticket-tracker-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/oracle/wf-ticket-tracker-create.sql 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,121 @@ +begin + acs_object_type.create_type( + object_type => 'wf_ticket', + pretty_name => 'Ticket', + pretty_plural => 'Tickets', + table_name => 'wf_tickets', + id_column => 'ticket_id', + package_name => 'wf_ticket', + name_method => 'wf_ticket.name' + ); + + -- XXX fill in all the attributes in later. +end; +/ +show errors + +create table wf_tickets ( + ticket_id integer + constraint wf_tickets_pk + primary key + constraint wf_tickets_acs_object_fk + references acs_objects on delete cascade, + subject varchar(400), + description varchar(4000), + severity integer, + priority integer +); + +create or replace package wf_ticket +is + function new ( + ticket_id in wf_tickets.ticket_id%TYPE default null, + subject in wf_tickets.subject%TYPE, + description in wf_tickets.description%TYPE, + severity in wf_tickets.severity%TYPE default 3, + priority in wf_tickets.priority%TYPE default 3, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null + ) return integer; + + procedure delete ( + ticket_id in wf_tickets.ticket_id%TYPE + ); + + function name ( + ticket_id in wf_tickets.ticket_id%TYPE + ) return varchar; +end; +/ +show errors; + + +create or replace package body wf_ticket +is + function new ( + ticket_id in wf_tickets.ticket_id%TYPE default null, + subject in wf_tickets.subject%TYPE, + description in wf_tickets.description%TYPE, + severity in wf_tickets.severity%TYPE default 3, + priority in wf_tickets.priority%TYPE default 3, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null + ) return integer + is + v_ticket_id number; + v_case_id number; + begin + v_ticket_id := acs_object.new( + object_id => ticket_id, + object_type => 'wf_ticket', + creation_date => new.creation_date, + creation_user => new.creation_user, + creation_ip => new.creation_ip + ); + + insert into wf_tickets (ticket_id, subject, description, severity, priority) + values (v_ticket_id, new.subject, new.description, new.severity, new.priority); + + v_case_id := workflow_case.new( + workflow_key => 'ticket_wf', + object_id => v_ticket_id, + creation_date => new.creation_date, + creation_user => new.creation_user, + creation_ip => new.creation_ip + ); + + workflow_case.start_case( + case_id => v_case_id, + creation_user => new.creation_user, + creation_ip => new.creation_ip + ); + + return v_ticket_id; + end; + + procedure delete ( + ticket_id in wf_tickets.ticket_id%TYPE + ) + is + begin + delete from wf_tickets where ticket_id = wf_ticket.delete.ticket_id; + acs_object.delete(wf_ticket.delete.ticket_id); + end; + + function name ( + ticket_id in wf_tickets.ticket_id%TYPE + ) return varchar + is + v_subject wf_tickets.subject%TYPE; + begin + select subject into v_subject + from wf_tickets + where ticket_id = name.ticket_id; + return v_subject; + end; + +end; +/ +show errors; Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/oracle/wf-ticket-tracker-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/oracle/wf-ticket-tracker-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/oracle/wf-ticket-tracker-drop.sql 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,11 @@ +delete from wf_tickets; +begin + acs_object_type.drop_type( + object_type => 'wf_ticket' + ); +end; +/ +show errors + +drop package wf_ticket; +drop table wf_tickets; Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/index.adp 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,23 @@ + +WF Ticket Tracker + +

      WF Ticket Tracker

      +@context_bar@ +
      + +

      Create new Ticket

      + +
      + + + + + + + + +
      Subject
      Description
      Severity
      Priority
      + +
      + +
      \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/index.tcl 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,10 @@ +ad_page_contract {} -properties { + context_bar + ticket_id +} + +set context_bar [ad_context_bar] + +set ticket_id [db_nextval "acs_object_id_seq"] + +ad_return_template \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-acknowledge-to-do.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-acknowledge-to-do.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-acknowledge-to-do.adp 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,5 @@ +
        +
      1. Verify that the fix is as you expected. +
      2. If it is, select 'yes' at the right. +
      3. If not, select 'no' at the right. +
      \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-clarify-to-do.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-clarify-to-do.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-clarify-to-do.adp 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,3 @@ +
        +
      1. Clarify the problem so the fixer stands a better chance of fixing the problem. +
      Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-fix-to-do.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-fix-to-do.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-fix-to-do.adp 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,5 @@ +
        +
      1. Try to reproduce the problem +
      2. If the problem is unclear to you, select 'no' at the right. +
      3. If you do understand the problem, select 'yes' at the right, fix the problem, and hit 'Task done' +
      Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-ticket.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-ticket.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-ticket.adp 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,6 @@ + + + + + +
      Subject@ticket.subject@
      Description@ticket.description@
      Severity@ticket.severity@
      Priority@ticket.priority@
      Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-ticket.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-ticket.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/panel-ticket.tcl 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,15 @@ +# This template expects the following properties: +# task:onerow +# task_attributes_to_set:multirow +# task_assigned_users:multirow +# task_transitions_to_assign:multirow + +# Returns: +# ticket:onerow(subject,description,severity,priority) + +set ticket_id $task(object_id) + + +db_1row ticket "select subject, description, severity, priority from wf_tickets where ticket_id = :ticket_id" -column_array ticket + +ad_return_template Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/ticket-new-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/ticket-new-2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/ticket-new-2.adp 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,14 @@ + +Ticket created + +

      Ticket Created

      + +
      + +Our customer service department will get back to you as soon as possible. + +

      + +(Go to workflow to see it in action) + + \ No newline at end of file Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/ticket-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/ticket-new-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/www/ticket-new-2.tcl 20 Apr 2001 20:51:24 -0000 1.1 @@ -0,0 +1,30 @@ +ad_page_contract {} { + ticket_id:integer + subject + description + severity:integer + priority:integer +} + +set user_id [ad_get_user_id] + +set creation_ip [ad_conn peeraddr] + +set ticket_id [db_exec_plsql new_ticket { + begin + :1 := wf_ticket.new( + ticket_id => :ticket_id, + subject => :subject, + description => :description, + severity => :severity, + priority => :priority, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; +}] + +ad_return_template + + + Index: openacs-4/packages/acs-datetime/acs-datetime.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/acs-datetime.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-datetime/acs-datetime.info 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,49 @@ + + + + + ACS DateTime + ACS DateTime + t + + + + oracle + postgresql + + Ron Henderson +

      Service package to support date and time functions + 2001-02-08 + ArsDigita Corporation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,830 @@ +# /packages/acs-datetime/tcl/acs-calendar-widgets.tcl + +ad_library { + + Library for calendar display widgets + + @author ron@arsdigita.com + @created 2000-11-21 + @cvs-id $Id: acs-calendar-procs.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} + +ad_proc dt_widget_month { + { + -calendar_details "" + -date "" + -days_of_week "Sunday Monday Tuesday Wednesday Thursday Friday Saturday" + -large_calendar_p 1 + -master_bgcolor "black" + -header_bgcolor "black" + -header_text_color "white" + -header_text_size "+2" + -day_number_template {$day_number} + -day_header_size 2 + -day_header_bgcolor "#666666" + -calendar_width "100%" + -day_bgcolor "#DDDDDD" + -today_bgcolor "#DDDDDD" + -day_text_color "white" + -empty_bgcolor "white" + -next_month_template "" + -prev_month_template "" + -prev_next_links_in_title 0 + -fill_all_days 0 + } +} { + Returns a calendar for a specific month, with details supplied by + Julian date. Defaults to this month. + + To specify details for the individual days (if large_calendar_p is + set) put data in an ns_set calendar_details. The key is the + Julian date of the day, and the value is a string (possibly with + HTML formatting) that represents the details. +} { + dt_get_info_from_db $date + + if [empty_string_p $calendar_details] { + set calendar_details [ns_set create calendar_details] + } + + set day_of_week $first_day_of_month + set julian_date $first_julian_date + + set month_heading [format "%s %s" $month $year] + set next_month_url "" + set prev_month_url "" + + if ![empty_string_p $prev_month_template] { + set ansi_date [ns_urlencode $prev_month] + set prev_month_url [subst $prev_month_template] + } + + if ![empty_string_p $next_month_template] { + set ansi_date [ns_urlencode $next_month] + set next_month_url [subst $next_month_template] + } + + # We offer an option to put the links to next and previous months + # in the title bar + + if { $prev_next_links_in_title == 0 } { + set title " + + $month_heading + \n" + } else { + set title " + + + + + + + +
      $prev_month_url + $month_heading + $next_month_url
      + \n" + } + + # Write out the header and the days of the week + + append output " + + $title + \n" + + foreach day_of_week $days_of_week { + append output " + \n" + } + + append output "\n" + + if { $fill_all_days == 0 } { + for { set n 1} { $n < $first_day_of_month } { incr n } { + append output "\n" + } + } + + set day_of_week 1 + set julian_date $first_julian_date + set day_number $first_day + + while {1} { + + if {$julian_date < $first_julian_date_of_month} { + set before_month_p 1 + set after_month_p 0 + } elseif {$julian_date > $last_julian_date_in_month} { + set before_month_p 0 + set after_month_p 1 + } else { + set before_month_p 0 + set after_month_p 0 + } + + if {$julian_date == $first_julian_date_of_month} { + set day_number 1 + } elseif {$julian_date > $last_julian_date} { + break + } elseif {$julian_date == [expr $last_julian_date_in_month+1]} { + set day_number 1 + } + + if { $day_of_week == 1} { + append output "\n" + } + + set skip_day 0 + + if {$before_month_p || $after_month_p} { + append output "\n" + + incr day_of_week + incr julian_date + incr day_number + + if { $day_of_week > 7 } { + set day_of_week 1 + append output "\n" + } + } + + # There are two ways to display previous and next month link - + # this is the default + + if { $prev_next_links_in_title == 0 } { + append output " + + + \n" + } + + return [concat $output "
      + + $day_of_week + +
       " + if { $fill_all_days == 0 } { + set skip_day 1 + } else { + append output "[subst $day_number_template] " + } + } else { + append output "[subst $day_number_template] " + } + + if { (!$skip_day) && $large_calendar_p == 1 } { + append output "
      " + + set calendar_day_index [ns_set find $calendar_details $julian_date] + + while { $calendar_day_index >= 0 } { + set calendar_day [ns_set value $calendar_details $calendar_day_index] + + ns_set delete $calendar_details $calendar_day_index + + append output "$calendar_day" + + set calendar_day_index [ns_set find $calendar_details $julian_date] + } + append output "
      " + } + + append output "
      $prev_month_url$next_month_url
      \n"] +} + +ad_proc dt_widget_month_small { + { + -calendar_details "" + -date "" + -days_of_week "S M T W T F S" + -large_calendar_p 0 + -master_bgcolor "black" + -header_bgcolor "black" + -header_text_color "white" + -header_text_size "+1" + -day_number_template {$day_number} + -day_header_size 1 + -day_header_bgcolor "#666666" + -calendar_width 0 + -day_bgcolor "#DDDDDD" + -day_text_color "white" + -empty_bgcolor "white" + -next_month_template "" + -prev_month_template "" + } +} { + Returns a small calendar for a specific month. Defaults to this month. +} { + return [dt_widget_month \ + -calendar_details $calendar_details \ + -date $date \ + -days_of_week $days_of_week \ + -large_calendar_p $large_calendar_p \ + -master_bgcolor $master_bgcolor \ + -header_bgcolor $header_bgcolor \ + -header_text_color $header_text_color \ + -header_text_size $header_text_size \ + -day_number_template $day_number_template \ + -day_header_size $day_header_size \ + -day_header_bgcolor $day_header_bgcolor \ + -calendar_width $calendar_width \ + -day_bgcolor $day_bgcolor \ + -day_text_color $day_text_color \ + -empty_bgcolor $empty_bgcolor \ + -next_month_template $next_month_template \ + -prev_month_template $prev_month_template ] +} + +ad_proc dt_widget_month_centered { + { + -calendar_details "" + -date "" + -days_of_week "S M T W T F S" + -large_calendar_p 0 + -master_bgcolor "black" + -header_bgcolor "black" + -header_text_color "white" + -header_text_size "+1" + -day_number_template {$day_number} + -day_header_size 1 + -day_header_bgcolor "#666666" + -calendar_width 0 + -day_bgcolor "#DDDDDD" + -day_text_color "white" + -empty_bgcolor "white" + -next_month_template "" + -prev_month_template "" + } +} { + Returns a calendar for a specific month, with details supplied by + Julian date. Defaults to this month. +} { + set output "" + + dt_get_info_from_db $date + + append output " + + + + + + + + +
      + + [dt_widget_month_small -calendar_details $calendar_details -date $prev_month -days_of_week $days_of_week -large_calendar_p $large_calendar_p -master_bgcolor $master_bgcolor -header_bgcolor $header_bgcolor -header_text_color $header_text_color -header_text_size $header_text_size -day_number_template $day_number_template -day_header_size $day_header_size -day_header_bgcolor $day_header_bgcolor -calendar_width $calendar_width -day_bgcolor $day_bgcolor -day_text_color $day_text_color -empty_bgcolor $empty_bgcolor -next_month_template $next_month_template -prev_month_template $prev_month_template ] + [dt_widget_month_small -calendar_details $calendar_details -date $date -days_of_week $days_of_week -large_calendar_p $large_calendar_p -master_bgcolor $master_bgcolor -header_bgcolor $header_bgcolor -header_text_color $header_text_color -header_text_size $header_text_size -day_number_template $day_number_template -day_header_size $day_header_size -day_header_bgcolor $day_header_bgcolor -calendar_width $calendar_width -day_bgcolor $day_bgcolor -day_text_color $day_text_color -empty_bgcolor $empty_bgcolor -next_month_template $next_month_template -prev_month_template $prev_month_template ] + + [dt_widget_month_small -calendar_details $calendar_details -date $next_month -days_of_week $days_of_week -large_calendar_p $large_calendar_p -master_bgcolor $master_bgcolor -header_bgcolor $header_bgcolor -header_text_color $header_text_color -header_text_size $header_text_size -day_number_template $day_number_template -day_header_size $day_header_size -day_header_bgcolor $day_header_bgcolor -calendar_width $calendar_width -day_bgcolor $day_bgcolor -day_text_color $day_text_color -empty_bgcolor $empty_bgcolor -next_month_template $next_month_template -prev_month_template $prev_month_template ] +
      \n" + + return $output +} + +ad_proc dt_widget_year { + { + -calendar_details "" + -date "" + -days_of_week "S M T W T F S" + -large_calendar_p 0 + -master_bgcolor "black" + -header_bgcolor "black" + -header_text_color "white" + -header_text_size "+1" + -day_number_template {$day_number} + -day_header_size 1 + -day_header_bgcolor "#666666" + -calendar_width 0 + -day_bgcolor "#DDDDDD" + -day_text_color "white" + -empty_bgcolor "white" + -next_month_template "" + -prev_month_template "" + -width 2} +} { + Returns a year of small calendars given the starting month as a + date. Defaults to this month. Data in calendar_details will be + ignored. +} { + if { $width < 1 || $width > 12 } { + return "Width must be between 1 and 12" + } + + set output "\n" + set current_width 0 + + for { set n 1 } { $n <= 12 } { incr n } { + dt_get_info_from_db $date + + append output " + \n" + + incr current_width + + if { $current_width == $width && $n != 12} { + set current_width 0 + append output "\n" + } + + set date $next_month + } + + return [concat $output "
      + [dt_widget_month_small -calendar_details $calendar_details -date $date -days_of_week $days_of_week -large_calendar_p $large_calendar_p -master_bgcolor $master_bgcolor -header_bgcolor $header_bgcolor -header_text_color $header_text_color -header_text_size $header_text_size -day_number_template $day_number_template -day_header_size $day_header_size -day_header_bgcolor $day_header_bgcolor -calendar_width $calendar_width -day_bgcolor $day_bgcolor -day_text_color $day_text_color -empty_bgcolor $empty_bgcolor -next_month_template $next_month_template -prev_month_template $prev_month_template ] +
      \n"] +} + +ad_proc dt_widget_calendar_year { + { + -calendar_details "" + -date "" + -days_of_week "S M T W T F S" + -large_calendar_p 0 + -master_bgcolor "black" + -header_bgcolor "black" + -header_text_color "white" + -header_text_size "+1" + -day_number_template {$day_number} + -day_header_size 1 + -day_header_bgcolor "#666666" + -calendar_width 0 + -day_bgcolor "#DDDDDD" + -day_text_color "white" + -empty_bgcolor "white" + -next_month_template "" + -prev_month_template "" + -width 2 + } +} { + Returns a calendar year of small calendars for the year of the + passed in date. Defaults to this year. +} { + dt_get_info_from_db $date + + return [dt_widget_year \ + -calendar_details $calendar_details \ + -date $beginning_of_year \ + -days_of_week $days_of_week \ + -large_calendar_p $large_calendar_p \ + -master_bgcolor $master_bgcolor \ + -header_bgcolor $header_bgcolor \ + -header_text_color $header_text_color \ + -header_text_size $header_text_size \ + -day_number_template $day_number_template \ + -day_header_size $day_header_size \ + -day_header_bgcolor $day_header_bgcolor \ + -calendar_width $calendar_width \ + -day_bgcolor $day_bgcolor \ + -day_text_color $day_text_color \ + -empty_bgcolor $empty_bgcolor \ + -next_month_template $next_month_template \ + -prev_month_template $prev_month_template \ + -width $width] +} + +# A couple of helper procs to return the location of navigation icons. +# These will eventually be replaced with parameters or pushed into a +# template. + +ad_proc -private dt_left_arrow {} { + Returns the image location for a left navigation arrow +} { + return "/doc/acs-datetime/pics/left.gif" +} + +ad_proc -private dt_right_arrow {} { + Returns the image location for a right navigation arrow +} { + return "/doc/acs-datetime/pics/right.gif" +} + +ad_proc -private dt_navbar_view { + view + base_url + date +} { + Returns a navbar for the mini_calendar_widget +} { + set date [ns_urlencode $date] + + # Note: use append so that all of the strings are joined together + # properly + + append result " + + [ad_decode $view "list" "" ""] + + List + + [ad_decode $view "day" "" ""] + + Day + + [ad_decode $view "week" "" ""] + + Week + + [ad_decode $view "month" "" ""] + + Month + + [ad_decode $view "year" "" ""] + + Year + + + " + + return $result +} + +ad_proc -private dt_navbar_year { + view + base_url + date +} { + If this is a month or year view, returns the current year with + links to previous and next. Otherwise it just returns the empty + string. +} { + # Return immediately of the current view isn't month or year + if {[lsearch -exact [list month year] $view] == -1} { + return "" + } + + # Convert the given data into current calendar time + set now [clock scan $date] + + # Compute formatted strings for curr, prev, and next + set prev_year [clock format [clock scan "1 year ago" -base $now] -format "%Y-%m-%d"] + set next_year [clock format [clock scan "1 year" -base $now] -format "%Y-%m-%d"] + set curr_year [clock format $now -format "%Y"] + + append result " + + + + + +
      + + + $curr_year + + +
      + + \n" + + return $result +} + +ad_proc -private dt_navbar_month { + view + base_url + date +} { + Returns the monthly navbar +} { + set now [clock scan $date] + set curr_month [clock format $now -format "%B"] + set prev_month [clock format [clock scan "1 month ago" -base $now] -format "%Y-%m-%d"] + set next_month [clock format [clock scan "1 month" -base $now] -format "%Y-%m-%d"] + + append results " + + + + \n" + + return $results +} + + +ad_proc dt_widget_calendar_navigation { + {} + {base_url ""} + {view "week"} + {date ""} + {pass_in_vars ""} +} { + This proc creates a mini calendar useful for navigating various + calendar views. It takes a base url, which is the url to which + this mini calendar will navigate. pass_in_vars, if defined, can + be url variables to be set in base_url. They should be in the + format returned by export_url_vars This proc will set 2 variables + in that url's environment: the view and the date. + + Valid views are list, day, week, month, and year. + + The date must be formatted YYYY-MM-DD. +} { + + # valid views are "list" "day" "week" "month" "year" + + if {![exists_and_not_null base_url]} { + set base_url [ns_conn url] + } + + if {[exists_and_not_null pass_in_vars]} { + append base_url "?$pass_in_vars&" + } else { + append base_url "?" + } + + if {![exists_and_not_null date]} { + set date [dt_sysdate] + } + + # Get the current month, day, and the first day of the month + + dt_get_info_from_db $date + + set output " +
      + + + $curr_month + + +
      + + [dt_navbar_view $view $base_url $date] + + [dt_navbar_year $view $base_url $date]\n" + + if [string equal $view month] { + # month view + append output " + + +
      + + + " + + set months_list [dt_month_names] + set now [clock scan $date] + set curr_month [expr [dt_trim_leading_zeros [clock format $now -format "%m"]]-1] + + for {set i 0} {$i < 12} {incr i} { + + set month [lindex $months_list $i] + + # show 3 months in a row + + if {($i != 0) && ([expr $i % 3] == 0)} { + append output "" + } + + if {$i == $curr_month} { + append output " + \n" + } else { + set target_date [clock format \ + [clock scan "[expr $i-$curr_month] month" -base $now] -format "%Y-%m-%d"] + + append output " + \n" + } + } + + append output "" + + } elseif [string equal $view year] { + + # year view + + append output " + + + + + + + + +
      + $month + + + $month +
      + + \n" + + set now [clock scan $date] + set curr_year $year + set end_year [expr $year + 2] + set monthday [clock format $now -format "%m-%d"] + + for {set year [expr $curr_year - 2]} {$year <= $end_year} {incr year} { + if {$year == $curr_year} { + append output " + \n" + } else { + append output " + \n" + } + } + + append output "" + + } else { + + append output " + [dt_navbar_month $view $base_url $date] +
      $year + + $year +
      +
      + + " + + set days_of_week [list Su Mo Tu We Th Fr Sa] + + foreach day_of_week $days_of_week { + append output "\n" + } + + set day_of_week 1 + set julian_date $first_julian_date + set day_number $first_day + + while {1} { + + if {$julian_date < $first_julian_date_of_month} { + set before_month_p 1 + set after_month_p 0 + } elseif {$julian_date > $last_julian_date_in_month} { + set before_month_p 0 + set after_month_p 1 + } else { + set before_month_p 0 + set after_month_p 0 + } + + set ansi_date [dt_julian_to_ansi $julian_date] + + if {$julian_date == $first_julian_date_of_month} { + set day_number 1 + } elseif {$julian_date > $last_julian_date} { + break + } elseif {$julian_date == [expr $last_julian_date_in_month +1]} { + set day_number 1 + } + + if { $day_of_week == 1} { + append output "\n" + } + + if {$before_month_p || $after_month_p} { + append output " + " + } elseif {$julian_date == $julian_date_today} { + append output " + " + } else { + append output " + " + } + + incr day_of_week + incr julian_date + incr day_number + + if { $day_of_week > 7 } { + set day_of_week 1 + append output "\n" + } + } + } + + append today_url "$base_url" "view=day&date=[ns_urlencode [dt_sysdate]]" + + append output " + + +
      $day_of_week
      + + $day_number + + $day_number + + + $day_number +
      + + +
      +
      +
      + + + + +
      + + Today is [dt_ansi_to_pretty]
      +
      \n" + + return $output +} + +ad_proc -private dt_get_info_from_db { + {the_date ""} +} { + Calculates various dates required by the dt_widget_month + procedure. Defines, in the caller's environment, a whole set of + variables needed for calendar display. + + Returns the following (example for the_date = 2000-12-08): + + julian_date_today 2451889 + month December + year 2000 + first_julian_date 2451875 + first_julian_date_of_month 2451880 + num_days_in_month 31 + last_julian_date_in_month 2451910 + last_julian_date 2451916 + first_day 26 + first_day_of_month 6 + last_day 31 + next_month 2001-01-08 + prev_month 2000-11-08 + beginning_of_year 2000-01-01 + days_in_last_month 30 + next_month_name January + prev_month_name November + + Input: + + the_day ANSI formatted date string (yyyy-mm-dd). If not + specified this procedure will default to today's + date. +} { + # If no date was passed in, let's set it to today + + if [empty_string_p $the_date] { + set the_date [dt_sysdate] + } + + # We put all the columns into dt_info_set and return it later + set dt_info_set [ns_set create] + set bind_vars [ad_tcl_vars_to_ns_set the_date] + + # This query gets us all of the date information we need to + # calculate the calendar, including the name of the month, the + # year, the julian date of the first of the month, the day of the + # week of the first day of the month, the day number of the last + # day (28, 29, 30 ,31) and a month string of the next and previous + # months + + db_1row dt_get_information " + select to_char(to_date(:the_date,'yyyy-mm-dd'),'J') as julian_date_today, + to_char(trunc(to_date(:the_date, 'yyyy-mm-dd'), 'Month'), 'fmMonth') as month, + to_char(trunc(to_date(:the_date, 'yyyy-mm-dd'), 'Month'), 'YYYY') as year, + to_char(trunc(to_date(:the_date, 'yyyy-mm-dd'), 'Month'), 'J') as first_julian_date_of_month, + to_char(last_day(to_date(:the_date, 'yyyy-mm-dd')), 'DD') as num_days_in_month, + to_char(trunc(to_date(:the_date, 'yyyy-mm-dd'), 'Month'), 'D') as first_day_of_month, + to_char(last_day(to_date(:the_date, 'yyyy-mm-dd')), 'DD') as last_day, + trunc(add_months(to_date(:the_date, 'yyyy-mm-dd'), 1)) as next_month, + trunc(add_months(to_date(:the_date, 'yyyy-mm-dd'), -1)) as prev_month, + trunc(to_date(:the_date, 'yyyy-mm-dd'), 'yyyy') as beginning_of_year, + to_char(last_day(add_months(to_date(:the_date, 'yyyy-mm-dd'), -1)), 'DD') as days_in_last_month, + to_char(add_months(to_date(:the_date, 'yyyy-mm-dd'), 1), 'fmMonth') as next_month_name, + to_char(add_months(to_date(:the_date, 'yyyy-mm-dd'), -1), 'fmMonth') as prev_month_name + from dual + " -bind $bind_vars -column_set dt_info_set + + ns_set free $bind_vars + + # We need the variables from the select query here as well + ad_ns_set_to_tcl_vars $dt_info_set + + ns_set put $dt_info_set first_julian_date \ + [expr $first_julian_date_of_month + 1 - $first_day_of_month] + ns_set put $dt_info_set first_day \ + [expr $days_in_last_month + 2 - $first_day_of_month] + ns_set put $dt_info_set last_julian_date_in_month \ + [expr $first_julian_date_of_month + $num_days_in_month - 1] + + set days_in_next_month \ + [expr (7-(($num_days_in_month + $first_day_of_month - 1) % 7)) % 7] + + ns_set put $dt_info_set last_julian_date \ + [expr $first_julian_date_of_month + $num_days_in_month - 1 + $days_in_next_month] + + # Now, set the variables in the caller's environment + + ad_ns_set_to_tcl_vars -level 2 $dt_info_set + ns_set free $dt_info_set +} + + Index: openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-datetime/tcl/acs-datetime-procs.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,388 @@ +# /packages/acs-datetime/tcl/acs-datetime-procs.tcl + +ad_library { + + Tcl library for the ACS Date-Time service package + + @author ron@arsdigita.com + @created 2000-11-21 + @cvs-id $Id: acs-datetime-procs.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} + +ad_proc dt_systime { + {-format "%Y-%m-%d %H:%M:%S" -gmt f} +} { + Returns current server time in the standard format "yyyy-mm-dd + hh:mi:ss". With the optional -gmt flag it returns the time in + GMT. +} { + return [clock format [clock seconds] -format $format -gmt $gmt] +} + +ad_proc dt_sysdate { + {-format "%Y-%m-%d"} +} { + Returns current server date in the standard format "yyyy-mm-dd" +} { + return [clock format [clock seconds] -format $format] +} + +ad_proc dt_valid_time_p { + time +} { + Returns 1 if "time" is a valid time specification, 0 otherwise. +} { + if [catch { clock scan $time }] { + return 0 + } else { + return 1 + } +} + +ad_proc dt_format { + {-format "%Y-%m-%d %H:%M:%S" -gmt f} + time +} { + return [clock format [clock scan $time] -format $format -gmt $gmt] +} + +ad_proc dt_month_names {} { + Returns the calendar month names as a Tcl list (January, February, ...) +} { + set month_names [list] + + for {set i 1} {$i <= 12} {incr i} { + lappend month_names [clock format [clock scan "2000-$i-1"] -format "%B"] + } + + return $month_names +} + +ad_proc dt_month_abbrev {} { + Returns the calendar month names as a Tcl list (Jan, Feb, ...) +} { + set month_names [list] + + for {set i 1} {$i <= 12} {incr i} { + lappend month_names [clock format [clock scan "2000-$i-1"] -format "%b"] + } + + return $month_names +} + +ad_proc dt_julian_to_ansi { + julian_date +} { + Returns julian_date formatted as "yyyy-mm-dd" +} { + return [db_string julian_to_ansi " + select to_char(to_date(:julian_date,'J'),'yyyy-mm-dd') from dual"] +} + + +ad_proc dt_ansi_to_pretty { + {ansi_date ""} +} { + Converts 1998-09-05 to September 5, 1998. With no argument it + returns the current date based on server time. Works for both + date and date-time strings. +} { + if [empty_string_p $ansi_date] { + set ansi_date [dt_sysdate] + } + + set date [clock scan $ansi_date] + set day [clock format $date -format "%e"] + + return [clock format $date -format "%B [string trim $day], %Y"] +} + +ad_proc dt_ansi_to_list { + {ansi_date ""} +} { + Parses the given ansi_date string into a list of year, month, day, + hour, minute, and second. Works for any date than can be parsed + by clock scan. +} { + if [empty_string_p $ansi_date] { + set ansi_date [dt_systime] + } + + foreach item [split [clock format [clock scan $ansi_date] -format "%Y %m %d %H %M %S"] " "] { + lappend date_info [dt_trim_leading_zeros $item] + } + + return $date_info +} + +ad_proc -public dt_widget_datetime { + {-show_date 1 -date_time_sep " " -use_am_pm 0 -default none} + {name} + {granularity days} +} { + + Returns an HTML form fragment for collecting date-time + information with names "$name.year", "$name.month", "$name.day", + "$name.hours", "$name.minutes", "$name.seconds", and "$name.ampm". + These will be numeric ("ampm" is 0 for am, 1 for pm) + + Default specifies what should be set as the current time in the + form. Valid defaults are "none", "now", or any valid date string + that can be converted with clock scan. + + Granularity can be "months" "days" "hours" "halves" "quarters" + "fives" "minutes" or "seconds". + + Use -show_date 0 for a time entry widget (no dates). + + All HTML widgets will be output *unless* show_date is 0; they will + be hidden if not needed to satisfy the current granularity + level. Values default to 1 for MM/DD and 0 for HH/MI/SS/AM if not + found in the input string or if below the granularity threshold. +} { + set to_precision [dt_precision $granularity] + + set show_day [expr $to_precision < 1441] + set show_hours [expr $to_precision < 61] + set show_minutes [expr $to_precision < 60] + set show_seconds [expr $to_precision < 1] + + if {$to_precision == 0} { + set to_precision 1 + } + + switch $default { + none { set value [dt_systime] } + now { set value [dt_systime] } + default { set value [dt_format $default] } + } + + set parsed_date [dt_ansi_to_list $value] + set year [lindex $parsed_date 0] + set month [lindex $parsed_date 1] + set day [lindex $parsed_date 2] + set hours [lindex $parsed_date 3] + set minutes [lindex $parsed_date 4] + set seconds [lindex $parsed_date 5] + + # Kludge to get minutes rounded. Should make general-purpose for + # the other values too... + + if {$to_precision < 60} { + set minutes [expr [dt_round_to_precision $minutes $to_precision] % 60] + } + + if {$default == "none"} { + set year "" + set month "" + set day "" + set hours "" + set minutes "" + set seconds "" + } + + if {$show_date} { + append input [dt_widget_month_names "$name.month" $month] + append input [dt_widget_maybe_range $show_day "$name.day" 1 31 $day 1 0 1] + append input " $date_time_sep " + } + + if {$use_am_pm} { + if { $hours > 12 } { + append input [dt_widget_maybe_range \ + $show_hours "$name.hours" 1 12 [expr {$hours - 12}] 1 0] + } elseif {$hours == 0} { + append input [dt_widget_maybe_range \ + $show_hours "$name.hours" 1 12 12 1 0] + } else { + append input [dt_widget_maybe_range \ + $show_hours "$name.hours" 1 12 $hours 1 0] + } + } else { + append input [dt_widget_maybe_range \ + $show_hours "$name.hours" 0 23 $hours 1 0] + } + + if {$show_minutes} { + append input ":" + } + + append input [dt_widget_maybe_range \ + $show_minutes "$name.minutes" 0 59 $minutes $to_precision 1] + + if {$show_seconds} { + append input ":" + } + + append input [dt_widget_maybe_range \ + $show_seconds "$name.seconds" 0 59 $seconds 1 1] + + if {$use_am_pm} { + if {$hours < 12 || ! $show_hours} { + set am_selected " selected" + set pm_selected "" + } else { + set am_selected "" + set pm_selected " selected" + } + + append input " + " + } else { + append input [dt_export_value "${name}.ampm" "AM"] + } + + return $input +} + +ad_proc dt_widget_month_names { + name + {default ""} +} { + Returns a select widget for months of the year. +} { + set month_names [dt_month_names] + set default [expr $default-1] + set input "
      \[ [join [subst { + "View" + [ad_decode $delete_p t "Delete" {}] + }] " | "] \]} } +} + +# This invokes a bunch of functions, which is bad, I think, but maybe it's still way faster than the +# join, 'cause the view meant for joining has been commented out in the permission SQL file... ? + +set sql_query " + select contact_id, + nvl(last_name,'
      ') as last_name, + nvl(first_names,'
      ') as first_names, + nvl(title,'
      ') as title, + nvl(organization,'
      ') as organization, + nvl(work_phone,'
      ') as work_phone, + nvl(home_phone,'
      ') as home_phone, + nvl(fax,'
      ') as fax, + nvl(other,'
      ') as other, + nvl(email,'
      ') as email, + acs_permission.permission_p(acr.rel_id,:user_id,'delete') as delete_p, + acr.rel_id + from ab_contacts_related acr + where acs_permission.permission_p(contact_id,:user_id,'read') = 't' + and object_id = :instance_id + [value_if_exists search_filter] +" +append sql_query [ad_order_by_from_sort_spec $orderby $datadef] + +if { $instance_id && $user_id } { + set pee 1 +} +set bind_vars [ad_tcl_vars_to_ns_set instance_id user_id] + +set contact_table [ad_table -Torderby $orderby -bind $bind_vars address_book_listing $sql_query $datadef] + +ad_return_template \ No newline at end of file Index: openacs-4/packages/bookmarks/bookmarks.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/bookmarks.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/bookmarks.info 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,133 @@ + + + + + Bookmarks + Bookmarks Modules + f + + + + oracle + postgresql + + Peter Marklund + This module lets you manage your bookmarks on the web and enables sharing of bookmarks between people in a community (one ACS installation). + 2001-02-23 + ArsDigita Corporation + This version contains a number of bugfixes and minor improvements over the 4.X alpha versions and has been rigorously tested. + +New features in the ACS4 (not in the ACS4 version) include: + +- Adding bookmarks when browsing with the help of a Bookmarklet (a Bookmark in the browser that contains Javascript instead of a url). + +- Sorting by name and access date + +- Enhanced access permissions. The alpha version will only include toggling between private and public. Future versions could use the ACS permission API to grant read, write, delete and admin rights to any party on a bookmark level. It is not yet clear how big the need for this granular access permissions is. + +- Display of keywords and descriptions of urls (fetched with ns_httpget) + +Important features from the ACS3 version are: + +- Bookmarks are viewed in a tree structure with open/collapse functionality of folders. Alternatively the bookmarks can be viewed in a Javascript version. + +- Importing/exporting bookmarks from/to Netscape and IE browsers + +- Checking if URLs are alive + +- Display of the most popular hosts and urls in the community + +Areas that need improvement: The query on the index page is a bit slow - closing and opening folders becomes impractible with for example 200 bookmarks. Users who have this many bookmarks can preferably use the Javascript version. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/bookmarks/sql/oracle/bookmarks-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/sql/oracle/bookmarks-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/sql/oracle/bookmarks-create.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,747 @@ +-- +-- packages/bookmarks/sql/bookmarks-create.sql +-- +-- Credit for the ACS 3 version of this module goes to: +-- @author David Hill (dh@arsdigita.com) +-- @author Aurelius Prochazka (aure@arsdigita.com) +-- +-- The upgrade of this module to ACS 4 was done by +-- @author Peter Marklund (pmarklun@arsdigita.com) +-- @author Ken Kennedy (kenzoid@io.com) +-- in December 2000. +-- +-- @creation-date December 2000 +-- @cvs-id $Id + + + +-- since many people will be bookmarking the same sites, we keep urls in a separate table +create table bm_urls ( + url_id constraint bm_urls_url_id_fk + references acs_objects (object_id) + constraint bm_urls_url_id_pk + primary key, + -- url title may be null in the case of bookmarks that are merely icons ie. AIM + url_title varchar(500), + -- host url is separated from complete_url for counting purposes + host_url varchar(100) + constraint bm_urls_host_url_nn + not null, + complete_url varchar(500) + constraint bm_urls_complete_url_nn + not null, + -- meta tags that could be looked up regularly + meta_keywords varchar(4000), + meta_description varchar(4000), + last_checked_date date, + -- the last time the site returned a "live" status + last_live_date date +); + +begin + acs_object_type.create_type ( + supertype => 'acs_object', + object_type => 'url', + pretty_name => 'URL', + pretty_plural => 'URLs', + table_name => 'BM_URLS', + id_column => 'URL_ID' + ); +end; +/ +show errors + + +create table bm_bookmarks ( + bookmark_id constraint bm_bookmarks_bookmark_id_fk + references acs_objects (object_id) on delete cascade + constraint bm_bookmarks_bookmark_id_pk + primary key, + owner_id integer + constraint bm_bookmarks_owner_id_nn + not null + constraint bm_bookmarks_owner_id_fk + references users(user_id), + -- url_id may be null if the bookmark is a folder + url_id integer + constraint bm_bookmarks_url_id_fk + references bm_urls, + -- a person may rename any of his bookmarks so we keep a local title + local_title varchar(500), + -- this is 't' if the bookmark is a folder + folder_p char(1) default 'f' + constraint bm_bookmarks_folder_p_ck + check (folder_p in ('t','f')), + -- null parent_id indicates this is a top level folder/bookmark + parent_id integer + constraint bm_bookmarks_parent_id_fk + references acs_objects (object_id), + -- When the bookmark was last clicked on + last_access_date date +); + + +-- We use these index for sorting the bookmarks tree +create index bm_bookmarks_local_title_idx on bm_bookmarks (parent_id, lower(local_title), bookmark_id); +create index bm_bookmarks_access_date_idx on bm_bookmarks (parent_id, last_access_date, bookmark_id); + + +-- For connect by queries +create index bm_bookmarks_idx1 on bm_bookmarks(bookmark_id, parent_id); +create index bm_bookmarks_idx2 on bm_bookmarks(parent_id, bookmark_id); + + +begin + acs_object_type.create_type ( + supertype => 'acs_object', + object_type => 'bookmark', + pretty_name => 'Bookmark', + pretty_plural => 'Bookmarks', + table_name => 'BM_BOOKMARKS', + id_column => 'BOOKMARK_ID', + name_method => 'bookmark.name' + ); +end; +/ +show errors + + +-- We need this table to keep track of which bookmarks are in a closed folder (they +-- are not to be displayed) +-- This has to be done on a per user (or per session) basis so we can not store +-- this information in the bm_bookmarks table (otherwise we would have problems when +-- two users view the same bookmarks concurently). +create table bm_in_closed_p ( + bookmark_id constraint bm_in_closed_p_bookmark_id_nn + not null + constraint bm_in_closed_p_bookmark_id_fk + references bm_bookmarks, + in_closed_p_id integer + constraint bm_in_closed_p_id_nn + not null, + in_closed_p char(1) default 't' + constraint bm_in_closed_p_closed_p_ck + check (in_closed_p in ('t','f')), + -- We might want to clean up old rows in this table since it could + -- easily grow very large in big communities sharing bookmarks actively + -- refers to whether a folder is open or closed + closed_p char(1) default 'f' + constraint bm_bookmarks_closed_p_ck + check (closed_p in ('t','f')), + creation_date date, + constraint bm_in_closed_p_pk + primary key (bookmark_id, in_closed_p_id) +); + +comment on column bm_in_closed_p.in_closed_p_id is ' + This is the user_id for registered users and the session_id in sec_sessions + for non-registered users. +'; + + +create unique index bm_in_closed_p_idx on bm_in_closed_p (bookmark_id, in_closed_p_id, in_closed_p); + + +create or replace package url +as + function new ( + url_id in bm_urls.url_id%TYPE, + url_title in bm_urls.url_title%TYPE, + host_url in bm_urls.host_url%TYPE default null, + complete_url in bm_urls.complete_url%TYPE, + meta_keywords in bm_urls.meta_keywords%TYPE default null, + meta_description in bm_urls.meta_description%TYPE default null, + + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) return bm_urls.url_id%TYPE; + + procedure delete ( + url_id in bm_urls.url_id%TYPE + ); + + function insert_or_update ( + url_title in bm_urls.url_title%TYPE, + host_url in bm_urls.host_url%TYPE default null, + complete_url in bm_urls.complete_url%TYPE, + meta_keywords in bm_urls.meta_keywords%TYPE default null, + meta_description in bm_urls.meta_description%TYPE default null, + + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) return bm_urls.url_id%TYPE; +end url; +/ +show errors + + +create or replace package body url +as + function new ( + url_id in bm_urls.url_id%TYPE, + url_title in bm_urls.url_title%TYPE, + host_url in bm_urls.host_url%TYPE, + complete_url in bm_urls.complete_url%TYPE, + meta_keywords in bm_urls.meta_keywords%TYPE default null, + meta_description in bm_urls.meta_description%TYPE default null, + + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) return bm_urls.url_id%TYPE + is + v_url_id integer; + begin + v_url_id := acs_object.new ( + object_id => url_id, + object_type => 'url', + creation_date => sysdate, + creation_user => creation_user, + creation_ip => creation_ip, + context_id => context_id + ); + + insert into bm_urls + (url_id, url_title, host_url, complete_url, meta_keywords, meta_description) + values + (v_url_id, url_title, host_url, complete_url, meta_keywords, meta_description); + + return v_url_id; + end new; + + procedure delete ( + url_id in bm_urls.url_id%TYPE + ) + is + begin + acs_object.delete(url.delete.url_id); + end delete; + + function insert_or_update ( + url_title in bm_urls.url_title%TYPE, + host_url in bm_urls.host_url%TYPE default null, + complete_url in bm_urls.complete_url%TYPE, + meta_keywords in bm_urls.meta_keywords%TYPE default null, + meta_description in bm_urls.meta_description%TYPE default null, + + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) return bm_urls.url_id%TYPE + is + n_complete_urls integer; + return_id integer; + new_url_id integer; + begin + select count(*) into n_complete_urls + from bm_urls where bm_urls.complete_url = insert_or_update.complete_url; + + if n_complete_urls = 0 then + + select acs_object_id_seq.nextval into new_url_id from dual; + + return_id := url.new ( + url_id => new_url_id, + url_title => insert_or_update.url_title, + host_url => insert_or_update.host_url, + complete_url => insert_or_update.complete_url, + creation_user => insert_or_update.creation_user, + creation_ip => insert_or_update.creation_ip + ); + + return return_id; + else + select url_id into return_id from bm_urls where bm_urls.complete_url= insert_or_update.complete_url; + return return_id; + end if; + + + end insert_or_update; + +end url; +/ +show errors + + +create or replace package bookmark +as + function new ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE, + owner_id in bm_bookmarks.owner_id%TYPE, + url_id in bm_urls.url_id%TYPE default null, + local_title in bm_bookmarks.local_title%TYPE default null, + folder_p in bm_bookmarks.folder_p%TYPE default 'f', + parent_id in bm_bookmarks.parent_id%TYPE, + last_access_date in bm_bookmarks.last_access_date%TYPE default null, + + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) return bm_bookmarks.bookmark_id%TYPE; + + procedure delete ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE + ); + + + function name ( + object_id in bm_bookmarks.bookmark_id%TYPE + ) return bm_bookmarks.local_title%TYPE; + + function get_in_closed_p ( + new_parent_id in bm_bookmarks.bookmark_id%TYPE, + user_id in users.user_id%TYPE + ) return bm_in_closed_p.in_closed_p%TYPE; + + procedure update_in_closed_p_one_user ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE, + browsing_user_id in bm_bookmarks.owner_id%TYPE + ); + + procedure update_in_closed_p_all_users ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE, + new_parent_id in bm_bookmarks.bookmark_id%TYPE + ); + + procedure toggle_open_close ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE, + browsing_user_id in bm_bookmarks.owner_id%TYPE + ); + + procedure toggle_open_close_all ( + browsing_user_id in bm_bookmarks.owner_id%TYPE, + closed_p in bm_in_closed_p.closed_p%TYPE default 'f', + root_id in bm_bookmarks.parent_id%TYPE + ); + + function get_root_folder ( + package_id in apm_packages.package_id%TYPE, + user_id in users.user_id%TYPE + ) return bm_bookmarks.bookmark_id%TYPE; + + + function new_root_folder ( + package_id in apm_packages.package_id%TYPE, + user_id in users.user_id%TYPE + ) return bm_bookmarks.bookmark_id%TYPE; + + function private_p ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE + ) return bm_in_closed_p.closed_p%TYPE; + + procedure update_private_p ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE, + private_p in bm_in_closed_p.closed_p%TYPE + ); + + procedure initialize_in_closed_p ( + viewed_user_id in users.user_id%TYPE, + in_closed_p_id in users.user_id%TYPE + ); + +end bookmark; +/ +show errors + + +create or replace package body bookmark +as + function new ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE, + owner_id in bm_bookmarks.owner_id%TYPE, + url_id in bm_urls.url_id%TYPE default null, + local_title in bm_bookmarks.local_title%TYPE default null, + folder_p in bm_bookmarks.folder_p%TYPE default 'f', + parent_id in bm_bookmarks.parent_id%TYPE, + last_access_date in bm_bookmarks.last_access_date%TYPE default null, + + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + context_id in acs_objects.context_id%TYPE default null + ) return bm_bookmarks.bookmark_id%TYPE + is + v_bookmark_id integer; + v_last_access_date bm_bookmarks.last_access_date%TYPE; + v_in_closed_p bm_in_closed_p.in_closed_p%TYPE; + + cursor c_viewing_in_closed_p_ids + is + select unique in_closed_p_id + from bm_in_closed_p + where bookmark_id = (select parent_id from bm_bookmarks + where bookmark_id = new.bookmark_id); + begin + v_bookmark_id := acs_object.new ( + object_id => bookmark_id, + object_type => 'bookmark', + creation_date => sysdate, + creation_user => creation_user, + creation_ip => creation_ip, + context_id => parent_id + ); + + if last_access_date is null then + select sysdate into v_last_access_date from dual; + else + v_last_access_date := last_access_date; + end if; + + insert into bm_bookmarks + (bookmark_id, owner_id, url_id, local_title, + folder_p, parent_id, last_access_date) + values + (v_bookmark_id, owner_id, url_id, local_title, + folder_p, parent_id, v_last_access_date); + + + -- Now we have to set the in_closed_p information for this + -- bookmark for all users that are viewing this bookmark tree + for one_row in c_viewing_in_closed_p_ids + loop + -- For each user or session record the in_closed_p status of + -- the bookmark + select bookmark.get_in_closed_p(parent_id, one_row.in_closed_p_id) + into v_in_closed_p from dual; + + insert into bm_in_closed_p (bookmark_id, in_closed_p_id, in_closed_p, creation_date) + values (v_bookmark_id, one_row.in_closed_p_id, v_in_closed_p, sysdate); + + end loop; + + + return v_bookmark_id; + end new; + + + -- The reason this procedure is so terribly complex is that I wanted to enable + -- deleting of non empty folders. The problem is that we have to delete the bookmarks + -- in the right order not to violate any referential constraints. + procedure delete ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE + ) + is + + -- This is the outer cursor that starts with the leaf bookmarks under the folder + -- to be deleted and walks up to the folder to be deleted. + cursor c_bookmark_id_tree + is + select bookmark_id + from bm_bookmarks + where bookmark_id not in (select bookmark_id from bm_bookmarks + start with bookmark_id = (select parent_id from bm_bookmarks + where bookmark_id = bookmark.delete.bookmark_id) + connect by prior parent_id = bookmark_id) + start with bookmark_id in (select bookmark_id + from bm_bookmarks bm_outer where not exists + (select 1 from bm_bookmarks bm_inner where + bm_outer.bookmark_id = bm_inner.parent_id) + intersect + select bookmark_id from bm_bookmarks + start with bookmark_id = bookmark.delete.bookmark_id + connect by prior bookmark_id = parent_id + ) + connect by prior parent_id = bookmark_id; + + + -- To avoid violating referential constraints we need also (at least no smarter way to + -- do this occured to me) to delete all bookmarks on the level of the outer cursor + -- that lie under the folder to be deleted. + cursor c_bookmark_id_one_level (tree_id in integer) + is + select bookmark_id + from bm_bookmarks bm_outer + where parent_id = (select parent_id from bm_bookmarks where bookmark_id = tree_id) + and not exists (select 1 from bm_bookmarks where parent_id = bm_outer.bookmark_id) + and bm_outer.bookmark_id in (select bookmark_id from bm_bookmarks + start with bookmark_id = bookmark.delete.bookmark_id + connect by prior bookmark_id = parent_id); + + begin + + for tree_bookmark_id in c_bookmark_id_tree + loop + + for one_level_bookmark_id in c_bookmark_id_one_level(tree_bookmark_id.bookmark_id) + loop + delete from acs_permissions where object_id = one_level_bookmark_id.bookmark_id; + delete from bm_in_closed_p where bookmark_id = one_level_bookmark_id.bookmark_id; + delete from bm_bookmarks where bookmark_id = one_level_bookmark_id.bookmark_id; + acs_object.delete(one_level_bookmark_id.bookmark_id); + end loop; + end loop; + + end delete; + + function name ( + object_id in bm_bookmarks.bookmark_id%TYPE + ) return bm_bookmarks.local_title%TYPE + is + v_name bm_bookmarks.local_title%TYPE; + begin + select local_title into v_name + from bm_bookmarks + where bookmark_id = name.object_id; + + return v_name; + end name; + + function get_in_closed_p ( + new_parent_id in bm_bookmarks.bookmark_id%TYPE, + user_id in users.user_id%TYPE + ) return bm_in_closed_p.in_closed_p%TYPE + is + return_value bm_in_closed_p.in_closed_p%TYPE; + begin + select decode(count(*), 0, 'f', 't') into return_value + from (select bookmark_id from bm_bookmarks + connect by prior parent_id = bookmark_id + start with bookmark_id = new_parent_id) bm, + bm_in_closed_p bic + where bm.bookmark_id = bic.bookmark_id (+) + and bic.closed_p = 't' + and bic.in_closed_p_id = get_in_closed_p.user_id; + + return return_value; + end get_in_closed_p; + + procedure update_in_closed_p_one_user ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE, + browsing_user_id in bm_bookmarks.owner_id%TYPE + ) + is + begin + -- Update the in_closed_p flag of bookmarks and folders that lie under + -- the toggled folder in the tree for one particular user/session. + + -- First set all in_closed_p flags to 'f' ... + update bm_in_closed_p set in_closed_p = 'f' + where bookmark_id in (select bookmark_id from bm_bookmarks + start with bookmark_id = update_in_closed_p_one_user.bookmark_id + connect by prior bookmark_id = parent_id) + and in_closed_p_id = update_in_closed_p_one_user.browsing_user_id; + + -- then set all in_closed_p flags to 't' that lie under a closed folder + update bm_in_closed_p set in_closed_p = 't' + where bookmark_id in (select bookmark_id from bm_bookmarks + start with parent_id in (select bm.bookmark_id from bm_bookmarks bm, + bm_in_closed_p bip + where bm.bookmark_id = bip.bookmark_id + and bm.folder_p = 't' + and bip.closed_p = 't' + and bip.in_closed_p_id = + update_in_closed_p_one_user.browsing_user_id ) + connect by prior bookmark_id = parent_id + intersect + select bookmark_id from bm_bookmarks + start with bookmark_id = update_in_closed_p_one_user.bookmark_id + connect by prior bookmark_id = parent_id) + and in_closed_p_id = update_in_closed_p_one_user.browsing_user_id; + + end update_in_closed_p_one_user; + + procedure update_in_closed_p_all_users ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE, + new_parent_id in bm_bookmarks.bookmark_id%TYPE + ) + is + -- We need a cursor to loop over all users viewing the tree + cursor c_viewing_in_closed_p_ids + is + select unique in_closed_p_id + from bm_in_closed_p + where bookmark_id = (select bookmark_id from bm_bookmarks + where bookmark_id = update_in_closed_p_all_users.bookmark_id); + + begin + for one_row in c_viewing_in_closed_p_ids + loop + -- Update the in_closed_p status for this user/session for all bookmarks + -- under the folder + update_in_closed_p_one_user (bookmark_id, one_row.in_closed_p_id); + end loop; + + end update_in_closed_p_all_users; + + procedure toggle_open_close ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE, + browsing_user_id in bm_bookmarks.owner_id%TYPE + ) + is + begin + + -- Toggle the closed_p flag + update bm_in_closed_p set closed_p = (select decode(closed_p, 't', 'f', 't') + from bm_in_closed_p where bookmark_id = toggle_open_close.bookmark_id + and in_closed_p_id = toggle_open_close.browsing_user_id) + where bookmark_id = bookmark.toggle_open_close.bookmark_id + and in_closed_p_id = toggle_open_close.browsing_user_id; + + -- Now update the in_closed_p status for this user for all bookmarks under + -- the toggled folder + update_in_closed_p_one_user (bookmark_id, browsing_user_id); + + end toggle_open_close; + + procedure toggle_open_close_all ( + browsing_user_id in bm_bookmarks.owner_id%TYPE, + closed_p in bm_in_closed_p.closed_p%TYPE default 'f', + root_id in bm_bookmarks.parent_id%TYPE + ) + is + begin + -- Change the value of closed_p for all folders belonging to the + -- user (except the root folder) + update bm_in_closed_p bm_outer set closed_p = bookmark.toggle_open_close_all.closed_p + where bookmark_id in (select bookmark_id from bm_bookmarks + start with parent_id = toggle_open_close_all.root_id + connect by prior bookmark_id = parent_id); + + -- Update the value of in_closed_p for all bookmarks belonging to + -- this user. We close/open all bookmarks except the top level ones. + update bm_in_closed_p set in_closed_p = bookmark.toggle_open_close_all.closed_p + where bookmark_id in (select bookmark_id from bm_bookmarks + start with parent_id in (select bookmark_id from bm_bookmarks + where parent_id = toggle_open_close_all.root_id) + connect by prior bookmark_id = parent_id) + and in_closed_p_id = toggle_open_close_all.browsing_user_id; + + end toggle_open_close_all; + + + function get_root_folder ( + package_id in apm_packages.package_id%TYPE, + user_id in users.user_id%TYPE + ) return bm_bookmarks.bookmark_id%TYPE + is + v_folder_id bm_bookmarks.bookmark_id%TYPE; + v_count integer; + begin + select count(*) into v_count + from bm_bookmarks + where parent_id = get_root_folder.package_id + and owner_id = get_root_folder.user_id; + + if v_count > 0 then + select bookmark_id into v_folder_id + from bm_bookmarks + where parent_id = get_root_folder.package_id + and owner_id = get_root_folder.user_id; + else + -- must be a new instance. Gotta create a new root folder + v_folder_id := new_root_folder(package_id, user_id); + end if; + + return v_folder_id; + + end get_root_folder; + + function new_root_folder ( + package_id in apm_packages.package_id%TYPE, + user_id in users.user_id%TYPE + ) return bm_bookmarks.bookmark_id%TYPE + is + v_folder_id bm_bookmarks.bookmark_id%TYPE; + v_bookmark_id bm_bookmarks.bookmark_id%TYPE; + v_email parties.email%TYPE; + begin + + select acs_object_id_seq.nextval into v_bookmark_id + from dual; + + select email into v_email + from parties where party_id = new_root_folder.user_id; + + v_folder_id := bookmark.new ( + bookmark_id => v_bookmark_id, + owner_id => new_root_folder.user_id, + folder_p => 't', + local_title => ' Bookmarks Root Folder of ' || v_email, + parent_id => new_root_folder.package_id + ); + + -- set up default permissions + -- The owner may administer the bookmarks + -- Any other permissions will be inherited from the next higher + -- package instance in the site hierarchy + acs_permission.grant_permission ( + object_id => v_folder_id, + grantee_id => new_root_folder.user_id, + privilege => 'admin' + ); + + return v_folder_id; + + end new_root_folder; + + function private_p ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE + ) return bm_in_closed_p.closed_p%TYPE + is + v_private_p bm_in_closed_p.closed_p%TYPE; + begin + select decode(count(*), 0, 'f', 't') into v_private_p + from acs_objects, (select bookmark_id from bm_bookmarks + start with bookmark_id = private_p.bookmark_id + connect by prior parent_id = bookmark_id) b + where b.bookmark_id = acs_objects.object_id + and acs_objects.security_inherit_p = 'f'; + + return v_private_p; + end private_p; + + procedure update_private_p ( + bookmark_id in bm_bookmarks.bookmark_id%TYPE, + private_p in bm_in_closed_p.closed_p%TYPE + ) + is + v_owner_id bm_bookmarks.owner_id%TYPE; + v_admin_p bm_in_closed_p.closed_p%TYPE; + begin + + if private_p = 'f' then + -- Turn on security inheritance + update acs_objects set security_inherit_p = 't' where object_id = bookmark_id; + + else + -- Private case + -- turn off inheritance + update acs_objects set security_inherit_p = 'f' where object_id = bookmark_id; + + -- Grant admin rights to the owner + select owner_id into v_owner_id from bm_bookmarks where bookmark_id = update_private_p.bookmark_id; + acs_permission.grant_permission(bookmark_id, v_owner_id, 'admin'); + + end if; + + end update_private_p; + + + procedure initialize_in_closed_p ( + viewed_user_id in users.user_id%TYPE, + in_closed_p_id in users.user_id%TYPE + ) + is + v_count_in_closed_p integer; + v_count_bookmarks integer; + + cursor c_bookmark_ids( viewed_user_id in integer, in_closed_p_id in integer) + is + select bookmark_id + from bm_bookmarks + where owner_id = c_bookmark_ids.viewed_user_id + and bookmark_id not in (select bookmark_id from bm_in_closed_p + where in_closed_p_id = c_bookmark_ids.in_closed_p_id); + begin + for v_bookmark_id in c_bookmark_ids(initialize_in_closed_p.viewed_user_id, + initialize_in_closed_p.in_closed_p_id) + loop + insert into bm_in_closed_p (bookmark_id, in_closed_p_id, in_closed_p, creation_date) + values (v_bookmark_id.bookmark_id, initialize_in_closed_p.in_closed_p_id, 'f', sysdate); + end loop; + + end initialize_in_closed_p; +end bookmark; +/ +show errors Index: openacs-4/packages/bookmarks/sql/oracle/bookmarks-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/sql/oracle/bookmarks-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/sql/oracle/bookmarks-drop.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,75 @@ +-- +-- packages/bookmarks/sql/bookmarks-create.sql +-- +-- Credit for the ACS 3 version of this module goes to: +-- @author David Hill (dh@arsdigita.com) +-- @author Aurelius Prochazka (aure@arsdigita.com) +-- +-- The upgrade of this module to ACS 4 was done by +-- @author Peter Marklund (pmarklun@arsdigita.com) +-- @author Ken Kennedy (kenzoid@io.com) +-- in December 2000. +-- +-- @creation-date December 2000 +-- @cvs-id $Id + +-- Delete all bookmark objects and corresponding acs objects +declare + cursor c_bookmark_id + is + select bookmark_id + from bm_bookmarks + where parent_id not in (select bookmark_id from bm_bookmarks); +begin + for v_bookmark_id in c_bookmark_id loop + bookmark.delete(v_bookmark_id.bookmark_id); + end loop; +end; +/ +show errors + + +-- Drop the in_closed_p table +drop table bm_in_closed_p; + +drop index bm_bookmarks_local_title_idx ; +drop index bm_bookmarks_access_date_idx ; +drop index bm_bookmarks_idx1; +drop index bm_bookmarks_idx2; + + +-- Drop bookmark table and package +drop table bm_bookmarks; +drop package bookmark; + + +-- Delete all url objects and corresponding acs objects +declare + cursor c_url_id + is + select url_id + from bm_urls; +begin + for v_url_id in c_url_id loop + url.delete(v_url_id.url_id); + end loop; +end; +/ +show errors + +-- Drop url table and package +drop table bm_urls; +drop package url; + + + + +-- Drop the url and bookmark object types +begin + acs_object_type.drop_type('url'); + acs_object_type.drop_type('bookmark'); +end; +/ +show errors + + Index: openacs-4/packages/bookmarks/tcl/bookmarks-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/tcl/bookmarks-init.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/tcl/bookmarks-init.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,141 @@ +ad_library { + Startup script for the bookmarks module. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} + + +db_foreach bm_packages { + select site_node.url(node_id) as path + from site_nodes + where object_id in (select package_id + from apm_packages where package_key = 'bookmarks') +} { + ad_register_proc GET ${path}bookmark.htm bm_export_to_netscape +} + + + +ad_proc bm_export_to_netscape {} { + + Outputs a set of bookmarks in the standard Netscape bookmark.htm + format. + +} { + + set user_id [ad_maybe_redirect_for_registration] + + set package_id [ad_conn package_id] + + set root_folder_id [bm_get_root_folder_id $package_id $user_id] + + set name [db_string name " + select first_names||' '||last_name as name + from cc_users + where user_id = :user_id"] + + set folder_list 0 + + db_foreach bm_info { + select b.bookmark_id, + b.url_id, + b.local_title, + acs_objects.creation_date, + b.parent_id, + bm_urls.complete_url, + b.folder_p + from (select /*+INDEX(bm_bookmarks bm_bookmarks_local_title_idx)*/ bookmark_id, url_id, local_title, folder_p, level lev, + parent_id, owner_id, rownum ord_num from bm_bookmarks + start with parent_id = :root_folder_id connect by prior bookmark_id = parent_id) b, + bm_urls, + acs_objects + where owner_id = :user_id + and acs_objects.object_id = b.bookmark_id + and b.url_id = bm_urls.url_id(+) + order by ord_num + } { + + if { [string equal $folder_list 0] } { + lappend folder_list $parent_id + } else { + set previous_parent_id [lindex $folder_list [expr [llength $folder_list]-1]] + if {$parent_id != $previous_parent_id} { + + set parent_location [lsearch -exact $folder_list $parent_id] + + + + if {$parent_location==-1} { + lappend folder_list $parent_id + append bookmark_html "

      \n\n" + } else { + set drop [expr [llength $folder_list]-$parent_location] + set folder_list [lrange $folder_list 0 $parent_location] + for {set i 1} {$i<$drop} {incr i} { + append bookmark_html "

      \n\n" + } + } + } elseif { [string equal $folder_p "t"] && [string equal $previous_folder_p "t"] } { + # The previous folder was empty + append bookmark_html "

      \n

      \n\n" + } + } + + if {$folder_p=="t"} { + append bookmark_html "

      $local_title

      \n\n" + } else { + append bookmark_html "
      $local_title\n\n" + } + + set previous_folder_p $folder_p + } + + set html " + + + + Bookmarks for $name + +

      Bookmarks for $name

      + +

      + + $bookmark_html + +

      + " + + + doc_return 200 text/html $html +} + + +# The table bm_in_closed_p holds session data that needs to be removed +# to avoid the table growing to large (maximum size of the table would be +# number_of_bookmarks times number_of_users) +ad_schedule_proc 86400 bm_clean_up_session_data + + +ad_proc bm_clean_up_session_data {} { +The table bm_in_closed_p holds session data that needs to be removed + to avoid the table growing to large (maximum size of the table would be + number_of_bookmarks times number_of_users) +} { + db_dml delete_old_in_closed_p "delete from bm_in_closed_p where creation_date < (sysdate - 1)" +} + + Index: openacs-4/packages/bookmarks/tcl/bookmarks-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/tcl/bookmarks-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/tcl/bookmarks-procs.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,258 @@ +ad_library { + TCL library for the bookmarks module. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} + + +ad_proc bm_folder_selection { user_id bookmark_id folder_p } { + This procedure is used to present a list of available folders to + put bookmark or folder in. +} { + # We cannot move folders to be their own children + if { $folder_p == "t" } { + set exclude_folders "and bookmark_id not in (select bookmark_id from bm_bookmarks where folder_p = 't' and owner_id = :user_id start with parent_id = :bookmark_id connect by bookmark_id = parent_id)" + } else { + set exclude_folders "" + } + + set package_id [ad_conn package_id] + + db_multirow folders folder_select " + select /*+INDEX(bm_bookmarks bm_bookmarks_local_title_idx)*/ bookmark_id, + local_title, + level as indentation + from bm_bookmarks + where folder_p = 't' + and owner_id = :user_id + and bookmark_id <> :bookmark_id + and parent_id <> :package_id + and acs_permission.permission_p(bookmark_id, :user_id, 'write') = 't' + $exclude_folders + start with parent_id = :package_id + connect by prior bookmark_id = parent_id + " +} + + +ad_proc bm_host_url {complete_url} { + + Takes a URL and returns the host portion of it (i.e., + http://hostname.com/), which always contains a trailing + slash. Returns empty string if complete_url wasn't parseable. + +} { + if { [regexp {([^:\"]+://[^/]+)} $complete_url host_url] } { + return "$host_url/" + } else { + return "" + } +} + + +ad_proc bm_handle_bookmark_double_click { bookmark_id errmsg return_url } { +} { + # check and see if this was a double click + set dbclick_p [db_string dbclick "select count(*) + from bm_bookmarks + where bookmark_id = :bookmark_id"] + + if {$dbclick_p == "1"} { + ad_returnredirect $return_url + return + } else { + + upvar \#[template::adp_level] n_errors n_errors + upvar \#[template::adp_level] error_list error_list + + set n_errors 1 + set error_list [list "There was an error making this insert into the database. $errmsg"] + + uplevel \#[template::adp_level] { + ad_return_template "complaint" + } + return -code return + } +} + + +ad_proc bm_repeat_string { string iteration_number } { +} { + if { $iteration_number <= 0} { + return "" + } + + set return_string "" + for { set i 0 } { $i < $iteration_number } { incr i } { + append return_string $string + } + + return $return_string +} + + +ad_proc bm_get_root_folder_id { package_id user_id } { + Returns the id of the bookmark root folder of a user in a package + instance. This root folder is used for default access permissioning + of a users bookmarks (bookmarks will inherit permissions). +} { + set root_folder_id [db_exec_plsql fs_root_folder " + begin + :1 := bookmark.get_root_folder( + package_id => :package_id, + user_id => :user_id); + end;"] + + return $root_folder_id +} + + +ad_proc bm_user_can_write_in_some_folder_p { viewed_user_id } { + Returns "t" if there is a folder that the browsing user can write + in, and "f' otherwise. +} { + set browsing_user_id [ad_conn user_id] + + set n_of_write_folders [db_string write_in_folders "select count(*) from bm_bookmarks + where owner_id = :viewed_user_id + and folder_p = 't' + and acs_permission.permission_p(bookmark_id, :browsing_user_id, 'write') = 't'"] + + return [ad_decode $n_of_write_folders "0" "f" "t"] +} + + +ad_proc bm_delete_permission_p { bookmark_id } { + Returns boolean value indicating if the browsing user may delete + the bookmark. +} { + set browsing_user_id [ad_conn user_id] + + return [ad_decode [db_string delete_permission_p "select count(*) from bm_bookmarks + where acs_permission.permission_p(bookmark_id, :browsing_user_id, 'delete') = 'f' + start with bookmark_id = :bookmark_id + connect by prior bookmark_id = parent_id"] "0" "t" "f"] + + +} + + +ad_proc bm_require_delete_permission { bookmark_id } { + This proc verifyes that the user may delete the bookmark/folder and all its + contained bookmarks/folders. + +} { + if { [string equal [bm_delete_permission_p $bookmark_id] "f"] } { + set n_errors 1 + set error_list [list "You either do not have delete permissions on this bookmark/folder, or you are trying to delete a folder that contains at least one bookmarks or folder that you may not delete"] + ad_return_template "complaint" + return -code return + } +} + + +ad_proc bm_context_bar_args { arg_string viewed_user_id } { + If viewed_user_id <> browsing_user_id we need to prefix the + context bar args with an entry for bookmarks of the viewed user. If the + arg_string is empty it is assumed that we are on the index page and that otherwise + the page has been linked from the index page. +} { + set browsing_user_id [ad_conn user_id] + + if { ![string equal $browsing_user_id $viewed_user_id] && ![empty_string_p $viewed_user_id]} { + # The user is viewing someone elses bookmarks + # and we need the set the context bar so that + # he can go back to viewing his own bookmarks + set user_name [db_string user_name "select first_names || ' ' || last_name from cc_users where object_id = :viewed_user_id" -default ""] + + if { [empty_string_p $arg_string] } { + # We are on the index page + return "\"Bookmarks of $user_name\"" + } else { + # We were linked from the index page + return "\[list \"index?viewed_user_id=$viewed_user_id\" \"Bookmarks of $user_name\"\] $arg_string" + } + } else { + return $arg_string + } +} + + +ad_proc bm_get_html_title { html_code } { + +} { + set title "" + regexp -nocase {([^<]*)} $html_code match title + + if {[string length $title]> [ad_parameter URLTitleMaxLength] || [string length $title] > 499 } { + set title "[string range $title 0 496]..." + } + + return [string trim $title] +} + + +ad_proc bm_get_html_description { html_code } { + +} { + set description "" + regexp -nocase { [ad_parameter URLDescriptionMaxLength] || [string length $description] > 3999 } { + set description "[string range $description 0 3996]..." + } + + return [string trim $description] +} + +ad_proc bm_get_html_keywords { html_code } { + +} { + set keywords "" + regexp -nocase {} $html_code match keywords + + if {[string length $keywords]> [ad_parameter URLKeywordsMaxLength] || [string length $keywords] > 3999 } { + set keywords "[string range $keywords 0 3996]..." + } + + return [string trim $keywords] +} + + +ad_proc bm_bookmark_private_p { bookmark_id } { + +} { + return [db_string bookmark_private_p "select bookmark.private_p(:bookmark_id) from dual"] +} + + +ad_proc bm_update_bookmark_private_p { bookmark_id private_p} { + +} { + db_exec_plsql update_private_p { + begin + bookmark.update_private_p(:bookmark_id, :private_p); + end; + } +} + + +ad_proc bm_initialize_in_closed_p { viewed_user_id in_closed_p_id } { + +} { + db_exec_plsql initialize_in_closed_p { + begin + bookmark.initialize_in_closed_p(:viewed_user_id, :in_closed_p_id); + end; + } +} Index: openacs-4/packages/bookmarks/www/bm-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/Attic/bm-master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bm-master.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,53 @@ + + <% # Set a default email address to sign the bottom of each page. + set signatory [ad_parameter -package_id [ad_acs_kernel_id] SystemOwner "admin@yourservername"] %> + + + + +@page_title@ + +

      @page_title@

      + +@context_bar@ + +
      + + + + + <% # Setting the default attributes for page display. + set bgcolor [ad_parameter -package_id [ad_acs_kernel_id] bgcolor acs-core-ui white] + set text [ad_parameter -package_id [ad_acs_kernel_id] textcolor acs-core-ui black] + set attributes "bgcolor=\"$bgcolor\" text=\"$text\"" %> + + + +@head_contents@ +@page_title@ + + + +

      @page_title@

      + +@context_bar@ + +
      + + + +
      + +
      @signatory@
      + + +
      + + + + + + + + + Index: openacs-4/packages/bookmarks/www/bm-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/Attic/bm-master.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bm-master.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,7 @@ +if { [info exists context_bar_args] } { + set context_bar [eval ad_context_bar $context_bar_args] +} else { + set context_bar "" +} + + Index: openacs-4/packages/bookmarks/www/bookmark-access.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-access.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-access.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,27 @@ +ad_page_contract { + This script updates the access date of the bookmark + (any other auditing could be done here as well) and + redirects the user to the url. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + bookmark_id:integer + url +} + +db_dml update_access_date "update bm_bookmarks set last_access_date = sysdate where bookmark_id = :bookmark_id +or bookmark_id in (select bookmark_id from bm_bookmarks +start with bookmark_id = (select parent_id from bm_bookmarks where bookmark_id = :bookmark_id) +connect by prior parent_id = bookmark_id)" + +ad_returnredirect "$url" Index: openacs-4/packages/bookmarks/www/bookmark-add-import.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-add-import.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-add-import.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,84 @@ + +@page_title@ +@context_bar_args@ + +<% set hidden_form_vars " + +" %> + +

      Add one Bookmark

      +Insert the URL below. If you leave the title blank, we will +attempt to get the title from the web site. + +
      +@hidden_form_vars@ + + + + + + + + + + + + + + + + + + + + +
      URL:
      Title (Optional):
      Folder
      + create a new folder
      + + +
      +
      + +

      How to add a Bookmark when you are browsing

      +To be able to add to your bookmarks in this system when you are +browsing you may use a so called Bookmarklet (which is a Bookmark in +your browser containing a line of JavaScript instead of a url). Such a +Bookmarklet enables you to bookmark pages of interest +without interrupting your browsing so that adding Bookmarks to this +system becomes just as easy as adding bookmarks in your browser. To +enable this feature you may do the following. Right click on this link and choose to add it as a Bookmark +(in Internet Explorer it is called Favorite). In Netscape you may then +preferably rename this Bookmark (for example to "Add Bookmark") and +move it to your toolbar so that you have an +easily accessible button to press everytime you want to bookmark a page. + + +

      Import multiple bookmarks from Netscape or Microsoft Internet Explorer bookmark.htm file

      + +
      +@hidden_form_vars@ + +Netscape users: Just specify your bookmark file
      +Users of new versions of IE: Export your shortcuts to Netscape format, then + specify the file
      + +

      + + + + + +
      Bookmarks File:
      +

      + + + + + + + + + + + Index: openacs-4/packages/bookmarks/www/bookmark-add-import.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-add-import.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-add-import.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,73 @@ +ad_page_contract { + Page that lets a user add a single bookmark or + import a whole set of bookmarks from netscape. + + This script in conjunction with a bookmarklet (a bookmark + containing a line of JavaScript) is also supposed to enable + the user to add a bookmark to this system when he is + browsing the web by simply pressing a button in his browser. + After the bookmark gets inserted the script bookmark-add-one-2 + will redirect back to the page that the user + was viewing. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + return_url + {viewed_user_id:integer ""} + {local_title ""} + {complete_url ""} + +} -properties { + + page_title:onevalue + context_bar_args:onevalue + return_url:onevalue + viewed_user_id:onevalue + bookmark_id:onevalue + bookmarklet:onevalue + local_title:onevalue + complete_url:onevalue + this_url_urlenc +} + + +# If we we are coming from a Bookmarklet there will be no viewe_user_id +# supplied, but the browsing_user_id will do +if { [empty_string_p $viewed_user_id] } { + set viewed_user_id [ad_conn user_id] +} + +set page_title "Add/Import Bookmarks" + +set context_bar_args [bm_context_bar_args "\"$page_title\"" $viewed_user_id] + +# get the next bookmark_id (used as primary key in bm_bookmarks) +set bookmark_id [db_nextval acs_object_id_seq] + +# If the user opts to create a new folder we need to provide this url +# along with the whole url vars string to enable the user to come back +# (also needed if the user needs to log in to the system first) +set this_url_urlenc [ad_urlencode "[ad_conn url]?[export_url_vars viewed_user_id complete_url local_title return_url bookmark_id]"] + +# Redirect the user to log in if he has not done so +set user_id [ad_conn user_id] +if { $user_id == "0" } { + ad_returnredirect "/register/?return_url=$this_url_urlenc" + return +} + +set full_bookmark_add_url "[ad_parameter -package_id [ad_acs_kernel_id] SystemURL][ad_conn package_url]bookmark-add-import" + +set bookmarklet "javascript:location.href='${full_bookmark_add_url}?return_url='+escape(location.href)+'&local_title='+escape(document.title)+'&complete_url='+escape(location.href)" + +ad_return_template Index: openacs-4/packages/bookmarks/www/bookmark-add-one-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-add-one-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-add-one-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,101 @@ +ad_page_contract { + Inserts a single bookmark into the bookmark system. + Details: + 1 splits the 'complete_url' to get the 'host_url' + 2 checks if 'complete_url' and implicitly 'host_url' are already in bm_urls if not, inserts them into the table + 3 inserts the corresponding 'pretty_title', 'bookmark_id', 'parent_id' (along with user_id) into bm_list + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + return_url + viewed_user_id:integer + parent_id:integer + complete_url + local_title + bookmark_id:integer + url_title + meta_description + meta_keywords +} + +set user_id [ad_conn user_id] + +ad_require_permission $parent_id write + +# split the url to get the host_url +set host_url [bm_host_url $complete_url] + + +# Check if the input url is allreay in the database. If the url is allready in the database +# we fetch the corresponding url_id, and if not we insert the url remembering the url_id. +#------------------------------------------------------------------------------------------ +set n_complete_urls [db_string count_url " + select count(*) + from bm_urls + where complete_url = :complete_url "] + +set creation_ip [ad_conn peeraddr] + +if {$n_complete_urls == "0"} { + + set url_id [db_nextval acs_object_id_seq] + + db_exec_plsql url_add " + begin + :1 := url.new ( + url_id => :url_id, + url_title => :url_title, + host_url => :host_url, + complete_url => :complete_url, + meta_keywords => :meta_keywords, + meta_description => :meta_description, + creation_user => :viewed_user_id, + creation_ip => :creation_ip + ); + end;" + +} else { + set url_id [db_string new_url_id "select url_id + from bm_urls + where complete_url= :complete_url"] + + db_dml update_url_meta_info "update bm_urls set url_title= :url_title, + meta_description= :meta_description, + meta_keywords= :meta_keywords + where url_id = :url_id" +} +#------------------------------------------------------------------------------------------ + + +# Insert the bookmark +#------------------------------------------------------------------------------------------ + if [catch {db_exec_plsql bookmark_add " + declare + dummy_var integer; + begin + dummy_var := bookmark.new ( + bookmark_id => :bookmark_id, + owner_id => :viewed_user_id, + url_id => :url_id, + local_title => :local_title, + parent_id => :parent_id, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end;"} errmsg] { + bm_handle_bookmark_double_click $bookmark_id $errmsg $return_url + } +#------------------------------------------------------------------------------------------ + + +ad_returnredirect "$return_url" Index: openacs-4/packages/bookmarks/www/bookmark-add-one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-add-one.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-add-one.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,45 @@ + +@page_title@ +@context_bar_args@ + + +Warning: We are not able to reach the url (@complete_url@) that you specified. Please make sure that you did not misspell the url. + + +

      + + + + You will be adding: +

      + + @export_form_vars_html@ + + Please confirm that this is correct +
        + + + + +
        + +
        + +
      + + + @errmsg@ + + + + + + + + + + + Index: openacs-4/packages/bookmarks/www/bookmark-add-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-add-one.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-add-one.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,138 @@ +ad_page_contract { + This is the target script of the add bookmark form + on the bookmark-add-import page. Validates the url + that the user typed in. If no title was provided by the + user a title will be fetched from the page to be bookmarked + - in this case the user will be asked for a confirmation. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + {viewed_user_id:integer ""} + {complete_url:trim ""} + {local_title ""} + return_url + {bookmark_id:integer ""} + parent_id:integer + +} -validate { + + valid_url { + + # If we are coming to this page through a bookmarklet the + # complete url will not be provided but the url to bookmark + # is in this case the return_url which is the page that the + # user is viewing + if { [empty_string_p $complete_url] } { + set complete_url $return_url + } + + # see if 'complete_url' is missing the protocol (ie https:// ) - + # if so set complete_url "http://$complete_url" + if { ![regexp {^[^:\"]+://} $complete_url] } { + set complete_url "http://$complete_url" + } + + set url_content "" + if {[catch {ns_httpget $complete_url 10} url_content]} { + set url_unreachable_p "t" + } else { + set url_unreachable_p "f" + } + } + + can_find_title { + + set url_title [bm_get_html_title $url_content] + + # If user did not enter a title for the bookmark, we need to assign remote page title + if {[empty_string_p $local_title]} { + set user_provided_title_p "f" + set local_title $url_title + + if {[empty_string_p $local_title]} { + ad_complain "We're sorry but we can not detect a title for this bookmark, + the host does not provide one. If you still want to add this bookmark + now, press \[Back\] on your browser and check the URL or type in a title." + } + } else { + set user_provided_title_p "t" + } + + } + +} -properties { + page_title:onevalue + context_bar_args:onevalue + errmsg:onevalue + local_title:onevalue + complete_url:onevalue + + parent_id:onevalue + bookmarks:multirow + bookmark_id:onevalue + + return_url:onevalue + url_unreachable_p:onevalue + meta_description:onevalue + meta_keywords:onevalue + export_form_vars_html:onevalue + +} -return_errors error_list + +if { [info exists error_list] } { + set n_errors [llength $error_list] + ad_return_template "complaint" +} + + +# If this page was called with a bookmarklet some form vars will not be +# provided and we need to set them here. +if { [empty_string_p $viewed_user_id] } { + set viewed_user_id $user_id +} +if { [empty_string_p $bookmark_id] } { + set bookmark_id [db_nextval acs_object_id_seq] +} + +# Redirect the user to log in if he has not done so +set this_url_urlenc [ad_urlencode "[ad_conn url]?[export_url_vars viewed_user_id complete_url local_title return_url bookmark_id]"] + +set user_id [ad_conn user_id] +if { $user_id == "0" } { + ad_returnredirect "/register/?return_url=$this_url_urlenc" + return +} + + + +set page_title "Inserting \"[string trim $local_title]\"" + +set context_bar_args [bm_context_bar_args "\[list bookmark-add-import?[export_url_vars return_url viewed_user_id] \"Add/Import Bookmarks\"\] \"[ad_quotehtml $page_title]\"" $viewed_user_id] + +set meta_description [bm_get_html_description $url_content] +set meta_keywords [bm_get_html_keywords $url_content] + +set export_form_vars_html [export_form_vars return_url local_title complete_url bookmark_id viewed_user_id meta_description meta_keywords url_title parent_id] + +# If the user provided a title and the url is reachable we do not +# ask for a confirmation +if { $url_unreachable_p == "f" && $user_provided_title_p == "t"} { + ad_returnredirect "bookmark-add-one-2?[export_url_vars return_url local_title complete_url bookmark_id meta_description meta_keywords url_title viewed_user_id parent_id]" + return +} else { + ad_return_template +} + + + + Index: openacs-4/packages/bookmarks/www/bookmark-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-delete-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-delete-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,39 @@ +ad_page_contract { + This script deletes a bookmark and redirects to the + index page. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + bookmark_id:integer + return_url +} + +bm_require_delete_permission $bookmark_id + + +if [catch {db_exec_plsql bookmark_add " + begin + bookmark.delete ( + bookmark_id => :bookmark_id + ); + end;"} errmsg] { + + set n_errors 1 + set error_list [list "We were not able to delete the bookmark from the database, this is the error message:
      $errmsg
      "] + + ad_return_template "error" + return +} + + +ad_returnredirect $return_url Index: openacs-4/packages/bookmarks/www/bookmark-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-delete.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-delete.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,28 @@ + +@page_title@ +@context_bar_args@ + + + + +Are you sure that you want to delete the bookmark "@bookmark_title@"? + + +Are you sure that you want to delete all of the following bookmarks? The deletion can not be undone. +

      + +<%=[bm_repeat_string " " [expr @contained_bookmarks.indentation@ * 5]]%> @contained_bookmarks.local_title@
      +
      + + + +

      + +

      + + +
      + +
      +
      + Index: openacs-4/packages/bookmarks/www/bookmark-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-delete.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,49 @@ +ad_page_contract { + This page asks for confirmation before a bookmark + (and all its contained bookmarks) are deleted. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + bookmark_id:integer + viewed_user_id:integer + return_url + +} -properties { + page_title:onevalue + context_bar_args:onevalue + bookmark_title:onevalue + contained_bookmarks:multirow + return_url +} + +# We have to check delete permission on all contained bookmarks as well +bm_require_delete_permission $bookmark_id + + +set page_title "Confirm Deletion" + +set context_bar_args "\[list bookmark-edit?bookmark_id=$bookmark_id&viewed_user_id=$viewed_user_id \"Edit Bookmark\"\] \"$page_title\"" + +set bookmark_title [db_string bookmark_title "select local_title from bm_bookmarks + where bookmark_id = :bookmark_id"] + + +db_multirow contained_bookmarks contained_bookmarks {select local_title, level as indentation +from bm_bookmarks start with bookmark_id = :bookmark_id +connect by prior bookmark_id = parent_id} + + +ad_return_template + + + Index: openacs-4/packages/bookmarks/www/bookmark-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-edit-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,91 @@ +ad_page_contract { + Makes changes to the bookmark and redirects to the + index page + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + folder_p + return_url + bookmark_id:integer + viewed_user_id:integer + {complete_url:trim ""} + local_title + parent_id:integer + {private_p "f"} + old_private_p +} -validate { + valid_url { + if { [string equal $folder_p "f"] && [empty_string_p [string trim $complete_url]] } { + ad_complain "You must provide a non empty url" + } + } + +} -return_errors error_list + +if { [info exists error_list] } { + set n_errors [llength $error_list] + ad_return_template "complaint" + return +} + + +ad_require_permission $bookmark_id admin + +# We update or insert the url +if { [string equal $folder_p "f"] } { + + set host_url [bm_host_url $complete_url] + set creation_ip [ad_conn peeraddr] + set creation_user [ad_conn user_id] + + set url_id [db_exec_plsql insert_or_update_url " + begin + :1 := url.insert_or_update ( + url_title => :local_title, + host_url => :host_url, + complete_url => :complete_url, + creation_user => :creation_user, + creation_ip => :creation_ip + ); + end;"] + + set url_clause ", url_id = :url_id" +} else { + set url_clause "" +} + +# Update the title, url_id and parent id of the bookmark +db_dml update_bookmark "update bm_bookmarks set local_title = :local_title, parent_id = :parent_id + $url_clause + where bookmark_id = :bookmark_id" + +# Also update the context id of the bookmark +db_dml update_context_id "update acs_objects set context_id = :parent_id where object_id = :bookmark_id" + +# Since the bookmark may have been moved we need to update its +# in_closed_p status for all users viewing the bookmark tree +db_exec_plsql update_in_closed_p " +begin +bookmark.update_in_closed_p_all_users ( + bookmark_id => :bookmark_id, + new_parent_id => :parent_id +); +end;" + +# Update the private_p status of the bookmark +if { ![string equal $old_private_p $private_p] } { + bm_update_bookmark_private_p $bookmark_id $private_p +} + + +ad_returnredirect "$return_url" Index: openacs-4/packages/bookmarks/www/bookmark-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-edit.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,52 @@ + +@page_title@ +@context_bar_args@ + + +
      +@export_form_vars@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      URL:">
      Title:">
      Parent Folder:
      Access Permissions checked> Private (no other registered users have read access to this folder or any of its contained bookmarks and folders)This bookmark is private since it is contained in a private folder. To make this bookmark public you need to make the topmost private folder containing this bookmark public.
      +
      + + + Index: openacs-4/packages/bookmarks/www/bookmark-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-edit.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,100 @@ +ad_page_contract { + Lets a user rename, view and manage permissions of + a bookmark or a bookmark folder. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + bookmark_id:integer + {viewed_user_id:integer ""} + return_url + +} -validate { + + admin_rights -requires {bookmark_id:integer} { + # Check that the user may administer this bookmark/folder + set browsing_user_id [ad_conn user_id] + + set admin_p [db_string bookmark_admin_p "select + acs_permission.permission_p(:bookmark_id, :browsing_user_id, 'admin') from dual"] + + if { !($admin_p == "t") } { + ad_complain "We are sorry, but you do not have permissions to edit this bookmark" + } + } + +} -properties { + page_title:onevalue + context_bar_args:onevalue + bookmark:onerow + viewed_user_id:onevalue + folder_p:onevalue + old_private_p:onevalue + public_possible_p:onevalue + folder_bookmark:onevalue + export_form_vars:onevalue + return_url_urlenc:onevalue + +} -return_errors error_list + +if { [info exists error_list] } { + set n_errors [llength $error_list] + ad_return_template "complaint" +} + +if { [empty_string_p $viewed_user_id] } { + set viewed_user_id [ad_conn user_id] +} + +set folder_p [db_string folder_p "select folder_p from bm_bookmarks where bookmark_id = :bookmark_id"] + +set folder_bookmark [ad_decode $folder_p "t" "folder" "bookmark"] + +set page_title "Edit [ad_decode $folder_p "t" "Folder" "Bookmark"]" + +set context_bar_args [bm_context_bar_args "\"$page_title\"" $viewed_user_id] + +set delete_p [bm_delete_permission_p $bookmark_id] + + +# Get default setting for private_p +set old_private_p [bm_bookmark_private_p $bookmark_id] + +# Check if private_p can be influenced for this bookmark +# If the bookmark is in a private folder then private_p can not +# be set directly for this bookmark +set security_inherit_p [db_string inheritance_p "select security_inherit_p from acs_objects where object_id = :bookmark_id"] + +if { [string equal $old_private_p "t"] && [string equal $security_inherit_p "t"] } { + set public_possible_p "f" +} else { + set public_possible_p "t" +} + + +template::query bookmark onerow "select local_title, + owner_id, + complete_url, + folder_p, + parent_id, + bookmark_id + from bm_bookmarks, + bm_urls + where bookmark_id = :bookmark_id + and bm_bookmarks.url_id = bm_urls.url_id(+)" + + +set export_form_vars [export_form_vars viewed_user_id folder_p old_private_p return_url] + +set return_url_urlenc [ad_urlencode $return_url] + +ad_return_template Index: openacs-4/packages/bookmarks/www/bookmark-permissions-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-permissions-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-permissions-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,45 @@ +ad_page_contract { + This script updates the default permissions of the + users root folder. If the individual permissions are to + be reset we redirect to permissions-reset. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + root_folder_id:integer + viewed_user_id:integer + {private_p "f"} + reset_all_individual_p:optional +} + +ad_require_permission $root_folder_id admin + +bm_update_bookmark_private_p $root_folder_id $private_p + +# set non_default_permissions_p [db_string non_default_permissions_p "select decode(count(*), 0, 'f', 't') from bm_bookmarks +# where acs_permission.permission_p(bookmark_id, acs.magic_object_id('registered_users'), 'read') <> :public_p +# start with parent_id = :root_folder_id +# connect by prior bookmark_id = parent_id"] + + +if { [info exists reset_all_individual_p] && [string equal $reset_all_individual_p "t"] && [string equal $non_default_permissions_p "t"] } { + ad_returnredirect "permissions-reset-all?public_p=$public_p&viewed_user_id=$viewed_user_id&root_folder_id=$root_folder_id" +} else { + ad_returnredirect "index?viewed_user_id=$viewed_user_id" +} + + + + + + + Index: openacs-4/packages/bookmarks/www/bookmark-permissions.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-permissions.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-permissions.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,22 @@ + +@page_title@ +@context_bar_args@ +@viewed_user_id@ + +
      + + + + + + + + + +
      Default (root) access permissions checked> Private (no other registered users have read access to any of your bookmarks)
      + +
      + +
      + +
      Index: openacs-4/packages/bookmarks/www/bookmark-permissions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-permissions.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-permissions.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,42 @@ +ad_page_contract { + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + + viewed_user_id:integer + +} -properties { + page_title:onevalue + context_bar_args:onevalue + old_public_p:onevalue + viewed_user_id:onevalue +} + +set root_folder_id [bm_get_root_folder_id [ad_conn package_id] [ad_conn user_id]] + +set old_private_p [bm_bookmark_private_p $root_folder_id] + +ad_require_permission $root_folder_id admin + +set page_title "Manage Permisssions on all Bookmarks" + +set context_bar_args [bm_context_bar_args "\"[ad_quotehtml $page_title]\"" $viewed_user_id] + + +ad_return_template + + + + + + Index: openacs-4/packages/bookmarks/www/bookmark-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-view.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-view.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,18 @@ + +@page_title@ +@context_bar_args@ + +
        +
      • Bookmark Title: @bookmark.local_title@
      • +

        +

      • Complete URL: @bookmark.complete_url@
      • +

        +

      • Owner email: @bookmark.email@
      • +

        +

      • URL Title: @bookmark.url_title@
      • +

        +

      • URL Keywords: @bookmark.meta_keywords@
      • +

        +

      • URL Description: @bookmark.meta_description@
      • + +
      Index: openacs-4/packages/bookmarks/www/bookmark-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmark-view.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmark-view.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,58 @@ +ad_page_contract { + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + bookmark_id:integer + +} -properties { + page_title:onevalue + context_bar_args:onevalue + +} + +set page_title "View Bookmark" + +set context_bar_args "\"$page_title\"" + +ad_require_permission $bookmark_id read + + +template::query bookmark onerow "select local_title, + email, + owner_id, + complete_url, + bookmark_id, + meta_keywords, + meta_description, + url_title + from bm_bookmarks, + bm_urls, + parties + where bookmark_id = :bookmark_id + and bm_bookmarks.url_id = bm_urls.url_id(+) + and bm_bookmarks.owner_id = parties.party_id" + + +ad_return_template + + + + + + + + + + + + Index: openacs-4/packages/bookmarks/www/bookmarks-check.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-check.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmarks-check.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,213 @@ +ad_page_contract { + This page checks all urls belonging to the + user and lets him delete the ones that are dead. + + Since it is not easily possible to build a page + incrementally (to flush) using the ArsDigita Templating + System, I was forced to use the good old ns_write on this + page. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + return_url + {viewed_user_id:integer ""} +} + +set page_title "Checking Bookmarks" + +set context_bar_args [bm_context_bar_args "\"$page_title\"" $viewed_user_id] + +set package_id [ad_conn package_id] + +set browsing_user_id [ad_conn user_id] + +if { [empty_string_p $viewed_user_id] } { + # Only admins can call this page for all users + ad_require_permission $package_id admin + + set root_folder_id $package_id +} else { + # Only check urls belonging to the viewed user + set root_folder_id [bm_get_root_folder_id [ad_conn package_id] $viewed_user_id] +} + +set check_list [db_list_of_lists bookmark_list " +select url_id, + complete_url, + nvl(url_title, complete_url) as url_title + from bm_urls + where exists (select 1 from (select bookmark_id, url_id from bm_bookmarks + start with parent_id = :root_folder_id + connect by prior bookmark_id = parent_id) bm + where bm.url_id = bm_urls.url_id + and acs_permission.permission_p(bm.bookmark_id, :browsing_user_id, 'delete')= 't' )"] + + +# We want to give the user something to look at before we start contacting +# the foreign hosts +ReturnHeaders +ns_write "[ad_header $page_title] + +

      $page_title

      + +[eval ad_context_bar [bm_context_bar_args "\"$page_title\"" $viewed_user_id]] +
      +" + +if { ![empty_string_p $check_list] } { + ns_write "URLs are being checked. This might take some time - so please have some patience... + +Links that aren't reachable will appear with a checkbox in front of +them and the words NOT FOUND after the link. +If you want to delete these links, simply click the checkbox and then +the \"Delete selected links\" button at the bottom of the page. +

      " + +} else { + ns_write "There are no bookmarks to check + [ad_footer]" + return +} + +set form_opened_p f +set dead_count 0 + +foreach check_set $check_list { + + set checked_url [ns_set create] + + set url_id [lindex $check_set 0] + set complete_url [lindex $check_set 1] + set url_title [lindex $check_set 2] + + # we only want to check http: + + if { [regexp -nocase "^mailto:" $complete_url] || [regexp -nocase "^file:" $complete_url] || (![regexp -nocase "^http:" $complete_url] && [regexp {^[^/]+:} $complete_url]) || [regexp "^\\#" $complete_url] } { + # it was a mailto or an ftp:// or something (but not http://) + # else that http_open won't like (or just plain #foobar) + + ns_write "

      + + + +
      + Skipping [ad_quotehtml $url_title] ....
      " + + continue + } + + # strip off any trailing #foo section directives to browsers + regexp {^(.*/?[^/]+)\#[^/]+$} $complete_url dummy complete_url + if [catch { set response [util_get_http_status $complete_url] } errmsg ] { + # we got an error (probably a dead server) + set response "probably the foreign server isn't responding at all" + } + if {$response == 404 || $response == 405 || $response == 500 } { + # we should try again with a full GET + # because a lot of program-backed servers return 404 for HEAD + # when a GET works fine + if [catch { set response [util_get_http_status $complete_url 1] } errmsg] { + set response "probably the foreign server isn't responding" + } + } + + ns_set put $checked_url url_id $url_id + if { $response != 200 && $response != 302 } { + ns_set put $checked_url last_live_date "" + + if { [string equal $form_opened_p "f"] } { + set form_opened_p "t" + ns_write "

      + + " + } + + set delete_html "
      + " + + ns_write "

      + + $delete_html + [ad_quotehtml $url_title].... NOT FOUND [ad_quotehtml $response]
      " + + incr dead_count + + } else { + ns_set put $checked_url last_live_date "sysdate" + set url_content "" + if {![catch {ns_httpget $complete_url 3 1} url_content]} { + + set title [bm_get_html_title $url_content] + set description [bm_get_html_description $url_content] + set keywords [bm_get_html_keywords $url_content] + + if { ![empty_string_p $keywords] || ![empty_string_p $description] } { + set keywords_or_description_p "t" + } else { + set keywords_or_description_p "f" + } + + ns_set put $checked_url title $title + ns_set put $checked_url description $description + ns_set put $checked_url keywords $keywords + + ns_write "

      + + + +
      [ad_quotehtml $url_title].... FOUND   [ad_decode $title "" "" "title: $title"]
      " + } + + } + + lappend checked_list $checked_url +} + + + + +foreach checked_url $checked_list { + set url_id [ns_set get $checked_url url_id] + set title [ns_set get $checked_url title] + set description [ns_set get $checked_url description] + set keywords [ns_set get $checked_url keywords] + set last_live_date [ns_set get $checked_url last_live_date] + + if { ![empty_string_p $last_live_date] } { + set last_live_clause ", last_live_date = $last_live_date" + } else { + set last_live_clause "" + } + + db_dml bookmark_update_last_checked " + update bm_urls + set last_checked_date = sysdate, + + url_title= :title, + meta_description= :description, + meta_keywords= :keywords + + $last_live_clause + + where url_id = :url_id" +} + + +if { $dead_count > 0 } { + ns_write "

      + + + [ad_footer]" +} else { + ns_write "

      [ad_footer]" +} Index: openacs-4/packages/bookmarks/www/bookmarks-export.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-export.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmarks-export.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,17 @@ + +@page_title@ +@context_bar_args@ + +Clicking on the link below (alternatively you can right click on the link +and choose "Save Target As..." or "Save Link As...") will deliver your bookmarks file in a +traditional Netscape format. You will need to save the file on your +machine (by choosing File -> Save As in the menu). If you are using +Microsoft Windows you probably need to save the file in the directory +C:\Program Files\Netscape\Users\your_name. If you are using +Internet Explorer you will be able to import the bookmarks from this file. + +

      + + bookmark.htm +
      + Index: openacs-4/packages/bookmarks/www/bookmarks-export.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-export.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmarks-export.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,36 @@ +ad_page_contract { + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + viewed_user_id:integer + +} -properties { + page_title:onevalue + context_bar_args:onevalue + +} + +# We are currently only supporting export of the users own bookmarks +if { ![string equal $viewed_user_id [ad_conn user_id]] } { + set n_errors 1 + set error_list [list "We are sorry, but the bookmarks module does not currently support the exporting other users bookmarks."] + ad_return_template "complaint" +} + + +set page_title "Export Bookmarks to Netscape File" + +set context_bar_args [bm_context_bar_args "\"$page_title\"" $viewed_user_id] + + +ad_return_template Index: openacs-4/packages/bookmarks/www/bookmarks-import.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-import.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmarks-import.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,16 @@ + +@page_title@ +@context_bar_args@ + +Here are the results of the import: + +
        + +
      • @import_list:item@
      • +
        +
      + +

      +You may go back to viewing your bookmarks." +

      + Index: openacs-4/packages/bookmarks/www/bookmarks-import.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-import.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmarks-import.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,266 @@ +ad_page_contract { + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + upload_file + upload_file.tmpfile:tmpfile + + bookmark_id:integer + return_url + viewed_user_id:integer +} -validate { + + non_empty_file { + + if { [file size ${upload_file.tmpfile}] == 0 } { + ad_complain "The bookmark file you specified is either empty or invalid." + } + } + +} -properties { + + page_title:onevalue + context_bar_args:onevalue + import_list:onevalue + return_url:onevalue + +} -return_errors error_list + +# Read the file and check its size +if [catch { set contents [read [open ${upload_file.tmpfile} r] [ad_parameter MaxNumberOfBytes bm 1000000]] } errmsg] { + lappend error_list "We had a problem processing your request: +

      $errmsg" +} + +# Check that the file is of right format +if {![regexp {

      (.*)
      } $contents match format_p]} { + lappend error_list "You file does not appear to be a valid bookmark file" +} + +if { [info exists error_list] } { + set n_errors [llength $error_list] + ad_return_template "complaint" +} + + + +# Let's check for a doubleclick first +if { [db_string dbclick_check " +select count(bookmark_id) as n_existing +from bm_bookmarks +where bookmark_id = :bookmark_id"] != 0 } { + # must have doubleclicked + ad_returnredirect $return_url + return +} + +set page_title "Import Statistics" + +set context_bar_args [bm_context_bar_args "\[list \"bookmark-add-import?[export_url_vars viewed_user_id return_url]\" \"Add/Import Bookmarks\"\] \"$page_title\"" $viewed_user_id] + + +# set flags to be used parsing the input file. +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] +set creation_ip [ad_conn peeraddr] + +set parent_id [bm_get_root_folder_id $package_id $viewed_user_id] +lappend folder_list $parent_id + +# split the input file 'contents' on returns and rename it 'lines' +set lines [split $contents "\n"] + +# connect to the default pool and start a transaction. +foreach line $lines { + + set depth [expr [llength $folder_list]-1] + + # checks if the line represents a folder + if {[regexp {]*>([^<]*)} $line match local_title]} { + + if {[string length $local_title] > 499} { + set local_title "[string range $local_title 0 496]..." + } + + # test for duplicates + if { [db_string n_dp_folder " + select count(*) from bm_bookmarks + where owner_id = :viewed_user_id + and parent_id = :parent_id + and folder_p = 't' + and local_title = :local_title"] != 0 } { + + lappend import_list "Duplicate folder \"$local_title\"" + set parent_id [db_string bm_parent " + select bookmark_id + from bm_bookmarks + where folder_p = 't' + and owner_id = :user_id + and local_title = :local_title"] + + } else { + # insert folder into bm_bookmarks + if [catch {db_exec_plsql folder_insert " + declare + dummy_var integer; + begin + dummy_var := bookmark.new ( + bookmark_id => :bookmark_id, + owner_id => :viewed_user_id, + local_title => :local_title, + parent_id => :parent_id, + folder_p => 't', + creation_user => :user_id, + creation_ip => :creation_ip + ); + end;"} errmsg] { + set n_errors 1 + set error_list [list "We were unable to create your user record in the database. Here's what the error looked like: +
      +
      +		    $errmsg
      +		    
      +
      "] + ad_return_template "error" + return + } else { + # success in inserting folder into bm_bookmarks + lappend import_list "Inserting folder \"$local_title\"" + + lappend folder_list $bookmark_id + set parent_id $bookmark_id + + set bookmark_id [db_nextval acs_object_id_seq] + } + } + } + + # check if the line ends the current folder + if {[regexp {} $line match]} { + set folder_depth [expr [llength $folder_list]-2] + if {$folder_depth<0} { + set folder_depth 0 + } + set folder_list [lrange $folder_list 0 $folder_depth] + set parent_id [lindex $folder_list $folder_depth] + + } + + # check if the line is a url + if {[regexp {
      ]*>([^<]*)} $line match complete_url local_title]} { + + set host_url [bm_host_url $complete_url] + + if { [empty_string_p $host_url] } { + continue + } + + if { [string length $complete_url] > 499 } { + lappend import_list "URL is too long for our database, skipping: \"$complete_url\"" + + } else { + # check to see if we already have the url in our database + set url_id [db_string bm_dp_url " + select url_id + from bm_urls + where complete_url = :complete_url" -default ""] + + set url_p 1 + + # if we don't have the url, then insert the url into the database + if [empty_string_p $url_id] { + + set url_id [db_nextval acs_object_id_seq] + + if [catch {db_dml new_url " + declare + dummy_var integer; + begin + dummy_var := url.new ( + url_id => :url_id, + url_title => :local_title, + host_url => :host_url, + complete_url => :complete_url, + creation_user => :viewed_user_id, + creation_ip => :creation_ip + ); + end;"} errmsg] { + lappend import_list "We were unable to insert the url $complete_url into the database due to the following + database error:
      $errmsg
      " + set url_p 0 + } + } + + # now we have a url_id (either from query or insert), if it is not an exact duplicate + # of one the user already has (including folder location), lets put it in the users bookmark list. + if {$url_p == 1} { + if { [db_string dp " + select count(bookmark_id) + from bm_bookmarks + where url_id = :url_id + and owner_id = :viewed_user_id + and parent_id = :parent_id"] != 0 } { + + lappend import_list "You already added: \"$local_title\"" + + } else { + + # try to insert bookmark into user's list + if [catch {db_dml bookmark_insert " + + declare + dummy_var integer; + begin + dummy_var := bookmark.new ( + bookmark_id => :bookmark_id, + owner_id => :viewed_user_id, + url_id => :url_id, + local_title => :local_title, + parent_id => :parent_id, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end;" } errmsg] { + + # if it was not a double click, produce an error + if { [db_string dbclick { + select count(bookmark_id) + from bm_bookmarks + where bookmark_id = :bookmark_id} ] == 0 } { + set n_errors 1 + set error_list [list "We were unable to create your user record in the database. Here's what the error looked like: +
      +
      +			    $errmsg
      +			    
      +
      "] + ad_return_template "error" + return + } else { + # assume this was a double click + ad_returnredirect $return_url + } + } else { + # insert into bm_bookmarks succeeded + lappend import_list "Inserting url:\"$local_title\"" + + set bookmark_id [db_nextval acs_object_id_seq] + } + } + } + } + } +} + + +ad_return_template Index: openacs-4/packages/bookmarks/www/bookmarks-most-popular.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-most-popular.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmarks-most-popular.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,7 @@ + +@page_title@ +@context_bar_args@ + + + + Index: openacs-4/packages/bookmarks/www/bookmarks-most-popular.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-most-popular.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmarks-most-popular.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,33 @@ +ad_page_contract { + List the most popular hosts and urls (includes the + most-popular-selection template). + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} -properties { + page_title:onevalue + context_bar_args:onevalue +} + +set page_title "Most Popular Bookmarks" + +set context_bar_args "\"$page_title\"" + + +ad_return_template + + + + + + + Index: openacs-4/packages/bookmarks/www/bookmarks-user-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-user-list.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmarks-user-list.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,24 @@ + +@page_title@ +@context_bar_args@ + + + + No other users have stored bookmarks on which you have read permission.

      + + +Look at the most popular bookmarks: summarized by URL or choose a user whose bookmarks you would like to view: + +

      + + + Index: openacs-4/packages/bookmarks/www/bookmarks-user-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/bookmarks-user-list.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/bookmarks-user-list.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,57 @@ +ad_page_contract { + Lists all users who have bookmarks in the system + accompanied by the number of bookmarks that are + readable by the browsing user. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} + +set page_title "View other users bookmarks" + +set context_bar_args "\"$page_title\"" + +set browsing_user_id [ad_conn user_id] + +set package_id [ad_conn package_id] + +db_multirow user_list bookmarks_of_other_users "select u.first_names, + u.last_name, + b.owner_id as viewed_user_id, + count(b.bookmark_id) as number_of_bookmarks + from cc_users u, (select bookmark_id, url_id, folder_p, owner_id from bm_bookmarks + start with parent_id = :package_id connect by prior bookmark_id = parent_id) b + where u.object_id = b.owner_id + and acs_permission.permission_p(b.bookmark_id, :browsing_user_id, 'read') = 't' + and b.owner_id <> :browsing_user_id + and b.folder_p = 'f' + and b.bookmark_id <> :package_id + group by u.first_names, + u.last_name, + b.owner_id + order by number_of_bookmarks desc" + + +ad_return_template + + + + + + + + + + + + + Index: openacs-4/packages/bookmarks/www/complaint.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/complaint.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/complaint.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,16 @@ + +Problem with Your Input + +We had + + a problem + + some problems + + processing your entry: + +
        + +
      • @error_list:item@ + +
      Index: openacs-4/packages/bookmarks/www/delete-dead-links.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/delete-dead-links.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/delete-dead-links.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,97 @@ +ad_page_contract { + deletes all occurrences of bookmarks with a dead url + + @param deleteable_link Contains bookmark ids to delete + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + deleteable_link:integer,notnull,multiple + {return_url:trim ""} + {viewed_user_id:integer ""} +} -return_errors error_list + +if { [info exists error_list] } { + set n_errors [llength $error_list] + ad_return_template "complaint" +} + +set package_id [ad_conn package_id] + +if { [empty_string_p $viewed_user_id] } { + # Only admins can call this page for all users + ad_require_permission $package_id admin + set root_folder_id $package_id + +} else { + # Only check urls belonging to the viewed user + set root_folder_id [bm_get_root_folder_id $package_id $viewed_user_id] + +} + +set browsing_user_id [ad_conn user_id] + +# Loop throught the bookmark_ids to delete +foreach url_id $deleteable_link { + + db_foreach bookmark_ids_for_url "select bookmark_id + from (select bookmark_id, url_id from bm_bookmarks + start with parent_id = :root_folder_id + connect by prior bookmark_id = parent_id) bm + where acs_permission.permission_p(bm.bookmark_id, :browsing_user_id, 'delete') = 't' + and bm.url_id = :url_id" { + + if [catch {db_exec_plsql delete_dead_link " + begin + bookmark.delete ( + bookmark_id => :bookmark_id + ); + end;"} errmsg] { + + set n_errors 1 + set error_list [list "We encountered an error while trying to process this DELETE: +
      $errmsg
      "] + ad_return_template "error" + return + } + } + + if { [empty_string_p $viewed_user_id] } { + ad_require_permission $package_id admin + + # Delete the url it self + if [catch {db_exec_plsql delete_dead_link " + begin + url.delete ( + url_id => :url_id + ); + end;"} errmsg] { + + set n_errors 1 + set error_list [list "We encountered an error while trying to process this DELETE: +
      $errmsg
      "] + ad_return_template "error" + return + } + } + +} + +ad_returnredirect $return_url?viewed_user_id=$viewed_user_id + + + + + + + + Index: openacs-4/packages/bookmarks/www/error.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/error.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/error.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,16 @@ + +Application Error + +We had + + a problem + + some problems + + processing your entry: + +
        + +
      • @error_list:item@ + +
      Index: openacs-4/packages/bookmarks/www/folder-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/folder-add-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/folder-add-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,53 @@ +ad_page_contract { + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + return_url + local_title:notnull + bookmark_id:integer + parent_id:integer + viewed_user_id:integer +} + + +# Insert the folder + +# First fetch necessary variables +set creation_ip [ad_conn peeraddr] +set user_id [ad_conn user_id] + +ad_require_permission $parent_id write + +set folder_p "t" +set closed_p "f" + +if [catch {db_exec_plsql bookmark_add " +declare +dummy_var integer; +begin +dummy_var := bookmark.new ( +bookmark_id => :bookmark_id, +owner_id => :viewed_user_id, +local_title => :local_title, +parent_id => :parent_id, +folder_p => :folder_p, +creation_user => :user_id, +creation_ip => :creation_ip +); +end;"} errmsg] { + + bm_handle_bookmark_double_click $bookmark_id $errmsg $return_url +} + + +ad_returnredirect $return_url Index: openacs-4/packages/bookmarks/www/folder-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/folder-add.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/folder-add.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,27 @@ + +@page_title@ +@context_bar_args@ + + +
      + + + + + + + + + + + + + + + + + + +
      Input Folder Name:
      Place in folder: +
      + Index: openacs-4/packages/bookmarks/www/folder-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/folder-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/folder-add.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,47 @@ +ad_page_contract { + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + return_url + {viewed_user_id:integer ""} + +} -properties { + page_title:onevalue + context_bar_args:onevalue + bookmark_id:onevalue + user_id:onevalue + viewed_user_id:onevalue + return_url:onevalue +} + +# If viewed_user_id was not provided the browsing user_id provides +# a good default +if { [empty_string_p $viewed_user_id] } { + set viewed_user_id [ad_conn user_id] +} + + +set page_title "Create Folder" + +set context_bar_args [bm_context_bar_args "\"$page_title\"" $viewed_user_id] +set user_id [ad_conn user_id] + +# get the next bookmark_id (used as primary key in bm_bookmarks) +set bookmark_id [db_nextval acs_object_id_seq] + + +ad_return_template + + + + Index: openacs-4/packages/bookmarks/www/folder-selection.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/folder-selection.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/folder-selection.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,26 @@ + + <% + if { [empty_string_p @default_id@] } { + set default_id @root_folder_id@ + } + set edit_form_option "\n" + + %> + + + + <% + append edit_form_option "\n" + + %> + + + <% + if {@folders:rowcount@ > 8} { + set size_count 8 + } else { + set size_count [expr @folders:rowcount@ + 1] + } + %> + + Index: openacs-4/packages/bookmarks/www/folder-selection.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/folder-selection.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/folder-selection.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,12 @@ + +# Get some data sources from the request processor +if { ![info exists viewed_user_id] } { + set viewed_user_id [ad_conn user_id] +} + +set package_id [ad_conn package_id] +set root_folder_id [bm_get_root_folder_id $package_id $viewed_user_id] + +# Get the folder list +bm_folder_selection $viewed_user_id $bookmark_id $folder_p + Index: openacs-4/packages/bookmarks/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/index.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,140 @@ + +@page_title@ +@context_bar_args@ + + +<% set folder_bgcolor [ad_parameter FolderBGColor bookmarks "#f3f3f3"] +set bookmark_bgcolor [ad_parameter BookmarkBGColor bookmarks "#ffffff"] +set edit_anchor "Edit" +set delete_anchor "Delete" + +set user_name_url [ad_urlencode @user_name@] +%> + + + + +[Add / Import | + +Export | + Create New Folder | +Check Links | +Javascript version | +View bookmarks of other users + | Manage access permissions on all bookmarks +] + +

      + + +Bookmarks Administration + + +

      + +Sort by: [ namename | +access dateaccess date + ] + +

      + +

      + + + + + +
      Bookmarks for @user_name@     +Close/Open All Folders
      + + + + + <% set decoration_open "" + set decoration_close "" + if { @bookmark.folder_p@ == "f" && [string compare @bookmark.last_checked_date@ @bookmark.last_live_date@] } { + append decoration_open "" + append decoration_close "" + } + + if {@bookmark.folder_p@ == "t"} { + append decoration_open "" + append decoration_close "" + } + + regsub -all {'|"} @bookmark.bookmark_title@ {} javascript_title + + set action_bar "" + + if { ![string equal @bookmark.admin_p@ "0"] } { + lappend action_bar "$edit_anchor" + } + if { ![string equal @bookmark.delete_p@ "0"] } { + lappend action_bar "$delete_anchor" + } + + if {@bookmark.folder_p@ == "f"} { + set url "bookmark-access?bookmark_id=@bookmark.bookmark_id@&url=[ad_urlencode @bookmark.complete_url@]" + set bgcolor $bookmark_bgcolor + set image_url "pics/ftv2doc.gif" + lappend action_bar "Details" + } else { + set bgcolor $folder_bgcolor + set url "toggle-open-close?bookmark_id=@bookmark.bookmark_id@&viewed_user_id=@viewed_user_id@&sort_by=@sort_by@&browsing_user_id=@browsing_user_id@" + + # different image_urls for whether or not the folder is open + if {@bookmark.closed_p@ == "t"} { + set image_url "pics/ftv2folderclosed.gif" + } elseif {@bookmark.closed_p@ == "f" } { + set image_url "pics/ftv2folderopen.gif" + } + } + + set action_bar [ad_decode $action_bar "" "" " \[ [join $action_bar " | "] \]"] + + set private_text [ad_decode @bookmark.private_p@ "t" "private" ""] + + %> + + + + + + + +
      height=1>@decoration_open@@bookmark.bookmark_title@@decoration_close@ @action_bar@ @private_text@
      + +
      + + + + + You don't have any bookmarks stored in the database.

      + + + This user has no bookmarks that you have permission to see. + + + +

      + + + +Search bookmarks for: +
      + +

      +Key to bookmark display: + + + + +
      • Unreachable links appear like this. These links may not be completely dead, but they were unreachable by our server on last attempt.
      + + +You need to login + +to this system to be able to +manage your bookmarks. However, without logging in you may view public bookmarks of registered users + Index: openacs-4/packages/bookmarks/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/index.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,150 @@ +ad_page_contract { + Entry page for the bookmarks module + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + viewed_user_id:integer,optional + {sort_by "name"} + +} -validate { + valid_user_id -requires {viewed_user_id:integerl} { + if { [empty_string_p [db_string user_exists "select 1 from parties where party_id = :viewed_user_id" -bind "viewed_user_id $viewed_user_id" -default ""]] } { + ad_complain "The user_id in the url is invalid" + } + } + +} -properties { + page_title:onevalue + context_bar_args:onevalue + bookmark:multirow + browsing_user_id:onevalue + viewed_user_id:onevalue + root_admin_p:onevalue + bookmarks_admin_p:onevalue + write_p:onevalue + sort_by:onevalue + user_name:onevalue + this_url_urlenc:onevalue + return_url_urlenc:onevalue +} + +set browsing_user_id [ad_conn user_id] + +# Is the user viewing his own bookmarks? +if { ![info exists viewed_user_id] || [string equal $viewed_user_id $browsing_user_id] } { + # The user is viewing his own bookmarks + set viewed_user_id $browsing_user_id + set context_bar_args "" +} + +set this_url_urlenc [ad_urlencode [ad_conn url]] + + +# To enable non-registered users to view registered users bookmarks (if they have +# permission) we use the session_id of these users as the id in the bm_in_closed_p +# table +set in_closed_p_id [ad_decode $browsing_user_id "0" [ad_conn session_id] $browsing_user_id] + + +# In case this is the first time the user views this bookmark tree +# we need to populate the table keeping track of which bookmarks are in +# closed folders +bm_initialize_in_closed_p $viewed_user_id $in_closed_p_id + +# When we are adding a bookmark we need to know which url to return to +# A bookmark can also be added via a Bookmarklet in which case return url +# will be the page that the user is browsing. +set return_url_urlenc [ad_urlencode [ad_conn url]?[export_url_vars viewed_user_id]] + +set user_name [db_string user_name "select first_names || ' ' || last_name from cc_users where object_id = :viewed_user_id" -bind "viewed_user_id $viewed_user_id" -default ""] + +set package_id [ad_conn package_id] + +set page_title [db_string bookmark_system_name "select acs_object.name(:package_id) from dual"] + +set context_bar_args [bm_context_bar_args "" $viewed_user_id] + +if { ![string equal $viewed_user_id "0"] } { + set root_folder_id [bm_get_root_folder_id [ad_conn package_id] $viewed_user_id] +} else { + set root_folder_id 0 +} + + +set root_admin_p [ad_permission_p $root_folder_id admin] +set bookmarks_admin_p [ad_permission_p $package_id admin] +set write_p [bm_user_can_write_in_some_folder_p $viewed_user_id] + +switch $sort_by { + "name" { + set index_order "/*+INDEX(bm_bookmarks bm_bookmarks_local_title_idx)*/" + } + + "access_date" { + set index_order "/*+INDEX_DESC(bm_bookmarks bm_bookmarks_access_date_idx)*/" + } + + #"creation_date" { + #set index_order "/*+INDEX_DESC(bm_bookmarks bm_bookmarks_creation_date_idx)*/" + #} + + default { + set index_order "" + } +} + +# We let the owner of the bookmarks see which bookmarks are private +if { [string equal $browsing_user_id $viewed_user_id] } { + set private_select ", bookmark.private_p(b.bookmark_id) as private_p" +} else { + set private_select ", 'f' as private_p" +} + +db_multirow bookmark bookmarks_select "select b.bookmark_id, +b.url_id, +b.local_title as bookmark_title, +u.complete_url, +u.last_live_date, +u.last_checked_date, +b.folder_p, +bm_in_closed_p.closed_p, +nvl(admin_view.object_id, 0) as admin_p, +nvl(delete_view.object_id,0) as delete_p, +b.lev as indentation +$private_select + +from bm_urls u, +(select $index_order bookmark_id, url_id, local_title, folder_p, level lev, parent_id, rownum ord_num +from bm_bookmarks start with bookmark_id = :root_folder_id connect by prior bookmark_id = parent_id) b, +bm_in_closed_p, +(select object_id from acs_object_party_privilege_map + where party_id in (:browsing_user_id, -1) and privilege = 'admin') admin_view, +(select object_id from acs_object_party_privilege_map + where party_id in (:browsing_user_id, -1) and privilege = 'delete') delete_view +where b.url_id = u.url_id (+) +and bm_in_closed_p.bookmark_id = b.bookmark_id +and bm_in_closed_p.in_closed_p = 'f' +and bm_in_closed_p.in_closed_p_id = :in_closed_p_id +and exists (select 1 from bm_bookmarks where exists (select 1 from acs_object_party_privilege_map where object_id = bookmark_id and party_id in (:browsing_user_id, -1) and privilege = 'read') start with bookmark_id = b.bookmark_id connect by prior bookmark_id = parent_id) +and b.bookmark_id <> :root_folder_id +and b.bookmark_id = admin_view.object_id(+) +and b.bookmark_id = delete_view.object_id(+) +order by ord_num" + + +ad_return_template + + + + + Index: openacs-4/packages/bookmarks/www/most-popular.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/most-popular.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/most-popular.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,22 @@ +

      Most Popular Hosts

      + + + +

      Most Popular URLs

      + + + + + Index: openacs-4/packages/bookmarks/www/most-popular.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/most-popular.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/most-popular.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,58 @@ +#Lists the most popular hosts and the most popular +#complete urls. To be included in other adp pages. +# +# by pmarklun@arsdigita.com + + +set maxrows [ad_parameter MostPopularHostsAndURLsMaxN] + +multirow create popular_hosts n_bookmarks host_url host_name +multirow create popular_urls n_bookmarks complete_url local_title + +set browsing_user_id [ad_conn user_id] + +set root_folder_id [ad_conn package_id] + +set count_select_query "(select count(*) from (select bookmark_id, url_id from bm_bookmarks + start with parent_id = :root_folder_id + connect by prior bookmark_id = parent_id) + where url_id = bm_urls.url_id + and acs_permission.permission_p(bookmark_id, :browsing_user_id, 'read') = 't')" + +# Get the most popular hosts +db_foreach popular_hosts " + select unique host_url, + $count_select_query as n_bookmarks + from bm_urls + order by n_bookmarks desc +" { + regsub {^http://([^/]*)/?} $host_url {\1} host_name + multirow append popular_hosts $n_bookmarks $host_url $host_name + + if { [multirow size popular_hosts] >= $maxrows } { + break + } +} + +# get the most popular urls +db_foreach popular_urls " + select nvl(url_title, complete_url) as local_title, + complete_url, + $count_select_query as n_bookmarks + from bm_urls + order by n_bookmarks desc +" { + multirow append popular_urls $n_bookmarks $complete_url $local_title + + if { [multirow size popular_urls] >= $maxrows } { + break + } +} + + + + + + + + Index: openacs-4/packages/bookmarks/www/one-host.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/one-host.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/one-host.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,15 @@ + +@page_title@ +@context_bar_args@ + + Index: openacs-4/packages/bookmarks/www/one-host.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/one-host.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/one-host.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,53 @@ +ad_page_contract { + Lists the urls and their users with a certain host name. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + + host_url:notnull + +} -properties { + page_title:onevalue + context_bar_args:onevalue + + user_urls:multirow +} + +set page_title "Bookmarks for $host_url" + +set context_bar_args "\[list \"most-popular\" \"Most Popular\"\] \"[ad_quotehtml $page_title]\"" + + +set old_name "" +db_multirow user_urls user_urls { + select u.first_names || ' ' || u.last_name as name, + bml.local_title, + complete_url + from cc_users u, + bm_bookmarks bml, + bm_urls bmu + where u.user_id = bml.owner_id + and bml.url_id = bmu.url_id + and bmu.host_url = :host_url + order by name +} + + +ad_return_template + + + + + + + Index: openacs-4/packages/bookmarks/www/permissions-reset-all-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/permissions-reset-all-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/permissions-reset-all-2.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,40 @@ +ad_page_contract { + This script removes all individual bookmark access + permission settings for the user. + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + root_folder_id:integer + viewed_user_id:integer +} + +ad_require_permission $root_folder_id admin + +set user_id [ad_conn user_id] +set package_id [ad_conn package_id] + + +db_dml delete_individual_permissions "delete from acs_permissions where object_id in (select bookmark_id from bm_bookmarks +start with parent_id = :root_folder_id +connect by prior bookmark_id = parent_id) +and grantee_id <> :viewed_user_id" + +db_dml turn_on_security_inheritance "update acs_objects set security_inherit_p = 't' +where object_id in (select bookmark_id from bm_bookmarks +start with parent_id = :root_folder_id +connect by prior bookmark_id = parent_id)" + +ad_returnredirect "index?viewed_user_id=$viewed_user_id" + + + + Index: openacs-4/packages/bookmarks/www/permissions-reset-all.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/permissions-reset-all.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/permissions-reset-all.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,20 @@ + +@page_title@ +@context_bar_args@ + +Are you sure that you want to delete the individual access permissions +on the following bookmarks to make your default (root) permissions apply? + +
        + +
      • @direct_permissions.local_title@ privatepublic
      • +
        +
      + +
      + + +
      + +
      +
      Index: openacs-4/packages/bookmarks/www/permissions-reset-all.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/permissions-reset-all.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/permissions-reset-all.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,51 @@ +ad_page_contract { + This page asks the user for a confirmation of whether to + remove all individual permissions on his bookmarks. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + root_folder_id:integer + public_p + viewed_user_id:integer + +} -properties { + page_title:onevalue + context_bar_args:onevalue + root_folder_id:onevalue + viewed_user_id:onevalue +} + +ad_require_permission $root_folder_id admin + +set page_title "Removal of Access Permission Settings" + +set context_bar_args "\[list bookmark-permissions?viewed_user_id=$viewed_user_id \"Manage Permissions on all Bookmarks\"\] \"$page_title\"" + + +db_multirow direct_permissions direct_bookmark_permissions {select bookmark_id, local_title from bm_bookmarks +where acs_permission.permission_p(bookmark_id, acs.magic_object_id('registered_users'), 'read') <> :public_p +start with parent_id = :root_folder_id +connect by prior bookmark_id = parent_id} + + +ad_return_template + + + + + + + + + + Index: openacs-4/packages/bookmarks/www/search.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/search.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/search.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,42 @@ + +@page_title@ +@context_bar_args@ + +<% set img_html "" +set edit_tag "Edit"%> + + + + +Here are your bookmarks that match your search: +

      + + +@img_html@ @my_list.title@    @edit_tag@
      + +
      + + +We couldn't find any matches among your bookmarks. + + + +

      + + +Here are other people's bookmarks that match your search: +

      + + +@img_html@ @others_list.title@     @edit_tag@
      + +
      + + +Your search returned zero matches in other bookmark lists. + + + + + + Index: openacs-4/packages/bookmarks/www/search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/search.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/search.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,129 @@ +ad_page_contract { + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + viewed_user_id:integer + return_url + search_text:notnull + +} -validate { + + no_just_wildcard -requires {search_text:notnull} { + if [regexp {^%+$} $search_text] { + ad_complain "Please search for more than just a wildcard." + } + } + +} -properties { + page_title:onevalue + context_bar_args:onevalue + search_text:onevalue + + return_url:onevalue + + browsing_user_id:onevalue + viewed_user_id:onevalue + + my_list:multirow + others_list:multirow + +} -return_errors error_list + +if { [info exists error_list] } { + set n_errors [llength $error_list] + ad_return_template "complaint" + return +} + +set page_title "Searching for \"$search_text\"" +set context_bar_args [bm_context_bar_args "\"[ad_quotehtml $page_title]\"" $viewed_user_id] + +set package_id [ad_conn package_id] + +set root_folder_id [bm_get_root_folder_id $package_id $viewed_user_id] + +set browsing_user_id [ad_conn user_id] + +set search_pattern "%[string toupper $search_text]%" + +multirow create my_list bookmark_id complete_url title +multirow create others_list bookmark_id complete_url title admin_p + + +# this select gets all of the users bookmarks that match the user's request +set bookmark_count 0 +set bookmark_html "" + +db_foreach bookmark_search_user { + select bookmark_id, + complete_url, + nvl(local_title, url_title) as title, + meta_keywords, + meta_description + from (select bookmark_id, url_id, local_title, folder_p, owner_id + from bm_bookmarks start with bookmark_id = :root_folder_id + connect by prior bookmark_id = parent_id) b, + bm_urls + where owner_id = :browsing_user_id + and folder_p = 'f' + and b.url_id = bm_urls.url_id + and b.bookmark_id <> :root_folder_id + and ( upper(local_title) like :search_pattern + or upper(url_title) like :search_pattern + or upper(complete_url) like :search_pattern + or upper(meta_keywords) like :search_pattern + or upper(meta_description) like :search_pattern) + order by title +} { + incr bookmark_count + + multirow append my_list $bookmark_id $complete_url $title + +} + + +# thie query searches across other peoples bookmarks that the browsing user +# has read permission on + +set bookmark_count 0 +set bookmark_html "" + +db_foreach bookmark_search_other { + select distinct complete_url, + bookmark_id, + nvl(local_title, url_title) as title, + meta_keywords, + meta_description, + folder_p, + acs_permission.permission_p(bookmark_id, :browsing_user_id, 'admin') as admin_p + from (select bookmark_id, url_id, local_title, folder_p, owner_id + from bm_bookmarks start with bookmark_id in (select bookmark_id + from bm_bookmarks where parent_id = :package_id) + connect by prior bookmark_id = parent_id) b, + bm_urls + where owner_id <> :browsing_user_id + and acs_permission.permission_p(bookmark_id, :browsing_user_id, 'read') = 't' + and folder_p = 'f' + and b.url_id = bm_urls.url_id + and ( upper(local_title) like :search_pattern + or upper(url_title) like :search_pattern + or upper(complete_url) like :search_pattern + or upper(meta_keywords) like :search_pattern + or upper(meta_description) like :search_pattern) + order by title +} { + multirow append others_list $bookmark_id $complete_url $title $admin_p +} + + +ad_return_template Index: openacs-4/packages/bookmarks/www/toggle-open-close.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/toggle-open-close.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/toggle-open-close.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,86 @@ +ad_page_contract { + This script will toggle the openness of folders. The parameter action + is provided to indicate open/close when all folders are to be opened/closed. + In case only one folder is to be open/closed the bookmark_id of that folder + should be provided. Note that we need the browsing_user_id to enable multiple + users to concurrently open close the same folders without disturbing eachother. + + @param bookmark_id If bookmark_id is provided, then the folder with that id + is toggled. + + @param action Allowed values are close_all and open_all. If this + parameter is provided then all folders of the user will be toggled. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + {bookmark_id:integer ""} + {action ""} + viewed_user_id:integer + sort_by +} + +set browsing_user_id [ad_conn user_id] + +if { ![empty_string_p $bookmark_id] } { + # Toggle one folder + + db_exec_plsql toggle_open_close " + begin + bookmark.toggle_open_close( + bookmark_id => :bookmark_id, + browsing_user_id => :browsing_user_id + ); + end;" +} elseif { [string equal $action "open_all"] || [string equal $action "close_all"] } { + # Toggle all folders + + set closed_p [ad_decode $action "open_all" "f" "t"] + set package_id [ad_conn package_id] + + db_exec_plsql toggle_open_close_all " + begin + bookmark.toggle_open_close_all( + browsing_user_id => :browsing_user_id, + closed_p => :closed_p, + root_id => bookmark.get_root_folder( + package_id => :package_id, + user_id => :viewed_user_id + ) + ); + end;" + +} else { + # Application error + # Either bookmark_id or action must be provided + + set n_errors 1 + set error_list [list "Missing form variables. Exactly one of bookmark_id and action + must be provided"] + ad_return_template "error" + return +} + + +ad_returnredirect "index?viewed_user_id=$viewed_user_id&sort_by=$sort_by" + + + + + + + + + + + + Index: openacs-4/packages/bookmarks/www/top-frame.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/top-frame.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/top-frame.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,62 @@ +ad_page_contract { + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + viewed_user_id:integer + write_p +} + +set browsing_user_id [ad_conn user_id] + +set return_url [ad_urlencode "tree-frame?viewed_user_id=$viewed_user_id"] + +doc_return 200 text/html " + + + +

      +
      +[export_form_vars viewed_user_id] + +[ad_decode $write_p "t" "" ""] +[ad_decode $browsing_user_id $viewed_user_id "" ""] +[ad_decode $write_p "t" "" ""] + +
      Add/ImportExportNew Folder
      + + + + + + + + +
      RefreshMainSearch
      +
      " + + + + + + + + + + + + + + Index: openacs-4/packages/bookmarks/www/tree-dynamic.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/tree-dynamic.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/tree-dynamic.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,94 @@ +# /www/bookmarks/tree-dynamic.tcl + +ad_page_contract { + + Javascript tree data builder + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + viewed_user_id:integer +} + +set user_id [ad_verify_and_get_user_id] + +# time +# we get this time variable only so that certain browsers (internet explorer, for instance) +# will not try to cache this page. + +# get generic display parameters from the .ini file +set folder_decoration [ad_parameter FolderDecoration bm] +set hidden_decoration [ad_parameter HiddenDecoration bm] +set dead_decoration [ad_parameter DeadDecoration bm] + +set name [db_string name_query " +select first_names||' '||last_name as name +from cc_users +where user_id = :user_id"] + +append js " +USETEXTLINKS = 1 +aux0 = gFld(\"Bookmarks for $name\",\"\") +" + +set root_id [bm_get_root_folder_id [ad_conn package_id] $viewed_user_id] + +db_foreach bookmark_items { + select b.bookmark_id, + b.url_id, + b.local_title, + last_live_date, + last_checked_date, + b.parent_id, + complete_url, + b.folder_p + from (select /*+INDEX(bm_bookmarks bm_bookmarks_local_title_idx)*/ + bookmark_id, url_id, local_title, folder_p, + level lev, parent_id, owner_id, rownum as ord_num + from bm_bookmarks start with bookmark_id = :root_id + connect by prior bookmark_id = parent_id) b, + bm_urls + where exists (select 1 from bm_bookmarks where acs_permission.permission_p(bookmark_id, :user_id, 'read') = 't' + start with bookmark_id = b.bookmark_id connect by prior bookmark_id = parent_id) + and b.bookmark_id <> :root_id + and b.url_id = bm_urls.url_id(+) + order by ord_num +} { + + # In the ACS3 version parent_id empty meant root - I am setting parent_id + # to empty string here to make the old code work (pmarklun@arsdigita.com) + if { [string equal $parent_id $root_id] } { + set parent_id "0" + } + + # decoration refers to color and font of the associated text + set decoration "" + + # make dead links appear as definied in the .ini file + if {$last_checked_date != $last_live_date} { + append decoration $dead_decoration + } + + # make folder titles appear as definied in the .ini file + if {$folder_p == "t"} { + append decoration $folder_decoration + } + + + if {$folder_p == "t"} { + append js "aux$bookmark_id = insFld(aux$parent_id, gFld(\"[philg_quote_double_quotes [string trim $local_title]]\", \"$decoration\", $bookmark_id))\n" + } else { + append js "aux$bookmark_id = insDoc(aux$parent_id, gLnk(1, \"[philg_quote_double_quotes [string trim $local_title]]\",\"[string trim [philg_quote_double_quotes $complete_url]]\",\"$decoration\", $bookmark_id))\n" + } +} + +doc_return 200 text/html "$js" Index: openacs-4/packages/bookmarks/www/tree-frame.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/tree-frame.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/tree-frame.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,49 @@ +ad_page_contract { + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} { + viewed_user_id:integer +} + +set return_url [ad_urlencode "tree-frame?viewed_user_id=$viewed_user_id"] + +set page_content " + + + + + + + + + + + + + + +" + +doc_return 200 text/html "$page_content" + + + + + + + + + + + Index: openacs-4/packages/bookmarks/www/tree-static.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/tree-static.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/tree-static.js 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,474 @@ +// You are free to copy the "Folder-Tree" script as long as you +// keep this copyright notice: +// Script found in: http://www.geocities.com/Paris/LeftBank/2178/ +// Author: Marcelino Alves Martins (martins@hks.com) December '97. +//**************************************************************** + +//Log of changes: +// 17 Feb 98 - Fix initialization flashing problem with Netscape +// +// 27 Jan 98 - Root folder starts open; support for USETEXTLINKS; +// make the ftien4 a js file +// + + +// Definition of class Folder +// ***************************************************************** + +function Folder(folderDescription, hreference, decoration, key) //constructor +{ + //constant data + this.desc = folderDescription + this.hreference = hreference + this.decoration = decoration + this.key = key + this.id = -1 + this.navObj = 0 + this.iconImg = 0 + this.nodeImg = 0 + this.isLastNode = 0 + + //dynamic data + this.isOpen = true + this.iconSrc = "pics/ftv2folderopen.gif" + this.children = new Array + this.nChildren = 0 + + //methods + this.initialize = initializeFolder + this.setState = setStateFolder + this.addChild = addChild + this.createIndex = createEntryIndex + this.hide = hideFolder + this.display = display + this.renderOb = drawFolder + this.totalHeight = totalHeight + this.subEntries = folderSubEntries + this.outputLink = outputFolderLink +} + +function setStateFolder(isOpen) +{ + var subEntries + var totalHeight + var fIt = 0 + var i=0 + + if (isOpen == this.isOpen) + return + + if (browserVersion == 2) + { + totalHeight = 0 + for (i=0; i < this.nChildren; i++) + totalHeight = totalHeight + this.children[i].navObj.clip.height + subEntries = this.subEntries() + if (this.isOpen) + totalHeight = 0 - totalHeight + for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) + indexOfEntries[fIt].navObj.moveBy(0, totalHeight) + } + this.isOpen = isOpen + propagateChangesInState(this) +} + +function propagateChangesInState(folder) +{ + var i=0 + + if (folder.isOpen) + { + if (folder.nodeImg) + if (folder.isLastNode) + folder.nodeImg.src = "pics/ftv2mlastnode.gif" + else + folder.nodeImg.src = "pics/ftv2mnode.gif" + folder.iconImg.src = "pics/ftv2folderopen.gif" + for (i=0; i 0) + auxEv = "" + else + auxEv = "" + + if (level>0) + if (lastNode) //the last 'brother' in the children array + { + this.renderOb(leftSide + auxEv + "") + leftSide = leftSide + "" + this.isLastNode = 1 + } + else + { + this.renderOb(leftSide + auxEv + "") + leftSide = leftSide + "" + this.isLastNode = 0 + } + else + this.renderOb("") + + if (nc > 0) + { + level = level + 1 + for (i=0 ; i < this.nChildren; i++) + { + if (i == this.nChildren-1) + this.children[i].initialize(level, 1, leftSide) + else + this.children[i].initialize(level, 0, leftSide) + } + } +} + +function drawFolder(leftSide) +{ + if (browserVersion == 2) { + if (!doc.yPos) + doc.yPos=8 + doc.write("") + } + + doc.write("") + doc.write("") + doc.write("
      ") + doc.write(leftSide) + this.outputLink() + doc.write("") + doc.write("") + if (USETEXTLINKS) + { + this.outputLink() + if (this.id>0) + { + doc.write(""+this.decoration+this.desc + " (edit)") + } else { + doc.write(""+this.decoration+this.desc + "") + } + + } + else + doc.write(this.desc) + doc.write("
      ") + + if (browserVersion == 2) { + doc.write("
      ") + } + + if (browserVersion == 1) { + this.navObj = doc.all["folder"+this.id] + this.iconImg = doc.all["folderIcon"+this.id] + this.nodeImg = doc.all["nodeIcon"+this.id] + } else if (browserVersion == 2) { + this.navObj = doc.layers["folder"+this.id] + this.iconImg = this.navObj.document.images["folderIcon"+this.id] + this.nodeImg = this.navObj.document.images["nodeIcon"+this.id] + doc.yPos=doc.yPos+this.navObj.clip.height + } +} + +function outputFolderLink() +{ + if (this.hreference) + { + doc.write(" 0) + doc.write("onClick='javascript:clickOnFolder("+this.id+")'") + doc.write(">") + } + else +// doc.write("") + doc.write("") +} + +function addChild(childNode) +{ + this.children[this.nChildren] = childNode + this.nChildren++ + return childNode +} + +function folderSubEntries() +{ + var i = 0 + var se = this.nChildren + + for (i=0; i < this.nChildren; i++){ + if (this.children[i].children) //is a folder + se = se + this.children[i].subEntries() + } + + return se +} + + +// Definition of class Item (a document or link inside a Folder) +// ************************************************************* + +function Item(itemDescription, itemLink, decoration, key) // Constructor +{ + // constant data + this.desc = itemDescription + this.link = itemLink + this.decoration = decoration + this.key = key + this.id = -1 //initialized in initalize() + this.navObj = 0 //initialized in render() + this.iconImg = 0 //initialized in render() + this.iconSrc = "pics/ftv2doc.gif" + + // methods + this.initialize = initializeItem + this.createIndex = createEntryIndex + this.hide = hideItem + this.display = display + this.renderOb = drawItem + this.totalHeight = totalHeight +} + +function hideItem() +{ + if (browserVersion == 1) { + if (this.navObj.style.display == "none") + return + this.navObj.style.display = "none" + } else { + if (this.navObj.visibility == "hiden") + return + this.navObj.visibility = "hiden" + } +} + +function initializeItem(level, lastNode, leftSide) +{ + this.createIndex() + + if (level>0) + if (lastNode) //the last 'brother' in the children array + { + this.renderOb(leftSide + "") + leftSide = leftSide + "" + } + else + { + this.renderOb(leftSide + "") + leftSide = leftSide + "" + } + else + this.renderOb("") +} + +function drawItem(leftSide) +{ + if (browserVersion == 2) + doc.write("") + + doc.write("") + doc.write("
      ") + doc.write(leftSide) + doc.write("") + doc.write("") + doc.write("") + doc.write("") + if (USETEXTLINKS) + doc.write("" +this.decoration + this.desc + " (edit)") + else + doc.write(this.desc) + doc.write("
      ") + + if (browserVersion == 2) + doc.write("
      ") + + if (browserVersion == 1) { + this.navObj = doc.all["item"+this.id] + this.iconImg = doc.all["itemIcon"+this.id] + } else if (browserVersion == 2) { + this.navObj = doc.layers["item"+this.id] + this.iconImg = this.navObj.document.images["itemIcon"+this.id] + doc.yPos=doc.yPos+this.navObj.clip.height + } +} + + +// Methods common to both objects (pseudo-inheritance) +// ******************************************************** + +function display() +{ + if (browserVersion == 1) + this.navObj.style.display = "block" + else + this.navObj.visibility = "show" +} + +function createEntryIndex() +{ + this.id = nEntries + indexOfEntries[nEntries] = this + nEntries++ +} + +// total height of subEntries open +function totalHeight() //used with browserVersion == 2 +{ + var h = this.navObj.clip.height + var i = 0 + + if (this.isOpen) //is a folder and _is_ open + for (i=0 ; i < this.nChildren; i++) + h = h + this.children[i].totalHeight() + + return h +} + + +// Events +// ********************************************************* + +function clickOnFolder(folderId) +{ + var clicked = indexOfEntries[folderId] + + if (!clicked.isOpen) + clickOnNode(folderId) + + return + + if (clicked.isSelected) + return +} + +function clickOnNode(folderId) +{ + var clickedFolder = 0 + var state = 0 + + clickedFolder = indexOfEntries[folderId] + state = clickedFolder.isOpen + + clickedFolder.setState(!state) //open<->close +} + +function initializeDocument() +{ + if (doc.all) + browserVersion = 1 //IE4 + else + if (doc.layers) + browserVersion = 2 //NS4 + else + browserVersion = 0 //other + + aux0.initialize(0, 1, "") + aux0.display() + + if (browserVersion > 0) + { + doc.write(" ") + + // close the whole tree + clickOnNode(0) + // open the root folder + clickOnNode(0) + } +} + +// Auxiliary Functions for Folder-Treee backward compatibility +// ********************************************************* + +function gFld(description, decoration, key, hreference) +{ + folder = new Folder(description, hreference, decoration, key) + return folder +} + +function gLnk(target, description, linkData, decoration, key) +{ + fullLink = "" + + if (target==0) + { + fullLink = "'"+linkData+"' target=\"basefrm\"" + } + else + { + if (target==1) + fullLink = "'"+linkData+"' target=target_frame" + else + fullLink = "'"+linkData+"' target=\"basefrm\"" + } + + linkItem = new Item(description, fullLink, decoration, key) + return linkItem +} + +function insFld(parentFolder, childFolder) +{ + return parentFolder.addChild(childFolder) +} + +function insDoc(parentFolder, document) +{ + parentFolder.addChild(document) +} + +// Global variables +// **************** + +USETEXTLINKS = 1 +indexOfEntries = new Array +nEntries = 0 +doc = document +browserVersion = 0 +selectedFolder=0 + Index: openacs-4/packages/bookmarks/www/tree.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/tree.css,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/tree.css 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,3 @@ +BODY {background-color: white} +A {text-decoration: none; color: #0000bb} +A:hover {text-decoration: underline} Index: openacs-4/packages/bookmarks/www/tree.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/tree.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/tree.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,24 @@ +ad_page_contract { + +} { + viewed_user_id:integer + user_name + write_p +} + + +doc_return 200 text/html " + + + Bookmarks for $user_name + + + + + + + + + +" + Index: openacs-4/packages/bookmarks/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/admin/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/admin/index.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,10 @@ + +@page_title@ +@context_bar_args@ + +
      + Index: openacs-4/packages/bookmarks/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/admin/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/admin/index.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,34 @@ +ad_page_contract { + Entry page for the admin pages of the bookmarks module. + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} -properties { + page_title:onevalue + context_bar_args:onevalue +} + +# Do we have to check for admin permissions here? + +set page_title "Bookmarks System Administration" + +set context_bar_args "" + + +ad_return_template + + + + + + + Index: openacs-4/packages/bookmarks/www/admin/site-info.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/admin/site-info.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/admin/site-info.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,6 @@ + +@page_title@ +@context_bar_args@ + + + Index: openacs-4/packages/bookmarks/www/admin/site-info.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/admin/site-info.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/admin/site-info.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,31 @@ +ad_page_contract { + + Credit for the ACS 3 version of this module goes to: + @author David Hill (dh@arsdigita.com) + @author Aurelius Prochazka (aure@arsdigita.com) + + The upgrade of this module to ACS 4 was done by + @author Peter Marklund (pmarklun@arsdigita.com) + @author Ken Kennedy (kenzoid@io.com) + in December 2000. + + @creation-date December 2000 + @cvs-id $Id: +} -properties { + page_title:onevalue + context_bar_args:onevalue +} + +set page_title "Checking urls and getting url meta info" + +set context_bar_args "\$page_title\"" + + +ad_return_template + + + + + + + Index: openacs-4/packages/bookmarks/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/doc/index.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bookmarks/www/doc/index.html 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,172 @@ + + +ACS Bookmarks Release 4.1.1b + + +

      ACS Bookmarks Release 4.1.1b

      +by Peter Marklund +on the 26:th of February 2001 +
      + +

      Introduction

      +This is a web application that runs on top of the ArsDigita Community System. The ACS Bookmarks application enables bookmarks to be accessed from any web browser on any computer. The sharing of bookmarks between community members is also supported. The application is distributed under the GNU publich licence from the ArsDigita Community System Repository. + +

      Feature Overview

      +The ACS Bookmarks module enables web access to bookmarks that are normally stored in the browser on a desktop computer. Bookmarks are urls with metadata attached to them, they are called Favorites in the Internet Explorer browser. The obvious advantage of storing bookmarks on the web is that you may access your collection of favorite urls from any computer connected to the web. Another important feature of the Bookmarks module is that it lets you view the bookmarks of your fellow community members and the most popular urls in the community. Here is an overview of the key features of the Bookmarks module: + +
        +
      • Adding Bookmarks +
          +
        • Bookmarks may be exported from/to Netscape bookmarks file format (readable also by the Internet Explorer browser).
        • + +
        • Bookmarks may be added easily during web browsing with the help of a Bookmarklet (a Bookmark in the browser that contains Javascript instead of a url).
        • +
        +
      • + +
      • Viewing Bookmarks +
          +
        • Bookmarks are viewed in a tree structure with folders that may be opened and collapsed (like in a window file browser). The bookmark tree may be sorted by name or by access date. Alternatively the bookmarks can be viewed in a Javascript format.
        • +
        • It is possible to view the bookmark tree of any fellow community member as well as the most popular hosts and urls in the community
        • +
        • Keyword search is supported. In this search not only the urls and their titles will be used, but also any keywords and descriptions of urls that have been fetched from the html pages of those urls.
        • +
        + +
      • + +
      • Maintaining Bookmarks +
          +
        • It is possible to check if URLs are alive so that non-responding URLs can be deleted.
        • +
        • The user may to edit, move or delete any folder or bookmark in his tree.
        • +
        +
      • + +
      + +

      Dependencies

      +This version of the Bookmarks module requires the ArsDigita Community System versions 4.1.X or 4.0.X. + +

      Version History

      +The following versions have been released so far for the the ACS 4.x TCL platform: +
        +
      • bookmarks-4.0a (Dec 14, 2000) +
      • bookmarks-4.01a (Jan 09, 2001) +
      • bookmarks-4.1.1b This version includes a number of bugfixes and minor improvements over the previous one. Three of the most severe bugs in the alpha versions that have been fixed are: +
          +
        • When two users were viewing the same bookmarks tree one user opening or closing folders would affect the view of the other user.
        • +
        • The page displaying the most popular URLs displayed incorrect numbers.
        • +
        • The checking of URLs was done on a bookmarks basis leading to URLs being checked more than once.
        • +
        + +
      + +

      Upgrade Instructions

      +I have not prepared any data model upgrade scripts for the alpha +versions. If you feel that you have the need for such an upgrade please let me know. If you +don't have too many users in your system you can export their +bookmarks manually to Netscape format files. Then you have to delete +the package (make sure that the drop script gets run) and then install +the new version of the bookmarks module (make sure that you have the +new source code and that the create script gets run). + +

      Feedback and Bugreports

      +Bugs and enhancement requests should be submitted to the ArsDigita SDM. + +

      Community of Contributors and Testers

      +Here is a list of people who have contributed with ideas and testing of the bookmarks module: + + +If your are using the bookmarks module and have any ideas of how it +could be improved - please contact me! + + +

      Requirements

      +Although a separate document with formal requirements have not yet been written almost all requirements may be derived from the test protocol below. + +

      Test Protocol for version 4.1.1b

      +This Bookmark release has been rigorously tested according to the +protocol below. +During the test I was logged in simultaneously with three different +users, two bookmark users (Joe and Jane) and one bookmarks admin (George). + +
        +
      1. I installed the bookmarks module from the apm file on top of a +fresh ACS 4.1.1 installation.
      2. +
      3. I mounted a bookmarks instance called "Main Bookmarks" under the +main site and another bookmarks instance called "Sub Bookmarks" under a subsite
      4. +
      5. Added some bookmarks for George admin and verified that the +content in different instances is separated. +
      6. Tried to add a non-existant url. A warning was issued but the +bookmark could still be added.
      7. +
      8. Tried adding a responding url without title. The application tries +to fetch the title from the web page.
      9. +
      10. On the bookmark-add page it is possible to create a new folder +that may be placed inside another folder.
      11. +
      12. Single bookmarks as well as non-empty folders can be deleted.
      13. +
      14. For every bookmark a details page showing html title, keywords and +description fetched from the html page of that URL may be viewed.
      15. +
      16. A tree of bookmarks may be imported/exported from/to a Netscape format +bookmarks file. Exporting a bookmark structure that has been imported +I end up with a Netscape file with identical structure to the one that +was imported.
      17. +
      18. When browsing the web bookmarks may be added easily to the +bookmarks module wihout interrupting the web browsing too much. This +is achieved by the use of a Bookmarklet (a browser bookmark that +contains Javascript). This Bookmarklet may be added to the +browser toolbar so that everytime the user comes across a page that he +wants to bookmark all he has to do is click on a button in the toolbar +and he is given the possibility to enter a title and choose a folder +for the bookmark whereafter he is redirected back to the web page he +was viewing.
      19. +
      20. Bookmarks may be sorted by name or by access date
      21. +
      22. An administrator may check all urls in the system (in one +package instance) and may opt to delete those that are not +responding. Every user may check his own bookmarks
      23. +
      24. The url and title of bookmarks may be edited.
      25. +
      26. Bookmarks and folders may be moved to a different folder
      27. +
      28. A bookmark may be marked as private in which case only the owner of +the bookmark may view it. If a folder is marked as private it means +that all contained bookmarks and folders are private. If a bookmark is not marked as private it +will per default have the same permissions as the bookmarks package +instance. Bookmarks and folders inherit permissions from their parent +folder and the root folder of a user inherits permissions from the bookmark package instance.
      29. +
      30. Any user can view the non-private part of any other users bookmark +tree.
      31. +
      32. It is possible to see a list of the domains that have the most +bookmarks in the system as well as a list of the urls that have been +bookmarked most times.
      33. +
      34. I dropped the bookmarks package (sourced bookmarks-drop.sql) and +then recreated it (sourced bookmarks-create.sql). There were no error messages and the application was fully +functional again.
      35. +
      36. Two users can close/open the same folder without affecting +eachother. Also tested what happens to the view of the other user if +one of the users moves a folder or adds a folder.
      37. +
      38. Tested all links in the Javascript version
      39. +
      40. Removed all debugging print outs
      41. +
      + +

      Ideas for Future Improvements

      +

      Collaboration and Metadata

      +It is planned to make the bookmarks application more rich with metadata and more collaborative with the followoing additions: +
        +
      • General comments on urls +
      • Possibility to add keywords for bookmarks +
      • Shared hierarchical categorization of urls. It will be possible to browse all urls in the system by these categories. +
      • Rating of urls +
      • Possibility to easily view all fellow users meta data about a url +
      +With these additions the bookmarks module will evolve beyond being merely a web storage of bookmarks to being a tool for collaboratively categorizing and adding metadata to the web. + +

      Scalability

      +The tree view of bookmarks does not scale very well - closing and opening folders becomes impractible with for example 200 bookmarks (however the bookmarks may still be viewed and used). Users who have this many bookmarks can preferably use the Javascript version. Load tests have shown that the Bookmarks module can not handle thousends of bookmarks for a single user. Future versions will try to address these cases with a viewing mode different from the current tree view. + +
      +
      pmarklun@arsdigita.com
      + + + Index: openacs-4/packages/bookmarks/www/pics/docqmark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/docqmark.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/folderqmark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/folderqmark.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/ftv2blank.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/ftv2blank.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/ftv2doc.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/ftv2doc.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/ftv2folderclosed.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/ftv2folderclosed.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/ftv2folderopen.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/ftv2folderopen.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/ftv2lastnode.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/ftv2lastnode.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/ftv2link.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/ftv2link.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/ftv2mlastnode.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/ftv2mlastnode.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/ftv2mnode.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/ftv2mnode.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/ftv2node.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/ftv2node.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/ftv2plastnode.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/ftv2plastnode.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/ftv2pnode.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/ftv2pnode.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/ftv2vertline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/ftv2vertline.gif,v diff -u -N Binary files differ Index: openacs-4/packages/bookmarks/www/pics/spacer.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/www/pics/spacer.gif,v diff -u -N Binary files differ Index: openacs-4/packages/chat/chat.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/chat.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/chat.info 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,109 @@ + + + + + Chat + Chats + f + + + + oracle + postgresql + + David Dao + This is a chat application + 2001-01-18 + ArsDigita Corporation + ACS Chat is now support both HTML client and Java applet client. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/chat/conf/jni_chat_server.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/conf/jni_chat_server.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/conf/jni_chat_server.xml 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/chat/conf/jni_chat_workers.properties =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/conf/jni_chat_workers.properties,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/conf/jni_chat_workers.properties 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,70 @@ + +# +# Sample worker configuration file with a jni worker +# +# You will probably need to update your tomcat +# root directory and JVM library path +# +# You should begin by replacing any occurrence of d:\tomcat with +# your own tomcat root. Following that replace path starting with +# d:\sdk\jdk1.2.2\ with your own java home. +# +worker.list=jni + +worker.jni.type=jni + +# +# Additional class path components. +# +# worker.jni.class_path=d:\tomcat\classes +worker.jni.class_path=/web/david/jakarta-tomcat/lib/xml.jar +worker.jni.class_path=/web/david/jakarta-tomcat/lib/jasper.jar +worker.jni.class_path=/web/david/jakarta-tomcat/lib/servlet.jar +worker.jni.class_path=/web/david/jakarta-tomcat/lib/webserver.jar +worker.jni.class_path=/usr/java1.2/lib/tools.jar +worker.jni.class_path=/ora8/m01/app/oracle/product/8.1.6/jdbc/lib/classes111.zip +worker.jni.class_path=/ora8/m01/app/oracle/product/8.1.6/jdbc/lib/jndi.zip +# worker.jni.class_path=d:\SQLLIB\java\db2java.zip + +# +# Setting the command line for tomcat +# +worker.jni.cmd_line=-config +worker.jni.cmd_line=/web/david/packages/chat/conf/jni_chat_server.xml + +# +# The JVM that we are about to use +# +# This is for jdk1.2.x +# +worker.jni.jvm_lib=/usr/java1.2/jre/lib/sparc/libjvm.so +# +# And this is for jdk1.1.7 +# +#worker.jni.jvm_lib=d:\sdk\jdk1.1.7\bin\javai.dll +# + +# +# Setting the place for the stdout and stderr of tomcat +# +worker.jni.stdout=/home/nsadmin/log/david-jvm.stdout +worker.jni.stderr=/home/nsadmin/log/david-jvm.stderr + +# +# Setting the tomcat.home Java property +# +worker.jni.sysprops=tomcat.home=/web/david/jakarta-tomcat + +# +# Java system properties +# +# worker.jni.sysprops=java.compiler=NONE +# worker.jni.sysprops=myprop=mypropvalue + +# +# Additional path components. +# +# worker.jni.ld_path=d:\SQLLIB\bin +# + + Index: openacs-4/packages/chat/java/adChatApplet.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adChatApplet.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adChatApplet.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,416 @@ +import java.io.*; +import java.net.*; +import java.util.*; +import java.awt.*; +import java.awt.event.*; +import java.applet.*; + +/** + * Applet client. + * + * @author David Dao (ddao@arsdigita.com) + * @creation-date November 17, 2000 + * @cvs-id $Id: adChatApplet.java,v 1.1 2001/04/20 20:51:08 donb Exp $ + * + * + * + * + * + */ +public class adChatApplet extends Applet implements ActionListener, adChatClient{ + + //private TextArea text_area = null; + private Panel text_area_panel = null; + private ScrollPane text_area = null; + private TextField text_field = null; + private Button send_button = null; + private Button logoff_button = null; + private Button private_button = null; + private Button ignore_button = null; + + private adChatterList chatter_list = null; + private adChatClientListener listener = null; + private adChatClientInfo client_info = null; + private String user_id; + private String user_name; + private String room_id; + + private boolean moderated_room; + + private int format_msg_width; + private Dimension applet_size = null; + + private static int GAP = 5; + + // Key for this hash table is from_user_id:to_user_id + private Hashtable private_chat_frames = null; + // Key for this hash table is user_id + private Hashtable ignore_user_list = null; + + private Hashtable moderate_msgs = null; + + /** + * Initialize applet. + */ + public void init() { + super.init(); + + /** + * Getting server information. + */ + client_info = new adChatClientInfo(); + client_info.host = getParameter("host"); + client_info.port = Integer.parseInt(getParameter("port")); + + + //client_info.host = "localhost"; + //client_info.port = 8202; + + /** + * First get user_id, user_name, room_id + */ + client_info.user_id = getParameter("user_id"); + client_info.user_name = getParameter("user_name"); + client_info.room_id = getParameter("room_id"); + + // Temporary store moderator value in the applet. + if (getParameter("moderator") != null) + client_info.moderator = true; + + //client_info.user_id = "1"; + //client_info.user_name = "David"; + //client_info.room_id = "1"; + + applet_size = getSize(); + + private_chat_frames = new Hashtable(); + ignore_user_list = new Hashtable(); + moderate_msgs = new Hashtable(); + + /** + * Calculate dimension for each chat component. + */ + int text_field_height = 40; + int text_area_width = (applet_size.width - 3 * GAP ) * 7 / 10; + + int text_area_height = applet_size.height - 3 * GAP - text_field_height; + int text_area_x = GAP; + int text_area_y = GAP; + + format_msg_width = text_area_width; + + int text_field_width = text_area_width; + int text_field_x = GAP; + int text_field_y = text_area_y + text_area_height + GAP; + + int chat_list_width = (applet_size.width - 3 * GAP) * 3 / 10; + int chat_list_height = text_area_height - 30; + int chat_list_x = text_area_x + text_area_width + GAP; + int chat_list_y = GAP; + + int private_button_x = chat_list_x; + int private_button_y = chat_list_y + chat_list_height + GAP; + int private_button_width = 30; + int private_button_height = 25; + + int ignore_button_width = 40; + int ignore_button_height = 25; + int ignore_button_x = chat_list_x + private_button_width + GAP; + int ignore_button_y = private_button_y; + + int send_button_x = chat_list_x; + int send_button_y = text_field_y; + int send_button_width = 40; + int send_button_height = text_field_height; + + int logoff_button_width = 50; + int logoff_button_height = text_field_height; + int logoff_button_x = applet_size.width - GAP - logoff_button_width; + int logoff_button_y = text_field_y; + + /** + * End calculate dimension. + */ + + // Just a quick solution to support moderate chat. Need to plan this more careful. + + if (getParameter("room_moderated") == null) + moderated_room = false; + else + moderated_room = true; + /* + if (getParameter("moderator") == null) + moderator = false; + else + moderator = true; + */ + + /** + * GUI Layout Design + */ + setLayout(null); + text_area = new ScrollPane(); + //text_area = new TextArea(); + //text_area.setEditable(false); + text_area.setBounds(text_area_x, text_area_y, text_area_width, text_area_height); + text_area.setBackground(Color.white); + + text_area_panel = new Panel(); + text_area_panel.setLayout(new OneColumnLayout()); + //text_area_panel.setBounds(text_area_x, text_area_y, text_area_width, text_area_height); + text_area.add(text_area_panel); + + text_field = new TextField(50); + text_field.setBounds(text_field_x, text_field_y, text_field_width, text_field_height); + text_field.addActionListener(this); + text_field.setBackground(Color.white); + Image icon = getImage(getDocumentBase(), "fish2.gif"); + chatter_list = new adChatterList(icon); + chatter_list.setBounds(chat_list_x, chat_list_y, chat_list_width, chat_list_height); + chatter_list.setBackground(Color.white); + + send_button = new Button("Send"); + send_button.setBounds(send_button_x, send_button_y, send_button_width, send_button_height); + send_button.addActionListener(this); + send_button.setBackground(null); + + logoff_button = new Button("Log off"); + logoff_button.setBounds(logoff_button_x, logoff_button_y, logoff_button_width, logoff_button_height); + logoff_button.setForeground(Color.red); + logoff_button.setBackground(null); + + logoff_button.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent ae) { + URL exitURL = null; + try { + exitURL = new URL(getCodeBase().toString()); + getAppletContext().showDocument(exitURL); + } catch (MalformedURLException e) { + System.out.println("Could not exit Chat to URL "+exitURL.toString()); + } + }}); + + private_button = new Button("PM"); + private_button.setBounds(private_button_x, private_button_y, private_button_width, private_button_height); + private_button.addActionListener(this); + + ignore_button = new Button("Ignore"); + ignore_button.setBounds(ignore_button_x, ignore_button_y, ignore_button_width, ignore_button_height); + ignore_button.addActionListener(this); + + add(text_area); + //add(text_area_panel); + add(text_field); + add(chatter_list); + add(send_button); + add(logoff_button); + add(private_button); + add(ignore_button); + + // Set applet background. + setBackground(Color.white); + /** + * End GUI Layout + */ + } + + public void destroy() { + System.out.println("Destroy invoked"); + listener.disconnect(); + super.destroy(); + } + + public void stop() { + System.out.println("Stop invoked"); + listener.disconnect(); + super.stop(); + } + + /** + * Spawn a separate thread and listen for new message from the room. + */ + public void start() { + super.start(); + listener = new adChatClientListener(this, client_info); + } + + private void postMessage() { + if (!text_field.getText().equals("")) { + listener.postMessage(text_field.getText()); + text_field.setText(""); + } + } + + public void actionPerformed(ActionEvent e) { + Object src = e.getSource(); + + if (src == text_field || src == send_button) + postMessage(); + else if (src == private_button) { + adUserInfo user_info = chatter_list.getSelectedItem(); + + if (user_info != null) { + // Ignore private message from user in ignore list. + + if (ignore_user_list.containsKey(user_info.user_name)) + return; + String key = user_info.user_name; + adPrivateChatFrame f = (adPrivateChatFrame)private_chat_frames.get(key); + System.out.println("Frame f = " + f + ", key = " + key); + if (f == null) { + f = new adPrivateChatFrame(new adUserInfo(client_info.user_id, client_info.user_name), user_info, room_id, listener); + f.show(); + private_chat_frames.put(key, f); + } else { + f.show(); + f.toFront(); + } + } + } + else if (src == ignore_button) { + adUserInfo user_info = chatter_list.getSelectedItem(); + + if (user_info != null) { + // If the key already in user ignore list then click on ignore again will remove + // user from the ignore list. + + if (ignore_user_list.containsKey(user_info.user_name)) { + ignore_user_list.remove(user_info.user_name); // Remove this user from ignore list. + ((adUserInfoExt) user_info).ignore = false; + } else { + System.out.println("Ignore user [" + user_info.user_name +"]"); + ignore_user_list.put(user_info.user_name, user_info.user_id); // Add this user to ignore list. + ((adUserInfoExt) user_info).ignore = true; + } + chatter_list.invalidate(); + chatter_list.repaint(); + } + } + + } + + /** + * New message arrive from this room. + */ + public void receiveMessage(String msg) { + System.out.println("receivedMessage [" + msg + "]"); + //String system = adChatSimpleXMLParser.getTag(msg, "system"); + + if (adChatSimpleXMLParser.containTag(msg, "system")) { + adChatSystemMessage system_message = new adChatSystemMessage(msg); + if (system_message.getType() == adChatSystemMessage.USER_ENTER) { + //text_area_panel.add(new adChatFormatMessage(format_msg_width, system_message.getUserName(0), " has entered the room")); + //text_area_panel.repaint(); + + //text_area_panel.validate(); + //text_area.validate(); + } else if (system_message.getType() == adChatSystemMessage.USER_LEAVE) { + //text_area_panel.add(new adChatFormatMessage(format_msg_width, system_message.getUserName(0), " has leave the room")); + //text_area_panel.repaint(); + + //text_area_panel.validate(); + //text_area.validate(); + chatter_list.removeChatter(new adUserInfo(system_message.getUserId(0), system_message.getUserName(0))); + return; + } + + //System.out.println("List count = " + system_message.getListCount()); + for (int i = 0; i < system_message.getListCount(); i++) + chatter_list.addChatter( new adUserInfoExt(system_message.getUserId(i), system_message.getUserName(i)) ); + + return; + } + adChatMessage chat_message = new adChatMessage(msg); + + // This is not a valid chat message. + if (!chat_message.isValid()) + return; + + // If user is in ignore list then discard message from this user. + if (ignore_user_list.containsKey(chat_message.getFromUser())) + return; + + if (chat_message.getToUser() != null) { // Private conversation + + String key = chat_message.getFromUser(); + adPrivateChatFrame f = (adPrivateChatFrame) private_chat_frames.get(key); + System.out.println("Frame receive f = " + f + ", key = " + key); + + if (f == null){ + f = new adPrivateChatFrame(new adUserInfo(client_info.user_id, client_info.user_name), new adUserInfo(user_id, chat_message.getFromUser()), room_id, listener); + + private_chat_frames.put(key, f); + } + f.show(); + f.receiveMessage(chat_message.getFromUser(), chat_message.getBody()); + return; + + } + // TODO: + boolean moderate = (chat_message.getStatus() != null && chat_message.getStatus().equals("pending")) ? true : false; + adChatFormatMessage frm_msg = new adChatFormatMessage(format_msg_width, listener, msg); + //adChatFormatMessage frm_msg = new adChatFormatMessage(listener, chat_message.getFromUser(), chat_message.getBody(), moderate); + if (moderate) { + // Put moderate msg in the hash table. + if (chat_message.getMessageId() != null) { + moderate_msgs.put(chat_message.getMessageId(), frm_msg); + } + } + if (!moderate && chat_message.getMessageId() != null) { + // The message is approve moderate message. + adChatFormatMessage m = (adChatFormatMessage) moderate_msgs.get(chat_message.getMessageId()); + if (m != null) + m.setVisible(false); + + } + if (chat_message.getStatus() != null && !chat_message.getStatus().equals("rejected")) + text_area_panel.add(frm_msg); + text_area_panel.repaint(); + + text_area_panel.validate(); + text_area.validate(); + + } + + public void disconnect() { + listener.disconnect(); + } + + + + public static void main(String args[]) { + Frame f = new Frame(); + if (args.length < 3) { + System.out.println("Usage: java adChatClient user_id user_name room_id"); + return; + } + //Panel client_interface = new adChatClient(args[0], args[1], args[2]); + Panel client_interface = new adChatApplet(); + f.add(client_interface); + f.setSize(570, 400); + f.addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + System.exit(0); + } + }); + + f.show(); + } +} + + + + + + + + + + + + + + + + + Index: openacs-4/packages/chat/java/adChatClient.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adChatClient.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adChatClient.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,10 @@ +/** + * + * @author David Dao (ddao@arsdigita.com) + * @creation-date December 7, 2000 + * @cvs-id $Id: adChatClient.java,v 1.1 2001/04/20 20:51:08 donb Exp $ + */ +public interface adChatClient { + public void receiveMessage(String msg); +} + Index: openacs-4/packages/chat/java/adChatClientInfo.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adChatClientInfo.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adChatClientInfo.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,22 @@ +/** + * + * @author David Dao (ddao@arsdigita.com) + * @creation-date December 7, 2000 + * @cvs-id $Id: adChatClientInfo.java,v 1.1 2001/04/20 20:51:08 donb Exp $ + */ +public class adChatClientInfo { + public String host = null; + public int port = -1; + public String user_id = null; + public String user_name = null; + public String room_id = null; + public boolean moderator = false; + public boolean admin = false; + + public adChatClientInfo() { + } + public adChatClientInfo(String user_id, String user_name) { + this.user_id = user_id; + this.user_name = user_name; + } +} Index: openacs-4/packages/chat/java/adChatClientListener.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adChatClientListener.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adChatClientListener.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,131 @@ +import java.io.*; +import java.net.*; +import java.util.*; +import java.awt.*; + +/** + * + * @author David Dao (ddao@arsdigita.com) + * @creation-date November 17, 2000 + * @cvs-id $Id: adChatClientListener.java,v 1.1 2001/04/20 20:51:08 donb Exp $ + */ +public class adChatClientListener implements Runnable { + private Socket socket = null; + + private PrintWriter output = null; + private BufferedReader input = null; + private boolean running = true; + + private adChatClient client = null; + private adChatClientInfo client_info = null; + + public adChatClientListener(adChatClient client, adChatClientInfo client_info) { + this.client = client; + this.client_info = client_info; + + try { + // Spawn new thread for client + socket = new Socket(client_info.host, client_info.port); + input = new BufferedReader(new InputStreamReader(socket.getInputStream())); + output = new PrintWriter(socket.getOutputStream(), true); + + Thread t = new Thread(this); + t.start(); + + } catch (Exception exc) { + if (client != null) + client.receiveMessage(adChatMessage.buildBroadcastMsg(null, "System", null, "Could not reach chat server.")); + + } + } + + public void run() { + try { + // Send authenticate request here. + logOn(); + while(running) { + client.receiveMessage(input.readLine()); + } + socket.close(); + } catch (Exception exc) { + if (client != null) + client.receiveMessage(adChatMessage.buildBroadcastMsg(null, "System", null, "Chat server shuting down.")); + } + } + + public void logOn() { + try { + /** + * Let's do a work around now. If pw is true then the client is moderator. + * TODO: Need to remove this. + */ + String pw; + if (client_info.moderator) + pw = "T"; + else + pw = "F"; + + String msg = adChatLoginMessage.buildLoginMsg(client_info.user_id, client_info.user_name, pw, client_info.room_id); + output.println(msg); + } catch (Exception exc) { + System.out.println("Exception in logOn: " + exc); + } + } + + public void postPrivateMessage(String to_user, String msg) { + try { + msg = adChatMessage.buildPrivateMsg(client_info.user_name, to_user, client_info.room_id, msg); + output.println(msg); + } catch (Exception exc) { + System.out.println("Exception in postPrivateMessage"); + } + } + + public void postMessage(String msg) { + try { + msg = adChatMessage.buildBroadcastMsg(client_info.user_id, client_info.user_name, client_info.room_id, msg); + output.println(msg); + } catch( Exception exc) { + System.out.println("Exception in postMessage: " + exc); + } + } + + public void rejectModerateMessage(String user, String message_id, String msg) { + try { + msg = adChatMessage.buildRejectModerateMsg(message_id, user, client_info.room_id, msg); + output.println(msg); + } catch (Exception exc) { + System.out.println("Exception in rejectModerateMessage: " + exc); + } + } + + public void approveModerateMessage(String user, String message_id, String msg) { + try { + msg = adChatMessage.buildBroadcastMsg(message_id, null, user, client_info.room_id, msg); + output.println(msg); + } catch ( Exception exc) { + System.out.println("Exception in approve moderate message: " + exc); + } + } + + public void disconnect() { + running = false; + try { + output.println(adChatSystemMessage.buildUserLeaveMsg(client_info.user_id, client_info.user_name)); + socket.close(); + } catch (Exception exc) {} + } + +} + + + + + + + + + + + + Index: openacs-4/packages/chat/java/adChatDatasource.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adChatDatasource.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adChatDatasource.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,205 @@ +import java.io.*; +import java.net.*; +import java.util.*; +import java.awt.*; +import java.awt.event.*; + +/** + * + * @author David Dao (ddao@arsdigita.com) + * @author Stefan Deusch (stefan@arsdigita.com) + * @creation-date December 6, 2000 + * @cvs-id $Id: adChatDatasource.java,v 1.1 2001/04/20 20:51:08 donb Exp $ + */ + +/** + * This class is shared by multiple threads. Therefore this class needs + * to be thread safe. + * + * Each chat user MUST have a unique screen name. + */ +public class adChatDatasource { + private Hashtable rooms; + private Vector aol_sessions; // Connections from AOL Server + private long message_id = 0; + + public adChatDatasource() { + rooms = new Hashtable(); + aol_sessions = new Vector(); + } + + public synchronized String getNextMessageId() { + return String.valueOf(message_id++); + } + + public synchronized void addAolSession(adClientSession session) { + aol_sessions.addElement(session); + } + + public synchronized void removeAolSession(adClientSession session) { + aol_sessions.removeElement(session); + } + + public synchronized void addSession(adClientSession session, String room_id) { + if (room_id == null) + return; + + Hashtable clients = (Hashtable) rooms.get(room_id); + if (clients == null) { + clients = new Hashtable(); + rooms.put(room_id, clients); + } + clients.put(session.user_name, session); + } + + public synchronized void removeSession(adClientSession session, String room_id) { + if (room_id == null) + return; + + Hashtable clients = (Hashtable) rooms.get(room_id); + if (clients != null) { + clients.remove(session.user_name); + } + } + + /** + * Check to see if the same user already exists in the room. + */ + public synchronized boolean isDuplicate(String user_name, String room_id) { + if (room_id == null) + return false; + + boolean ret = false; + + Hashtable clients = (Hashtable) rooms.get(room_id); + if (clients != null) + ret = clients.containsKey(user_name); + + return ret; + + } + + /** + * Disconnect all current connections. + */ + public synchronized void disconnectAll() { + if (rooms != null) { + for (Enumeration r = rooms.elements(); r.hasMoreElements();) { + Hashtable clients = (Hashtable) r.nextElement(); + for (Enumeration c = clients.elements(); c.hasMoreElements();) { + ((adClientSession) c.nextElement()).disconnect(); + } + } + } + } + /** + * List all applet users in the room. + */ + public synchronized String getAppletUsers(String room_id) { + if (room_id == null) + return null; + + Hashtable clients = (Hashtable) rooms.get(room_id); + if (clients != null) { + Vector list = new Vector(); + + for (Enumeration e = clients.elements(); e.hasMoreElements();) { + adClientSession client = (adClientSession) e.nextElement(); + adChatClientInfo info = new adChatClientInfo(client.user_id, client.user_name); + list.addElement(info); + } + + return adChatSystemMessage.buildUserList(list); + } + return null; + } + + /** + * Broadcast message to applet connection only. + */ + public synchronized void broadcastAppletOnly(String msg, String room_id) { + if (room_id == null) + return; + + Hashtable clients = (Hashtable) rooms.get(room_id); + if (clients != null) { + adChatMessage chat_msg = new adChatMessage(msg); + + boolean moderate_msg = (chat_msg.getStatus() != null && (chat_msg.getStatus().equals("rejected") || chat_msg.getStatus().equals("pending"))) ? true : false; + /* + if (moderate_msg) { + if (chat_msg.getStatus().equals("pending")) { + chat_msg.setMessageId(getNextMessageId()); // Assign next message id + msg = chat_msg.toString(); + } + } + */ + // Iterate though each clients in the room and broadcast the message. + for (Enumeration e = clients.elements(); e.hasMoreElements();) { + adClientSession client = (adClientSession) e.nextElement(); + + // This is not a valid chat message. Just broadcast to clients. + if (!chat_msg.isValid()) { + client.postMessage(msg); + continue; + } + + if (chat_msg.getToUser() == null) { + // This is a public message. + if (!moderate_msg || (moderate_msg && client.moderator)) { + client.postMessage(msg); + } + + } else if (chat_msg.getToUser().equals(client.user_name)) { + // This is a private message. + client.postMessage(msg); + break; + } + + } + + } + } + + /** + * Broadcast message to aol connection only. + */ + public synchronized void broadcastAolOnly(String msg, String room_id) { + if (room_id == null) + return; + for (int i = 0; i < aol_sessions.size(); i++) { + adChatMessage chat_msg = new adChatMessage(msg); + // Only broadcast public message to AOL session. + if (chat_msg.getToUser() == null) + ((adClientSession) aol_sessions.elementAt(i)).postMessage(msg); + } + } + + /** + * Broadcast message to everyone in the room. + */ + public synchronized void broadcast(String msg, String room_id) { + + adChatMessage chat_msg = new adChatMessage(msg); + + boolean moderate_msg = (chat_msg.getStatus() != null && (chat_msg.getStatus().equals("rejected") || chat_msg.getStatus().equals("pending"))) ? true : false; + + if (moderate_msg) { + if (chat_msg.getStatus().equals("pending")) { + chat_msg.setMessageId(getNextMessageId()); // Assign next message id + msg = chat_msg.toString(); + } + } + + System.out.println("In broadcast: " + msg); + broadcastAppletOnly(msg, room_id); + broadcastAolOnly(msg, room_id); + + } +} + + + + + + Index: openacs-4/packages/chat/java/adChatFormatMessage.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adChatFormatMessage.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adChatFormatMessage.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,318 @@ +import java.awt.*; +import java.awt.event.*; +import java.util.*; + +/** + * + * + * @author David Dao (ddao@arsdigita.com) + * @creation-date December 5, 2000 + * @cvs-id $Id: adChatFormatMessage.java,v 1.1 2001/04/20 20:51:08 donb Exp $ + */ +public class adChatFormatMessage extends Container implements ActionListener{ + private static int GAP = 2; + private Dimension d = null; + private int width = 400; + private int height = 40; + private int button_width = 20; + private int button_height = 20; + private int char_height = -1; + + private String font_name = "Helvetica"; + private int font_size = 12; + + private Font font_normal = null; + private Font font_bold = null; + + private FontMetrics fm_normal = null; + private FontMetrics fm_bold = null; + + private int x = GAP; + private int space = 4; + private int user_name_width = -1; + + public String msg = "Test string this is a brand new test please enter some meaningful word string getting longer and longer and longer until the end. Test string for longer and longer and longer and longer and longer the end."; + public String user_name = "David: "; + public String user = null; + public String message_id = null; + public boolean moderated = false; + private Vector line_break = new Vector(); + private adChatClientListener listener = null; + + private Button accept_button = null; + private Button reject_button = null; + public adChatFormatMessage(int width, String user_name, String message) { + this(width, null, user_name, message, false); + } + + // Msg is in XML format. + public adChatFormatMessage(int width, adChatClientListener listener, String msg) { + + adChatMessage chat_message = new adChatMessage(msg); + moderated = (chat_message.getStatus() != null && chat_message.getStatus().equals("pending")) ? true : false; + this.width = width; + this.listener = listener; + this.user_name = chat_message.getFromUser() + ": "; + this.user = chat_message.getFromUser(); + this.msg = chat_message.getBody(); + message_id = chat_message.getMessageId(); + initialize(); + } + + public adChatFormatMessage(int width, adChatClientListener listener, String user_name, String message, boolean moderated) { + this.moderated = moderated; + this.listener = listener; + this.width = width; + + + this.user_name = user_name + ": "; + this.user = user_name; + msg =message; + + initialize(); + + } + + private void initialize() { + d = new Dimension(width, height); + /** + * Create two fonts using in the chat message. + */ + font_normal = new Font(font_name, Font.PLAIN, font_size); + font_bold = new Font(font_name, Font.BOLD, font_size); + + Toolkit toolkit = Toolkit.getDefaultToolkit(); + fm_normal = toolkit.getFontMetrics(font_normal); + fm_bold = toolkit.getFontMetrics(font_bold); + + setLayout(null); // Set component layout manually. + + //System.out.println("Font normal = " + font_normal); + //System.out.println("Font bold = " + font_bold); + //System.out.println("fm_normal = " + fm_normal); + + char_height = fm_normal.getHeight(); + + button_width = char_height + GAP * 2; + button_height = char_height + GAP * 2; + + user_name_width = fm_bold.stringWidth(user_name); + + /** + * Add accept/reject button for each moderate message. + */ + if (moderated) { + accept_button = new Button("A"); + accept_button.setFont(font_normal); + accept_button.setBounds(GAP, GAP, button_width, button_height); + accept_button.setForeground(Color.green); + accept_button.addActionListener(this); + add(accept_button); + + reject_button = new Button("R"); + reject_button.setFont(font_normal); + reject_button.setBounds(button_width + 2* GAP, GAP, button_width, button_height); + reject_button.setForeground(Color.red); + reject_button.addActionListener(this); + add(reject_button); + + x += (2 * button_width + 2 * GAP); + } + + d.height = button_height + 2 * GAP; + + calculateLineBreak(); + repaint(); + } + + /** + * Pre calculate where each line break using this font. + */ + private void calculateLineBreak() { + int current_length = x + user_name_width; + for (int i = 0; i < msg.length(); i++) { + current_length += fm_normal.charWidth(msg.charAt(i)); + + if (current_length > d.width) { + //System.out.println("Char = " + msg.charAt(i) + ", current_length = " + current_length); + current_length = GAP + fm_normal.charWidth(msg.charAt(i)); + line_break.addElement(new Integer(i - 1)); + + d.height += char_height; + } + } + line_break.addElement(new Integer(msg.length())); + } + + public void paint(Graphics g) { + g.setColor(Color.lightGray); + g.fillRect(0, 0, d.width, d.height); + + /** + * Draw user name. + */ + g.setFont(font_bold); + g.setColor(Color.blue); + g.drawString(user_name, x, GAP + char_height); + + /** + * Draw regular message. + */ + g.setFont(font_normal); + g.setColor(Color.black); + int start_offset = 0; + int x_loc = x + user_name_width + space; + int y_loc = GAP + char_height; + for (int i = 0; i < line_break.size(); i++) { + int end_offset = ((Integer) line_break.elementAt(i)).intValue(); + //System.out.println("[" + start_offset +", " + end_offset + "] = " + msg.substring(start_offset, end_offset)); + + g.drawString(msg.substring(start_offset, end_offset), x_loc, y_loc); + start_offset = end_offset; + x_loc = GAP; + y_loc += char_height; + } + } + + public Dimension getPreferredSize() { + return d; + } + + public void actionPerformed(ActionEvent e) { + Object src = e.getSource(); + + if (listener != null) { + if (src == accept_button) + listener.approveModerateMessage(user, message_id, msg); + else if (src == reject_button) + listener.rejectModerateMessage(user, message_id, msg); + } + //if (listener != null) + // listener.postMessage(msg); + //if (listener != null) + // listener.approveModerateMessage(user, message_id, msg); + setVisible(false); + } + + public static void main(String args[]) { + Frame f = new Frame(); + ScrollPane scroll = new ScrollPane(); + Panel main = new Panel(); + /* + main.setLayout(new OneColumnLayout()); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(false)); + + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + main.add(new adChatFormatMessage(true)); + main.add(new adChatFormatMessage(false)); + */ + scroll.add(main); + f.add(scroll); + f.setSize(400,400); + f.addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + System.exit(1); + } + }); + f.show(); + } +} + +class OneColumnLayout implements LayoutManager { + + private int hgap = 2; + public void addLayoutComponent(String name, Component comp) { + } + + public void removeLayoutComponent(Component comp) { + + } + + public Dimension preferredLayoutSize(Container parent) { + return calculateLayoutSize(parent); + } + + public Dimension minimumLayoutSize(Container parent) { + return calculateLayoutSize(parent); + } + + public void layoutContainer(Container parent) { + //System.out.println(this + "::layoutContainer"); + synchronized (parent.getTreeLock()) { + int nmembers = parent.getComponentCount(); + int x = 0; + int y = 0; + for (int i = 0; i < nmembers; i++) { + Component m = parent.getComponent(i); + if (m.isVisible()) { + Dimension d = m.getPreferredSize(); + m.setBounds(x, y, d.width, d.height); + y += (d.height + hgap); + } + } + } + } + + private Dimension calculateLayoutSize(Container parent) { + Dimension dim = new Dimension(0, 0); + synchronized (parent.getTreeLock()) { + int nmembers = parent.getComponentCount(); + + for (int i = 0; i < nmembers; i++) { + Component m = parent.getComponent(i); + if (m.isVisible()) { + Dimension d= m.getPreferredSize(); + dim.height += (d.height + hgap); + if (i == 0) + dim.width = d.width; + } + } + return dim; + } + } +} + + + + + + + Index: openacs-4/packages/chat/java/adChatLoginMessage.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adChatLoginMessage.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adChatLoginMessage.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,107 @@ +/** + * + * @author David Dao (ddao@arsdigita.com) + * @creation-date December 7, 2000 + * @cvs-id $Id: adChatLoginMessage.java,v 1.1 2001/04/20 20:51:08 donb Exp $ + */ +public class adChatLoginMessage { + + /** + * Private variables. + */ + private String user_id = null; + private String user_name = null; + private String pw = null; + private String room_id = null; + + private boolean valid = true; + + public adChatLoginMessage() { + } + + public adChatLoginMessage(String xml) { + if (!adChatSimpleXMLParser.containTag(xml, "login")) { + valid = false; + return; + } + + user_id = adChatSimpleXMLParser.getTag(xml, "user_id"); + user_name = adChatSimpleXMLParser.getTag(xml, "user_name"); + pw = adChatSimpleXMLParser.getTag(xml, "pw"); + room_id = adChatSimpleXMLParser.getTag(xml, "room_id"); + } + + public void setUserId(String user_id) { + this.user_id = user_id; + } + + public String getUserId() { + return user_id; + } + + public void setUserName(String user_name) { + this.user_name = user_name; + } + + public String getUserName() { + return user_name; + } + + public void setPassword(String pw) { + this.pw = pw; + } + + public String getPassword() { + return pw; + } + + public void setRoomId(String room_id) { + this.room_id = room_id; + } + + public String getRoomId() { + return room_id; + } + + public boolean isValid() { + return valid; + } + + public String buildXML() { + return adChatLoginMessage.buildLoginMsg(user_id, user_name, pw, room_id); + } + + public String toString() { + return adChatLoginMessage.buildLoginMsg(user_id, user_name, pw, room_id); + } + + public static String buildLoginMsg(String user_id, String user_name, String pw, String room_id) { + + StringBuffer sb = new StringBuffer(400); + + sb.append(""); + if (user_id != null) + sb.append("").append(user_id).append(""); + if (user_name != null) + sb.append("").append(user_name).append(""); + if (pw != null) + sb.append("").append(pw).append(""); + if (room_id != null) + sb.append("").append(room_id).append(""); + sb.append(""); + + return sb.toString(); + } +} + + + + + + + + + + + + Index: openacs-4/packages/chat/java/adChatMessage.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adChatMessage.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adChatMessage.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,188 @@ +/** + * + * @author David Dao (ddao@arsdigita.com) + * @creation-date December 7, 2000 + * @cvs-id $Id: adChatMessage.java,v 1.1 2001/04/20 20:51:08 donb Exp $ + */ +public class adChatMessage { + + /** + * Private variables. + */ + private String message_id = null; + private String from = null; + private String from_user_id = null; + private String to = null; + private String to_user_id = null; + private String room_id = null; + private String status = null; + private String body = null; + + private boolean valid = true; + + public adChatMessage() { + } + + public adChatMessage(String xml) { + if (!adChatSimpleXMLParser.containTag(xml, "message")) { + valid = false; + return; + } + + message_id = adChatSimpleXMLParser.getTag(xml, "message_id"); + from = adChatSimpleXMLParser.getTag(xml, "from"); + from_user_id = adChatSimpleXMLParser.getTag(xml, "from_user_id"); + to = adChatSimpleXMLParser.getTag(xml, "to"); + to_user_id = adChatSimpleXMLParser.getTag(xml, "to_user_id"); + room_id = adChatSimpleXMLParser.getTag(xml, "room_id"); + status = adChatSimpleXMLParser.getTag(xml, "status"); + body = adChatSimpleXMLParser.getTag(xml, "body"); + } + + public void setMessageId(String id) { + message_id = id; + } + + public String getMessageId() { + return message_id; + } + + public void setFromUser(String user) { + from = user; + } + + public String getFromUser() { + return from; + } + + public void setFromUserId(String user_id) { + from_user_id = user_id; + } + + public String getFromUserId() { + return from_user_id; + } + + public void setToUserId(String user_id) { + to_user_id = user_id; + } + + public String getToUserId() { + return to_user_id; + } + + public void setToUser(String user) { + to = user; + } + + public String getToUser() { + return to; + } + + public void setRoomId(String room_id) { + this.room_id = room_id; + } + + public String getRoomId() { + return room_id; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getStatus() { + return status; + } + + public void setBody(String msg) { + body = msg; + } + + public String getBody() { + return body; + } + + public String buildXML() { + return adChatMessage.buildXML(message_id, from_user_id, from, to_user_id, to, room_id, status, body); + } + + public boolean isValid() { + return valid; + } + + public String toString() { + return adChatMessage.buildXML(message_id, from_user_id, from, to_user_id, to, room_id, status, body); + } + + public static String buildXML(String message_id, String from_user_id, String from, + String to_user_id, String to, String room_id, + String status, String body) { + StringBuffer sb = new StringBuffer(400); + + sb.append(""); + + if (message_id != null) + sb.append("").append(message_id).append(""); + if (from_user_id != null) + sb.append("").append(from_user_id).append(""); + if (from != null) + sb.append("").append(from).append(""); + if (to_user_id != null) + sb.append("").append(to_user_id).append(""); + if (to != null) + sb.append("").append(to).append(""); + if (room_id != null) + sb.append("").append(room_id).append(""); + if (status != null) + sb.append("").append(status).append(""); + if (body != null) + sb.append("").append(body).append(""); + + sb.append(""); + + return sb.toString(); + } + + public static String buildBroadcastMsg(String id, String user_id, String from_user, String room_id, String body) { + return buildXML(id, user_id, from_user, null, null, room_id, "approved", body); + } + + public static String buildBroadcastMsg(String user_id, String from_user, String room_id, String body) { + return buildXML(null, user_id, from_user, null, null, room_id, "approved", body); + } + + public static String buildPrivateMsg(String from_user, String to_user, String room_id, String body) { + return buildXML(null, null, from_user, null, to_user, room_id, null, body); + } + + public static String buildModerateMsg(String from_user, String room_id, String body) { + return buildXML(null, null, from_user, null, null, room_id, "pending", body); + } + public static String buildRejectModerateMsg(String id, String from_user, String room_id, String body) { + return buildXML(id, null, from_user, null, null, room_id, "rejected", body); + } +} + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/chat/java/adChatServer.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adChatServer.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adChatServer.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,105 @@ +import java.io.*; +import java.net.*; +import java.util.*; +import java.awt.*; +import java.awt.event.*; + +/** + * + * @author David Dao (ddao@arsdigita.com) + * @author Stefan Deusch (stefan@arsdigita.com) + * @creation-date December 6, 2000 + * @cvs-id $Id: adChatServer.java,v 1.1 2001/04/20 20:51:08 donb Exp $ + */ +public class adChatServer { + + private int port; + private int backlog = 50; + private adChatDatasource datasource = new adChatDatasource(); + private boolean running = true; + private ServerSocket server = null; + + public adChatServer(int port) { + this.port = port; + } + + /** + * Listen for incoming java connection. For each connection + * spawn a new thread. + */ + public void start() { + try { + server = new ServerSocket(port); + System.out.println("[" + new Date() + "] - Chat server listens on port " + port); + while(running) { + Socket incoming = server.accept(); + if (running) { + System.out.println("[" + new Date() + "] - Connection from " + incoming); + adClientSession session = new adClientSession(this, incoming); + session.start(); + } + } + } catch (IOException io) { + // Server shut down normally. + } catch (Exception e) { + System.out.println("Socket server exception: " + e); + } + System.out.println("[" + new Date() + "] - Chat server shuts down."); + } + + /** + * Open tcp socket and send a bye message to the chat server. + */ + public void stop() { + try { + Socket socket = new Socket(InetAddress.getLocalHost(), port); + PrintWriter output = new PrintWriter(socket.getOutputStream(), true); + output.println("Bye"); + output.close(); + } catch (Exception e) { + System.out.println("Exception in stoping server: " + e); + } + } + + /** + * Shut down the current server. + */ + public synchronized void shutdown() { + running = false; + try { + if (server != null) + server.close(); + } catch(Exception e) {} + } + + public adChatDatasource getDatasource() { + return datasource; + } + + public InetAddress getInetAddress() { + return server.getInetAddress(); + } + + public static void main(String[] args) { + if (args.length < 2) { + System.out.println(" Usuage: java adChatServer (start | stop) "); + return; + } + int port = Integer.parseInt(args[1]); + adChatServer server = new adChatServer(port); + if (args[0].equals("start")) + server.start(); + else if (args[0].equals("stop")) + server.stop(); + else + System.out.println(" Usuage: java adChatServer (start | stop) "); + + } +} + + + + + + + Index: openacs-4/packages/chat/java/adChatSimpleXMLParser.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adChatSimpleXMLParser.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adChatSimpleXMLParser.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,67 @@ + +/** + * This class contains very simple methods that parse out + * xml chat message. This class is not intend to use for + * complicate xml. + * + * @author David Dao (ddao@arsdigita.com) + * @creation-date December 6, 2000 + * @cvs-id $Id: adChatSimpleXMLParser.java,v 1.1 2001/04/20 20:51:08 donb Exp $ + */ +public class adChatSimpleXMLParser { + public static String removeTag(String str, String tag) { + String ret = str; + + int start_index = str.indexOf("<" + tag + ">"); + + if (start_index >= 0) { + int end_index = str.indexOf(""); + if (end_index >= 0) { + + ret = str.substring(0, start_index); + ret = ret.concat(str.substring(end_index + 3 + tag.length(), str.length())); + } + } + + return ret; + } + + public static String getTag(String str, String tag) { + String ret = null; + + int start_index = str.indexOf("<" + tag + ">"); + + if (start_index >= 0) { + int end_index = str.indexOf(""); + if (end_index >= 0) { + ret = str.substring(start_index + 2 + tag.length(), end_index); + } + } + + return ret; + } + + public static boolean containTag(String str, String tag) { + boolean ret = false; + + int start_index = str.indexOf("<" + tag + ">"); + if (start_index >= 0) { + int end_index = str.indexOf(""); + if (end_index >= 0) + ret = true; + + } + + return ret; + } + +} + + + + + + + + + Index: openacs-4/packages/chat/java/adChatSystemMessage.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adChatSystemMessage.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adChatSystemMessage.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,182 @@ +/** + * + * @author David Dao (ddao@arsdigita.com) + * @creation-date December 7, 2000 + * @cvs-id $Id: adChatSystemMessage.java,v 1.1 2001/04/20 20:51:08 donb Exp $ + */ +import java.util.Vector; + +public class adChatSystemMessage { + + public static int USER_ENTER = 0; + public static int USER_LEAVE = 1; + public static int USER_LIST = 2; + + /** + * Private variables. + */ + private int type; + private Vector list = null; + private boolean valid = true; + + public adChatSystemMessage() { + list = new Vector(); + } + + public adChatSystemMessage(String xml) { + if (!adChatSimpleXMLParser.containTag(xml, "system")) { + valid = false; + return; + } + if (adChatSimpleXMLParser.containTag(xml, "user_enter")) + type = USER_ENTER; + else if (adChatSimpleXMLParser.containTag(xml, "user_leave")) + type = USER_LEAVE; + else if (adChatSimpleXMLParser.containTag(xml, "user_list")) + type = USER_LIST; + else { + valid = false; + return; + } + + list = new Vector(); + boolean done = false; + + while (!done) { + String user_id = adChatSimpleXMLParser.getTag(xml, "user_id"); + String user_name = adChatSimpleXMLParser.getTag(xml, "user_name"); + if (user_id == null || user_name == null) { + done = true; + continue; + } + + adChatClientInfo client_info = new adChatClientInfo(); + client_info.user_id = user_id; + client_info.user_name = user_name; + + list.addElement(client_info); + if (type == USER_LIST) + xml = adChatSimpleXMLParser.removeTag(xml, "user"); + else + done = true; + + } + } + + public void setType(int type) { + this.type = type; + } + + public int getType() { + return type; + } + + public Vector getList() { + return list; + } + + public int getListCount() { + if (list != null) + return list.size(); + else + return 0; + } + + public String getUserName(int index) { + if (index >= 0 && index < list.size()) + return ((adChatClientInfo) list.elementAt(index)).user_name; + return null; + } + + public String getUserId(int index) { + if (index >= 0 && index < list.size()) + return ((adChatClientInfo) list.elementAt(index)).user_id; + return null; + } + + public void appendUser(String user_id, String user_name) { + adChatClientInfo user = new adChatClientInfo(); + user.user_id = user_id; + user.user_name = user_name; + list.addElement(user); + } + + public boolean isValid() { + return valid; + } + + public String buildXML() { + return toString(); + } + + public String toString() { + if (type == USER_ENTER) + return adChatSystemMessage.buildUserEnterMsg(getUserId(0), getUserName(0)); + else if (type == USER_LEAVE) + return adChatSystemMessage.buildUserLeaveMsg(getUserId(0), getUserName(0)); + else if (type == USER_LIST) + return adChatSystemMessage.buildUserList(list); + else + return null; + } + + public static String buildUserEnterMsg(String user_id, String user_name) { + StringBuffer sb = new StringBuffer(400); + + sb.append(""); + sb.append(""); + if (user_id != null) + sb.append("").append(user_id).append(""); + if (user_name != null) + sb.append("").append(user_name).append(""); + sb.append(""); + sb.append(""); + + return sb.toString(); + } + + public static String buildUserLeaveMsg(String user_id, String user_name) { + StringBuffer sb = new StringBuffer(400); + + sb.append(""); + sb.append(""); + if (user_id != null) + sb.append("").append(user_id).append(""); + if (user_name != null) + sb.append("").append(user_name).append(""); + sb.append(""); + sb.append(""); + + return sb.toString(); + } + public static String buildUserList(Vector user_list) { + if (user_list == null || user_list.size() == 0) + return null; + + StringBuffer sb = new StringBuffer(400); + sb.append(""); + + for (int i = 0; i < user_list.size(); i++) { + sb.append(""); + sb.append("").append(((adChatClientInfo) user_list.elementAt(i)).user_id).append(""); + sb.append("").append(((adChatClientInfo) user_list.elementAt(i)).user_name).append(""); + sb.append(""); + } + + sb.append(""); + + return sb.toString(); + + } + public static void main(String argv[]) { + String xml = ""; + xml += "1A"; + xml += ""; + adChatSystemMessage m = new adChatSystemMessage(xml); + for (int i = 0; i < m.getListCount(); i++) { + System.out.println("User_Id(" + i + ") = " + m.getUserId(i)); + System.out.println("User_Name(" + i + ") = " + m.getUserName(i)); + } + } +} + Index: openacs-4/packages/chat/java/adChatterList.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adChatterList.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adChatterList.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,295 @@ +import java.awt.*; +import java.awt.event.*; +import java.util.*; + +class adUserInfoExt extends adUserInfo { + + public boolean ignore = false; + + public adUserInfoExt(String user_id, String user_name) { + super(user_id, user_name); + } + +} +class adChatterListLayout implements LayoutManager { + public void addLayoutComponent(String name, Component comp) {} + + public void removeLayoutComponent(Component comp) {} + + public Dimension preferredLayoutSize(Container parent) { + synchronized (parent.getTreeLock()) { + + Component[] c = parent.getComponents(); + + if (c == null) + return new Dimension(); + + Dimension d = null; + // Only have one component. + for (int i = 0; i < c.length; i++) { + d = c[i].getSize(); + + } + + return d; + + } + } + + public Dimension minimumLayoutSize(Container parent) { + return preferredLayoutSize(parent); + } + + public void layoutContainer(Container parent) {} + +} + +class adChatterScrollPane extends ScrollPane { + private Image offscr_image = null; + + private adChatterList chatter_list = null; + public adChatterScrollPane() { + chatter_list = new adChatterList(null); + chatter_list.setBounds(0, 0, 100, 390); + add(chatter_list); + + } + + public void addChatter(String name) { + chatter_list.addChatter(new adUserInfoExt("1", name)); + chatter_list.repaint(); + chatter_list.invalidate(); + } + + public void paint(Graphics g) { + if (offscr_image == null) + offscr_image = createImage(getSize().width, getSize().height); + + Graphics offscr_graphics = offscr_image.getGraphics(); + offscr_graphics.clearRect(0, 0, getSize().width, getSize().height); + System.out.println(this + "paint()"); + super.paint(offscr_graphics); + + g.drawImage(offscr_image, 0, 0, this); + + } + + public void update(Graphics g) { + paint(g); + } + +} +public class adChatterList extends Container + implements MouseListener, AdjustmentListener { + /** + * Icon dimension + */ + private final static int ICON_WIDTH = 32; + private final static int ICON_HEIGHT = 32; + + private final static int GAP_H = 2; // Space in pixels between icon and text + private final static int GAP_V = 2; // Gap between two name labels + + private final static int INSET_X = 2; + private final static int INSET_Y = 2; + + private final static int SCROLLBAR_WIDTH = 20; + private int select_index = -1; + + Image icon = null; + + private Image ignore_icon = null; + private Vector user_list = null; + private Image offscr_image = null; + private Dimension d = null; + + private int width = 0; + private int height = 0; + + private Scrollbar v_scrollbar = null; + private Scrollbar h_scrollbar = null; + private int num_of_displays = -1; + private int start_idx = 0; + + public adChatterList(Image icon) { + user_list = new Vector(); + this.icon = icon; + //icon = getToolkit().getImage("fish2.gif"); + //ignore_icon = getToolkit().getImage("ignore.gif"); + addMouseListener(this); + + v_scrollbar = new Scrollbar(Scrollbar.VERTICAL); + h_scrollbar = new Scrollbar(Scrollbar.HORIZONTAL); + + v_scrollbar.setVisible(false); + v_scrollbar.addAdjustmentListener(this); + setLayout(null); + + add(v_scrollbar); + + } + + public adUserInfo getSelectedItem() { + if (select_index < 0 || select_index > user_list.size()) + return null; + + return (adUserInfo) user_list.elementAt(select_index); + } + + private void initialize() { + d = getSize(); + + v_scrollbar.setBounds(d.width - SCROLLBAR_WIDTH, 0, SCROLLBAR_WIDTH, d.height); + + num_of_displays = d.height / (ICON_HEIGHT + 2 * INSET_Y + GAP_V); + v_scrollbar.setVisibleAmount(num_of_displays); + + System.out.println("Num of display=" + num_of_displays); + } + public void addChatter(adUserInfo user_info) { + + if (d == null) + initialize(); + + user_list.addElement(user_info); + + if (user_list.size() > num_of_displays) { + v_scrollbar.setVisible(true); + v_scrollbar.setMaximum(user_list.size()); + } else + v_scrollbar.setVisible(false); + + + repaint(); + } + + public void removeChatter(adUserInfo user_info) { + // Need to optimized this method. + + // first look through the whole list for the same user id. + for (int i = 0; i < user_list.size(); i++) { + adUserInfo obj = (adUserInfo) user_list.elementAt(i); + if (obj.user_id.equals(user_info.user_id)) { + user_list.removeElement(obj); + return; + } + } + + return; + } + + public void paint(Graphics g) { + + if (d == null) + initialize(); + + g.setColor(getBackground()); + g.fillRect(0, 0, getSize().width, getSize().height); + /** + * Draw border around the component + */ + g.setColor(Color.gray); + g.draw3DRect(0, 0, d.width - 1, d.height - 1, false); + g.draw3DRect(1, 1, d.width - 2, d.height - 2, false); + + /** + * End drawing border + */ + + int x = 2; + int y = 2; + + + for (int i = start_idx; (i < user_list.size()) && (i < start_idx + num_of_displays); i++) { + if (select_index == i) { + g.setColor(Color.blue); + g.fillRect(x, y, d.width, ICON_HEIGHT + 2 * INSET_Y); + g.setColor(Color.white); + } else { + g.setColor(Color.lightGray); + g.fillRect(x, y, d.width, ICON_HEIGHT + 2 * INSET_Y); + g.setColor(Color.black); + } + adUserInfoExt user_info = (adUserInfoExt) user_list.elementAt(i); + g.drawImage(icon, x + INSET_X, y + INSET_Y, ICON_WIDTH, ICON_HEIGHT, this); + if (user_info.ignore) { + g.setColor(Color.red); + g.drawLine(x + INSET_X, y + INSET_Y, x + INSET_X + ICON_WIDTH, y + INSET_Y + ICON_HEIGHT); + g.drawLine(x + INSET_X + ICON_WIDTH, y + INSET_Y, x + INSET_X, y + INSET_Y + ICON_HEIGHT); + } + //g.drawImage(ignore_icon, x + INSET_X, y + INSET_Y, ICON_WIDTH, ICON_HEIGHT, this); + g.drawString(user_info.user_name, x + INSET_X + ICON_WIDTH + GAP_H, y + 20); + y += (ICON_HEIGHT + 2 * INSET_Y + GAP_V); + } + super.paint(g); + + } + public Dimension getPreferredSize() { + return getSize(); + } + + public void update(Graphics g) { + System.out.println(this + "update()"); + paint(g); + } + public void mouseClicked(MouseEvent e) { + + } + + public void mouseEntered(MouseEvent e) { + } + + public void mouseExited(MouseEvent e) { + } + + public void mousePressed(MouseEvent e) { + Point pt = e.getPoint(); + select_index = pt.y / (ICON_HEIGHT + 2 * INSET_Y + GAP_V); + repaint(); + } + + public void mouseReleased(MouseEvent e) { + } + + public void adjustmentValueChanged(AdjustmentEvent e) { + start_idx = e.getValue(); + repaint(); + } + public static void main(String args[]) { + Frame f = new Frame(); + + //final adChatterScrollPane sp = new adChatterScrollPane(); + final adChatterList sp = new adChatterList(null); + sp.setBounds(15, 50, 200, 390); + Button add = new Button("add"); + add.setBounds(320, 60, 50, 30); + add.addActionListener(new ActionListener() { + private int count = 0; + public void actionPerformed(ActionEvent e) { + sp.addChatter(new adUserInfo("1", "David" + (count++))); + } + }); + + f.setLayout(null); + f.add(sp); + f.add(add); + f.setSize(570, 400); + + f.addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + System.exit(0); + } + }); + + f.show(); + + } +} + + + + + + + + Index: openacs-4/packages/chat/java/adClientSession.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adClientSession.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adClientSession.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,161 @@ +import java.io.*; +import java.net.*; +import java.util.*; +import java.awt.*; +import java.awt.event.*; + +/** + * + * @author David Dao (ddao@arsdigita.com) + * @author Stefan Deusch (stefan@arsdigita.com) + * @creation-date December 6, 2000 + * @cvs-id $Id: adClientSession.java,v 1.1 2001/04/20 20:51:08 donb Exp $ + */ + +class adClientSession extends Thread { + private Socket socket = null; + + private BufferedReader input = null; + private PrintWriter output = null; + private boolean running = true; + private adChatDatasource datasource = null; + private adChatServer server = null; + + private boolean authenticate_p = false; + private boolean from_HTML_client = false; + private String room_id = null; + private InetAddress inet_address = null; + + public String user_name = null; + public String user_id = null; + public boolean moderator = false; + + public adClientSession(adChatServer server, Socket socket) { + this.datasource = server.getDatasource(); + this.socket = socket; + this.server = server; + + inet_address = socket.getInetAddress(); + } + + public void run() { + try { + input = new BufferedReader(new InputStreamReader(socket.getInputStream())); + output = new PrintWriter(socket.getOutputStream(), true); + + while(running) { + String str = input.readLine(); + System.out.println("Receive [" + str + "]"); + if (str.equals("Bye")) { + running = false; + output.close(); + datasource.disconnectAll(); + // For security reason you could only shutdown server from local host. + // TODO: Later might be able to shutdown chat server remotely with proper user + // authentication. + if (inet_address.equals(InetAddress.getLocalHost())) + server.shutdown(); + + return; + } + + /** + * Authenticate user log in here. If invalid login then + * close the connection immediately + */ + if (!authenticate_p) { + // Authenticate user log in. + adChatLoginMessage login = new adChatLoginMessage(str); + + if (!login.isValid()) { + // Invalid log in message. + output.println(adChatMessage.buildBroadcastMsg(null, "Administrator", null, "Access denied.")); + output.close(); + socket.close(); + running = false; + return; + } else { + user_name = login.getUserName(); + room_id = login.getRoomId(); + user_id = login.getUserId(); + // Temporary. + // TODO: Fix it. + String tmp = login.getPassword(); + if (tmp != null && tmp.equals("T")) + moderator = true; + System.out.println("User name: " + user_name + ", moderator = " + moderator); + if (user_name.equals("AOL_READER")) { + datasource.addAolSession(this); + authenticate_p = true; + + } else if (user_name.equals("AOL_WRITER")) { + from_HTML_client = true; + authenticate_p = true; + } else if (datasource.isDuplicate(user_name, room_id)) { + output.println(adChatMessage.buildBroadcastMsg(null, "Administrator", null, "User already in the room.")); + output.close(); + running = false; + return; + } else { + String user_list = datasource.getAppletUsers(room_id); + + if (user_list != null) + output.println(user_list); + + datasource.addSession(this, room_id); + datasource.broadcastAppletOnly(adChatSystemMessage.buildUserEnterMsg(user_id, user_name), room_id); + datasource.broadcast(adChatMessage.buildBroadcastMsg(user_id, user_name, room_id, " has entered the room."), room_id); + authenticate_p = true; + } + } + continue; + } + System.out.println("Broadcast [" + str + "]"); + + // Test to see if this is a log out message. + if (adChatSimpleXMLParser.containTag(str, "system")) { + datasource.broadcastAppletOnly(str, room_id); + continue; + } + + if (from_HTML_client) { + adChatMessage msg = new adChatMessage(str); + room_id = msg.getRoomId(); + } + // Current assumption is all rooms are moderate. + // TODO: Need to check if room is moderate or not. + if (!moderator) { + adChatMessage msg = new adChatMessage(str); + str = adChatMessage.buildModerateMsg(msg.getFromUser(), msg.getRoomId(), msg.getBody()); + } + datasource.broadcast(str, room_id); + + } + socket.close(); + } catch (Exception exc) { + // Client connection die abnormally. Log this user off. + } + // Remove user from room. And broadcast message to everyone in the room. + datasource.removeSession(this, room_id); + datasource.broadcast(adChatMessage.buildBroadcastMsg(user_id, user_name, room_id, " has leave the room."), room_id); + } + + public void postMessage(String msg) { + try { + output.println(msg); + } catch (Exception exc) {} + } + + public void disconnect() { + running = false; + try { + socket.close(); + } catch (Exception exc) {} + } +} + + + + + + Index: openacs-4/packages/chat/java/adPrivateChatFrame.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adPrivateChatFrame.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adPrivateChatFrame.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,132 @@ +import java.awt.*; +import java.awt.event.*; + +/** + * This frame pop up for each private chat. + * Currently the whole frame is static in size. Later need to make it resizable. + */ +public class adPrivateChatFrame extends Frame implements ActionListener{ + + private static int GAP = 5; + + private Panel p = null; + + //private TextArea text_area = null; + private ScrollPane text_area = null; + private Panel text_area_panel = null; + private TextField text_field = null; + private Button send_button = null; + private adUserInfo sender = null; + private adUserInfo receiver = null; + private String room_id = null; + private adChatClientListener listener = null; + private int format_msg_width; + public adPrivateChatFrame(adUserInfo sender, adUserInfo receiver, String room_id, adChatClientListener listener) { + super("Conversation with " + receiver.user_name); + this.sender = sender; + this.receiver = receiver; + this.listener = listener; + this.room_id = room_id; + + setSize(400, 400); + setResizable(false); + + p = new Panel(); + p.setSize(390, 350); + + p.setLayout(null); + + Dimension size = p.getSize(); + + int text_field_height = 40; + int send_button_width = 40; + + int text_area_x = GAP; + int text_area_y = GAP; + int text_area_width = size.width - 2 * GAP; + format_msg_width = text_area_width; + + int text_area_height = size.height - 3 * GAP - text_field_height; + + int text_field_x = GAP; + int text_field_y = text_area_y + text_area_height + GAP; + int text_field_width = size.width - 3 * GAP - send_button_width; + int send_button_x = text_field_x + text_field_width + GAP; + int send_button_y = text_field_y; + int send_button_height = text_field_height; + + //text_area = new TextArea(); + text_area = new ScrollPane(); + text_area.setBounds(text_area_x, text_area_y, text_area_width, text_area_height); + + text_area_panel = new Panel(); + text_area_panel.setLayout(new OneColumnLayout()); + text_area.add(text_area_panel); + text_field = new TextField(50); + text_field.setBounds(text_field_x, text_field_y, text_field_width, text_field_height); + text_field.addActionListener(this); + + send_button = new Button("Send"); + send_button.setBounds(send_button_x, send_button_y, send_button_width, send_button_height); + send_button.addActionListener(this); + + p.add(text_area); + p.add(text_field); + p.add(send_button); + + add(p); + enableEvents(AWTEvent.WINDOW_EVENT_MASK); + } + + protected void processWindowEvent(WindowEvent e) { + if (e.getID() == WindowEvent.WINDOW_CLOSING) { + + // Clear all previous messages. + //text_area.setText(""); + dispose(); + } + + } + + private void postMessage() { + + if (!text_field.getText().equals("")) { + receiveMessage(sender.user_name, text_field.getText()); + + listener.postPrivateMessage(receiver.user_name, text_field.getText()); + + text_field.setText(""); + } + + } + + public void actionPerformed(ActionEvent e) { + Object src = e.getSource(); + + if (src == text_field || src == send_button) + postMessage(); + + + } + + public void receiveMessage(String user_name, String msg) { + if (user_name == null) + user_name = "Unknown"; + + text_area_panel.add(new adChatFormatMessage(format_msg_width, user_name, msg)); + text_area_panel.repaint(); + text_area_panel.validate(); + text_area.validate(); + + //text_area.append(msg); + //text_area.append("\n"); + + } +} + + + + + + + Index: openacs-4/packages/chat/java/adUserInfo.java =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/java/Attic/adUserInfo.java,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/java/adUserInfo.java 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,18 @@ +import java.io.Serializable; + +public class adUserInfo implements Serializable{ + public String user_id = null; + public String user_name = null; + public boolean moderator = false; + + public adUserInfo(String user_id, String user_name) { + this.user_id = user_id; + this.user_name = user_name; + } + + public adUserInfo(String user_id, String user_name, boolean moderator) { + this.user_id = user_id; + this.user_name = user_name; + this.moderator = moderator; + } +} Index: openacs-4/packages/chat/sql/oracle/chat-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/sql/oracle/chat-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/sql/oracle/chat-create.sql 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,569 @@ +-- +-- packages/chat/sql/chat-create.sql +-- +-- @author ddao@arsdigita.com +-- @creation-date November 09, 2000 +-- @cvs-id $Id: chat-create.sql,v 1.1 2001/04/20 20:51:08 donb Exp $ +-- + +begin + + -- create the privileges + acs_privilege.create_privilege('chat_room_create', 'Create chat room'); + acs_privilege.create_privilege('chat_room_view', 'View room information'); + acs_privilege.create_privilege('chat_room_edit', 'Edit chat room'); + acs_privilege.create_privilege('chat_room_delete', 'Delete chat room'); + + acs_privilege.create_privilege('chat_transcript_create', 'Create chat transcript'); + acs_privilege.create_privilege('chat_transcript_view', 'View chat transcript'); + acs_privilege.create_privilege('chat_transcript_edit', 'Edit chat transcipt'); + acs_privilege.create_privilege('chat_transcript_delete', 'Delete chat transcript'); + + acs_privilege.create_privilege('chat_room_moderate', 'Moderate chat room'); + + acs_privilege.create_privilege('chat_moderator_grant', 'Add moderator to a chat room'); + acs_privilege.create_privilege('chat_moderator_revoke', 'Remove moderator from a chat room'); + + acs_privilege.create_privilege('chat_user_grant', 'Grant user to a chat room'); + acs_privilege.create_privilege('chat_user_revoke', 'Remove user from a chat room'); + acs_privilege.create_privilege('chat_user_ban', ' Ban user from a chat room'); + acs_privilege.create_privilege('chat_user_unban', 'Unban user from a chat room'); + + acs_privilege.create_privilege('chat_ban', 'Ban from a chat room'); + acs_privilege.create_privilege('chat_read', 'View chat message'); + acs_privilege.create_privilege('chat_write', 'Write chat message'); + + -- Set of privileges for regular chat user. + acs_privilege.create_privilege('chat_user', 'Regular chat user'); + acs_privilege.add_child('chat_user', 'chat_read'); + acs_privilege.add_child('chat_user', 'chat_write'); + + -- Set of privileges for moderator of the chat room. + acs_privilege.create_privilege('chat_moderator', 'Chat room moderator'); + acs_privilege.add_child('chat_moderator', 'chat_room_moderate'); + acs_privilege.add_child('chat_moderator', 'chat_user_ban'); + acs_privilege.add_child('chat_moderator', 'chat_user_unban'); + acs_privilege.add_child('chat_moderator', 'chat_user_grant'); + acs_privilege.add_child('chat_moderator', 'chat_user_revoke'); + acs_privilege.add_child('chat_moderator', 'chat_transcript_create'); + acs_privilege.add_child('chat_moderator', 'chat_transcript_view'); + acs_privilege.add_child('chat_moderator', 'chat_transcript_edit'); + acs_privilege.add_child('chat_moderator', 'chat_transcript_delete'); + acs_privilege.add_child('chat_moderator', 'chat_user'); + + -- Set of privileges for administrator of the chat room. + acs_privilege.create_privilege('chat_room_admin', 'Chat room administrator'); + acs_privilege.add_child('chat_room_admin', 'chat_room_create'); + acs_privilege.add_child('chat_room_admin', 'chat_room_delete'); + acs_privilege.add_child('chat_room_admin', 'chat_room_edit'); + acs_privilege.add_child('chat_room_admin', 'chat_room_view'); + acs_privilege.add_child('chat_room_admin', 'chat_moderator_grant'); + acs_privilege.add_child('chat_room_admin', 'chat_moderator_revoke'); + acs_privilege.add_child('chat_room_admin', 'chat_moderator'); + + -- Site wite admin also administrator of the chat room. + acs_privilege.add_child('admin', 'chat_room_admin'); +end; +/ +show errors + + +declare + attr_id acs_attributes.attribute_id%TYPE; +begin + -- create chat room object type + acs_object_type.create_type ( + supertype => 'acs_object', + object_type => 'chat_room', + pretty_name => 'Chat Room', + pretty_plural => 'Chat Rooms', + table_name => 'CHAT_ROOMS', + id_column => 'ROOM_ID' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'chat_room', + attribute_name => 'pretty_name', + pretty_name => 'Room name', + pretty_plural => 'Room names', + datatype => 'string' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'chat_room', + attribute_name => 'description', + pretty_name => 'Description', + pretty_plural => 'Descriptions', + datatype => 'string' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'chat_room', + attribute_name => 'moderated_p', + pretty_name => 'Moderated', + pretty_plural => 'Moderated', + datatype => 'boolean' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'chat_room', + attribute_name => 'active_p', + pretty_name => 'Activated', + pretty_plural => 'Activated', + datatype => 'boolean' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'chat_room', + attribute_name => 'archive_p', + pretty_name => 'Archived', + pretty_plural => 'Archived', + datatype => 'boolean' + ); +end; +/ +show errors; + +create table chat_rooms ( + room_id integer + constraint chat_rooms_room_id_pk primary key + constraint chat_rooms_room_id_fk + references acs_objects(object_id), + -- This is room name. + pretty_name varchar2(100) + constraint chat_rooms_pretty_name_nn not null, + description varchar2(2000), + moderated_p char(1) default 'f' + constraint chat_rooms_moderate_p_ck + check (moderated_p in ('t','f')), + active_p char(1) default 't' + constraint chat_rooms_active_p_ck + check (active_p in ('t','f')), + -- if set then log all chat messages in this room. + archive_p char(1) default 'f' + constraint chat_rooms_archive_p_ck + check (archive_p in ('t', 'f')) +); + +declare + attr_id acs_attributes.attribute_id%TYPE; +begin + -- create chat transcript object type + acs_object_type.create_type ( + supertype => 'acs_object', + object_type => 'chat_transcript', + pretty_name => 'Chat Transcript', + pretty_plural => 'Chat Transcripts', + table_name => 'CHAT_TRANSCRIPTS', + id_column => 'TRANSCRIPT_ID' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'chat_transcript', + attribute_name => 'pretty_name', + pretty_name => 'Transcript name', + pretty_plural => 'Transcript names', + datatype => 'string' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'chat_transcript', + attribute_name => 'description', + pretty_name => 'Description', + pretty_plural => 'Descriptions', + datatype => 'string' + ); + + attr_id := acs_attribute.create_attribute ( + object_type => 'chat_transcript', + attribute_name => 'contents', + pretty_name => 'Transcript content', + pretty_plural => 'Transcript contents', + datatype => 'string' + ); +end; +/ +show errors + +create table chat_transcripts ( + transcript_id integer + constraint chat_trans_transcript_id_pk primary key + constraint chat_trans_transcript_id_fk + references acs_objects(object_id), + contents clob + constraint chat_trans_contents_nn not null, + -- Chat transcript name. + pretty_name varchar2(100) + constraint chat_trans_pretty_name_nn not null, + description varchar2(2000), + room_id integer + constraint chat_trans_room_id_fk references chat_rooms +); + +create table chat_msgs ( + msg_id integer + constraint chat_msgs_msg_id_pk primary key, + msg varchar2(4000), + msg_len integer + constraint chat_msgs_msg_len_ck + check (msg_len >= 0), + html_p char(1) default 'f' + constraint chat_msgs_html_p_ck + check (html_p in ('t','f')), + approved_p char(1) default 't' + constraint chat_msgs_approve_p_ck + check(approved_p in ('t','f')), + creation_user integer + constraint chat_msgs_creation_user_fk + references parties(party_id) + constraint chat_msgs_creation_user_nn not null, + creation_ip varchar2(50) , + creation_date date + constraint chat_msgs_creation_date_nn not null, + room_id integer + constraint chat_msgs_room_id_fk references chat_rooms +); + +-- +-- Package declaration +-- + +create or replace package chat_room +as + function new ( + room_id in chat_rooms.room_id%TYPE default null, + pretty_name in chat_rooms.pretty_name%TYPE, + description in chat_rooms.description%TYPE default null, + moderated_p in chat_rooms.moderated_p%TYPE default 'f', + active_p in chat_rooms.active_p%TYPE default 't', + archive_p in chat_rooms.archive_p%TYPE default 'f', + context_id in acs_objects.context_id%TYPE default null, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'chat_room' + ) return acs_objects.object_id%TYPE; + + procedure delete ( + room_id in chat_rooms.room_id%TYPE + ); + + procedure edit ( + room_id in chat_rooms.room_id%TYPE, + pretty_name in chat_rooms.pretty_name%TYPE, + description in chat_rooms.description%TYPE, + moderated_p in chat_rooms.moderated_p%TYPE, + active_p in chat_rooms.active_p%TYPE, + archive_p in chat_rooms.archive_p%TYPE + ); + + function name ( + room_id in chat_rooms.room_id%TYPE + ) return chat_rooms.pretty_name%TYPE; + + procedure message_post ( + room_id in chat_msgs.room_id%TYPE, + msg in chat_msgs.msg%TYPE default null, + html_p in chat_msgs.html_p%TYPE default 'f', + approved_p in chat_msgs.approved_p%TYPE default 't', + creation_user in chat_msgs.creation_user%TYPE, + creation_ip in chat_msgs.creation_ip%TYPE default null, + creation_date in chat_msgs.creation_date%TYPE default sysdate + ); + + function message_count ( + room_id in chat_rooms.room_id%TYPE + ) return integer; + + procedure delete_all_msgs ( + room_id in chat_rooms.room_id%TYPE + ); + +end chat_room; +/ +show errors + +create or replace package chat_transcript +as + function new ( + transcript_id in chat_transcripts.transcript_id%TYPE default null, + pretty_name in chat_transcripts.pretty_name%TYPE, + contents in chat_transcripts.contents%TYPE, + description in chat_transcripts.description%TYPE, + room_id in chat_transcripts.room_id%TYPE, + context_id in acs_objects.context_id%TYPE default null, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'chat_transcript' + ) return acs_objects.object_id%TYPE; + + procedure delete ( + transcript_id in chat_transcripts.transcript_id%TYPE + ); + + procedure edit ( + transcript_id in chat_transcripts.transcript_id%TYPE, + pretty_name in chat_transcripts.pretty_name%TYPE, + contents in chat_transcripts.contents%TYPE, + description in chat_transcripts.description%TYPE + ); +end chat_transcript; +/ +show errors + +-- +-- End package definition +-- + +-- +-- Begin package body +-- + +create or replace package body chat_room +as + function new ( + room_id in chat_rooms.room_id%TYPE default null, + pretty_name in chat_rooms.pretty_name%TYPE, + description in chat_rooms.description%TYPE default null, + moderated_p in chat_rooms.moderated_p%TYPE default 'f', + active_p in chat_rooms.active_p%TYPE default 't', + archive_p in chat_rooms.archive_p%TYPE default 'f', + context_id in acs_objects.context_id%TYPE default null, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'chat_room' + ) return acs_objects.object_id%TYPE + is + v_room_id chat_rooms.room_id%TYPE; + begin + v_room_id := acs_object.new ( + object_type => object_type, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + context_id => context_id + ); + + insert into chat_rooms ( + room_id, + pretty_name, + description, + moderated_p, + active_p, + archive_p) + values ( + v_room_id, + pretty_name, + description, + moderated_p, + active_p, + archive_p); + + return v_room_id; + end new; + + procedure delete ( + room_id in chat_rooms.room_id%TYPE + ) + is + begin + -- First erase all the messages relate to this chat room. + delete from chat_msgs where room_id = chat_room.delete.room_id; + + -- Delete all privileges associate with this room + delete from acs_permissions where object_id = chat_room.delete.room_id; + + -- Now delete the chat room itself. + delete from chat_rooms where room_id = chat_room.delete.room_id; + + acs_object.delete(room_id); + end delete; + + procedure edit ( + room_id in chat_rooms.room_id%TYPE, + pretty_name in chat_rooms.pretty_name%TYPE, + description in chat_rooms.description%TYPE, + moderated_p in chat_rooms.moderated_p%TYPE, + active_p in chat_rooms.active_p%TYPE, + archive_p in chat_rooms.archive_p%TYPE + ) + is + begin + update chat_rooms set + pretty_name = chat_room.edit.pretty_name, + description = chat_room.edit.description, + moderated_p = chat_room.edit.moderated_p, + active_p = chat_room.edit.active_p, + archive_p = chat_room.edit.archive_p + where + room_id = chat_room.edit.room_id; + end edit; + + function name ( + room_id in chat_rooms.room_id%TYPE + ) return chat_rooms.pretty_name%TYPE + is + v_room_name chat_rooms.pretty_name%TYPE; + begin + select pretty_name into v_room_name + from chat_rooms + where room_id = chat_room.name.room_id; + + return v_room_name; + end name; + + procedure message_post ( + room_id in chat_msgs.room_id%TYPE, + msg in chat_msgs.msg%TYPE default null, + html_p in chat_msgs.html_p%TYPE default 'f', + approved_p in chat_msgs.approved_p%TYPE default 't', + creation_user in chat_msgs.creation_user%TYPE, + creation_ip in chat_msgs.creation_ip%TYPE default null, + creation_date in chat_msgs.creation_date%TYPE default sysdate + ) + is + v_msg_id chat_msgs.msg_id%TYPE; + v_msg_archive_p chat_rooms.archive_p%TYPE; + v_msg chat_msgs.msg%TYPE; + begin + -- Get msg id from the global acs_object sequence. + select acs_object_id_seq.nextval into v_msg_id from dual; + + select archive_p into v_msg_archive_p + from chat_rooms + where room_id = chat_room.message_post.room_id; + + if v_msg_archive_p = 't' then + v_msg := msg; + else + v_msg := null; + end if; + + -- Insert into chat_msgs table. + insert into chat_msgs ( + msg_id, + room_id, + msg, + msg_len, + html_p, + approved_p, + creation_user, + creation_ip, + creation_date) + values ( + v_msg_id, + room_id, + v_msg, + nvl(length(msg), 0), + html_p, + approved_p, + creation_user, + creation_ip, + creation_date) ; + end message_post; + + + function message_count ( + room_id in chat_rooms.room_id%TYPE + ) return integer + is + v_count integer; + begin + select count(*) into v_count + from chat_msgs + where room_id = chat_room.message_count.room_id; + + return v_count; + end message_count; + + procedure delete_all_msgs ( + room_id in chat_rooms.room_id%TYPE + ) + is + begin + delete from chat_msgs where room_id = chat_room.delete_all_msgs.room_id; + end delete_all_msgs; + +end chat_room; +/ +show errors + + +create or replace package body chat_transcript +as + function new ( + transcript_id in chat_transcripts.transcript_id%TYPE default null, + pretty_name in chat_transcripts.pretty_name%TYPE, + contents in chat_transcripts.contents%TYPE, + description in chat_transcripts.description%TYPE, + room_id in chat_transcripts.room_id%TYPE, + context_id in acs_objects.context_id%TYPE default null, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null, + object_type in acs_objects.object_type%TYPE default 'chat_transcript' + ) return acs_objects.object_id%TYPE + is + v_transcript_id chat_transcripts.transcript_id%TYPE; + begin + v_transcript_id := acs_object.new ( + object_type => object_type, + creation_date => creation_date, + creation_user => creation_user, + creation_ip => creation_ip, + context_id => context_id + ); + + insert into chat_transcripts (transcript_id, pretty_name, contents, description, room_id) + values (v_transcript_id, pretty_name, empty_clob(), description, room_id); + + return v_transcript_id; + end new; + + procedure delete ( + transcript_id in chat_transcripts.transcript_id%TYPE + ) + is + begin + + -- Delete all privileges associate with this transcript + delete from acs_permissions where object_id = chat_transcript.delete.transcript_id; + + delete from chat_transcripts + where transcript_id = chat_transcript.delete.transcript_id; + + acs_object.delete(transcript_id); + end delete; + + procedure edit ( + transcript_id in chat_transcripts.transcript_id%TYPE, + pretty_name in chat_transcripts.pretty_name%TYPE, + contents in chat_transcripts.contents%TYPE, + description in chat_transcripts.description%TYPE + ) + is + begin + update chat_transcripts + set pretty_name = chat_transcript.edit.pretty_name, + contents = chat_transcript.edit.contents, + description = chat_transcript.edit.description + where + transcript_id = chat_transcript.edit.transcript_id; + + end edit; + +end chat_transcript; +/ +show errors + + + + + + + + + + Index: openacs-4/packages/chat/sql/oracle/chat-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/sql/oracle/chat-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/sql/oracle/chat-drop.sql 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,90 @@ +-- +-- packages/chat/sql/chat-drop.sql +-- +-- @author ddao@arsdigita.com +-- @creation-date November 09, 2000 +-- @cvs-id $Id: chat-drop.sql,v 1.1 2001/04/20 20:51:08 donb Exp $ +-- + +-- +-- Drop chat_room object type +-- +begin + acs_object_type.drop_type('chat_room'); + acs_object_type.drop_type('chat_transcript'); +end; +/ +show errors + + +drop package chat_room; +drop package chat_transcript; + +drop table chat_msgs; +drop table chat_transcripts; +drop table chat_rooms; + +-- +-- Drop all chat privileges +-- +begin + + -- Drop child privileges for regular chat user. + acs_privilege.remove_child('chat_user', 'chat_read'); + acs_privilege.remove_child('chat_user', 'chat_write'); + + -- Drop child privileges for chat moderator. + acs_privilege.remove_child('chat_moderator', 'chat_room_moderate'); + acs_privilege.remove_child('chat_moderator', 'chat_user_ban'); + acs_privilege.remove_child('chat_moderator', 'chat_user_unban'); + acs_privilege.remove_child('chat_moderator', 'chat_user_grant'); + acs_privilege.remove_child('chat_moderator', 'chat_user_revoke'); + acs_privilege.remove_child('chat_moderator', 'chat_transcript_create'); + acs_privilege.remove_child('chat_moderator', 'chat_transcript_view'); + acs_privilege.remove_child('chat_moderator', 'chat_transcript_edit'); + acs_privilege.remove_child('chat_moderator', 'chat_transcript_delete'); + acs_privilege.remove_child('chat_moderator', 'chat_user'); + + -- Drop child privileges for chat administrator. + acs_privilege.remove_child('chat_room_admin', 'chat_room_create'); + acs_privilege.remove_child('chat_room_admin', 'chat_room_delete'); + acs_privilege.remove_child('chat_room_admin', 'chat_room_edit'); + acs_privilege.remove_child('chat_room_admin', 'chat_room_view'); + acs_privilege.remove_child('chat_room_admin', 'chat_moderator_grant'); + acs_privilege.remove_child('chat_room_admin', 'chat_moderator_revoke'); + acs_privilege.remove_child('chat_room_admin', 'chat_moderator'); + + + acs_privilege.drop_privilege('chat_room_create'); + acs_privilege.drop_privilege('chat_room_view'); + acs_privilege.drop_privilege('chat_room_edit'); + acs_privilege.drop_privilege('chat_room_delete'); + acs_privilege.drop_privilege('chat_transcript_create'); + acs_privilege.drop_privilege('chat_transcript_view'); + acs_privilege.drop_privilege('chat_transcript_edit'); + acs_privilege.drop_privilege('chat_transcript_delete'); + acs_privilege.drop_privilege('chat_room_moderate'); + acs_privilege.drop_privilege('chat_moderator_grant'); + acs_privilege.drop_privilege('chat_moderator_revoke'); + acs_privilege.drop_privilege('chat_user_grant'); + acs_privilege.drop_privilege('chat_user_revoke'); + acs_privilege.drop_privilege('chat_user_ban'); + acs_privilege.drop_privilege('chat_user_unban'); + acs_privilege.drop_privilege('chat_ban'); + acs_privilege.drop_privilege('chat_read'); + acs_privilege.drop_privilege('chat_write'); + acs_privilege.drop_privilege('chat_room_admin'); + acs_privilege.drop_privilege('chat_moderator'); + acs_privilege.drop_privilege('chat_user'); +end; +/ +show errors + + + + + + + + + Index: openacs-4/packages/chat/tcl/chat-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/chat-init.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/tcl/chat-init.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,81 @@ +# /chat/tcl/chat-init.tcl +ad_library { + Startup script for the chat system. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 17, 2000 + @cvs-id $Id: chat-init.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} + +nsv_set chat new_message [ns_mutex create] + +nsv_set chat server_started 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/chat/tcl/chat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/chat-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/tcl/chat-procs.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,564 @@ +# /chat/tcl/chat-procs.tcl +ad_library { + TCL Library for the chat system v.4 + + @author David Dao (ddao@arsdigita.com) + @creation-date November 17, 2000 + @cvs-id $Id: chat-procs.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} + +ad_proc -private chat_start_server {} { Start Java chat server. } { + + if [nsv_get chat server_started] { + return + } + ns_log notice "Starting chat server" + set port [ad_parameter ServerPort] + set path "ns/server/[ns_info server]/module/nssock" + set host_location "[ns_config $path Address]" + + exec java -classpath [acs_root_dir]/packages/chat/java adChatServer start $port & + + set done 0 + + # Wait until chat server started before spawning new threads connecting to the server. + while { $done == 0} { + if [catch {set fds [ns_sockopen -nonblock $host_location $port]} errmsg] { + set done 0 + } else { + set done 1 + } + } + + # Free up resources. + set r [lindex $fds 0] + set w [lindex $fds 1] + + close $r + close $w + ns_thread begindetached "chat_broadcast_to_applets $host_location $port" + ns_thread begindetached "chat_receive_from_server $host_location $port" + + ns_log notice "Chat server started." + nsv_set chat server_started 1 +} + +ad_proc -private chat_broadcast_to_applets {host port} { Broadcast chat message from HTML client to Java server. } { + + # Chat server must already started otherwise error will occur. + set fds [ns_sockopen -nonblock $host $port] + + set r [lindex $fds 0] + set w [lindex $fds 1] + + ns_log notice "Ready to broadcast message to applets." + + # Register to java chat server. + puts $w "-1AOL_WRITERT-1" + flush $w + + while { 1 } { + # Wait until there is new message in queue. + ns_mutex lock [nsv_get chat new_message] + if [nsv_exists chat html_message] { + # Get message from queue. + puts $w [nsv_get chat html_message] + flush $w + } + } +} + + +ad_proc -private chat_receive_from_server {host port} { Receive messages from Java clients. } { + + set fds [ns_sockopen -nonblock $host $port] + + set r [lindex $fds 0] + set w [lindex $fds 1] + set r_fd [list $r] + + ns_log notice "Listening for messages from applets." + + puts $w "-1AOL_READERT-1" + flush $w + + set running 1 + + while { $running } { + set sel [ns_sockselect $r_fd {} {}] + set rfds [lindex $sel 0] + + foreach r $rfds { + + if {[ns_sockcheck $r] && [set line [string trim [gets $r]]] != ""} { + regexp "(.*)" $line match room_id + regexp "(.*)" $line match screen_name + regexp "(.*)" $line match msg + regexp "(.*)" $line match user_id + if ![nsv_exists chat_room $room_id] { + nsv_set chat_room $room_id {} + } + if [catch {chat_post_message_to_db -creation_user $user_id $room_id $msg} errmsg] { + ns_log "Chat post msg error: $errmsg" + } + nsv_lappend chat_room $room_id $line + + } else { + set running 0 + } + } + } +} + +ad_proc -private chat_post_message_to_db { + {-creation_user ""} + {-creation_ip ""} + room_id + msg +} { + Log chat message to the database. +} { + db_dml post_message { + begin + chat_room.message_post ( + room_id => :room_id, + msg => :msg, + creation_user => :creation_user, + creation_ip => :creation_ip + ); + end; + } + +} +ad_proc -public chat_room_new { + {-description ""} + {-moderated_p f} + {-active_p t} + {-archive_p f} + {-context_id ""} + {-creation_user ""} + {-creation_ip ""} + pretty_name + +} { + Create new chat room. Return room_id if successful else raise error. +} { + db_transaction { + set room_id [db_exec_plsql create_room { + 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 + ); + -- Automatic grant room privilege to creator of the room (must not be null). + if :creation_user <> '' + then + acs_permission.grant_permission(:1, :creation_user, 'chat_room_edit'); + acs_permission.grant_permission(:1, :creation_user, 'chat_room_view'); + acs_permission.grant_permission(:1, :creation_user, 'chat_room_delete'); + acs_permission.grant_permission(:1, :creation_user, 'chat_transcript_create'); + end if; + end; + }] + } + + return $room_id +} + +ad_proc -public chat_room_edit { + room_id + pretty_name + description + moderated_p + active_p + archive_p +} { + Edit information on chat room. All information require. +} { + return [db_exec_plsql edit_room { + 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 + ); + end; + }] +} + +ad_proc -public chat_room_delete { + room_id +} { + Delete chat room. +} { + db_exec_plsql delete_room { + begin + chat_room.delete(:room_id); + end; + } +} + +ad_proc -public chat_room_message_delete { + room_id +} { + Delete all message in the room. +} { + db_exec_plsql delete_message { + begin + chat_room.delete_all_msgs(:room_id); + end; + } +} + +ad_proc -public chat_message_count { + room_id +} { + Get message count in the room. +} { + return [db_exec_plsql message_count { + begin + :1 := chat_room.message_count(:room_id); + end; + }] +} + +ad_proc -public chat_room_name { + room_id +} { + Get chat room name. +} { + return [db_exec_plsql get_room_name { + begin + :1 := chat_room.name(:room_id); + end; + }] + +} + +ad_proc -public chat_moderator_grant { + room_id + party_id +} { + Grant party a chat moderate privilege to this chat room. +} { + db_dml grant_moderator { + begin + acs_permission.grant_permission(:room_id, :party_id, 'chat_room_moderate'); + end; + } +} + +ad_proc -public chat_moderator_revoke { + room_id + party_id +} { + Revoke party a chat moderate privilege to this chat room. +} { + + db_dml revoke_moderator { + begin + acs_permission.revoke_permission(:room_id, :party_id, 'chat_room_moderate'); + end; + } + +} + +ad_proc -public chat_user_grant { + room_id + party_id +} { + Grant party a chat privilege to this chat room. +} { + db_transaction { + db_dml grant_user { + begin + acs_permission.grant_permission(:room_id, :party_id, 'chat_write'); + acs_permission.grant_permission(:room_id, :party_id, 'chat_read'); + end; + } + } +} + + +ad_proc -public chat_user_revoke { + room_id + party_id +} { + Revoke party a chat privilege to this chat room. +} { + db_transaction { + db_dml revoke_user { + begin + acs_permission.revoke_permission(:room_id, :party_id, 'chat_write'); + acs_permission.revoke_permission(:room_id, :party_id, 'chat_read'); + end; + } + } +} + +ad_proc -public chat_user_ban { + room_id + party_id +} { + Explicit ban user from this chat room. +} { + db_dml ban_user { + begin + acs_permission.grant_permission(:room_id, :party_id, 'chat_ban'); + end; + } +} + + +ad_proc -public chat_user_unban { + room_id + party_id +} { + unban user from this chat room. +} { + db_dml ban_user { + begin + acs_permission.revoke_permission(:room_id, :party_id, 'chat_ban'); + end; + } +} + +ad_proc -public chat_revoke_moderators { + room_id + revoke_list +} { + Revoke a list of parties of a moderate privilege from this room. +} { + foreach party_id $revoke_list { + db_dml revoke_moderate { + begin + acs_persmission.revoke_permission(:room_id, :party_id, 'chat_moderate_room'); + end + } + } + +} + +ad_proc -public chat_room_moderate_p { + room_id +} { + Return the moderate status of this chat room. +} { + set moderate_p [db_string get_chat_room_moderate { + select moderated_p + from chat_rooms + where room_id = :room_id + }] + + return $moderate_p + +} + +ad_proc -public chat_user_name { + user_id +} { + Return display name of this user to use in chat. +} { + return [db_exec_plsql get_chat_user_name { + begin + :1 := person.name(:user_id); + end; + }] + +} + +ad_proc -public chat_message_post { + room_id + user_id + message + moderator_p +} { + Post message to the chat room and broadcast to all applet clients. Only use by HTML client. +} { + if {$moderator_p == "1" } { + set status "approved" + } else { + set status "pending" + } + + set chat_msg "[chat_user_name $user_id]$user_id$room_id$message$status" + + # Add message to queue. Notify thread responsible for broadcast message to applets. + nsv_set chat html_message $chat_msg + ns_mutex unlock [nsv_get chat new_message] +} + + +ad_proc -public chat_moderate_message_post { + room_id + user_id + message +} { + Post moderate message to the chat room and broadcast to all applet clients. Only use by HTML client. +} { + set chat_msg "[chat_user_name $user_id]$user_id$room_id$messagepending" + + # Add message to queue. Notify thread responsible for broadcast message to applets. + nsv_set chat html_message $chat_msg + ns_mutex unlock [nsv_get chat new_message] +} + +ad_proc -public chat_message_retrieve { + msgs + room_id + user_id +} { + Retrieve all messages from the chat room starting from first_msg_id. Return messages are store in multirow format. +} { + + ns_log notice "In chat message retrieve" + + # The first time html client enter chat room, chat_room variable is not initialize correctly. + # Therefore I just hard code the variable. + if ![nsv_exists chat_room $room_id] { + nsv_set chat_room $room_id [list "[chat_user_name $user_id]$room_idhas entered the roomapproved"] + } + + set user_name [chat_user_name $user_id] + + upvar "$msgs:rowcount" counter + + set chat_messages [nsv_get chat_room $room_id] + + set count [llength $chat_messages] + + set cnt $count + set counter 0 + + #foreach msg $chat_messages + for { set i [expr $cnt - 1] } { $i >= 0 } { set i [expr $i - 1] } { + set msg [lindex $chat_messages $i] + regexp "(.*)" $msg match screen_name + regexp "(.*)" $msg match chat_msg + regexp "(.*)" $msg match status + + + if {$status == "pending" || $status == "rejected"} { + continue; + } + + upvar "$msgs:[expr {$counter + 1}]" array_val + + set array_val(screen_name) $screen_name + set array_val(chat_msg) $chat_msg + incr counter + set array_val(rownum) $counter + + if {$screen_name == $user_name && $chat_msg == "has entered the room."} { + return + } + } + +} + + +ad_proc -public chat_transcript_new { + {-description ""} + {-context_id ""} + {-creation_user ""} + {-creation_ip ""} + pretty_name + contents + room_id +} { + Create chat transcript. +} { + + db_transaction { + set transcript_id [db_exec_plsql create_transcript { + 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 + ); + -- Automatic grant transcript privilege to creator of the transcript (must not be null). + if :creation_user is not null + then + acs_permission.grant_permission(:1, :creation_user, 'chat_transcript_edit'); + acs_permission.grant_permission(:1, :creation_user, 'chat_transcript_view'); + acs_permission.grant_permission(:1, :creation_user, 'chat_transcript_delete'); + end if; + end; + }] + db_dml transcript_content { + update chat_transcripts + set contents = empty_clob() + where transcript_id = :transcript_id + returning contents into :1 + } -clobs [list $contents] + } on_error { + ad_return_complaint "Insert fail" $errmsg + } + + return $transcript_id + +} + +ad_proc -public chat_transcript_delete { + transcript_id +} { + Delete chat transcript. +} { + db_exec_plsql delete_transcript { + begin + chat_transcript.delete(:transcript_id); + end; + } +} + +ad_proc -public chat_transcript_edit { + transcript_id + pretty_name + description + contents +} { + Edit chat transcript. +} { + db_transaction { + db_exec_plsql edit_transcript { + begin + chat_transcript.edit( + transcript_id => :transcript_id, + pretty_name => :pretty_name, + contents => :empty_clob(), + description => :description); + end; + } + db_dml transcript_content { + update chat_transcripts + set contents = empty_clob() + where transcript_id = :transcript_id + returning contents into :1 + } -clobs [list $contents] + } + +} + + + + + + + + + + Index: openacs-4/packages/chat/www/chat-room-grant.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/chat-room-grant.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/chat-room-grant.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,41 @@ +ad_page_contract { + + @author David Dao (ddao@arsdigita.com) + @creation-date November 16, 2000 + @cvs-id $Id: chat-room-grant.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull + pretty_name:trim,notnull + require_privilege:trim,notnull + assign_privilege:trim,notnull +} + +ad_require_permission $room_id $require_privilege + +doc_body_append "[ad_header "Grant permission on $pretty_name"] + +

      Grant permission on $pretty_name

      + +[ad_context_bar "Grant permission on $pretty_name"] + +
      + +
      +[export_form_vars room_id require_privilege assign_privilege] + + +
      + +[ad_footer] +" Index: openacs-4/packages/chat/www/chat.jar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/chat.jar,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/chat.jar 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,242 @@ +PK#2* META-INF/��PKPK#2*META-INF/MANIFEST.MF�M��LK-.� +K-*��ϳR0�3��r.JM,IM�u� �*h��)�f&�W���+x�%�i�r�rPK����DDPK2*OneColumnLayout.class�T]s�D=IV�*�W8�G�%�P�����n�I��)Ӈn��V���,��� x�S᭝i������h�Z�q�t�����s�޽������?�` _�X���u�긬㊎/L�8iB�m��*��̚�ȑ�A��y���Yi�$6o��{�|`�c�-�q��'X��)�Y� �Z�`�BU�Kx��-|�e%��ӎ���}����øt��E�� �p����A�tc��h�����}�-C6WY\ ��0�di�z]�t�Q6wSz +�y��{���o�*{<���s#�nő��o�2u� �x�A��M���S�j��o����:u#����u�C؋̭�5Ě'�ެ�y�F>�7D��[���.�4fx��DfCQ���ux,ז�#E�Zb�4=:��=�� ���D�f��A�"!����$�-�V��j��w �{��z}i3o�upP�Qpx ti�`��H&��Go U�3�< 9�S���?*8�s(e�#��E3�"�Jehv�=��q �>tj)jc�4�|!�,Ѩ@8��,�c���"��f %������L�A=�E�j�d�G����( =���I}�hwe�Fq��Q���UN)e�1V�����qg|�?�(�����y�)� Sx���{����_`���"��l�N=z������G=x^����Q +��;L�� .�d9dX+b��XdK(�e�Y u��Mvߐ���h��*�)�K�)HHn"BUʚ2�r��w ��5;�ϻ/h3�t ��J���^����y����K�8�9V4p hbPCXMA\�(vHM7BaXCF�h�h +2��c:�0��I���:#�#�9�jc + �H�x�� ���̮�g��r�2�\7iב�@�3���ۦSHe�g9rw���y�&C����{��x�̧��l$�W���žL�=�KNZ�����d�2�eޕ�Ύ��*� +� o*J�:,ǒ� �i7/��n���+ +q`IC�jH� ����t�m������� CW�rīJi[xo�m��E���ڤ:$U#�!��[�rb�R�P�БE!��0��o +o��J"O,Ibs��Enj�O}�@�!twA�&���ȋ�'��e=�+2݁��d,_ +: ��R�$x��+r����bM��!���Jm�v�$H����(+v�⢔t�� +1�*�V�~��_us��L�#���eJ���Yz WhDԕ'{� И�-�I�'��l#��6N�J|A���*��й�Xu'���' ���)�[V��$��誢���#J�b��(��=��{L�8��cB|�~`5�ߩ��3��z�E�PK[�6�jPK2*adChatApplet$2.classmP�JA�6�5��<|]<Ā�xU��(����'�!�̆�I�|��9�~�%����CwMu�t�||����Cl9h8Xw��b e�I�� +�=��B(�n�Vצ�V�N̅/2�˹�ƿU:�� �O��|��2���P���2 "��2%�zJ˫�d �k1�X���Y2���^*��6ciԐ�*�`,Lg:���?!4�Gv�"�!l�;U'S#B=/GB���"5rB�f�$��T��A��=6���=F;��R��g<Dz%���B؄���~*^Q�5ؿ=�H��jy�&�y���PK��|&�PK2*adChatApplet.class�Y |�Օ���$�d�|@Hy�< +^B!��W@C�K20� 3����Ţ��b���H��(&h,�Vj[��v��V�v�v���ֵ�]�9���d �����˹�{��׽���s瑀bz�A�s�DMr����)��A���A ��A�:�z�A��ᠧ�}u:謃^t�%]��f��5Z��2�Vh�R��Vi�Z��4Z��Z�j5Z��K��4�_�4ڣ��5��F{5��F��h�Fj�m����C=��~�htP�G4��C�='�� +&`���L0]�$<��p<�D�v"�81�wbN91��)�@�TcpƉ|�I�=:�y�������s���(x։��,������^p�:\3^�^��_vb +~(����E����^�`��A� ���?��~�D~��4�!o:1?�-�o ��d��ϒ�%���G��l�wE�{r��e�"�_x_�~)�>LF�Չ�����&~�w1��N��#������+���d�wB~,��^,����Q�Q��ޟ|"�ŌO��x�3�>O����+˾�%����&dk0����Y)%�-��> M��& S�!`��A���0V��T�* ��l��h�Nn��Iy:��ctj�uj��:y�L� +T��F�N'�l�$�'d���D�u +P?����SH�*ԩ��ujr3�֩��:m��n']�;d�N[l�픡�w��T��ݴX�{h�N�h�N���_���u:D�t:,�Ge�Q~L�1����4J�QuBV�o %�W�Q��Š�+���FW���1}��`����i�j������f�R����4L����E*-��?�SljïٻoEK������~�[�mj��IJ�}1�UT6�L�"�w�����r�x��`X�Y����̮ q@+Z�F,1�+$⬿Vh������ �ο6A�̙��G�r朖�z�,�҇8'є>��q*�ySy������o����tL��K��21?���О<��[%� �_�������f{ތOh&!iz����&�\3 +���<�V�F�ͷͼ���̫W+3-"`֙��(3�ً ��O�l�������p��&�>αr�+4�����e��.=�)22�U��\�Ҵ� ,u���=�� +�~�~u�r��3��\��^�w��.��ze"^�Rssh����{�=�������t5M����zᖐ�[r�+��30_[�o������L����g5�mq���IH��-�:s�GN�W��ͽµ��bIm�¥K�Ă���+8��9S��d�ޮVQ����ѧ��71����Hk� �j)��@�?�$��3_C�ɑ�fL��f�+bJ,;8W������Nj��1�P���q�Y�mXt����\Y�`�+쵺���5]�:�f;����� +�j+�|vi��VD��ͼ"��v����;�ZUn �w_.Ws� +n�K9�6��"ѭ��z�I)u������� �<�������|��S�m�1 �=A��q��]�M-./W`r�'�8q\���-�^y��)�P��q�� +S������16�_��%�� +�a)̙�7-Su0�[̨���"!2��J�Erؕ������m���ca�Y���,�J�r�Z������]�,P��戬��۲R��*vI���������$O�]YH�z�:�#Z��y��I�&���qsR��r!8U���"W-���Z�D|C����L�g���q����[_$;S��gz]�[m\�s�Xs�}+i ���{#�k|3��i����� ��W�Ǩq����r��{�zYσ�� +����������6q{���M| 8�R �k�Q�]+-��+�%���h��R)�Ӥ�������k3�Y��h�� +�ĭ��+���GR��L�=�Y6H�ܶ1=�;‘ 6! =�07�Z���M�V�m �5-`6�Y��X�OUX�lx�O��_����ncC�k�g��4h�q6{�E�,-�e���u2�����؃��N���K�e�UƦ#�M�Zg'a �m�R۩8�V�j!?w#9�#�f���XS�jc��Nlk�X��= �O챰� ��� �������fj�<5��'#�=�������j�c5�ǜ/G����_�j�Od5�'5�N�W4|�qWd<��8���@4����A(�%:�`�)F�f�>P;��_"⇙/ �tav��a��O�6�� X#`���np��-��l:� 𦃐��HE�cc��EF0�a(B&����i�1��[��Kh�e,� I��* �_UTЉ#�#E�}�����QB�>��wbMM �/R�[�;�ƺ����������a�0�,�4vvcjM�� ���X�i c�̯��0���x 3�1��cjx��N���]X\��7�okn)K-��޿�{O��l#ۏcs����9������ �O8���5Sc3��ՙ�b6F��㲭,���ns�5�� �.v:� �) ����)��3�����p�`*ȆjJ@��h�D�$�]�4�9�L�,э��~�n8-^j��Ҵ������� 3�#͚�o��`i�p���A٥��'�fe��l�bn#�]��9������;:80��C|� |ܹ�w:qȰ�9�a|[��x"�Ybďl�ŏm��'�/�F���R1�t��#m�v$��n7J8��,(8��(ti�:��S��f�̪�" Qa��,����pa7rybV5|7��v��@[��� +��i��F�`�B ݋2��]�N~P������.<�ʝM���uԵ�5� +�^�df�Ս�w�!���{�!<�GM)�톦��7�7Y�� +㯱��A�P��1��� UU|��iT�h [z9��r�%���p�8�0�C�����\��U�������e�~�>{s��_ ��<��?o�� +\��,�ۼ8�X�GmO�ǂ=�X(�y+�/��+� +�c����/�()���x0�.R�W�bP�E��!3�����~� �n��'��̞��Yn�E��g�����eM �N�c +�g�E$g%�+X;e������>+*���:�^k8a��=)p��q��gS!Fr�szO�I�MSQ�O�U|��r���x?�w�s�~�� ݂Gi>�dN�"<�O���V�G�����@ZN�i%���D��zZKUT�?��o�i3?�w�c{S�F~~������/Q��P�ޠ1l� �|��o�w���#�]�j���B%?u{�����#�������̽���%%���ݫ��}~�|�5�K~��� o�z�/g���{+�k�PKx�Z��PK2*adChatClient.class;�o�>f]nvvvNFQ +��IJD��ļt����̼tk�0F���TF~�̼T��ܤԢ�Ĥ�Wp~iQr�[&�Ó�✑X✓��W�� ������ �0�?)+5���(595�,�7��81=�������Y�d1�I&PK��̖�PK2*adChatClientInfo.class�P�J�P�۴�����~?Z���U����Bq�Foۨ�&�k��(� ?��焂� ���y�3瞏ϷwX�ƚ�9Kd0�@�( + �F�.�1�b�.1�bY� +&]T$� +�bZ��m\*��N������n�<1Atw�;#��A$G +�z��T��'A�væo.t��l��c��y�5-�8�uŅu�~��z'��� +�?S;2H!��a��>~J��{�Y��o1����$6�z� +S����:hSu�|�*'U�}�D�M摨��(�j?^�s�ϼc� )g�xh���4j�+,O���2=آ��@޳zȾ����kp�%d��rPD�SYs1�!nU�:��6�w3t����t�6���·�=����آ��f�_�PK�cZ�y�PK2*adChatClientListener.class�W�[U~G(ұ��E��M/JH�ݶT��V�h)U[�dS�L:�`ݺ�����~��}w�Pv��_�a����f������LJ�|��r��|����?�=�Љ�pO����p_ +���%�'xR��*�Q��U���E��H��*>Q1��S���\�*�T�U͸1��}A��MA��P-8��YV���Bn +b +n�UB�@�a��bH���]Ȱ��Fh�� �1َ5b#� o\�'�h���q~�j��]"8)*���-�t�1!�����YL 9-dZHF�%����f4�WH^ë�zM��B�� +o���ޖ�ޅ��=Ljx�j�i�Z�S���5��h��k� ��ְ �o�bI����4�[̾�D�_<���HG�>�w�vw��ͻ#�c�3� +Z�$Cy�\��(��V��l�J�]�8�`{$����t�/c��[��&�^�j��t+��Hm�'Dش,6���x&�H����F��] �`~r�r�2�p޲���!��b�o������G� +W�ř��ދҬm{�o���KX����a�i��� +6JU�s�3k8��Tޥ<��ﱺ���)CA[��Ϥ–�YAɩprلZ��&��k�Vش�z6�سFx����ra�rz��f�Whf���%�� +v�ι�6[V�8�,.�(�Q��R��e)�9����+����`m´���̄�JY��J�7��*t˽$"6k����c��z��ZY�3-����ӆ@ ��y'i6@�Ƚ9ט�-F9N(��q+��� x9+a��2��K��/K�i�*��R�Y�7�{P����V�m^(��,��y3�:��z*�3͹4��x�?ٯ���$ ��� W&V�qGY� C��y +�B8V��S��UɌ�#�`��%m��Q,���}6雌�%[`�GsS��v +0�5>�EYS�����Q�z�Q*k�����<�����VWP��2��!1ok�*����TAc��m�UgK$l/N�P�v$�e}Kt�U��M3<. ��Ø�H��ֆ�LkǶgN��Y��-��ڼ"��hs�.X��_�ZyV�g��,}��V>>��04��Q8��ߛ�6�f��{3_�����fa����'�P����ڢ���#dg��ze��d�����G7�5 �&VKX7���x�<�ϣs��EY����~�y�Z��.<�9���p�X��bJ�Q ]���b�܅��Dx�z���o]ϻ7򁷆�&>�ZH7Q���h�.�7Ym8@�ql�4�p����v܇�W�Y/�/#W�D���ĕ���c_�"�亇@�0��}��`�Z�Cu غ�~��q�<�������PI�S�jR���4qMc7&��%�g�Oh���I������nXD��1�ϡ~Lܭ�5ګ�e�=����9��P�E6��.�{�!��|�?~��h sh���qX�U+5Q��5V�k�����Of`/�qw�I;Ȅ���Qw/��ތ!����*(���UB* ��NlȮ4P�����U��1ە�:�q����(��qƱ��:����C� +G|�e����<�Pr׆-U�,�A���$�0/�Qk�T��t'�;^V����֪�f��R��$�)v�ݔ��T�>؅���]� ��[�����94�c�c�<�x��u���X*�Mc��6�䵭R޶`@#U5���������E�WS/F�]�`K�D+#J�ǽ��s�PK����\PK2*adChatDatasource.class�V�W�~�]X!(�5���.�I��!� +����� 0fvf�3K��m�ZۦM�|`�6�$Ƥ�’�6'���s�k�w�Oh��3�n��9�a�{��}����w����OB 5pk�����YϩxAŋ*��bV�o�xKůU�F�oU�A�"h�(��h"��/���ƒ��p����#PqP������,{#��Q�}C���_ı:��q� +�`-� +��D-��<A-���"N +�)1�m��|\fI���"��Ojx���[��0�������4\ݏD\FZÏaj���x�~�oi���^���_⬆_�xU�k������4��ok��������Gq9'�]��pM� ԇ8��O�� +��pS�>�3�,b +B;����9pN�ѻ,ݞ�:1v����V{Ӟ�:ZPg=��굳)#�{�c���F|yZAsGE��cq�w ��-Ӱ�a�uP�vܮ�}w��6o_B���ȗ��� +���j��J�w~%�C��I#�:���W��_��K1��a\N�r �L��z�;����v�X��'�u��nU�S�0`��P65fdN�c͚,��z�@� =E��J>�˸���'%�r� +"�N63n5ō�P�IӺtS�=�UGtOw}k�X��G���Av�>E�u�z������aU���&:Vq��2R� �4ݱκ��eB�tڰyLk�i$�✘'l���T�ex��~,kZ�\#3`�ƺq��t�v��72a�T��MK���EF@� ���υ��tV�8 M�g-e�P�P�HŐq���~aNհ�{Y7��tĖY���A'c���L�H6m���,��;�[&�U��Z}�V��vQ���Zi뗏U�x���l�@Y�1�� �º6�#@���fN�9YJU +�s�K;n��ԴDi�o(-v5C�3Y�1RΌ�&�-U��N����U�I1ɚk�W'� X�9���Y�'����zJX��V�81�6~ +#?�k�������#�M5(�%��p�GK�cklw�j�[BCrM ��i#����&md)7������߉�،�\��0���m +���<6�s�Zi{���n~��q�K��o�$�0�ݝ���}�:s��34 %n�9�i��'r�g4�Ǟ��J�w�$N�$�p�E3v��ю�9���a�}^���^Bu2���C��{[eh +��v +�| +�P�s�7�g��Lߘ��-����?��KВM�"�I0���sH���N_n*1���Zd"?!�%r�+��X�O1��c������_*2��-a��g+�3��B ��h8���$�o�a�g�!�ΗBJ��r������ڻ��{ļFFﳨ��2_װ�o�6y��(}ˎ��+��wV�`2��1���`�"�U�Zkw���V����VŰ� +��*���P>�-�UL��DT���Yl/�l�MD���/�� +�|�v)��$x2¸Ȱ�e�<�fy���"��� x��?�o��������s�_{/s� +fy��dr�b�.�v�i�i�d=�Q��dh=20Ё9���0��֡96Y!��$�\��O���V#|[�� ��FI�����$�4�C8E� ��URP9���B�rC8ăb +v.�/���F7�� ++P��p2Z5�D�YĆ��D���Y�|b�'>��ʍ"�ݼ]�� +c���IR��}1�-8���Ha����I��c:O��d�6j�%��q&��>�{K��ˊ�^�6 +�F�����X��)kI��eD�aF���r���OK/�%h�z��?�{l��C��_��v�o�H�6�wt�u����=����K��V:$�y��U��4��ܴ���g; �It-.����PK�+�,� +PK2*adChatFormatMessage$1.classmP�J1}�ۮ]��V����&$ut'd�M/->��ҙ�B�G�%����������;a؜�٭�Lz�ak� Д3�\9�rugJӈ�2u�8͔���[�g���ɡAۆg&��=��lbɑ�9 �:�a��Q�{A��8� > +��9uT\�wP�PK��Π(�PK2*adChatFormatMessage.class�Xy|T��nf&3^ �E��$!€A$l�@I^2/��,a�D�K[�Z�ֺTqi�Z���L�Xw��Z����nv��K���^����W��s��{���\^���OR�˃_z�+~���&r�‹}9����+|B�^��T|ҋq�Zx����q�h�Nf?-��e�3np����,�b�-^L­��6Qz�Pwx1w +�9�����.�ࠜ�n����Wf�pH�a_�E��_� �" �����PG�:"�#⍣B=*��x#%'J��1�l��x�q�� +xB��e�I��#��i +o℀�|M��~*�g~��5�֔�Ҕ �i*?Ԕ?Д?�T�Д��(W�\��Y��K��Ë��^����Ԭ��+�*ď45�hj����&�o�: +���d��Ȳ�xAS�𜦦�ۚ��p���L�f�yM�!�l�`��(����2�2��h�|�QS�����J�V��j9G�u��]+V�⛚��w4�N�����6�Mj#~��M"W/�7˖[�cM5૚�*�l͍�������B]��Esk�ͭݭw�ezw�le0lD��hd�¸����О`b0;�G��ַ�6ZG���`�}��G����R�r�̭T($ʤB�Ġ����\2A7�E�����=Q +�Dm0�0"Fl���"��Ë��l +E��!dEtlр�*��h����pÝ��X27Sa� ���P9�ܮ5Nɂ��#��bzg�����A��E�d�N���e��A�F-)[њ`JTu�♧���gf���H �=Dhv��D���L� +��o��J�dL�VE����B +����o�� 36e�Eۭ���<���G��>�gik( &���ڄZ���h�`��Ի��w�Z�A!g��2�V�b�Va *Czbp�d8be3��I�[M�Z��X��f#���M5�DG0��?���#_���%d�3d�q�G1_<6|aC�pI[2���}ڍDBp(a��D�H2���L��[��}���d�.�9�������3 t�nV�#F�a#� d�*[�Ů��N���}�z�� +3��I�s�_�Cp�|¡ +�� �*d0���f�$�;;y4��X�˨c��ѯ���[�0�[BIs�c7u��*��qw0��`����d� +$�+b�Υ٭zl�s��jI��_�� �@L�R���e�,�6�&���� �61�Ximᦖh��rHE�K!����|�#z�V���!R���R�̩�h�"���J�MO����0��A�AEˆE�[���V�9�����ᆘ�~3��V"m�M'�D�:]�1�`"e�9�+�%���U�`$Ѡ��3�о� +��y� +eFzЌ|��F��i +��LMb��1ӿ�#n��B�A���gԷƢ�����?v��JW��x���o��v�v�� +�cL��7�p�����u�������i�� I�x^掗����b��'�o�3Los:l%FSP�2l�iG8N�\�����R4 +u�d�0f�#J2���w w̰5��%���� i;+�q+��ԤbF{L��}�[��L��jƃ���wH�V��❺$�(���ŜO��m'{�>;�V��+qL?��2�]���ۨ�� 1�O�|�7_^y�Ȓ7��w��96ε�f�|�-a�)��� +O�1_&�`� l��6�nb%O7�x��+l���)�g����,�'s\cb/<�5N�T��h��q�żGD +�d +e���w��K�떸��g���`�_�P��Wק����ɟ7.�E&\��Ja����B�?OKa���P%`��J�Q�K!�w��G�����/p��)Q���v�{�k���� �Q@���^�6�������Lc� �3q�'��v���0Y,-�����(2���AI�J�4"��ɖ���k�X'f�`󀏮����ѐ7t��g�L��v&�b +QJ�٘��L�eL� +ή��x_��|6o��.� `�8�F�+/C����P�k�������X��p^��_`��b&��G;$N��q�I��i���Wq��d� � +�B�����Zޗ +�x�J�+P�?��r܈�q+V�N��1T�1T����O�.����S*�?Y��:z0wx���r����k�q��xmq�����xKK��a� �E�m�3�sc��6�������4:6���4��8��1�c��!��g� �Y�a2e����=Ci1� +�L��ۼԱ�0�M&�R���ƒ4�6/N�1$��B�Ĉi��bJ�g�s�8K����xYs +���-����O��XK�����W0����ɫ�k��Q�ɏ�zJ�c�;���3�XښKv?ү.�d�ɋ�N��$�ARM���#�oS��dz1VX���=(����9�yUDZ��_��4�J�]eҕ~6�6��)�:)4q=��h� +������}���E/0G��];�4�������4Z���,T�F��G��'"�R�V��5���N;Y@Dz� +&��\�'���X�:�c���8�i�h�,�.6�0;���B�s� �%#� ����.U(qޖ��'�8�v]�&��f����Sog����x���n���ǽ��}��!��0.�����]���"�a���%����xJ��C��YR�_PK ��v 3PK2*adChatLoginMessage.class�T]WW��1 h� ��V�$1-�ja�VZ-5 %|�u +d�� +IV>�o��o}�C�*ˮ��>�Gu��$Ml�v�|Ⱦ���{���;��� !�g*>WqK�mwT|�bQ���KK*�ȫ(�(��U�4�ox�F�¸�8� +̄p�B8��>2�.0+�&�� �I + H d4|�O4��3 +�pS��5p_CQ� Rv�=�_+�$�/�C3S1��L�հ��EC����; +�� R����s﷟?��p���4w\��$f�ٳMeɻgr~p!�����vuI���ԏ8��L�V;xf�:A�i5:�� +����o�U�E0���5�A��!h� ���.�J����]���{V#o�U���* +�j�ƾ���“ ���f++K�ZͦY������]�����kk5�n6X wa��V��`d�mWJ���2�Ɖ�����j˴�y��p�j����Q��YAF�� +��ܱ�X`v��|���Q�͢Y��������Kk��`�� +�5��*�ԏ��{�L��W%�~%�{4�/@m�:�����{m�Z�R��A�����F摷挅�X�|~G���%�c�F]��� �+�� \���W���_��8�����2�E~6bd���n����p,�o�dx�BP���dx�SbN��'�v�l�a�~I ,����&q�,�)�p����&��4��oW�ܷ,����w�o�W~|� �)o��������u��^�1D��'b�#�S"zDLwD�<-␈������g��։� ���c3�l�6��-��d;x�Ol� +W��Tw)���4���y|�<�cDO0�_��x���1���dƠ�6q����%>v�����uWk|К!~�.��_�����=��-�{�ד�B��rԛl�<�-wtпH��mwl���*;����?I�N��5�q�y��PK^@!�&PK2*adChatMessage.class�V]sU~�M��4� +-P>D��v�4�(`������- +R�mZiR��* +�Y��V�Q/��K�Q'|��x�p�x����y7!m���N��yγ�{��g������(E�(P8��B�B�B��!�� + +G�* *Wx[��; +��i����`)\R��pE�Œ�]�{ +s>�����x�X��^�c�[x�d��@�L� � �*�C`�����@G���� NaO)�q��Ȣ+S�����ea3w� ̢3�9acLCmSs�)cڈ���x���&���5�65�qP��i�L"MO���Kd�B����lsї�0�ܴ�Pn�kI�%�=�[���g��~�?&|����cÙѳ;l6��L�U��Д��%G�ⱉ�i� N*����l�v{��L˰�L�x����̂ռ�BJo���2�H�'�I�^o>q0�(�?>�VŋY=q;i0�(��33�`i��tb���p"�o ���ܺ��LeG����x�W��' +�'��Q��-��y�/91�J��>hd�������(wI��L'H=� +5�S��hG6c����c�k����7kX [�������e���&N%F�EVe_`vV1�I[F2�oP�H�ٖ��桏'�{'�d�y퐽����9/+S?��l��g7�����D����*/r����a#%���`X�`U�:FM<�|`��,}��eg�VHk}�ۂ�,Vg.��tTg.��\P�9_��bQ�¢�f�Rbe�+��=w;��0-��e����%�� +�W�=Z��^a�+�3��naLF�]8��&�,�0gY��6�!6��}D�t��@�@T�E�Q��Gۏ��0BlA9q<r����2Ta%��5|_���Juh�O�Y����%��u�ph�#4}�^*��á���¡:�5�-��N��f1��l�J��fQ�56k!��Y�|y�XN\���V�k��Wv� ����O� l�I4��q��ƈY���� ���@���5-Z}�M?����s;���Ȑ2��z8�i�вz�Ķ�Ic߂4�vM״p�>��5C2ŝ5v�fr��W��|����Un!�Ϡ�g�� +z�g���x�9�S����)�x>94��t���ɕ_I����T����h��Ю�U��6�QK^I��?T&b8/��"��ɋ��KD���yTD����Ǩ�Z�I�Gde�ey�Jd��ڲ7/W�,J�g˾�Y��f�*�ɏ��|ݽ�%��|V��-�p��o���5^��� +|�����=n�'��o|R���Q�T�4�r�ΖIǝ�'N�Z��֭�w]��Ӻ����5�ƈg]�Q�u������i"�s�Ɯ����V�u�C��bm��a�����`�G�W_�< +����T���������Q���ם����S���8�a�u*���Q����^*���-N�1���q�ǜ�}�wQ������w��Ae��<�Lb��=�PK,�߻�PK2*adChatServer.class�V[WW���(���7 �bEj��Ā��ѐ�����^����{�E��j_x-]%�d-ڵ����ۓBĵ��}����۷�����l� +�}(��>T��8*��qLDW)-�w\N����k�#�W|؀�b,�:��P�S�� �b�/�WE�&�|X/Bà��0��"^q^�"L��bT��8'���b���0���4�Ĉ�D|�3����[�5|'����}� ���>�#B +�u]�SƄ٪_0.��4�3y�L�~�1��~]�+Q��'��sX�Z]0�;f8�m��a�M���GS�j�K9��3�$Mc�-c�Ō�D���D�E�t�z(�F"IӶyT�4`�/���i5��g�u����$1E<%h�?�_K�3�T�_>�9l����`�i���U��G +����z +�/����x^ ��$��.oU��G����k&9�"\6w] +� 'j��h�m:��ت+P�v�r�/ F���Ԙ�4�btU�#��A'a}^\���n� ����z����I�v8u���Ź��fQ�w� A���Uf�8��O�R�56pj�jp�I���� +9�l�i"#o;9t5)'k"�2�SF�y�O� #i�,�z��*!lĈP��xܭ�����+s$S�N��H�����ʔ�m��W(� +��i�|�ݕow�w�]�i�B�ۀ�wC�Wp����@y�,��X�æY4�f�Pfq P3�}3*�Sn��B*�ȝT�$�yim�峓z�c8b3WER ���_s.J\e��WK�g�^B��X��G)�a"����=�#��h�ao��Ƌ3����hn������ހ���4�=��kH��4 �ƗӴNce�8���70��CX�Ӽnϰ�KA�h�gюs8µ�q���e2�'�����G�dQau���i +��ԭ#�������nv�8ϻ�8Aj;�z��]�'�R�������^��yT�*��c5��4vW���P�i���iter���r-ϱ�Ҳ��y� +�簭����>�Ɩ�iT<�â�s����̸Cx�H��wr�t� $]�����v�b:8g=�EL-����u�ow�͹��p���~F� ���ɶ�F����=FS����y���� L~{oCŊ4���@~]�%u͸ݭE].�ZN���hb� �RW�6&��i�Ot�}'��PKO��V�� +PK2*adChatSimpleXMLParser.class��ao�P�� ����V�9��1�ñ�n&c˲ + ��Ũ�q.� R��W����_X��?�e<-d�V7�������s����������)!!aQBRDZĚ�u� |� +BĴ-� ���e�Ŗ��)c s�ܕ���� �2�����d<����M� ��t�X;Ѳ-�hf+���-'��!�*\�J�kg[v��d�ڸ�o4���z������xG�2�<�'�e��uC�vȡW���9C���y�]��Vm��t�f�?�텢���4����-��T|��=n2̹��v}��u�ܨӤ�1j�E9ibi�q�5�mr˙��Q�� +��?���1�Y�X�o��t����ō�u�0y�s�^������� P'ڏf��2��42}���4�?L�w� ��F[�Q�'�m�;�7av������d���N��a�s9�!(�)|�����J1�~P���XC��B���{�$�U�G/Y�J��5a5�;���" p���r'F8q�I�.��$QF�p��|�W��ٽ'�z����!�JB��% �N\�� $Lp3��"x�\k��x��PKp�2<�PK2*adChatSystemMessage.class�W WT���3��..�"�� +sA�&��G0� `��3�s!�΃03TS�iScL�V�6jӐ6�E�GB�j���Z�Q�߾s��j�,��g�����}�9�̿���}�Є�*�*R*�*&U�X�9�U���e��xU�k*^W�7U\T�+*S1�bAŗ*�R���U/���/>�bʋϼ����s?6�i?�YD����!���=#Ⰸn�|_�\��^}~T�@~ ݣ��m@Ġ8��;8�G-��� ���S��@N�H�9�K����C +a��i�%������">ď4�/��j�����">‹~�q +�Ǩ�k�)���OD��/4�?��W�<-�3���a +��~okX�5���7�U�o�V���!t6<n���c��� +>�R`N��h�9�JL��s�lyRAe}w�Ծ�D����\V�w�GGM���(]o�_鲨��b@:h�_���V����"�GqL��m��##O��R�E_W��Z�:�`s�|2e�(���Is�ZYF;c�Sv����H�`� O��Wf�V2u����������HԊ[)�%AGQ�9tEV +� �a�/��4v��.��F . ���� eC) +2vw&"���bMȊ���ذ91��Z�I��h>œ��Y3c��b��;;��Dzb�n�#b��A�g�pڊ�z��'9Vh I�m[Y��-fHv���o$O���@�8��Y��ʠ5G�L�m*��hA �g>j⽛K]�D�� +G-�+�l���Xb��%T�c)�Na�T�묩��;�8yq&�޸Ј��0c�I3R2�;i�Ħ$�US�,w*�H�{���9�;U�5�5�%r�+����x&3��M�}����� +��''j>�>��e�]%����n�1a[?A +~��N���u +�x�¸C���Q�pS�Rj�VF��ȅ��>����<��Y� +�g�X����.�y_�౥����U싿XƟ2B%D}�ԟ�W,`�u�.��z%��P�A�,N�����L�Tc�r&�69� عZ�0h���T��W���nz���/�n�]�Fb����4͢��SEB�{�[�C#��te��v-�)xܭ5�~��2��^��k�W˿M�ʷH���}|����������� +�� XDG�I4s'w�"w�-���x +W���|LO�a?_-����h�}��'y(D$� +�d]�W;q�61UmM�N�M q��FX V�Iwa���� +w��v`u'ʕ+���Ө���X�^&M�*��T��{�fضǨbS3pw�Ye7s80�c���+��x�u�S�:|��x�L�a��#�'O�Ga��۱+�?�.��;dw���%�+d��]%���������ft���a�2I��|�:<�t�j�����T�aC/��e����{��{h˳��G�s� +�%��UJ��r�ᜡ{�%a��q��� ,�o��/�M��-|�|�v���e;Jۋ��Xq +q�N8�l�r�p�ּ��('�c��r(�n9�YJ�� n,�� �J�a�]�s�V�Y�G�Gi���^�����Vz��/u�Ƴ��m]�G��vֹ]��\����e ����v~��O�����ކ�������[�puě@'��7�� +:D����E� �#A�g�4�߼L�9g�-}�0{�$�K����@HR�v¡$�չ/�����٫�k��,��o � +���~9�vdh�(G +�� �=�/��%�E�N�6E>y�� r^�%/}��w�\�ZL0 9����C7�j���%U��Sd[;��rRX^��ϙ/$9F~�� c�3y�J3,��U���p79���4s�PK�D��NPK2*adChatterList$2.classmP�J�@}c����֪�EUЈWE��P^*z�6K��n$�6��<)�?J����a���vf������b�ņ�MK�yL�>V��cuB�wpGpz}�v{у��@&�s�Mp�t�W�YE�\ie.���$�}�e&"�eNhFJ˛�t(�[1LX� +�Y6���^ꃅ6iԈ�"'��E*7������N�}�2��續�#� ���=���)�Q��0Is��8������s��0O���/p�V9�,I�J ���5���G���v�)g����|�r�q�`���(\$ +>+ +.p�%4��Bǥ�]&�}N�.�����\!W�����"r������Z���b�Z���Dt��p��7JX7ɱ���-ۭ^�6!o쫂�!q�)6��n� ��x��}��@��8�� +<��M|G�_pP�[xT�_񘎿����6~�����u���:���u�{t���x��x�������:>�7t�������(�׺RxFWy���\xEWn�V�;+�V�'b�\DNK��5��˖���O':�����Ϣ���z�Q����Ù-��w�NTk�M����mk�h�A[.#V(!�m=^��F���n��C4DL��E���Gqnk���A�v�PY�ˤ�FO�#�i��X^�v9)�|ᄱ}��u�h�v.9=����8���鸵����i#�2*�"GGQ��ZF+]�xZl���?�4a�{f��:����j�Ǝ�nJ�Q��p�=9�-|wW���Z�nK��w�VW7����x����'(]� m�'=e��`}.K�R�=.��Y��z.3�2,��KG��p}+F�&KF�Å�WS:�o�;뤚C���C���Za�'�i��Íh6�}̼��b���S3Wvg�θd���"��F;��(���+*��G��mR��c�Y�;���&K�C�d�M�c�6]KG��m�a�|���NVV��Ծ��)��ǰs��H���m%�h����,=خZ�̞ԓvi�1{�F�dkHWH�����7��J|��Ê���� � +V�r&�����!w�[�Ý���|3��͂T| '�鞰���r�@M�b6���X���˷�wx�i�Ґk:y;ۻ-Q��n�S�&;1�?����$����3<���S�_U������hE�'#蟏��A�v�?�iL�� �^���^�9�����E�|��0�W��Wd��,���?"L�c�� �2؇i��8#��^@����� ��C�R!�X"'V +oS�S[�0C��DC0�2�[�}�)�l|Ip?��2�(+�BA����PTm�+��9�������Wf��Lf��y��T7�c+��6T#�9��q,@� �ӑ�ZlǙ����Q�|�q�.�ŸWP�Ÿ�P�&.�oh��� YAts(�jY38���{P!~��wv28s7 +��`�PA�o`Q��{��,��P��q����p7V�:�����d* +҅�r�9j�A>���y�o4��po��d�d��#�� ɷ��~��gEW�E̢�g܂Y�A���#��28�q�a�R~�^�$]���7`V����:7H,��qnj�~��ea���!�e�.�E��"RJ��� �ڇ��1����pX�|*�UCW0��tQ��0W���B\˔_���'���?n��~��F�7�CkU}����_�[�'K�e��E���>���D-�/���O!����}86�`H*5T-e��aI��uuB��R{e����!7�PD��L�Di�� +P���S>,S%hT�X�ƣE��5ݪv�R���&�O5{Gd�-�UY�m�M>��;�2(v +s,Y.g< W��ô�tFn%�ڗ�/�}��P�w�fꑭ}D��8b�9v�Nր!ZZ�AK��Rb�8 +g~hN�n9��gk�f�r���� +���Y�YLƦ:�n��.w߁T7W�UL�ԙ��vrw��X��sȕ.)w�=����H�Wx�L�l�W�+��'z�c�M��ն{�B$9���� =p����6g�l�'�r���V��l�ޅ�$����C�`��C�˙N} +s=�!����f�q4� ��Y��.���E���򭸀/ݕ|��%}=_��� �Om��9�7�y�//���!^R~����+*��U^U���58a�YR)'����� +g���ُsB���)7q�q���f��]y�"�����f +���4 �9R��H�G�'�G���M����0��S�4?�㝙"#�����MT�}��7x�e�����z��ȁ�y���PK6��� rPK2*adChatterListLayout.class��[oA��+�n�\�E�^���}���Ą� ���4����Ͳ�˳��o����/m�IM색Ə��Ji�fϙ���9sf~��rr��p�a��2�ƐbH3d�*U�\##�‹�k"*$,�qq?�"��5D����$%ĵTu������0��e�$D�:�l6vD�!٣��HHh�g'ae�صLa�� m��Ƥ�VL�린K�잘S��6QVݱu�]:mK�n��] ޲��UJS� +ao�F��n�즸���o��s�vU�:y7)5oJ���VϙT�M��tq�x�qW��m���$l +#�u�'ӮF����h�e Q��/(��CM���L���Ŏ�a���m���*��3*r�2lP猞1����k�maۢ5��laX{b�X�w磟�4�>@�-�h��D^N@�L +��^�������X�l�'�3� �<-��\LIg��؟a5��1��H���Z�;����� �������|�/�-���c����L���|��ϯ�B�/��}+zsG����T�;�; +�l��88�U�J�_�*4"6�ߡY� 7��ϑ�dW�kPK���vJ6PK2*adChatterScrollPane.classmUmSW~�h�,W� mՔV�,(j�A��д᥂Z� �$7��d7�l@���'�+���)3�ڙ��N��HH&�s�}�9Ϲ�ܛ����o�p�{�E/vul��Z�7:�ձ��{E%�OGY�:|���1�7� +���� �݊�4& +�2�cZ�n����A����߽p��*�0�3�Q~�x��>1p�T�c��x���J�(�*����w�T�Ʋ@�2X�bA@"%�Ü@�� 8�%� �*���g/ߞ2�R�?b^�g, ��u +��xj�ޱ'��`b�)I��xnB�p�aѷ�'S!~�/�n~b-�7O8dƟ+c2��,�yI�N�:��);��"���� +��c�9�T�\��x7P��˙ːy2�B�;�d�q��W�<Ҏ��M +�̖W��2st�����N��q��ˑYu��;Oy� ��S���q\'x��Ԝ��Ē�*�:W��@�)��՟r\�\-���n���輖��x�L0��Kč5��g䂣�δQk���o*�� +L�{^5hE�2�W,��n�����G���S^|ҋǼ��W@�2>-�32>+�s2>/㴌�d�Z�od�V��dgx�w�N��]*��c*����6�⸊2�#ܩ�Ǭ� ��2���cB�/�_��_�f��#*��S*�Θ����d��BRſ��%��x����IU2iE�e�A��릣������qˊ�,v]��W� j�-��Ӡ9�m%�!}��І�����Ɍ%�'�kQҔ�hZN�jqF�́�$6́���3ݩ ��m���b�N�� +��H���Cz|���+tPw6��b�(bP��°LW�j�x66,����U䏫�����v] <��S��Kk�=D({]8�wϗ��9�'��g���<�9"X=��;�lI����?�������#�%U��E��9Vܿ�/Px�a��J]k�������==�no��II](D5�릡����ׅ���v\7��qK �4�����<[h_�^,9�/ +SoID��x���u���LA���*��ɪ�(��f�!��k�˗������fu�@Q�� +�f(:�Íb��(E���.[����� +3�.*vu��k)Ղ*I�X83%�1% +Z��L@��O �s57kozjDc}Ws�M��,/MˇmG�f/�q���3CRÁ����H�L�yvR��b��#���!���b���L +�,_#lN����'�H8[*���•5�*RwE)3N\#���l^(b���LG3�N��J8'�JذIi҅E!LO�"B�Jh�����}�;��}!7t +d@O��-�F&A�&���=�b�o%]n�yaN�d�k�΋A+�E�[��4ͽ�S�4�>l�)�E4k��iJ� +��i��ʈ�R�8}Zf�y�HF�ݐ�E�� {�1hqY�6����_#�+��`3����H��j�&���N�l� �Yw�ٶn͞%��Ƣj�ׯ���J���otY��B��:%)F��9�qD����+��<�G�!=[�2wrg� �p� �t�)��}�N�:��a�A��H���I�����"��k���e���C��q?�ܑ^M�H�$w�7�;�{��J�ϤGzQ�#��h�|rG)5�{�Fq�я�� �/�q_`+���41i xN��� +L��Pͤ��L�3�e�Ê`�2��l_Ŏ*yQUW�ḋ�!�-����=� +.��t �K�^N��唍ĭ�s����\l �&zJ_Iyj$m3V����G~����h)A�"F�x�I\|��qσ��0c +��C���K��%P��o�?�r3�����[ �זqxQ�uWFN�c�'�1��I.� �t�%YI����g +�=)�WN`�^�i�²���3� �NJ+HД���y +�{|�*I���H��h��%�q���[���� +I\B��I�%q�(�t%�s���1�6�E=�X�L�t�V�Jᓅ�pR�Ӟ8���q>�m|�46p!и�*��--է���W��reQ�'�䧗�!>�DU +?+|wU)�$��WW�+]�li��b[�%™Y6�#(�`[Ɖ�66P����ւ�+vW2�M�\Ms���6m�6I���M��3 +=����C�/�tfW�dd��53of޼y3ߧ�|��}�l��C�Bx0���HxV�s��𢄟I����$�-� ���K �JxO��>�0+ᢄ��9 ����2Z�D��@J���2�pHF �kq(�e,���o� +�e�Ĉ wȸG�oT��1����dDq<�f|���LN�D��],�ͺ���,��i��La��9ϫ�����eRdr�ɽ +�� +^����T�c|[����ܣ৸��vy�ᬂ�a+x��7��!���#<��O��)���gxD���5�T�<�෬�f�_W�|G�()�#��%Wp�C� O(�3����W��7<,��X[J`U�m�V�:������cXf���yCN3�;O���n�zԵ +s�� vL�1�b��<.��X,U?�^��8�,�2G�N�SV�"�>��If57�3t�4W7u� �U7����$��kk��{��;���t%Ԇ�^���i�Ju��$��W�X�Q}�㆙�f�a�X}��NtĖ(X���85EK]���[��_�'����s�i���{+Bc���Ѥe�t��x�g 7���p[`l-����-����=�M�(p�Z����z�l��F4S����Ѵm�rl`�V�c�9w��sRG�Bn�aSOZ�b��{N��͌�`pB�Q�i͘�yM��)����r�] +���䥹C���(-3b%��=���IyM�r�JIT E��2�\��b`Qc�B�KZ�N�r(���\KWy�g�Z���)/���3=1cd�,��i�M��d��y�f�۾��*R��nLgI�,�������劎�V�O�b��j��~��H�yAY�R���S���>�nQ�\z�i��P`��=�k�~~��W"l>��#J�� E��uz���N.���(4Q?k�ã +Xj������T�m=���W��������.K���0�M!hb�Ҽ ��5��n�U43�/ϟ��#�c��O���c�%/a�؄f��y��wO�4S~B�5_�p�?az-������H=�b��-t{��p��֥+yߛ����+c��Q�ܙ6���7�y�}�������%\;]6�M�H�qS}s����~&=Lz�t1���n&�0�og]�V7�x+["�q�+�+�2��:��sX�ag�#"�l��(��y{��D����؜1 ���@��l&!�U�"�� z*5�I4����զS$�J,��T�R&Ѭ*j�ojQ�'Z�`"B E(��x��د�h��6����jYz.!@�5~���S����i�x��9���̢��X�6�A@�x7�O�x�a�p��R[�VUR#�O�����^L_�<�/ +1PF�����It5�B\G��D�ڛ�Q�N��NO���R�C(܏U������9�u���Yl���q7�Al!,��)��:蕸�ж +�e�'�.B���E�'�n��х��[4b�X�}b=���.��cH��p@�p����xų8$^Őx�b�����4�#�6_�^�֡.�khb��:��vVk%p�v�i����4;�p2���F�_�mQ�[����U��0_Q�q3I�黻V��%�����*�3�n��I��)��$U�N��|��j'��G��v���/S�el�i�6x���1�� -��+�'�p�ug�F}J����sX_A!1�~C�����?�,%e��RӋ��5v�Y �����PK��Hd +PK2*adUserInfo.class�PMKQ=�QGmrL�,3����(�A ��pO}���ilѿj!A�~@?*:o$��aν�ι�޹�_��p�-�6�mTr�,�r��pl��`EU�����~�9�ϲ1���юB�N+FY���c��3���\ y����ԾjM�]���b'�m���.�Q� ����+�1�ɜ��f�r졃F[�Z��ˏwan}��^�c��G(� �'ty�}V�̗c���⛈�G����1&��X&�Z���ސ��i�gM�� +="}��W�61�$�,R�#�� +r��n��3�{z'����j���4��= �.�ݬ^�d�PK�{@�M:PK2*adUserInfoExt.classe��N1�O�J�u�NE�а!��L� .���5�&�C��X<e��Ȃ���w��9���5"\☣���hstI�� +T��pz��ʥ�ϥ���ɯ�+� �6�*C�)�F���+�f���ٜ1��{Rc�=2�d6|��+��gh��U8���S�a � +�M�ݚg[�����X��:�j�k��ߋ��<$���{���~7�D�*S �z� ���j�{h�PKD�-�@PK#2* META-INF/��PK#2*����DD=META-INF/MANIFEST.MFPK2*,��6]��OneColumnLayout.classPK2*[�6�jcadChatApplet$1.classPK2*��|&�;adChatApplet$2.classPK2*x�Z���adChatApplet.classPK2*��̖�oadChatClient.classPK2*�cZ�y�EadChatClientInfo.classPK2*����\adChatClientListener.classPK2*�+�,� +#adChatDatasource.classPK2*��Π(��*adChatFormatMessage$1.classPK2* ��v 3�+adChatFormatMessage.classPK2*^@!�&T8adChatLoginMessage.classPK2*,�߻�E<adChatMessage.classPK2*O��V�� +ABadChatServer.classPK2*p�2<� HadChatSimpleXMLParser.classPK2*���&�b�JadChatSystemMessage.classPK2*�D��N~RadChatterList$1.classPK2*���"��TadChatterList$2.classPK2*6��� r!VadChatterList.classPK2*���vJ6taadChatterListLayout.classPK2*�5��-dadChatterScrollPane.classPK2*<`���%hadClientSession.classPK2*��Hd +:qadPrivateChatFrame.classPK2*�{@�M:�xadUserInfo.classPK2*D�-�@SzadUserInfoExt.classPK�~{ \ No newline at end of file Index: openacs-4/packages/chat/www/chat.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/chat.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/chat.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,94 @@ +#/chat/www/chat.tcl +ad_page_contract { + + Decide which template to use HTML or Java. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 22, 2000 + @cvs-id $Id: chat.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id + client + {message ""} +} -properties { + context_bar:onevalue + user_id:onevalue + user_name:onevalue + message:onevalue + room_id:onevalue + room_name:onevalue + width:onevalue + height:onevalue + host:onevalue + port:onevalue + moderator_p:onevalue + msgs:multirow +} + +if { [catch {set room_name [chat_room_name $room_id]} errmsg] } { + ad_return_complaint "Room not found" "Invalid room id" +} + +set context_bar [ad_context_bar $room_name] + +set user_id [ad_conn user_id] + +set read_p [ad_permission_p $room_id "chat_read"] +set write_p [ad_permission_p $room_id "chat_write"] +set ban_p [ad_permission_p $room_id "chat_ban"] + +set moderate_room_p [chat_room_moderate_p $room_id] + +if { $moderate_room_p == "t" } { + set moderator_p [ad_permission_p $room_id "chat_moderator"] +} else { + # This is an unmoderate room, therefore everyone is a moderator. + set moderator_p "1" +} + +if { ($read_p == "0" && $write_p == "0") || ($ban_p == "1") } { + #Display unauthorize privilege page. + ad_returnredirect unauthorized +} + +# Get chat screen name. +set user_name [chat_user_name $user_id] + +# Determine which template to use for html or java client +if {$client == "java"} { + set template_use "java-chat" + + # Get config paramater for applet. + set width [ad_parameter AppletWidth "" 800] + set height [ad_parameter AppletHeight "" 600] + set host [ns_config "ns/server/[ns_info server]/module/nssock" Hostname] + set port [ad_parameter ServerPort] +} else { + set template_use "html-chat" + + chat_message_retrieve msgs $room_id $user_id + + if { ![empty_string_p $message] } { + chat_message_post $room_id $user_id $message $moderator_p + } + + + +} + +ad_return_template $template_use + + + + + + + + + + + + + + + Index: openacs-4/packages/chat/www/fish2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/fish2.gif,v diff -u -N Binary files differ Index: openacs-4/packages/chat/www/grant-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/grant-entry.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/grant-entry.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,23 @@ + + +@context_bar@ +@title@ + +
      + + + @description@ + + +
      + \ No newline at end of file Index: openacs-4/packages/chat/www/html-chat.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/html-chat.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/html-chat.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,25 @@ + +@context_bar@ +@room_name@ + +[Log off] +
      +Chat: + + + + +
      + +
        + + + +@user_name@: @message@
        +
        +
        + +@msgs.screen_name@: @msgs.chat_msg@
        +
        + +
      Index: openacs-4/packages/chat/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/index.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,34 @@ + + +@context_bar@ +Chat main page + + +[Create a new room] + + + +

      There are no rooms available. + + + + + + + + + + +

      @rooms.pretty_name@

      + [HTML chat] + [Java chat] + [room admin] + + @rooms.description@
      +
      Index: openacs-4/packages/chat/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/index.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,43 @@ +#/chat/www/index.tcl +ad_page_contract { + Display a list of available chat rooms that the user has permission to edit. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 13, 2000 + @cvs-id $Id: index.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { +} -properties { + context_bar:onevalue + package_id:onevalue + user_id:onevalue + room_create_p:onevalue + rooms:multirow +} + +set package_id [ad_conn package_id] + +set context_bar [ad_context_bar] + +set user_id [ad_conn user_id] + +set room_create_p [ad_permission_p $package_id chat_room_create] + +db_multirow rooms rooms_list { + select rm.room_id, rm.pretty_name, rm.description, rm.moderated_p, rm.active_p, rm.archive_p, + acs_permission.permission_p(room_id, :user_id, 'chat_room_admin') as admin_p + from chat_rooms rm, acs_objects obj + where obj.context_id = :package_id + and rm.room_id = obj.object_id + order by rm.pretty_name +} + + +ad_return_template + + + + + + + + Index: openacs-4/packages/chat/www/java-chat.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/java-chat.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/java-chat.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,16 @@ + +@context_bar@ +@room_name@ + +

      + + + + + + + + + + +
      \ No newline at end of file Index: openacs-4/packages/chat/www/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/master.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,9 @@ + +Chat: @title@ + +

      @title@

      + +@context_bar@ + +
      + Index: openacs-4/packages/chat/www/message-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/message-delete-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/message-delete-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,18 @@ +#/chat/www/message-delete-2.tcl +ad_page_contract { + Delete messages in the room. + + @author David Dao (ddao@arsdigita.com) + @creation-date January 18, 2001 + @cvs-id $Id: message-delete-2.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull +} + +ad_require_permission $room_id chat_room_delete + +if { [catch {chat_room_message_delete $room_id} errmsg] } { + ad_return_complaint "Delete messages failed." $errmsg +} + +ad_returnredirect . \ No newline at end of file Index: openacs-4/packages/chat/www/message-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/message-delete.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/message-delete.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,16 @@ + + +@context_bar@ +Confirm message delete + +
      + +Are you sure you want to delete @message_count@ messages in @pretty_name@? +

      +

      \ No newline at end of file Index: openacs-4/packages/chat/www/message-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/message-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/message-delete.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,25 @@ +#/chat/www/message-delete.tcl +ad_page_contract { + Display delete message confirmation. + + @author David Dao (ddao@arsdigita.com) + @creation-date January 18, 2001 + @cvs-id $Id: message-delete.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:notnull,integer +} -properties { + room_id:onevalue + pretty_name:onevalue + message_count:onevalue + context_bar:onevalue +} + +ad_require_permission $room_id chat_room_delete + +set context_bar [ad_context_bar [list "room?room_id=$room_id" "Room information"] "Delete messages"] + +set pretty_name [chat_room_name $room_id] + +set message_count [chat_message_count $room_id] + +ad_return_template \ No newline at end of file Index: openacs-4/packages/chat/www/moderator-grant-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/moderator-grant-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/moderator-grant-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,18 @@ +#/chat/www/moderator-grant-2.tcl +ad_page_contract { + + Add moderator to a room. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 17, 2000 + @cvs-id $Id: moderator-grant-2.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull + party_id:integer,notnull +} + +ad_require_permission $room_id chat_moderator_grant + +chat_moderator_grant $room_id $party_id + +ad_returnredirect "room?room_id=$room_id" Index: openacs-4/packages/chat/www/moderator-grant.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/moderator-grant.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/moderator-grant.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,33 @@ +#/chat/www/moderator-grant.tcl +ad_page_contract { + + Add moderator to a room. + @author David Dao (ddao@arsdigita.com) + @creation-date November 16, 2000 + @cvs-id $Id: moderator-grant.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull +} -properties { + context_bar:onevalue + title:onevalue + action:onevalue + submit_label:onevalue + room_id:onevalue + description:onevalue + parties:multirow +} + +ad_require_permission $room_id chat_moderator_grant + +set context_bar [ad_context_bar "Grant moderator"] +set submit_label "Grant" +set title "Grant moderator" +set action "moderator-grant-2" +set description "Grant moderator for [chat_room_name $room_id] to" +db_multirow parties list_parties { + select party_id, acs_object.name(party_id) as name + from parties +} + +ad_return_template grant-entry + Index: openacs-4/packages/chat/www/moderator-revoke-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/moderator-revoke-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/moderator-revoke-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,18 @@ +#/chat/www/moderator-revoke-2.tcl +ad_page_contract { + + Revoke moderator privilege. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 22, 2000 + @cvs-id $Id: moderator-revoke-2.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull + party_id:integer,notnull +} + +ad_require_permission $room_id chat_moderator_revoke + +chat_moderator_revoke $room_id $party_id + +ad_returnredirect "room?room_id=$room_id" \ No newline at end of file Index: openacs-4/packages/chat/www/moderator-revoke.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/moderator-revoke.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/moderator-revoke.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,17 @@ + + +@context_bar@ +Confirm revoke moderator + +
      + + +Are you sure you want to revoke moderator privilege of @party_pretty_name@ from @pretty_name@? +

      +

      \ No newline at end of file Index: openacs-4/packages/chat/www/moderator-revoke.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/moderator-revoke.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/moderator-revoke.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,22 @@ +#/chat/www/moderator-revoke.tcl +ad_page_contract { + + Display confirmation before remove moderator privilege from a room. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 22, 2000 + @cvs-id $Id: moderator-revoke.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull + party_id:integer,notnull +} + +ad_require_permission $room_id chat_moderator_revoke + +set context_bar [ad_context_bar [list "room?room_id=$room_id" "Room information"] "Revoke moderator"] + +set party_pretty_name [db_string get_party_name "select acs_object.name(:party_id) from dual"] + +set pretty_name [chat_room_name $room_id] + +ad_return_template \ No newline at end of file Index: openacs-4/packages/chat/www/room-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/room-delete-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/room-delete-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,22 @@ +#/chat/www/room-delete-2.tcl +ad_page_contract { + Delete the chat room. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 16, 2000 + @cvs-id $Id: room-delete-2.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull +} + +ad_require_permission $room_id chat_room_delete + +if { [catch {chat_room_delete $room_id} errmsg] } { + ad_return_complaint "Delete room failed." $errmsg +} + +ad_returnredirect . + + + + Index: openacs-4/packages/chat/www/room-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/room-delete.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/room-delete.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,18 @@ + + +@context_bar@ +Confirm room delete + +
      + +Are you sure you want to delete @pretty_name@? +

      +

      + + Index: openacs-4/packages/chat/www/room-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/room-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/room-delete.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,22 @@ +#/chat/www/room-delete.tcl +ad_page_contract { + Display delete confirmation. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 15, 2000 + @cvs-id $Id: room-delete.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:notnull,integer +} -properties { + room_id:onevalue + pretty_name:onevalue + context_bar:onevalue +} + +ad_require_permission $room_id chat_room_delete + +set context_bar [ad_context_bar [list "room?room_id=$room_id" "Room information"] "Delete room"] + +set pretty_name [chat_room_name $room_id] + +ad_return_template \ No newline at end of file Index: openacs-4/packages/chat/www/room-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/room-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/room-edit-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,30 @@ +#/www/chat/room-edit-2.tcl +ad_page_contract { + Update room information. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 15, 2000 + @cvs-id $id$ +} { + room_id:notnull,integer + pretty_name:notnull,trim + {description:trim ""} + {moderated_p "f"} + {archive_p "f"} + {active_p "t"} +} + +ad_require_permission $room_id chat_room_edit + +if {[catch {chat_room_edit $room_id $pretty_name $description $moderated_p $active_p $archive_p} errmsg]} { + + ad_return_complaint "Could not update room" $errmsg +} + + +ad_returnredirect "room?room_id=$room_id" + + + + + Index: openacs-4/packages/chat/www/room-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/room-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/room-edit.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,44 @@ +#/chat/www/room-edit.tcl +ad_page_contract { + Display a form to edit room information. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 13, 2000 + @cvs-id $Id: room-edit.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull +} -properties { + context_bar:onevalue + room_id:onevalue + title:onevalue + action:onevalue + submit_label:onevalue + pretty_name:onevalue + description:onevalue + moderated_p:onevalue + room:onerow +} + +ad_require_permission $room_id chat_room_edit + + +if {[catch {db_1row room_info { + select pretty_name, description, moderated_p, archive_p, active_p + from chat_rooms + where room_id = :room_id}} errmsg]} { + + ad_return_complaint "Room not found" "Room not found." +} + +set context_bar [ad_context_bar "Edit room '$pretty_name'"] +set title "Edit room '$pretty_name'" +set action "room-edit-2" +set submit_label "Update room" + +ad_return_template "room-entry" + + + + + + Index: openacs-4/packages/chat/www/room-enter.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/room-enter.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/room-enter.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,28 @@ +#/chat/www/room-enter.tcl +ad_page_contract { + + Perform initialize before chat "Need to change this comment" + + @author David Dao (ddao@arsdigita.com) + @creation-date November 22, 2000 + @cvs-id $Id: room-enter.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull + client:trim +} +chat_start_server +set user_id [ad_conn user_id] + +set read_p [ad_permission_p $room_id "chat_read"] +set write_p [ad_permission_p $room_id "chat_write"] +set ban_p [ad_permission_p $room_id "chat_ban"] + +if { ($read_p == "0" && $write_p == "0") || ($ban_p == "1") } { + #Display unauthorize privilege page. + ad_returnredirect unauthorized +} +if {$client == "html"} { + chat_message_post $room_id $user_id "has entered the room." "1" +} + +ad_returnredirect "chat?room_id=$room_id&client=$client" Index: openacs-4/packages/chat/www/room-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/room-entry.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/room-entry.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,62 @@ + + +@context_bar@ +@title@ + +
      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Room name:
      Description: +
      Moderated:
      Active:
      Archive:
      +
      +
      + + + + + + Index: openacs-4/packages/chat/www/room-exit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/room-exit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/room-exit.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,27 @@ +#/chat/www/room-exit.tcl +ad_page_contract { + Post log off message. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 25, 2000 + @cvs-id $Id: room-exit.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull +} + +set user_id [ad_conn user_id] + + +set read_p [ad_permission_p $room_id "chat_read"] +set write_p [ad_permission_p $room_id "chat_write"] +set ban_p [ad_permission_p $room_id "chat_ban"] + +if { ($read_p == "0" && $write_p == "0") || ($ban_p == "1") } { + #Display unauthorize privilege page. + ad_returnredirect unauthorized +} + +chat_message_post $room_id $user_id "has leaved the room." "1" + + +ad_returnredirect index Index: openacs-4/packages/chat/www/room-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/room-new-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/room-new-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,38 @@ +#/chat/www/room-new-2.tcl +ad_page_contract { + Add a new room to the database. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 15, 2000 + @cvs-id $Id: room-new-2.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + pretty_name:notnull,trim + {description:trim ""} + {moderated_p "f"} + {archive_p "f"} + {active_p "t"} +} + +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] +set creation_ip [ad_conn peeraddr] + +ad_require_permission $package_id chat_room_create + +if {[catch {set room_id [chat_room_new -moderated_p $moderated_p \ + -description $description \ + -active_p $active_p \ + -archive_p $archive_p \ + -context_id $package_id \ + -creation_user $user_id \ + -creation_ip $creation_ip $pretty_name]} errmsg]} { + ad_return_complaint "Create new room failed." $errmsg +} + +ad_returnredirect "room?room_id=$room_id" + + + + + + Index: openacs-4/packages/chat/www/room-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/room-new.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/room-new.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,33 @@ +#/chat/www/room-new.tcl +ad_page_contract { + Display a form to create a new room. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 13, 2000 + @cvs-id $Id: room-new.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { +} -properties { + context_bar:onevalue + room_id:onevalue + title:onevalue + action:onevalue + submit_label:onevalue + pretty_name:onevalue + moderated_p:onevalue +} + +ad_require_permission [ad_conn package_id] chat_room_create + +set context_bar [ad_context_bar "Create a room"] +set title "Create a room" +set action "room-new-2" +set submit_label "Create room" +set pretty_name "" +set description "" +set moderated_p "f" +set archive_p "f" +set active_p "t" +set room_id "" + +ad_return_template "room-entry" + Index: openacs-4/packages/chat/www/room.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/room.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/room.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,84 @@ + + +@context_bar@ +Room Information + +

      Room information

      + +
        +
      • Room name: @pretty_name@ +
      • Description:
        @description@
        +
      • Moderated: @moderated_p@ +
      • Active: @active_p@ +
      • Archive: @archive_p@ + +

        (Edit) + +

      +
      + +

      No information available. + + +

      Users allow +

      +Users ban + +Room moderators + +

      Transcripts +

      + +

      Extreme Actions +

      +
      + Index: openacs-4/packages/chat/www/room.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/room.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/room.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,112 @@ +#/www/chat/room.tcl +ad_page_contract { + Display information about chat room. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 15, 2000 + @cvs-id $Id: room.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull +} -properties { + context_bar:onevalue + pretty_name:onevalue + description:onevalue + archive_p:onevalue + moderated_p:onevalue + active_p:onevalue + room_view_p:onevalue + room_edit_p:onevalue + room_delete_p:onevalue + user_ban_p:onevalue + user_unban_p:onevalue + user_grant_p:onevalue + user_revoke_p:onevalue + moderator_grant_p:onevalue + moderator_revoke_p:onevalue + transcript_create_p:onevalue + transcript_delete_p:onevalue + transcript_edit_p:onevalue + transcript_view_p:onevalue + moderators:multirow + users_allow:multirow + users_ban:multirow + chat_transcripts:multirow +} + +set context_bar [ad_context_bar "Room information"] + + +### +# Get all available permission of this user on this room. +### +set room_view_p [ad_permission_p $room_id chat_room_view] +set room_edit_p [ad_permission_p $room_id chat_room_edit] +set room_delete_p [ad_permission_p $room_id chat_room_delete] +set user_ban_p [ad_permission_p $room_id chat_user_ban] +set user_unban_p [ad_permission_p $room_id chat_user_unban] +set user_grant_p [ad_permission_p $room_id chat_user_grant] +set user_revoke_p [ad_permission_p $room_id chat_user_revoke] +set moderator_grant_p [ad_permission_p $room_id chat_moderator_grant] +set moderator_revoke_p [ad_permission_p $room_id chat_moderator_revoke] +set transcript_create_p [ad_permission_p $room_id chat_transcript_create] +set transcript_delete_p [ad_permission_p $room_id chat_transcript_delete] +set transcript_edit_p [ad_permission_p $room_id chat_transcript_edit] +set transcript_view_p [ad_permission_p $room_id chat_transcript_view] + +### +# End geting all available permissions. +### + +### +# Get room basic information. +### +db_1row room_info { + select pretty_name, description, decode(moderated_p, 't', 'Yes', 'No') as moderated_p, + decode(archive_p, 't', 'Yes', 'No') as archive_p, + decode(active_p, 't', 'Yes', 'No') as active_p + from chat_rooms + where room_id = :room_id +} + + +# List available room moderators. +db_multirow moderators list_moderators { + select party_id, acs_object.name(party_id) as name + from acs_object_party_privilege_map + where object_id = :room_id + and privilege = 'chat_room_moderate' +} + +# List authorized chat users. +db_multirow users_allow list_user_allow { + select distinct party_id, acs_object.name(party_id) as name + from acs_object_party_privilege_map + where object_id = :room_id + and (privilege = 'chat_read' or privilege = 'chat_write') +} +# List user ban from chat +db_multirow users_ban list_user_allow { + select party_id, acs_object.name(party_id) as name + from acs_object_party_privilege_map + where object_id = :room_id + and privilege = 'chat_ban' +} + +# List available chat transcript +db_multirow chat_transcripts list_transcripts { + select transcript_id, pretty_name + from chat_transcripts + where room_id = :room_id +} + +ad_return_template + + + + + + + + + + Index: openacs-4/packages/chat/www/transcript-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/transcript-delete-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/transcript-delete-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,16 @@ +#/chat/www/transcript-delete-2.tcl +ad_page_contract { + Delete chat transcript. +} { + room_id:integer,notnull + transcript_id:integer,notnull + +} + +ad_require_permission $transcript_id chat_transcript_delete + +if { [catch {chat_transcript_delete $transcript_id} errmsg] } { + ad_return_complaint "Delete transcript failed." $errmsg +} + +ad_returnredirect "room?room_id=$room_id" Index: openacs-4/packages/chat/www/transcript-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/transcript-delete.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/transcript-delete.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,17 @@ + + +@context_bar@ +Confirm chat transcript delete + +
      + + +Are you sure you want to delete Replace with transcript name? +

      +

      \ No newline at end of file Index: openacs-4/packages/chat/www/transcript-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/transcript-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/transcript-delete.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,20 @@ +#/chat/www/transcript-delete.tcl +ad_page_contract { + Display confirmation before delete chat transcript. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 28, 2000 + @cvs-id $Id: transcript-delete.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull + transcript_id:integer,notnull +} -properties { + context_bar:onevalue + room_id:onevalue + transcript_id:onevalue +} + +ad_require_permission $transcript_id chat_transcript_delete + +set context_bar [ad_context_bar "Delete transcript"] +ad_return_template Index: openacs-4/packages/chat/www/transcript-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/transcript-edit-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/transcript-edit-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,22 @@ +#/chat/www/transcript-edit-2.tcl +ad_page_contract { + Update chat transcript. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 28, 2000 + @cvs-id $Id: transcript-edit-2.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + transcript_id:notnull,integer + transcript_name:trim,notnull + contents:html,notnull + room_id:notnull,integer + {description:trim ""} +} + +ad_require_permission $transcript_id chat_transcript_edit + +if { [catch {chat_transcript_edit $transcript_id $transcript_name $description $contents} errmsg] } { + ad_return_complaint "Could not update transcript" $errmsg +} + +ad_returnredirect "transcript-view?transcript_id=$transcript_id&room_id=$room_id" \ No newline at end of file Index: openacs-4/packages/chat/www/transcript-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/transcript-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/transcript-edit.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,39 @@ +#/chat/www/transcript-edit.tcl +ad_page_contract { + Retrieve transcript content. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 28, 2000 + @cvs-id $Id: transcript-edit.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + transcript_id:integer,notnull + room_id:integer,notnull +} -properties { + context_bar:onevalue + title:onevalue + room_id:onevalue + transcript_id:onevalue + transcript_name:onevalue + description:onevalue + contents:onevalue + action:onevalue + submit_label:onevalue +} + +ad_require_permission $transcript_id chat_transcript_edit +set context_bar [ad_context_bar "Edit transcript"] + +set title "Edit transcript" +set action "transcript-edit-2" +set submit_label "Edit" + +db_1row get_transcript_info { + select pretty_name as transcript_name, + description, + contents + from chat_transcripts + where transcript_id = :transcript_id +} + +ad_return_template "transcript-entry" + Index: openacs-4/packages/chat/www/transcript-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/transcript-entry.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/transcript-entry.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,33 @@ + + +@context_bar@ +@title@ + +
      + + + + + + + + + + + + + + +
      Transcript name: +
      Description: +
      Contents: +
      +
      + +
      Index: openacs-4/packages/chat/www/transcript-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/transcript-new-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/transcript-new-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,31 @@ +#/chat/www/transcript-new-2.tcl +ad_page_contract { + Save transcript. +} { + room_id:integer,notnull + transcript_name:trim,notnull + {description:trim ""} + contents:trim,notnull,html +} + +ad_require_permission $room_id chat_transcript_create + +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] +set creation_ip [ad_conn peeraddr] + + +set transcript_id [chat_transcript_new -description $description \ + -context_id $package_id \ + -creation_user $user_id \ + -creation_ip $creation_ip \ + $transcript_name $contents $room_id] + + +ad_returnredirect "transcript-view?room_id=$room_id&transcript_id=$transcript_id" + + + + + + Index: openacs-4/packages/chat/www/transcript-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/transcript-new.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/transcript-new.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,48 @@ +#/chat/www/transcript-new.tcl +ad_page_contract { + Display available all available chat messages. +} { + room_id:integer,notnull +} -properties { + context_bar:onevalue + title:onevalue + action:onevalue + room_id:onevalue + transcript_id:onevalue + transcript_name:onevalue + description:onevalue + contents:onevalue +} + +ad_require_permission $room_id chat_transcript_create + +set context_bar [ad_context_bar [list "room?room_id=$room_id" "Room Information"] "Create transcript"] + +set transcript_id "" +set transcript_name "Untitled" +set description "" +set contents "" +set action "transcript-new-2" +set title "Create transcript" +set submit_label "Create transcript" + +#Build a list of all message. +db_foreach get_archives_messages { + select msg, person.name(creation_user) as name + from chat_msgs + where room_id = :room_id + and msg is not null + order by msg_id +} { + append contents "$name: $msg
      \n" +} + +ad_return_template "transcript-entry" + + + + + + + + Index: openacs-4/packages/chat/www/transcript-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/transcript-view.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/transcript-view.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,23 @@ + + +@context_bar@ +Transcript preview + +[Edit] +
        +
      • Name: @transcript_name@ +
      • Description: @description@ +
      • Contents: + +
          +

          @contents@ +

        +
      + + Index: openacs-4/packages/chat/www/transcript-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/transcript-view.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/transcript-view.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,31 @@ +#/chat/www/transcript-view.tcl +ad_page_contract { + Preview chat transcript. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 28, 2000 + @cvs-id $Id: transcript-view.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + transcript_id:integer,notnull +} -properties { + context_bar:onevalue + transcript_name:onevalue + transcript_id:onevalue + room_id:onevalue + description:onevalue + contents:onevalue +} + +ad_require_permission $transcript_id chat_transcript_view + +set context_bar [ad_context_bar "View transcript"] +db_1row get_transcript { + select pretty_name as transcript_name, + description, + contents, + room_id + from chat_transcripts + where transcript_id=:transcript_id +} + +ad_return_template Index: openacs-4/packages/chat/www/unauthorized.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/unauthorized.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/unauthorized.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,12 @@ + + +@context_bar@ +Unauthorized + +You don't have permission to enter this chat room. Index: openacs-4/packages/chat/www/unauthorized.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/unauthorized.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/unauthorized.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,14 @@ +#/chat/www/unauthorized.tcl +ad_page_contract { + Display unauthorized message. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 24, 2000. + @cvs-id $Id: unauthorized.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} -properties { + context_bar:onevalue +} + +set context_bar [ad_context_bar "Unauthorized privilege"] + +ad_return_template \ No newline at end of file Index: openacs-4/packages/chat/www/user-ban-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/user-ban-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/user-ban-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,18 @@ +#/chat/www/user-ban-2.tcl +ad_page_contract { + + Ban user. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 22, 2000 + @cvs-id $Id: user-ban-2.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull + party_id:integer,notnull +} + +ad_require_permission $room_id chat_user_ban + +chat_user_ban $room_id $party_id + +ad_returnredirect "room?room_id=$room_id" Index: openacs-4/packages/chat/www/user-ban.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/user-ban.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/user-ban.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,33 @@ +#/chat/www/user-ban.tcl +ad_page_contract { + + Explicit ban user from the chat room. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 22, 2000 + @cvs-id $Id: user-ban.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull +} -properties { + context_bar:onevalue + title:onevalue + action:onevalue + submit_label:onevalue + room_id:onevalue + description:onevalue + parties:multirow +} + +ad_require_permission $room_id chat_user_ban + +set context_bar [ad_context_bar "Ban user"] +set submit_label "Ban" +set title "Ban user" +set action "user-ban-2" +set description "Ban chat read/write privilege for [chat_room_name $room_id] to" +db_multirow parties list_parties { + select party_id, acs_object.name(party_id) as name + from parties +} + +ad_return_template grant-entry Index: openacs-4/packages/chat/www/user-grant-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/user-grant-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/user-grant-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,18 @@ +#/chat/www/user-grant-2.tcl +ad_page_contract { + + Grant chat user privilege. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 22, 2000 + @cvs-id $Id: user-grant-2.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull + party_id:integer,notnull +} + +ad_require_permission $room_id chat_user_grant + +chat_user_grant $room_id $party_id + +ad_returnredirect "room?room_id=$room_id" \ No newline at end of file Index: openacs-4/packages/chat/www/user-grant.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/user-grant.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/user-grant.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,35 @@ +#/chat/www/user-grant.tcl +ad_page_contract { + + Allow user to the chat room. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 22, 2000 + @cvs-id $Id: user-grant.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull +} -properties { + context_bar:onevalue + title:onevalue + action:onevalue + submit_label:onevalue + room_id:onevalue + description:onevalue + parties:multirow +} + +ad_require_permission $room_id chat_user_grant + +set context_bar [ad_context_bar "Grant user"] +set submit_label "Grant" +set title "Grant user" +set action "user-grant-2" +set description "Grant chat read/write privilege for [chat_room_name $room_id] to" +db_multirow parties list_parties { + select party_id, acs_object.name(party_id) as name + from parties +} + +ad_return_template grant-entry + + Index: openacs-4/packages/chat/www/user-revoke-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/user-revoke-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/user-revoke-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,18 @@ +#/chat/www/user-revoke-2.tcl +ad_page_contract { + + Revoke chat user privilege. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 22, 2000 + @cvs-id $Id: user-revoke-2.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull + party_id:integer,notnull +} + +ad_require_permission $room_id chat_user_revoke + +chat_user_revoke $room_id $party_id + +ad_returnredirect "room?room_id=$room_id" \ No newline at end of file Index: openacs-4/packages/chat/www/user-revoke.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/user-revoke.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/user-revoke.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,18 @@ + + +@context_bar@ +Confirm revoke user + +
      + + +Are you sure you want to revoke chat user privilege of @party_pretty_name@ from @pretty_name@? +

      +

      + Index: openacs-4/packages/chat/www/user-revoke.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/Attic/user-revoke.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/user-revoke.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,22 @@ +#/chat/www/user-revoke.tcl +ad_page_contract { + + Display confirmation before remove chat user. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 22, 2000 + @cvs-id $Id: user-revoke.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull + party_id:integer,notnull +} + +ad_require_permission $room_id chat_user_revoke + +set context_bar [ad_context_bar [list "room?room_id=$room_id" "Room information"] "Revoke user"] + +set party_pretty_name [db_string get_party_name "select acs_object.name(:party_id) from dual"] + +set pretty_name [chat_room_name $room_id] + +ad_return_template Index: openacs-4/packages/chat/www/user-unban-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/user-unban-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/user-unban-2.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,18 @@ +#/chat/www/user-unban-2.tcl +ad_page_contract { + + Unban chat user + + @author David Dao (ddao@arsdigita.com) + @creation-date November 22, 2000 + @cvs-id $Id: user-unban-2.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull + party_id:integer,notnull +} + +ad_require_permission $room_id chat_user_unban + +chat_user_unban $room_id $party_id + +ad_returnredirect "room?room_id=$room_id" Index: openacs-4/packages/chat/www/user-unban.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/user-unban.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/user-unban.adp 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,17 @@ + + +@context_bar@ +Confirm unban user + +
      + + +Are you sure you want to unban @party_pretty_name@ from @pretty_name@? +

      +

      Index: openacs-4/packages/chat/www/user-unban.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/user-unban.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/user-unban.tcl 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,22 @@ +#/chat/www/user-unban.tcl +ad_page_contract { + + Display confirmation before unban user. + + @author David Dao (ddao@arsdigita.com) + @creation-date November 22, 2000 + @cvs-id $Id: user-unban.tcl,v 1.1 2001/04/20 20:51:08 donb Exp $ +} { + room_id:integer,notnull + party_id:integer,notnull +} + +ad_require_permission $room_id chat_user_unban + +set context_bar [ad_context_bar [list "room?room_id=$room_id" "Room information"] "Unban user"] + +set party_pretty_name [db_string get_party_name "select acs_object.name(:party_id) from dual"] + +set pretty_name [chat_room_name $room_id] + +ad_return_template \ No newline at end of file Index: openacs-4/packages/chat/www/doc/cover.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/doc/cover.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/doc/cover.html 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,72 @@ + + + + + + Cover Sheet: Chat + + + +

      +Cover Sheet: Chat

      + +
      +

      +I. The Big Picture:

      +The Chat application offers a reliable means by which site members can +initiate and participate in both real-time and moderated discussions. Discussions +can be both public or restricted to people in certain user groups. The +Chat application allows for the archiving and retrieval of these discussions +as well. The Chat application also may be used for one-to-one real-time +browser-based discussions, which can be helpful in a customer service setting. +Unlike ordinary instant messaging systems, this enables a customer service +representative to transmit images to the customer and, if appropriate, +preformatted responses to frequently asked questions. This application +can also serve as a user-to-user instant messaging system, allowing users +to send private messages to each other. +

      +II. Features:

      + +
        +
      • +Maintains a comprehensive view of a community member's chat participation +on a site
      • + +
      • +Allows for the initiation and maintenance of browser-based public chat +rooms
      • + +
      • +Allows for the initiation and maintenance of browser-based private chat +rooms
      • + +
      • +Allows for the initiation and maintenance of one-to-one discussions
      • + +
      • +Supports moderated chats and custom moderation determination
      • + +
      • +Supports custom message expiration intervals for chat messages
      • + +
      • +Supports different levels of accessibility to chat message history
      • + +
      • +Allows for the comprehensive tracking of user input from these chat rooms
      • +
      + +

      +III. Related Links:

      + + + +
      + + Index: openacs-4/packages/chat/www/doc/design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/doc/design.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/doc/design.html 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,531 @@ + + + + + + Chat Design Document + + + +

      +Chat Design Document +

      +by David Dao +
      +

      +I. Essentials

      + + + +

      +II. Introduction

      +We have our own chat server because: +
        +
      • +We want to allow our users to participate in instant message communications +with other community members.
      • + +
      • +We want our system to be integrated.
      • + +
      • +We want to use our own internal permissioning system to more securely determine +who can enter, create or delete rooms that would be possible using an external +security system.
      • + +
      • +We want something that can be extended and maintained by any ArsDigita +programmer, i.e., something that requires only AOLserver, Tcl, Oracle, +and Java skills.
      • + +
      • +Commercial chat servers tend to be expensive to maintain and will require +a separate community data model.
      • +
      + +

      +III. Historical Considerations

      +Chat applications allow inexpensive and efficient social interactions between +community members spread across the globe.  A community can use the +Chat application  to allow its members to have an interactive session +with a special guest or a community member through the means of a moderated +chat. A customer support site can use the Chat application to offer instant +responses to its customers regarding its products. +

      +IV. Competitive Analysis

      + +

      +AOL Instant Messenger (AIM)

      +So why can't companies that want to do 1:1 conversations just use AIM?  +AOL Instant Messenger works best with some additional software to be installed +on the user's machine. This is free software, is shipped with Netscape +4.x, and is certainly available to AOL service customers. But it is not +universal and you can't be guaranteed that when someone is connecting to +your Web site they have the AIM client.  Furthermore, AIM doesn't +has a logging option, thus there is no way for a site to offer a chat transcript +to its members. +

      +Yahoo Chat

      +Yahoo offers its members a wide range of services including chat. Their +chat supports both HTML and Java applet clients. Unfortunately, their chat +software is proprietary, so companies cannot incorporate their community +model with Yahoo's chat software. +

      +DigiChat

      +DigiChat is a standalone Java chat application. It offers a well thought +out chat client interface and also supports moderated chats. However like +most third party applications, there are no easy means by which Digichat +can be integrated with a site's preexisting user data model.  DigiChat +also comes with a heavy price tag, and as such it might not be suitable +for a small communities that need to support chat sessions. +

      The ArsDigita Java Chat application does not have a pretty client interface, +nor does it support text formating like Yahoo and Digichat.  However, +our Chat application is open source.  As such, any competent Java +developer will be able to improve the interface based upon their or their +employer's preferences. Using the ArsDigita Chat application allows site +developers access to a rich community data model which is compatible with +a variety of existing open-source applications. +

      +V. Design Tradeoffs

      + +

      +Archive or not?

      +We have to drive the entire system design from a publishing decision: are +we interested in seeing archives of chat sessions? If we are, then archiving +into a single table makes a lot of sense.   We can perform a +single SQL query to see everything that a user has contributed. We can +perform a single SQL query to see how a customer service person is doing. +And so on. +

      A disadvantage of archiving is that it chews up disk space.  Imagine +for a moment that your service is the size of America Online, wherein one +million subscribers chat or use AIM every day.  Imagine also that +each person types 50 rows of chat/AIM content each of which requires 100 +bytes of storage.   Such a scenario would require our table to +grow by 50 million rows and 5 GB each day. After 20 days, we would begin +to bump up against the billion-row table size that data warehouse experts +suggest as a practical limit. +

      So it seems that on popular public sites we won't be able to store everything +that users type. At the same time, a customer's interaction with a customer +service person, or a special guest chat should be archived.  Also, +many sites engage considerably less traffic than does AOL, and these sites +may benefit from being able to log all chat/AIM communications. +

      The solution we came up with was to provide an option that allows the +creator of a room to decide whether or not to archive the messages. +

      +HTML vs. Applet

      +An advantage to using an HTML client as opposed to an applet-based client +is the ability to have rich graphical representations as a part of the +chat, such as color formating, in-line images rendered by the browser in +use, et cetera.  Furthermore, users who are still using older non-Java +enabled browsers will be able to participate in the chat.  A limitation +of the HTML client is that users cannot see messages in real time, as HTML +provides no auto-update functionality. +

      By using a Java applet-based client, users can see messages updated +in real time. This is important in, e.g., a customer service setting.   +Since SUN JDK 1.1 doesn't provides a text rendering API, applet-based clients +are limited in the format of the text that they can display. There are +also limitations on the server as to how many TCP sockets can be open at +the same time.  Since each user using an applet-based chat client +will use one TCP socket, there could be a limit on how many user can use +the applet. This problem could be solved by employing customized hardware +more suitable for the task.  +

      Our system provides both a HTML and a Java applet-based chat client.  +By providing each of these, we open up our Chat application to a broader +pool of users by offering users the chat method which will work best for +them. +

      +Java Servlet vs. Pure AOL server

      +Use of a Java servlet provides us with +
        +
      • +reduced development time,
      • + +
      • +a large number of API provided by SUN, and
      • + +
      • +portability,
      • +
      +however using a servlet requires a somewhat nonstandard (for ACS, that +is) installation method for the chat package, since the application +requires Jakarta-tomcat and +nstomcat to be preinstalled and configure properly. These extra steps +are dificult and different on each platform. + +

      Using the AOL server socket API, there could be a performance +improvement and will not require installation of Jakarta-tomcat.  +Unfortunately, AOL does not provide much by way of documentation +regarding AOL socket. As of the current time, there are still major +features missing from the AOL socket API which would be required to +completely replace the Java/servlet method. + +

      Initially, I chose using a Java servlet as my development platform +due to time constraints. As development progressed, I analyzed the use +of the servlet in the current chat application. Since the servlets +sole purpose is to provide communication between the HTML and the Java +applet clients, I concluded that this would be adequate for the present +purposes, and that the extra efforts required to set up Jakarta-tomcat +with AOL server would be unjustified. After some experimentation, I +was able to rebuild the bridge between the HTML and the Java applet +clients using only AOL Server and the Java chat server. As a resul,t the Chat +application may now be downloaded and installed just as any other ACS 4 +applications may be. + +

      Chat message protocol: Text base vs. Java serialize object

      +

      In the earlier chat version, chat messages were broadcast to the +applet client Java serialize objects. The advantage of serialize +objects is that they make it easy to retrieve information. The +disadvantage of this method is the messages are limited to Java only. + +

      To support clients from different programming language and not +limit our application to Java, I choose an XML text base for the chat +message protocol. + +

      +Chat messages are stored in cache

      +Since we do not allow a user to view messages prior to his entrance into +the chat room, there is no need for time-consuming Oracle queries to retrieve +messages.  Storing messages in the server cache keeps us from being +able to archive all of the messages from the time the server started.  +I decided that I would limit the number of messages cached per room. +

      +VI. API

      + +

      Chat message XML definition

      +
      
      +<login>
      +
      +   <user_id></user_id>
      +
      +   <user_name></user_name>
      +
      +   <pw></pw>
      +
      +   <room_id></room_id>
      +
      +</login>
      +
      +
      After connection to the chat server, each client must +identify itself via a login message. The chat server will disconnect +the client if the first message is not a proper login message or if the user +doesn't have proper permissions for the chat room. + +
      
      +<message>
      +
      +   <message_id></message_id>
      +
      +   <from_user_id></from_user_id>
      +
      +   <from></from>
      +
      +   <to_user_id></to_user_id>
      +
      +   <to></to>
      +
      +   <room_id></room_id>
      +
      +   <status>approved | pending</status>
      +
      +   <body></body>
      +
      +</message>
      +
      +
      + +To construct a public message that will broadcast to everyone in the +chat room, the to_user_id and to fields +need to be excluded from the message. When these two fields are present in +the message then the message will only send to a specific +user. Sending private messages to HTML users is not yet supported. + +
      
      +<system>
      +
      +   <user_enter>
      +
      +      <user_id></user_id>
      +
      +      <user_name></user_name>
      +
      +   </user_enter>
      +
      +</system>
      +
      +
      +<system>
      +
      +   <user_leave>
      +
      +      <user_id></user_id>
      +
      +      <user_name></user_name>
      +
      +   </user_leave>
      +
      +</system>
      +
      +
      + +Each time a client enters or exits the room, an appropriate message +will be broadcast to all clients in the chat room notifying them of a +change in the chat user list. + +
      
      +<system>
      +
      +   <userlist>
      +
      +      <user>
      +
      +         <user_id></user_id>
      +
      +         <user_name></user_name>
      +
      +      </user>
      +
      +      <user>
      +
      +         <user_id></user_id>
      +
      +         <user_name></user_name>
      +
      +      </user>
      +
      +      ...
      +      ...
      +   </userlist>
      +
      +</system>
      +
      +
      After the Java applet client has successfully logged +into the chat room, a list of users currently in the room will be sent +our from the server. + +

      API

      + +

      All chat functionalities accessable from the browser are available +as an API. Providing these API allows different applications to modify +chat without an application-specific user interface.   These +API will throw errors if their corresponding PL/SQL statement fail, so +all applications employing them need to 'catch error' to display a +nice error message to the user.

      chat_message_post +- This API inserts chat message to the database depend whether a chat +room archive mode. It is also broadcast the message to all Java +clients in the room. + +

      chat_message_retrieve +- This API is only used by the HTML client, and is used each time the HTML +client refreshes. The API does not require database call, messages will be retrieve +from AOL Server cache. +

      +VII. Data Model Discussion

      + +

      +Should chat messages constitute a subtype of acs-object?

      +We are not implementing individual permissioning on each chat message. +As a result we can avoid unnecessary complexity of subtyping the chat message +type. Chat messages will have their own table. +

      +VIII. User Interface

      + +

      +Types of chat we need to support

      + +
        +
      • +Public chat rooms. These are open to everyone in the +users_active +view.
      • + +
      • +Private chat rooms. These are open to people in particular user +parties. We check permissions using permissioning for each room.
      • +
      +For either kind of chat room, we should support moderated chat. That is, +in such a scenario a posting doesn't go live until it has been approved +by someone who has the 'chat_room_moderate' privilege in the room.  +

      We want to support one-to-one messages for customer support, so we need +one layer on top of the Chat application to make sure that users can find +an appropriate chat partner. For example, if Bill User says that he needs +support for his Acme widget, the system has to find the least busy authorized +Acme widget support person and start a one-to-one chat session between +Bill and that person. +

      For public community sites where nothing is being sold or supported, +a publisher might wish to limit the load on the server from all of this +one-to-one chatting. +

      +Options for the publisher

      +Some options are configurable per-room, e.g., +
        +
      • +Is a room private?
      • + +
      • +If so, grant permission to a particular party to enter the room?
      • + +
      • +Is a room moderated?
      • + +
      • +If so, by whom?
      • + +
      • +Should we archive all chat messages in this room?
      • + +
      • +Is this room active?
      • +
      + +

      +Options for room administrator

      + +
        +
      • +If this room archives all of its messages, then give a 'create transcript' +option.
      • + +
      • +View available transcripts.
      • + +
      • +Edit/delete existing transcripts.
      • +
      + +

      +Why the HTML version can't autorefresh

      +The HTML page cannot have a Refresh header to force a redraw of the page; +if it did, the user would be at risk of losing what he or she was typing +into the post form. +

      +IX. Configuration/Parameters

      + +
        +
      • +AppletHeight - Height of display Java applet.
      • + +
      • +AppletWidth - Width of display Java applet.
      • + +
      • +ServerPort - Port will be listen for Java client connection.
      • +
      + +

      +X. Future Improvements/Areas of Likely Change

      +A much more stable Applet client interface would be in order. It would +also be nice if we allowed more concurrent applet connections to the server. +

      +XI. Authors

      + + + +

      +XII. Revision History

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Document Revision #Action Taken, NotesWhen?By Whom?
      0.1Revision from chat 3.4 design document11/17/2000David Dao
      0.2Editing and augmentation11/18/2000David Dao and Josh Finkler
      0.3Editing12/04/2000David Dao
      0.4Editing12/05/2000Josh Finkler
      0.5Revision for beta version01/11/2001David Dao
      + +

      +


      ddao@arsdigita.com + + Index: openacs-4/packages/chat/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/doc/index.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/doc/index.html 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,54 @@ + + + + + + Chat + + + +

      +Chat

      + +
      +

      +Document overview

      + + + + + + + + + + + + + + + + + + + +
      IntroductionOverview of the Chat application
      RequirementsWhat the Chat system is supposed to do
      DesignThe gory details of how the Chat application satisfies the requirements +above as well as how it integrates with the ACS..
      + +

      +Reporting bug

      + + + +
      +
      +David Dao
      + +
      Last modified: $Id: index.html,v 1.3 2000/12/05 00:28:56 david Exp +$ + + Index: openacs-4/packages/chat/www/doc/requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/doc/requirements.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/chat/www/doc/requirements.html 20 Apr 2001 20:51:08 -0000 1.1 @@ -0,0 +1,245 @@ + + + + + + Chat Application Requirements + + + +

      +Chat Application Requirements

      +by Joshua Finkler and David +Dao +
      +

      +I. Introduction

      +This document explains the requirements for the Chat application for the +ArsDigita Community System. +

      +II. Vision Statement

      +The chat application provides a mechanism for multiple users to post messages, +associate user names with these messages, and display and update the last +several messages so that chat visitors can follow the ongoing discussion. +Such chat sessions need to be organized by topics so that users can find +sessions relevant to their interests. The application should allow for +multiple user as well as one-on-one sessions. Fine grain permissions customization +should be available to keep information inaccessible to those users without +appropriate authorization. +

      +III. System/Application Overview

      +The chat application will consist of a user, group administrator and site-wide +administrator interface. Chat sessions will be separated into rooms. Messages +posted to each room will be archived and stored in a database. This archival +method will integrate with the ACS so as to allow a comprehensive overview +of a particular chat user's posting history. Chat rooms will be able to +be created and dropped in conjunction with the creation or dropping of +user groups or other database structures. The application must be reliable +and scalable. +

      +IV. Use-cases and User-scenarios

      +Saul Service-Employee wants to be able to interact with his customers over +the Web while they are working on their computers, perhaps to help them +diagnose their computer-related problems. He would like to be able to maintain +several sessions simultaneously, so as to optimize his service efficacy. +Saul would also like to be able to drop canned responses into a chat session +when the customer asks a frequently asked question, thereby freeing up +even more of his valuable time. By using the chat application to interact +with his customers, Saul should be able to achieve each of these goals. +

       Bertha Bosslady wants to be able to keep tabs on the performance +of service employees like Saul. By using the database backed chat application, +Bertha should be able to ensure that has a complete record of Saul and +his coworkers customer interactions. These records should also be able +to be used to evaluate the legitimacy of future customer complaints or +praises of Saul's performance. Aggregating the information found in these +records should allow Bertha get a broad picture of the performance of her +service team in general. Scraping these records should help Bertha identify +frequently asked questions for which a canned response would be appropriate. +

       Chatty Cathy, a member of a role-playing fantasy community, wants +to initiate a discussion with other gamers on the topic "Which is the better +allegiance for cleric dwarves: chaotic good or lawful evil?" She should +be able to search the site's chat rooms and find an appropriately entitled +one, e.g., "Advanced Dungeons and Dragons". She should be able to join +the chat discussion, post her question, get other interested nerds to respond, +and have her desired discussion. +

       Edward Expatriate has moved far away from his homeland but still +wishes to keep in touch with his friends and family. Long distance phone +calls are out of the question due to their expense. Using the chat application, +Ed should be able to set up scheduled chats or log on in the hope of an +impromptu chat session with these people, thereby keeping in touch while +keeping costs down. +

      The Conglomo Corporation has a scheduled guest chat with Dr. Erudite. +The chat room is open to the public, however to prevent  profanity +and offensive question content,  submitted questions do not go live +immediately. Mark Moderator oversees the chat room and screens each question +before approving them for inclusion in the chat.   Since Dr. +Erudite is the guest, all his answers and comments go live immediately.  +The day after the chat, Mark receives a request for a  transcript +of the chat from one of his site users who was unable to follow the chat +live.  Mark creates a transcript using a tool provided by the application +which allows him to clean up some formatting issues and save it as a file.  +Now a nice properly formatted transcript of the chat with Dr. Erudite is +available to each site member. +

      Carl Consumer could not find a product at Shop.com. Frustrated after +spending the better part of an hour engaged in an unsuccessful search, +Joe decides to leave the site and go to another competitive site. Just +before doing so, he sees a link offering to allow him to chat with a customer +service representative.  He decides to give it one last try and so +enters the chat and types "help!".  The Shop.com representative is +notified of the incoming message by an audio alert.  Within the minute +a Shop.com representative guides Joe to the product that he seeks.  +

      +V. Related Links

      + + + +

      +VI.A. Requirements: The Data Model

      +10 The Data Model +
        +
      • 10.10 Chat Rooms
      • +

        10.10.10 Chat rooms have unique display names within each instance. +

        10.10.20 Chat rooms have option to archive all chat messages or not archive. +

        10.10.30 Chat rooms have active and deactivate status. +

        10.10.40 Chat rooms have auditing information (creation user, creation date). +

        10.10.50 Chat rooms should be associated with permissions levels +for message posting. "Moderated mode" chat room will be such that each +message posted shall require approval from the administrator for that room +before being accessible to other chat users. "Unmoderated mode" chat rooms +will be such that messages posted to that room are immediately accessible +to other chat users. +

        10.10.60 Chat rooms could either be private or public. +

          +
        • All register users automaticly grant permission to enter and participate in public chat room. +
        • Users/groups must be explicitly grant permission to enter and particate in private chat room by a room admin. +
        +

        10.10.70 Permissioning system to allow a group and/or single +user to enter a chat room. This way will also implement banning certain +user to a individual chat room. +

        10.10.80 Permissioning system to allow a group and/or single +user to post a message to a chat room. +

        +

      • 10.20 Chat messages
      • + +

        10.20.10 Each log message has auditing information. +

        10.20.20 The chat room to which a message belongs shall be identified. +

        10.20.30 A toggle value should be in place to indicate whether +the message is in plain text or HTML format. +

        10.20.40 A toggle value should be in place to indicate whether +the message has been approved by the moderator. +

        10.20.50 A private message never get log. +

      • +10.30 Chat transcripts
      • + +

        10.30.10 Each chat transcript has a display name. +

        10.30.20 Each chat transcript has a description. +

        10.30.30 Treat the whole transcript content as one big text file. +

        10.30.40 Permissioning system to allow who able to view the transcript.

      + +

      +VI.B. Requirements: User Interface

      + +
        +
      • +20.10 Chat Administration Interface
      • +

        20.10.10 Administrator should be able to create, edit, and +delete a chat room. +

        20.10.20 Administrator should be able to delete all messages +from a chat room. +

        20.10.40 Administrator should be able to add and remove moderators +for a given room. +

        20.10.40 Administrator should be able to grant or revoke group/user +privilege to a chat room. +

        20.10.50 Administrator should be able to active and deactivate +a particular chat room. +

        20.10.60 Administrator should be able to create, edit and delete +a chat transcript. +

        +

      • +20.20 Moderator Interface
      • + +

        20.20.10 Moderator should be able to post messages directly +in a moderated chat room without the need for moderator (self-) approval. +

        20.20.20 Moderator should be able to accept or reject messages +from other users in the moderate chat rooms. +

        20.20.30 Moderator should be able to suspend or revoke chat privileges +from chat room users. +

        +

      • +20.30 Regular User HTML Interface
      • +

        20.30.10 User should only be able to enter a public chat +room accessible to this user's user group. +

        20.30.20 User should be able to automatically invite another +user to join them in a chat room by supplying an email address. +

        20.30.30 User should be able to do a private chat with other user. +

        20.30.40 If a chat room is moderated, then the user's message +will not go live immediately. +

        20.30.50 There is a refresh link to ensure they receive the latest messages. +

        20.30.60 The user should see all other users that post messages +in the last specified number of minutes and all Java chatters. +

        20.30.70 Users should be able to chat privately with another +user. +

        +

      • 20.40 Regular User Java Interface
      • +

        20.40.10 See a list of all Java chatters in the room and +HTML chatters who post message within a specified number of minutes. +

        20.40.20 See a list of all chat rooms accessible by this user. +

        20.40.30 A different pop up windows for each private conversation. +

        20.40.40 User A could not has a private conversation with user B, +if user B put user A on ignore list. +

        20.40.50 Optional audio alert for each new chat message. +

        20.40.60 Each user can have customize icon for his screen name. +

        20.40.70 Support smilie faces in chat area. +

        20.40.80 Able to ignore messages from a specific user. +

        20.40.90 Disallow duplicate screen name from Java chatter in the same chat room. + + +

        +VII. Revision History

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Document Revision #Action Taken, NotesWhen?By Whom?
        0.1Created2000-10-03Joshua Finkler
        0.2Revision for chat ACS 4.02000-11-08David Dao
        + +

        +


        +
        +jfinkler@arsdigita.com
        + +
        Last modified: October 03 2000 12:00 PST 2000 + + Index: openacs-4/packages/clickthrough/clickthrough.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/clickthrough.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/clickthrough.info 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,62 @@ + + + + + Clickthrough + Clickthrough + f + + + + oracle + postgresql + + Nuno Santos + The Clickthrough package provides a service that allows a site or subsite to monitor how its users exit the site, by recording which links are followed to external sites. + 2000-12-14 + ArsDigita Corporation + Clickthrough collects information about each pair of local (origin) and foreign (destination) addresses, including a daily count of clickthroughs between each such pair of addresses. + +This clickthrough log can be used to provide external sites with a measure of how much traffic originated from the local site, which can be useful for auditing or confirming revenue generating clickthroughs (e.g., referrals). + +Any link can be clickthrough-enabled by embedding special information in its destination address. This is achieved by wrapping the href attribute with a call to `clickthrough_href' (e.g., [clickthrough_href http://www.arsdigita.com]). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/clickthrough/doc/clickthrough-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/doc/Attic/clickthrough-requirements.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/doc/clickthrough-requirements.html 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,271 @@ + + +Clickthrough Package Requirements Template + + + + +

        Clickthrough Package Requirements Template

        + +by Nuno Santos + +
        + +

        I. Introduction

        + +The following is a requirements document for the Clickthrough package, an ACS service. + +

        II. Vision Statement

        + +The Clickthrough package provides a service that allows a site or subsite +to monitor how its users exit the site, by recording which links are +followed to external sites. Any link can be clickthrough-enabled by embedding +special information in its destination address. + +

        + +Clickthrough collects information about each pair of local (origin) and foreign (destination) +addresses, including a daily count of clickthroughs between each such pair of addresses. + +

        + +This clickthrough log can be used to provide external sites with a measure +of how much traffic originated from the local site, which can be useful for +auditing or confirming revenue generating clickthroughs (e.g., referrals). + +

        III. Clickthrough Package Overview

        + +The Clickthrough package, as a service, has no user interface: in fact, the clickthrough +functionality is totally transparent to the end user, who simply follows links as if they +were regular, direct links to external sites. The bulk of the package is composed of +admin pages that build reports about the collected information. + +

        + +The Clickthrough package is subsite aware and can be mounted under any other package +mount point to provide clickthrough logging service for that package (such a package +becomes the parent package). If site-wide clickthrough logging is desired, +a Clickthrough instance can be mounted under the site root. Namely, this can be done +to emulate the functionality and behavior of the legacy clickthrough module, which +used /ct/ as its "mount point". + +

        + +The allowed transitions in the Clickthrough package are: + +

          +
        • user level: +
            +
          • recording information about the clickthrough (origin, destination, date, + parent package), by incrementing the appropriate click count for each + clickthrough-enabled link that the user clicks on; +
          + +
        • Clickthrough administrator level: +
            +
          • obtaining reports about the collected information, including all clickthroughs + to and from specific addresses, by date, for each specific parent package. +
          +
        + +Clickthrough-enabled links to external sites can be embedded in dynamic pages +(e.g., Tcl, ADP) by using a procedure that automatically wraps a plain link with +the appropriate clickthrough information. + +

        + +Embedding links in static HTML pages, although supported in previous versions, is +no longer a requirement for this version of Clickthrough. In fact, the embedded link +would have to contain hardcoded clickthrough information. This has the disadvantage +of making such a clickthrough-enabled link dependent on the location (the mount point) +of the Clickthrough instance. + +

        IV. Use-cases and User-scenarios

        + +The Clickthrough package is used by three possibly overlapping classes of users: + +
          +
        • Developers or designers (collectively referred to as "developers"), who embed + clickthrough-enabled links into dynamic pages; +
        • End-users (referred to simply as "users"), who follow clickthrough-enabled links + to external sites; +
        • Clickthrough administrators (referred to "admins"), who use the admin pages to + obtain information about the clickthroughs from the site to external addresses. +
        + + +

        Clickthrough-enabling links

        + +David Developer wants a link on a page to be clickthrough-enabled. This means that when +the user clicks on the link she will be taken to the external site as soon as possible, and the +clickthrough will be logged in the background. + +

        + +To clickthrough-enable a link in a dynamic page (e.g., a Tcl or ADP page), David wraps the +href part of the link as an argument to a procedure that automatically provides +all the necessary information for the clickthrough to be logged, namely the location of the +local page (i.e., the origin of the clickthrough), as well as the location of the appropriate +clickthrough instance in the sitemap. In this case, David does not need to be aware of the +final location of the page he's writing nor be aware of whether and where the clickthrough instance +will be mounted on the sitemap, because he does not need to provide any information to the +procedure other than the destination URL. + +

        Following clickthrough-enabled links

        + +Ursula User is browsing the site and follows a clickthrough-enabled link to an external site. +To Ursula, this link is indistinguishable from a regular link. By clicking on it, Ursula is taken +to the destination page as soon as possible, with only a slight delay. In the background, the +Clickthrough package has logged this clickthrough, by incrementing the daily click count for this +particular local-URL/foreign-URL/parent-package tuple. + + +

        Obtaining reports about clickthroughs

        + +Albert Admin wants to know how users are exiting a specific part of the site by following links +to external sites. If a Clickthrough instance has been previously mounted under the package that Albert +is interested in (meaning that the package has been recording clickthroughs for clickthrough-enabled +links), he visits the admin pages for that Clickthrough instance and is able to see reports about when and +how frequently users have left that section by following clickthrough-enabled links to external sites. +Albert is shown a daily click count for each local page, for each external site and/or for each +local-URL/foreign-URL pair. Albert can see raw totals or agreggated data (summary reports). + + +

        V. Related Links

        + +
          +
        • System/Package "coversheet" - where all documentation for this software is linked off of +
        • Design document +
        • Developer's guide +
        • User's guide +
        • Other-cool-system-related-to-this-one document +
        • Test plan +
        • Competitive system(s) +
        + +

        VI.A Requirements: Data Model

        + +
          +
        • 10.10.0 Clickthrough log +

          +

            +
          • 10.10.10 Each clickthrough log record refers to a unique local-URL/foreign-URL pair + and to a parent package instance. +
          • 10.10.20 No more than one clickthrough log record for each local-URL/foreign-URL pair + will exist for any single day. +
          • 10.10.30 Each clickthrough log record contains an incremental count of the clickthroughs + for the local-URL/foreign-URL pair, the package instance and the day it refers to. +
          +
        + +

        VI.B Requirements: Developer Support

        + +
          +
        • 20.10.0 Format of clickthrough-enabled links +

          +

            +
          • 20.10.10 A clickthrough-enabled link will have the following format: + /parent-package/clickthrough-package/relative-path-of-local-file-under-parent-package?send_to=foreign-url, in which + parent-package represents the mounting point of the parent package, + clickthrough-package represents the mounting point of the Clickthrough + instance underneath the parent package, + relative-path-of-local-file-under-parent-package represents the path to the local + file that contains the clickthrough-enabled link, relative to the parent package, and + foreign-url represents the URL of the external site. + +

            + + As an example, /doc/click/basics/file.html?send_to=http://www.adomain.com/adir/afile.html + will record clickthroughs from a file named file.html, located under + /doc/basics (/doc being the mounting point for the ACS Core Documents + package and basics being a subdirectory within that package) to the + http://www.adomain.com/adir/afile.html external page. +

          +

          + +

        • 20.20.0 Clickthrough-enabling links +

          +

            +
          • 20.20.10.0 Clickthrough-enabling links in dynamic pages +

            +

              +
            • 20.20.10.10 A developer shall be able to build a clickthrough-enabled + link in a dynamic page (e.g., Tcl or ADP pages) just by passing the destination, + or foreign, URL to a procedure. This procedure will return the content of + the href attribute of an <a> tag. + Such content will be determined at run-time and will correspond either + to a plain link to the provided URL or to a clickthrough-enabled link + to that same address, depending on whether a Clickthrough package is + mounted under the package to which the page belongs, or not. +
            +
          +
        + + +

        VI.C Requirements: Internal Transactions

        + +
          +
        • 30.10.0 Recording clickthroughs +

          +

            +
          • 30.10.10 Clickthrough logging should use a caching mechanism in order to avoid incurring + a database hit for every link that is followed. +
          +
        + + +

        VI.D Requirements: Administrator Interface

        + +
          +
        • 40.10.0 Raw data +

          +

            +
          • 40.10.10 The admin will be able to see a list of all clickthroughs from a local URL. +
          • 40.10.20 The admin will be able to see a list of all clickthroughs to a foreign URL. +
          • 40.10.30 For each local-URL/foreign-URL pair, the admin will be shown a daily count + of clickthroughs. +
          +

          + +

        • 40.20.0 Aggregated data (summary reports) +

          +

            +
          • 40.10.10 The admin will be able to see a list of all clickthroughs, grouped by local URL, + along with a total count of clickthroughs for each URL pair. +
          • 40.10.20 The admin will be able to see a list of all clickthroughs, grouped by foreign URL, + along with a total count of clickthroughs for each URL pair. +
          • 40.10.30 For each local-URL/foreign-URL pair, the admin will be shown a daily count + of clickthroughs. +
          +
        + + +

        VII. Revision History

        + + + + + + + + + + + + + + + + + +
        Document Revision #Action Taken, NotesWhen?By Whom?
        0.1Creation2000/11/20Nuno Santos
        + +

        + +


        +
        nuno@arsdigita.com
        + +Last modified: $Date: 2001/04/20 20:51:09 $ + + + Index: openacs-4/packages/clickthrough/sql/oracle/clickthrough-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/sql/oracle/clickthrough-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/sql/oracle/clickthrough-create.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,19 @@ +-- +-- packages/clickthrough/sql/clickthorugh-create.sql +-- +-- @author Philip Greenspun (philg@mit.edu) +-- @creation-date 1997 +-- @cvs-id $Id: clickthrough-create.sql,v 1.1 2001/04/20 20:51:09 donb Exp $ +-- + + +create table clickthrough_log ( + -- URLs can't be too long or they won't be indexable in Oracle + local_url varchar2(400) not null, -- local URL does not include starting / + foreign_url varchar2(400) not null, -- full URL on the foreign server + entry_date date, -- clickthrough counts are daily counts + click_count integer default 0, + package_id constraint ct_log_package_id_fk + references apm_packages(package_id), + constraint ct_log_pk primary key (local_url, foreign_url, entry_date) +); Index: openacs-4/packages/clickthrough/sql/oracle/clickthrough-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/sql/oracle/clickthrough-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/sql/oracle/clickthrough-drop.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,12 @@ +-- +-- packages/acs-messaging/sql/acs-messaging-create.sql +-- +-- @author philg@mit.edu +-- @creation-data 2000-08-27 +-- @cvs-id $Id: clickthrough-drop.sql,v 1.1 2001/04/20 20:51:09 donb Exp $ +-- + + +drop table clickthrough_log; + + Index: openacs-4/packages/clickthrough/tcl/clickthrough-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/tcl/clickthrough-init.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/tcl/clickthrough-init.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,23 @@ + +# /packages/clickthrough/tcl/clickthrough-init.tcl +# @author Nuno Santos (nuno@arsdigita.com) +# @creation-date 2000-11-22 +# @cvs-id $Id: clickthrough-init.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ + + +# create a single, shared cache array and schedule a single cache sweeper for all clickthrough instances +if {![nsv_exists clickthrough_cache total_clicks]} { + + # total number of cached clicks + nsv_set clickthrough_cache total_clicks 0 + + # create a shared mutex for accessing cache + nsv_set clickthrough_mutex mutex [ns_mutex create] + + # schedule cache sweeper to run every X seconds + ad_schedule_proc 300 clickthrough_cache_sweeper + + #ad_schedule_proc [ad_parameter "CacheSweeperInterval" "clickthrough"] clickthrough_cache_sweeper + #can't get package parameter during startup??? +} + Index: openacs-4/packages/clickthrough/tcl/clickthrough-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/tcl/clickthrough-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/tcl/clickthrough-procs.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,220 @@ + +ad_library { + Tcl helper procs for the Clickthrough package. + + @author Nuno Santos (nuno@arsdigita.com) + @creation-date 2000-11-16 + @cvs-id $Id: clickthrough-procs.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} + +ad_proc clickthrough_href {href_url} { + Detects if a clickthrough instance is mounted beneath the current package + (ie, if the current package is interested in tracking clickthroughs). + Builds the href part of a clickthrough-enabled (or plain) HTML link based on the presence (or not) of such a clickthrough instance. + + @param href_url The URL to link to + + @author Nuno Santos (nuno@arsdigita.com) + @creation-date 2000-11-16 + @cvs-id $Id: clickthrough-procs.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + set package_id [ad_conn package_id] + + # check to see if there is a clickthrough instance mounted below the current package mount point and + # if so, return the appropriate url (eg, /parent_package_url/click_url/); otherwise, return empty string + set clickthrough_url [db_string clickthrough_url_sql "select site_node.url(sn2.node_id) + from site_nodes sn1, site_nodes sn2, apm_packages p + where sn1.object_id = :package_id + and sn2.parent_id = sn1.node_id + and sn2.object_id = p.package_id + and p.package_key = 'clickthrough'" -default ""] + + if {[empty_string_p $clickthrough_url]} { + # no clickthrough application mounted beneath this package's mounting point, + # so just make plain link + + return $href_url + } else { + # a clickthrough application is available for logging this click, + # so build appropriate link: + # clickthrough_url = /parent_package_url/click_url/ + # + extra_url = local page's relative url to package's root + + return "$clickthrough_url[ad_conn extra_url]?send_to=[ad_urlencode $href_url]" + } +} + + +ad_proc clickthrough_link {href_url link_content {link_attributes ""}} { + Detects if a clickthrough instance is mounted beneath the current package + (ie, if the current package is interested in tracking clickthroughs). + Builds a full clickthrough-enabled (or plain) HTML link based on the presence (or not) of such a clickthrough instance. + + @param href_url The URL to link to + @param link_content The content that goes between the ... tags + @param link_attributes Any additional attributes to go inside the tag + + @author Nuno Santos (nuno@arsdigita.com) + @creation-date 2000-11-16 + @cvs-id $Id: clickthrough-procs.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + return "$link_content" +} + + +ad_proc clickthrough_parent_package_id {} { + Returns the package_id of the parent package of this clickthrough instance + + @author Nuno Santos (nuno@arsdigita.com) + @creation-date 2000-11-16 + @cvs-id $Id: clickthrough-procs.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + set clickthrough_package_id [ad_conn package_id] + + set parent_package_id [db_string parent_package_id_sql " + select sn2.object_id as parent_package_id + from site_nodes sn1, site_nodes sn2 + where sn1.object_id = :clickthrough_package_id + and sn1.parent_id = sn2.node_id"] + + return $parent_package_id +} + +ad_proc clickthrough_parent_package_instance_name {} { + Returns the instance_name of the parent package of this clickthrough instance + + @author Nuno Santos (nuno@arsdigita.com) + @creation-date 2000-11-16 + @cvs-id $Id: clickthrough-procs.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + set clickthrough_package_id [ad_conn package_id] + + set parent_package_instance_name [db_string parent_package_id_sql " + select instance_name + from site_nodes sn1, site_nodes sn2, apm_packages p + where sn1.object_id = :clickthrough_package_id + and sn1.parent_id = sn2.node_id + and p.package_id = sn2.object_id"] + + return $parent_package_instance_name +} + +ad_proc clickthrough_log_click {local_url foreign_url package_id} { + Logs a clickthrough from a local URL to a foreign URL. + + @param local_url The local URL, origin of the clickthrough + @param foreign_url The foreign URL, destination of the clickthrough + @param package_id The id of the parent package of the local URL + + @author Nuno Santos (nuno@arsdigita.com) + @creation-date 2000-11-16 + @cvs-id $Id: clickthrough-procs.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + # cache_key has the following format: + # *Foreign**Package* + append cache_key $local_url " *Foreign* " $foreign_url " *Package* " $package_id + + if {[catch { + # update or set the new click count for this local_url/foreign_url/package_id tuple + if {[nsv_exists clickthrough_cache $cache_key]} { + nsv_incr clickthrough_cache $cache_key + } else { + nsv_set clickthrough_cache $cache_key 1 + } + + # increment the total click count + nsv_incr clickthrough_cache total_clicks + } errmsg]} { + ns_log Notice "Clickthrough counting failed -> local_url: '$local_url' ; foreign_url: '$foreign_url' ; + package_id: '$package_id' ; error message: '$errmsg'" + } +} + + +ad_proc clickthrough_cache_sweeper {} { + Periodicaly runs to see if cache has reached limit capacity. If so, dumps cache contents to database and resets cache. + + @author Nuno Santos (nuno@arsdigita.com) + @creation-date 2000-12-04 + @cvs-id $Id: clickthrough-procs.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + +# if {[nsv_get clickthrough_cache total_clicks] >= [ad_parameter "CacheSize" "clickthrough"]} { +# } +# can't get package parameter if running as a scheduled proc??? + + if {[nsv_get clickthrough_cache total_clicks] >= 100} { + # reached cache maximum size -> make a copy (to later write to db) and clear cache + + ns_log Notice "clickthrough_cache_sweeper: reached cache maximum size, dumping to database" + + # lock access to cache -- only during in memory cache copy, no DB access + ns_mutex lock [nsv_get clickthrough_mutex mutex] + + array set cache_copy [nsv_array get clickthrough_cache] + set new_cache(total_clicks) 0 + nsv_array reset clickthrough_cache [array get new_cache] + + # unlock access to cache + ns_mutex unlock [nsv_get clickthrough_mutex mutex] + + + # copy of cache must be written to database + + # don't include the "total_clicks" element in the search + array unset cache_copy "total_clicks" + + set search_id [array startsearch cache_copy] + + # iterate through all the keys in the cache + while {[array anymore cache_copy $search_id]} { + set cache_key [array nextelement cache_copy $search_id] + + # cache_key has the following format: + # *Foreign**Package* + if {[regexp {^(.*) \*Foreign\* (.*) \*Package\* ([0-9]*)$} $cache_key match cached_local_url \ + cached_foreign_url cached_package_id]} { + + set cached_click_count $cache_copy($cache_key) + + # actually do the update/insert in the database + db_transaction { + # update count, if appropriate row already exists + db_dml update_clickthrough_log_sql { + update clickthrough_log + set click_count = click_count + :cached_click_count + where local_url = :cached_local_url + and foreign_url = :cached_foreign_url + and package_id = :cached_package_id + and trunc(entry_date) = trunc(sysdate) + } + + set n_rows [db_resultrows] + if { $n_rows == 0 } { + # there wasn't already a row there + # let's insert one (but only one; in the very rare case that another thread is executing + # this same code, we don't want to be left with two rows in the database for the same tuple) + + if {[catch {db_dml insert_clickthrough_log_sql { + insert into clickthrough_log + (local_url, foreign_url, entry_date, click_count, package_id) + select :cached_local_url, :cached_foreign_url, trunc(sysdate), :cached_click_count, :cached_package_id + from dual + where 0 = (select count(*) + from clickthrough_log + where local_url = :cached_local_url + and foreign_url = :cached_foreign_url + and package_id = :cached_package_id + and trunc(entry_date) = trunc(sysdate)) } } errmsg]} { + ns_log Notice "Clickthrough insert failed: $errmsg" + } + } + } + } else { + ns_log Notice "clickthrough_cache_sweeper: error reading cache entry. Some clickthroughs may have been lost." + } + } + + array donesearch cache_copy $search_id + } +} Index: openacs-4/packages/clickthrough/www/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/index.vuh,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/index.vuh 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,44 @@ +# www/index.vuh + +ad_page_contract { + + @param send_to The URL to redirect to + + @author Nuno Santos (nuno@arsdigita.com) + @creation-date 2000-11-16 + @cvs-id $Id: index.vuh,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + send_to +} + + +# sometimes the foreign url is malformed, notable just "http" +if { $send_to == "http" } { + ad_return_error "Redirected to HTTP only" "You were redirected to just \"http\"; the way that we do clickthroughs + here requires your browser to be a little bit liberal about how it handles URLs. + Your browser apparently isn't. If you go back to the preceding page and View Source, + you can probably tease out the target URL and go there manually with an Open command." + return +} + +# send the user to the link's destination url asap +ad_returnredirect $send_to + + + +# user is off our hands now; time to log + +set clickthrough_package_id [ad_conn package_id] + +# get info about the parent package of this clickthrough instance +db_1row parent_package_sql "select sn2.object_id as parent_package_id, + site_node.url(sn2.node_id) as parent_package_url + from site_nodes sn1, site_nodes sn2 + where sn1.object_id = :clickthrough_package_id + and sn1.parent_id = sn2.node_id" + +# build the local url from the parent package base url and the relative url +append local_url $parent_package_url [ad_conn path_info] + +# actually log the clickthrough (maybe cached in memory for performance) +clickthrough_log_click $local_url $send_to $parent_package_id Index: openacs-4/packages/clickthrough/www/admin/all-from-local.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/all-from-local.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/all-from-local.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,17 @@ + +Clickthroughs from @local_url@ + +

        Clickthroughs from @local_url@

        + +@context_bar@ + +
        + + + Index: openacs-4/packages/clickthrough/www/admin/all-from-local.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/all-from-local.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/all-from-local.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,30 @@ +# www/admin/all-from-local.tcl + +ad_page_contract { + + @param local_url The local/originating URL + + @author Philip Greenspun (philg@mit.edu) + @creation-date 1997 + @cvs-id $Id: all-from-local.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + local_url +} -properties { + context_bar:onevalue + urls:multirow +} + +set context_bar [ad_context_bar "Clickthroughs from local URL"] + + +set parent_package_id [clickthrough_parent_package_id] + +template::query urls multirow " + select entry_date, sum(click_count) as n_clicks + from clickthrough_log + where local_url = :local_url + and package_id = :parent_package_id + group by entry_date + order by entry_date desc" + +ad_return_template Index: openacs-4/packages/clickthrough/www/admin/all-to-foreign.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/all-to-foreign.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/all-to-foreign.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,17 @@ + +Clickthroughs to @foreign_url@ + +

        Clickthroughs to @foreign_url@

        + +@context_bar@ + +
        + + + Index: openacs-4/packages/clickthrough/www/admin/all-to-foreign.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/all-to-foreign.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/all-to-foreign.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,30 @@ +# www/admin/all-to-foreign.tcl + +ad_page_contract { + + @param foreign_url The foreign URL + + @author Philip Greenspun (philg@mit.edu) + @creation-date 1997 + @cvs-id $Id: all-to-foreign.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + foreign_url +} -properties { + context_bar:onevalue + urls:multirow +} + +set context_bar [ad_context_bar "Clickthroughs to foreign URL"] + + +set parent_package_id [clickthrough_parent_package_id] + +template::query urls multirow " + select entry_date, sum(click_count) as n_clicks + from clickthrough_log + where foreign_url = :foreign_url + and package_id = :parent_package_id + group by entry_date + order by entry_date desc" + +ad_return_template Index: openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,18 @@ + +Clickthroughs by foreign URL: summary report + +

        Clickthroughs by foreign URL: summary report

        + +@context_bar@ + +
        + +Note: this page may be slow to generate; it requires a tremendous amount of chugging by the RDBMS. + + + Index: openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,30 @@ +# www/admin/by-foreign-url-aggregate.tcl + +ad_page_contract { + + @param minimum The minimum number of clickthroughs for the displayed URLs + + @author Philip Greenspun (philg@mit.edu) + @creation-date 1997 + @cvs-id $Id: by-foreign-url-aggregate.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + {minimum 0} +} -properties { + context_bar:onevalue + urls:multirow +} + +set context_bar [ad_context_bar "Clickthroughs by local URL"] + + +set parent_package_id [clickthrough_parent_package_id] + +template::query urls multirow " + select local_url, foreign_url, sum(click_count) as n_clicks + from clickthrough_log + where package_id = :parent_package_id + group by local_url, foreign_url + having sum(click_count) >= :minimum + order by foreign_url" + +ad_return_template Index: openacs-4/packages/clickthrough/www/admin/by-foreign-url.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-foreign-url.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/by-foreign-url.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,16 @@ + +Clickthroughs by foreign URL + +

        Clickthroughs by foreign URL

        + +@context_bar@ + +
        + + + Index: openacs-4/packages/clickthrough/www/admin/by-foreign-url.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-foreign-url.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/by-foreign-url.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,26 @@ +# www/admin/by-foreign-url.tcl + +ad_page_contract { + + @author Philip Greenspun (philg@mit.edu) + @creation-date 1997 + @cvs-id $Id: by-foreign-url.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + +} -properties { + context_bar:onevalue + urls:multirow +} + +set context_bar [ad_context_bar "Clickthroughs by foreign URL"] + + +set parent_package_id [clickthrough_parent_package_id] + +template::query urls multirow " + select distinct local_url, foreign_url + from clickthrough_log + where package_id = :parent_package_id + order by foreign_url" + +ad_return_template Index: openacs-4/packages/clickthrough/www/admin/by-local-url-aggregate.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-local-url-aggregate.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/by-local-url-aggregate.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,18 @@ + +Clickthroughs by local URL: summary report + +

        Clickthroughs by local URL: summary report

        + +@context_bar@ + +
        + +Note: this page may be slow to generate; it requires a tremendous amount of chugging by the RDBMS. + + + Index: openacs-4/packages/clickthrough/www/admin/by-local-url-aggregate.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-local-url-aggregate.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/by-local-url-aggregate.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,30 @@ +# www/admin/by-local-url-aggregate.tcl + +ad_page_contract { + + @param minimum The minimum number of clickthroughs for displayed URLs + + @author Philip Greenspun (philg@mit.edu) + @creation-date 1997 + @cvs-id $Id: by-local-url-aggregate.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + {minimum 0} +} -properties { + context_bar:onevalue + urls:multirow +} + +set context_bar [ad_context_bar "Clickthroughs by local URL"] + + +set parent_package_id [clickthrough_parent_package_id] + +template::query urls multirow " + select local_url, foreign_url, sum(click_count) as n_clicks + from clickthrough_log + where package_id = :parent_package_id + group by local_url, foreign_url + having sum(click_count) >= :minimum + order by local_url" + +ad_return_template Index: openacs-4/packages/clickthrough/www/admin/by-local-url.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-local-url.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/by-local-url.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,16 @@ + +Clickthroughs by local URL + +

        Clickthroughs by local URL

        + +@context_bar@ + +
        + + + Index: openacs-4/packages/clickthrough/www/admin/by-local-url.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-local-url.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/by-local-url.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,26 @@ +# www/admin/by-local-url.tcl + +ad_page_contract { + + @author Philip Greenspun (philg@mit.edu) + @creation-date 1997 + @cvs-id $Id: by-local-url.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + +} -properties { + context_bar:onevalue + urls:multirow +} + +set context_bar [ad_context_bar "Clickthroughs by local URL"] + + +set parent_package_id [clickthrough_parent_package_id] + +template::query urls multirow " + select distinct local_url, foreign_url + from clickthrough_log + where package_id = :parent_package_id + order by local_url" + +ad_return_template Index: openacs-4/packages/clickthrough/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/index.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,13 @@ +# www/admin/index.tcl + +ad_page_contract { + + @author Nuno Santos (nuno@arsdigita.com) + @creation-date 2000/11/16 + @cvs-id $Id: index.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + +} + + +ad_returnredirect "report" Index: openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,15 @@ + +Clickthroughs to @foreign_url@ on @query_date@ + +

        Clickthroughs to @foreign_url@ on @query_date@

        + +@context_bar@ + +
        + + + Index: openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,32 @@ +# www/admin/one-foreign-one-day.tcl + +ad_page_contract { + + @param foreign_url The foreign/destination URL + @param query_date The date for the clickthrough count + + @author Philip Greenspun (philg@mit.edu) + @creation-date 1997 + @cvs-id $Id: one-foreign-one-day.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + foreign_url + query_date +} -properties { + context_bar:onevalue + urls:multirow +} + +set context_bar [ad_context_bar [list "all-to-foreign?[export_url_vars foreign_url]" "Clickthroughs to foreign URL"] "On $query_date"] + + +set parent_package_id [clickthrough_parent_package_id] + +template::query urls multirow " + select local_url, click_count + from clickthrough_log + where foreign_url = :foreign_url + and entry_date = :query_date + and package_id = :parent_package_id + order by local_url" + +ad_return_template Index: openacs-4/packages/clickthrough/www/admin/one-local-one-day.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-local-one-day.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/one-local-one-day.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,15 @@ + +Clickthroughs from @local_url@ on @query_date@ + +

        Clickthroughs from @local_url@ on @query_date@

        + +@context_bar@ + +
        + + + Index: openacs-4/packages/clickthrough/www/admin/one-local-one-day.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-local-one-day.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/one-local-one-day.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,33 @@ +# www/admin/one-local-one-day.tcl + +ad_page_contract { + + @param local_url The local/originating URL + @param query_date The date for the clickthrough count + + @author Philip Greenspun (philg@mit.edu) + @creation-date 1997 + @cvs-id $Id: one-local-one-day.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + local_url + query_date +} -properties { + context_bar:onevalue + urls:multirow +} + +set context_bar [ad_context_bar [list "all-from-local?[export_url_vars local_url]" "Clickthroughs from local URL"] "On $query_date"] + + +set parent_package_id [clickthrough_parent_package_id] + +template::query urls multirow " + select foreign_url, click_count + from clickthrough_log + where local_url = :local_url + and entry_date = :query_date + and package_id = :parent_package_id + order by foreign_url" + +ad_return_template + Index: openacs-4/packages/clickthrough/www/admin/one-url-pair.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-url-pair.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/one-url-pair.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,31 @@ + +@local_url@ -> @foreign_url@ + +

        + @local_url@ + -> + @foreign_url@ +

        + +@context_bar@ + +
        + +
          + +
        • @urls.entry_date@ : @urls.click_count@ + +
        + + +

        Still not satisfied?

        + +Get a report of: + + + Index: openacs-4/packages/clickthrough/www/admin/one-url-pair.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-url-pair.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/one-url-pair.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,31 @@ +# www/admin/one-url-pair.tcl + +ad_page_contract { + + @param local_url The local/originating URL + @param foreign_url The foreign/destination URL + + @author Philip Greenspun (philg@mit.edu) + @creation-date 1997 + @cvs-id $Id: one-url-pair.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + local_url + foreign_url +} -properties { + context_bar:onevalue + urls:multirow +} + +set context_bar [ad_context_bar "Clickthroughs for one URL pair"] + + +set parent_package_id [clickthrough_parent_package_id] +template::query urls multirow " + select entry_date, click_count + from clickthrough_log + where local_url = :local_url + and foreign_url = :foreign_url + and package_id = :parent_package_id + order by entry_date desc" + +ad_return_template Index: openacs-4/packages/clickthrough/www/admin/report.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/report.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/report.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,22 @@ + +Clickthroughs for @package_name@ + +

        Clickthroughs for @package_name@

        + +@context_bar@ + +
        + + + +

        Summary Reports (expensive queries, may take a long time)

        + + Index: openacs-4/packages/clickthrough/www/admin/report.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/report.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/report.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,23 @@ +# www/admin/report.tcl + +ad_page_contract { + + @author Philip Greenspun (philg@mit.edu) + @creation-date 1997 + @cvs-id $Id: report.tcl,v 1.1 2001/04/20 20:51:09 donb Exp $ +} { + +} -properties { + context_bar:onevalue + package_name:onevalue +} + +# this really should be index.tcl but sadly due to legacy links +# (dating back to 1996 or so), it has to be "report.tcl" + + +set package_name [clickthrough_parent_package_instance_name] + +set context_bar [ad_context_bar] + +ad_return_template Index: openacs-4/packages/cms/cms.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/cms.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/cms.info 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,516 @@ + + + + + Content Management System + Content Management Systems + t + + + + oracle + postgresql + + Karl Goldstein + David Lutterkort + 2001-01-26 + ArsDigita Corporation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/cms/demo/sql/demo.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/demo/sql/demo.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/demo/sql/demo.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,35 @@ +declare + folder_id integer; + template_id integer; +begin + + -- create the demo templates folder + folder_id := content_folder.new( + name => 'demo', + label => 'Demo Templates', + parent_id => content_template.get_root_folder + ); + + content_folder.register_content_type(folder_id, 'content_template'); + + -- create a master template + template_id := content_template.new( + name => 'master', + parent_id => folder_id + ); + + -- register the master template for the basic content item + content_type.register_template( + content_type => 'content_revision', + template_id => template_id, + use_context => 'public', + is_default => 't' + ); + +end; +/ +show errors + + + +@@press.sql Index: openacs-4/packages/cms/demo/sql/press.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/demo/sql/press.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/demo/sql/press.sql 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,168 @@ +-- Define the attributes of a press release + +declare + attr_id acs_attributes.attribute_id%TYPE; +begin + + -- create the content type + content_type.create_type ( + supertype => 'content_revision', + content_type => 'cr_demo_press_release', + pretty_name => 'Press Release', + pretty_plural => 'Press Releases', + table_name => 'cr_demo_press_releases', + id_column => 'release_id' + ); + + -- create content type attributes + attr_id := content_type.create_attribute ( + content_type => 'cr_demo_press_release', + attribute_name => 'location', + datatype => 'text', + pretty_name => 'Location', + pretty_plural => 'Location', + column_spec => 'varchar2(1000)' + ); + + -- choose widget for metadata forms for each attribute + cm_form_widget.register_attribute_widget( + content_type => 'cr_demo_press_release', + attribute_name => 'location', + widget => 'text', + is_required => 't' + ); + +end; +/ +show errors + + + +-- some demo data + +declare + template_id integer; + item_id integer; + page_folder_id integer; + template_folder_id integer; +begin + + item_id := content_item.new( + name => 'index', + title => 'Welcome to Demo Company', + text => 'Welcome to Demo Company. We are here to serve all your + demonstration needs...', + is_live => 't' + ); + + item_id := content_item.new( + name => 'about', + title => 'About Demo Company', + text => 'Demo Company was founded in September 2000 by an intrepid + group of programmers and developers who perceived a critical + need for demonstration technology...', + is_live => 't' + ); + + item_id := content_item.new( + name => 'contact', + title => 'Contacting Demo Company', + text => 'Please send your comments and inquiries demo@demo.com. We + will contact you as soon as possible if requested...', + is_live => 't' + ); + + -- create the folder for press releases + page_folder_id := content_folder.new( + name => 'press', + label => 'Press Releases', + description => 'Corporate press releases', + parent_id => content_item.get_root_folder + ); + + content_folder.register_content_type( + folder_id => page_folder_id, + content_type => 'cr_demo_press_release' + ); + + content_folder.register_content_type( + folder_id => page_folder_id, + content_type => 'content_revision' + ); + + -- create the press release index + + item_id := content_item.new( + name => 'index', + parent_id => page_folder_id, + content_type => 'content_revision', + title => 'Press Release Index', + text => 'All current press releases', + is_live => 't' + ); + + + -- create the folder for press release templates + + template_folder_id := + content_item.get_id('/demo', content_template.get_root_folder); + + content_folder.register_content_type( + folder_id => template_folder_id, + content_type => 'content_folder' + ); + + template_folder_id := content_folder.new( + name => 'press', + label => 'Press Releases', + description => 'Corporate press releases', + parent_id => template_folder_id + ); + + content_folder.register_content_type( + folder_id => template_folder_id, + content_type => 'content_template' + ); + + -- create the press release index template + + template_id := content_template.new( + name => 'index', + parent_id => template_folder_id + ); + + -- register the template for the press release index + + content_item.register_template(item_id, template_id, 'public'); + + item_id := content_item.new( + name => 'founding', + parent_id => page_folder_id, + content_type => 'cr_demo_press_release', + title => 'Demo Company Founded', + text => 'The Demo Company was founded today' + ); + + -- insert a row into cr_demo_press_releases as well + + insert into cr_demo_press_releases values ( + content_item.get_latest_revision(item_id), 'San Francisco'); + + -- register the template for the press release content type + + template_id := content_item.get_id('/demo/master', + content_template.get_root_folder); + + content_type.register_template( + content_type => 'cr_demo_press_release', + template_id => template_id, + use_context => 'public', + is_default => 't' + ); + +end; +/ +show errors + + + Index: openacs-4/packages/cms/demo/templates/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/demo/templates/master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/demo/templates/master.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,52 @@ + + + @content.title@ + + + + + + + +
        DEMO
        COMPANY
        @content.title@
        +
        +You are here: + @folders.title@ + : + + +
        + +
        + +@content.text@ + + + +
        + +
        + +Copyright © 2000 Demo Corporation All Rights Reserved + + + Index: openacs-4/packages/cms/demo/templates/master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/demo/templates/master.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/demo/templates/master.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,3 @@ +content::get_content + +content::get_folder_labels Index: openacs-4/packages/cms/demo/templates/images/image-template.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/demo/templates/images/image-template.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/demo/templates/images/image-template.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,16 @@ + + + @title@ + + + +

        @title@

        +@publish_date@ : @mime_type@ +

        +@description@ +

        + + + + + Index: openacs-4/packages/cms/demo/templates/images/image-template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/demo/templates/images/image-template.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/demo/templates/images/image-template.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,4 @@ +content::get_content +template::util::array_to_vars content +set content_download "[ad_conn package_url]modules/items/content-download?revision_id=@revision_id@" + Index: openacs-4/packages/cms/demo/templates/press/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/demo/templates/press/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/demo/templates/press/index.adp 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,15 @@ + + +

        + + + + + + + + + + + +
        @items.publish_date@       @items.title@
        \ No newline at end of file Index: openacs-4/packages/cms/demo/templates/press/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/demo/templates/press/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/demo/templates/press/index.tcl 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,23 @@ +# List latest live press releases + +# Get the folder + +set query " + select + r.title, initcap(to_char(r.publish_date, 'MONTH DD, YYYY')) publish_date, + r.description, i.name + from + cr_revisions r, cr_items i, acs_objects o + where + o.context_id = content_item.get_id('/press') + and + o.object_id = i.item_id + and + i.live_revision = r.revision_id + and + i.name <> 'index' + order by + publish_date" + +query items multirow $query + \ No newline at end of file Index: openacs-4/packages/cms/doc/features.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/features.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/doc/features.html 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,122 @@ + + +Content Management System Features + + + +

        The ArsDigita Content Management System (CMS) provides publishers with a complete interface for managing the content production process. This document provides an overview of its features.

        + +

        Background

        + +

        The core data model and developer API for CMS are provided by the ArsDigita Community System (ACS), a toolkit for building dynamic web applications. In particular, CMS provides an interface to the ACS Content Repository, which supports a consistent storage and retrieval mechanism for all forms of content deployed on a web site.

        + +

        CMS includes a standard interface which is intended to satisfy most of the requirements for most publishers. Depending on the complexity of both the content and the production process itself, the standard interface can be extended or customized for alternate presenations and page flows.

        + +

        Content Type Definition

        + +

        When first installed, CMS defines a basic content item, which includes a file name, title, description, file type and body. The body of the content item may be text or binary data, and may represent text, graphic, audio or video media.

        + +

        CMS provides publishers with the opportunity to extend the basic content item definition to meet special publishing requirements. This information is used to customize the information display and data entry interface for items of each content type.

        + +
          +
        • A content type definition may add any number of attributes to the basic information described above. For example, a corporate site may define a 'Press Release' content type, which adds a 'Byline' attribute to the data available for each content item. Each attribute is associated with an HTML form element, which CMS uses to automatically generate data entry and editing forms for each content type.

          + +
        • The definition may specify a list of allowed file types. For example, a 'Press Release' may require plain text or HTML format. A 'Company Report' may allow PDF as well. + +

        • The definition may specify a list of allowed publication templates (see Template Management below), from which the publisher may choose for each item of that type. +

        + +

        If required, CMS also provides developers with a framework for more extensive customization of the information display and data entry interface, beyond what is possible with standard metadata.

        + +

        Site management

        + +

        The CMS site management tool resembles the file managers found in common desktop environments. Publishers may organize pages of the site into a hierarchy of folders, representing branches of the site map. With appropriate permission, pages may be moved or copied from one folder to another.

        + +

        Some pages or folders may need to appear in more than one location in the site map. CMS allows publishers to create links from a page or folder to any number of other locations in the site map.

        + +

        The public site map represents the organization of pages by URL within the site. For example, a page named new-product within the folder press will be accessible by the URL /press/new-product. In addition, users or user groups may wish to maintain their own logical organization of folders and items, on which they typically work. The items represented in these private site maps may represent links to folders or pages in the public site map, or they may represent entirely private items.

        + +

        Security

        + +

        CMS provides a fine level of control over access and modification privileges. Permissions to browse, view item information, create and modify items are granted on a per-folder basis. Administrators may grant administrator privileges.

        + +

        Content linking

        + +5.1. Relate any number of content items to each content item. +5.2. Specify a numeric sort order for the all linked items of a particular content type. + +

        Template management

        + +6.1. Organize templates within folders. +6.2. Create, move, copy and delete templates in the same manner as content items. +6.3. Full version control with ability to revert to previous versions. +6.4. Manage template dependencies (graphics, sounds, animation, video, etc.) +6.5. Deploy template and associated resources to file system for access by public server infrastructure. +6.6. Preview template revisions prior to deployment. +6.7. Specify a list of template options for each content type. +6.8. Specify a default template option for each content type. +6.9. Specify a particular template for each content item. + +

        Customization

        + +7.1. Workspace +7.2. Item information pages for each content type +7.3. New item wizards +7.4. New revision wizards + +

        Workflow

        + +8.1. Create departments. +8.2. Assign users or groups to workflow roles within departments (see User and Group Administration). +8.3. Specify one or more departments to handle workflow for each content type +8.4. Specify one or more departments to handle workflow for each section of the site. +8.5. Extend default workflow or implement alternative workflows. +9. Versioning +9.1. Track all changes to content and attributes. +9.2. Revert to a previous revision without losing complete revision history. + +

        Search

        + +10.1. Search for words or parts of words across text and binary file types (most common word processor and presentation formats). +10.2. Search for words or parts of words across all attributes. +10.3. Search for words or parts of words in one or more attributes of a particular content type. + +

        Personalization

        + +11.1. Choose number and date format. +11.2. Choose columns to display in folder listings. +11.3. Choose display colors. +11.4. Choose to display item information pages in a separate window (maintain folder listing in main browser window). +11.5. For infrequent contributors, CMS provides a simple, task-oriented interface. + +

        Deployment

        + +12.1. Choose a revision as live for immediate deployment. +12.2. Decommission a revision immediately. +12.3. Schedule a release date and time for automated deployment. +12.4. Schedule an end date and time for automated decommissioning. +12.5. Review complete publishing history for a content item (all deployment and decommissioning events, including the revision involved. +12.6. Merge template with content data and attributes. +12.7. Write output to any number of file systems. + +

        Integration

        +13.1. Open data model and fully documented stored procedure API allows direct access by any other application. +13.2. ACS Core foundation layer allows tight integration with collaborative applications that rely on the same user and object framework. +14. User and group administration +14.1. Create staff users or add existing users to staff. +14.2. Create and manage logical groups for bulk assignment of permissions and workflow roles. + +

        Clipboard

        + +15.1. Place any object in the system (content type, item, user, etc.) on the clipboard. +15.2. Review contents of clipboard at any time. +15.3. Remove items from the clipboard selectively. + +

        External link management

        + +16.1. Organize external links (URLs) within folders. +16.2. Create, copy, move and delete external links as for content items. +16.3. Assign label, description and keywords to external links. +16.4. Relate any number of external links to each content item. + +
        Index: openacs-4/packages/cms/doc/layers.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/layers.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/doc/layers.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/layers.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/doc/layers.html 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,48 @@ + + + Content Management System: Architecture Overview + + +

        Architecture Overview

        + Content Management System +
        + +

        The CMS architecture consists of four distinct layers.

        + + + +

        CMS Application

        + +

        CMS includes a standard application interface that provides +extensive general functionality without the need for custom +development. It is designed for rapid deployment in a broad +range of publishing environments.

        + +

        CMS Toolkit

        + +

        The standard CMS application interface is built on the CMS Toolkit, +a collection of reusable code libraries and interface widgets that +standardize and simplify interaction between the database layer and +the end user. Developers can employ the toolkit to customize and +extend the application interface to suit the specific requirements of +individual publishers.

        + +

        Content Repository

        + +

        The Content Repository, a standard component of the ArsDigita +Community System (ACS), provides the foundation for storing and +managing content as structured data. It consists of an extensible set +of data tables as well as a procedural API for all basic data +operations involving content.

        + +

        ACS Core

        + +

        The Content Repository is in turn an extension of the ACS Core +database layer. The ACS Core implements an extensible framework for +managing all classes of data objects, including content.

        + +
        +karlg@arsdigita.com
        +Last revised: $Id: layers.html,v 1.1 2001/04/20 20:51:09 donb Exp $ + + Index: openacs-4/packages/cms/doc/workflow.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/workflow.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/doc/workflow.html 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,34 @@ +

        Workspace

        + +

        The default workspace displays a list of all current tasks. Each +task is associated with the following information:

        + +
          +
        • The title of a content item, linked to the information page for that + item. +
        • A "hold status" link. If the item is checked out by the current user, + the link is "Check In". If the item is not checked out by the current + user, the link is "Check Out". If the item is checked out by + another, the link is "Steal" +
        • One or two "finish" links. One "finish" link is "Approve", + which moves the workflow to the next place. (Ideally this will + say "Finish" for the authoring step). This links to an + approval form, where the approver can make a comment. The other + link is "Reject", where the approver can make a comment and + return the item back to a previous place (there may be more + than one place). +
        • If the user is assigned to it, she can finish the task even if + she has not checked it out, provided that no one else has it checked + out. +
        + +

        Editing Interface

        + +

        If the item is currently checked out by another user, there should +be a notice instead of any "Edit" links on the item information page. +The notice should link to a page that allows the user to "steal" the +lock from the other user (and send a notification). The incident is +recorded as a journal entry for the event (use a comment action in the +workflow API).

        + + Index: openacs-4/packages/cms/doc/developer-guide/child_example.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/developer-guide/child_example.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/doc/developer-guide/child_example.html 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,17 @@ +Senior + + +

        The child:

        + +I am a child + + + +
        Hello World !
        + +

        The parent:

        + +Who's your daddy ? + + + \ No newline at end of file Index: openacs-4/packages/cms/doc/query-catalog/items.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/query-catalog/items.txt,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/doc/query-catalog/items.txt 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,335 @@ +COMMON TASKS: + +# publishing status of an item + + select + NVL(initcap(publish_status), 'Production') publish_status, + NVL(to_char(start_when, 'MM/DD/YY HH:MI AM'), 'Immediate') start_when, + NVL(to_char(end_when, 'MM/DD/YY HH:MI AM'), 'Indefinite') end_when, + content_item.is_publishable(:item_id) is_publishable, + live_revision + from + cr_items i, cr_release_periods r + where + i.item_id = :item_id + and + i.item_id = r.item_id (+) + + + + + + + +# show the attribute listing for the latest revision + + # get the table name and object type + select + o.object_type, t.table_name + from + acs_objects o, acs_object_types t + where + o.object_id = :revision_id + and + o.object_type = t.object_type + + + # fetch revision info + select + x.context_id item_id, + content_item.get_revision_count(x.context_id) revision_count, + content_revision.get_number(:revision_id) revision_number, + content_item.get_live_revision(x.context_id) live_revision, x.* + from + $type_info(table_name)x x + where + object_id = :revision_id + + # fetch attribute values + select + types.pretty_name object_label, types.table_name, + types.id_column, attr.attribute_name, + attr.pretty_name attribute_label + from + acs_attributes attr, + ( select + object_type, pretty_name, table_name, id_column, + level as inherit_level + from + acs_object_types + where + object_type ^= 'acs_object' + connect by + prior supertype = object_type + start with + object_type = :content_type) types + where + attr.object_type = types.object_type + order by + types.inherit_level desc + + + + + + + + + + + +# get a listing of all revisions for an item + + # get info about an item (live_revision, is_publishable) + select + item_id, name, locale, live_revision, + content_item.get_path(item_id) as path, + content_item.is_publishable(item_id) as is_publishable + from + cr_items + where + item_id = :item_id + + ###### + ###### + # get revision list (un-paginated) w/ pagination = 73ms + select + revision_id, + trim(title) as title, + trim(description) as description, + content_revision.get_number(revision_id) as revision_number + from + cr_revisions r, acs_objects o + where + r.revision_id = o.object_id + and + o.context_id = :item_id + order by + revision_number + + + + + + + + + + + + +# show a listing of related items + + select + r.rel_id, + r.related_object_id item_id, + t.pretty_name as type_name, + NVL(r.relation_tag, ' ') as tag, + NVL(content_item.get_title(r.related_object_id), + (select name from cr_items where item_id = r.related_object_id)) title, + (select pretty_name from acs_object_types ot + where ot.object_type = content_item.get_content_type( + r.related_object_id)) content_type, + NVL((select 'f' from dual where exists ( + select 1 from cr_item_rels r2 where order_n < r.order_n)), + 't') as topmost, + NVL((select 'f' from dual where exists ( + select 1 from cr_item_rels r2 where order_n > r.order_n)), + 't') as bottommost + from + cr_item_rels r, acs_objects o, acs_object_types t + where + r.item_id = :item_id + and + o.object_id = r.rel_id + and + t.object_type = o.object_type + order by + order_n, title + + + + + + + + +# show a listing of child items + + + # get the possible children types for this object + select + t.pretty_name, c.child_type + from + acs_object_types t, cr_type_children c + where + c.parent_type = content_item.get_content_type(:item_id) + and + c.child_type = t.object_type + + # show a listing of child items + select + i.item_id, i.name, + trim(content_item.get_title(i.item_id)) title, + t.pretty_name, to_char(o.creation_date, 'MM/DD/YY HH24:MM') last_modified + from + cr_items i, acs_object_types t, acs_objects o + where + o.context_id = :item_id + and + o.object_id = i.item_id + and + i.content_type = t.object_type + order by + t.pretty_name, title + + + + + + +# show a listing of templates, registered to the item and to the type + + # content type, title + select + object_type, pretty_name, + content_item.get_title(:item_id) name + from + acs_object_types + where + object_type = content_item.get_content_type(:item_id) + + + + # listing of templates registered to the item + select + template_id, use_context, name + from + cr_items i, cr_item_template_map t + where + i.item_id = t.template_id + and + t.item_id = :item_id + order by + name, use_context + + # listing of templates registered to the content type + select + template_id, name, use_context, is_default, + (select 1 + from + cr_item_template_map itmap + where + itmap.template_id = t.template_id + and + itmap.use_context = t.use_context + and + itmap.item_id = :item_id) already_registered_p + from + cr_type_template_map t, cr_items i + where + t.template_id = i.item_id + and + t.content_type = :content_type + order by + name, use_context + + +# show workflow status for an item + + # get the status of the workflow for this item + select + case_id, initcap(state) state + from + wf_cases + where + object_id = :item_id + + # look up enabled or started transitions + select + k.transition_key, k.task_id, t.transition_name, + k.holding_user, + content_workflow.get_holding_user_name(k.task_id) hold_name + from + wf_tasks k, wf_transitions t + where + k.case_id = :case_id + and + k.state in ('enabled', 'started') + and + k.transition_key = t.transition_key + + # is this user assigned this task + select + decode(count(*), 0, 'no', 'yes') + from + wf_case_assignments + where + case_id = :case_id + and + transition_key = :transition_key + and + party_id = :user_id + + # get the task deadline + select + to_char(deadline, 'DD MON') deadline + from + wf_case_deadlines + where + case_id = :case_id + and + transition_key = :transition_key + + + + + + + + + + + + +# show a listing of comments associated with an item + + select + journal_id, action_pretty, msg, + decode(NVL(p.person_id, 0), + 0, 'System', + substr(p.first_names, 1, 1) || '. ' || p.last_name) person, + to_char(o.creation_date, 'MM/DD/YY HH24:MI:SS') when + from + journal_entries j, acs_objects o, persons p + where + ( + j.object_id = :item_id + or + j.object_id in (select case_id from wf_cases c + where c.object_id = :item_id) + ) and + j.journal_id = o.object_id + and + o.creation_user = p.person_id (+) + and + msg is not null + order by + o.creation_date desc + + + + +# show a listing of keywords associated with an item + + select + keyword_id, + content_keyword.get_heading(keyword_id) heading, + NVL(content_keyword.get_description(keyword_id), + ' ') description + from + cr_item_keyword_map + where + item_id = :item_id + order by + heading \ No newline at end of file Index: openacs-4/packages/cms/doc/query-catalog/keywords.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/query-catalog/keywords.txt,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/doc/query-catalog/keywords.txt 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,77 @@ +-- Queries about keywords +-- Currently, we cannot use the heading or description columns +-- directly - instead, we have to cal get_heading and +-- get_description. In the future, these functions will change +-- to handle internationalization. + +-- Determine if a keyword is assigned to an item + + -- Look for an exact match + if recurse = 'none' then + declare + begin + select 't' into v_ret from cr_item_keyword_map + where item_id = is_assigned.item_id + and keyword_id = is_assigned.keyword_id; + return 't'; + exception when no_data_found then + return 'f'; + end; + end if; + + -- Look from specific to general + if recurse = 'up' then + begin + select 't' into v_ret from dual where exists (select 1 from + (select keyword_id from cr_keywords + connect by parent_id = prior keyword_id + start with keyword_id = is_assigned.keyword_id + ) t, cr_item_keyword_map m + where + t.keyword_id = m.keyword_id + and + m.item_id = is_assigned.item_id); + + return 't'; + + exception when no_data_found then + return 'f'; + end; + + -- Look from general to specific + if recurse = 'down' then + begin + select 't' into v_ret from dual where exists ( select 1 from + (select keyword_id from cr_keywords + connect by prior parent_id = keyword_id + start with keyword_id = is_assigned.keyword_id + ) t, cr_item_keyword_map m + where + t.keyword_id = m.keyword_id + and + m.item_id = is_assigned.item_id); + + return 't'; + + exception when no_data_found then + return 'f'; + end; + end if; + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/cms/doc/query-catalog/permissions.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/query-catalog/permissions.txt,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/doc/query-catalog/permissions.txt 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,44 @@ +-- Permissions ------------------------------------------------ + +-- List all privileges in a hierarchial tree +select privilege, child_privilege from acs_privilege_hierarchy + connect by prior privilege = child_privilege + +-- +-- Permissions assignment: +-- + +-- Needs to be optimized. Need a way to unassign all but the highest +-- permissions in the hierarchy from any object. + +-- Get a list of all permissions in an hierarchy, determine +-- if the juser has the permission on the object + + select + t.child_privilege as privilege, + lpad(' ', t.tree_level * 24, ' ') || + NVL(p.pretty_name, t.child_privilege) as label, + content_permission.permission_p( + :object_id, :grantee_id, t.child_privilege + ) as permission_p, + content_permission.permission_p ( + :object_id, :grantee_id, t.privilege + ) as parent_permission_p + from ( + select privilege, child_privilege, level as tree_level + from acs_privilege_hierarchy + connect by privilege = prior child_privilege + start with privilege = 'cm_root' + ) t, acs_privileges p + where + p.privilege = t.child_privilege + and ( + content_permission.has_grant_authority ( + :object_id, :user_id, t.child_privilege + ) = 't' + or + content_permission.has_revoke_authority ( + :object_id, :user_id, t.child_privilege, :grantee_id + ) = 't' + ) + Index: openacs-4/packages/cms/doc/query-catalog/tree.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/query-catalog/tree.txt,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/doc/query-catalog/tree.txt 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,175 @@ +-- Queries dealing with the tree widget + + +-- Get child folders of an item + +select + :mount_point as mount_point, + r.name, + r.item_id, + '' as children, + r.is_symlink symlink, + 0 update_time, + nvl( + (select 't' from dual where exists ( + select + 1 + from + cr_folders f_child, cr_resolved_items r_child + where + r_child.parent_id = r.resolved_id + and + f_child.folder_id = r_child.resolved_id) + ), 'f') expandable + from + cr_folders f, cr_resolved_items r + where + r.parent_id = :id + and + r.resolved_id = f.folder_id + order by + name + +-- Get sorted paths of all items under some id + +select + item_id, + content_item.get_path(item_id, :sorted_paths_root_id) as item_path, + content_type as item_type +from + cr_items +where + item_id in ($sql_id_list) +order by item_path + +-- Get all types in the database in a pretty tree + +select + lpad(' ', level, '-') || pretty_name as label, + object_type as value +from + acs_object_types t +onnect by + supertype = prior object_type +start with + object_type = 'content_revision' + +-- Get all types under some subtype + +select + :module_name as mount_point, + t.pretty_name, t.object_type, '' as children, + NVL( + (select 't' from dual + where exists (select 1 from acs_object_types + where supertype = t.object_type)), + 'f' + ) as expandable, + 'f' as symlink, + 0 as update_time +from + acs_object_types t +where + supertype = :id +order by + t.pretty_name + +-- Get all categories under some parent category + +select + :module_name as mount_point, + content_keyword.get_heading(keyword_id) as name, + keyword_id, + '' as children, + NVL( (select 't' from dual + where exists ( + select 1 from cr_keywords k2 + where k2.parent_id = k.keyword_id + and content_keyword.is_leaf(k2.keyword_id) = 'f')), + 'f' + ) as expandable, + 'f' as symlink, + 0 as update_time +from + cr_keywords k +where + k.parent_id = :parent_id +and + content_keyword.is_leaf(keyword_id) = 'f' +order by + name + +-- Get sorted paths to the keywords + +select + keyword_id as item_id, + content_keyword.get_path(keyword_id) as item_path, + 'content_keyword' as item_type +from + cr_keywords +where + keyword_id in ($sql_id_list) + +-- Get all top-level groups + +select + :module_name as mount_point, + g.group_name as name, + g.group_id, + '' as children, + NVL( + (select 't' from dual + where exists ( + select 1 from group_component_map m2 + where m2.group_id = g.group_id)), + 'f' + ) as expandable, + 'f' as symlink, + 0 as update_time +from + groups g +where + not exists (select 1 from group_component_map m + where m.component_id = g.group_id) +order by + name + +-- Get users in a group + +select + :module_name as mount_point, + g.group_name as name, + g.group_id, + '' as children, + NVL( + (select 't' from dual + where exists ( + select 1 from group_component_map m2 + where m2.group_id = g.group_id)), + 'f' + ) as expandable, + 'f' as symlink, + 0 as update_time +from + groups g , group_component_map m +where + m.group_id = :id and m.component_id = g.group_id +order by + name + +-- Get sorted paths to users / groups + +select + o.object_id as item_id, + o.object_type || ': ' || acs_object.name(o.object_id) as item_path, + o.object_type as item_type +from + acs_objects o, parties p +where + o.object_id = p.party_id +and + o.object_id in ($sql_id_list) +order by + item_path + + Index: openacs-4/packages/cms/doc/query-catalog/workspace.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/query-catalog/workspace.txt,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/doc/query-catalog/workspace.txt 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,113 @@ + + +# /workspace/index.tcl - MY TASKS +# GET A LISTING OF ALL THE TASKS ASSIGNED TO ME THAT HAVEN'T BEEN STARTED +# BY ANOTHER +# title of the item (title) +# content_type of the item +# item_id of the item +# name of the task (transition_name) +# deadline +# task state (either 'started' or 'enabled') +# can reject +# is approvable +# -- holding_user + select + types.pretty_name, + obj.object_id item_id, + content_item.get_title(obj.object_id) title, + task.task_id, + task.holding_user, + task.state, + assign.case_id, + trans.transition_name, trans.transition_key, + to_char(dead.deadline,'Mon. DD, YYYY') deadline, + content_workflow.can_reject(task.task_id, :user_id) can_reject, + content_workflow.approve_string(task.task_id, :user_id) approve_string + from + acs_object_types types, + acs_objects obj, + wf_case_assignments assign, + wf_transitions trans, + wf_tasks task, + wf_cases case, + wf_case_deadlines dead + where + dead.case_id = case.case_id + and + dead.transition_key = task.transition_key + and + assign.party_id = :user_id + and + assign.case_id = task.case_id + and + assign.transition_key = task.transition_key + and ( + task.state = 'enabled' + or (task.state = 'started' and task.holding_user = :user_id) + ) and + task.transition_key = trans.transition_key + and + assign.case_id = case.case_id + and + case.object_id = obj.object_id + and + types.object_type = content_item.get_content_type(obj.object_id) + order by + dead.deadline" + + + + +# /workspace/assignments.tcl - MY TASKS CHECKOUT OUT BY OTHER USERS +# GET A LISTING OF TASKS THAT ARE ASSIGNED TO ME BUT HAVE BEEN ASSIGNED +# TO ANOTHER PERSON +# title of the item +# item_id of the item +# content_type of the item +# task name (transition) +# holding user and holding user name +# hold timeout +# deadline + select + types.pretty_name, + obj.object_id item_id, + content_item.get_title(obj.object_id) title, + task.task_id, + content_workflow.get_holding_user_name(task.task_id) holding_user_name, + to_char(task.hold_timeout,'Mon. DD, YYYY') hold_timeout, + assign.case_id, + trans.transition_name, trans.transition_key, + to_char(dead.deadline,'Mon. DD, YYYY') deadline + from + acs_object_types types, + acs_objects obj, + wf_case_assignments assign, + wf_transitions trans, + wf_tasks task, + wf_cases case, + wf_case_deadlines dead + where + dead.case_id = case.case_id + and + dead.transition_key = task.transition_key + and + assign.party_id = :user_id + and + assign.case_id = task.case_id + and + assign.transition_key = task.transition_key + and + task.state = 'started' + and + task.transition_key = trans.transition_key + and + assign.case_id = case.case_id + and + case.object_id = obj.object_id + and + types.object_type = content_item.get_content_type(obj.object_id) + and + task.holding_user ^= :user_id + order by + dead.deadline" \ No newline at end of file Index: openacs-4/packages/cms/doc/tutorial/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/tutorial/index.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/doc/tutorial/index.html 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,46 @@ + + + Content Management System Tutorials + + +

        Tutorials

        + Content Management System +
        + +

        The tutorials in this section are intended to illustrate a +variety of common scenarios in which CMS may be applied.

        + +

        Getting Started

        + +

        Support files for all demos are located in the demo +distribution of the CMS distribution. Before attempting +any of the tutorials, you must do the following:

        + +
          +
        1. Execute demo/sql/demo.sql in the appropriate database + schema. This script creates a folder under the template root to + store demo templates. It also creates an instance of a master + template under this folder, and registers this template for use + with all basic content items.

          + +
        2. Link demo/templates to the demo directory + under the template root in the file system:

          +
          ln -s `pwd`/ats/resources templates/ats
          +

          This contains all the templates used in the demos.

          +
        + +

        Demo Index

        + +
        +
        Press Releases
        +
        A simple example of defining a custom content type, performing + data entry using a system-generated form and publishing items. +
        + +
        +karlg@arsdigita.com
        +Last revised: $Id: index.html,v 1.1 2001/04/20 20:51:09 donb Exp $ + + + + Index: openacs-4/packages/cms/doc/tutorial/press.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/tutorial/press.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/doc/tutorial/press.html 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,46 @@ + + + Content Management System Tutorials: Press Release + + +

        Press Release

        + Content Management System +
        + +

        Edit in progress...

        + +

        The purpose of this tutorial is to illustrate the basic process of +how CMS is deployed, including both developer preparation and the +content production process itself.

        + +

        Getting Started

        + +

        Support files for all demos are located in the demo +directory of the CMS distribution. For this demo, you will need to +execute the press.sql script in the demo/sql +directory. This script uses the content repository API to perform the +following actions:

        + +
          +
        1. Create a new content type named "Press Release" +
        2. Add a custom attribute, location, to the "Press Release" + content type. +
        3. Specify that the user input for the location should be a + text box. +
        4. Create a few simple pages under the page root. +
        5. Create a folder named press to hold press releases. +
        6. Create a simple index page and a press release in the + press folder. +
        7. Register a template as the default for the "Press Release" content type. +
        + +

        All these operations are (or will be) accessible through the CMS UI +as well.

        + +
        +karlg@arsdigita.com
        +Last revised: $Id: press.html,v 1.1 2001/04/20 20:51:09 donb Exp $ + + + + Index: openacs-4/packages/cms/doc/user-guide/ui-content-type.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/doc/user-guide/ui-content-type.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/doc/user-guide/ui-content-type.html 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,151 @@ + + + + + +Content Type Documentation + +

        Content Type

        +Subject and action documentation
        +$Id: ui-content-type.html,v 1.1 2001/04/20 20:51:09 donb Exp $ +
        + +Under the 'getting started' section of the master doc outline + +
      • Attributes +
      • File Types +
      • Data Entry Methods +
      • Containment Relationships + + +

        Use Content Types to manage the site's content structure

        +Content Types hierchically organize all content in the repository through child and container relationships. The repository originates with the fundamental element, "Basic Content Type." The content type defines all the characteristics of an item of its class -- storage location (folders), attributes unique to itself (attributes), attributes inherited from 'supertype' content types (inheritance), methods of viewing the content types (templates), and MIME types which can display items of this content type (MIME Type). +

        +Content Types are created at the database level, not in the UI. Their supertype/inheritance relationships are also defined at that level only. Generally these will already be defined for the system and you'll have no need to add or modify them. + +

        Designating children of content_items

        +Content types are defined as a children of another content type when the former universally belongs to the latter or when you want to create a container to hold multiple content items in one discrete bundle to be presented as content itself. All content types are children of the fundamental content type 'Basic Item.' +

        +A television episode always belongs to a television program, so identify it as a child type of television program. +

        +As a second example, the publisher wants to start a series of "Musican Retrospectives" that are composed of bits of content from days past. The musician's interviews, music clips, and photos are already in the system as individual content items. These can be linked and bundled into a container of the content type 'Musician Retrospective' and that item can be put onto the web site as content. The components of this container or compound item retain their individuality, but are also known as being linked to a particular parent item. At the sqlplus level the administrator can define rules which restrict the types and quanities of content types that can be children of another. There is no limit to the levels of children allowed. + + + + +

        Mapping acs_objects to content_items

        + +The Admin UI allows you to map acs_objects (a superset of content items, includes lots of other things, like users, bboards, content_items, etc) to content_items. This allows you to link content_items without forcing one to always belong to the other. need to describe why/when this is used +

        + + +

        Functional Instructions

        +

        Inheritance

        +This shows the content type's hierarchic family of content_items. Select any of them to view their details. Left items are supertypes of items to their right. + + +

        +

        Attributes

        +Attributes are characteristics of an item_type. All item types share five standard attributes: 'description', 'mime type', 'nls language', publish date', and 'title'. They inherit these from the basic content type. Mime Type defines how the attribute will be displayed in the system. Oracle uses the NLS Language code to search the item te depending on the source language. Publish date is the date the content becomes live on the system. Description and title are self-explanatory. Additionally, content types may have other attributes in addition to the five standard. These are defined at the sqlplus level already.

        + +Each attribute is described by name, description, from what object type is the attribubute defined, and the type of data stored in it (text, integer, date, keyword, etc). + +

        Registered Templates

        +to follow. + +

        Register Mime Types

        +You must select at least one Mime Type for the items of a given content type. This describes the valid formats for content of this type. +

        + + + + +


        +

        Use Site Map to navigate through and store content items

        +The site map files all the content items in the repository. Admin users create folders to store content items, copies of content items, and symbolic links to items. The root folder is created at the sqlplus level and holds all the other subfolders. Subfolders can be created from the UI interface at any time.

        + +

        Folder attributes

        +This is where you control the folder's attributes. + +A content item cannot be stored in a folder until the item's content type has been registered as an allowable type of that folder. The 'Registered Content Types' section allows you to control content types permitted in the folder.

        +Under 'Folder Options' control whether sub folders to the folder you're working on may be added. Permit/deny symbolic links being added in the folder in this section also. Symbolic links are comparable to 'Dynamic Links' in Windows, a link to another, real, item is created, but can be treated as if it were a real content item. When the referred-to item is changed, those changes are seen in the symbolic link item also. This might be used when you temporarily want an item stored in a folder, but don't want to remove it from its original home folder. +

        +Describe Permissions here +

        Creating folder

        +Simply give it a 'name' keyword (no spaces or punctuation) to include in the folder sitemap, a 'title' to show in the folder's drilldown pages, and a 'description' for the drilldown. The folder will become a subfolder of whatever folder you are currently in, or of the root folder if you're at the top level. You cannot create other root folders. + + +

        Adding new items to the folder

        +You can 'add' an item of any type registered to that folder. There are four methods to add the content to the new item, 'No Content', 'File Upload', 'Text Entry', and 'XML Import.' Use 'no content' when the item you are creating is simply a container for other items. It has no original content of its own, simply a title and description. 'File Upload' allows you to browse for and upload files of whatever types the system has filters for. Types might include MS-Word documents, MP3s, or JPEG Images. 'Text Entry' is the simplest method, where you enter the content directly via a text box in the ui. Finally, 'XML Import' is a way to formally structure records in a text format, similar to HTML tagging. This might be used to import data from an external database or a script file that generates content. +

        + +In all cases but XML Import, you'll have to enter a title and description for the content item. Depending on the import method, you'll then type in, or browse to upload the content. XML Import doesn't need title and description typed in because that data will already be stored inside the XML information. probably need to discuss XML format + + +

        Bring existing items to the folder

        +There are three distinct ways to bring over items to the folder: 'moving', 'copying', '(symbolic) linking.' All three actions are applied to whatever content items have been marked to the Clipboard/Sitemap. +

        +'Moving' an item moves the item and its revisions to the new location, and all traces vanish from the old location. 'Copying' an item only brings the item itself and none of its revisions. Linking an item creates a symbolic link to the item and revisions in its original folder. Any changes to the item or its link are reflected in the other immediately. + + +

        Rename and Delete Folder

        +These are straightforward. You cannot delete a non-empty folder. +
        + + +

        Search

        +

        Use search to retrieve content items from folders

        + +To search supply the menu with any number of criteria along with the keyword you are searching for. CMS will return a list of all content items that match the query. + +The optional criteria are: +
          +
        • Content Type +
        • Search In: In what parts of the content item to search +
        • Mime Type: Search in content items restricted to a certain mime type. +
        • Which Revisions: To restrict the searches to only the live revision material +
        • Date Range: Restrict according to the publishing date of the item +
        + +
        + +

        Use Workflow to systematically manage the creation, approval, and publishing of content

        + +This is the life cycle of content: +
          + +
        • the content is only an idea +
            one or more people are assigned to author it by a deadline
          +
        • the draft is prepared +
            one or more people are assigned to edit it by a deadline
          +
        • any appointed editor edits, rejects, or approves it +
            if it's edited, ...
          +
            if it's rejected, ....
          +
            once it is approved, one or more people are assigned to ok it for publciation
          +
        • a publisher decides if it's acceptable for publication +
            if it's acceptable, it can be published on the server
          +
            if it's unacceptable,...
          + +
        +
        + +

        Use templates to display content

        + +The CMS maintains the knowledge of how to display a content item to administrators or public users. + Templates can be asssigned to content types and specific content items. The content repository will display the item with the most specific scope specified: if not item-specific then type-specific or then the general template. When the url for an item is submitted, the content-repository identifies what item it's referring to, figures out the appropriate template, and then generates an .html page for the user. +

        + The templates' two component files (.adp [for display formatting] and .tcl [for datasources]) are stored in the server filesystem under pageroot/templates. There can be subdirectories under templates to better organize them. Users can navigate its contents from the Templates section of the left frame. Use it like the content item Site Map. +

        +To add a new template to a content type or item, move the .adp and .tcl files to chosen /templates subdirectory on the filesystem. Then goto the CMS/Templates/appropriate_folder and select 'Add Template.' Enter the extensionless name of the new template. Now the CMS will have a notion of this template. Updates to either file will be immediately reflected the next time the template is used. When you send the template to the clipboard, you can assign items or content-types to that template from the item or type's details page. +

        +You may register multiple templates to the same content type or item. Only one may be default for public and one default for administrator. Control which ones are the default under the details page of the item or content type. From that page you may also unregister that template from the item or type so that it is no longer affilitated at all. The CMS only uses default templates to generate the .html. Non-default templates are only stored, not used, until set as default. + + + + + + + + + + Index: openacs-4/packages/cms/java/PerlTools.jar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/java/PerlTools.jar,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/java/PerlTools.jar 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,262 @@ +PK��U'META-INF/MANIFEST.MF��I��X����!�D7 +�P�@fAEw��A��<��6�����,5w�x|qν�^T�,�AU�qe������������I��7�(,a�yh +��A������L�E�}[�N]�2�z���?�ĩ��6 +�肋�Q�՗7C��Tv���r����_ޤ:�V^�)�)8� +H� �QK����r;��I�sR\`�CWr.�ºse������NY��ѸU��;#����0���3?4חUCG�kk�d�bω (�p�L����.Bw��C*��A����(y-�7r��y:�wsQ� Fp�2uQ�4ASO��)D����(����C��f/����B�n���jd���'�12U1��M�8����9�,�+j�j У?&s)� �f~��� ��qA�5'�pBvXXb��k]�mw��D��Luj/܃�I��֍��b��:�P��R,�� �R�be�Ǩ��j�P�`!w���ןni�����mw�\{��pw���ք5�e���׸e^�� l������MNP>���nS�̢�aʹ̪|�)�<+`�a��Uz�Lj����|Ы�":]z��c'����5����+��"������=�2�rd�a�$W�N�jb}lM�G3n��!��ke�{���U�s�� L�(yB6\g�T�+ono{nG�>/��-�m�bF�Ŭ�2� ޞ������4a�J$�(�Q�o��u]S��ɬ:!��Ȃݕ���@�GZ/�5�p�IY�<5�5��7��j` O��Dqwh#��Q#��I�V]+��� +�i��t�isx�NZ���f�u�孨Ds�_��t���J%Pg�3]���mv��pG~�3�8�s +1���m���vW�����1�1�vyb]���1�A�&��ğי�񔃴_,Qt +R��c��$�x:K�y���Z@��l�����2���g;/�G-��RL��� 5I�g����-]yk�5{���8��67��,�$�6cm��#���f�-y�[��te�8D����IXA+�0rr��L��A��O��c +� +p�c��'����~�P����=�� �&�i��Q�4��3��hԝ��(7֚�A�ܦ�H��� X� ��]� M���yo�An?����^���t0h��ܐY��r�Q�`]L9�ُ�5� +�$��Ϭ��#�C#L͹91z.��s��TD� ��~GQ8ڶq�s݇"�=�����w@��d��H�`2�q���ʫiV�A��℠ ��p>,���6{�a6q�}'5���ð.���h�X=��g��ղ'jo/�ɸ��2PF����q[� Qˢ�HU:$��~75UZ̅��pV@�$���^���n������[ׁ^���8㝑�+? +!�Ͱ��}+S��Y�i�+��%z�F��Б܊�uq+w��V3�Q̛@ճ�=��BD��4�3Z�_��7�6>�V�gɸ��P]���zDއ� �t��,:�Z����*��ɨ_������c�[շ -�bo�y�m|�q4��z{9��G+f�,a%B&�%���/PK|�&2:PK +x�U'com/PK +��U' com/oroinc/PK +��U'com/oroinc/text/PK +��U'com/oroinc/text/perl/PK{�U'9com/oroinc/text/perl/MalformedPerl5PatternException.class}P�NB1���=|Q�� b��I��EO�����Z*֔��b�-O$�?ʸ%ʁ�{�����$���� ��8)�-!�J��E��@�?�N��z#i���4��7��o�3q$Ь�L U޽Fr�&�⹼[+���Y���+�5C�V3q�@�ɇ��Mt���Q�;�H���UP��X6*��>x㔌z�΢"���-���%�F +�C����%O]�o +6�޷ In��=^op�4���M�PK��8a�oPK��U'2com/oroinc/text/perl/ParsedSubstitutionEntry.class�Q]KA=㷶~dIY�oa��o������ �*�:��:���a?� z����;&E40��\8�������$.�ʢ��I ��`�(�1`Y(�h��= G��o��C�}6b�j��p�*���h�Ҏ3�r\k�d�?�� ��9C�|9뺮!f�}����m8 ��P.5�ză���������\��?B ��Z �~��`ĕ�'��Y�WK1Ɠ��ulzR��KC&�a+O�����e�p%͏€o���w:�r�����X�(��X�:?]GB�*_O��̅�Q�R�)�U�VJcS)BF��� +�N��6�I��Fڮ��Hٝ5����� +��0��PK�*�uXPK��U'$com/oroinc/text/perl/Perl5Util.class�X X�������0�Ȅ@&��TC�dI� � I�hL,��@�.���V�����Vۤ>�U�b+K������_�˾��־Mϙ�]�0@����;������{��>���pb�h��^'�σ�{�������<� +?������]`e}CGO|�)��Gb=Mic(ݔ4�����p���N#5M�, ���k�M�p��i�������]�d$��b��- �7�k��o� �2��g$[��p%7� +mنXi����a2�o7a����<4����.�����t�H���=���gb�>��-3�h7��6�DӇ������<�JG҃�Hܖ���;ύR{,1�����Y���ZZ��m�q���gF�mpiv@��F�n�2�h� +�������-9r��Κ5��f��9G�v�x����IJ�F�>?�J�id�b���A|�_�����篳�Nmy�S�;xչM%~�� �n�J���}f�[Q�jރ�f�O8��u5�O56 �7Db�t+Ͷx�!P�����Xzw8:H��֡#��%% ��.h�]�Fz�C���J�Hh��/���`V�MW�XW;w�83K�uȊ�B+Wp��0�LrD��jM�]t�t�{����d$|0j��J�E� k�3\��kGG��ݛ;:ȡ�����H����/_Yw7�H�¢�2uS�5)����Ά-F$���/e���rk�7�*�Sis����m͛#���Z�Z +#)�vw�����J��������HE��;N��N����dƱA�`�$�ѰDe�,�h�Γ���'�D4�c 1ZL ��n�Z/�p"a�z�o8� �'S$dж���N�{"i�{���I�x�أ��k�c�T��F$�)4�}���[� +˧ +�~�Y;؅��~�K'�n�=<RM�eH�� ���)��93J�ᜫ=%��ז +u +���g�ܠ<�Us}F +<,���u�f[ ��͈���個���G�3��TJ�����C�6 +KB+��G��/S�f���VJ�NJ�p��}�;�՟�&(�͖��FRnO^BILv*� +�7�o/�����ƴ�=iv��-��T���I��+$�wJ�s0�� ��\u���h:�p*m L�x��d�:��9`��*���X�1���|5b�ir�6��~������ +�/��H +]�o � +d�*gK y͛���gy�ώ��u���^���îT"ʾVR��#�^�%��t��Z:��<]v��FO�F7�E� ���8 �CwK�OwQ������=�l�Rj�t5[���� f�?/�'��y����.�L�Y�!����P�@E�V�b��q-����q�êQ�!Ѕ�����, ��^�����E9�Rm���J���� �hE���\Π��ˠ}=�9���@W���'i�Ud��4Cwn�dF,���!����B�.���˧��C�u!/ɋB��m�t%��C���&���\C +�e`�!�$����[w�Ʊ� ����۝�K�t��R�7#�K�3x����.�G�'BO#=�\HO��=C�l��nlFs���m����vE�o)����D�WɱZ|�q��3���U3��N�<�u�86;�{F�K*y� +մҗL6tX�7�����t�q��q !�;��AGk�Q����"��b��9�f`rkk1�9��g,Õt�|�����'���Г�͢qQ!�˘@�4�b�n7id�s6"OZ�7Z�/�2} + 2x5[�)�.ش��:�u�y�f�qŠ�2j9�]d 8bB��U8�]թP�.��|� ����ث���*��g���X��=���n6�4n6+����+�кtM��+Z�I�Cjq]�8�꥓� ,�K�;�qT�R�It��=���9�>W��� +g�� +��q�^���}���Gޒ�Ð$ +�:S�������T(V Q<�:����83�)�{Q�)�&��A��*% ���>D���$�g�ij +�uh.����FHLZ�F�g������+�Ai +y⥚t�d^4�Zsa���`˞)�hE���RPv=ZQ����l������9hՁ�\BO��CV=�fՃ��[�1�F�榒��M�󙽵�[j�Ay+��gK��\\#�=X�v�R1�Zr����K��@sg+G�^LB��.�DW5Y�1T��(efE�b�B/1�Qeţl��e��3*O����)��*��X��[0���GPe� +M��+0��!�<��\�Ꞁ&�^�8.u ���Q�8� +t]��Pb��Խ�U���_�ӷd�=��p��#n��5׉3ϛ��9��8�P<���^D��ؙ������.�׽�A�Ȍ�SG�nl��%�P�sfp��x�4����ª{&�ǭ�SiU�+�8� ��\͝�30y� �'3GɚRKS����i՜ +;9v����J�\��4���);v!�Z��_v�|�ZC+�-Sc�[�gאg�Ȃ)L��R������PK�-��% �PK{�U'4com/oroinc/text/MalformedCachePatternException.class}��J1Eofڙ:h�7n�Ԋ�P� �� f�Lc�d��o�*���(�eк3�K�=��$�_�Hq�q��� �Q�]� �2H''���d�D�T��r�����g��p)Ы�R �Uξ��&�r]\��z�]���I25yM�F�q|C���F-+���BP�nGf�J�X��Ku� +ΤkJ睶� j��#���}�ڠ���ĕ����Zp5�Пn��u +~���X6=ݠ������7PK�vnr�VPK +��U'com/oroinc/text/regex/PK��U'#com/oroinc/text/regex/Pattern.classEOKjA}=H��,��^��R��ྦS -m�tJ����J�MjS����z;_���]�v10��K���x���@���>�S�r�~��m��P�-��޽y�� ^Q��*9 +[ʞ�� +��I�s���*ޤcv��A��.�m��Gg���kn�á�e�Ln�?���޺ڱ����@;E�Q�����8^�PK)�>��PK��U''com/oroinc/text/regex/MatchResult.classm��N1�g�]@DE={[��H4!��H½[������5�l|�8��у=̗���7?>�ޡ�p݃�L:�t�0I���|��H��U����q:�����3�!����"H�Ҕ�?T�A�a�pJ���Zf�x0~�A힩(M��MY�r�W�� +���rm +��mA�F���V�@U�r��/�Bv�p��G��ޕ�n�����lO��t +�<���}'�"�O?���a��hy݆CH�[�Z�����N�F0�PK)#3{PK��U'5com/oroinc/text/regex/MalformedPatternException.classuO�J1�춻u�j+^=׊�/EO��ޟi\"i"1��-O~�U|Y��̃!of���k���8*1���������|rV �L���FҒk�"㚫��ƙx#Л��8�y��Ś���U�%f�s��� =Z���=�'Vz�@1��v����/�:(}g,gI�W�o��Q�Q��V��!p����ʐN�7�(c�ݨS��t���3$y�#�ٞƊ���_���~PK�+2��KPK��U'(com/oroinc/text/regex/Perl5Matcher.class�Z |[�y��$���&q,�%� �(i^$ql+`'�Ȋ�$"��J28� +�j�2XK�v��Î1SG +;)+���>F�B����k��=�j���{mَgM~��9����w^7y�O��B�"��\%���ǽO3��Y�vk��&�jb�&�4�];4�S�4q�&�5�[�j�:M4k�E{4�W�kb�� +��E%s���-.��V'�� ��m��$��N��b�i�~��>� +p�g>�y�;��.�ލ�:����E'[p����%'��1��A�L� H��?ð�.��^�����^����x� z��=Q���2_���xï a����>�����x����&���.��� H�b�O��)L�����u���~���� �G���B﹅�� +�N��z�O�p�0����q�� +Y�(�u�b̖��1�� �ћ0���-�W��Z����t� +��[,����L\ +��~�K@������߸�r�V����*}��jVab5z�����a}-�Wp�D���-��ߺ�:��[| $�6�d#z��gn��+��n����-���ܢ�6�w��v���]���~�7AG�����A�+���W%��X�mU:ڕ^���v�j �ێ^Mu��7��t7�o �jǏ� +�9��RY�W���ʪ�uh��F"�A��G�����z���r���t4�6D�����I7@~����+,Ji�oV����AͲ�3R7�����}ʕ +�+*�F�� 񞇰�<(�Um.1���M���FN`d�^Q�F�k��v�$,�X�q|3�ў��h+�����h,Mu��x8G"�Ī���QƧ��y�)��G�]A����H*�t�8i��,�bW>\�� ��U����t�k�h�AgI�^�u��ŌeV`�v'��c��^@���^�}���h<4���t�Kw�H�:b�oH7?!9��4YH�M�p�]~������_���Ń}�.d�/ +��3D��F�G���C�?0Z�^��C�͚��_�c�l5���D������"[~�p���+�N��ǐ�;�x�_��J~y۹�\ �2���;z�l�P��h�����>t�m�[�nE�6]=�}U"�q��c +���i�������3T���ڤ�YN?�)ؔ���9պZ+Qz� +��r�j���/t�F�(_N��>_nh"~����2��<��r�IЌPdzdo����aZ������>7U�M��yl�5�����Q[k���� �a�j��y���!xj�� y@�b�\�-/(I�L�̾aX��w�iՓfh����ҫ�ô���?Ceô���(ô������t�0���%+z٢b�0]���^N���<[�K%�\V��'�W�Y��*o�0�2�Tj[���� T���� -������9]=�J.1ۥVt Ǣ����c�S��r5J +����3�h������ �Ї蚍��R9fO�Z �~C$�������,��a�l�����;�e��r�W[./�� ��k9q����] h^��BW��J^�,���2� t��W�'{d6jz(�������a%��j��,mEN��U0ɾR�d/�ؔf�u����m#�.F?b�U p��W �\��X�y���|c��"X�}4�'��fJ� Ȗ�v��;���:�CN��u�ƴv�ǶR�?@NݮF���ZD��A�"-D Y���U ��ŵ��E���{����j���Ⱦ�Q�g]#���.(��]w��x�rf�����S�Qwv��� +,�%cܺ�/��d�Sف��u��U9t����|�˨N��m��ק�d�)R�@�����,ktG�׸ʔ�3p����WʻF5�s���b�w�:Wd ���4���jp[�m�_��ր#C�Ƽ +8ug��Zg(՝�m����,.:مJ��=S3����;Cv;%Te�yүnMt�YY }����;����р���o�5�-I� �p�'���T�O�����\y����uK򓳶+�cW���*͵+35Fy�SM{�4�W�7N.~ r�愜���i�/�1S��eD�dIӥQ$. )8&�,�֞���<��\)��Bo�,���#��t�����\)��r���=�~7YƜ��l?��a����m���J��yn�ȗ0�J��z�ꁃ��G��X�k����z���y��HE^��!�R��~d�_gEn κ��S��Q�GW+"|�Tx�PΛ�_k��VD�f.��x��K�{S/� +��e�Q�3c��K�ܓD��'�JcO[�=I��UR�#!�� }����{|y�4�$��ܣl�e_�� �"'^60����F9T���ʒW׌�M��[O����"��A���u��,|b �|�������WY�+��~��_i�I��h ���hU$`�\�ۭ�-�W��9_��F ����C�gEU���>�������ç��������呼f4�e�w�X�gi��_�����0��0�����1?��Q�B����]�k�f3��i"�>n���;F <~y���->|V����� ���F-�� +��uo�a�G�������߰������~y7�[l�����z>�?��r\����c��J�cP����=��q�:4A@�� �� �a`u{DtT&P:��c�2=�ɸ� )4H䫬�..������NnI��~XWq��y�C�!`�'<����t�:He�!'��^9�����VF��Pʛ� �&�&�\� +��<�ړ*�_��>&���m�|_���#��� h���Ⱥf����>���@�^�����5V<�B��թ�{��8k[lύ��E�`��#���3�;���.F�|`}qY1��6 _ź�&��y�fM.e�1���a����S�@��kP�0hpBW�.U�&�k�n��T��:?zWd�S)��S��e�ҟQ��'���2�[��{Y?�吟�� +��]/��"�iw.�L��s6�Q�.�&Z�qӵR�.�n��A��"|࣡��4]Ūt7b�&��=��w���]�T;F +:��=�y����]w�󃴝�����bn^�B�nR����!?�����06�M���B�r�2��r?��7�rƏhUW���#7w_� eo�L���ZtN����(�񬢸���(g�j��-Vsǖ���P徭Um�ݤ�٘ϫ���|���w��� +�;�0{�;G(�s��� ��w�*,�y|��]U��g�u�X(� +5���p�v;�6#���f�]8`>�;�Ϟ��'���l�Sw +P��Nj�~j��-E�O�~ڪ��`�E�lj�-.�b��-�Mn�ܶTi�QǍ��<�y���gCfu���i�.č���(��~����a�yܜo���%� +nq��.����mLo6?q�񍞳5��j�7z�b� +�&�x�<|R���������,�M>>r�h����9���k|��s*�>s���Ǫ�Op�'���>��]�s�V� �����h�� ���������z��R�!�Y��S���!Ft �Vg +DW�~n��6�}l�_�d �~�!W?ɛ�����A*����� y�'s(��8bX�:�D*��� +� +iL&�يޥ�� +��������Oe|3��(d�ʯ����)���b�+�}���w2�3�T�s����6�g����X��D���H������M?W3X.��Ⴣk�FV��)��<ϰ� s��� �޿�PKI���;+PK��U'*com/oroinc/text/regex/PatternMatcher.class���N�0��!� +HS��J�Y�2F UJEE�0���R�r/(����P'���x�o���w����;�%\0 ���$�BoSm�T"%l(5Xb��9��{��e ��/�'B�:7���Ք�mͦ ��b�_yZqU�K2R�}���c��6��6k}~���A�k�'�hū�ޏo�;��2Z�jō�� +-8���Uۇ�Y�����M0�3+�q�V�Hg0���z���.��BwZ|��ǀ��:��� ����S���������������+`+�v��� PKIS:�>PK��U' com/oroinc/text/regex/Util.class�V[w�D�6�,[VskTP!---u���I $��$�N�˥(�ƨ���eN^����/���Z^↜���D�U��m⇶�����~3���z<��ǟ���@i�> +J +� +��(XU��|��K7U$qFE +gUhb��8� �8x9Rd�b +1�"V��*�BŘ�2bbVh�4��51�!������a�>���%�����n��g�k� +�5Xx[�&4T�u�� ��L���bջ����V�>��� +^���_�z�7[�?�0B�[�wVޱ�Z��7l�6Ya��MaKL$�J�f$����-�� +7��S��:��Zk����m�0���d����(:H�_'��Y�uQ � �j�9_.,-.gʅ�3�"�`����|����U-g�j�֚�I3YZ,��}|iy�T6��j�k5���!��e�A^��k}��������U�s�( +�/��Cj��lwac�� {��3\�%� c=?F�KG`yù�0���d���  �D�s}�iIR4:7OԸ���<����U�~�i�U)wk>���u�&{j�CXd.��&|o���MHR_��">�5���k��.����}rA�3�kv���� ZQ�A�9��hf4˙6N�������'A3߅Vic`Rޅ\ɶ18�H�{Hgv�<�dܐ�z̈K;�����1H��a"�%������������{��6�+�?p�V�~��.Z�Df<+=���ڝ�+u[*�?�"Uɑ�6�'��bNPLH����|�[���8 �*F2�ˆ����j�H��e�ሂ�Tp��X�<�a���w!��Fr� �\5��=�x%��S cb�.��=� ��)ʅ���2N����.╬.�1������P� )�4�*ґ���!x uk<�@"�k��PKR�� PK��U')com/oroinc/text/regex/Perl5Compiler.class�;}|\�q��w��ݓ�$��>�dd�e�l���Y�- Y�A Kƒld Ng�,�����/��&!4��|Ht�K'�l���$$4�Iڴ�N�4@BI�k�4�:����,,������ٝ�������_��� �iX�G�D�� +� +� +��j,NI�-*�:�T����s~���:�F����M~���u����[:du tI�%�.ɺ�蒮KݺtP�nФ5�C�vjR�&ui�͚ԧI�4i�&�k�-�t���c^R���{a�A5,�Ý^���]���8�Pq��?��^*��Ayd��j�&�Ŏ�P�^j{�.�� }?�>@mA������A����CT�&��`�G���TLQ�$�!*>N��TLS����P�( +�q|��OR���ST|������Pq�l�Y*>G����y/��'�Oz�j�OQ1C��;녕p����螦�g��Y���� +_��T��Dŏ i1�aHK�? +�/� +i)��T P�JR +i�.��j�-��� +��!]�ҕ�;C� +�ِ��󆴒zW[~`H5T[/R-�%)�v +��@muTl�"$i���:��'����*��s���kH��cCj���Ƹ��m!�m�!�R��fHm�CC��7��H��D�G�7���!�1������^2�Ҵ��=T�"L���R�ѐ�� +i�bHC���H �\���v �W��-r$�v$^۝J���[X� �����h]%rT"��e����-�h�$PW�2���Kj��/*���+��V^�' �0W{�`btm"���צ��Rk���豵�"�T4G�W��5�!V/�0���Z��us��ϯ�{���T����:?y��c*u�!y�[s&� +VY�"D�+�S��Ш����j\S�Ai��jkkWU���dt01���`��k�o���T�9r`p(z0��lk�޶���5������&X}012�8:N�ᄪc��豱dt|<���P�RVkKw[���������}O[xgK���E����E���x*O퉌F��aZz;zUQ��=m��۶ |q[2�H�SIUK�m;6K!>.���|ol�:�HT�D���Z� MpY{�Hd$6T����$�G�P R-�)Dߑ��E�ц�~ ��X���wJ�v �z(�䋽+��q���r���`ddO$����w��;�;m�]�OE�p�Ƣ��hu��f���vE�#[�c��h���Ba��Z���:;��������:��}��w�IV�l�`����� +�?�GR�+�����`t"��'����_`���8��AR}�i!ݫ"��d���z�H42�y%�8�!\����K���?��'��?����A����[�����ڏ������+W݅���/���p1�a{�` ������ҁ����m7���_�ރ[7���m�pxg[OK�����݌*�k2��ή���Οs&��}箎6&!�@��{WwO���K��Z�;���]��{He��`b<�*���c�$M ��p�F"���f8�k�+oV&~,�NFF1 �����=�#G�9w)ɏ�%�4d$��܎�/L;���&��(����Z�Ý,y���v_ع���p4Չ[��E��9���o�. ��[q}�����8��#(����F��v�q�I��c�"J���]!���{ɡV۹hPܓ��p�i:zx<Ń + %�7�[3u;�z�a�p����(�Ib� �G��F)" ұ��ǰ�kQ��C��:6��[��0m�Ӊ�(R����4C�%i�0��hn:�#�q����auo�>z�f��]���H�8o(Rq ��=�zށ�Ֆ��.�H*���XD���� +��1��ɩ�V���X�i�;M6��-�bD]9s�6{�ܑ1\z��W/��`�ܔ;##"�C"C�E> sst�q��򢙆}�`��6t�SG��"ѧx������v�Ќͱ�P�X�A�K,1<:~��Ʒdžch9_l�#qm�[�a�h:��9�R��E�E�cֱ_J��h�aj�,�6籁뚧�:pIM�:V̝~��s(�8JgN�E��K8�/r�nĽ\C�ԁ���r�2� +^.�tR�� ���A��2p���������,����`�~��w#����o�z���y����Ҋ����M���>5x��Y�f��5˂�u���)�6�������@pB�*��Oe�� �<=�0����%z� ���9���^+ش*���i(]j�L�o��< +�|Z9-��r-跳i�㰏���a-�B�WD�*��o�3 +�`�9�e�˓m��9�)!��g��Y=�����e�dh9q�N���p� +����.�^�]hvZ�V9���� TY�v,�X���%�O���F�U��<`•}�ʊ�:��TW:�M+'�)'�&Nז��R�L8)�n�����Xx��S\�M�e_ʋ����E�d�#��a})�h.�l�b�m�o�=�%�ۉ�8~��ﶠ�_��8��UT���S���\��jO�1A�^��D&}��`� PD�����>�� l�����W;����H���"��A%� :ɡ�}L�+l�{����U!v�Uv��&�X7�_쬆@o�=�v�����$t�ZyӠ�P���,�S��6}����ZBJ*&�섒%.t,��z��f_�:�����ܛ��別N�ُgߴm� +/ �zѲ�\;_�ҕ�Jf��s�F����4e��惚E�o�C!�����R,W] �-7�58-ߕ|�ŕ(� mAhe]�iL��Ju p"6��p���QB�$�����d���5O�.� +a3�2Ky���� �e�ƀ�2 +�刕�����i�9G��C|yj2P��3p]c�̋V +�������{3��6˸#�OŽ�9��wl\D�w�8��v�z� Z�,t#�ǃ�]��H�4�@k���J}���pFS���\3� #����¢ +���e���n�T!#,����a�έrg�4���G�973_I�Vl�q��/MT�u�c��*�OtP��Q +� Fr��h�m +,T7b)��2��&��Zn�i�"��j�a�A�͵W��_㧠�@�n�M�{ +l"��򬷁Ynt�����&4K� +W@#�4�@SE`�E, �.�z�+�� � ��BED�4�k��)~�ߏЏ���o�@��]�o�#�-DQP� bQmg4Y�[�6Q���U]~kqдy]A�ה?8y�`�C��d�U��u��*_���<��\�\�����U�W�Z�n�wq�!\'/QR� �<��\���}�2���� +|0��h�@M�X+���6tBg �Y�YX� (+��SU���a,.�R��b�3���l_/���(`H�M� �Y�\S:��!|��e��!\�ǔ�A�a��k ��z@��A�!�m�Q�0.`R@L��x���_ϓ³Y��p"��z���ׯ��9��g�Ma�sA�,���5*h.����A�|!wMk����Y1�����x��As��˂��fMi̸\�Y�S�Mq���::��y,�yL�PL �򈘐�-~��e�n��X�X����Ցs����AϹ�]ݏ��y/Ɛ�y� �p +t�^�nc�grZ�L�[P����\j�O��m� +� ����4mj�o��o8��ѓ��bm�����m�Ť� +8�Ԥ->A�1َ�!yJ�F ��t�>>��䏅c)��I��Ỹ�o�����j��8 +�A��PHϣ��C������7�Qfe��(�㎂�J�ã_�F��'�!`�����#���=����ap�������g ��"���%Ժ�*��[�ӷ�P_�G"N���qR��q���n�N����$`���t�IE�IE�IE�IE�IE�I��Ii��� +��҈�� +���z'��})^�(�_F��r�fK�\�3�9h��k,�a�� +vOhҬ8h�q0�.֍ܖf���#+��7��1Qg�Ⱦ�X�C��Kز��h�4%���S8X �3��v��ba�Q\��I�!X��<��2�ł[A�P�lw�ՙ2�\��RJ%8��YK)�?R���U��펁�:�^͒���edv�������x��:T�����d�2���A�C� +�4<~gh{�����zfy�Oܚ�j��I0�L��\C� +{d�d�cW�^ �a ���Mo���`� �-x��2פY�!L��Crc�.Uf�uR���S��n�wV�U����_d��"��Yu�Ȫ�EV�/��~�U����_������T�5��4p����,N� �5{�i�8 +^��o�i�Z��|Gd�d��'1ia>�Y +�AnV���i�3��9کyi�mڱ��V�h�+�i�k�G� ��͏e_�Dߐߎfݩ�kf����q^�"�kRl��Y��M������:����X�njX�����=կ�1H/V�~]�e�$pCΏ��#8�*��R�\(Er����e�$UN�K�zL�R +6����*���-����s���`���8=#��`P�e�< +�2�I�xh=idz�����_r�.�<�p��L�>�tv�yn�t����?h^jm>���2:5����|Ecx3�hy�'�b˰|ih�Ԑ1�J b��,?�I��>���� gb�dj$��{�����r�] �I� +�b˻��1��K���=o�(�y�FN���K��L�}u3�� 9f��=1��2��67?m��X��� ���n�e�==K�7�Qi +L��r�gp*�LC9��iz��]ۅy���y��Q&�E,iXN$*��%AӤ��,��(��@/'�aHP0�� �<�y7�YΉ| +�)#e����4UM�l���M�K�L/���\��z,%h��t� D���Km%��r? Z����&a=�f7f�9�/�_b�|��F��_�,�2�ٺyfk)n;�]`���.��Ŭ�u$������~�)g.A�+�J���Jn����d�[�� +�d]�ݞ�h��I�=�xO�������Q�+�#� �|9��z�<���k´��0 +����݃�աA��>b�K �T�~����*��!V�;�V˦n9��e�%���Nq�\�.���2̥F\�����9���m�\f8|�P��>��6PF�4+�۞��M��x��Codx���Ӗ��ۀ�� F�`i!��� ���V�����.����i��4K�-�̗�wMg�,��`�%����o�k7�5���9��l��m�&h��� +��Y��V�A����:�X��dE�*�<���I����u��v�yea����f��2�]�yIЬ���R&��1u{�&&`3�`����9�o@��`�Ui�TV�b��� �D����Z�` ���;�Wa�, >��j�B� ���l;o��dzCV��d�=[��(Ͱ���d�E3(�9�\�zKE��Z�{[1Y�=��˖gા�PKo�$o�~7��� +m����&���d:�f�r�Z��:���6�^��hn�]3��Qn�_�wf�����d�N�A�t��l�\�)�~KU�Bj��Z=u�� �r��%��`��yz��Z�f�yJ$�L�W� y��/#f��Q�<46e�"q���"���~�I���%,"��o�ܺ�g�WB�2��Z��8 +W�Uy捖e�|�Y5�Nz�I���JE�rY1Q!�a&�d��*��y��ѻ��my�^<���rJy�M+�h��+������M|�L��Hl��V�-S������&�~�w�N&k�Tv�囄��w蹽q�^�q���HI!�,�k0�J�*FߖC�*�CeW�۶�p������}+d�_�y3_c�xMc:�z�UO+L��(��q8�3.�[�4����5�O�BV�����*��z ��㊘V鐅2��F~��e����{�bˢ�Z��c|OFz�(v<�K�N�Vԡ��1�0 ²u}���=�Xs~_W�����my8xN$�{�r�q� r�A���+��*�h�)��@�O��k׳Hנ �@���@�_{��n�2�1��6��ӯ�@����)�>?�)�=~��"��`Z�O���"�� ��^�C���Q�A-�sQ���(^q��?r4�g�r��a����J�� �?PK-���:PK��U'+com/oroinc/text/regex/PatternCompiler.class���J1�g�Հ���o�B=hz�qQ(�(z�4M�%%����>���g�~@�5s��/�$�o�/�gp���`W�>�E���iG�������� �1Xot�&��7��R����+T�����}�>�X��Q,/„:E���|��K�}��%+�[CnD��ر�Å���:���5D4 �h�Z�^����C�5O%�� ��9�W/e>]����O٤ !��iW��9� c����A6���Q��XG� v�PK��G��PK��U'/com/oroinc/text/regex/PatternMatcherInput.class�U[s�T^�K�/isi�--�2�@�5�m"0$�0�E9q�q��t ���܇v73e����:ݕ�d9�$�ouv�o��#��gO�Bކ^���7y�V��� ������>-\ �HP%�,�B�*�k��D����� +7�N�.�un�G*�"�M�B�J�ç*|F���NO�pU�.i���4 ��F[�����=�W�50�~kk�3��i�6w-���k:>v%��;:�v�,�$�Q2Wo'dz��l��� �@����d�hOnٲ-~7՝}&����7l�1C\�k�&;�z%��������i :�k{�̅;�̵7 +n2�m +�5b�mg�l�`��C��eox�c��9t]f��!���.*���s5�(��1��s\ �`uxp�\�;��FPY� Z�b�;�o� +�95+i�����:�m�8;�-���q+�[,ۯ:L�g|��9D�2>�=���3�K��>n�A%��D�ӗt�t�� +���x9�!beG���}�\&�ީ��٪�ɪ���'� bxE +�p�5(ܡSYq]�w�q'(*�.���|3���5��.캰�r������]vշ5̈_����2d�`N;����B�j���c�y������#��Q�f��*'����L�sc�{�?+�(��ȅ��9$Hhe�O�3��@p�Q/��ɢ�Dk���I#(�5,���������)J���AF�͌@~���~cC�F��H��?��J��Z�����]�������~'����)_u�F8����`]��0�_��;f֪�'����7�NI/V����h)Oh�Fn�YDK'SAN�o���Cz�_�&�A�R�0܆�W��0\���l�A&����2��L���İ�7Å0�����f�ӪxR���&ǣ��1��D�L�����_�M���ӦB.�'�߱aw�S���|�B�*vQ��^(Q�L�Kv��')��)ԵB���B\O'4B�>����.��~���'�{�Zo����Ȱ��͵Pf [Q)��m(#�5R�5K/�I�:���I\�9c,&X\I�K�Hb��C9�;�I�ºy_a:�^-��;^��[��IT�i�p�E1�&.(��O����rQ��/�* we6i��k\d<���gݷ +�[(;k���� ku�M��M2��۬�j“��h������(�,�U���J:��v�#m�!���"������8!�*v�vl�<�nM(�+�N˷�j��>QzPk�MZ +��NR��)�j5�-϶����*Ӯs� +˷� ݭ�[�׭VKxL�߷ݦū���ZB�Ě����b�t�y�������h]q=�v��Uw5A��^�|�I��Q΅��s׽������BuF��� +���������Zer�4k�����[��; +Lsy�^^٩zbU8���i��f��S�L��Cx����Ռ�IAo���L ��L=HPA�l���WWJ�"���h\�n؎�9Y3�����&u�L�z���l����}�E6�43����<�a�]{��u�4���~� +񠰻�tnW�v���&�"��ng�g:�AӾǬ�A��=0�)�W,Ϫ����=�]���-_P2jЙ<�^��U]ޑp� ��#j�Y�JԭQJ�w����1@oM�^ �6n@�$�"�~S�^�G��D3�yi?'+!.�H���E� ���d�v%z�5�Ec��HF��F��4��a��6����A�Ƚ�h�j�i��I͔�!e�#�=��@?v����r�2D�����-�� ��� �r��T���#�І���Jx:�]��q�)g�M��� ���{[P�+?)J6���߀����q�y1#�) +����B�P#�Cۡ�\� 2+ijf����� +�O3T�l�J-e�`�61�}ϡ-�";���0i,��.1�@F��g����_���V�w�c�)�d��b��J8��A4��^2Ԙ$��= +O����c�j��l�(� �cL�V /�a�櫧��-J�22�xn'��Mu�S����J���_ЯR�4»�4 ����X�§�j��~����8~��-�����N�㹮�r?�,+�Uu�7_���}��|=����8,3}�B&e_J?�=-��n��_�2��1 ��ptoɱ��PK <�Q��PK��U'(com/oroinc/text/regex/Substitution.classuPKN�@ �C�BKpV��s��Z )D�읩�f���$��P� B�²���������fc��������)K�Q��E�l8����o�V½�� +��D?�s�����Tw$��}�w��b��h�׌0[z� 9��ƔOV��VLB� +��V Ֆ0)} ���Mԓ2֝�{>l�pJm�n���p��6�I�ߧ��[֒! d0������~�|PK �=t�jPK��U'-com/oroinc/text/regex/Perl5Substitution.class�VmsU~��dC�-} ���i"/��j ��mm-�a�l���n�l�� + +�?p�޾�+�H +2���������dӦ4Eg�̜{��}ι��������<8���8�=�Uz$� + W%|!�K _I�&�z>DhD4���� ��C�H���0O�`����c,��x��[��վF��gq"����$�øA'�`�S�c�q�yጌ��� 3,���q^�EL��YT �P� M��)y �g��i��#E�ɸ��e|���E�ʸ�������o�� +�v���d۷Hɸ�w@�'ԛ��M]T/�1C5s� ���\_yqJ��=��Jl�,��iv���xH2_�����E-��m��9�g��Nr�C����lK731G[tb���cê��� +E��K +m�����S�Ѹ�/�ٿ5���Fl�x�M��@򷣎����� ����!"���$7G�Ů1�q4�,oޚ�E����� P�VVД�̂��ΔjiZ�hyG'��n��������hjpr(=�J h����� h�w)�ꕢ9eeTcJ�uu���ǎ1�6�Ng ����A�F�LXE;��� +˟�]BQ1�s��I�Δ� �Ѳe{[�P κ���h6��e �W��>)�t��7���쐡-h�C�R�y��QE��S������-j�����#+��ݦU$ޜm�jy�H���G�(k�Z]%�pJ��o_/Ub^�� %G@뺕ӕc��u�HqaV�O[����� +ϗ��Y��W�5��B643���y +��r��o<�XЯ���m�2�ͱ*���RKI�Pi��Y�dj������ +�_�$�sO�q�� ���^�1j?~۟B��`{����5�}��X��%��Eπ��sb�;�pX��<��%��%(ӊT¾۸�xY�M��S�k˘�-Q���3���V�B�"�5O��}���3_˾�u���}�&�x�Hˡ;訨e�~�M�T��#t�ުJ�z��[�nA7������S���F���UJ������J��̉�%j8���%��<ԓ]�-"d�+����Ѐ�H��YP,��O�����"`��2�*���K۫ǼA�m���'xE�}tE��'�݀�_���Έ�/����FZ�q:"Ao /M����}o�����vpc�P�?�&xVк��q�h�Q +G6ι��n)�M�HW =UЍ�,U�>���‘�w=B���v�O����p�1v<��e +V��EG��>a\� ���h<�y� +��H���|������*��ayzr8L�v⍐���Yu0_�[��PK_�.�1@ +PK��U'.com/oroinc/text/regex/StringSubstitution.classu��n�@��M�81nҦm +%�R�8m +�[*�*���h�n]WƎ�5ʓ�Чh%�Jx +1�8E����3���������/,`�����ְ�a_��Ṏ"j: +X��YQ����U�[ӱ�u5k�¦2Mϰc��c-<4H����o�M0,��c�5��9�߹�����2��p�1��X��������p����Ӝ�~��(�ǖb(�H�bh��9�,�ė��Y�9Y���" +���Sj���k/����Qx"��� �<�=�'��� +1�y�V=ﮪ���~�G���H�&�#�{>ilL�nҏ�'%��D�'��\yF��⎠���@'Tr2��D���eK1��Ag��+�g��A?�υ#g\�B ���J���s�����2��ԃjlj6�꣞%["?53�mZ�AM ͪ�[��Ǡ�)� @���-A��S����L��վ!���T�=��[�Q[�~@�J�/s�#Ӱ�Gix�jh4�)�r��u[Ɍp�˴��<� PK���G��PK��U'-com/oroinc/text/regex/CharStringPointer.class�T]OA=K��R�R@l�e ���� �<ԥʒ�K� �ߢ/�� ��$���Q���m��7�;sιw�ݻ����9�D)\\D�(��G�DE�*��PBO��$ߦ�I�mo���&7Cqh����8������@~�,lEA&?����Ŧn6��m��yn�FA0_��>Z��r����V��aZ�A�;� � �p�)P(LyW�]�K�0fO��lՙ��e��t6��!�/�,TW����*+/���5v�Ģ�TAb٪�� +�6��&�Cu�:�kl�h��k�r���m����Y�f��t����ef6�]�Y��i1Bb|#�|�5u�8b�l�~�h�h=w�:�\�d�D��j9 �d�A�����L�XnOܭY�E˦�Ԋ;v�6k���_mS��~�k�4�>]��c5�ґ�%�%D��&��]��@�(�h����l�~4Y��&/KQ�hgk�SĴ�)�_�>��Ib/Ѻh�h��"a +I�� 9��,���'$��r?;{�VN|ՠT�J���E_�� �4ٷOs�.'u�N���.M+oFX�=|��S�������{��lG{�Q�]<'{��ry�P�$�E�� �����6E���j>�{R���l;J��>n9����?˄�2�f��,��9r��Ȫ�����|c\�?I폻���PZ)�{��z����W����!�#��2?��"Bd�g�~\���!���դ=v@�;�y���PKH����PK��U'"com/oroinc/text/regex/OpCode.class}�[S�F�WX�|��nlhS. +NRzI��5B�[��&8i�(F!��M�����}i2�L_x��3�N^;�o�/���2l�������={�%�Ͽ{�B� +�.��"(�>B��4B��"�h� +^ԋ�!I�' 8a�0D&�F c�qB�0AH2�,a�p�0E�H�D��١Ύb�2{?��eW���j�}®%�3�O0�p@�e��f���s��������\Aa�Yr��A$r��l����t P�������nt�Vg�m�c�q���4�8���u���� +�Q�C0n�S��{�b|�}�׽�F�} ����j �8y�&ܪ٫ +Ӝ�q���v���v�Z�I��ͼe�S�(�eSt����Dg�B+��B��M�BC�Ds;oTh��-wC��R�BjNI�ЊѺS*X%[,j�D�l#V�Fı��z�Z��F����U-{u�lbL��v�������aZ�n�e��)N]_�`+e�{�`Z*�MZ�\5 �\�n�*���ݽ�B�,Qp�����k���A��;��z]���~��|���� RHhk'��{G�bN��������{m�x��n����%���^k���n�g8S�L���<��h?��B� +���Osm��h�sl+�{��q�{Qa5��rM�����y��!.㞙c)f�La��m�6��$%�]�U�-��H�?�\��H�?�< +7%���J��%O� ���W%�oH��5��;����|nH>ߒ|�.�������)��K>/I��oK��;�g�_K> �#�xU�)���_�oJ~ �X�i�'� |W�w��Ǥ�g����ς��}6>��_�E�e�w������a2�Q.��C�'�����|�m��y�)[ +�\���VZ{�˶�Av���3H/d�S�^0M=�.�~��P����ӵޖ��e�Ύ�,6=���NŁog���x��3ٝ�L�l�}v=��̼���KM��O�L��E�� O������ ��S�;��^0� Z�G������HF�ǽ����/���=V�1ͮ�8!�BV�_�䵚�Vk>a|t�Z�����#�Qc<�<&y������ 8ć�a> ��p���c| ��`��� >�y�� ��Yp�O��7>%�(8ͧ���<��!�������:m1��t1�. +�xT�T��( Q�0���qQ���@�l�;V�����PKP�^�` PK��U'+com/oroinc/text/regex/Perl5Repetition.class���J1���6�Z[����tV�7�B��(t�fH�PRҤdR��r%��|(�$ � $��k��?>Q��$8l���:�3TO�� �e��e���T2����?�zEv�r�yؐ�d$�"��*#R/ �:9�E�(��z�K�UP_3l���z̝�-)��Gs9篜J<ەr�4�c/�C�y�CtP1t��G�f ^D(���{;e�g�: +�j1���P��-��f��uA� Nq������L57��a2��`�I`���g��vɭ�=t"�K{�d��&Z1·��c�S?G�-�h��V��PK���*�PK��U',com/oroinc/text/regex/Perl5MatchResult.class�R�N�@=������^bhUd(Ľ�@y(����H�*R�,�������/��W�Ԃ�V|@?��q(Q�Z���9gǻ����s$1��nf�(��Y<�♊U�1�P}XB^ˆ��JP��Q 74L�$a\�Lk��0�I +e��0C�s���c `H�S� sjc��d[��׭-�~}1*VR��)�"�2�F�����y=+�%�w�2�;��%���E����VW[?.e5���>�8�W�C׮y��ŷ<��������7��(K�m���]����7\��믅A�`sw���`��;W2�������Դ��ȁ��v9;��V��X����:oY�zb�����y�j�A!�lZ��QgQ�_��fm�;�J�⨈�q�.�G�F�ֈ�9\�1D����HBN �CCř8�(*�N�����iG�ϐ�.�T�!w�/��ɑ���4x�� +���1c���nj 1r��:Mn\ߦF�7K�k2��/)(��rl���1c�ԋ�#���g�ˢn�b�D7h���yv�� ;�7���Y�Y�koT���+�֏�.�����v�s��l�ǯ�H�ҲO��u�������䰈۝kH�א<��>�)��?PKݣc.d�PK��U'"com/oroinc/text/PatternCache.class���J�@�g��H���u�ڃ݃�z +��B���f�[��e���y�|(qB�Xp;̟�������B����1 b8��A8M\ +�%>#W�s>sV�|2J�Yqc�Ԃ;*��S��9�z��z5����^b�ơvsT[�wo +Ak'���05��ą"/ j>A�D㲭'ffk�JU�eu +�}�kҽ0�ǹC�h슲ʪF�� .���� ���׿�ݜ\3Y��b��% �ﱑ�0 ��u"�?t��>�| +%n)'�jX��-� �|�਌^��?��/PKU�gPK��U'%com/oroinc/text/PatternCacheLRU.class��MK�@�g���ئ�͡~��T��SE��R�A =�qѕ4[֭�oy +X����YIі^��w���wfv��?>��cس�eCۆv,9�倥ŀ��%�������e���X~O�����b +)x��MU(���7T)&�H��0��Rℤ���7_|��Ag�'�Q��ƂX�ҙ޳}g��ܜo�?|BY<��#� +�T�WQV1�bTŘ�q�*�x��G4�pT���MP�+�c��p\#�4���f4���h؋d3�HIHZ�2ק�2��㢎�(��M�8��.鸋A%��x Ň8�c��I�����=���4�h2Ub�L���� +7l�T� ߳�j>0N3�e�]4\ϵ�X�-�(rsA�w�}�����Uc���𜢻X�l��e������ �ϧv�΄C\)����S/����z5�n-��S� �����B�����{�Z��_gP�nE0�-�Β����$��.L�'g���B�49à +����[d8pG8³̭�1��Bh�r�%g��V�W��<��DN�^������fh)�&���g�9[P)ڄ��b�<�^���14͚�h���ʐ-������k5�T�&�q��_0�h�1� ���nϻޢ��:x�e =���3�;�uw���%é��5���N3��R˪���?Fh��Z��m� )lgom�T��7C�/���>�����d�$�ݟh�T��hh�[�� +䏖� �q�l9�#DU��1@���N��Ko�%�YC[�o +��ra@�,F�F�=�2�8�h�+��_�) ei���'��%H{�g�Q�/�Q�-|��JP�Lq����RD���Lt���S�Ք�Y� Mgz<�������gڣhͬc{������u����ٷ.B{\z�� $������&Wt��]DQM�t= ot�\�ᘮ- C1˵PK�kқ>�PK +��U'com/oroinc/util/PK��U'com/oroinc/util/Cache.classm��N1ƿYV0����WP8`��&{�,)-Y�F}4>�El9x@z�o��o2��9|}��nz�0&t&�'��d��7V��Z=�6�����E�?�i�E��U�!/}-�A��>� �6���]�.���K��V�^Y�F���F��؄r]ϭl�¥�k>��o�o�qZ��Xu���?~|�a�ho>%#2���+\Ą0B~��x������ǘ�� PK�PH��EPK��U'com/oroinc/util/CacheLRU.class�S[Oa=�-]�,w�`�X� m������S��X\vI�x�_�h�WH($F�O<�O��̶`�D��̙��93_��~|:DIL+��ྂ1*$DTȈ� ���<�f6-l.���h�ZclZ9�Ȧ��K*���igsYC7�h����~F�p]��ۜ� + +C����0�hW5���&ѩa + ���9 ��iv���c�Hۆ���,����;%a���3�v���� +[��J�3�e1��y��h�17'8�:��xs�]�X�4ŚgQV�4-��4�H)Y�,;=e�/{Ƣ-(_3㚆=g�-N���-�M1a��-/_�Œ鮦ݼk9f�aR8"o���㎗�"�P6�,� +�ͮ��;�w����%��>� �f`2�ɉMZ2�ZlI��:�Uf�x�P���Fyi#��Ū`��?�;~8 �M.!����T�i�dOOyK*\+�y�ۣ�\�re�YB2ߩ��r}?�� +���&�C�$Bt���=@H���~V���j`dM�cdԘ��ɼ�%‡~~����L�HbyE�k:@E�@�Q��%i�?&%��+�a�hj���X&�վbkf�zkU~���˹���d�hJI*�q$�RIf�8U����Q�"�_�Փ{�>@%��i�o����*�~�� +�ǭ��#�%�u0��-��%�SD��,qa��n�����r�ʟ�ڀ��/�_Q��6��v���C�>�湰� Ky��uO_��;��q����]�PK���C�1PK��U'"com/oroinc/util/GenericCache.class�SKOQ�.:e:Ŷ�(�P +R��(�`-JR� H�.��p��N���g�r�&<�ĕ �?A8wf ��>�w���3g~��v�n�q@F�mwt���@�C� D�2�!m@G����d��l#�y��R悉+�*s���M�;`b9 ���^E\d�䆦�sC�e�� +Oڅ��X5�I�)��Y߾e�rS�0� �6w �旅����bllJ)��ґ��(� �!Qr���o�� +:'��''�Tf�������9����Je�!�\8�&���Ĩ�``TY����Sž��%��ۂ��+���Y^�ꂲ�n�f�Ii��k�*��Rpk�t� �4i��j�$Z�ԑ!^�>�[�RE�>�ڬ%|a�l��x 1��rKz��,K)���/v�������(�� {B��Ɇm3d��H�0MQܖ�����1t4����b����rChDE��BO+Mf7�1��4�-�B�#ԏ��_i4�����%D�Rl �c�=����}�s�=;H�ߡ� ���6��}h��6��f?���Ғ���L�>��7��OY�G�Eq��]�{9��жѾŶ|A)�y�Z�� +�E�1N��T�h%���o��ӡ;����'���]I�p���M-@2���]?PKRd�:y$PK��U''com/oroinc/util/GenericCacheEntry.classeP�N1���ʺ�7���ސD�4^$\I)�kK�B���@L<�>���z�&��7������O��I������*�";1�1���4�!R��}>b(���*��(wC�k���ֵ��q�F\/HG���s�h�a�N�+���Q���ח3�� ����>����#com/oroinc/text/regex/Pattern.classPK��U')#3{'#com/oroinc/text/regex/MatchResult.classPK��U'�+2��K5zcom/oroinc/text/regex/MalformedPatternException.classPK��U'I���;+(�com/oroinc/text/regex/Perl5Matcher.classPK��U'IS:�>*�/com/oroinc/text/regex/PatternMatcher.classPK��U'R�� P1com/oroinc/text/regex/Util.classPK��U'-���:)�5com/oroinc/text/regex/Perl5Compiler.classPK��U'��G��+�Pcom/oroinc/text/regex/PatternCompiler.classPK��U'�H�H�2 /�Qcom/oroinc/text/regex/PatternMatcherInput.classPK��U'Ĉp�{(.Vcom/oroinc/text/regex/Perl5Pattern.classPK��U' <�Q��,�Xcom/oroinc/text/regex/Perl5StreamInput.classPK��U' �=t�j(�]com/oroinc/text/regex/Substitution.classPK��U'_�.�1@ +-_com/oroinc/text/regex/Perl5Substitution.classPK��U'���G��.�dcom/oroinc/text/regex/StringSubstitution.classPK��U'H����-�fcom/oroinc/text/regex/CharStringPointer.classPK��U'P�^�` "1jcom/oroinc/text/regex/OpCode.classPK��U'���*�+Eocom/oroinc/text/regex/Perl5Repetition.classPK��U'ݣc.d�,�pcom/oroinc/text/regex/Perl5MatchResult.classPK��U'U�g"�scom/oroinc/text/PatternCache.classPK��U'��`�T�%�tcom/oroinc/text/PatternCacheLRU.classPK��U'�kқ>�)�vcom/oroinc/text/GenericPatternCache.classPK + +��U'(zcom/oroinc/util/PK��U'�PH��EVzcom/oroinc/util/Cache.classPK��U'���C�1{{com/oroinc/util/CacheLRU.classPK��U'Rd�:y$"�~com/oroinc/util/GenericCache.classPK��U'R5m� �'z�com/oroinc/util/GenericCacheEntry.classPK$$� � \ No newline at end of file Index: openacs-4/packages/cms/java/xmlparserv2.jar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/java/xmlparserv2.jar,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/java/xmlparserv2.jar 20 Apr 2001 20:51:09 -0000 1.1 @@ -0,0 +1,15542 @@ +PK +� �(�*[? +� +�META-INF/MANIFEST.MFManifest-Version: 1.0 + +Name: ./org/w3c/dom/Attr.class +Digest-Algorithms: SHA MD5 +SHA-Digest: wqWGJhsZH+lsOgcy1MM6eOn9p/A= +MD5-Digest: V8olE0ZBymBDrsJDyPOhlA== + +Name: ./org/w3c/dom/CDATASection.class +Digest-Algorithms: SHA MD5 +SHA-Digest: G02sRfzXRndbewiD4G6FhWFNYlo= +MD5-Digest: DLiTCytakhG/0ckMgnqUIA== + +Name: ./org/w3c/dom/CharacterData.class +Digest-Algorithms: SHA MD5 +SHA-Digest: TnYfaDvIczkgcL60es8UtNSeBoI= +MD5-Digest: ngQgdk6mHxwT2DC6shJHLA== + +Name: ./org/w3c/dom/Comment.class +Digest-Algorithms: SHA MD5 +SHA-Digest: TCtMt2E9izcMgNUjrjBk0SOHTMw= +MD5-Digest: Pv49E0DPZDn4s9XL+EFNag== + +Name: ./org/w3c/dom/Document.class +Digest-Algorithms: SHA MD5 +SHA-Digest: rD2T/EdUDV7ZMewwlz7kE/xUpkc= +MD5-Digest: ejzrXHX27oaRLI0lBxCBWQ== + +Name: ./org/w3c/dom/DocumentFragment.class +Digest-Algorithms: SHA MD5 +SHA-Digest: AXARtXGv5OvpSh012zds1N402Hk= +MD5-Digest: 4zXiY/lsKt9sZoFMpL6JIA== + +Name: ./org/w3c/dom/DocumentType.class +Digest-Algorithms: SHA MD5 +SHA-Digest: RYTbt/S7Cl8ycNN7C3ew6Nn1098= +MD5-Digest: xYXpCdLzNtlIA+IcIq8k3g== + +Name: ./org/w3c/dom/DOMException.class +Digest-Algorithms: SHA MD5 +SHA-Digest: kjorUbALjtGCjFFrzKOprR1vWzY= +MD5-Digest: WakVt0OPYY55dbAgARE4XQ== + +Name: ./org/w3c/dom/DOMImplementation.class +Digest-Algorithms: SHA MD5 +SHA-Digest: jqD4A5OuitdHWzokhojgZEaubtE= +MD5-Digest: ZLMkXBnsntHi4n0TVb2YtQ== + +Name: ./org/w3c/dom/Element.class +Digest-Algorithms: SHA MD5 +SHA-Digest: VOSOttu1evotR1KvOJ6wGEuli6Q= +MD5-Digest: ovXjR8enTz0kxl4pRc10CQ== + +Name: ./org/w3c/dom/Entity.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 1UkJDzqYUNj27ckRtFGS31w0o78= +MD5-Digest: cx/28J7uWGTrHcmfpxZcOA== + +Name: ./org/w3c/dom/EntityReference.class +Digest-Algorithms: SHA MD5 +SHA-Digest: o0DVdj7Sbe/yLPDkTR5QJwr1URI= +MD5-Digest: 9LBpl1BKQur23rQYPe1rdA== + +Name: ./org/w3c/dom/html/HTMLAnchorElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: xqbXDC/NKAymFzkFCtCClCEBavo= +MD5-Digest: LFXZSpi64JKUCaySUi4T4A== + +Name: ./org/w3c/dom/html/HTMLAppletElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 7PuroP+CUUOAuuxw9SEmCzGTelg= +MD5-Digest: y3vB94pLE1oQb/P3xkErfg== + +Name: ./org/w3c/dom/html/HTMLAreaElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: CCx34tDDdRryBhKzhi38tTQSnV4= +MD5-Digest: O7BVU62z3Mpm0QL/e39bRg== + +Name: ./org/w3c/dom/html/HTMLBaseElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: CTXlxVl0hrkc2gA200b+mX4HTX0= +MD5-Digest: ZT1Ydli3t0cbJ1wCIHkhJQ== + +Name: ./org/w3c/dom/html/HTMLBaseFontElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: ODpEOxFNqYJ+inwpXEJ74d21J1g= +MD5-Digest: qSMeM23eXgZM9wHvd7CY5g== + +Name: ./org/w3c/dom/html/HTMLBlockquoteElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: b9o99p+aq+uBiziEm0CHO5UMLH4= +MD5-Digest: pwg/g+2kQI0L5ndQ0Xifeg== + +Name: ./org/w3c/dom/html/HTMLBodyElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Q9P6Cz2ANi54wRNt4Y4fWBYYyQw= +MD5-Digest: Bujeknu6zRct2G2iOUpy2w== + +Name: ./org/w3c/dom/html/HTMLBRElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: eV95VQ0AkGFPt1P98a23xOGI+EQ= +MD5-Digest: KfyUqoYwqDgqnr0Sc7d/ew== + +Name: ./org/w3c/dom/html/HTMLButtonElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: wUglCJRZEsJbrqx81kbQsCgfiNk= +MD5-Digest: AVLFmsKTiX/U/3AADeMvQg== + +Name: ./org/w3c/dom/html/HTMLCollection.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 2aHiY3ABcmopIzop3S42giw68SI= +MD5-Digest: jHn/qQDUzoqxwJJmxnkEVg== + +Name: ./org/w3c/dom/html/HTMLDirectoryElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: s9Iwm8sf1doAKN2T59i6MwZ0MbU= +MD5-Digest: Cx+zSMVIi3SRYsHTNAEa1g== + +Name: ./org/w3c/dom/html/HTMLDivElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: kdnTfcau2zqCpINozTof8quSHHs= +MD5-Digest: O7oMIxYpsojHyZCRFjtVmQ== + +Name: ./org/w3c/dom/html/HTMLDListElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: UK9FLmf5yGoBPqWAIQBNOcKa/Ew= +MD5-Digest: tJii3Wng4zBIK25dUeBlVA== + +Name: ./org/w3c/dom/html/HTMLDocument.class +Digest-Algorithms: SHA MD5 +SHA-Digest: /8HEPjwB2QzxSsne2QpmPPso27Y= +MD5-Digest: i1b/UOCg2ubYDdO/dGxc0A== + +Name: ./org/w3c/dom/html/HTMLElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Pf2hiA8PdO4y5MAo0j1vFVniksY= +MD5-Digest: W9J7lShSvSgzoko0Nl7awQ== + +Name: ./org/w3c/dom/html/HTMLFieldSetElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: kB+SKosMWNEFUK/SDjc845FRZOc= +MD5-Digest: U1435gfUD0IoSQ6APryNAA== + +Name: ./org/w3c/dom/html/HTMLFontElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: qB0bpekhtZVhfmB70bJSFGtIMfg= +MD5-Digest: ib1yXOwWuynYNc1NqkPm3w== + +Name: ./org/w3c/dom/html/HTMLFormElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: eYHPIDIqRRq595WqzDZDgA9+jCM= +MD5-Digest: Ylv2cLirVrtvR6koGwzuWg== + +Name: ./org/w3c/dom/html/HTMLFrameElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: iNt4lZ0XFUN/6fc3MJLE8FV+qJ0= +MD5-Digest: 7UfR49f7Z52764FLEfeKJQ== + +Name: ./org/w3c/dom/html/HTMLFrameSetElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: I1SPWFbjwLaqnAazNshCH1WxXQE= +MD5-Digest: vlCxTHPvNLo/ceGrzMpn5A== + +Name: ./org/w3c/dom/html/HTMLHeadElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Bp8VrDjkoiCrv1/V+tTtfbF0L1E= +MD5-Digest: 0gfnvr7cSNpP62M6xySRUA== + +Name: ./org/w3c/dom/html/HTMLHeadingElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: dUxpgPo6VtJKEmH6iduHhQpc8gg= +MD5-Digest: gX/pZZf1QQRggbLJtnLBaA== + +Name: ./org/w3c/dom/html/HTMLHRElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: JEgpNr4Vme/j4qemBES72uDNVhM= +MD5-Digest: 6ncOwjk5w28BPY9mwnt8Mg== + +Name: ./org/w3c/dom/html/HTMLHtmlElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: iFhx5pIp0t72lvNUXZ4zf1BlStQ= +MD5-Digest: DbSQfIjI7H3/5KyMB7ztzw== + +Name: ./org/w3c/dom/html/HTMLIFrameElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: KXFZsdewaC7YxUtlL375aRXqAA4= +MD5-Digest: sdk0oOUkRMwFqncXSB0xlg== + +Name: ./org/w3c/dom/html/HTMLImageElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: o8HM99RMTXormst8y2GOGJ0o+cg= +MD5-Digest: rz0AxawiIHUxSCm3YDUjHQ== + +Name: ./org/w3c/dom/html/HTMLInputElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: trQwMlUT6wco3rEy8E4ziE9EXAg= +MD5-Digest: 9M69k+m6qcfSMgFzSDyN1w== + +Name: ./org/w3c/dom/html/HTMLIsIndexElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: eEuJEn7+3yHkMxEsQxox+DfYqwc= +MD5-Digest: VZEBs3iLNMnHQXmt5nd5Ww== + +Name: ./org/w3c/dom/html/HTMLLabelElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 94Evy83PbzJ6Ew0IF/BQwFwWc4w= +MD5-Digest: ICpgyjJzbTKCtjyAmqHJpQ== + +Name: ./org/w3c/dom/html/HTMLLegendElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: nmeuaQAMZQA3InONybUHCXH+Z4I= +MD5-Digest: k7bZgQtLn2k/OEQVvzczOA== + +Name: ./org/w3c/dom/html/HTMLLIElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: tnnqLco6huBuXj0YhRPOSAbyOvQ= +MD5-Digest: nkuXdN1E+uw+4vFuc9AdnQ== + +Name: ./org/w3c/dom/html/HTMLLinkElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: WfmPHkkWXVCaqBcWbpWN5c1KILY= +MD5-Digest: dpiLFax6+pvrKNd4E7g6OQ== + +Name: ./org/w3c/dom/html/HTMLMapElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: DSiXxJyMd0F9SawKfZwh/zjtJMg= +MD5-Digest: jyw1XFJboOcCGnwrnQMYWQ== + +Name: ./org/w3c/dom/html/HTMLMenuElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: /jqy9iuKvPulozB/IwUz6gMG0nc= +MD5-Digest: YtSLud7AALhQ+5eHH4Qpyg== + +Name: ./org/w3c/dom/html/HTMLMetaElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: yrzfNZ3ShGpBlDGkA0P4JCYhThI= +MD5-Digest: LhVE080ZTGMgk5N9rR4lUw== + +Name: ./org/w3c/dom/html/HTMLModElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: LklhUVtKTJZgT4mcBi2xeZa4SZc= +MD5-Digest: fFqKDgOTB9gf964zis+UEQ== + +Name: ./org/w3c/dom/html/HTMLObjectElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Ycdje3siENgLLOereoglew7KSZw= +MD5-Digest: WLo7F6AiKsUrv91pA3IJ1Q== + +Name: ./org/w3c/dom/html/HTMLOListElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: lMM7YPNxWwYSvq1xz+89wNIIC0M= +MD5-Digest: d6096fzOCBcgFuDnMWTk2w== + +Name: ./org/w3c/dom/html/HTMLOptGroupElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: IgZO4Otgn1c4nQzJao/FZaJtnDE= +MD5-Digest: 3rsM29fb30up5KmtnnXUqg== + +Name: ./org/w3c/dom/html/HTMLOptionElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 4feE1XXwTUge/sqqrsimWbV+tM0= +MD5-Digest: xC+2VnFg07OcMLK0pPHTew== + +Name: ./org/w3c/dom/html/HTMLParagraphElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: CaCxX74ExQd/TNXuT9kSxukXHpQ= +MD5-Digest: WzKbLl0xMU2wLW51fOclAA== + +Name: ./org/w3c/dom/html/HTMLParamElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: OmN5VOtb1t2dghx7svI67+DbahQ= +MD5-Digest: +D8AzdgkgywFoh3vsBnyHQ== + +Name: ./org/w3c/dom/html/HTMLPreElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: +ZffgBNbf+QEH4Xw2wJgMOPXg/k= +MD5-Digest: YzH6Z+PHDyVrd5a8eLatsg== + +Name: ./org/w3c/dom/html/HTMLQuoteElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Q5DUxzzL1smKoHgdrdMLe/rXuPs= +MD5-Digest: J0QE1f+rIZFPRMiMzar5CA== + +Name: ./org/w3c/dom/html/HTMLScriptElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: cizMFIAVVkqHelsUogOnP4hl4LA= +MD5-Digest: KRNQHG0yq5f5HdIecnLb6Q== + +Name: ./org/w3c/dom/html/HTMLSelectElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: vvQTqixdeIJfMzjFzP6+Aw7+kVs= +MD5-Digest: c7SdfLrBMtUaW2bVve3qCg== + +Name: ./org/w3c/dom/html/HTMLStyleElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: aZvKO1qOusD9iFVetCGlmaeWcqE= +MD5-Digest: jhS4AGoJo43o4iHlPa9f7A== + +Name: ./org/w3c/dom/html/HTMLTableCaptionElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Q9vwLsWDH2YBd3v8+1cufUIItdg= +MD5-Digest: ezlpI09bxOBJX/tabOYllA== + +Name: ./org/w3c/dom/html/HTMLTableCellElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: gum++TEwvBNxWu3uW8WYWxRk+to= +MD5-Digest: s3OYqjHOcUvQM+memjdeaQ== + +Name: ./org/w3c/dom/html/HTMLTableColElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 8CqhRo7MrkwHTU6xxp4EkCYfoK0= +MD5-Digest: VzQGYv/ZtGuH1B1v8VPboQ== + +Name: ./org/w3c/dom/html/HTMLTableElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: xr9wJARmZbs5oDHMqPYMXRw2PxQ= +MD5-Digest: HVFmkmPaJRlOkH32HUvk4Q== + +Name: ./org/w3c/dom/html/HTMLTableRowElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: dlFMm/e/yq2OBCzdRizK2Hu91ws= +MD5-Digest: zP1s21TmqTBq89KmZbPW7Q== + +Name: ./org/w3c/dom/html/HTMLTableSectionElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: mgDyzpuLaevGEet+tsB8ot4hMtU= +MD5-Digest: 1EOkp1LeFUpvIIPtWdys1Q== + +Name: ./org/w3c/dom/html/HTMLTextAreaElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: pkUzwBfX+GqgrB4PW81Jhp46R94= +MD5-Digest: kM7So2jtpMOjRxDT3FOT4A== + +Name: ./org/w3c/dom/html/HTMLTitleElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: /nh8rksUPsghd3240yeMU0wrqyQ= +MD5-Digest: 6hLUigZ95L9q9kSBKzhNUg== + +Name: ./org/w3c/dom/html/HTMLUListElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: xu62lbsKfOaFuaK4hkmwikb/vsM= +MD5-Digest: sGTsk6HEhVUIR/xKGxgQHA== + +Name: ./org/w3c/dom/NamedNodeMap.class +Digest-Algorithms: SHA MD5 +SHA-Digest: s3Yt/SEUncwMfJZoY+mUVEWb7bY= +MD5-Digest: NHmhGHGbZR0mauJxeuS0DA== + +Name: ./org/w3c/dom/Node.class +Digest-Algorithms: SHA MD5 +SHA-Digest: www9ReWqTKFMtrNvM6TWnjYEfuQ= +MD5-Digest: uXoqpeb50wSLZDYIsKkogA== + +Name: ./org/w3c/dom/NodeList.class +Digest-Algorithms: SHA MD5 +SHA-Digest: krPyzGtsafcFtVRcDZ/HHd7TdoM= +MD5-Digest: vYNO3AuNtG/zQsBrlKCn5Q== + +Name: ./org/w3c/dom/Notation.class +Digest-Algorithms: SHA MD5 +SHA-Digest: tlfjY0nDFSNLIqwaKp4yFUk8ABk= +MD5-Digest: VPznnq7MC3r2x0AuP3f/og== + +Name: ./org/w3c/dom/ProcessingInstruction.class +Digest-Algorithms: SHA MD5 +SHA-Digest: XKxjPcVRUX1uICb4rYAR2/STpHg= +MD5-Digest: MBFStCPGyzSSUvXuFjyLEA== + +Name: ./org/w3c/dom/Text.class +Digest-Algorithms: SHA MD5 +SHA-Digest: dig+XYZJpe4b1Xi86VEhh6aoLeU= +MD5-Digest: GGdt2rTx5okxIhxF7DPRyA== + +Name: ./org/xml/sax/AttributeList.class +Digest-Algorithms: SHA MD5 +SHA-Digest: VTjorI/icrdQ5PsgtJVnlhxFNNk= +MD5-Digest: t1CMkhcVEqcr6rleFLN5Qg== + +Name: ./org/xml/sax/DocumentHandler.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 5TVUl8xNHXulwpz4/fGw05683f0= +MD5-Digest: pHXl0BH8PObGQN9ns+UZcg== + +Name: ./org/xml/sax/DTDHandler.class +Digest-Algorithms: SHA MD5 +SHA-Digest: GWjzruT559oT2RHsNCuKOmYQuWQ= +MD5-Digest: swXbpiaYkw/ZGvRXOMjejg== + +Name: ./org/xml/sax/EntityResolver.class +Digest-Algorithms: SHA MD5 +SHA-Digest: mBeWPXnRI6x6KuAbJoA599ntKIA= +MD5-Digest: eXbhhSVp7LlUdutE7F+OpQ== + +Name: ./org/xml/sax/ErrorHandler.class +Digest-Algorithms: SHA MD5 +SHA-Digest: tPk3gSgwsURPhecYfs6aAzoLuEo= +MD5-Digest: 1choYWAwYMpbhSck3mJdPQ== + +Name: ./org/xml/sax/HandlerBase.class +Digest-Algorithms: SHA MD5 +SHA-Digest: eFsCyyK9aapXMitEVwnNEuNFmyA= +MD5-Digest: knk/XcgAeR3V0LDwMA5tPA== + +Name: ./org/xml/sax/helpers/AttributeListImpl.class +Digest-Algorithms: SHA MD5 +SHA-Digest: XXnVR4w1aa4QqYYpUkXTvaNeeOA= +MD5-Digest: hF3ylTVjo83NexCOCeDWDw== + +Name: ./org/xml/sax/helpers/LocatorImpl.class +Digest-Algorithms: SHA MD5 +SHA-Digest: mpUybhf5s01bod06L2SxqyAtQy8= +MD5-Digest: TJbc8dBK4SwZW23ye9Q/9w== + +Name: ./org/xml/sax/helpers/ParserFactory.class +Digest-Algorithms: SHA MD5 +SHA-Digest: ZbJAzq3c1VahPtTycZrZixgcce4= +MD5-Digest: cyVsT/nsOyRRWfV3EuUY0w== + +Name: ./org/xml/sax/InputSource.class +Digest-Algorithms: SHA MD5 +SHA-Digest: NiuEqE57jxmDsmSvy0vAXgbTI8U= +MD5-Digest: 2mOa5F+7DkrSOl6GcjmZQA== + +Name: ./org/xml/sax/Locator.class +Digest-Algorithms: SHA MD5 +SHA-Digest: sSkv41dqfnN5FSPt0QFx5DgBP70= +MD5-Digest: ZjRfcMZ8pPohhxsunOUNLw== + +Name: ./org/xml/sax/Parser.class +Digest-Algorithms: SHA MD5 +SHA-Digest: FrpIqj1PNrVQe/dOBa0ryvv0n/I= +MD5-Digest: D/d7io3djfu3NhW2t9JTOA== + +Name: ./org/xml/sax/SAXException.class +Digest-Algorithms: SHA MD5 +SHA-Digest: DWunYsx4tGcc0bFR7FRIWo6GLFk= +MD5-Digest: ccBZCmk2P026qziPSY4Vbg== + +Name: ./org/xml/sax/SAXParseException.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 8EWxAbPPqU4nuqFjPE/XLs1lWrI= +MD5-Digest: skZU+dY5Wg0Nqu2Rp08TlA== + +Name: ./oracle/xml/parser/v2/AdditiveExpr.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Y4ePMDasv6CKhC6gVJj1ZusNTMA= +MD5-Digest: Hqhxz2mgsA183uNT+RBpnw== + +Name: ./oracle/xml/parser/v2/AndExpr.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 3pH6FggIVWESCJztGyQhrIOm3EI= +MD5-Digest: tzwNx/9eQRe60rgifRDBfA== + +Name: ./oracle/xml/parser/v2/AttrDecl.class +Digest-Algorithms: SHA MD5 +SHA-Digest: HD4YMVwcKl1NHScjyy0QkLeBUDs= +MD5-Digest: +Hs0wXZl/dYpPzzAXjeHog== + +Name: ./oracle/xml/parser/v2/Axis.class +Digest-Algorithms: SHA MD5 +SHA-Digest: l/8kHxZlZeLFcwCRcNDzPeCVM8o= +MD5-Digest: ykgy0fDFjAToB8eFL6Yr7Q== + +Name: ./oracle/xml/parser/v2/CMChoice.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Kga0hFCUMEKHfA5zEuD8U2VeH6s= +MD5-Digest: 8J+6QLxlLCSvuhqEOK4/iw== + +Name: ./oracle/xml/parser/v2/CMLeaf.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Ts9pVXBPgXSRCMlY0M0hQ9s/o3I= +MD5-Digest: SyiEIi81A1iZOU1tRbe07Q== + +Name: ./oracle/xml/parser/v2/CMNode.class +Digest-Algorithms: SHA MD5 +SHA-Digest: mX0dlZTN0BKg2fV2RYDYFtZ9fUg= +MD5-Digest: 84sPqtkGt6gTzRmXLEf53g== + +Name: ./oracle/xml/parser/v2/CMNodeSeq.class +Digest-Algorithms: SHA MD5 +SHA-Digest: +P30u3Edq7M13FnJWmLGzsJragw= +MD5-Digest: mom/JQPkyuNrsDkb0XPrSQ== + +Name: ./oracle/xml/parser/v2/CMPlus.class +Digest-Algorithms: SHA MD5 +SHA-Digest: +2nlbHrqIyQme+WhJyBfHaBQqzs= +MD5-Digest: 2J9sKZFy5pZcJsR9VzNEkA== + +Name: ./oracle/xml/parser/v2/CMQuestionMark.class +Digest-Algorithms: SHA MD5 +SHA-Digest: bgKUTKJ4K8BmggSY42whjEWPocU= +MD5-Digest: IVMckDvBr715ZeC0GW3u9A== + +Name: ./oracle/xml/parser/v2/CMStar.class +Digest-Algorithms: SHA MD5 +SHA-Digest: +CNftACymPaYYaRGcNE5pbMYAU8= +MD5-Digest: tstmyQiCW0vUz7y9IrpGhA== + +Name: ./oracle/xml/parser/v2/CharData.class +Digest-Algorithms: SHA MD5 +SHA-Digest: GYXch/H8zXkrMizWz6ThG0gIEQA= +MD5-Digest: Kp4ST4n0kfvhQ6d6qr3adw== + +Name: ./oracle/xml/parser/v2/ContentModel.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 29tfwTZmby5U2ci2t1En7ufiQOM= +MD5-Digest: dLxXUttPS1gK0Un8VMi50A== + +Name: ./oracle/xml/parser/v2/DOMParser.class +Digest-Algorithms: SHA MD5 +SHA-Digest: j4Qg/XkVRFwz/dKu83xDWq8wPvA= +MD5-Digest: PASdADU929PtZtJmK7kZ7w== + +Name: ./oracle/xml/parser/v2/DTD.class +Digest-Algorithms: SHA MD5 +SHA-Digest: LnS04Zod3ccfUP6t9Trr4AK2Oxk= +MD5-Digest: HlLg7N5M/iLJu2N6TTxRzQ== + +Name: ./oracle/xml/parser/v2/DTDDecl.class +Digest-Algorithms: SHA MD5 +SHA-Digest: DQQLzb2kffKvH23klXzu8N73Qho= +MD5-Digest: fd5NQ8ecBvsVZRzWGJvEnA== + +Name: ./oracle/xml/parser/v2/DefaultXMLDocumentHandler.class +Digest-Algorithms: SHA MD5 +SHA-Digest: K/tFC6yr4i4o7XVicaimmegB5uE= +MD5-Digest: mtRgY3zBL3yNvtyuwcc+MA== + +Name: ./oracle/xml/parser/v2/DocumentBuilder.class +Digest-Algorithms: SHA MD5 +SHA-Digest: kB0puqm569UUyMdbWvuPzLSO7S8= +MD5-Digest: 4o6vEO5guFLyjTYL7BJYsw== + +Name: ./oracle/xml/parser/v2/ElementDecl.class +Digest-Algorithms: SHA MD5 +SHA-Digest: HeMupPYYBUh44j/QfhC2O723Fwg= +MD5-Digest: JScP/NWd5FpMfIK/ApX7qg== + +Name: ./oracle/xml/parser/v2/Entry.class +Digest-Algorithms: SHA MD5 +SHA-Digest: ZHzThxtOwkLW/YxQgbTH/TJAUQA= +MD5-Digest: BZadZyqKHQvekq8VNGQ0ag== + +Name: ./oracle/xml/parser/v2/EqualExpr.class +Digest-Algorithms: SHA MD5 +SHA-Digest: kiRknS1DQIswcqx7x8R/JYLAMUo= +MD5-Digest: 6K7wFzIHHMTdMxHNx3OBZQ== + +Name: ./oracle/xml/parser/v2/FastVector.class +Digest-Algorithms: SHA MD5 +SHA-Digest: fcjOb87r/OX9sI/vHNOM/fm/NzE= +MD5-Digest: nY+1hq4wFvBRpZxmP/koXQ== + +Name: ./oracle/xml/parser/v2/FilterExpr.class +Digest-Algorithms: SHA MD5 +SHA-Digest: QEJuDx8fNOOz3ELgngbvpxn5RWM= +MD5-Digest: 8nrmi1R5Vmt1wThF9m0pjg== + +Name: ./oracle/xml/parser/v2/FromAncestor.class +Digest-Algorithms: SHA MD5 +SHA-Digest: RkA6z1Lge4h+0gq2NIaSByeOGLY= +MD5-Digest: kyYDgETXtZQCH+rjwLEjZQ== + +Name: ./oracle/xml/parser/v2/FromAncestorOrSelf.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 1bk7NKl4MgLAYxMYOCxjYQP+tKM= +MD5-Digest: /8yRDGhrA6hx5C9YydKUHA== + +Name: ./oracle/xml/parser/v2/FromAttributes.class +Digest-Algorithms: SHA MD5 +SHA-Digest: mURBy6EtMXebG/VSyfRFGNakbyU= +MD5-Digest: MKLqkvPW4jkYveO49L9+CQ== + +Name: ./oracle/xml/parser/v2/FromChildren.class +Digest-Algorithms: SHA MD5 +SHA-Digest: jhqH05GeCqr6PeqpoepBGFob4+4= +MD5-Digest: ucMftlLxq18ZXNPA4WMr4Q== + +Name: ./oracle/xml/parser/v2/FromDescAncestor.class +Digest-Algorithms: SHA MD5 +SHA-Digest: KnbQTzwS3GLucjNOE6C4WdwwRcY= +MD5-Digest: Hjet+y7bFh8FI7AiVWAfvw== + +Name: ./oracle/xml/parser/v2/FromDescAncestorOrSelf.class +Digest-Algorithms: SHA MD5 +SHA-Digest: cQit1dKeUrrWCC3Kg/xi6jOysjg= +MD5-Digest: Prn8lMnw8a5UKySWgOHY6g== + +Name: ./oracle/xml/parser/v2/FromDescFollowing.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Af3khjO5y/2iEuf24dxnNkmXcvg= +MD5-Digest: 3WWEBKT7wPoMe9pFkR2Nzw== + +Name: ./oracle/xml/parser/v2/FromDescFollowingSibling.class +Digest-Algorithms: SHA MD5 +SHA-Digest: AuEss6uJ+LQKOJKKLrrvMSfxbbo= +MD5-Digest: UHmhdmRWDdhzWa9vaAX0Yg== + +Name: ./oracle/xml/parser/v2/FromDescParent.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Xbgks7gGShAMO67gzVe/sc5NQ+4= +MD5-Digest: ytKFExpEls+BDBnFBjIEBg== + +Name: ./oracle/xml/parser/v2/FromDescPreceding.class +Digest-Algorithms: SHA MD5 +SHA-Digest: D6vETYnX7QWXfqTzcjrOGoeMJrI= +MD5-Digest: dlFDuCfqjV35scF6qC5M2Q== + +Name: ./oracle/xml/parser/v2/FromDescPrecedingSibling.class +Digest-Algorithms: SHA MD5 +SHA-Digest: NH4ppqlBX+0hRa/eJgmBYH2SLrw= +MD5-Digest: 6AG7Qjts0d2xNT0f7VwwUw== + +Name: ./oracle/xml/parser/v2/FromDescendantAttributes.class +Digest-Algorithms: SHA MD5 +SHA-Digest: xjAK1QFM7yZwrvL4LAql0nT5RGU= +MD5-Digest: q/DZOD/z+DTT0XkNuO9NBg== + +Name: ./oracle/xml/parser/v2/FromDescendants.class +Digest-Algorithms: SHA MD5 +SHA-Digest: F0YKrBqOrMK4WREgjLTaUjj4K8E= +MD5-Digest: ecnmotIyagKu4t+StAzGCQ== + +Name: ./oracle/xml/parser/v2/FromFollowing.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Pf4hwzQCEaSAh4DpHQ/XlArT5Vg= +MD5-Digest: fjAJpcinqiojz16LmX1WWQ== + +Name: ./oracle/xml/parser/v2/FromFollowingSibling.class +Digest-Algorithms: SHA MD5 +SHA-Digest: C1CzksexSN5I9mkbHEKKKnKD3F4= +MD5-Digest: pqyZYu3LaxeWAJdTVD6N0A== + +Name: ./oracle/xml/parser/v2/FromParent.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 4z2/rPdosYzeZ0N33HMqHGnstb4= +MD5-Digest: puKVWfQCuIEruajd136oMw== + +Name: ./oracle/xml/parser/v2/FromPreceding.class +Digest-Algorithms: SHA MD5 +SHA-Digest: v7gJdOl7mhyWUTgMb0rD6eyOvEI= +MD5-Digest: kFasaq0vBmuN/CfD1H77XQ== + +Name: ./oracle/xml/parser/v2/FromPrecedingSibling.class +Digest-Algorithms: SHA MD5 +SHA-Digest: emwt+6hfMSKsgEAJ6bWsTxKxrT8= +MD5-Digest: kvoOhkqL2Q34P5sifZmoBw== + +Name: ./oracle/xml/parser/v2/FromSelf.class +Digest-Algorithms: SHA MD5 +SHA-Digest: G/kISU9QbwAu+0nLi5W26crfY+4= +MD5-Digest: sYAFj+wEh8ysxNVTmIAxkQ== + +Name: ./oracle/xml/parser/v2/MultiplicativeExpr.class +Digest-Algorithms: SHA MD5 +SHA-Digest: JB2cHE+3v4llzpLNHYMpY/AS6Uk= +MD5-Digest: 96bjyH1RgqPOAKPlOXcByw== + +Name: ./oracle/xml/parser/v2/NSName.class +Digest-Algorithms: SHA MD5 +SHA-Digest: wyw/OjrAX/ljj30hos+a1w2XS+g= +MD5-Digest: CkBsTrDvhxMIEbCjd9k6XQ== + +Name: ./oracle/xml/parser/v2/NSNameImpl.class +Digest-Algorithms: SHA MD5 +SHA-Digest: VNUg3tN3dcA/cZL1cVOdzq4WajY= +MD5-Digest: EBlffhwCHJbfs92KWAc8Ow== + +Name: ./oracle/xml/parser/v2/NSResolver.class +Digest-Algorithms: SHA MD5 +SHA-Digest: AWO3B+0/g8wZJ45Yk/yRyXonkAc= +MD5-Digest: E8EcXankNrnQNfw1QmgsYQ== + +Name: ./oracle/xml/parser/v2/NameCheck.class +Digest-Algorithms: SHA MD5 +SHA-Digest: ekK3qwYVn4bam0M6EfvZbhPQXVQ= +MD5-Digest: 5++4weAFoS9n/Vozju0Vbw== + +Name: ./oracle/xml/parser/v2/NodeFactory.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 1LImrKl3FIeF5b9LDJDXX4CKjAs= +MD5-Digest: W9Rbd3DqWsDESDMmNIanhQ== + +Name: ./oracle/xml/parser/v2/NonValidatingParser.class +Digest-Algorithms: SHA MD5 +SHA-Digest: kkKbQ+uKKdzvMmV6MLTQCTcUhYc= +MD5-Digest: Cb6JwG1SX+186sZOmdROaA== + +Name: ./oracle/xml/parser/v2/ObjectBuilder.class +Digest-Algorithms: SHA MD5 +SHA-Digest: NREmZnpnyxzlya8IpN05imnniNk= +MD5-Digest: lLrB7wmQgrBtIWdXHeo5MA== + +Name: ./oracle/xml/parser/v2/ParserState.class +Digest-Algorithms: SHA MD5 +SHA-Digest: uN6G+A/PmwPVBXdQNmgNZZKcc2M= +MD5-Digest: BHAhuIwuPEnE0otZmrIrAg== + +Name: ./oracle/xml/parser/v2/PathExpr.class +Digest-Algorithms: SHA MD5 +SHA-Digest: VgRm7gNZLnM2YNzupLsOepbmooA= +MD5-Digest: wVvruiiFJo7+CdB6bacsHg== + +Name: ./oracle/xml/parser/v2/Predicate.class +Digest-Algorithms: SHA MD5 +SHA-Digest: vMJ+sCYs3WDf8H2g9iBUpCheppw= +MD5-Digest: e15MKk8g6o3dzjf130ciaA== + +Name: ./oracle/xml/parser/v2/PrintDriver.class +Digest-Algorithms: SHA MD5 +SHA-Digest: C82KO5icBqhMAe01nOp16WbuKMI= +MD5-Digest: bU8DEeyuZCHTRlTn6Ja/TQ== + +Name: ./oracle/xml/parser/v2/RelExpr.class +Digest-Algorithms: SHA MD5 +SHA-Digest: ypQQ26vs0VVNwinjruS44AEThLQ= +MD5-Digest: u61/wht1BFzWrJ6fDVZlqA== + +Name: ./oracle/xml/parser/v2/SAXAttrList.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 3c4Xh/aV9FUYHZ4hUgKGKsgpcIg= +MD5-Digest: WvB6hpqiJs79ybDOZ7GBHw== + +Name: ./oracle/xml/parser/v2/SAXParser.class +Digest-Algorithms: SHA MD5 +SHA-Digest: uZWK/NrqUKzuKDy/R/9G+GUPVQY= +MD5-Digest: GeKwSkRCRCTaU25TX0HNrQ== + +Name: ./oracle/xml/parser/v2/Step.class +Digest-Algorithms: SHA MD5 +SHA-Digest: KQT7PON3nEssxnxyliIQCyWwF3E= +MD5-Digest: M/2xYQ27195LJcrlcnUhZQ== + +Name: ./oracle/xml/parser/v2/StringHashtable.class +Digest-Algorithms: SHA MD5 +SHA-Digest: rTpfIR0rws/IiuiL3z9UrTDkV00= +MD5-Digest: rpu7BE4TQFFMOgdAlgWDVQ== + +Name: ./oracle/xml/parser/v2/UnaryExpr.class +Digest-Algorithms: SHA MD5 +SHA-Digest: sOtyfbov99oSfHmrIe0qFya9054= +MD5-Digest: a7n15he+shrdnQOEpnwfYQ== + +Name: ./oracle/xml/parser/v2/ValidatingParser.class +Digest-Algorithms: SHA MD5 +SHA-Digest: IgBroDxX7dpLJFhwCzrywQ8gwI8= +MD5-Digest: lnCKlJa9ram19fMLrTCx/g== + +Name: ./oracle/xml/parser/v2/WildCard.class +Digest-Algorithms: SHA MD5 +SHA-Digest: mxSFI8xebHSePH6tsvOQLvL2QH0= +MD5-Digest: fQGKKPQNk9d+I5HZ5jHn2g== + +Name: ./oracle/xml/parser/v2/XMLAttr.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 26imBgJRDt2NvS/5cpzuWlUEPNs= +MD5-Digest: WU8ODqgkSwDm3l0W6hjZqw== + +Name: ./oracle/xml/parser/v2/XMLAttrList.class +Digest-Algorithms: SHA MD5 +SHA-Digest: jygBoq9+PO4YHTopKCx2bHXFWpE= +MD5-Digest: TL1emGgdDerCcNPd+SjaWQ== + +Name: ./oracle/xml/parser/v2/XMLByteReader.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Gr2Q4wpswXnlDO1JKI1BeLSRutI= +MD5-Digest: x4G7pD7/Uda3v/oaKKcjRw== + +Name: ./oracle/xml/parser/v2/XMLCDATA.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 8QjBf/+zzxjpYfKZ9bkjHOj+4mg= +MD5-Digest: yiYNFIDTNwZrbvi3gQHYMg== + +Name: ./oracle/xml/parser/v2/XMLCharReader.class +Digest-Algorithms: SHA MD5 +SHA-Digest: RFH4mCnczAJOSjPvK0htwlt1zTY= +MD5-Digest: uPmBgdhfoavtVox9sX+Beg== + +Name: ./oracle/xml/parser/v2/XMLComment.class +Digest-Algorithms: SHA MD5 +SHA-Digest: W7u41bF9ZL+xnAWCoAaHNMRvU9Q= +MD5-Digest: xzEAycc8mMx3Ihol2/Dkng== + +Name: ./oracle/xml/parser/v2/XMLConstants.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 7aaLZ4YeCyuaoN/tx8AMHJLhp1c= +MD5-Digest: HbWklMHuX88uslkbayjiCg== + +Name: ./oracle/xml/parser/v2/XMLDOMException.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Oe7V4T1rQ3xLII0DoKHOSclyfO0= +MD5-Digest: g8yjVEgu7dzBJqEXeap3RQ== + +Name: ./oracle/xml/parser/v2/XMLDeclPI.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 2vELAbpPVnRUb3ycLkKQV+gccEw= +MD5-Digest: LV8I7fBd04+ktWZ9atQ9TQ== + +Name: ./oracle/xml/parser/v2/XMLDocument$1.class +Digest-Algorithms: SHA MD5 +SHA-Digest: esHYcMHh5r+Co0ywp63Gj9IkjZs= +MD5-Digest: qTrmDEkqmptgvGdtyb5Okw== + +Name: ./oracle/xml/parser/v2/XMLDocument.class +Digest-Algorithms: SHA MD5 +SHA-Digest: eTXRPIOI2lHLR1vzE3ywOE8vTMw= +MD5-Digest: XeADIhpkGC8x8eaSy6GQpA== + +Name: ./oracle/xml/parser/v2/XMLDocumentFragment.class +Digest-Algorithms: SHA MD5 +SHA-Digest: xcNS+TMaDSFQHdA2INeSRRSlmfk= +MD5-Digest: GIqHomU4sWOPrGK+hMBtVA== + +Name: ./oracle/xml/parser/v2/XMLDocumentHandler.class +Digest-Algorithms: SHA MD5 +SHA-Digest: lFW/9CURNpBbt/9hmyaZGSxPJy4= +MD5-Digest: afY6uHVH/k2/2yf7vHYmlw== + +Name: ./oracle/xml/parser/v2/XMLElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: IqYt9KIH5frz7h0P1oMOpBkY6dU= +MD5-Digest: YAMfnBoX+oF28/K0px82Zg== + +Name: ./oracle/xml/parser/v2/XMLEntity.class +Digest-Algorithms: SHA MD5 +SHA-Digest: wiCzbIQioh1fhgzL+A+RGR202hw= +MD5-Digest: ugB+OilTEWR0EP7rftGBHA== + +Name: ./oracle/xml/parser/v2/XMLEntityReference.class +Digest-Algorithms: SHA MD5 +SHA-Digest: frW93wz4topAeQD9PwIm9x9LAfg= +MD5-Digest: FWKKIYCszdNasYBBaYMIhw== + +Name: ./oracle/xml/parser/v2/XMLError.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 54xaIsFDL3zMAh27VhAyHJUWKIw= +MD5-Digest: +inXdjhdxIuSv4ckI2VNKw== + +Name: ./oracle/xml/parser/v2/XMLErrorMsg.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 24eB1qYZjOt6VSa23Q+LitR7oBE= +MD5-Digest: b34G5+aiO3CrTXReVnye7Q== + +Name: ./oracle/xml/parser/v2/XMLExternalReader.class +Digest-Algorithms: SHA MD5 +SHA-Digest: zFreW72jklnWCSdGOc2c6ewUps8= +MD5-Digest: eqg2FsIwucKOsGlUrGu/yA== + +Name: ./oracle/xml/parser/v2/XMLNode$1.class +Digest-Algorithms: SHA MD5 +SHA-Digest: QOaG9y8KtX7v9fXNSyib24fMdQE= +MD5-Digest: GGLEjrTLQLchSuUnScjJIQ== + +Name: ./oracle/xml/parser/v2/XMLNode$2.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 6uX0tL7XDdPp0muxhDHybJ5ho4s= +MD5-Digest: 2EL5nFcfrfJda9s+zf4Evg== + +Name: ./oracle/xml/parser/v2/XMLNode$3.class +Digest-Algorithms: SHA MD5 +SHA-Digest: fEy3wqvWve1+1vCPZ5goYbZpyU8= +MD5-Digest: mh7NyxMdqi09B32tdS85Gg== + +Name: ./oracle/xml/parser/v2/XMLNode.class +Digest-Algorithms: SHA MD5 +SHA-Digest: BFEnvYTKgU8W+hevKbsg/S8utoA= +MD5-Digest: daeiRg/JcaywxCtWBz+S+w== + +Name: ./oracle/xml/parser/v2/XMLNodeList.class +Digest-Algorithms: SHA MD5 +SHA-Digest: b6LC5Dkh7D/6qfYikmc4rqte5fA= +MD5-Digest: xQfv8iSf4KNaBPG1Xe7oag== + +Name: ./oracle/xml/parser/v2/XMLNotation.class +Digest-Algorithms: SHA MD5 +SHA-Digest: zTTnaQnpXzBBQFh0Vz9mIrMntK8= +MD5-Digest: kRNWYrnj7wr5dN6doT7lDg== + +Name: ./oracle/xml/parser/v2/XMLOutputStream.class +Digest-Algorithms: SHA MD5 +SHA-Digest: H8EMYvNyO8mfBuvDg5OWgOXDwUY= +MD5-Digest: W0qxvzUeIdIG4HU9ZSDQ7Q== + +Name: ./oracle/xml/parser/v2/XMLPI.class +Digest-Algorithms: SHA MD5 +SHA-Digest: EmhNZVTH/qK3m0eI2xboMCl69Ug= +MD5-Digest: HgbwCCQ1h8X+kLx1Wj4vqg== + +Name: ./oracle/xml/parser/v2/XMLParseException.class +Digest-Algorithms: SHA MD5 +SHA-Digest: vLds+zCGl2zsMxfy936BQK0oBr8= +MD5-Digest: xxtFl3sWY0IYQnaf6eA6cA== + +Name: ./oracle/xml/parser/v2/XMLParser.class +Digest-Algorithms: SHA MD5 +SHA-Digest: CDqtSHcAczvC+/OygwJLbc6+e0o= +MD5-Digest: gIwfbnYWcFZdrbE3o7f4XA== + +Name: ./oracle/xml/parser/v2/XMLPrintDriver.class +Digest-Algorithms: SHA MD5 +SHA-Digest: vyrZjrTe9bUrRrktCYhui3tjAjo= +MD5-Digest: Dso4CQ7R/4v6UYWcwusrVA== + +Name: ./oracle/xml/parser/v2/XMLReader.class +Digest-Algorithms: SHA MD5 +SHA-Digest: PPh0zeFUjuu5D1XN6cwOPWXm1bM= +MD5-Digest: 8u57OcMTv+0MfSModBzp0Q== + +Name: ./oracle/xml/parser/v2/XMLText.class +Digest-Algorithms: SHA MD5 +SHA-Digest: xT2L+q0Gv5gbnIbtH5Gv1dk5js0= +MD5-Digest: RNDUKMfWYeZeiJ7/IKpuxw== + +Name: ./oracle/xml/parser/v2/XMLToken.class +Digest-Algorithms: SHA MD5 +SHA-Digest: O1OJX0vVHqv9EHnlWWaa+sxgTBA= +MD5-Digest: DX00knl4o0BRqARocNvOyQ== + +Name: ./oracle/xml/parser/v2/XMLTokenizer.class +Digest-Algorithms: SHA MD5 +SHA-Digest: gWomkS3HyQBDkVJTTq9qCEo59Ew= +MD5-Digest: 3XF5UxJM8ABf1GvffsRu5w== + +Name: ./oracle/xml/parser/v2/XMLUCS2Reader.class +Digest-Algorithms: SHA MD5 +SHA-Digest: /zSRz90lId9IWtpVF90yG1FvKhM= +MD5-Digest: xUVN3X8VeyKdCWXn2uadsA== + +Name: ./oracle/xml/parser/v2/XMLUCS4Reader.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 6si76UZhYljwiwBItoLZeJodxJI= +MD5-Digest: zX9EfIhYKHtDgDc/4Rg8NA== + +Name: ./oracle/xml/parser/v2/XMLUTF8Reader.class +Digest-Algorithms: SHA MD5 +SHA-Digest: melL+QW6c+LUFrFsHMvExtYVPqc= +MD5-Digest: SOT2yyF/BzuIRBbhcKtzlA== + +Name: ./oracle/xml/parser/v2/XMLUtil.class +Digest-Algorithms: SHA MD5 +SHA-Digest: ok9tUKvgktZi1M8DrBxOoYYlAwk= +MD5-Digest: 0KvvIbx/C0T2ovx2eKCFgA== + +Name: ./oracle/xml/parser/v2/XPathContext.class +Digest-Algorithms: SHA MD5 +SHA-Digest: sBiHgoGW6taDFLynZi7bX8vuNUw= +MD5-Digest: l+tNKVeRLQGPDNpPXHVhbA== + +Name: ./oracle/xml/parser/v2/XPathException.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Eu4Mwr5RdxI1+69W2Hdh6LmePZk= +MD5-Digest: JaTyuY8X1KQ0Dc3MwFNetg== + +Name: ./oracle/xml/parser/v2/XSDFactory.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Dwwg2Oqhq9+gjR1Ol93q/31gekQ= +MD5-Digest: tanL1/jUvFO/V5VQG+0LLQ== + +Name: ./oracle/xml/parser/v2/XSLApplyImport.class +Digest-Algorithms: SHA MD5 +SHA-Digest: yqqqvFKl7r57XebZA6wdkPaZ5/8= +MD5-Digest: d+mNUl0nhhU3q+2XCb3d8Q== + +Name: ./oracle/xml/parser/v2/XSLApplyTemplates.class +Digest-Algorithms: SHA MD5 +SHA-Digest: okj56QBgYTDPQCYJmsjpH+XBQSk= +MD5-Digest: thERN3AvApZduqam7gIbsQ== + +Name: ./oracle/xml/parser/v2/XSLAttribute.class +Digest-Algorithms: SHA MD5 +SHA-Digest: nl/YCXD6ovoyCbcWWPhfLWhyDVA= +MD5-Digest: en7TUDs7PvLM0cl7LlvLZg== + +Name: ./oracle/xml/parser/v2/XSLAttributeSet.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Lw18kSuxlXKM+T1nKXdOpxxp4gc= +MD5-Digest: 2bsC1hxvkLrX3wuskvaxug== + +Name: ./oracle/xml/parser/v2/XSLCallTemplate.class +Digest-Algorithms: SHA MD5 +SHA-Digest: A3lt188ocCo7ugZZS440qeWvUOA= +MD5-Digest: IpQ1MH8YuQiZ1c/KL8ANhw== + +Name: ./oracle/xml/parser/v2/XSLCondition.class +Digest-Algorithms: SHA MD5 +SHA-Digest: DG/E0FqR6j/pHN3j+nPNAI5gAKI= +MD5-Digest: 4kXohB82aQkjK/l+/9b/rg== + +Name: ./oracle/xml/parser/v2/XSLConstants.class +Digest-Algorithms: SHA MD5 +SHA-Digest: vAqkeop0/YrgAgyTtEbwPN0SnUs= +MD5-Digest: i2qrkKE+6T1woygoGK/LRw== + +Name: ./oracle/xml/parser/v2/XSLContext.class +Digest-Algorithms: SHA MD5 +SHA-Digest: g02cAvFjJOI6mbKvCb6c/f+++Jw= +MD5-Digest: PrwtqQKCt/XgqwSHflk6nw== + +Name: ./oracle/xml/parser/v2/XSLCopy.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 2hyQno1vcUBsQ1YAzMs6+SeF8uA= +MD5-Digest: pLTOTcb1JC2UKD35HPUnRw== + +Name: ./oracle/xml/parser/v2/XSLCopyOf.class +Digest-Algorithms: SHA MD5 +SHA-Digest: +xs2bM0AaPzTT5hSOi8uhwF23L8= +MD5-Digest: KbmnkdCz72T4tzgTRa+K4Q== + +Name: ./oracle/xml/parser/v2/XSLDocumentBuilder.class +Digest-Algorithms: SHA MD5 +SHA-Digest: TFXt2T5mrbS+OsM8a2wy/+GMbJg= +MD5-Digest: uu3JAbu+fOCkS1R43aSsAw== + +Name: ./oracle/xml/parser/v2/XSLElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: mnf5MmxV1tL+qPuJHEinA2n55pE= +MD5-Digest: XeKAxjyl+7kj/lwSHb/Cdw== + +Name: ./oracle/xml/parser/v2/XSLEventHandler.class +Digest-Algorithms: SHA MD5 +SHA-Digest: KpX2jIt4IKGjnlSRaGZc+iE1JlM= +MD5-Digest: VYVOID1uq0f0qRQbXU3gxg== + +Name: ./oracle/xml/parser/v2/XSLException.class +Digest-Algorithms: SHA MD5 +SHA-Digest: I/K33NndYUUkUREnkrcMIHyQA80= +MD5-Digest: GLb3RWS228fC8TLRV9d7gA== + +Name: ./oracle/xml/parser/v2/XSLExpr.class +Digest-Algorithms: SHA MD5 +SHA-Digest: /2hYZ/eHGPQSSWalc25JSv7DEV0= +MD5-Digest: 8ishRkrNdeumLyCU5ljDBw== + +Name: ./oracle/xml/parser/v2/XSLExprBase.class +Digest-Algorithms: SHA MD5 +SHA-Digest: MF4XYLU2eOAO6xjiZaHU+z0HihE= +MD5-Digest: PcGgHqnZLxLMpm7xeJToUg== + +Name: ./oracle/xml/parser/v2/XSLExprConstants.class +Digest-Algorithms: SHA MD5 +SHA-Digest: oPmM+mN4MxkA/hqYRyZ7G/WxrK8= +MD5-Digest: wfQYwuaSamfttAuFujjH9w== + +Name: ./oracle/xml/parser/v2/XSLExprInt.class +Digest-Algorithms: SHA MD5 +SHA-Digest: CF+ZbJ8mmbDwNDQ1vVIMiYrnEEU= +MD5-Digest: /UDa+L436UM9sFwwMb756Q== + +Name: ./oracle/xml/parser/v2/XSLExprValue.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 5Y7bcv7TjvdX16XnyWl4fpkQZWc= +MD5-Digest: +lRJdyHZipa1+JoeCe2AUw== + +Name: ./oracle/xml/parser/v2/XSLExtFunctions.class +Digest-Algorithms: SHA MD5 +SHA-Digest: LgNKXPYG1Bw99cEH8lczGwsbE/U= +MD5-Digest: 0+WacS3+wv7EdiKyuMJdOA== + +Name: ./oracle/xml/parser/v2/XSLFallback.class +Digest-Algorithms: SHA MD5 +SHA-Digest: r1t+klItFJBJrKAe0SJwVKtffEA= +MD5-Digest: k4lAo98jqBeVmlB5NcnaCQ== + +Name: ./oracle/xml/parser/v2/XSLForEach.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 2H1qIVHt9u3gM/rODseBi3tZXSE= +MD5-Digest: /MpZ03TDRvDFPfRFaIKqgw== + +Name: ./oracle/xml/parser/v2/XSLKey.class +Digest-Algorithms: SHA MD5 +SHA-Digest: f3u3WN+SJswB0YZsZyhytndyfUI= +MD5-Digest: cFwiGuvlIYO2ikSusZRoBg== + +Name: ./oracle/xml/parser/v2/XSLMiscElements.class +Digest-Algorithms: SHA MD5 +SHA-Digest: f/L6VcTahUk7ihDQhwP3uoWyQv8= +MD5-Digest: ZJ2xVzrDRQ90ODzeUP/IBw== + +Name: ./oracle/xml/parser/v2/XSLNode.class +Digest-Algorithms: SHA MD5 +SHA-Digest: sfJRfxX7sSivLPbw/0a2Vr75qaE= +MD5-Digest: axVj9E66iHxyC8YhmnoYcA== + +Name: ./oracle/xml/parser/v2/XSLNodeList.class +Digest-Algorithms: SHA MD5 +SHA-Digest: fjoObtmWe/kuPDAhFKGM4FrVIuY= +MD5-Digest: B/QNBBG8sIXxfJOvCewO8g== + +Name: ./oracle/xml/parser/v2/XSLNodeSetExpr.class +Digest-Algorithms: SHA MD5 +SHA-Digest: TYxwqlI3O7dVusHUQ3L+Ty9Cpkc= +MD5-Digest: uAwGjQQ1Yt1u6gTDQ8z39w== + +Name: ./oracle/xml/parser/v2/XSLNodeSetInt.class +Digest-Algorithms: SHA MD5 +SHA-Digest: lBHy+IHZYEmZ96ZIKOn3ezH2tDQ= +MD5-Digest: o4JNM30aVjD/tKHrfbmfUg== + +Name: ./oracle/xml/parser/v2/XSLNumber.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 8V7RRKBXOhRo0aJQWDs/SI6daRg= +MD5-Digest: hbka7ip6WOq0JbAnUzrykA== + +Name: ./oracle/xml/parser/v2/XSLOtherElements.class +Digest-Algorithms: SHA MD5 +SHA-Digest: zAfMrBH0Qn61PoJ0d8dwd608XKo= +MD5-Digest: pbgRRi4IPuUZ8Jk0owpC0w== + +Name: ./oracle/xml/parser/v2/XSLOutput.class +Digest-Algorithms: SHA MD5 +SHA-Digest: b7LMMauRRwKIoxPWN1P/bnFx1hE= +MD5-Digest: MJBdrE2kxrkFUGb1aPqDkA== + +Name: ./oracle/xml/parser/v2/XSLParseString.class +Digest-Algorithms: SHA MD5 +SHA-Digest: O6zuuM7Wj2DBF/qhEB622UhAAOo= +MD5-Digest: VIUtILmaOjuUFjpvS8f5TA== + +Name: ./oracle/xml/parser/v2/XSLPatternInt.class +Digest-Algorithms: SHA MD5 +SHA-Digest: jijxuQif0rlUNULuiS/L847dPtU= +MD5-Digest: Sa2HmS3RY62gGuH/7eAlBA== + +Name: ./oracle/xml/parser/v2/XSLProcessor.class +Digest-Algorithms: SHA MD5 +SHA-Digest: RvVwU9rghsEhoUAi+d+Upsq+kTQ= +MD5-Digest: hcPSa/FCmNoGHkd3asCf6g== + +Name: ./oracle/xml/parser/v2/XSLResultElement.class +Digest-Algorithms: SHA MD5 +SHA-Digest: yyd+sdzjJrNUV2ahEs85CjMaWCU= +MD5-Digest: uzoZMRD1qL6dt2Ew/SvLrw== + +Name: ./oracle/xml/parser/v2/XSLSAXPrintDriver.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Pi96lDhCLJeJJOMytUtGEgrKcn4= +MD5-Digest: aC5cjgfDcR/yNY/DjR3JbQ== + +Name: ./oracle/xml/parser/v2/XSLSort.class +Digest-Algorithms: SHA MD5 +SHA-Digest: L2eioWDtzigopMWs5wYsIoJ6SsM= +MD5-Digest: 0reM1TP27ndKfnTrygk6Nw== + +Name: ./oracle/xml/parser/v2/XSLSourceContext.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Z9IlrluptjbPr2qbOVbt1X8Ms20= +MD5-Digest: 9/f6O7p5b/sBTzAq8R2V4w== + +Name: ./oracle/xml/parser/v2/XSLSpaceElem.class +Digest-Algorithms: SHA MD5 +SHA-Digest: q8zNfSz0UUy9J1euRg7aqEUYinY= +MD5-Digest: 0qq2xIkxAO0NIPyauOK9dA== + +Name: ./oracle/xml/parser/v2/XSLStylesheet.class +Digest-Algorithms: SHA MD5 +SHA-Digest: qylAWsNozWjgfezRtLTus81L5cQ= +MD5-Digest: uDbPTGDQ3I3RRKSTivEPBw== + +Name: ./oracle/xml/parser/v2/XSLTContext.class +Digest-Algorithms: SHA MD5 +SHA-Digest: eB/9uUGoxKjizJYCLuTJYO1grxM= +MD5-Digest: WXl2mdi/f4cS3FWdHRk++Q== + +Name: ./oracle/xml/parser/v2/XSLTemplate.class +Digest-Algorithms: SHA MD5 +SHA-Digest: dFQ2TVt8SzhzL5eqgrzPcxv48FQ= +MD5-Digest: hBBWojaJjXmXcF6+5UB4cA== + +Name: ./oracle/xml/parser/v2/XSLText.class +Digest-Algorithms: SHA MD5 +SHA-Digest: jDdg1wyIy6I3IMg2/vTofPaX7kE= +MD5-Digest: YB0L8EK7JUbMY808yAq2YQ== + +Name: ./oracle/xml/parser/v2/XSLValueOf.class +Digest-Algorithms: SHA MD5 +SHA-Digest: MPQDe97LjhnoWRghn+l/Z7IDzT0= +MD5-Digest: 2sVfzMjt4Q5wkGWTg3Ru7Q== + +Name: ./oracle/xml/parser/v2/XSLVariable.class +Digest-Algorithms: SHA MD5 +SHA-Digest: ld+Je/7Pcx2Ik4CFn6WYUy7Wnq4= +MD5-Digest: 2K0qIp7dHuW+6zyOv3hw+A== + +Name: ./oracle/xml/parser/v2/oraxml.class +Digest-Algorithms: SHA MD5 +SHA-Digest: kLnfY9Z70Av7XZRBfLQnMIeTmk0= +MD5-Digest: bboIhXpcgrg2FA4S5vRL1w== + +Name: ./oracle/xml/parser/v2/oraxsl.class +Digest-Algorithms: SHA MD5 +SHA-Digest: Ipvj4gRavoJSNhixHf1qAUS8e0s= +MD5-Digest: zOAg+OO64DPfJNPDhwWFoA== + +Name: ./oracle/xml/parser/v2/oraxslDriver.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 0/QHWsNu2smmlOjkR69FqNdgdfA= +MD5-Digest: ealdvLAljtIyGdBciXIJww== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: fKLFk2qJP59bbXcjUdso2f4/wJc= +MD5-Digest: 5kwMV6ib9BaarhaZbBfEFQ== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_ar_AE.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: hCkJI1CY22bEdxEXQXeUV8EvyOc= +MD5-Digest: RdIHtcNYcVomXaq5Xs8P6w== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_ca_ES.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: fafJ5R8/TcGo1Ix7rKgeFSjqL2E= +MD5-Digest: 0KvEzSJsgvuBrl7iGuis7w== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_cs_CZ.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: e25wbBY4JtHajfLWlrTVTI1ZEnY= +MD5-Digest: IuchTBJAuG8V74PHQxVMdw== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_da_DK.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: b+p3ThA4oK7aZT6EIkY9rfon9c4= +MD5-Digest: zbEsIy0+9gqSdE8vivl2Rw== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_de_DE.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: KnaumKxTXhXcbjS4LyNLGDCSPeQ= +MD5-Digest: m0oaY9AzmspY2FITfSXgKA== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_el_GR.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: aTrpT+x8VtiBfXP6nDiEDKZEaO4= +MD5-Digest: rHumMFXmXoc170S4O/FUdQ== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_en_US.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: 1dQTO7w6h7ghQxHCHP9im6Sytt4= +MD5-Digest: ofFkJK2brX0xnktSD/CP9w== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_es_AR.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: IkSMyOdUFk40yFXLdOmeGTweyDE= +MD5-Digest: QqbPytYK/LY+A7qDTKPSww== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_es_ES.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: A1qAPWtJAgQLLVhM4AlkRwshLzE= +MD5-Digest: doACbaDLg3Khs9iy0pYpJg== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_fi_FI.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: LcB8fPQB/E+jle3xBiN99iU6f14= +MD5-Digest: BUP4fX+Cf7KMZix11zfrBg== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_fr_FR.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: SgapyE2u5g7Tq2ZOemeH8nOmTLg= +MD5-Digest: xTP2Qexp6W0eDoT/q867Mg== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_hu_HU.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: MNm06tuOZbsV7ZQ+ldOV5IXSiQY= +MD5-Digest: GzCYD4NGY4MA8I/nRDmQiQ== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_it_IT.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: SmIv6oU8xoATlb96tD6rzo1+rqE= +MD5-Digest: muew30KvaeClBJVf3Agu6w== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_iw_IL.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: CHUEPcKX5wtnv3rOw0TeACZbRIg= +MD5-Digest: JbqPUwZf1hyxwWe2ai/CkA== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_ja_JP.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: sQt80uTrRY69vyYuVvNvC7pcCuw= +MD5-Digest: eS70v+mhUpL5BHMU2WhunA== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_ko_KR.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: v1oKdn6aI3dytpNIhsdDAO6JflQ= +MD5-Digest: oVJeacFQSuO7bTeDeBD0ww== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_nl_NL.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: hbWhWglVCwLkQSdzC3BV/YFWGkk= +MD5-Digest: clL2IC92MZjSM3WEIO1hwQ== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_no_NO.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: 2SmmIiyjD1BHydjdQ/Yng5e3KCc= +MD5-Digest: z1WmhwkyoaXvk8YA497ebQ== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_pl_PL.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: RDFbIKsVIRP/BjdctAEh8XI011U= +MD5-Digest: 1l4ABiwHapdy5UuexnNl6g== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_pt_BR.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: 5x9qIUXHs4OtoYq+jUBGDCnP1uo= +MD5-Digest: ALzo/OQLtULEJ75Jmz7RHw== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_pt_PT.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: 7HLnKYxzCok2Pc90v5FOwPEyj24= +MD5-Digest: bTq+Wxqeq5filRPCqShs2A== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_ro_RO.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: Y2TOKjSAdsuUv6ldlqtk0NdYrtc= +MD5-Digest: 4bGafareZ0uFsi6cjdCAKg== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_ru_RU.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: Is4k6oYG3PsxL6cWi7Ie3ncDmxE= +MD5-Digest: SyBK/2ekruTHZrUmxzWCmQ== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_sk_SK.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: dKpwGKy2h4GXKPq9a+ewbKt5oLA= +MD5-Digest: epafkx+4Z3L8VNbVTz9KnA== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_sv_SE.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: 7UIZS0jcFlxvdC4in/PsjQLzRag= +MD5-Digest: KwRNDbirCTuszNhKP/9DHw== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_tr_TR.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: caOxABlttyyIgsZJz8WtG9/ErN4= +MD5-Digest: OXMpP4HmxkrxE+fedrR/Mg== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_zh_CN.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: S+q/e3Ni4NYA5y3sBC4lU31Aw6U= +MD5-Digest: jmBlqgbTq27dNaiHyabX+w== + +Name: ./oracle/xml/parser/v2/mesg/XMLErrorMesg_zh_TW.properties +Digest-Algorithms: SHA MD5 +SHA-Digest: 9cmcMILcoQ4q9ciWx9I3gpKrVSI= +MD5-Digest: jEBaoDWZopYoQcnNoVqlJQ== + +Name: ./oracle/xml/async/DOMBuilder.class +Digest-Algorithms: SHA MD5 +SHA-Digest: GFS05NF7SJYTr08DKfrzPGBlb10= +MD5-Digest: SmJ3Dj2UEqb5vP4Vqaqnfw== + +Name: ./oracle/xml/async/DOMBuilderConstants.class +Digest-Algorithms: SHA MD5 +SHA-Digest: zxGfnx1HaZ9tbVstRBRksUvvWC0= +MD5-Digest: 3se7JVcKa7OYFeNnWJHPnA== + +Name: ./oracle/xml/async/DOMBuilderErrorEvent.class +Digest-Algorithms: SHA MD5 +SHA-Digest: +rl+NQvS6d5g0YfOAIs9hA47KNI= +MD5-Digest: oOBTfpmWe7fjcRCAhaVNWQ== + +Name: ./oracle/xml/async/DOMBuilderErrorListener.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 3gU+jEWmcs7IILIf1ObP1KMNjvs= +MD5-Digest: SzLLgIsyN8xo5adW/wD7vg== + +Name: ./oracle/xml/async/DOMBuilderEvent.class +Digest-Algorithms: SHA MD5 +SHA-Digest: AM3QKF74EoVXroifwNJTAdMj3Cc= +MD5-Digest: SjfG514Voqu0MsMcQcQXyA== + +Name: ./oracle/xml/async/DOMBuilderListener.class +Digest-Algorithms: SHA MD5 +SHA-Digest: +/+NNWOGdwlr3xgtyEKT27hDB1Y= +MD5-Digest: OevczNhK10LkgXCM+t1U+Q== + +Name: ./oracle/xml/async/ResourceManager.class +Digest-Algorithms: SHA MD5 +SHA-Digest: VfiMJMYIctMxiZpxA1M5bv3rFxM= +MD5-Digest: YujPf+b/98gBaRzMe1T1LQ== + +Name: ./oracle/xml/async/XSLTransformer.class +Digest-Algorithms: SHA MD5 +SHA-Digest: xRv8UXCV0/IW+0kKURjiuHV9WC4= +MD5-Digest: a+Cpp0BXSrbplNTCE0FoXA== + +Name: ./oracle/xml/async/XSLTransformerConstants.class +Digest-Algorithms: SHA MD5 +SHA-Digest: vL41KgQ39npSA/C8nrI872tF+Lk= +MD5-Digest: BXOJCXL89qRqIynigVrTVA== + +Name: ./oracle/xml/async/XSLTransformerErrorEvent.class +Digest-Algorithms: SHA MD5 +SHA-Digest: GmghZIOSzS7JX7cX1KvPQXDDOBk= +MD5-Digest: /Wkn86ue4J9HkLTXEqoi0g== + +Name: ./oracle/xml/async/XSLTransformerErrorListener.class +Digest-Algorithms: SHA MD5 +SHA-Digest: 6H2ucH5RjBpA6TCF24lMN6jP1Ok= +MD5-Digest: tOt6+Y0a2dCvOi5E2TXv+Q== + +Name: ./oracle/xml/async/XSLTransformerEvent.class +Digest-Algorithms: SHA MD5 +SHA-Digest: DMRocLAtY2Sa2WJzdy/AutlxE7c= +MD5-Digest: W+Ttjarjj04dWrLIkiLEWg== + +Name: ./oracle/xml/async/XSLTransformerListener.class +Digest-Algorithms: SHA MD5 +SHA-Digest: TKx9VoqCGniJc+UGOM66TFwUj6s= +MD5-Digest: BRbIkSajVNRnddPUPzlXKQ== + +Name: ./xmlparser_2.0.2.9_production +Digest-Algorithms: SHA MD5 +SHA-Digest: 2jmj7l5rSw0yVb/vlWAYkK/YBwk= +MD5-Digest: 1B2M2Y8AsgTpgAmY7PhCfg== + +PK +� �(org/PK +� �(org/w3c/PK +� �( org/w3c/dom/PK +�QP%Ejp66org/w3c/dom/Attr.class����-()Ljava/lang/String;()Z(Ljava/lang/String;)V Attr.javaCode +ConstantValue +ExceptionsLocalVariables +SourceFilegetName getSpecifiedgetValuejava/lang/Objectorg/w3c/dom/Attrorg/w3c/dom/NodesetValue + PK +�QP%q?���org/w3c/dom/CDATASection.class����- + +  CDATASection.javaCode +ConstantValue +ExceptionsLocalVariables +SourceFilejava/lang/Objectorg/w3c/dom/CDATASectionorg/w3c/dom/Text PK +�QP%~X�VVorg/w3c/dom/CharacterData.class����-()I()Ljava/lang/String;(II)Ljava/lang/String;(II)V(IILjava/lang/String;)V(ILjava/lang/String;)V(Ljava/lang/String;)VCharacterData.javaCode +ConstantValue +ExceptionsLocalVariables +SourceFile +appendData +deleteDatagetData getLength +insertDatajava/lang/Objectorg/w3c/dom/CharacterDataorg/w3c/dom/DOMExceptionorg/w3c/dom/Node replaceDatasetData +substringData   +  PK +�QP%�ٱh��org/w3c/dom/Comment.class����- + +  Code Comment.java +ConstantValue +ExceptionsLocalVariables +SourceFilejava/lang/Objectorg/w3c/dom/CharacterDataorg/w3c/dom/Comment PK +�QP%5��fforg/w3c/dom/Document.class����-'#$%&!()Lorg/w3c/dom/DOMImplementation; ()Lorg/w3c/dom/DocumentFragment;()Lorg/w3c/dom/DocumentType;()Lorg/w3c/dom/Element;&(Ljava/lang/String;)Lorg/w3c/dom/Attr;.(Ljava/lang/String;)Lorg/w3c/dom/CDATASection;)(Ljava/lang/String;)Lorg/w3c/dom/Comment;)(Ljava/lang/String;)Lorg/w3c/dom/Element;1(Ljava/lang/String;)Lorg/w3c/dom/EntityReference;*(Ljava/lang/String;)Lorg/w3c/dom/NodeList;&(Ljava/lang/String;)Lorg/w3c/dom/Text;I(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/ProcessingInstruction;Code +ConstantValue +Document.java +ExceptionsLocalVariables +SourceFilecreateAttributecreateCDATASection +createCommentcreateDocumentFragment +createElementcreateEntityReferencecreateProcessingInstructioncreateTextNode +getDoctypegetDocumentElementgetElementsByTagNamegetImplementationjava/lang/Objectorg/w3c/dom/DOMExceptionorg/w3c/dom/Documentorg/w3c/dom/Node "    +  +!PK +�QP%�7��"org/w3c/dom/DocumentFragment.class����- + +  Code +ConstantValueDocumentFragment.java +ExceptionsLocalVariables +SourceFilejava/lang/Objectorg/w3c/dom/DocumentFragmentorg/w3c/dom/Node PK +�QP%,K��77org/w3c/dom/DocumentType.class����-()Ljava/lang/String;()Lorg/w3c/dom/NamedNodeMap;Code +ConstantValueDocumentType.java +ExceptionsLocalVariables +SourceFile getEntitiesgetName getNotationsjava/lang/Objectorg/w3c/dom/DocumentTypeorg/w3c/dom/Node +  PK +�QP%���f��org/w3c/dom/DOMException.class����-(  +&' +    %"(Ljava/lang/String;)V(SLjava/lang/String;)VCode +ConstantValueDOMException.javaDOMSTRING_SIZE_ERR +ExceptionsHIERARCHY_REQUEST_ERRINDEX_SIZE_ERRINUSE_ATTRIBUTE_ERRINVALID_CHARACTER_ERRLocalVariables +NOT_FOUND_ERRNOT_SUPPORTED_ERRNO_DATA_ALLOWED_ERRNO_MODIFICATION_ALLOWED_ERRS +SourceFileWRONG_DOCUMENT_ERRcodejava/lang/RuntimeExceptionorg/w3c/dom/DOMException %""""$"" "!""" " + *,� +*��#PK +�QP%.�v���#org/w3c/dom/DOMImplementation.class����- +  '(Ljava/lang/String;Ljava/lang/String;)ZCode +ConstantValueDOMImplementation.java +ExceptionsLocalVariables +SourceFile +hasFeaturejava/lang/Objectorg/w3c/dom/DOMImplementation + PK +�QP%��*��org/w3c/dom/Element.class����- ()Ljava/lang/String;()V&(Ljava/lang/String;)Ljava/lang/String;&(Ljava/lang/String;)Lorg/w3c/dom/Attr;*(Ljava/lang/String;)Lorg/w3c/dom/NodeList;(Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)V&(Lorg/w3c/dom/Attr;)Lorg/w3c/dom/Attr;Code +ConstantValue Element.java +ExceptionsLocalVariables +SourceFile getAttributegetAttributeNodegetElementsByTagName +getTagNamejava/lang/Object normalizeorg/w3c/dom/DOMExceptionorg/w3c/dom/Elementorg/w3c/dom/NoderemoveAttributeremoveAttributeNode setAttributesetAttributeNode   +   PK +�QP%b<؁org/w3c/dom/Entity.class����-()Ljava/lang/String;Code +ConstantValue Entity.java +ExceptionsLocalVariables +SourceFilegetNotationName getPublicId getSystemIdjava/lang/Objectorg/w3c/dom/Entityorg/w3c/dom/Node  +  +PK +�QP%�&����!org/w3c/dom/EntityReference.class����- + +  Code +ConstantValueEntityReference.java +ExceptionsLocalVariables +SourceFilejava/lang/Objectorg/w3c/dom/EntityReferenceorg/w3c/dom/Node PK +� �(org/w3c/dom/html/PK +�QP%w4� (org/w3c/dom/html/HTMLAnchorElement.class����-,()I()Ljava/lang/String;()V(I)V(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLAnchorElement.javaLocalVariables +SourceFileblurfocus getAccessKey +getCharset getCoordsgetHref getHreflanggetNamegetRelgetRevgetShape getTabIndex getTargetgetTypejava/lang/Object"org/w3c/dom/html/HTMLAnchorElementorg/w3c/dom/html/HTMLElement setAccessKey +setCharset setCoordssetHref setHreflangsetNamesetRelsetRevsetShape setTabIndex setTargetsetType !"#$%&'()*+ PK +�QP%u��Ը�(org/w3c/dom/html/HTMLAppletElement.class����-%()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLAppletElement.javaLocalVariables +SourceFilegetAligngetAlt +getArchivegetCode getCodeBase getHeight getHspacegetName getObject getVspacegetWidthjava/lang/Object"org/w3c/dom/html/HTMLAppletElementorg/w3c/dom/html/HTMLElementsetAlignsetAlt +setArchivesetCode setCodeBase setHeight setHspacesetName setObject setVspacesetWidth  + !"#$  PK +�QP%�' +``&org/w3c/dom/html/HTMLAreaElement.class����-#()I()Ljava/lang/String;()Z(I)V(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLAreaElement.javaLocalVariables +SourceFile getAccessKeygetAlt getCoordsgetHref getNoHrefgetShape getTabIndex getTargetjava/lang/Object org/w3c/dom/html/HTMLAreaElementorg/w3c/dom/html/HTMLElement setAccessKeysetAlt setCoordssetHref setNoHrefsetShape setTabIndex setTarget  !" +PK +�QP%�j�QTT&org/w3c/dom/html/HTMLBaseElement.class����-()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLBaseElement.javaLocalVariables +SourceFilegetHref getTargetjava/lang/Object org/w3c/dom/html/HTMLBaseElementorg/w3c/dom/html/HTMLElementsetHref setTarget  +  PK +�QP%mS�~~*org/w3c/dom/html/HTMLBaseFontElement.class����-()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLBaseFontElement.javaLocalVariables +SourceFilegetColorgetFacegetSizejava/lang/Object$org/w3c/dom/html/HTMLBaseFontElementorg/w3c/dom/html/HTMLElementsetColorsetFacesetSize  +  PK +�QP%a(��88,org/w3c/dom/html/HTMLBlockquoteElement.class����- +()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLBlockquoteElement.javaLocalVariables +SourceFilegetCitejava/lang/Object&org/w3c/dom/html/HTMLBlockquoteElementorg/w3c/dom/html/HTMLElementsetCite   PK +�QP%m��v��&org/w3c/dom/html/HTMLBodyElement.class����-()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLBodyElement.javaLocalVariables +SourceFilegetALink +getBackground +getBgColorgetLinkgetTextgetVLinkjava/lang/Object org/w3c/dom/html/HTMLBodyElementorg/w3c/dom/html/HTMLElementsetALink +setBackground +setBgColorsetLinksetTextsetVLink   +  PK +�QP%�ޛ**$org/w3c/dom/html/HTMLBRElement.class����- +()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLBRElement.javaLocalVariables +SourceFilegetClearjava/lang/Objectorg/w3c/dom/html/HTMLBRElementorg/w3c/dom/html/HTMLElementsetClear   PK +�QP%)��PAA(org/w3c/dom/html/HTMLButtonElement.class����- ()I()Ljava/lang/String;$()Lorg/w3c/dom/html/HTMLFormElement;()Z(I)V(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLButtonElement.javaLocalVariables +SourceFile getAccessKey getDisabledgetFormgetName getTabIndexgetTypegetValuejava/lang/Object"org/w3c/dom/html/HTMLButtonElementorg/w3c/dom/html/HTMLElement setAccessKey setDisabledsetName setTabIndexsetValue   +  PK +�QP%�]m�11%org/w3c/dom/html/HTMLCollection.class����-()I(I)Lorg/w3c/dom/Node;&(Ljava/lang/String;)Lorg/w3c/dom/Node;Code +ConstantValue +ExceptionsHTMLCollection.javaLocalVariables +SourceFile getLengthitemjava/lang/Object namedItemorg/w3c/dom/html/HTMLCollection  +  PK +�QP%v�M�+org/w3c/dom/html/HTMLDirectoryElement.class����- +()Z(Z)VCode +ConstantValue +ExceptionsHTMLDirectoryElement.javaLocalVariables +SourceFile +getCompactjava/lang/Object%org/w3c/dom/html/HTMLDirectoryElementorg/w3c/dom/html/HTMLElement +setCompact   PK +�QP%�n�,,%org/w3c/dom/html/HTMLDivElement.class����- +()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLDivElement.javaLocalVariables +SourceFilegetAlignjava/lang/Objectorg/w3c/dom/html/HTMLDivElementorg/w3c/dom/html/HTMLElementsetAlign   PK +�QP%UB��'org/w3c/dom/html/HTMLDListElement.class����- +()Z(Z)VCode +ConstantValue +ExceptionsHTMLDListElement.javaLocalVariables +SourceFile +getCompactjava/lang/Object!org/w3c/dom/html/HTMLDListElementorg/w3c/dom/html/HTMLElement +setCompact   PK +�QP%�61XMM#org/w3c/dom/html/HTMLDocument.class����-) "#()Ljava/lang/String;#()Lorg/w3c/dom/html/HTMLCollection; ()Lorg/w3c/dom/html/HTMLElement;()V)(Ljava/lang/String;)Lorg/w3c/dom/Element;*(Ljava/lang/String;)Lorg/w3c/dom/NodeList;(Ljava/lang/String;)V!(Lorg/w3c/dom/html/HTMLElement;)VCode +ConstantValue +ExceptionsHTMLDocument.javaLocalVariables +SourceFileclose +getAnchors +getAppletsgetBody getCookie getDomaingetElementByIdgetElementsByNamegetForms getImagesgetLinks getReferrergetTitlegetURLjava/lang/Objectopenorg/w3c/dom/Documentorg/w3c/dom/html/HTMLDocumentsetBody setCookiesetTitlewritewriteln& +$ % +!' +( + PK +�QP%K��߱�"org/w3c/dom/html/HTMLElement.class����-()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLElement.javaLocalVariables +SourceFile getClassNamegetDirgetIdgetLanggetTitlejava/lang/Objectorg/w3c/dom/Elementorg/w3c/dom/html/HTMLElement setClassNamesetDirsetIdsetLangsetTitle + +   PK +�QP%f��@*org/w3c/dom/html/HTMLFieldSetElement.class����-  +$()Lorg/w3c/dom/html/HTMLFormElement;Code +ConstantValue +ExceptionsHTMLFieldSetElement.javaLocalVariables +SourceFilegetFormjava/lang/Objectorg/w3c/dom/html/HTMLElement$org/w3c/dom/html/HTMLFieldSetElement  +PK +�QP%�<�vv&org/w3c/dom/html/HTMLFontElement.class����-()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLFontElement.javaLocalVariables +SourceFilegetColorgetFacegetSizejava/lang/Objectorg/w3c/dom/html/HTMLElement org/w3c/dom/html/HTMLFontElementsetColorsetFacesetSize  +  PK +�QP%��f��&org/w3c/dom/html/HTMLFormElement.class����-"()I()Ljava/lang/String;#()Lorg/w3c/dom/html/HTMLCollection;()V(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLFormElement.javaLocalVariables +SourceFilegetAcceptCharset getAction getElements +getEnctype getLength getMethodgetName getTargetjava/lang/Objectorg/w3c/dom/html/HTMLElement org/w3c/dom/html/HTMLFormElementresetsetAcceptCharset setAction +setEnctype setMethodsetName setTargetsubmit ! PK +�QP% +�e{{'org/w3c/dom/html/HTMLFrameElement.class����-!()Ljava/lang/String;()Z(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLFrameElement.javaLocalVariables +SourceFilegetFrameBorder getLongDescgetMarginHeightgetMarginWidthgetName getNoResize getScrollinggetSrcjava/lang/Objectorg/w3c/dom/html/HTMLElement!org/w3c/dom/html/HTMLFrameElementsetFrameBorder setLongDescsetMarginHeightsetMarginWidthsetName setNoResize setScrollingsetSrc  + PK +�QP%4�uXX*org/w3c/dom/html/HTMLFrameSetElement.class����-()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLFrameSetElement.javaLocalVariables +SourceFilegetColsgetRowsjava/lang/Objectorg/w3c/dom/html/HTMLElement$org/w3c/dom/html/HTMLFrameSetElementsetColssetRows  +  PK +�QP%RX�22&org/w3c/dom/html/HTMLHeadElement.class����- +()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLHeadElement.javaLocalVariables +SourceFile +getProfilejava/lang/Objectorg/w3c/dom/html/HTMLElement org/w3c/dom/html/HTMLHeadElement +setProfile   PK +�QP%2/j�44)org/w3c/dom/html/HTMLHeadingElement.class����- +()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLHeadingElement.javaLocalVariables +SourceFilegetAlignjava/lang/Objectorg/w3c/dom/html/HTMLElement#org/w3c/dom/html/HTMLHeadingElementsetAlign   PK +�QP%h��p��$org/w3c/dom/html/HTMLHRElement.class����-()Ljava/lang/String;()Z(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLHRElement.javaLocalVariables +SourceFilegetAlign +getNoShadegetSizegetWidthjava/lang/Objectorg/w3c/dom/html/HTMLElementorg/w3c/dom/html/HTMLHRElementsetAlign +setNoShadesetSizesetWidth + PK +�QP%����22&org/w3c/dom/html/HTMLHtmlElement.class����- +()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLHtmlElement.javaLocalVariables +SourceFile +getVersionjava/lang/Objectorg/w3c/dom/html/HTMLElement org/w3c/dom/html/HTMLHtmlElement +setVersion   PK +�QP%����(org/w3c/dom/html/HTMLIFrameElement.class����-#()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLIFrameElement.javaLocalVariables +SourceFilegetAligngetFrameBorder getHeight getLongDescgetMarginHeightgetMarginWidthgetName getScrollinggetSrcgetWidthjava/lang/Objectorg/w3c/dom/html/HTMLElement"org/w3c/dom/html/HTMLIFrameElementsetAlignsetFrameBorder setHeight setLongDescsetMarginHeightsetMarginWidthsetName setScrollingsetSrcsetWidth  + !"  PK +�QP%H�gQ + +'org/w3c/dom/html/HTMLImageElement.class����-+()Ljava/lang/String;()Z(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLImageElement.javaLocalVariables +SourceFilegetAligngetAlt getBorder getHeight getHspacegetIsMap getLongDesc getLowSrcgetNamegetSrc getUseMap getVspacegetWidthjava/lang/Objectorg/w3c/dom/html/HTMLElement!org/w3c/dom/html/HTMLImageElementsetAlignsetAlt setBorder setHeight setHspacesetIsMap setLongDesc setLowSrcsetNamesetSrc setUseMap setVspacesetWidth%& !"#$'()* + PK +�QP%g�(�SS'org/w3c/dom/html/HTMLInputElement.class����-;'()()I()Ljava/lang/String;$()Lorg/w3c/dom/html/HTMLFormElement;()V()Z(I)V(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLInputElement.javaLocalVariables +SourceFileblurclickfocus getAccept getAccessKeygetAligngetAlt +getCheckedgetDefaultCheckedgetDefaultValue getDisabledgetForm getMaxLengthgetName getReadOnlygetSizegetSrc getTabIndexgetType getUseMapgetValuejava/lang/Objectorg/w3c/dom/html/HTMLElement!org/w3c/dom/html/HTMLInputElementselect setAccept setAccessKeysetAlignsetAlt +setCheckedsetDefaultCheckedsetDefaultValue setDisabled setMaxLengthsetName setReadOnlysetSizesetSrc setTabIndex setUseMapsetValue&1 +0 + +, +- +. +/ 2 3 4 + 5 !6 +"7 +#8 $%9 +&: +*PK +�QP%�2��oo)org/w3c/dom/html/HTMLIsIndexElement.class����-()Ljava/lang/String;$()Lorg/w3c/dom/html/HTMLFormElement;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLIsIndexElement.javaLocalVariables +SourceFilegetForm getPromptjava/lang/Objectorg/w3c/dom/html/HTMLElement#org/w3c/dom/html/HTMLIsIndexElement setPrompt +  +PK +�QP%_S�ߛ�'org/w3c/dom/html/HTMLLabelElement.class����-()Ljava/lang/String;$()Lorg/w3c/dom/html/HTMLFormElement;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLLabelElement.javaLocalVariables +SourceFile getAccessKeygetForm +getHtmlForjava/lang/Objectorg/w3c/dom/html/HTMLElement!org/w3c/dom/html/HTMLLabelElement setAccessKey +setHtmlFor +  +PK +�QP%o"����(org/w3c/dom/html/HTMLLegendElement.class����-()Ljava/lang/String;$()Lorg/w3c/dom/html/HTMLFormElement;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLLegendElement.javaLocalVariables +SourceFile getAccessKeygetAligngetFormjava/lang/Objectorg/w3c/dom/html/HTMLElement"org/w3c/dom/html/HTMLLegendElement setAccessKeysetAlign +  +PK +�QP%r2��[[$org/w3c/dom/html/HTMLLIElement.class����-()I()Ljava/lang/String;(I)V(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLLIElement.javaLocalVariables +SourceFilegetTypegetValuejava/lang/Objectorg/w3c/dom/html/HTMLElementorg/w3c/dom/html/HTMLLIElementsetTypesetValue + PK +�QP%leGqq&org/w3c/dom/html/HTMLLinkElement.class����-#()Ljava/lang/String;()Z(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLLinkElement.javaLocalVariables +SourceFile +getCharset getDisabledgetHref getHreflanggetMediagetRelgetRev getTargetgetTypejava/lang/Objectorg/w3c/dom/html/HTMLElement org/w3c/dom/html/HTMLLinkElement +setCharset setDisabledsetHref setHreflangsetMediasetRelsetRev setTargetsetType !" + PK +�QP%E�g�cc%org/w3c/dom/html/HTMLMapElement.class����-()Ljava/lang/String;#()Lorg/w3c/dom/html/HTMLCollection;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLMapElement.javaLocalVariables +SourceFilegetAreasgetNamejava/lang/Objectorg/w3c/dom/html/HTMLElementorg/w3c/dom/html/HTMLMapElementsetName +  +PK +�QP%��S&org/w3c/dom/html/HTMLMenuElement.class����- +()Z(Z)VCode +ConstantValue +ExceptionsHTMLMenuElement.javaLocalVariables +SourceFile +getCompactjava/lang/Objectorg/w3c/dom/html/HTMLElement org/w3c/dom/html/HTMLMenuElement +setCompact   PK +�QP%f�إ��&org/w3c/dom/html/HTMLMetaElement.class����-()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLMetaElement.javaLocalVariables +SourceFile +getContent getHttpEquivgetName getSchemejava/lang/Objectorg/w3c/dom/html/HTMLElement org/w3c/dom/html/HTMLMetaElement +setContent setHttpEquivsetName setScheme  +  PK +�QP%tO��VV%org/w3c/dom/html/HTMLModElement.class����-()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLModElement.javaLocalVariables +SourceFilegetCite getDateTimejava/lang/Objectorg/w3c/dom/html/HTMLElementorg/w3c/dom/html/HTMLModElementsetCite setDateTime  +  PK +�QP%��(org/w3c/dom/html/HTMLObjectElement.class����-7#$%()I()Ljava/lang/String;$()Lorg/w3c/dom/html/HTMLFormElement;()Z(I)V(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLObjectElement.javaLocalVariables +SourceFilegetAlign +getArchive getBordergetCode getCodeBase getCodeTypegetData +getDeclaregetForm getHeight getHspacegetName +getStandby getTabIndexgetType getUseMap getVspacegetWidthjava/lang/Objectorg/w3c/dom/html/HTMLElement"org/w3c/dom/html/HTMLObjectElementsetAlign +setArchive setBordersetCode setCodeBase setCodeTypesetData +setDeclare setHeight setHspacesetName +setStandby setTabIndexsetType setUseMap setVspacesetWidth#) & ' ( * + , - +. / 0 1 23  4 !5 "6 PK +�QP%`�B���'org/w3c/dom/html/HTMLOListElement.class����-()I()Ljava/lang/String;()Z(I)V(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLOListElement.javaLocalVariables +SourceFile +getCompactgetStartgetTypejava/lang/Objectorg/w3c/dom/html/HTMLElement!org/w3c/dom/html/HTMLOListElement +setCompactsetStartsetType  +PK +�QP%$��goo*org/w3c/dom/html/HTMLOptGroupElement.class����-()Ljava/lang/String;()Z(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLOptGroupElement.javaLocalVariables +SourceFile getDisabledgetLabeljava/lang/Objectorg/w3c/dom/html/HTMLElement$org/w3c/dom/html/HTMLOptGroupElement setDisabledsetLabel + PK +�QP%��[__(org/w3c/dom/html/HTMLOptionElement.class����-!()I()Ljava/lang/String;$()Lorg/w3c/dom/html/HTMLFormElement;()Z(I)V(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLOptionElement.javaLocalVariables +SourceFilegetDefaultSelected getDisabledgetFormgetIndexgetLabel getSelectedgetTextgetValuejava/lang/Objectorg/w3c/dom/html/HTMLElement"org/w3c/dom/html/HTMLOptionElementsetDefaultSelected setDisabledsetIndexsetLabelsetValue + + +  PK +�QP%�J��88+org/w3c/dom/html/HTMLParagraphElement.class����- +()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLParagraphElement.javaLocalVariables +SourceFilegetAlignjava/lang/Objectorg/w3c/dom/html/HTMLElement%org/w3c/dom/html/HTMLParagraphElementsetAlign   PK +�QP%��C���'org/w3c/dom/html/HTMLParamElement.class����-()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLParamElement.javaLocalVariables +SourceFilegetNamegetTypegetValue getValueTypejava/lang/Objectorg/w3c/dom/html/HTMLElement!org/w3c/dom/html/HTMLParamElementsetNamesetTypesetValue setValueType  +  PK +�QP%tx�� + +%org/w3c/dom/html/HTMLPreElement.class����- +()I(I)VCode +ConstantValue +ExceptionsHTMLPreElement.javaLocalVariables +SourceFilegetWidthjava/lang/Objectorg/w3c/dom/html/HTMLElementorg/w3c/dom/html/HTMLPreElementsetWidth   PK +�QP%�y�..'org/w3c/dom/html/HTMLQuoteElement.class����- +()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLQuoteElement.javaLocalVariables +SourceFilegetCitejava/lang/Objectorg/w3c/dom/html/HTMLElement!org/w3c/dom/html/HTMLQuoteElementsetCite   PK +�QP%3HsI##(org/w3c/dom/html/HTMLScriptElement.class����-()Ljava/lang/String;()Z(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLScriptElement.javaLocalVariables +SourceFile +getCharsetgetDefergetEvent +getHtmlForgetSrcgetTextgetTypejava/lang/Objectorg/w3c/dom/html/HTMLElement"org/w3c/dom/html/HTMLScriptElement +setCharsetsetDefersetEvent +setHtmlForsetSrcsetTextsetType + PK +�QP%�G�nn(org/w3c/dom/html/HTMLSelectElement.class����--"#$()I()Ljava/lang/String;#()Lorg/w3c/dom/html/HTMLCollection;$()Lorg/w3c/dom/html/HTMLFormElement;()V()Z(I)V(Ljava/lang/String;)V?(Lorg/w3c/dom/html/HTMLElement;Lorg/w3c/dom/html/HTMLElement;)V(Z)VCode +ConstantValue +ExceptionsHTMLSelectElement.javaLocalVariables +SourceFileaddblurfocus getDisabledgetForm getLength getMultiplegetName +getOptionsgetSelectedIndexgetSize getTabIndexgetTypegetValuejava/lang/Objectorg/w3c/dom/html/HTMLElement"org/w3c/dom/html/HTMLSelectElementremove setDisabled setMultiplesetNamesetSelectedIndexsetSize setTabIndexsetValue ) +!,  & + ' +( * ++ + % +PK +�QP% +c����'org/w3c/dom/html/HTMLStyleElement.class����-()Ljava/lang/String;()Z(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLStyleElement.javaLocalVariables +SourceFile getDisabledgetMediagetTypejava/lang/Objectorg/w3c/dom/html/HTMLElement!org/w3c/dom/html/HTMLStyleElement setDisabledsetMediasetType + PK +�QP%zT�>>.org/w3c/dom/html/HTMLTableCaptionElement.class����- +()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLTableCaptionElement.javaLocalVariables +SourceFilegetAlignjava/lang/Objectorg/w3c/dom/html/HTMLElement(org/w3c/dom/html/HTMLTableCaptionElementsetAlign   PK +�QP%5{�zz+org/w3c/dom/html/HTMLTableCellElement.class����-1 !()I()Ljava/lang/String;()Z(I)V(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLTableCellElement.javaLocalVariables +SourceFilegetAbbrgetAligngetAxis +getBgColor getCellIndexgetChgetChOff +getColSpan +getHeaders getHeight getNoWrap +getRowSpangetScope getVAligngetWidthjava/lang/Objectorg/w3c/dom/html/HTMLElement%org/w3c/dom/html/HTMLTableCellElementsetAbbrsetAlignsetAxis +setBgColor setCellIndexsetChsetChOff +setColSpan +setHeaders setHeight setNoWrap +setRowSpansetScope setVAlignsetWidth&"#$%'()*+, -./0 +PK +�QP%L� t��*org/w3c/dom/html/HTMLTableColElement.class����-()I()Ljava/lang/String;(I)V(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLTableColElement.javaLocalVariables +SourceFilegetAligngetChgetChOffgetSpan getVAligngetWidthjava/lang/Objectorg/w3c/dom/html/HTMLElement$org/w3c/dom/html/HTMLTableColElementsetAlignsetChsetChOffsetSpan setVAlignsetWidth  + PK +�QP%�7�'org/w3c/dom/html/HTMLTableElement.class����-:+,-()Ljava/lang/String;#()Lorg/w3c/dom/html/HTMLCollection; ()Lorg/w3c/dom/html/HTMLElement;,()Lorg/w3c/dom/html/HTMLTableCaptionElement;,()Lorg/w3c/dom/html/HTMLTableSectionElement;()V!(I)Lorg/w3c/dom/html/HTMLElement;(I)V(Ljava/lang/String;)V-(Lorg/w3c/dom/html/HTMLTableCaptionElement;)V-(Lorg/w3c/dom/html/HTMLTableSectionElement;)VCode +ConstantValue +ExceptionsHTMLTableElement.javaLocalVariables +SourceFile +createCaption createTFoot createTHead +deleteCaption deleteRow deleteTFoot deleteTHeadgetAlign +getBgColor getBorder +getCaptiongetCellPaddinggetCellSpacinggetFramegetRowsgetRules +getSummary +getTBodiesgetTFootgetTHeadgetWidth insertRowjava/lang/Objectorg/w3c/dom/html/HTMLElement!org/w3c/dom/html/HTMLTableElementsetAlign +setBgColor setBorder +setCaptionsetCellPaddingsetCellSpacingsetFramesetRules +setSummarysetTFootsetTHeadsetWidth"1 +(8'7#&. / 0  2 !3 "4 $5 %6 )9    * + PK +�QP%�+�*org/w3c/dom/html/HTMLTableRowElement.class����-&()I()Ljava/lang/String;#()Lorg/w3c/dom/html/HTMLCollection;!(I)Lorg/w3c/dom/html/HTMLElement;(I)V(Ljava/lang/String;)V$(Lorg/w3c/dom/html/HTMLCollection;)VCode +ConstantValue +ExceptionsHTMLTableRowElement.javaLocalVariables +SourceFile +deleteCellgetAlign +getBgColorgetCellsgetChgetChOff getRowIndexgetSectionRowIndex getVAlign +insertCelljava/lang/Objectorg/w3c/dom/html/HTMLElement$org/w3c/dom/html/HTMLTableRowElementsetAlign +setBgColorsetCellssetChsetChOff setRowIndexsetSectionRowIndex setVAlign#$ +  ! " % PK +�QP%"+77.org/w3c/dom/html/HTMLTableSectionElement.class����-()Ljava/lang/String;#()Lorg/w3c/dom/html/HTMLCollection;!(I)Lorg/w3c/dom/html/HTMLElement;(I)V(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLTableSectionElement.javaLocalVariables +SourceFile deleteRowgetAligngetChgetChOffgetRows getVAlign insertRowjava/lang/Objectorg/w3c/dom/html/HTMLElement(org/w3c/dom/html/HTMLTableSectionElementsetAlignsetChsetChOff setVAlign  PK +�QP%��2##*org/w3c/dom/html/HTMLTextAreaElement.class����-, !()I()Ljava/lang/String;$()Lorg/w3c/dom/html/HTMLFormElement;()V()Z(I)V(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLTextAreaElement.javaLocalVariables +SourceFileblurfocus getAccessKeygetColsgetDefaultValue getDisabledgetFormgetName getReadOnlygetRows getTabIndexgetTypegetValuejava/lang/Objectorg/w3c/dom/html/HTMLElement$org/w3c/dom/html/HTMLTextAreaElementselect setAccessKeysetColssetDefaultValue setDisabledsetName setReadOnlysetRows setTabIndexsetValue% +# +$ & ' +( ) * + +"PK +�QP%�x��..'org/w3c/dom/html/HTMLTitleElement.class����- +()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsHTMLTitleElement.javaLocalVariables +SourceFilegetTextjava/lang/Objectorg/w3c/dom/html/HTMLElement!org/w3c/dom/html/HTMLTitleElementsetText   PK +�QP%�!��ee'org/w3c/dom/html/HTMLUListElement.class����-()Ljava/lang/String;()Z(Ljava/lang/String;)V(Z)VCode +ConstantValue +ExceptionsHTMLUListElement.javaLocalVariables +SourceFile +getCompactgetTypejava/lang/Objectorg/w3c/dom/html/HTMLElement!org/w3c/dom/html/HTMLUListElement +setCompactsetType + PK +�QP%n�l��org/w3c/dom/NamedNodeMap.class����-()I(I)Lorg/w3c/dom/Node;&(Ljava/lang/String;)Lorg/w3c/dom/Node;&(Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;Code +ConstantValue +ExceptionsLocalVariablesNamedNodeMap.java +SourceFile getLength getNamedItemitemjava/lang/Objectorg/w3c/dom/DOMExceptionorg/w3c/dom/NamedNodeMapremoveNamedItem setNamedItem + + + PK +�QP%fIf���org/w3c/dom/Node.class����-C  +  =>?()Ljava/lang/String;()Lorg/w3c/dom/Document;()Lorg/w3c/dom/NamedNodeMap;()Lorg/w3c/dom/Node;()Lorg/w3c/dom/NodeList;()S()Z(Ljava/lang/String;)V&(Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;8(Lorg/w3c/dom/Node;Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;(Z)Lorg/w3c/dom/Node;ATTRIBUTE_NODECDATA_SECTION_NODE COMMENT_NODECode +ConstantValueDOCUMENT_FRAGMENT_NODE +DOCUMENT_NODEDOCUMENT_TYPE_NODE ELEMENT_NODE ENTITY_NODEENTITY_REFERENCE_NODE +ExceptionsLocalVariables +NOTATION_NODE Node.javaPROCESSING_INSTRUCTION_NODES +SourceFile TEXT_NODE appendChild cloneNode +getAttributes +getChildNodes +getFirstChild getLastChildgetNextSibling getNodeName getNodeType getNodeValuegetOwnerDocument +getParentNodegetPreviousSibling +hasChildNodes insertBeforejava/lang/Objectorg/w3c/dom/DOMExceptionorg/w3c/dom/Node removeChild replaceChild setNodeValue + #++-++%+$+*++!+ "+ + + (+ 57&B&69123:408<&A&@&.&;/,)PK +�QP%rI����org/w3c/dom/NodeList.class����- +()I(I)Lorg/w3c/dom/Node;Code +ConstantValue +ExceptionsLocalVariables +NodeList.java +SourceFile getLengthitemjava/lang/Objectorg/w3c/dom/NodeList   + PK +�QP%�b����org/w3c/dom/Notation.class����- +()Ljava/lang/String;Code +ConstantValue +ExceptionsLocalVariables +Notation.java +SourceFile getPublicId getSystemIdjava/lang/Objectorg/w3c/dom/Nodeorg/w3c/dom/Notation   + PK +�QP%f�~cc'org/w3c/dom/ProcessingInstruction.class����-()Ljava/lang/String;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsLocalVariablesProcessingInstruction.java +SourceFilegetData getTargetjava/lang/Objectorg/w3c/dom/DOMExceptionorg/w3c/dom/Node!org/w3c/dom/ProcessingInstructionsetData +   PK +�QP%�B�=org/w3c/dom/Text.class����-  +(I)Lorg/w3c/dom/Text;Code +ConstantValue +ExceptionsLocalVariables +SourceFile Text.javajava/lang/Objectorg/w3c/dom/CharacterDataorg/w3c/dom/DOMExceptionorg/w3c/dom/Text splitText + PK +� �(org/xml/PK +� �( org/xml/sax/PK +�QP%�z��NNorg/xml/sax/AttributeList.class����-()I(I)Ljava/lang/String;&(Ljava/lang/String;)Ljava/lang/String;AttributeList.javaCode +ConstantValue +ExceptionsLocalVariables +SourceFile getLengthgetNamegetTypegetValuejava/lang/Objectorg/xml/sax/AttributeList  + PK +�QP%S��e~~!org/xml/sax/DocumentHandler.class����-()V(Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)V0(Ljava/lang/String;Lorg/xml/sax/AttributeList;)V(Lorg/xml/sax/Locator;)V([CII)VCode +ConstantValueDocumentHandler.java +ExceptionsLocalVariables +SourceFile +characters endDocument +endElementignorableWhitespacejava/lang/Objectorg/xml/sax/DocumentHandlerorg/xml/sax/SAXExceptionprocessingInstructionsetDocumentLocator +startDocument startElement + + + +  +  + + PK +�QP%��i��org/xml/sax/DTDHandler.class����- 9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VK(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VCode +ConstantValueDTDHandler.java +ExceptionsLocalVariables +SourceFilejava/lang/Object notationDeclorg/xml/sax/DTDHandlerorg/xml/sax/SAXExceptionunparsedEntityDecl +   PK +�QP%���KK org/xml/sax/EntityResolver.class����-  +?(Ljava/lang/String;Ljava/lang/String;)Lorg/xml/sax/InputSource;Code +ConstantValueEntityResolver.java +ExceptionsLocalVariables +SourceFilejava/io/IOExceptionjava/lang/Objectorg/xml/sax/EntityResolverorg/xml/sax/SAXException +resolveEntity  PK +�QP%��4�BBorg/xml/sax/ErrorHandler.class����- +"(Lorg/xml/sax/SAXParseException;)VCode +ConstantValueErrorHandler.java +ExceptionsLocalVariables +SourceFileerror +fatalErrorjava/lang/Objectorg/xml/sax/ErrorHandlerorg/xml/sax/SAXExceptionwarning   +PK +�QP%���N��org/xml/sax/HandlerBase.class����-0!#$%&'( +  +()V(Ljava/lang/String;)V?(Ljava/lang/String;Ljava/lang/String;)Lorg/xml/sax/InputSource;'(Ljava/lang/String;Ljava/lang/String;)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VK(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V0(Ljava/lang/String;Lorg/xml/sax/AttributeList;)V(Lorg/xml/sax/Locator;)V"(Lorg/xml/sax/SAXParseException;)V([CII)VCode +ConstantValue +ExceptionsHandlerBase.javaLocalVariables +SourceFile +characters endDocument +endElementerror +fatalErrorignorableWhitespacejava/lang/Object notationDeclorg/xml/sax/DTDHandlerorg/xml/sax/DocumentHandlerorg/xml/sax/EntityResolverorg/xml/sax/ErrorHandlerorg/xml/sax/HandlerBaseorg/xml/sax/SAXExceptionprocessingInstruction +resolveEntitysetDocumentLocator +startDocument startElementunparsedEntityDeclwarning* �" +�. +�+ +�, + +� + +�- +�  +� +�  +�) + +�/ +� +�+� +*��PK +� �(org/xml/sax/helpers/PK +�QP% +�8�~~+org/xml/sax/helpers/AttributeListImpl.class����-VHIJKMN + + + + + +  ! " +" # +# +$ % +& +' +( +) * + 7- ?5 @2 A- B. C, D/ E/ F/ G1 L< O- Q0 R6 S, T< U<()I()V(I)Ljava/lang/Object;(I)Ljava/lang/String;(I)V(Ljava/lang/Object;)I(Ljava/lang/Object;)V&(Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/String;)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V(Lorg/xml/sax/AttributeList;)VAttributeListImpl.javaCode +ConstantValue +ExceptionsLjava/util/Vector;LocalVariables +SourceFile addAttribute +addElementclear elementAt getLengthgetNamegetTypegetValueindexOf(java/lang/ArrayIndexOutOfBoundsExceptionjava/lang/Objectjava/lang/Stringjava/util/Vectornamesorg/xml/sax/AttributeList%org/xml/sax/helpers/AttributeListImplremoveAllElementsremoveAttributeremoveElementAtsetAttributeListsizetypesvaluesL<T<U< 7-92&*�*�Y��*�Y��*�Y���7697+*�*�Y��*�Y��*�Y��*+��R69>2+� +=*� >�*+�+�+�� ����?59%*�+� +*�,� +*�-� +�P492&*�+�=�*��*��*���A-9"*��*��*���C,9*���D/9#*�� ��W� E/9#*�� ��W� F/9#*�� ��W� E39 +**�+���F39 +**�+���>8PK +�QP%�����%org/xml/sax/helpers/LocatorImpl.class����-<245 +        + + + +  $ -( . / 0 1 3( 6) 7! 8! 9" :" ;)()I()Ljava/lang/String;()V(I)V(Ljava/lang/String;)V(Lorg/xml/sax/Locator;)VCode +ConstantValue +ExceptionsILjava/lang/String;LocalVariablesLocatorImpl.java +SourceFile columnNumbergetColumnNumber +getLineNumber getPublicId getSystemIdjava/lang/Object +lineNumberorg/xml/sax/Locatororg/xml/sax/helpers/LocatorImplpublicIdsetColumnNumber +setLineNumber setPublicId setSystemIdsystemId6);)3(-( +$ %*��$#%9-*�*+��*+� �*+�� +*+�� �0%*� �1%*��/%*� +�.%*��9"%*+� �:"%*+��8!%*� +�7!%*��,+PK +�QP%�"!���'org/xml/sax/helpers/ParserFactory.class����-5#2()*+,-./34 +  + + + + +   & ' 1()Ljava/lang/Object;()Lorg/xml/sax/Parser;()V%(Ljava/lang/String;)Ljava/lang/Class;&(Ljava/lang/String;)Ljava/lang/String;((Ljava/lang/String;)Lorg/xml/sax/Parser;(Ljava/lang/String;)VCode +ConstantValue +ExceptionsLocalVariables No value for sax.parser propertyParserFactory.java +SourceFileforName getPropertyjava/lang/Classjava/lang/ClassCastException java/lang/ClassNotFoundException java/lang/IllegalAccessException java/lang/InstantiationExceptionjava/lang/NullPointerExceptionjava/lang/Objectjava/lang/System +makeParser newInstanceorg.xml.sax.parserorg/xml/sax/Parser!org/xml/sax/helpers/ParserFactory  0+�K*� +�Y��*��� �!  0 *��� �! +*� +�%$PK +�QP%w�I���org/xml/sax/InputSource.class����-7./ +  +    + + +   &! '" (# 0# 1 2 5 6#()Ljava/io/InputStream;()Ljava/io/Reader;()Ljava/lang/String;()V(Ljava/io/InputStream;)V(Ljava/io/Reader;)V(Ljava/lang/String;)VCode +ConstantValue +ExceptionsInputSource.javaLjava/io/InputStream;Ljava/io/Reader;Ljava/lang/String;LocalVariables +SourceFile +byteStreamcharacterStreamencoding +getByteStreamgetCharacterStream getEncoding getPublicId getSystemIdjava/lang/Objectorg/xml/sax/InputSourcepublicId +setByteStreamsetCharacterStream setEncoding setPublicId setSystemIdsystemId0#6#&!(#'"*�� +*�*+� +� +*�*+�� +*�*+� �4*+��,*��5*+� �-*� �1*+��)*��3*+��+*��2*+��**��% PK +�QP%~�+0org/xml/sax/Locator.class����-()I()Ljava/lang/String;Code +ConstantValue +ExceptionsLocalVariables Locator.java +SourceFilegetColumnNumber +getLineNumber getPublicId getSystemIdjava/lang/Objectorg/xml/sax/Locator +   + PK +�QP%�#��``org/xml/sax/Parser.class����-(Ljava/lang/String;)V(Ljava/util/Locale;)V(Lorg/xml/sax/DTDHandler;)V (Lorg/xml/sax/DocumentHandler;)V(Lorg/xml/sax/EntityResolver;)V(Lorg/xml/sax/ErrorHandler;)V(Lorg/xml/sax/InputSource;)VCode +ConstantValue +ExceptionsLocalVariables Parser.java +SourceFilejava/io/IOExceptionjava/lang/Objectorg/xml/sax/Parserorg/xml/sax/SAXExceptionparse +setDTDHandlersetDocumentHandlersetEntityResolversetErrorHandler setLocale  + PK +�QP%z���org/xml/sax/SAXException.class����-$ " +  + + +     !()Ljava/lang/Exception;()Ljava/lang/String;()V(Ljava/lang/Exception;)V(Ljava/lang/String;)V*(Ljava/lang/String;Ljava/lang/Exception;)VCode +ConstantValue +ExceptionsLjava/lang/Exception;Ljava/lang/String;LocalVariablesSAXException.java +SourceFile exception getException +getMessagejava/lang/Exceptionjava/lang/Throwablemessageorg/xml/sax/SAXExceptiontoString!*�*+�*��*�*�*+��*�*+�*,��'*��*�� *���*�� +*��#*��PK +�QP%���F��#org/xml/sax/SAXParseException.class����-4/01 + +           )$ * + , - .$ 2% 3%()I()Ljava/lang/String;(Ljava/lang/String;)V*(Ljava/lang/String;Ljava/lang/Exception;)V;(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;II)VP(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/lang/Exception;)V*(Ljava/lang/String;Lorg/xml/sax/Locator;)V?(Ljava/lang/String;Lorg/xml/sax/Locator;Ljava/lang/Exception;)VCode +ConstantValue +ExceptionsILjava/lang/String;LocalVariablesSAXParseException.java +SourceFile columnNumbergetColumnNumber +getLineNumber getPublicId getSystemId +lineNumberorg/xml/sax/Locatororg/xml/sax/SAXExceptionorg/xml/sax/SAXParseExceptionpublicIdsystemId2%3%.$)$ !:.*+�*,� � *,� +� +*,�� *,��� !;/*+-�*,� � *,� +� +*,�� *,��� !(*+�*,� *-� +*� *�� !**+�*,� *-� +*� *��,!*� �-!*� +�+!*� �*!*��('PK +� �(oracle/PK +� �( oracle/xml/PK +� �(oracle/xml/parser/PK +� �(oracle/xml/parser/v2/PK +� �(I*�Z��'oracle/xml/parser/v2/AdditiveExpr.class����-H=>?@ABCD + + + +   + +   + +! +" +# ,% 4( 5) 6/ 71 8$ 9+ :/ ;1 <$ E* F& G'()I()V&(D)Loracle/xml/parser/v2/XSLExprValue;(I)V%(Loracle/xml/parser/v2/XSLExprBase;)VJ(Loracle/xml/parser/v2/XSLExprValue;Loracle/xml/parser/v2/XSLExprValue;I)DI(Loracle/xml/parser/v2/XSLParseString;)Loracle/xml/parser/v2/XSLExprBase;G(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLExprValue;Code +ExceptionsILineNumberTable"Loracle/xml/parser/v2/XSLExprBase; +SourceFile XSLExpr.java +addElement +arithmetic classtype firstExpr getOperatorgetValue lookaheadnextExpr nextToken!oracle/xml/parser/v2/AdditiveExpr'oracle/xml/parser/v2/MultiplicativeExproracle/xml/parser/v2/RelExpr!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue#oracle/xml/parser/v2/XSLParseStringparsesetNumberValue setOperator ,%-*� +�0�9+-u5*�M,+�N�!,�+�:--,�� �N,�M,����-�0.   +  ',3.E*-?*�M*� +��2�Y� L+,� ,*��*�W*�M+,� *� +����+M,�0. �����#�(�-�2;=.23PK +� �(�aZ���"oracle/xml/parser/v2/AndExpr.class����-A789:;<=> + + + +   + +  + + + (! (' 0# 1+ 2- 3" 4% 5- 6 ?$ @&()I()V()Z%(Loracle/xml/parser/v2/XSLExprBase;)VI(Loracle/xml/parser/v2/XSLParseString;)Loracle/xml/parser/v2/XSLExprBase;G(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLExprValue;&(Z)Loracle/xml/parser/v2/XSLExprValue;(Z)VCode +ExceptionsILineNumberTable"Loracle/xml/parser/v2/XSLExprBase; +SourceFile XSLExpr.java +addElement classtype firstExprgetBooleanValuegetValuenextExpr nextTokenoracle/xml/parser/v2/AndExproracle/xml/parser/v2/EqualExpr!oracle/xml/parser/v2/XSLExceptionoracle/xml/parser/v2/XSLExpr oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue#oracle/xml/parser/v2/XSLParseStringparsesetBooleanValue (!)*� +�,g4%)u5*�MN�,+�N-�� -��,�M,���-� �Y� N-�,. ��� +����"�&�*�3�*?$)z:*�M*� +�-�Y� L+,� �*�W*�M+,� *� +���+M,�,. nprstv#w(x-t6z8|*./PK +� �(T���} } #oracle/xml/parser/v2/AttrDecl.class����-�P QRSTcegklqrsyz{��������� +: +"; +< + = > ? @ +A "B C "D E +F "G +H + I +J K +#L +#M +#N +#O d^ da ] �V �p �p �v �Y �~ �v �x �v �U �v �V �Z �\ �w �[ �^ �X �^ #FIXED#IMPLIED #REQUIRED()I()Ljava/lang/String;()Ljava/util/Vector;()V(I)Ljava/lang/Object;(I)Ljava/lang/String;(I)V&(Ljava/lang/Object;)Ljava/lang/String;,(Ljava/lang/String;)Ljava/lang/StringBuffer;(Ljava/lang/String;)V(Ljava/lang/String;I)V:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V(Ljava/lang/String;S)V*(Loracle/xml/parser/v2/XMLOutputStream;Z)V +> +AttrDecl.javaCDATACode +ConstantValueDEFAULTENTITIESENTITY ENUMERATION +ExceptionsFIXEDIIDIDREFIDREFSIMPLIEDLineNumberTableLjava/lang/String;Ljava/util/Vector;Loracle/xml/parser/v2/XMLNode;NMTOKENNMTOKENSNOTATIONREQUIRED +SourceFileZappendattPresToStringattpresatttypedef elementAtexternalgetAttrPresence getAttrTypegetDefaultValuegetEnumerationValuesjava/io/IOExceptionjava/io/Serializablejava/lang/Stringjava/lang/StringBufferjava/util/Vector localnameoracle/xml/parser/v2/AttrDecl!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLNode$oracle/xml/parser/v2/XMLOutputStreamparentprefixprintsizetagtoString typeToStringvalueOfvalueswrite +writeChars writeNewLinewriteQuotedString! "!gpiqpirpispilpikpiypizpi {pi +mpi jpi|pitpiopi�p�p�v�w�v�v d_hI*+�%*�(*�)*�/*+�-�u�� ����d`hI*+�%*�(*�)*,�/*-�-�u�� �����VhT,*�(�%"�� +��u� �#�&�)��Uh*�(�u��Uh*�)�u��Vh*�*�u��Wh*�5�u��bhn�*�,��+�7+�Y*�.�1�4�$ �&�2�7+�Y*�1�4�$ �&�2�7*�) � +�Y*�)�3�4�$ �&�2�7*�) � *�)�Q*�5�0>+(�6+*�5�+��76�+|�6+*�5�+��7����+)�6+ �6*�(�+*�'�7+ �6*�*� +*�*�9+�7+�8�ub+ E +N k }�������������� �!�n �Zh�R�NK369<?BEH����������u. �4�7�:�=�@�C�F�I�L�O�}fPK +� �(;(d��oracle/xml/parser/v2/Axis.class����-K-<=>?@ABCDEFG + +  +  +  + + + + + + ! " .% .' 5, 6) 8( 9# :$ ;& I% J2()Ljava/lang/String;()S()V(I)Lorg/w3c/dom/Node;(I)V(Ljava/lang/Object;)Z'(Ljava/lang/String;Ljava/lang/String;)Z�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;n(Loracle/xml/parser/v2/XSLNodeList;IIIILjava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XSLNodeList;(Lorg/w3c/dom/Node;)V*Code +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javaaddNodecheckNamespacedefaultAxisNodeTestequals getNodeName getNodeTypeitemjava/lang/Objectjava/lang/Stringoracle/xml/parser/v2/Axisoracle/xml/parser/v2/FilterExpr!oracle/xml/parser/v2/FromAncestororacle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNode#oracle/xml/parser/v2/XPathException!oracle/xml/parser/v2/XSLException%oracle/xml/parser/v2/XSLExprConstants oracle/xml/parser/v2/XSLNodeListorg/w3c/dom/NodeprocessAxisNodeTestreset +resultlist  J2.%/0*�*� Y���1CAC7+/� + *��6��+��: ������B�������������������{����B*f ��� ����*� ��| ��s*� ��g ��]�� ���F*� ��: ��1*� ��% ��*� ��*� ��`6�� +*��1fTU +WY\]e^t_}`�b�c�d�f�g�h�i�k�l�m�o�p�q�t�u�U|H*/# � Yl��1J0 +34PK +� �(�Zs�;;#oracle/xml/parser/v2/CMChoice.class����-]BIJKRSTUVWX + + + + +! " +# $ +% & ' +( +) +* + , + - 9/ 95 D8 E. E6 F@ G1 L@ M1 NA O? P0 Q4 Y7 ZA [= \3()Ljava/lang/Object;()V()Z(I)Ljava/util/BitSet; (I)Loracle/xml/parser/v2/CMNode;(I)V(Ljava/util/BitSet;)V=(Loracle/xml/parser/v2/CMNode;Loracle/xml/parser/v2/CMNode;)VB(Loracle/xml/parser/v2/ContentModel;)Loracle/xml/parser/v2/CMNode;*(Loracle/xml/parser/v2/XMLOutputStream;I)V([Ljava/util/BitSet;)VCodeContentModel.java +ExceptionsILineNumberTableLjava/lang/String;Ljava/util/BitSet;Loracle/xml/parser/v2/CMNode;OR +SourceFile +calcfollowposclonefirstfirstposgetChildjava/io/IOExceptionjava/io/Serializablejava/util/BitSetlastlastposleftnamenullableororacle/xml/parser/v2/CMChoiceoracle/xml/parser/v2/CMNodeoracle/xml/parser/v2/CMNodeSeq#oracle/xml/parser/v2/CMQuestionMark oracle/xml/parser/v2/ElementDecl!oracle/xml/parser/v2/XMLConstants$oracle/xml/parser/v2/XMLOutputStreamprintrighttagwrite  +NAZA95:H*� *�*�*+�*,��>�� ����D8:1*�+�*�+��>���E6:0�Y*�+�*�+�� +�>�G1:Q-*��$**�����*�*���*��>���(�H2:=�*���*���>�� ���M1:Q-*��$**�����*�*���*��>���(�P0:2*���*�����>�Y7:g3|� +(�*�+|�+|�*�+|�|� +)��>"�� ���&�,�2�<C;PK +� �(pJp���!oracle/xml/parser/v2/CMLeaf.class����-wPZ[\]^_`fghijkl + +$ +% +% + & +' +( +) +* ++ , +- . +/ +0 +1 2 3 +4 +5 +6 F8 F< FC R> U? VM X= aM cO dL mJ o@ p< q7 rO sN tJ u< vA()I()V()Z(I)Ljava/util/BitSet; (I)Loracle/xml/parser/v2/CMNode;(I)V&(Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/Object;)V(Ljava/lang/Object;)Z8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/String;)VB(Loracle/xml/parser/v2/ContentModel;)Loracle/xml/parser/v2/CMNode;8(Loracle/xml/parser/v2/ContentModel;Ljava/lang/String;)V*(Loracle/xml/parser/v2/XMLOutputStream;I)V([Ljava/util/BitSet;)VCodeContentModel.java +ExceptionsILineNumberTableLjava/lang/String;Ljava/util/BitSet;Ljava/util/Hashtable;Ljava/util/Vector;PCDATA +SourceFile +addElement +calcfollowposcloneequalsfirstfirstposgetgetChildjava/io/IOExceptionjava/io/Serializablejava/lang/Integerjava/lang/Stringjava/util/BitSetjava/util/Hashtablejava/util/Vectorlastlastpos leafnodesnamenullableoracle/xml/parser/v2/CMLeaforacle/xml/parser/v2/CMNodeoracle/xml/parser/v2/CMNodeSeq!oracle/xml/parser/v2/ContentModel oracle/xml/parser/v2/ElementDecl!oracle/xml/parser/v2/XMLConstants$oracle/xml/parser/v2/XMLOutputStreamposprintputsetsizesymbols symboltabletagwrite +writeChars +mJFCG�R*�*�!*,�*+���+�*�,�-+� ,��"+� ,�Y+����W+�,��K& �� ���#�2�I�Q�SEG�K�TBG% +� Y+*���K�W:GG#*��*�Y��*�*��*��K����Y;G�K�b:GG#*��*�Y��*�*��*��K����e9G+ *����K�� �nDG�r*��m*���,*� +(�"+#�"+*��#*�A+)�"�8*�?� ++��+(�"+*��#+)�"� +*��#�KN�����%�-�3�9�<BHNRX ` +fiq�IQHPK +� �($7$�[[!oracle/xml/parser/v2/CMNode.class����-- !"'()* +  +()V()Z(I)Ljava/util/BitSet; (I)Loracle/xml/parser/v2/CMNode;B(Loracle/xml/parser/v2/ContentModel;)Loracle/xml/parser/v2/CMNode;*(Loracle/xml/parser/v2/XMLOutputStream;I)V([Ljava/util/BitSet;)VCodeContentModel.java +ExceptionsILineNumberTableLjava/lang/String;Ljava/util/BitSet; +SourceFile +calcfollowposcloneemptyfirstfirstposgetChildjava/io/IOExceptionjava/io/Serializablejava/lang/Objectlastlastposnamenullableoracle/xml/parser/v2/CMLeaforacle/xml/parser/v2/CMNode!oracle/xml/parser/v2/ContentModel!oracle/xml/parser/v2/XMLConstantsprinttag ,%# +*���  +$ & +PK +� �(BZ���$oracle/xml/parser/v2/CMNodeSeq.class����-a=MNOVWXYZ[\ + + + +! +" # +$ +% & +' ( ) +* ++ +, - . + / <1 <8 G; H0 H9 ID J3 K6 PD Q3 RE SC T2 U7 ]: ^E _A `5()Ljava/lang/Object;()V()Z(I)Ljava/util/BitSet; (I)Loracle/xml/parser/v2/CMNode;(I)V(I)Z(Ljava/util/BitSet;)V=(Loracle/xml/parser/v2/CMNode;Loracle/xml/parser/v2/CMNode;)VB(Loracle/xml/parser/v2/ContentModel;)Loracle/xml/parser/v2/CMNode;*(Loracle/xml/parser/v2/XMLOutputStream;I)V([Ljava/util/BitSet;)VCOMMACodeContentModel.java +ExceptionsILineNumberTableLjava/lang/String;Ljava/util/BitSet;Loracle/xml/parser/v2/CMNode; +SourceFile +calcfollowposclonefirstfirstposgetgetChildjava/io/IOExceptionjava/io/Serializablejava/util/BitSetlastlastposleftnamenullableororacle/xml/parser/v2/CMChoiceoracle/xml/parser/v2/CMLeaforacle/xml/parser/v2/CMNodeoracle/xml/parser/v2/CMNodeSeq oracle/xml/parser/v2/ElementDecl!oracle/xml/parser/v2/XMLConstants$oracle/xml/parser/v2/XMLOutputStreamprintrighttagwrite  +RE^E<8>H*� *�*�*+�*,��B!# $%&!G;>�J*�+�*�+�+�=*��N*��:+�d6�-�� +2������B* +bcefg&h/j8lAhI`H9>0�Y*�+�*�+�� +�B4J3>vF*��=*���'**�����*�*����**���*��B>@B#C2@5GAKL4>=�*���*���B+, -./Q3>vF*��=*���'**�����*�*����**���*��BPRT#U2R5YA]T2>2*��� +*�����B9]:>g3,� +(�*�+,�+,�*�+,�,� +)��B"st uvw&x,y2q@F?PK +� �(�x��!oracle/xml/parser/v2/CMPlus.class����-C'03489:;<=> + + +   + +  +  +  ( ($ 2% 5. 6/ 7! ?& @, A" B#()V()Z(I)V(Ljava/lang/String;)V (Loracle/xml/parser/v2/CMNode;)VB(Loracle/xml/parser/v2/ContentModel;)Loracle/xml/parser/v2/CMNode;*(Loracle/xml/parser/v2/XMLOutputStream;I)V+)CodeContentModel.java +ExceptionsILineNumberTableLjava/lang/String;Loracle/xml/parser/v2/CMNode;PLUS +SourceFileclonejava/io/IOExceptionjava/io/Serializablenamenodenullableoracle/xml/parser/v2/CMNodeoracle/xml/parser/v2/CMPlusoracle/xml/parser/v2/CMStar!oracle/xml/parser/v2/ContentModel oracle/xml/parser/v2/ElementDecl!oracle/xml/parser/v2/XMLConstants$oracle/xml/parser/v2/XMLOutputStreamprinttagwrite +writeChars  +($)?*� *�*�*+��-rt uvr2%)(�Y*�+�� +�-{7!) *���-�?&)t<*�?� +�+(�*�++�+��*�++�++��-& ����"�(�+�5�;�+1*PK +� �(A��gg)oracle/xml/parser/v2/CMQuestionMark.class����-U3<CDJKLMNOP + + + +  +  +! " # +$ % + & + ' 2( 2. >1 ?/ @: A* E: F* G9 H; Q0 R7 S, T-()V()Z(I)Ljava/util/BitSet; (I)Loracle/xml/parser/v2/CMNode;(I)V(Ljava/lang/String;)V (Loracle/xml/parser/v2/CMNode;)VB(Loracle/xml/parser/v2/ContentModel;)Loracle/xml/parser/v2/CMNode;*(Loracle/xml/parser/v2/XMLOutputStream;I)V([Ljava/util/BitSet;)V?)CodeContentModel.java +ExceptionsILineNumberTableLjava/lang/String;Ljava/util/BitSet;Loracle/xml/parser/v2/CMNode;QMARK +SourceFile +calcfollowposclonefirstfirstposgetChildjava/io/IOExceptionjava/io/Serializablelastlastposnamenodenullableoracle/xml/parser/v2/CMChoiceoracle/xml/parser/v2/CMNode#oracle/xml/parser/v2/CMQuestionMarkoracle/xml/parser/v2/CMStar oracle/xml/parser/v2/ElementDecl!oracle/xml/parser/v2/XMLConstants$oracle/xml/parser/v2/XMLOutputStreamprinttagwrite +writeChars  +H;2.4?*� *�*�*+��8�� ���>14% *�+��8 +�?/4(�Y*�+�� +�8�A*48*��**���*��8���B+4+ �*���8�� �F*48*��**���*��8���I)4�8�Q04t<*�?� +�+(�*�+?�+��*�+?�+?��8&  " +(+5;6=5PK +� �(W]�TYY!oracle/xml/parser/v2/CMStar.class����-a;=MNOVWXYZ[\ + + +! +" # +$ + $ +% & +' + ' ( ) +* ++ , + - + . </ <7 G: H8 ID J1 K4 PD Q1 RC SE U6 ]9 ^A _3 `5()V()Z(I)Ljava/util/BitSet; (I)Loracle/xml/parser/v2/CMNode;(I)V(I)Z(Ljava/lang/String;)V(Ljava/util/BitSet;)V (Loracle/xml/parser/v2/CMNode;)VB(Loracle/xml/parser/v2/ContentModel;)Loracle/xml/parser/v2/CMNode;*(Loracle/xml/parser/v2/XMLOutputStream;I)V([Ljava/util/BitSet;)V*)ASTERISKCodeContentModel.java +ExceptionsILineNumberTableLjava/lang/String;Ljava/util/BitSet;Loracle/xml/parser/v2/CMNode; +SourceFile +calcfollowposclonefirstfirstposgetgetChildjava/io/IOExceptionjava/io/Serializablejava/util/BitSetlastlastposnamenodenullableororacle/xml/parser/v2/CMNodeoracle/xml/parser/v2/CMPlus#oracle/xml/parser/v2/CMQuestionMarkoracle/xml/parser/v2/CMStar oracle/xml/parser/v2/ElementDecl!oracle/xml/parser/v2/XMLConstants$oracle/xml/parser/v2/XMLOutputStreamprinttagwrite +writeChars  SE </>6*� +*�*��B#% &#<7>?*� +*�*�*+��B  G:>t<*�+�+�=*�W*�W+�d>�*��� ++2*�������B& OQ RSUW*Y4U;MH8>(� Y*�+���B3J1>8*��**���*��B=?AL2>+ �*���B+, .Q1>8*��**���*��BFHJT0>�B8]9>t<*�?� +�+(�*�+*�+��*�+*�+*��B& `acd"e(`+i5j;^@F?PK +� �(�� +���#oracle/xml/parser/v2/CharData.class����-[IJKLNOPQR + + + + + + + + +! +" +# +$ % +& +' 84 85 87 ?3 A+ B2 F) G* M( U6 V, V- X= Y) Z1()I()Ljava/lang/String;!()Loracle/xml/parser/v2/XMLError;()V(I)Ljava/lang/String;(II)Ljava/lang/String;(II)V(IILjava/lang/String;)V(ILjava/lang/String;)V&(Ljava/lang/Object;)Ljava/lang/String;&(Ljava/lang/String;)Ljava/lang/String;,(Ljava/lang/String;)Ljava/lang/StringBuffer;(Ljava/lang/String;)V(Ljava/lang/String;S)V(Ljava/lang/String;Z)V#(SLoracle/xml/parser/v2/XMLError;)V +CharData.javaCode +ExceptionsLineNumberTableLjava/lang/String; +SourceFileappend +appendData +checkReadOnlyconcat +deleteDatagetData getLengthgetText getXMLError +insertDatajava/io/Serializablejava/lang/Stringjava/lang/StringBuffer)java/lang/StringIndexOutOfBoundsExceptionlengthoracle/xml/parser/v2/CharData$oracle/xml/parser/v2/XMLDOMExceptionoracle/xml/parser/v2/XMLNodeorg/w3c/dom/CharacterDataorg/w3c/dom/DOMException replaceDatasetData setNodeValue substring +substringDatatexttoStringvalueOf  85:#*+� �< +<:@4:1*�**�+���<���; C.:}=*�*�Y*���� +*�`�� +���W�Y*�� ��+.<& ���+�.�/�4�8�<�; D):*��<T; E(: *���<zH0:?*�*�Y*���� +,� +*��� +���W�Y*�� ��-0<& ���-�0�1�6�:�>�; S/:�A*�*�Y*���� +-� +*�`�� +���W�Y*�� ��/2<& ���/�2�3�8�<�@�; T4:"*+��< +YW; U4:#*+��< +hf; U6:2�*�*+��<mnp +k; W-:N*�`��W�Y*�� � <�� � +���; >9PK +� �( Dz�p!p!'oracle/xml/parser/v2/ContentModel.class����-O������$%&'()*+,-./01234567 +o +o + +p +p +p +q +!r +s +s +s +t +t +u v +w +!x +y +z +{ +| +| } +~ + � � + � +� +� +� +� +� +� +!� &� + � + � +!� +!� +� � + +� +$� &� � � � � +� +� +� +� +� � +� +� +� � +� +$� +� +$� � � � � +$� � $� +� +"� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � � � � � � � � �  +�  �  �  +� � � � � � � � � !� "� #� 9� :� ;� <� =� >� ?� @� A� B� C� D� E� F� G� H� I� J� K� L� M� N� ()I()Ljava/lang/Object;()Ljava/lang/String;()Ljava/util/Enumeration;()Ljava/util/Vector;()Loracle/xml/parser/v2/CMNode;()Lorg/w3c/dom/Node;()Lorg/w3c/dom/NodeList;()S()V()Z(I)Ljava/lang/Object;(I)Ljava/lang/String;(I)Ljava/util/BitSet;(I)Ljava/util/Vector; (I)Loracle/xml/parser/v2/CMNode;(I)Lorg/w3c/dom/Node;(I)V(I)Z'(ILjava/lang/String;)Ljava/lang/String;&(Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/Object;)V(Ljava/lang/Object;)Z8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/String;)V(Ljava/lang/String;S)V(Ljava/util/BitSet;)V<(Loracle/xml/parser/v2/CMNode;)Loracle/xml/parser/v2/CMNode;=(Loracle/xml/parser/v2/CMNode;)Loracle/xml/parser/v2/XMLNode; (Loracle/xml/parser/v2/CMNode;)V=(Loracle/xml/parser/v2/CMNode;Loracle/xml/parser/v2/CMNode;)V8(Loracle/xml/parser/v2/ContentModel;Ljava/lang/String;)V(Loracle/xml/parser/v2/DTD;)Z%(Loracle/xml/parser/v2/ParserState;)Z7(Loracle/xml/parser/v2/ParserState;Ljava/lang/String;)Z>(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/DTD;)IO(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/DTD;)Ljava/util/Vector;>(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/DTD;)ZB(Loracle/xml/parser/v2/XMLError;Loracle/xml/parser/v2/XMLReader;)V<(Loracle/xml/parser/v2/XMLNode;ILoracle/xml/parser/v2/DTD;)I)(Loracle/xml/parser/v2/XMLOutputStream;)V*(Loracle/xml/parser/v2/XMLOutputStream;I)V8(Loracle/xml/parser/v2/XMLReader;Ljava/lang/String;IIZ)V'(Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node;([Ljava/util/BitSet;)V*ANYBCode +ConstantValueContentModel.javaDtransELEMENTSEMPTY +ExceptionsILineNumberTableLjava/lang/String;Ljava/util/Hashtable;Ljava/util/Vector;Loracle/xml/parser/v2/CMLeaf;Loracle/xml/parser/v2/CMNode;Loracle/xml/parser/v2/XMLError; Loracle/xml/parser/v2/XMLReader;MIXEDPCDATA +SourceFile[I +addElement appendChildbuldTree +calcfollowposcheckAcceptState checkContent +checkStatecontainscontent elementAtelementsendleaferrerrorexpectedElements +finishNodefirstposgetgetChild +getChildNodesgetContentElements getLength getMessage0 getMessage1 getNodeName getNodeTypegetRootgetStatehasMoreElementsintValueisEOFitemjava/io/IOExceptionjava/io/Serializablejava/lang/Integerjava/lang/Objectjava/lang/Stringjava/util/BitSetjava/util/Enumerationjava/util/Hashtablejava/util/Vector leafnodesleftmsgname nextElementororacle/xml/parser/v2/CMChoiceoracle/xml/parser/v2/CMLeaforacle/xml/parser/v2/CMNodeoracle/xml/parser/v2/CMNodeSeqoracle/xml/parser/v2/CMPlus#oracle/xml/parser/v2/CMQuestionMarkoracle/xml/parser/v2/CMStar!oracle/xml/parser/v2/ContentModel oracle/xml/parser/v2/ElementDecl oracle/xml/parser/v2/ParserState!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNode$oracle/xml/parser/v2/XMLOutputStream&oracle/xml/parser/v2/XMLParseExceptionoracle/xml/parser/v2/XMLReaderorg/w3c/dom/Nodeorg/w3c/dom/NodeListorg/xml/sax/SAXExceptionparseContentModel parseList +parseMixed parseNode +parseRootNodeposprintputreadNamereaderremoveElementAt scanQNamesizeskipWhiteSpacestatesymbols symboltabletagtryReadtypevalModevalidateContent +writeChars! ����H�G���������������K�� ����A����*�(��M���F�+��+�V��!Y�Y+�V�-+�i��.M��!Y�Y�-+�i��.M+�i�����&Gzh�,*+�H�8�7W,*+�H�8�7W�Z,*+�H�8�7W,*+�H�8�7W�9,*+�H�8�7W�',*+�H�8�7W�,*+�H�8�7W�,��R��� +�%�(�>�h�w��������������������������Q1*�k� *�k��*�5+�f�>� +*�g�d.����CDF�#����M*�k��*�k��*�h,�G� +N-�*-�Q6*�5+�f�>� +.6� +�f���2 )* +,-/ 1$3*4=5C7I8K;�#���+ +�6+�N� + :�[+�N� +�M:�J+�N�@+�I:�J66���S�!: * -�:=������*�h�G� +:��Q6*�5�>� +.6�+�N�+�-�m�6��f�� � #+1:= @ Q Z fhjx}��������m*�5�>� +M�Y�)N*�T�?:�D�W��V:�0-�<�'*�h�G� +:�,�Q.� -�6�P���-��* +c df h/i=kKl[nafks��8*+,�O>� *�C���WX Y[���Y*�a*�j�*�a�eW�Y+�1�*�a+�j�*�a�eW�Y+�/�*�a?�j�*�a�eW�Y+�0�+��* +� ���)�1�:�F�N�W��'  ��7*�k� *�k��*�g��NOP��% +**�=�H�8�����yA+�IN-�J666�-��S�!:*,�:6� �����& �� +����&�1�>�8��88*+�A*,�a*�Y�)�T*�Y�,�h*�Y�)�g**�\�=*�a*�Y*�4�@*�Y*�=*�@�3�=*�T�d>�:6��Y�+S����*�=�9�Y�):*�Y�)�5�Y�):�Y�,:�Y�+:  � +Y�*�_W6 +*�=�E:  � +Y�d�*�_W �6 �6*�g�d`� +: *�5 �6 *�@�]�F� *�g�dO�*�5 +�>� +: +�>�: �b6��*�g�>�:�Y�+:6�. �F�!*�T�>��V� +2�X�����G� +:�\�d6� +Y�*�_W�6�6*�g�d`� +: *�5 �6*�@�]�F� *�g�dO� +�Q6 +O�*�g�d��-� +�d������;�� +��"�-�5�:�G�Z�b�h�n�{��������������������������� ��#�.�1�?�J�P�V�d�n�t�~����� � � � +����  �,/�7��' 9���'�Y�,L,6*�[N*�a�eW*�a,�j�,6�Y-*�[�3N�a*�a|�j�G|6*�[:��'+��V�;�+��V��V�_W�Y-�2N�*�a)�j�-�*�a�eW*�a)�j�-�,�*�a,�j��Y-*�[�3N���|�O*�a|�j�C*�[:��'+��V�;�+��V��V�_W�Y-�2N��w-��� s +vyz{'}+~8{;�G�K�Q�Y�h�}�����������������������������"�%��' :����Y�,:*�k*�`L+ �*�A*�a*�An�Kn�B�Y*+�4M++�_W*�a)�j���Y,�1M,�*�a|�j�i*�[N-��P-��V�;�-*�A*�a*�Ao-��V�Lo*�a�l`�B�-��V-��V�_W�Y,-�2M�A*�a)�j�?*�a*�j�*�A*�a*�Ad�Ld�B�Y,�1M� +*�a�R��I,��z; >ABC3E=FEHQJZK\PhRmStU�W�X�W�U�[�]�P�_�a�c�d�cf g Nl�' ;���O*�a�eW*�a(�j� *�YL�0*�`M�Y*,�4L,�L*�A*�a*�Ag�Kg�B*+�D��* +�����!�+�/�1�I��' <��r:*�k*�a(�j�**�a�eW*�a#�j� *�ZL�*�YL*+�D���& '),-%.*--02183�' >���K*�k�F )22+�n� +�n�*�=��UM,+�^���& x${*|-~36�A�G�Jv� @��>*�a�eW*�a�cL*�a�eW+�������' M��N&*+,�O>�*�5�>� +*�g�d.������ �"�$���PK +� �(�����$oracle/xml/parser/v2/DOMParser.class����-������������� +1 +1 + 1 + 2 + +3 + +4 5 6 6 7 8 9 9 +: + ; < += +> ? + +@ + +A + +B + +C D +E + E +F +G +H +I +J +K + L +M +N O eS e\ e` uS vm wj xq yr zo {t ~T k �S �\ �l �V �[ �_ �b �p �S �d �d �W �X �Y �a �d �d �P �n()Ljava/lang/String;()Loracle/xml/parser/v2/DTD;$()Loracle/xml/parser/v2/XMLDocument;()V()Z*(Ljava/io/InputStream;Ljava/lang/String;)V<(Ljava/io/InputStream;Ljava/lang/String;Ljava/lang/String;)V(Ljava/io/OutputStream;)V+(Ljava/io/OutputStream;Ljava/lang/String;)V(Ljava/io/PrintWriter;)V%(Ljava/io/Reader;Ljava/lang/String;)V7(Ljava/io/Reader;Ljava/lang/String;Ljava/lang/String;)V(Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)V#(Ljava/net/URL;Ljava/lang/String;)V5(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;)V�(Loracle/xml/parser/v2/DTD;Loracle/xml/parser/v2/XMLError;Loracle/xml/parser/v2/XMLDocumentHandler;Lorg/xml/sax/EntityResolver;Z)V%(Loracle/xml/parser/v2/NodeFactory;)V(Lorg/xml/sax/InputSource;)V.(Lorg/xml/sax/InputSource;Ljava/lang/String;)V(Z)VCodeDOMParser.java +ExceptionsLineNumberTableLoracle/xml/parser/v2/DTD;&Loracle/xml/parser/v2/DocumentBuilder;*Loracle/xml/parser/v2/NonValidatingParser;"Loracle/xml/parser/v2/XMLDocument;)Loracle/xml/parser/v2/XMLDocumentHandler;Loracle/xml/parser/v2/XMLError; Loracle/xml/parser/v2/XMLReader;Lorg/xml/sax/DTDHandler;Lorg/xml/sax/EntityResolver; +SourceFileZclosedocdtd +dtdHandler entResolvererr externalDTD +getDoctype getDocumentgetValidationModehndlinitjava/io/IOException java/net/URLoracle/xml/parser/v2/DOMParser$oracle/xml/parser/v2/DocumentBuilder(oracle/xml/parser/v2/NonValidatingParser!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLError&oracle/xml/parser/v2/XMLParseExceptionoracle/xml/parser/v2/XMLParseroracle/xml/parser/v2/XMLReaderorg/xml/sax/InputSourceorg/xml/sax/SAXExceptionparseDTDparser +pushXMLReaderreaderresetretainCDATASection setDebugModesetErrorStreamsetNodeFactorysetValidationMode showWarningstoString +xmlHandler! keSf�M*�*�Y� +�*�*��*�*��*�*��0*��Y��*�*����i"EGIJ%K0M>OLE|Qf *���i�}Rf *���i��Uf��*�>*�-*��*�� +Y*��*��*��0*��*���$*��$�*��$+� *�,���:��:*��$�*�-��_eiB+,. +/0'15290?3J4W5_,o9y:~,�(h �Zf��*�>*�-*��*�� +Y*��*��*��0*��*���$*��$�*��$+�!*�,���:��:*��$�*�-��_eiBLMO +PQ'R5S9Q?TJUWV_MoZy[~M�Ih �]f��*�>*�-� Y+�:*��*�� +Y*��*��*��0*��*���$*��$�*��$�#*�,���:��:*��$�*�-��hniF��� +���1�?�C�I�T�`�h�x�������h �^f��*�>*�-*��*�� +Y*��*��*��0*��*���$*��$�*��$++�/�"*�,���:��:*��$�*�-��bhiB +  + +'59?JZb r|� �h �cf�*�>*�-*��*�� +Y*��*��*��0*��*���$*��$�*��$+�#*�,���:��:*��$�*�-��]ciB��� +��'�5�9�?�J�U�]�m�w�|�~�h �Sf, *�&*��%�iWX U�df% *��'�i +���df+*��0��(�i +���Wf( *��+�)�i +p nh�Xf) +*��+,�*�i +� }h�Yf( *��+�+�i +d bh�af% *�+�,�i +��h�df( *���.�i +� �sgPK +� �(5% i��oracle/xml/parser/v2/DTD.class����-�abcd��������������������������� +A +B +C +D +E +F +G +H +I +J +K L M N O +P +Q +R +S +T U V W +X +X Y +Z +[ \ ] +^ +_ +` �i �k �l �o �u �w �y �z �� �k � �� �� �� �� �i �p �e �e �f �� �� �� �~ �� �q �x �� �� �t �i �t  PUBLIC  SYSTEM  [()Ljava/lang/String;!()Loracle/xml/parser/v2/XMLError;()Lorg/w3c/dom/NamedNodeMap;()Lorg/w3c/dom/NodeList;()V()Z(I)V(Ljava/io/OutputStream;)V+(Ljava/io/OutputStream;Ljava/lang/String;)V(Ljava/io/OutputStream;Z)V(Ljava/io/PrintWriter;)V&(Ljava/lang/Object;)Ljava/lang/Object;8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;6(Ljava/lang/String;)Loracle/xml/parser/v2/ElementDecl;*(Ljava/lang/String;)Lorg/w3c/dom/Notation;(Ljava/lang/String;)V(Ljava/lang/String;S)V)(Ljava/lang/String;Z)Lorg/w3c/dom/Entity;(Ljava/lang/String;ZIZ)V(Ljava/lang/String;ZZ)V(Ljava/util/Hashtable;)V-(Ljava/util/Hashtable;Ljava/util/Hashtable;)V%(Loracle/xml/parser/v2/ElementDecl;)V$(Loracle/xml/parser/v2/XMLEntity;Z)V%(Loracle/xml/parser/v2/XMLNotation;)V*(Loracle/xml/parser/v2/XMLOutputStream;Z)V'(Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node;#(SLoracle/xml/parser/v2/XMLError;)V(Z)Lorg/w3c/dom/Node; +>CodeDTD.java +ExceptionsLineNumberTableLjava/lang/String;Ljava/util/Hashtable;"Loracle/xml/parser/v2/XMLNodeList; +SourceFileUTF-8Z]>addElementDecl addEntity addIndent addNotationampapos appendChildbuiltincheckChildTypechildren cloneNode elementdeclsentitiesfindElementDecl +findEntity findNotationflushget +getChildNodesgetElementDecls getEntitiesgetName getNotations getPublicId +getRootTag getSystemId getXMLErrorgt +hasChildNodesinternalSubsetjava/io/IOExceptionjava/io/Serializablejava/util/Hashtableltnbsp notationsoracle/xml/parser/v2/DTDoracle/xml/parser/v2/DTDDecl oracle/xml/parser/v2/ElementDecl!oracle/xml/parser/v2/XMLConstants$oracle/xml/parser/v2/XMLDOMExceptionoracle/xml/parser/v2/XMLEntityoracle/xml/parser/v2/XMLNode oracle/xml/parser/v2/XMLNodeList$oracle/xml/parser/v2/XMLOutputStreamorg/w3c/dom/DOMExceptionorg/w3c/dom/DocumentTypeorg/w3c/dom/Entityorg/w3c/dom/Nodeorg/w3c/dom/Notation parEntitiesprintprintExternalDTDpubIDputquot setEncoding +setRootTagsysIDtag +writeChars writeNewLinewriteQuotedStringxmlUrl! �������������������i����Y�!�+�+ +�Y +'�%�:W�+�Y"�%�:W�+ �Y &�%�:W�+ �Y <�%�:W�+ �Y >�%�:W�+ +�Y +��%�:W��" "8Ndz�T�i�$* +�$�� +[Y�t�$*+ +�$�� +db�{�Q)*�-�*�Y�!�-*�-+�=+�:W*+�*W��QSU!V(O�|��R�'*�.�*�Y�!�.*�.+�=+�:W�$*�6�*�Y�!�6*�6+�=+�:W*+�*W��* + &)0=J!Q�}�Q)*�5�*�Y�!�5*�5+�=+�:W*+�*W��jln!o(h�k�- +�Y*�3�(���� �����*����r�7*�-��*�-+�0���` a`�v��GN�%*�.�*�.+�0�N-�!�++�0N�*�6�*�6+�0�N-�-����2 -.028:&.)?0A<D@FEH�s�/*�5��*�5+�0���z�h� �Y� ����g�5*�-��Y*�-�&�������g�vF*�.�*�6��Y*�.*�6�'�*�.��Y*�.�&�*�6��Y*�6�&������%�1�8�D��e�*�=����g�5*�5��Y*�5�&�������e�*�9����e�*�=��z�e�*�<����j�����n�**�Y+�"�7�� +� +���~�1���+�>+*�=�>*�9�"+�>+*�1�@+�>+*�2�@�*�<�+�>+*�2�@*�4�4+�>+�?+�)*�,� *�,+�8+�)+�>+�?� +�>+�?�*�,� *�,+�8+�/��v�� ��� �(�.�6�9�@�F�N�V�\�`�e�l�u�z���������������������l�<�Y+�"M,�;*,�7��� �����m�;�Y+�"N-,�;*-�7��� �����o�0�Y+�#M*,�7��� ����t�"*+�=�� +qo��PK +� �(h��+qq"oracle/xml/parser/v2/DTDDecl.class����-\ALMNOPRSTUVW + + +  + + + ! " # $ % +& +' +' ( 9- 90 98 C, D1 G+ H. I? KB Q* X2 [) [=()I()Ljava/lang/Object;()Ljava/lang/String;()Ljava/util/Enumeration;()V()Z(I)Lorg/w3c/dom/Node;(I)V&(Ljava/lang/Object;)Ljava/lang/Object;8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;&(Ljava/lang/String;)Lorg/w3c/dom/Node;(Ljava/util/Hashtable;)V-(Ljava/util/Hashtable;Ljava/util/Hashtable;)V(Ljava/util/Vector;)V&(Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;(SLjava/lang/String;)VCode DTDDecl.java +ExceptionsILineNumberTableLjava/util/Hashtable; +SourceFileThis NamedNodeMap is read-only.[Lorg/w3c/dom/Node;elementsget getLength getNamedItem getNodeNamehasMoreElementshashitemitemsjava/io/Serializablejava/lang/Objectjava/util/Enumerationjava/util/Hashtablejava/util/Vector nextElementoracle/xml/parser/v2/DTDDecl!oracle/xml/parser/v2/XMLConstants$oracle/xml/parser/v2/XMLDOMExceptionorg/w3c/dom/DOMExceptionorg/w3c/dom/NamedNodeMaporg/w3c/dom/NodeputremoveNamedItem setNamedItemsize  I?KB[=94:�H*� +=*+�**���**�� �*��N�*��-�� S-����>* +?AB CD!E)F,G>FG?95:��*� +>*�Y��*+�,�`�**�� �+�:�+�� :*��S*���W����,�:�+�� :*��S*���W���ѱ>JJLMN O+P1Q4S@TKU\QfWlXoZ{[�\�X�J96:�_*� +=*�Y��*+��**�� �+�N�*-�� :*��S*���W-���ӱ>2 02345&6+7.99:D;U7^0E):*��>�F3:**�+�M,� �> +j kJ/:5*����*�2�>� ��Y3:, � Y��>vwv< +Z7:, � Y��>pqp< +@;PK +� �( "'�< +< +4oracle/xml/parser/v2/DefaultXMLDocumentHandler.class����-L<=>?@A +           , 4+ 61 8 9 : ;+ B! D* J K#()Ljava/lang/String;()V(Ljava/lang/Object;)V(Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V0(Ljava/lang/String;Lorg/xml/sax/AttributeList;)V(Loracle/xml/parser/v2/DTD;)V (Loracle/xml/parser/v2/NSName;)VB(Loracle/xml/parser/v2/NSName;Loracle/xml/parser/v2/SAXAttrList;)V,(Loracle/xml/parser/v2/XMLDocumentHandler;)V"(Loracle/xml/parser/v2/XMLError;)V (Lorg/xml/sax/DocumentHandler;)V(Lorg/xml/sax/Locator;)V([CII)VCodeDefaultXMLDocumentHandler.java +ExceptionsLineNumberTableLorg/xml/sax/DocumentHandler; +SourceFile cDATASection +characterscomment +docHandler +endDoctype endDocument +endElementgetQualifiedNameignorableWhitespace.oracle/xml/parser/v2/DefaultXMLDocumentHandleroracle/xml/parser/v2/NSName'oracle/xml/parser/v2/XMLDocumentHandlerorg/xml/sax/DocumentHandlerorg/xml/sax/HandlerBaseorg/xml/sax/SAXExceptionprocessingInstruction +setDoctypesetDocumentLocatorsetError +setHandler setTextDecl +setXMLDecl setXMLSchema +startDocument startElement!61,-*��0F,)-* +*�*+� �0JL J3+-4*� �*� +��0-.*/4+-4*� �*� +��0���/5 -�0/7-�0�/8-1*� � *� � +�0���/9 -2*� � +*� +� �0���/9%-7*� �*� +� � �0���/;+-4*� �*� +� +�0DEA/B!-3*� �*� +,��0Z[W/C$-�0�/D*-2*� � +*� +��0���E(-�0n/F'-�0d/G!-�0/H"-�0�/I-�0x/J-1*� � *� ��0���/K#-3*� �*� +,��0opl/K&-8*� �*� +� ,��0hie/2.PK +� �(sxf[[*oracle/xml/parser/v2/DocumentBuilder.class����-U$PT%&'()*+,-./01234 + +l + +l +l +m +n +o +p +q +r +s +t +u +u +v w x + y z { + +| + +} + +~ + + + +� + +� + +� � � � � � � � � +� � � � � + � � + � +� � +� +� +� � +� +� � � � � � � � � � � � � � � � � +� � � � +� +� +� +� +� � � � � + � + � � � � �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � � � � � � � �  �  +� � � � � � � � � � � � � �  � !� !� "� #� #� 5� 6� 7� 7� 9� :� :� <� >� ?� C� E� G� I� I� J� K� L� O� Q� R� S�()I()Ljava/lang/String;$()Loracle/xml/parser/v2/XMLDocument;()Lorg/w3c/dom/Node;()V()Z(I)Ljava/lang/String;(I)V(IILjava/lang/String;)V(Ljava/lang/Object;)Z*(Ljava/lang/Object;ILjava/lang/Object;II)V8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;6(Ljava/lang/String;)Loracle/xml/parser/v2/ElementDecl;3(Ljava/lang/String;)Loracle/xml/parser/v2/XMLCDATA;5(Ljava/lang/String;)Loracle/xml/parser/v2/XMLComment;5(Ljava/lang/String;)Loracle/xml/parser/v2/XMLElement;2(Ljava/lang/String;)Loracle/xml/parser/v2/XMLNode;2(Ljava/lang/String;)Loracle/xml/parser/v2/XMLText;(Ljava/lang/String;)V8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;D(Ljava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XMLAttr;B(Ljava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XMLPI;'(Ljava/lang/String;Ljava/lang/String;)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VK(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V](Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V6(Ljava/lang/String;Loracle/xml/parser/v2/XMLElement;)V(Loracle/xml/parser/v2/DTD;)V (Loracle/xml/parser/v2/NSName;)VB(Loracle/xml/parser/v2/NSName;Loracle/xml/parser/v2/SAXAttrList;)V%(Loracle/xml/parser/v2/NodeFactory;)V&(Lorg/w3c/dom/Attr;)Lorg/w3c/dom/Attr;'(Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node;(Lorg/xml/sax/Locator;)V(Z)V([CII)VCodeDocumentBuilder.java +ExceptionsILineNumberTableLjava/lang/String;Ljava/util/Hashtable;Loracle/xml/parser/v2/DTD;"Loracle/xml/parser/v2/ElementDecl;"Loracle/xml/parser/v2/NodeFactory;"Loracle/xml/parser/v2/XMLDocument;Loracle/xml/parser/v2/XMLError;Lorg/xml/sax/Locator; +SourceFileZ[I[Ljava/lang/String;[Loracle/xml/parser/v2/XMLNode;[ZaddIDaddText appendChild arraycopyattrType cDATASection +characterschopItchopping chopstartcommentcountcreateAttributecreateCDATASection +createCommentcreateDocument +createElementcreateProcessingInstructioncreateTextNode +currentParent debugFlag defNamespacedocdtdedelemsencoding +endDoctype endDocument +endElementequalserrfactory +factorySetfalsefindElementDeclgetColumnNumber getDebugMode getLastChild +getLineNumber getMessage0 getNodeName getProperty getSystemIdgetTextgetValueignorableWhitespacejava/lang/Stringjava/lang/Systemjava/util/Hashtablelocatorname +nameSpaces namespaceoracle.xml.parser.debugmodeoracle/xml/parser/v2/AttrDecloracle/xml/parser/v2/DTD.oracle/xml/parser/v2/DefaultXMLDocumentHandler$oracle/xml/parser/v2/DocumentBuilderoracle/xml/parser/v2/NSNameImpl oracle/xml/parser/v2/NodeFactory oracle/xml/parser/v2/SAXAttrListoracle/xml/parser/v2/XMLAttr!oracle/xml/parser/v2/XMLConstants oracle/xml/parser/v2/XMLDocumentoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNodeoracle/xml/parser/v2/XMLTextorg/xml/sax/Locatororg/xml/sax/SAXExceptionparents +parsingDTDprefixprocessingInstructionputqnamereset retainCDATAretainCDATASectionsetAttributeNode setDebugInfo setDebugMode +setDoctypesetDocumentLocator setEncodingsetNodeFactory +setStandalone setTextDecl +setVersion +setXMLDecl specified stackSize +standalone +startChopping +startDocument startElement stopChoppingtruevaluesversionxmldeclxmlns! + +�R�K��S� �J��5�����6��<����������Z*�*�k*�e*�>*�3*�]*�'*�8*�)*�Y��;*� +Y��=*��T*�2**�A�3��>F� �����#�(�-H8ICJLKQLYF����*�'��*�T*�22:*�]�'*�=�Y+��,:�D�$W�8*�>�+�"�&*�=�Y+��,:��H�!W*�3�-�B�:*�J�C*�J�@*�J�G�_��f�����$�%�-�2�;�>�E�M�P�Z�[�c�h�s�z����������������*�'��*�T*�22:*�>�?+�"*�3���B�:*�J�C*�J�@*�J�G�_�W*�=�Y+��1:�?�H�!W*�3�-�B�:*�J�C*�J�@*�J�G�_��Zuvxz|"})3�>�G�P�SzV�i�n�y������������r����+*Y�8`�8*�'�� +m +n����M*�U��*�=+�-M,�:*�T*�22N-,�$W*�3�",*�J�C*�J�@*�J�G�_��2 <=?ACD&E-G7H@IIGL8� ��"*�U�� +_]� +��' *Y�2d�2�� +A +>� ��2*�h� +*Y�2d�2��������9�FL+�:����efgh������8���P*�U��*�=+,�0N-�<*�T*�22:-�$W*�3�"-*�J�C*�J�@*�J�G�_��. �����!�)0CLO��;��`,*�J<� +*�TS�*�e���*�2*�6*�5��"Y[ +\[^!`&a+W=��"*�]�� +][@��"*�3�� +TRA��`0*�U*+�6*�5�*�5+�#W�*�T*Y�2`Z�2+S��NO +QRQT/K�B��"*+�J�� +D��+ *�>*+�=���� +�F����'�H��=*�k*+�j*,�f*-�9�� +�L��.**�8�)*�'��st +qM����**�=�.�5*�5��Y*�;��D��*�5*�;�<*�3�%*�5*�J�C*�J�@*�J�G�_*�k�)*�k*�5*�j�b*�5*�f�a*�5*�9�`*�T*Y�2`Z�2*�5S��> $/6!L"U!X%_'d(o)z*�.��N��~ +b*�(��+� N*�>��Y-�K-�V-�[-�P�:�0*�=-�[�/:�-�P�R-�K�M-�V�X�*�g�*�3�#*�J�C*�J�@*�J�G�_*�T*�22:*�6�*�6�E�?�7,�*66�*�>�2�Y,�N2,�Y2,�\2,�S2,�i2�:�C*�=,�\2,�i2�+:�',�S2�Q,�N2�L,�Y2�W���I: �W�)�O��Y��O�O�L �ZW�L� + �4,�&.�*�5 � �^W,�d3�c*�3�#*�J�C*�J�@*�J�G�_�������4���4�4�$W*�2*�ed�*�T*Y�2`Z�2S�A*�T: **�eh��T *�T*�e�%*Y�eh�e*�T*Y�2`Z�2S�� +Bxy{ +~-~0�=�B�K�T�]�b�f�g�n�������������������������������� +���'�3�8�?�I�Q�_�o�y����������������������������� �#�)�6�E�O�au�O��T(*Y�8d�8*�8*�)�*�'*�)�*�'���y +z|}~!���PK +� �(*�x��&oracle/xml/parser/v2/ElementDecl.class����-�������v��������������������� +M +M +N +O +P +Q +R +S +T U +V +W X +Y Z [ +\ ] +^ +^ +_ +` +a b +c +d +d +e f g h i j +k +l +m +n o +p q +r +s +t +u �~ �� �� �� �� �� �� �� �� �� �� �� �x �� �� �� �� �z �� �� �� �� �~ �{ �} � � �� �x �� �� �� �� �w �� �y �� �� �� �� �~ ()I()Ljava/lang/Object;()Ljava/lang/String;()Ljava/util/Enumeration;()Ljava/util/Vector;()Lorg/w3c/dom/NamedNodeMap;()Lorg/w3c/dom/Node;()V()Z(I)Ljava/lang/Object;(I)Ljava/util/Vector;(I)V&(Ljava/lang/Object;)Ljava/lang/String;(Ljava/lang/Object;)V(Ljava/lang/Object;)Z(Ljava/lang/String;)I,(Ljava/lang/String;)Ljava/lang/StringBuffer;3(Ljava/lang/String;)Loracle/xml/parser/v2/AttrDecl;(Ljava/lang/String;)V(Ljava/lang/String;B)V(Ljava/lang/String;S)V(Ljava/util/Vector;)V"(Loracle/xml/parser/v2/AttrDecl;)V%(Loracle/xml/parser/v2/ParserState;)Z7(Loracle/xml/parser/v2/ParserState;Ljava/lang/String;)ZO(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/DTD;)Ljava/util/Vector;>(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/DTD;)Z)(Loracle/xml/parser/v2/XMLOutputStream;)V*(Loracle/xml/parser/v2/XMLOutputStream;Z)V)(Lorg/w3c/dom/Element;)Ljava/util/Vector;(Lorg/w3c/dom/Element;)Z'(Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node; +>ANYASTERISKBCOMMACode +ConstantValueELEMENTELEMENTSEMPTYElementDecl.java +ExceptionsILineNumberTableLjava/lang/String;Ljava/util/Hashtable;Ljava/util/Vector;#Loracle/xml/parser/v2/ContentModel;Loracle/xml/parser/v2/XMLNode;"Loracle/xml/parser/v2/XMLNodeList;MIXEDORPLUSQMARK +SourceFileZ addAttrDecl +addElementappend appendChild attrdeclscheckAcceptState checkContentchildrenclonecontentdecl elementAt elementdeclselementsequalsexpectedElementsexternal findAttrDeclflushgetAttrDeclIndex getAttrDeclsgetContentElementsgetContentType getParseTreegetRoot +hasChildNodeshasMoreElementsidAttrjava/io/IOExceptionjava/io/Serializablejava/lang/Stringjava/lang/StringBufferjava/util/Enumerationjava/util/Hashtablejava/util/Vector nextElementoracle/xml/parser/v2/AttrDecl!oracle/xml/parser/v2/ContentModeloracle/xml/parser/v2/DTDoracle/xml/parser/v2/DTDDecl oracle/xml/parser/v2/ElementDecloracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNode oracle/xml/parser/v2/XMLNodeList$oracle/xml/parser/v2/XMLOutputStream&oracle/xml/parser/v2/XMLParseExceptionorg/w3c/dom/NodeparentprintremoveAttrDeclAtremoveElementAtsizetagtoStringtypevalidateContentvalueOf +writeChars writeNewLine!����������������������������������� ��� +���6*+ +�%*�0*�?���P S����Q%*+ +�%*�0*�?*�Y�"�/*�/�H���P S��$����J"*�*�*�Y�!�**�*+�'*+�)W������!����2*�/� *�/+�+����������3*�/� +*�/+,�,����������=*�/�H� �Y�#�*�/�6��� �����_7*�/�H�*�/�H�*�;�*�/�*�/+�*�A��7������"�5����d4*�*�.*�*�4M�,�@�N-�F+�5�-�,�>���������'�)�2����e5*�*�/=�*�*�1�N-�F+�5���*�*�E�����   # %3�|�5*�*��Y*�*�&�������{��w*�/� *�0���Y�!L*�/�H��*�/�H�9*�A��*�A��2�3M�+,�@��F�',�>���*�/�:�.�L+��>/012$3&51788:9H:K;[:d5g?uA�w�9*�/� *�0��*�/�H��#$%�}� *�/�<��N����f*�8�L*�0�E+ �K+�Y*�F�J�$ �(�G�K*�/�*�/+�B� +�K+ +�K+�L*�-� *�-+�C+�9��6 +SUV/W6X>WAZG[M\Q^X_a`eQ����0*�*� *�*�D�����m=*�/�H� +�=��*�/�H��*�/�*�/+�*�A��I���� ���!�(�;���PK +� �(AU� +�� oracle/xml/parser/v2/Entry.class����- +   +     ()V(Ljava/lang/String;[CI)VCodeILineNumberTableLjava/lang/String;Loracle/xml/parser/v2/Entry; +SourceFileStringHashtable.java[Chashjava/lang/ObjectkeykeyCharsnextoracle/xml/parser/v2/Entry$oracle/xml/parser/v2/StringHashtable  +<*�*+�*,�*��%' ()%PK +� �(���Opp$oracle/xml/parser/v2/EqualExpr.class����-E:;<=>?@A + + + +  + +   + + + +! *# 2% 3& 4/ 5" 6( 7- 8/ 9" B' C) D$()I()V(I)V%(Loracle/xml/parser/v2/XSLExprBase;)VJ(Loracle/xml/parser/v2/XSLExprValue;Loracle/xml/parser/v2/XSLExprValue;I)ZI(Loracle/xml/parser/v2/XSLParseString;)Loracle/xml/parser/v2/XSLExprBase;G(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLExprValue;&(Z)Loracle/xml/parser/v2/XSLExprValue;Code +ExceptionsILineNumberTable"Loracle/xml/parser/v2/XSLExprBase; +SourceFile XSLExpr.java +addElementcompare firstExpr getOperatorgetValue lookaheadnextExpr nextTokenoracle/xml/parser/v2/AndExproracle/xml/parser/v2/EqualExproracle/xml/parser/v2/RelExpr!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue#oracle/xml/parser/v2/XSLParseStringparsesetBooleanValue setOperator *#+*� +�.�6(+q5*� +M,+�N�!,�+�:--,�� �N,�M,����-�.* +�� ���� �'�,�3�,B'+�Q*�M*�=� *�Ġ;�Y� L+,� ,*��*�W*�M+,� *�=���*�ğ��+M,�.2 ����$�,�1�6�;�D�M�O�,01PK +� �(ۯ �&&%oracle/xml/parser/v2/FastVector.class����-" + +  +       ()I()V(I)Ljava/lang/Object;(I)V(Ljava/lang/Object;)VCodeFastVector.javaILineNumberTable +SourceFile[Ljava/lang/Object; +addElementarray arraySizecurCount elementAtjava/lang/Objectoracle/xml/parser/v2/FastVectorsetSizesize!"*�� +%#?*�*�*��*��(! *+(�O*�*��5*�h�M>�,*�2S�*����*,�*Y�h�*�*Y�Z`�+S�& 0 234#3.536=8N.*�2�= "*�� +GE! +*��BPK +� �(��]-@-@%oracle/xml/parser/v2/FilterExpr.class����-??��������������� +126;<=>�����������  +   + +#� +$� +3� +7� +5� +$� +/� +/� +/� +� +� +� +,� +5� +'� +'� +� +� +5� +(� +5� +;� +$� +7� +;� +� +-� +� +6� 9� +7� +� -� +� +$� +� +� +6� %� %� %� 3� %� +(� %� +� + � %� 9� +!� +,� +;� +;� +;� +;� +9� +;� +;� +#� +;� ++� +:� +;� +7� =� &� +� & +' +5 +- +5 +- +3 +* +- +% & +5 + +3 +; +- +5 +3 +- +: +3 +; + + +5 + +7 + 9 +9 ' 9 % % 9 ' +9! +5" %# 3$ 9$ %% -& +.' +2( +8( ;) %* %+ %, +- +-. +5/ +#0 +1 +#2 +.3 +$4 +5 +6 +7 +38 +9 +5: +5; +7< 5= +>� �M �S �Y �[ �\ �d �g �j �l �q �y �} �� �r �^ �� �v �V �� �P �h �� �B �b �� �@ �T �_ �e �k �� �� �� �� �� �| �� �P �R �� �� �] �b �D �H �H �I �C �N �u �E �o �J �c �t �A �C �C �C �I �C �z �L �� �G �K �} �C �F �� �w �G �C �� �C �b �� �s �` �f �{ �C �X �A �� �O �� �� �� �� �� �A �b � � � !� "p "~ #� $� %� &� '� (� )n *� ,Q -� .� /A 0e 2U 2Z 3� 4C 5m 7i 8W 9� :a()D()I()Ljava/lang/Object;()Ljava/lang/String;()Ljava/net/URL;$()Loracle/xml/parser/v2/XMLDocument;,()Loracle/xml/parser/v2/XMLDocumentFragment;#()Loracle/xml/parser/v2/XMLElement; ()Loracle/xml/parser/v2/XMLNode;$()Loracle/xml/parser/v2/XSLNodeList;()Lorg/w3c/dom/Element;()Lorg/w3c/dom/Node;()S()V()Z(C)Z(D)D(D)J(D)Ljava/lang/String;(D)V(I)Ljava/lang/Object;(I)Ljava/lang/String;(I)Ljava/lang/StringBuffer;!(I)Loracle/xml/parser/v2/XMLNode;(I)Lorg/w3c/dom/Node;(I)V(II)Ljava/lang/String;(ILjava/lang/String;)V((ILjava/lang/String;Ljava/lang/String;)V&(Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/Object;)V(Ljava/lang/Object;)Z(Ljava/lang/String;)I&(Ljava/lang/String;)Ljava/lang/Double;&(Ljava/lang/String;)Ljava/lang/String;5(Ljava/lang/String;)Loracle/xml/parser/v2/XMLElement;(Ljava/lang/String;)V(Ljava/lang/String;)Z(Ljava/lang/String;I)I'(Ljava/lang/String;Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)ZJ(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Vj(Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/FastVector;)Loracle/xml/parser/v2/XSLExprValue;5(Ljava/lang/String;Ljava/text/DecimalFormatSymbols;)V6(Ljava/lang/String;Loracle/xml/parser/v2/FastVector;)VV(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/NSNameImpl;1(Ljava/net/URL;)Loracle/xml/parser/v2/XMLElement;(Ljava/net/URL;)V#(Ljava/net/URL;Ljava/lang/String;)V2(Ljava/net/URL;Loracle/xml/parser/v2/XMLElement;)VB(Loracle/xml/parser/v2/NSName;)Loracle/xml/parser/v2/XSLExprValue;q(Loracle/xml/parser/v2/NSName;Ljava/lang/String;Loracle/xml/parser/v2/XMLNode;)Loracle/xml/parser/v2/XSLNodeList;C(Loracle/xml/parser/v2/NSNameImpl;)Ljava/text/DecimalFormatSymbols;F(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XMLDocument;)VG(Loracle/xml/parser/v2/XMLNode;)Loracle/xml/parser/v2/XSLSourceContext;e(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLTContext;)Z%(Loracle/xml/parser/v2/XSLNodeList;)VC(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XMLNode;)IG(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLNodeList;)Vh(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLNodeList;((Loracle/xml/parser/v2/XSLParseString;)VJ(Loracle/xml/parser/v2/XSLParseString;Z)Loracle/xml/parser/v2/XSLExprBase;)(Loracle/xml/parser/v2/XSLParseString;Z)V%(Loracle/xml/parser/v2/XSLTContext;)D6(Loracle/xml/parser/v2/XSLTContext;)Ljava/lang/String;G(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLExprValue;:(Loracle/xml/parser/v2/XSLTContext;)Lorg/w3c/dom/NodeList;%(Loracle/xml/parser/v2/XSLTContext;)Z&(Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;(Lorg/w3c/dom/Node;)V(Z)V(ZILjava/lang/String;II)Z)-Code +ConstantValueD +ExceptionsIIDKeyLineNumberTableLjava/lang/String;Ljava/util/Hashtable; Loracle/xml/parser/v2/DOMParser;!Loracle/xml/parser/v2/FastVector;Loracle/xml/parser/v2/NSName;!Loracle/xml/parser/v2/NSResolver; Loracle/xml/parser/v2/Predicate;Loracle/xml/parser/v2/XMLNode;"Loracle/xml/parser/v2/XSLExprBase;Oracle Corporation. +SourceFile UNINITVALUEXSLNodeSetExpr.javaZ addDocument +addElementaddNodeaddSourceContextappend appendChildceil checkMethod classtypecloneconcat +docOrderId doubleValue elementAtequalsequalsIgnoreCaseevaluateexpr1expr2expr3exprType +exprVectorfilter +filtertypefloorformat +format-numberfound +functionnamesget getAttribute +getBaseURLgetCurrentNodegetCurrentNode2getCurrentNodeListgetCurrentToken getDebugFlaggetDecimalFormat getDocumentgetDocumentElement getIDElement getKeyNodes getLength getLocalName +getMessage getNamespace getNodeList getNodeNamegetNodePosition getNodeTypegetNumberValuegetOwnerElement +getParentNodegetPrimaryExprgetQualifiedNamegetResultTreeValuegetSelectedNodes +getSrcContext +getSrcRootgetStringValuegetTextgetUnparsedEntityUrigetValue getVariablehttp://www.oracle.com)http://www.oracle.com/XSL/Transform/java/$http://www.w3.org/1999/XSL/TransformindexOf +insertListinternitemjava/lang/Doublejava/lang/Exceptionjava/lang/Mathjava/lang/NumberFormatExceptionjava/lang/Stringjava/lang/StringBufferjava/lang/Throwable java/net/URLjava/text/DecimalFormatjava/text/NumberFormatjava/util/Hashtablelength lookaheadmatch +matchNodeListnamename1name2 nameSpace namespace nextTokennode-setnormalizeStringnsname1nsname2nsrnumValueoracle/xml/parser/v2/Axisoracle/xml/parser/v2/DOMParseroracle/xml/parser/v2/FastVectororacle/xml/parser/v2/FilterExproracle/xml/parser/v2/NSNameoracle/xml/parser/v2/NSNameImploracle/xml/parser/v2/Predicateoracle/xml/parser/v2/Steporacle/xml/parser/v2/XMLAttr oracle/xml/parser/v2/XMLDocumentoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNodeoracle/xml/parser/v2/XMLParser#oracle/xml/parser/v2/XPathException!oracle/xml/parser/v2/XSLConstants!oracle/xml/parser/v2/XSLExceptionoracle/xml/parser/v2/XSLExpr oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue$oracle/xml/parser/v2/XSLExtFunctions oracle/xml/parser/v2/XSLNodeList#oracle/xml/parser/v2/XSLNodeSetExpr#oracle/xml/parser/v2/XSLParseString%oracle/xml/parser/v2/XSLSourceContext oracle/xml/parser/v2/XSLTContextorg/w3c/dom/Nodeorg/w3c/dom/NodeListoutputparentparseparser +predicates priExprClass priExprType +regionMatches removeChild resolveQnameretainCDATASectionrootround setDebugModesetPreserveWhitespacesize +startsWithstring substringtestBooleanExprtoStringtokenize translatetranslateString trustedItemtypevalueOfvendor +vendor-urlversionxml:lang %3&�%����������������$�����������?*�@*��*��j*+������+������������g�+��W+�[�8��/Y�+�u�F�*+����+)��W+��W*�m*��j*ʵ�*����+��W+�[�8��/Y�+�u�F�*�'Y+���L��+,��W+��W+�[�8��/Y�+�u�F�*+����+)��W+��W*��j*ɵ�*��*�m�*�m�*+��*�m� *�j���+��[�*�(Y+�Q�����)3+ .78:8==>G@XB`CgDlEqFwG}H�J�L�M�O�Q�S�T�U�W�Y�Z�[�\�]�^_ ` behj(k)o2p>3�1�}��+�[��*��*+����+���f$���d7���e���f����g����h����i�����B����0����0����T����@���������B���������`����"������������������������"��������������������������������������������������i����W����)����)����E*��j+��W�8*��j+��W�**��j*+���d�*��j*+���d�*��j*+���d+��,��/Y��E�*+���e��*��j*+���d+��)��*+���e��*��j+��W+��)��*+���d��*��j*+���d�*��j+��W�q*��j*+���d�_*��j*+���d�M*��j+��W+��)�9*+���d�-*��j*+���d+��,��/Y� �E�*+���e+��)��+��,��/Y� �E�*+���f��+���� +���� *��j� *��j*+���d+��,��/Y��E�*+���e��*��j*+���d+��,��/Y��E�*+���e+��)�Q+��,��/Y��E�*+���f�/*��j+��W+��)�*+���d�*��j*+���d+��,��/Y��E�*+���e+��,��/Y��E�*+���f��*��j*�$Y�?�h*�h+���T�%+��,��/Y��E�*�h+���T+��)��اq*��j+��W+��)�]*+���d�Q*��j*+���d�?*��j*+���d�-*��j*+���d�*��j*+���d� *�m�+��)�i�/Y�+�u�F�+�[Ƞ�*��j*ȵ�*+����*+����*���*�� +� *��j+��W*�$Y�?�h+��)�*�h+���T�#+��,��/Y��D�*�h+���T+��)��ڧ�+�[�7�(*�7��*�'Y+��+���M��*��j��+�[�8�*��j*�8��*+�����v+�[�$*��j*��*�Y+���G�_���L+��(�=*��j*���*+���d**�d�g�j+��)��/Y�+�u�F�*�m�*�m+��W����� ���D�J�O�R�X�]�`�f�o�r�x���������������������������������������� �����(�+�1�:�=�C�H�Q�Z�]�c�l�u����������� � +� � � +�����'"0$9&B'O(X*[,a-f.o/x0{2�3�4�6�8�9�;�=�>�A�B�C�D�F�HK +DMQR$S-T6U9Z?[H\KaQbZc]ecflgoiuj~k�m�n�q�s�v�x�y�z�{�}�~������������&�/v2�<�C�X�^�a�k�q�x�������������������������������������1���{;�5Y�RM:+�r:+�t: *���8��5Y*���KM� +�*����5Y*���BM� +�*���7�,+*����:��/Y*�����E�M� +�*��Ƞ�*�� +�8*�h�`�3:+��:�7Y�A:���U�5Y�PM� +@�$Y*�h���C:6�*�h�`�3+���T�*�h�����*��*���cM� �*��� �*��� �$���dO���e����ft���gh���h\���iG���� ����� Q���� ����� $���������8���� ����� q���� ?���� ��������������m����7����!���� +����� +����� +����� +k���� +-���������V���������u���������:���������>����)����n�5Y ��`��BM� ��5Y �}��BM� ��7Y�A:+�s�U�5Y�PM� z*�d+��:�5Y�~��BM� ]*�d+��:�7Y�A:�$Y +�C:����7��:�}66�����:������*�d+��:��6�(�`�:+���{N-� -�U�����Ի5Y�PM� +�*�d+��:*����:*�e+��:����K��:�}6�7Y�A:6�$���-��:+�|�����ۧ��:+�|:�5Y�PM� +*�d+��:+���+�#Y�>���7Y�A:�������:�}66������:+�q:�a��Y�O:+�y:�b+����+����+��+�v��+����+���x:�,Y�J:�z�,:���XW+�S+�V�U�:�/Y����E����H����:+�q:�a��Y�O:+�y:�R+��+�v��+����+���x:�,Y�J:�z�,:���XW+�S+�V�U�:�/Y����E��5Y�PM�s:*�d�*�d+���7:���-:�:��5Y�KM�8��� ����5Y�&��KM��5Y���KM�:*�d�*�d+���7:���-:�:��5Y�KM����� ����5Y�&���KM���5Y�KM��:*�d�#*�d+���7:����-:�:��5Y�KM�R������ +����5Y�KM�(�5Y���KM�*�d�T*�d+���7:� �}��5Y�KM�����-:�5Y�Y�H�^�W���KM���5Y�Y�H�^�W���KM���5Y*�d+����RM���5Y�RM���5Y�RM�t�5Y*�d+���RM�a*�d+��:�,� +�,:�"�*��*��:� +���,:�5Y�RM�N�pY:�5��6�b�������5Y�RM�����,:����ǻ5Y*�d+�����KM��*�d+��:*�e+��:����5Y�RM���5Y�RM�{*�d+��:*�e+��:��6��5Y�RM�L�5Y�RM�@*�d+��:*�e+��:��6��5Y�KM��5Y���KM��*�d+��:*�e+��:��6��5Y�KM�ͻ5Y��`�����KM��*�d+��:*�e+��9 +*�f�*�f+��9 ���`� +g9   +c9 +�Yg9 +g�Y9 +�� 9 +� +��`��� ���9 + +�� + +9���`��� ���9�5Y +�����KM�*�d�*�d+��:� +��:�5Y����BM��*�d�*�d+��:� +��:��:�5Y�KM��*�d+��:*�e+��:*�f+��:�5Y���KM�w:6�*�h�`�3+���]:�*�h����ݻ5Y�KM�:*�d+��9 +*�e+��:*�f�J*�f+��:�,����,:� +�,:��:+�w:�Y�N:��Y�I:�5Y +�l�KM��*�d�*�d+��9 +� �Y���G�_9 +� W�9 +��5Y +�BM�}*�d+��9 +�5Y +�k�BM�c*�d+��9 +�5Y +�Y�BM�I*�d+��9 +�5Y +����BM�.*�d+���7:� �5Y�BM�}69 +6�.���-���ö_9 � W�9 +� + c9 +���ѻ5Y +�BM��*�d+��:*����:�5Y�KM�� �a�����a��5Y�BM����a��5Y�KM�e���a�X�5Y +�KM�K*�d+��:*����:��:����: �%�� +��5Y�RM��5Y�RM�� ���#�5Y�� �������Z�RM���ɲn���o��5Y�RM���5Y�RM���5Y�RM��*�d+��:*����:��:�3��: �h����5Y�RM�R�5Y�RM�F�5Y�RM�:*�d+��:�5Y+�����KM�*����*�d+��M��*���,�,�����/Y��D�*��,���\�7+�i:�5Y�P�5���nq \ m p  ��� � ���"�.�1�:�F�I�S�]�b�v�y�|����������������������������� ���D�H�Q�VYgjs|�� +� � ����������� "$%%1&5';"H*R+U/_1j2t3~5�6�7�8�:�;�<�;�8�3�B�C�E�F�H�I�JK NPQ#R)T5U5X;YEZR[Z\_^g_o`za�c�d�e�f�e�g�i�j�l�U�n�p�R�N�v�w�z�{�| }~�#�,�5�@�B�E�J�W�_�g�nwq�s����������������������������������������� ��$�'�+�0�:�=�F�O�X�]�a�d�n�q�t�{����������������������������������� ���$�@�C�_�b�t�w�������������������������������   + ' +*49<HKOR\fp y|"�#�%�&�'�(�)�(�+�,�.�/�0�1�2�1�4 5 7 8 9 #: ); 3: 6= >> C= D? I= P@ SB ]C gE nF xE {I �L �P �Q �S �T �S �U �V �X �Y �X �Z �[ �] �^ �] �_ �b +c +b +e +g +(h ++j +2l +<j +?p +Fr +Ms +Wt +Zw +dx +ny +xz +~{ +�z +�| +�~ +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� � � +� � � (� +� 6� E� H� O� Y� \� \� m� p� q� v� y� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � +� +� � � � � � � !� (� 2� <� ?� I� T� ^� k� x� |� }� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� +� + � +� +� +� +!� +$� +)� +,� +0� +3� +:� +H� +Q� +T +]� +` +i +l +v +� +� + +� +� + +� +� +� +� +� + +� +� +� +� +� +� +� +�" +�$ +�" +�)-. 026!7/618�1�x� + +�,�}6*������������H-+��*���{:� 6�,���������-*��*��+�|:���}66�(6 �,�� �����  ���������V{~ �.�3�9�D�F�P�R�a�f�h�o�u�{������������1��PK +� �(C�-u + +'oracle/xml/parser/v2/FromAncestor.class����-' !"# + + +    % &()V�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;h(Loracle/xml/parser/v2/XMLNode;Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;Z)V*Code +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.java getAncestororacle/xml/parser/v2/Axis!oracle/xml/parser/v2/FromAncestor%oracle/xml/parser/v2/FromDescAncestor!oracle/xml/parser/v2/XSLException%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeListprocessAxisNodeTestreset +resultlist *� ��$�~*� � �q����D����b����q����q����q����D*S+-*� � +�!+*� � +�+*� � +�*� �& ��L�X�[�g�j�v�y�PK +� �(C���XX-oracle/xml/parser/v2/FromAncestorOrSelf.class����-E(6789:;<=>?@A + +  + + +  + + +   )" 0' 1$ 2# 3& 4 5! C" D-()Ljava/lang/String;()S()V(Ljava/lang/Object;)Z'(Ljava/lang/String;Ljava/lang/String;)Z�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;h(Loracle/xml/parser/v2/XMLNode;Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;Z)V(Lorg/w3c/dom/Node;)V*Code +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javaaddNodecheckNamespaceequals getAncestor getNodeName getNodeTypejava/lang/Stringoracle/xml/parser/v2/Axis'oracle/xml/parser/v2/FromAncestorOrSelf%oracle/xml/parser/v2/FromDescAncestor+oracle/xml/parser/v2/FromDescAncestorOrSelforacle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLException%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeListorg/w3c/dom/NodeprocessAxisNodeTestreset +resultlist )"**��,�B%*q�*��������D������������������������D*p+��+�-�� *�+�+-*���+�� *�+�+*���`+��W+�-��L*�+��A+��9*�+��.+��%*�+��*�+�+*���*��,f��L�T�a�i�u�x�����������������������������������+ ./PK +� �(����)oracle/xml/parser/v2/FromAttributes.class����-, !"#$%&'( + + + +      * +()V�(Loracle/xml/parser/v2/XMLElement;Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;)Loracle/xml/parser/v2/XSLNodeList;g(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLNodeList;)Loracle/xml/parser/v2/XSLNodeList;�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;Code +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javagetAttributeListoracle/xml/parser/v2/Axis#oracle/xml/parser/v2/FromAttributes-oracle/xml/parser/v2/FromDescendantAttributes$oracle/xml/parser/v2/FromDescendantsoracle/xml/parser/v2/XMLElement!oracle/xml/parser/v2/XSLException%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeListprocessAxisNodeTestreset +resultlist *� +� �)��*�� +�� +����\����\����u�������������������\����u����\*u+��++�-*�� W�+��+�*�� W�*��. � �d �k �r �v �z �} �� �� �� �PK +� �(.ӟ!ff'oracle/xml/parser/v2/FromChildren.class����-3&'()*+,-./ + + + + + +    $ % 1 2!()Vh(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;)V�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;C(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLNodeList;)V*Code +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.java +getChildNodesgetChildTypeNodesoracle/xml/parser/v2/Axis!oracle/xml/parser/v2/FromChildren+oracle/xml/parser/v2/FromDescAncestorOrSelf$oracle/xml/parser/v2/FromDescendantsoracle/xml/parser/v2/XMLElement!oracle/xml/parser/v2/XSLException%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeListorg/w3c/dom/NodeprocessAxisNodeTestreset +resultlist *� +�  >0;�*��������D�������������������p����D*Z+��b+-*���S+��L+*���=+-*���-+*���+*���+*���*�� r D EL IS MV N\ M_ Ob Qi Tj Ur Tu Vx Xy Y~ Z� X� [� ]� ^� ]� _� b� c� b� d� f� g� k"#PK +� �(����+oracle/xml/parser/v2/FromDescAncestor.class����-9 ,-./012345 + + + + +  +  + +  ! ( ) * + 7 8%()V'(Ljava/lang/String;Ljava/lang/String;)Zh(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;)V�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;h(Loracle/xml/parser/v2/XMLNode;Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;Z)V(Lorg/w3c/dom/Node;)V*Code +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javaaddNodecheckNamespace getAncestorgetDescendantTypeNodesoracle/xml/parser/v2/Axis!oracle/xml/parser/v2/FromAncestor'oracle/xml/parser/v2/FromAncestorOrSelf%oracle/xml/parser/v2/FromDescAncestororacle/xml/parser/v2/XMLElement!oracle/xml/parser/v2/XSLException%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeListorg/w3c/dom/NodeprocessAxisNodeTestreset +resultlist !"*� �$�6"3�*��������D������������������������D*t+-*��+�-�� *�+� ++-*���I+*��*�+� ++*���&+*��*�+� ++*���*��$Z��L�M�U�X�e�m�y�|�}�����������������������#&'PK +� �(si��1oracle/xml/parser/v2/FromDescAncestorOrSelf.class����-M.>?@ABCDEFGHI + +  + + +  +  +  + +! + " # /& 6- 7( 8' 9+ :, ;) <$ =% K& L3()Ljava/lang/String;()S()V(Ljava/lang/Object;)Z'(Ljava/lang/String;Ljava/lang/String;)Zh(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;)V�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;h(Loracle/xml/parser/v2/XMLNode;Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;Z)Vd(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLNodeList;)Loracle/xml/parser/v2/XSLNodeList;(Lorg/w3c/dom/Node;)V*Code +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javaaddNodecheckNamespaceequals getAncestorgetDescendantNodesgetDescendantTypeNodes getNodeName getNodeTypejava/lang/Stringoracle/xml/parser/v2/Axis'oracle/xml/parser/v2/FromAncestorOrSelf!oracle/xml/parser/v2/FromChildren+oracle/xml/parser/v2/FromDescAncestorOrSelforacle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLException%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeListorg/w3c/dom/NodeprocessAxisNodeTestreset +resultlist /&0*��2�J*0�@*���3����D�����������������������D*|+-*��+-*��+���+�-���*�+���+*��+*��+���*�+���+*��+��y+�-��n*�+��c+*��+��O*�+��D+*��+��.*�+��#+*��W+*��*�+��*��2�) + L M U X d l y � � � � � � � � � � � � � !� "� #� %� &� %� '� (� )� +� , + - . / 1$ 20 38 4; 81 45PK +� �(�G44,oracle/xml/parser/v2/FromDescFollowing.class����-0'()*+,-. + +  + + +  " # $ % &()I$()Loracle/xml/parser/v2/XSLNodeList;()V(I)Lorg/w3c/dom/Node;�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;n(Loracle/xml/parser/v2/XSLNodeList;IIIILjava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XSLNodeList;Code +ExceptionsILineNumberTable +SourceFileXSLNodeSetExpr.javadefaultAxisNodeTest +docOrderIdgetDocumentOrderList getLengthitemoracle/xml/parser/v2/Axis&oracle/xml/parser/v2/FromDescFollowing"oracle/xml/parser/v2/FromFollowingoracle/xml/parser/v2/FromSelforacle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLNodeList%oracle/xml/parser/v2/XSLSourceContextprocessAxisNodeTest *� � +�/_/� :+� ��� d6*`� +-� +� +� +� +� +� +�! +�+ +� !PK +� �(��{���3oracle/xml/parser/v2/FromDescFollowingSibling.class����-% !"# + + + + + +    $()V�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;G(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLNodeList;)V(Z)VCode +ExceptionsLineNumberTable +SourceFileXSLNodeSetExpr.java +insertListoracle/xml/parser/v2/Axis-oracle/xml/parser/v2/FromDescFollowingSibling$oracle/xml/parser/v2/FromDescendants)oracle/xml/parser/v2/FromFollowingSibling"oracle/xml/parser/v2/FromPreceding!oracle/xml/parser/v2/XSLException!oracle/xml/parser/v2/XSLExprValueprocessAxisNodeTest *�� +�$u +9�Y� +:+-� :�Y� :+-� +:  � �* + +� + +� +� +� +�! +�% +�* +�/ +�6 +�PK +� �(��^G��)oracle/xml/parser/v2/FromDescParent.class����-;!-./01234567 + +  + + + + +   " ) * + , 9 :&()Lorg/w3c/dom/Node;()V'(Ljava/lang/String;Ljava/lang/String;)Zh(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;)V�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;(Lorg/w3c/dom/Node;)V*Code +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javaaddNodecheckNamespacegetDescendantTypeNodes +getParentNodeoracle/xml/parser/v2/Axis#oracle/xml/parser/v2/FromDescParentoracle/xml/parser/v2/FromParentoracle/xml/parser/v2/FromSelforacle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLException%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeListorg/w3c/dom/NodeprocessAxisNodeTestreset +resultlist "#*� +�% +18#m�*��������D������������������������D*�+���+��:+-*��+�-�� *���h-��]*���Q+��J+*��*�+��3+��,+*��*�+�+��*�+���*��%n +< +>L +BS +D\ +E] +Fe +Eh +Hu +I~ +K� +L� +N� +P� +S� +T� +S� +V� +W� +Y� +\� +]� +\� +`� +b� +c� +e� +n$'(PK +� �(��Ѓ��,oracle/xml/parser/v2/FromDescPreceding.class����-8",-./0123 + + + +  + + + +   +  # #! * + 4 5 6' 7()I()V!(I)Loracle/xml/parser/v2/XMLNode;�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;G(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLNodeList;)V(Z)V*Code +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.java getLength mergeListoracle/xml/parser/v2/Axis&oracle/xml/parser/v2/FromDescPreceding$oracle/xml/parser/v2/FromDescendants"oracle/xml/parser/v2/FromPreceding)oracle/xml/parser/v2/FromPrecedingSibling!oracle/xml/parser/v2/XSLException!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeListprocessAxisNodeTestreset +resultlist trustedItem #$*� +�& +�4$� ]*���Y� :+�:�Y� :6 +�# +�-�: *� �� + +� +���*��&6 + +� +� +� +� +� +�( +�. 7 = B K +�X %()PK +� �(�J�*  3oracle/xml/parser/v2/FromDescPrecedingSibling.class����-@3456789:; + + + +  +  + + + + +   +  (" (' /& 0 1! 2% <$ =" >, ?#()I()Lorg/w3c/dom/Node;()V!(I)Loracle/xml/parser/v2/XMLNode;�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;G(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLNodeList;)V(Lorg/w3c/dom/Node;)V(Z)VCode +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javaaddNode getLengthgetNextSibling +insertListoracle/xml/parser/v2/Axis-oracle/xml/parser/v2/FromDescPrecedingSibling$oracle/xml/parser/v2/FromDescendants)oracle/xml/parser/v2/FromPrecedingSiblingoracle/xml/parser/v2/Predicateoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLException!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeListprocessAxisNodeTestreset +resultlist trustedItem (")*� +�+ "<$)� q*���Y� :+-�:6 �  �:�� *�� +�  ���ܻY� : + ++-�: *� �*��+B ) * + , + /% 1. 26 3? /L 6U 7Y 8^ 7c 9l :*-.PK +� �(�gT�''3oracle/xml/parser/v2/FromDescendantAttributes.class����-, !"#$%&'( + + + +      * +()V�(Loracle/xml/parser/v2/XMLElement;Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;)Loracle/xml/parser/v2/XSLNodeList;g(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLNodeList;)Loracle/xml/parser/v2/XSLNodeList;�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;Code +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javagetDescendantAttributeListoracle/xml/parser/v2/Axis#oracle/xml/parser/v2/FromAttributes-oracle/xml/parser/v2/FromDescendantAttributesoracle/xml/parser/v2/FromParentoracle/xml/parser/v2/XMLElement!oracle/xml/parser/v2/XSLException%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeListprocessAxisNodeTestreset +resultlist *� +� �)��*�� +�� +����\����\����u�������������������\����u����\*u+��++�-*�� W�+��+�*�� W�*��6 + � �d �k �o �v �z �} �� +� +� +� +� +PK +� �(!��#��*oracle/xml/parser/v2/FromDescendants.class����-P%0ABCDEFGHIJKL + + + + + +  +  + + ! " + +# $ 1( 9. :* ;) <- =+ >& ?' @8 N( O5()Ljava/lang/String;()S()V(Ljava/lang/Object;)Z'(Ljava/lang/String;Ljava/lang/String;)Zh(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;)V�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;d(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLNodeList;)Loracle/xml/parser/v2/XSLNodeList;(Lorg/w3c/dom/Node;)V(Z)V*Code +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javaZaddNodecheckNamespaceequalsgetDescendantNodesgetDescendantTypeNodes getNodeName getNodeType includeSelfjava/lang/Stringoracle/xml/parser/v2/Axis#oracle/xml/parser/v2/FromAttributes!oracle/xml/parser/v2/FromChildren$oracle/xml/parser/v2/FromDescendantsoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLException%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeListorg/w3c/dom/NodeprocessAxisNodeTestreset +resultlist @81/23*�*�*��4 u s w u3 +M,2L*���?����D����$�������������������D*v+���*��+�-�� *�+�+-*����+���*��+�� *�+�+*����*��+��+�-�� *�+�+-*���l*��+�� *�+�+*���F*��+�� *�+�+*���*�� *�+�+*��W�*��4�/ ~ L �S �_ �a �g �o �p �t �x �{ �~ �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � � � � �& �) �, �3 �; �D �G �3 +67PK +� �(�'���(oracle/xml/parser/v2/FromFollowing.class����-6,-./01234 + +  +  + + +  & '" ( ) * +()I$()Loracle/xml/parser/v2/XSLNodeList;()V(I)Lorg/w3c/dom/Node;>(Loracle/xml/parser/v2/XMLNode;)Loracle/xml/parser/v2/XMLNode;�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;n(Loracle/xml/parser/v2/XSLNodeList;IIIILjava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XSLNodeList;Code +ExceptionsILineNumberTable +SourceFileXSLNodeSetExpr.javadefaultAxisNodeTest +docOrderIdgetDocumentOrderList getLengthgetNextPostOrderNodeitemoracle/xml/parser/v2/Axis&oracle/xml/parser/v2/FromDescFollowing"oracle/xml/parser/v2/FromFollowing)oracle/xml/parser/v2/FromFollowingSiblingoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLException!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeList%oracle/xml/parser/v2/XSLSourceContextprocessAxisNodeTest  *� +�# +�5 h 4+�:� +:� ��� d6*�-� �#" +� +� +� +� +�! +�& +�0 +�!$%PK +� �(����/oracle/xml/parser/v2/FromFollowingSibling.class����-8./01234 + + + + + + + +  " "! ) * + , - 6 7&()I()Lorg/w3c/dom/Node;()Lorg/w3c/dom/NodeList;()V�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;n(Loracle/xml/parser/v2/XSLNodeList;IIIILjava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XSLNodeList;(Lorg/w3c/dom/Node;)I(Lorg/w3c/dom/NodeList;)VCode +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javadefaultAxisNodeTest +getChildNodes getLength +getParentNodeindexOforacle/xml/parser/v2/Axis-oracle/xml/parser/v2/FromDescFollowingSibling"oracle/xml/parser/v2/FromFollowing)oracle/xml/parser/v2/FromFollowingSiblingoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLNodeListprocessAxisNodeTestreset +resultlist "#*��% +�5#} E+� +�:�*��*���Y� � :+�6*`� -� +�%& +� +� +� +� +�( +�0 +�7 +�A +�$'(PK +� �(�ݫ%oracle/xml/parser/v2/FromParent.class����->23456789: + + + + + + + + +  %! ,$ -# . / 0 1 <! =)()I#()Loracle/xml/parser/v2/XMLElement;()Lorg/w3c/dom/Node;()S()V�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;n(Loracle/xml/parser/v2/XSLNodeList;IIIILjava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XSLNodeList;(Lorg/w3c/dom/Node;)VCode +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javaaddNodedefaultAxisNodeTest getLength getNodeTypegetOwnerElement +getParentNodeoracle/xml/parser/v2/Axis#oracle/xml/parser/v2/FromDescParent-oracle/xml/parser/v2/FromDescendantAttributesoracle/xml/parser/v2/FromParentoracle/xml/parser/v2/XMLAttroracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLNodeListorg/w3c/dom/NodeprocessAxisNodeTestresettestlist =)%!&0*� +*�Y� ��( + + +;"&�M*��+��+��:� +��:�"*�� **�*��-� +�*��(. + + + + + $ +") +$2 +&8 +'D +&H ++'*+PK +� �(��x���(oracle/xml/parser/v2/FromPreceding.class����-D89:;<=>? + + + +  + + + + +  + )# 1( 2' 3, 4! 5 6" 7% A# B. C$()I$()Loracle/xml/parser/v2/XSLNodeList;()Lorg/w3c/dom/Node;()V!(I)Loracle/xml/parser/v2/XMLNode;(I)Lorg/w3c/dom/Node;�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;n(Loracle/xml/parser/v2/XSLNodeList;IIIILjava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XSLNodeList;(Lorg/w3c/dom/Node;)VCode +ExceptionsILineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javaaddNodedefaultAxisNodeTest +docOrderIdgetDocumentOrderList getLength +getParentNodeitemoracle/xml/parser/v2/Axis-oracle/xml/parser/v2/FromDescFollowingSibling&oracle/xml/parser/v2/FromDescPreceding"oracle/xml/parser/v2/FromPrecedingoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLNodeList%oracle/xml/parser/v2/XSLSourceContextprocessAxisNodeTestresettestlist trustedItem B.)#*0*� *�Y� +��- +� +� +�@&*� w*���:+� +��� +d6+��:d6 +�, +�:  � ��:� *� � � +� +���**�*��-� �-B +� +� +� +� +�! +�* +�3 +�< +�C +�M +�P +�Y +�a +�o +�s +�+/0PK +� �(-�xe��/oracle/xml/parser/v2/FromPrecedingSibling.class����-4*+,-./0 + + + + + + +    & ' ( ) 2 3#()Lorg/w3c/dom/Node;()Lorg/w3c/dom/NodeList;()V�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;n(Loracle/xml/parser/v2/XSLNodeList;IIIILjava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XSLNodeList;(Lorg/w3c/dom/Node;)I(Lorg/w3c/dom/NodeList;)VCode +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javadefaultAxisNodeTest +getChildNodes +getParentNodeindexOforacle/xml/parser/v2/Axis&oracle/xml/parser/v2/FromDescPreceding-oracle/xml/parser/v2/FromDescPrecedingSibling)oracle/xml/parser/v2/FromPrecedingSiblingoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLNodeListprocessAxisNodeTestreset +resultlist  *��" 1 y A+� �:�*��*���Y� � :+� +6*d-� +�"&     ( 0 9 = !$%PK +� �( �Z���#oracle/xml/parser/v2/FromSelf.class����-,#$%&'( + + + + + +    ! " * +()I()V�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;n(Loracle/xml/parser/v2/XSLNodeList;IIIILjava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XSLNodeList;(Lorg/w3c/dom/Node;)VCode +ExceptionsLineNumberTable"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javaaddNodedefaultAxisNodeTest getLengthoracle/xml/parser/v2/Axis&oracle/xml/parser/v2/FromDescFollowing#oracle/xml/parser/v2/FromDescParentoracle/xml/parser/v2/FromSelf!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLNodeListprocessAxisNodeTestresettestlist +0*�*�Y�� +� +s +u +s)M%*� +� *� ++� **� +*� +� -� +� +z +| +~ +! +~PK +� �(�s]�zz-oracle/xml/parser/v2/MultiplicativeExpr.class����-B15389:;<=>? + + + +   +   +  + + '" '# /% 0* 2$ 4* 6, 7! @& A#()I()V(I)V(Ljava/lang/Object;)Z%(Loracle/xml/parser/v2/XSLExprBase;)VI(Loracle/xml/parser/v2/XSLParseString;)Loracle/xml/parser/v2/XSLExprBase;Code +ExceptionsILineNumberTableLjava/lang/String; +SourceFile XSLExpr.java +addElement classtypedivequalsjava/lang/String lookaheadmodname nextToken!oracle/xml/parser/v2/AdditiveExpr'oracle/xml/parser/v2/MultiplicativeExproracle/xml/parser/v2/UnaryExpr#oracle/xml/parser/v2/XPathException!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstants#oracle/xml/parser/v2/XSLParseStringparse setOperator '"(*� �+@&(�~>*�M*���o�Y� +L+,�*�*� *�>�2*��� �>� *��� �>��Y��,�*�W*�M+,�*�����+M,�+Z%')+,0&1+0.4:5=4@6L7O6R:]=b>g?l@qBzD|G)-.PK +� �(H�E!oracle/xml/parser/v2/NSName.class����- +()Ljava/lang/String;CodeLineNumberTable NSName.java +SourceFilegetExpandedName getLocalName getNamespace getPrefixgetQualifiedNamejava/lang/Objectoracle/xml/parser/v2/NSName  +  PK +� �(P�-9��%oracle/xml/parser/v2/NSNameImpl.class����-V)678RIJKLOP + +  +  +  +  + +! +! +" # $ % & + ' +( 9, 91 93 94 ?0 A/ B. H* M< N< Q< S< T+ U-()I()Ljava/lang/String;()V&(Ljava/lang/Object;)Ljava/lang/String;(Ljava/lang/Object;)Z&(Ljava/lang/String;)Ljava/lang/String;,(Ljava/lang/String;)Ljava/lang/StringBuffer;(Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VK(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V$(Loracle/xml/parser/v2/NSNameImpl;)Z, name : +, namespace ::CodeLineNumberTableLjava/lang/String;NSNameImpl.java +SourceFileappend compareQNameconcatequalsgetExpandedName getLocalName getNamespace getPrefixgetQualifiedNamehashCodejava/io/Serializablejava/lang/Objectjava/lang/Stringjava/lang/StringBuffername namespaceoracle/xml/parser/v2/NSNameoracle/xml/parser/v2/NSNameImplprefixprefix :qnametoStringvalueOf!  +Q<M<S<N< +9,:I*� *�*�*�*��;2- +./0292:b6*+,�+�%+�!*� Y+�� +�,����*,��;89:-90<5693:c7*+,-�+�%+�!*� Y+�� +�,����*,��;A BC.B1E6?94:n2*� *�*�*�*�*+�*,�*-�*��;* +H- +./0J!K&L+M1H@5::*�+��*�+����;���B.:t@+��+*���/�+� �&+� M,�*���,�*�����;"����� �<�>�C+:c;*��0*���$� Y*��� +�*���L�*�L+�;wx1w4z9|D+:*��;mE+:*��;dF+:*��;RG+:*��;[H*:'*�*����;�T+:D,� Y� +*���*���*����;�>=PK +� �(�9����%oracle/xml/parser/v2/NSResolver.class����-  &(Ljava/lang/String;)Ljava/lang/String;CodeLineNumberTableNSResolver.java +SourceFilejava/lang/Objectoracle/xml/parser/v2/NSResolverresolveNamespacePrefix +PK +� �(�~{CC$oracle/xml/parser/v2/NameCheck.class����-8.234 +  + + + +       ! )# * + , - /# 0% 1& 5% 6% 7#()I()Ljava/lang/String;()VV(Loracle/xml/parser/v2/NameCheck;Ljava/lang/String;Loracle/xml/parser/v2/XMLReader;I)VCodeILineNumberTableLjava/lang/String; Loracle/xml/parser/v2/NameCheck; +SourceFileValidatingParser.javacolgetColumnNumber +getLineNumber getPublicId getSystemIdjava/lang/Objectlinenamenextoracle/xml/parser/v2/NameCheck%oracle/xml/parser/v2/ValidatingParseroracle/xml/parser/v2/XMLReaderpubIdsysIdtype 0%6%5%/#)#7#1&! "m5*�*+� +*,� *�*-� +�*-� �*-�� *-���$& �� ����$�,�4�'(PK +� �(�xE,&oracle/xml/parser/v2/NodeFactory.class����-@456789:;<=>? + + + + + +  + + +  + +  & &" &%$()Loracle/xml/parser/v2/XMLDocument;,()Loracle/xml/parser/v2/XMLDocumentFragment;()V3(Ljava/lang/String;)Loracle/xml/parser/v2/XMLCDATA;5(Ljava/lang/String;)Loracle/xml/parser/v2/XMLComment;5(Ljava/lang/String;)Loracle/xml/parser/v2/XMLElement;=(Ljava/lang/String;)Loracle/xml/parser/v2/XMLEntityReference;2(Ljava/lang/String;)Loracle/xml/parser/v2/XMLText;(Ljava/lang/String;)VD(Ljava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XMLAttr;B(Ljava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XMLPI;'(Ljava/lang/String;Ljava/lang/String;)VCodeLineNumberTableNodeFactory.java +SourceFilecreateAttributecreateCDATASection +createCommentcreateDocumentcreateDocumentFragment +createElementcreateEntityReferencecreateProcessingInstructioncreateTextNodejava/io/Serializablejava/lang/Object oracle/xml/parser/v2/NodeFactoryoracle/xml/parser/v2/XMLAttroracle/xml/parser/v2/XMLCDATAoracle/xml/parser/v2/XMLComment oracle/xml/parser/v2/XMLDocument(oracle/xml/parser/v2/XMLDocumentFragmentoracle/xml/parser/v2/XMLElement'oracle/xml/parser/v2/XMLEntityReferenceoracle/xml/parser/v2/XMLPIoracle/xml/parser/v2/XMLText! +&'*� +�(:+#'" +�Y+,��(�,'! �Y+��(j-'! �Y+��(v.' �Y��(Q/' �Y��(�0'! � Y+��(F1 '! � +Y+��(�2$'" +� Y+,��(�3!'! � Y+��(^*)PK +� �(�� ��P�P.oracle/xml/parser/v2/NonValidatingParser.class����-����,./��������������������������������� + + + + + + +! +% + + + +" + + + + +  " !    # # # # $ # # # # # #! #" ## #$ #% #& #' #( #) -* ++ +, +)- +). $/ +0 "1 +*2 +*3 4 5 6 7 8 !9 !: $; -< $= > +? @ +&A +&B +C 'D E +F +G H I +&J +K +L +M +N +/O +%P +/Q +)R +)S +)T +%U +U +V +0V +&W +&X +&Y +'Z +'[ +)\ +/\ +%] +)] +/] +^ _ -` a +"b +&c +d e +)f +)g +*h +i +j k !l m n !o p "q %r !s +t +u +v +w +x +y +z +{ +| +} +~ + +� +� +� +� +� +� +� +� +� %� � +)� +� +)� � � "� � +� -� � %� +)� +� +� +)� +)� +)� +� � +)� � +� +)� +!� .� +� +)� +)� +)� +)� +)� +)� +)� +)� +)� +)� +)� � $� -� $� $� +%� +� +%� $� +� +)� +)� +)� +)� +)� -� $� +� � � � +� +� +� +)� +)� ,� %� � � � � � � � � �  6� 7 8 9 + :� ;� < =3 >& ? @ A� B2 C2 D2 E2 F G2 H2 I2 J2 K2 L2 M2 N2 O2 P2 Q2 R2 S2 T2 U V� W X� Y� Z� [� \ ]� ^� _% ` a1 b" c* d# e1 f� g� h i+ j� k( l l + m� n1 o p� q� r1 s1 t� u� v� w� x� y� z� {� | }� ~� � �� �� �� �� �� �� �� �� �� �3 � �3 �� �� �� �1 �� �� � �� �� � � � � �! � �4 � �$ �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �1 �5 �� �� �� � �4 �1 �� �� � � � �� �� �� �� � �� � �� �) � �� �� �� �� �� � � �� �� �� �� �� � �� � �1 � � � � �� �� �� � � � � � � � �  �    +    �  +� � �  �  '(()I()Ljava/io/InputStream;()Ljava/io/Reader;()Ljava/lang/String;()Ljava/net/URL;#()Loracle/xml/parser/v2/NSNameImpl;&()Loracle/xml/parser/v2/ObjectBuilder;$()Loracle/xml/parser/v2/ParserState;+()Loracle/xml/parser/v2/XMLDocumentHandler;"()Loracle/xml/parser/v2/XMLEntity;*()Loracle/xml/parser/v2/XMLExternalReader;"()Loracle/xml/parser/v2/XMLReader;()Lorg/w3c/dom/NamedNodeMap;()V()Z()[C(I)C(I)Ljava/lang/String;(I)Lorg/w3c/dom/Node;(I)V(I)Z'(ILjava/lang/String;)Ljava/lang/String;9(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;<(Ljava/io/InputStream;Ljava/lang/String;Ljava/lang/String;)V7(Ljava/io/Reader;Ljava/lang/String;Ljava/lang/String;)V&(Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/Object;)V(Ljava/lang/Object;)Z*(Ljava/lang/Object;ILjava/lang/Object;II)V8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/Object;Z)V(Ljava/lang/String;)I&(Ljava/lang/String;)Ljava/lang/String;6(Ljava/lang/String;)Loracle/xml/parser/v2/ElementDecl;(Ljava/lang/String;)V(Ljava/lang/String;)Z(Ljava/lang/String;B)V'(Ljava/lang/String;I)Ljava/lang/String;?(Ljava/lang/String;Ljava/lang/String;)Lorg/xml/sax/InputSource;'(Ljava/lang/String;Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)Z9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)VK(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VM(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)V[(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/ElementDecl;)V4(Ljava/lang/String;Ljava/net/URL;)Ljava/lang/Object;)(Ljava/lang/String;Z)Lorg/w3c/dom/Entity;(Ljava/lang/String;Z)V#(Ljava/net/URL;Ljava/lang/String;)V5(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;)V"(Loracle/xml/parser/v2/AttrDecl;)V(Loracle/xml/parser/v2/DTD;)V%(Loracle/xml/parser/v2/ElementDecl;)V (Loracle/xml/parser/v2/NSName;)VB(Loracle/xml/parser/v2/NSName;Loracle/xml/parser/v2/SAXAttrList;)V-(Loracle/xml/parser/v2/NonValidatingParser;)V,(Loracle/xml/parser/v2/XMLDocumentHandler;)V,(Loracle/xml/parser/v2/XMLDocumentHandler;)Z#(Loracle/xml/parser/v2/XMLEntity;)Z$(Loracle/xml/parser/v2/XMLEntity;Z)V"(Loracle/xml/parser/v2/XMLError;)V8(Loracle/xml/parser/v2/XMLReader;Ljava/lang/String;IIZ)VM(Loracle/xml/parser/v2/XMLReader;Ljava/lang/String;ILjava/lang/Exception;IZ)V(Lorg/xml/sax/Locator;)V#(Z)Loracle/xml/parser/v2/XMLEntity;([CII)V([CII)Z([I)[C'([Ljava/lang/String;)Ljava/lang/String;>CodeDOCTYPEEOF +ExceptionsIIDIGNOREINCLUDELineNumberTableLjava/lang/String;Ljava/net/URL;Ljava/util/Hashtable;Loracle/xml/parser/v2/DTD;"Loracle/xml/parser/v2/ElementDecl;!Loracle/xml/parser/v2/NSNameImpl;"Loracle/xml/parser/v2/ParserState;"Loracle/xml/parser/v2/SAXAttrList;)Loracle/xml/parser/v2/XMLDocumentHandler;Loracle/xml/parser/v2/XMLError; Loracle/xml/parser/v2/XMLReader;Lorg/xml/sax/DTDHandler;Lorg/xml/sax/EntityResolver;NOTATIONNonValidatingParser.javaPUBLICSYSTEM +SourceFileZ[C[I[Ljava/lang/String;#[Loracle/xml/parser/v2/ParserState;addAttr addAttrDecladdElementDecl addEntityaddNamespaceDef arraycopyattpresattrTypeattrlistatttypebaseURLbuildcATTLIST cCDATAEND cCDATASTART +cCOMMENTSTART cDATASection +cDECLSTARTcDOCTYPEcELEMENT cEMPTYTAGEND cENDTAGSTARTcENTITYcFIXEDcIGNOREcINCLUDEcNDATA cNOTATIONcPISTARTcPUBLICcSYSTEM +characterscheckDefaultAttributes +checkNamescheckParEntityclosecommentconcatcountcreateXSDBuildercreateXSDHandler currentStatedefdoctypePresentdtd +dtdHandleredempty +endDoctype endDocument +endElement entResolverequalserrerrorexpandNamespaceexternal externalDTDfindElementDecl +findEntityfixedDTD fixedSchema flushErrorsgetgetAttrDeclIndex getAttrDecls +getBaseURL +getByteStreamgetChargetCharacterStream getEntitygetExternalReadergetInternalReader getLength +getMessage getMessage0 getMessage1 getMessage2 getNodeName getNodeValue getPublicId getSystemId +getXSDHandler$http://www.w3/org/XML/1998/namespaceidxignorableWhitespaceindexindexOfinitinterninternalSubsetisEOFisTopLevelReader isXSDHandleritemjava/io/IOExceptionjava/lang/Exceptionjava/lang/Objectjava/lang/Stringjava/lang/Systemjava/lang/Throwablejava/net/MalformedURLException java/net/URLjava/util/Hashtablelength localname markupDepthmaxIndexnamenameSpaceTable namespacendatanormalizeAttrValuensnameoracle/xml/parser/v2/AttrDecloracle/xml/parser/v2/DTD oracle/xml/parser/v2/ElementDecloracle/xml/parser/v2/NSNameImpl(oracle/xml/parser/v2/NonValidatingParser"oracle/xml/parser/v2/ObjectBuilder oracle/xml/parser/v2/ParserState oracle/xml/parser/v2/SAXAttrList!oracle/xml/parser/v2/XMLConstants'oracle/xml/parser/v2/XMLDocumentHandleroracle/xml/parser/v2/XMLEntityoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNode&oracle/xml/parser/v2/XMLParseExceptionoracle/xml/parser/v2/XMLReaderoracle/xml/parser/v2/XSDFactoryorg/w3c/dom/NamedNodeMaporg/xml/sax/DTDHandlerorg/xml/sax/DocumentHandlerorg/xml/sax/EntityResolverorg/xml/sax/InputSourceorg/xml/sax/SAXExceptionparseAttlistDecl parseAttrparseAttrEntityRefparseAttrValueparseAttributes parseCommentparseContentEntityRefparseDTDparseDoctypeDecl +parseDocument parseElementparseElementDecl parseEndTagparseEntityDeclparseEntityRefValueparseEntityValueparseMarkupDecl parseMiscparseNotationDeclparsePI parsePrologparseRootElement parseTextparsed parserStatespeekpopState popXMLReaderprefix +preserveWSprocessSchemaLocationprocessingInstructionpubIDpubid +pushEntityRefpushExternalDTD pushState +pushXMLReaderputqnamereadreaderreportCharactersrequireWhiteSpacereset +resolveEntity resolveNSscanAttrString scanCDATA scanChars scanCommentscanEntityStringscanNamescanPI scanQNamescanQuotedStringscanWhiteSpaceschemaLocationschemaValidationMode +setDoctypesetDocumentLocatorsetError +setHandler setNodeValue +setRootTagsetURL setXMLSchemaskipIgnoreSection +skipNSNameskipQuotedString skipUntilskipWhiteSpace +startDocument startElement +startsWith +stateIndex stateSizesysID toCharArray toLowerCasetoStringtryReadunparsedEntityDeclurlxmlxml-stylesheet +xmlHandlerxmlns #i+c*'k(�)@ b"oa1�1r1s1�1_%�5 � +�3�3)��R*�1*�u*�f*��*�y*��*��*� +��*� +��**���!��*��*��*�Y�2�g�:�n optu{#}*#1�<�A�F�Q�(�*�1*�u*�f*��*�y*��*��*� +��*� +��*+�Ե�*+�n�n*+�h�h*+�p�p*+��*+�E�E*+����*+�d�d*+����*+����*+�g�g*+�x�x*+�Ƶ�*+�f�f*+���L�j�n optu{#}*#1�9�A�I�Q�Y�a�i�q�y���������������:�e9,� +�/*�d���*�d�Y�3��-��N*�d��,-��W�� ��&�+�8�V���*�d�i��*�d�i�}L+��+��=6�t+���N-��:*�d�C��6�:-�e�D*-��-��-�e�?*�d�C-��-��-�e-�D�;�*�d�C�B-�DO�����J +  +&28FLScr}��� +�(W ��(m�/�*�d��L+���9+*+�Ķٵ�+���.*�p*��*�p�+�Ķ���q� ++*�ٵ�*�d�CM6�Y,��2N-�H-�,��S�,��*-��S,��2�*�p*��*�p�-����q�,�a����^����&�<�A�D�G�Q�Y�_�g�m�s�|��������������(0x�E%*�Զ��*�E�*�E��Y*�Զ��4�������iL*����Y�cL�$ML*�p*��*�p�,������q+�2+*�p��+*�Թ�+*���*+�� W�*�L+� 8[^0Z�� � ������,�1�4�8�8�B�L�V�[�^�_�b�g�(��v:*�f*��� +*�Զ^*�x�*�Y�2�g�*�f*��*�p���* +�� ���%�(�-�2�9�0���q�n+��N-�666666�@-4 � �6�.��� -� U-�-�4U6����Y-�:L+�F�� �����(�+�.�1�B�K�Y�\�c�o�(0��� �LM�:6*�Զ�*�Զ�N*�g-�vL*�Զ�6�s6M*����:*�Զ�W*��(���c*�Զ�:��Y22�6M�@ +�96*�Զ�*��(���#*�p*��*�pd��d�q�6� *��)��*�Զ�*��#���B*�ԲR�R����),��Y22�6M,�A*�Զ֧ +*�Զ�*�Զ�6  '� + "�+,��Y22�6M,�A*��: +, +�e,�@+�!�Y-�5L*�u�+�t*�g+�=*�u�,�t+�|�+,�<*�Զ�6�*��>������)*��>���*�p*��*�pd��d�q� +B`ac +d +fgh%k.l1n4o6qAsIuUw^xezs{tzxx{}������������u�������������������������!�/�3�A�B�F�K�Q�W�[�_�i�p�u�}����������l�����^(0��'��MN*��,��:,2N,2:*�Զ�W*��=���*�p*��*�pz��z�q*�Զ�W*��L*��*�y��o�*+��*-+�?*�d�C��6�*�d�C-+�;�*�p*��*�p|��|�q�Z������#�/�G�O�T�b�l�q�y���������������(0��'�L*����M,��,���*�p*��*�p���q�,���,���*��,�˚�� +:*����N+-�`L*�Զ�� *�Զ�+�*��<���*�p*��*�p~��~�q���*��&�����+*���`L���^FH IJLN2O5S=TBVMWPZU__`ebodvexg�i�g�k�l�[(0�� �L*�Զ�="�!'�*�p*��*�p}��}�q+*���ڶ`L*������h*��<���*�p*��*�p~��~�q���*��&���+*���`L���*�Զ����*�p*��*�p�����q+�+�F&) *+/3<5G6J7V8n7q9}:�9�;�=�>�A(0��}A*�Զ�W*��>���'*�ԲO�O����*�d�j� +*�����*�[*�s�* +SUW&Y.Z1]5Q8`<c@L(0��3*�Զ�L*�+�_�YZU(0���X*����L+��+����M,+��U*,���+���*�p*��*�p�����q�*��+�ˬ2 r s +twyz#{*|,3�M�O�(0����*�g+��*�g*�Զ���*�g*�Զ���**�Զ���*Y�u`�u*�*�g��*��*��k*Y�ud�u*�Զ��*�p*��*�pd��d�q*�p�z�6 +���$�/�9�F�J�S�]�g�����0��i�*�ԲL�L�����*�ԲM�M����*�p*��*�pd��d�q*�f*�Զ�*�g*�Զ��*�*�g��*�Զ�y*�ԲX�X����8*�Զ�*�g*�Զ��*�Զ�*�g*�Զ��*�Զ�W�2*�ԲY�Y���� *�Զ�*�g*�Զ��*�Զ�W*��[���*�g��*��*��>���*�p*��*�p�����q*�g���p*�x�i�Y*�~*�g���9M*�g,�����W**�g��*�g�ɶ̚�**�Զ���*Y�u`�u*��*Y�ud�u**�Զ���*��k�5SV�*mno%q8r<q?vDxKzY{f}p����������������������������� +�$�5�5�H�S�V�W�l�m�x����������i(0���w*�*�Թ�*����M*�p*��,��c,�r*��*��*��*�Զ��*�p*��*�pd��d�q**�p�\*�p�z*��l� +0>� +� +����.�2�6�:�D�^�f�m�v�(0��k��MN*��,��:,2N,2:*-��*��*�*�d��*�d�C��*�d�j�O*�*�d���m*��W*���2*��2���*��*��&���*���*�dY��`���*�ԲP�P����P*��*�d���*�p*��*�px��x�q*�*�d���m*��W*����*��2���*�ԲW�W���� +*����*�ԲJ�J���� +*���p*�ԲI�I����1*��*����L*��.�I*�+*��.*��.�K�0*��<������*�Զ��*�Զ�*�dY��d��*����ק�l�.������$�(�?�I�Y�^�f�p�t������������������������������ ��!�%�(�:�F�O�e�h�t�w�������(0��G*�Զ�*�Զ�*�Զ�*��>��WXYZT(0����*�d��LM*�Զ�N*��:��� +-M*�Զ�N,+�Ħ -+���%*�p*��*�py*�d���Ҷ�y�q*�Զ�W*��>���*�p*��*�p{��{�q�: +  +!)9TX[co�(0��=>*�Զ�*�Զ]=*�Զ�L*�g+�w�%:�H*�p*��*�pt+��t�q�%Y+�8:*�x�?*�g�>*�u�.�t�%�%Y+�8:*�g�>*�u� �t*�Զ�*�ԲX�X����.>*�Զ�*�Զ��*�Զ�*�Զ��**�ԲY�Y����>*�Զ�*�Զ��̻Y*�~��9:����W*�Զ�6*�ԲU�U������*�p*��*�p�����q�*�p*��*�pu��u�q*�Զ�*�Զ���#���*�p*��*�pv��v�q*�h+��������*��:����*�Զ�W*��>���*�p*��*�pd��d�q� #�6�� ���)�.�G�R�Y�c�j�p�s~���� +� � +���� +���� #!$#-$?&D'^)b*z,�-�/�0�3��:�;�>�A�B�CE(0���jL*����M,��,���,���*��,�˚�+*���޶`L*��%���+*���`L���*�Զ����*�Զ§+�Bfh jkno q+r.y<{H|Q{T}^e�h�(0����M*�Զ�<"�!'�*�p*��*�pw��w�q,*���޶`M*������A*��%���,*���`M���*�Զ����*�p*��*�p�����q,�,�:KL MN/U<WGXJYVZ_Yb[l]�^�a0���P*�Զ�W�=*�ԲL�L����Q*�ԲN�N���� +*��� +*�ԲG�G���� +*����*�ԲQ�Q���� *��W��*�ԲV�V���� +*����*�ԲJ�J�d��� +*����*�u��*��[����*�Զ�W*�ԲT�T����b*�Զ�W*��[���*�p*��*�pr��r�q*��*�ԲH�H�d���2*�p*��*�ps��s�q�*�ԲS�S���� +*�Զ��*�p*��*�pe ��e�q*�Զ��*�ԲW�W���� +*����*��%���v<*����M,�*�Զ�W��*��,�˚*�Զ�W���**�Զ���*Y�u`�u*���*Y�ud�u**�Զ��ԧG*�Զ§=*��]����*�Զ�W*�Զ���*�p*��*�p�����q*�Զ�W*�Զ�����G�� ��/3�6HLOafi{���� � � �������#& );BEZ ^a!h�k%}&�%�'�*�+�,�.�/�2�4�5�8�:�;�=�>�@�A�>�D'FGJK"L#M=PE�O�(0��o;*�Զ�W*�ԲW�W���� +*�����*�ԲJ�J���� +*����ɱ"#%&%!'3(7':*(0���*�Զ�*�Զ�*�Զ�W*�ԲX�X����{*�Զ�*�Զ�*�Զ�<*��>�����*�p*��*�p�����q*�Զ�*�Զ�W*��>����*�p*��*�pd��d�q�q*�ԲY�Y����B*�Զ�*�Զ�*�Զ�W*��>���=*�p*��*�pd��d�q� *�p*��*�pe  ��e�q��~����(�/�6�>�J�N�h�o�w������������������������������ +� +��(0���}>*�Զ�L+�����#+�*�p*��*�pm��m�q>*�Զ�6*�Զ�M�$,���*�p*��*�p�����q�*�+,���6 +8< +>?A4B6E?GGISJmLqM|4(0��1 +*��*��*��� (0��U-*��<��� *��W�*�p*��*�pl��l�q� ,(0����=*�ƚv*��*����L*��.�a*�Զ�<�=*�+*��.*��.���:*+*��.*��.��*��*����N*��.�*-*��.*��.���)*��*����L*��.�*+*��.*��.�ձF(* ,.2*5,6B2E:V;b<k=|B�E�F�G�%(0��]-*�dL*Y��d��*���**��*��2�d�*�d+�����#�&�+�(0��� ++��=+��N6�b:��::*�p*��*�p�������q�؄� -4 �����6��� -4 ������Y-d�::��� -4 ����z6��� -4 ���Y-d�::�Y*�~�9�F: * ��)W*�p*��*�p�����q�W���,� +���� + +�)ij +k +n +onpqr"s1t6r9n<xNyT{X|m}s~�������������������������������� +� +��vg(��y�*�n,+��N-��-��Y:�*��-��-���ϧ�-�Y:�*��-��-���Χ�-��YL�:*�ԻY+�4+-���Чr:*�p*��*�pp+��p�r�R*�p*��*�pq+��q�q�6*�ԻY+�4+,�Ч":*�p*��*�pp+��p�r��Uil���z� ���+�.�8�I�L�U�U�i�l�n���������������������������������0����*�g-�v:*Y��`��*��*���d*��*���/*��:**��h�!��*��*���@*Y��h��*�!Y+,-�7�d*��*��*�dS*Y��`���**��*��2�d*�d+,-�ױ>� +���*�0�=�L�V�f�s�}�������(0�) +*�+�Z� +� �(0��~B*��*�x�*�g<�*��2�*��2�ׄ*�����*�d*���* +�� ����,�7�<�A����=M*��>+�, +�*��2:�����+�{�M,�,�������2 ��� +��� �-�1�3�6�:���,*�y+�%*��N�WN-�-+��*��W�� $'0>�� � ��������$�'�(�+�0-PK +� �(v�����(oracle/xml/parser/v2/ObjectBuilder.class����-()Ljava/lang/Object;8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;4(Ljava/lang/String;Ljava/net/URL;)Ljava/lang/Object;(Ljava/util/Locale;)V"(Loracle/xml/parser/v2/XMLError;)VCode +ExceptionsLineNumberTableObjectBuilder.java +SourceFilebuild getObjectjava/lang/Exceptionjava/lang/Object"oracle/xml/parser/v2/ObjectBuildersetError setLocale + + + PK +� �(o%���&oracle/xml/parser/v2/ParserState.class����-E$8>?@ + + +          ! +" # )% )& )' 51 6/ 74 9+ :- ;. <- =0 A- B- C% D+()V(I)VK(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V[(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/ElementDecl;)VCodeILineNumberTableLjava/lang/String;Ljava/util/Hashtable;"Loracle/xml/parser/v2/ElementDecl;!Loracle/xml/parser/v2/NSNameImpl;"Loracle/xml/parser/v2/SAXAttrList;ParserState.java +SourceFileZattrlistedemptyjava/lang/Object markupDepthnamenameSpaceTable namespacensnameoracle/xml/parser/v2/NSNameImpl oracle/xml/parser/v2/ParserState oracle/xml/parser/v2/SAXAttrListprefixqnameresetstate!=051;.749+6/D+)(*j6*�*�Y+,-��*�Y�� *� +*� *�*� �,"79: ;&<+=0>57C(*�C*�+�*�,� +*�-�*��*� �*�*� +*� *�*� �,. CDEF!G(H-I3J8K=LBA32PK +� �(��!��#oracle/xml/parser/v2/PathExpr.class����-�?���������������� + ; + ; +< += + > +? +@ +A + B + C D + E F G H I J K K +L +M +N + O + P +Q +R +S + T U V +W +X Y Z +[ \ ] + ^ _ ` a xg xj xk xo xr xs xv �n �u �| �c �� �| �~ �| � �� �w �b �e �b �f �p �d �t �i � �| �m �q �� � �b � �{ �g �� �� �|()I()Ljava/lang/Object;#()Loracle/xml/parser/v2/XMLElement; ()Loracle/xml/parser/v2/XMLNode;$()Loracle/xml/parser/v2/XSLNodeList;()V(F)V(I)Lorg/w3c/dom/Node;(I)V(ILjava/lang/String;)Vg(Loracle/xml/parser/v2/XMLNode;FLoracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLPatternInt;e(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLTContext;)Z%(Loracle/xml/parser/v2/XSLExprBase;)V%(Loracle/xml/parser/v2/XSLNodeList;)V�(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLNodeList;i(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLTContext;)V*(Loracle/xml/parser/v2/XSLParseString;IZ)V)(Loracle/xml/parser/v2/XSLParseString;Z)VG(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLExprValue;(Lorg/w3c/dom/Node;)V([C)V([Ljava/lang/String;)VCode +ExceptionsFILineNumberTable!Loracle/xml/parser/v2/FilterExpr;"Loracle/xml/parser/v2/XSLExprBase; +SourceFileXSLNodeSetExpr.javaZ[C#[Loracle/xml/parser/v2/XSLNodeList; +addElementaddNode +anchorTypeclonecurListexprTypefilter +filtertype firstExprfound +getAnchorName +getAnchorTypegetCurrentNode getLength getNodeListgetSelectedNodes +getSrcRootgetValueitemjava/lang/StringlastExpr lookahead +matchNodeList matchPattern matchrootnextExpr nextTokenoracle/xml/parser/v2/FilterExproracle/xml/parser/v2/PathExproracle/xml/parser/v2/Steporacle/xml/parser/v2/XMLNode#oracle/xml/parser/v2/XPathException!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeList#oracle/xml/parser/v2/XSLNodeSetExpr#oracle/xml/parser/v2/XSLParseString"oracle/xml/parser/v2/XSLPatternInt oracle/xml/parser/v2/XSLTContextorg/w3c/dom/NodeprevExprpriorityresetroot setPrioritystrtype  �~�����|��xsyu�*�*�8*�2*�*� ��*�� Y�S*�� Y�S/>6*��*�Y+�� *� �#�<*� �!��*��*�6�+�//� +�/��+�/>+�4W�@�+�//� *�8*�2/>+�4W*�6�+�/��*�8�>+�4W�Y+�:�$���Y��Y+�9����*�*� �#� +*�8� *�6�O*�6�6�C+�/>+�4W�Y+�:�$��Y��Y+�9���*�*�6+�//���+�/�����}�8� ��� +, 9<?ER]iouv�!�"��%�,�.�/�0�1�2�3�,�5�7�8�9�A�B�D�FHJMNM"P+U.X3Y8[D\L^b`hanUwV�cz�wy3*�.�*�.�+�%�}rsu�by7*�.�*�.��&�*��}ijl�ty��� N+�':*� �#�^*� +�,:�:��*�"��Y�����)�*�"��-�)�� S�C� Y� Y���*�8�-� Y�S-2�+��-� Y�S-2�*�"� +-� Y�S6*�":�--d2�7�-2-d2+�*Wd6�3:��Ի Y-2��}�!{| ��)�0�;�>�F�M�P�^�a�p�w�����������������������������������z�ly��*�2�7*�2�7*�2+�++�+� *�"��6*�.:�D*�d2�7*�2�(���*�2*�d2-�1d6�5:���*�2�66�*�2�-�+�+�*��*�2�(��٧3*� �#�*� +*�2-�0�*��*�2�(�*��}�!� ���$�+�-�0�6�9�E�R�T�`�j�m�s�z��������������������� +��z�hy"*#�6�} +��z��PK +� �(C4$W W $oracle/xml/parser/v2/Predicate.class����-Zdhijklmnopqrst +) + ) +* ++ +, + - +. / + 0 +1 + 2 + 3 4 +5 6 +7 +8 9 : +; + < += +> + ? @ PC PG PH [I \O ]E _Y `D aB bA cN eT fA gR uL vC wT xV yJ zC {O |A }F ~T()I()Ljava/lang/String;()V()Z(I)Ljava/lang/Object;!(I)Loracle/xml/parser/v2/XMLNode;(I)V((ILjava/lang/String;Ljava/lang/String;)V(Ljava/lang/Object;)V%(Loracle/xml/parser/v2/XSLNodeList;)Vh(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLNodeList;I(Loracle/xml/parser/v2/XSLParseString;)Loracle/xml/parser/v2/XSLExprBase;((Loracle/xml/parser/v2/XSLParseString;)VG(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLExprValue;(Lorg/w3c/dom/Node;)VCodeD +ExceptionsILineNumberTable!Loracle/xml/parser/v2/FastVector; +SourceFileXSLNodeSetExpr.java#[Loracle/xml/parser/v2/XSLNodeList;] +addElementaddNode elementAtfilter +filterlistgetBooleanValuegetCurrentToken getLengthgetValuejava/lang/Object lookahead nextToken numbervalueoracle/xml/parser/v2/FastVector-oracle/xml/parser/v2/FromDescPrecedingSiblingoracle/xml/parser/v2/Predicate#oracle/xml/parser/v2/XPathException!oracle/xml/parser/v2/XSLExceptionoracle/xml/parser/v2/XSLExpr oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeList#oracle/xml/parser/v2/XSLNodeSetExpr#oracle/xml/parser/v2/XSLParseString oracle/xml/parser/v2/XSLTContextparsepopCurrentNodeList +predicateSize +predicatespushCurrentNodeListresetsetCurrentNodesize trustedItemtype  +xVwT_YPMQ�y*�*� �*�� Y�S*�� Y�S*�Y��"�2+�W*�"+��+�]��Y�+���+�W+�[���**�"�&�!�U: F ^ H I& J2 K5 M: NE PN R_ Ud Km Wx FS^KQ4 +�*�+S>6��*�d2�$*�"�� :,*�2�#*�2�66�^*�2�':,�%,�:  �(��! �`���(*�d2�� ��*�d2�����d>,� �*�!��Y*�2�Ub b c g j k( l2 o= pC rI sN rP tV v^ |h ~v � |� �� �� p� �� �� g� �SWXPK +� �(��kޓ�&oracle/xml/parser/v2/PrintDriver.class����-(()V(Ljava/lang/String;)V(Loracle/xml/parser/v2/DTD;)V!(Loracle/xml/parser/v2/XMLAttr;)V"(Loracle/xml/parser/v2/XMLCDATA;)V$(Loracle/xml/parser/v2/XMLComment;)V%(Loracle/xml/parser/v2/XMLDocument;)V-(Loracle/xml/parser/v2/XMLDocumentFragment;)V$(Loracle/xml/parser/v2/XMLElement;)V,(Loracle/xml/parser/v2/XMLEntityReference;)V!(Loracle/xml/parser/v2/XMLNode;)V(Loracle/xml/parser/v2/XMLPI;)V!(Loracle/xml/parser/v2/XMLText;)VCode +ExceptionsLineNumberTablePrintDriver.java +SourceFilecloseflushjava/io/IOExceptionjava/lang/Object oracle/xml/parser/v2/PrintDriverprintAttributeprintAttributeNodesprintCDATASectionprintChildNodes printComment printDoctype +printDocumentprintDocumentFragment printElementprintEntityReferenceprintProcessingInstruction +printTextNode setEncoding   ! +" # $ +%&'PK +� �(�g�bXX"oracle/xml/parser/v2/RelExpr.class����-0'()*+,- + + +   + + +  # $ % & . /()I()V(I)V%(Loracle/xml/parser/v2/XSLExprBase;)VI(Loracle/xml/parser/v2/XSLParseString;)Loracle/xml/parser/v2/XSLExprBase;Code +ExceptionsILineNumberTable +SourceFile XSLExpr.java +addElement classtype lookahead nextToken!oracle/xml/parser/v2/AdditiveExproracle/xml/parser/v2/EqualExproracle/xml/parser/v2/RelExpr!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstants#oracle/xml/parser/v2/XSLParseStringparse setOperator *�� �.?*�M*� ��2�Y� L+,� +,*� �*� +W*�M+,� +*� ����+M,� . �����#�(�-�2�;�=�!"PK +� �(�x �D D &oracle/xml/parser/v2/SAXAttrList.class����-n3B\]^_`cde + + + ! +" +# $ % +& + ' + ( + ) * + , - . +/ +0 +1 2 C6 C? LA M> N; OI PE Q: Y7 Z7 [< aJ bJ fJ gJ iK j5 k7 l9 mJ()I()Ljava/lang/String;()V(I)Ljava/lang/String;(I)V&(Ljava/lang/Object;)Ljava/lang/String;(Ljava/lang/Object;)Z*(Ljava/lang/Object;ILjava/lang/Object;II)V(Ljava/lang/String;)I&(Ljava/lang/String;)Ljava/lang/String;,(Ljava/lang/String;)Ljava/lang/StringBuffer;(Ljava/lang/String;)VM(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)V_(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/String;)V:CodeILineNumberTableSAXAttrList.java +SourceFile[I[Ljava/lang/String;[ZaddAttrappend arraycopyattrTypecountequalsgetExpandedName getLength getLocalNamegetName getNamespace getPrefixgetQualifiedNamegetTypegetValueindexOfjava/lang/Exceptionjava/lang/Objectjava/lang/Stringjava/lang/StringBufferjava/lang/Systemname namespaceoracle/xml/parser/v2/AttrDecl oracle/xml/parser/v2/SAXAttrListorg/xml/sax/AttributeListprefixqnamereset specifiedtoString typeToStringvalueOfvalues!  +fJaJgJbJOIiKmJPEC8D|@*� *� +�*��*��*��*��*��*��*��F* +8: ;<=">*?2@:A?8L@D,*+,-� +�F +MJLADY�*�*�+S*�*�,S*�*�-S*�*�S*�*�O*�*�T*�*�S*Y�`��DW*�:*�: *�: +*�: *�: *�: +*�:**�h��**�h��**�h��**�h��**�h��**�h� +�**�h��*�*�� *�*�� +*�*�� *�*�� *�*�� +*�*��*�*��*�*�+S*�*�,S*�*�-S*�*�O*�*�T*�*�S*�*�S*Y�`��TWF�)SU +VWX)Y4Z?[J\TSW^X`^adbjcpdve|f�h�i�j�k�l�m�n�p�q�rst&u5vDxNyXzb{m|x}�~��PR7D�T� *���*�2�6*�2��(�Y*�2�� �*�2��M� +*�2M,�F= >A&BHAKDRES4D*��F�T7D6� *���*�2�F0 13U7D6� *���*�2�F� ��V7D6� *���*�2�F# $&W7D6� *���*�2�F  + X7D6� *���*�2�F Y7D9� *���*�.��F� ��Y=D( *+�=*��F +��Z7D6� *���*�2�F� ��Z=D( *+�=*��F +��[<DI!=�+*�2����*�����F�����h6D"*��F +FDHGPK +� �('we�GG$oracle/xml/parser/v2/SAXParser.class����->/01234567 + + + + +     +  " " ,( -) .' 8% <! =&()V(Lorg/xml/sax/DTDHandler;)V (Lorg/xml/sax/DocumentHandler;)V(Lorg/xml/sax/EntityResolver;)V(Lorg/xml/sax/ErrorHandler;)VCodeLineNumberTable*Loracle/xml/parser/v2/NonValidatingParser;)Loracle/xml/parser/v2/XMLDocumentHandler;Loracle/xml/parser/v2/XMLError;Lorg/xml/sax/DTDHandler;Lorg/xml/sax/EntityResolver;SAXParser.java +SourceFile +dtdHandler entResolvererr.oracle/xml/parser/v2/DefaultXMLDocumentHandler(oracle/xml/parser/v2/NonValidatingParseroracle/xml/parser/v2/SAXParser!oracle/xml/parser/v2/XMLConstants'oracle/xml/parser/v2/XMLDocumentHandleroracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLParserorg/xml/sax/HandlerBaseorg/xml/sax/Parserparser +setDTDHandlersetDocumentHandlersetEntityResolversetErrorHandler +xmlHandler! "#i=*� *��Y� +�*��Y� +�*��Y� +�*��Y� ��$=?@ B.D<=9#% *�+��$ +\Z:#M%+��*�+���*��Y+���$hihk$f; #% *�+��$ +PN<!#( *��+��$ +x v+*PK +� �(�>!ͥ�oracle/xml/parser/v2/Step.class����- +?������������������������������������ + j + +j + j + j + +j +j +j +j +j +j +j +j +j +j +j +j +j +j +$j +'j +"k +l +m +'n o +p + p (q r s +t +u v +&w +&x +&y +&z +({ +&| +'} +!~ + +!� +)� +!� +� +'� (� +(� +&� � (� � (� +(� � � � $� +� +'� +'� +� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � �  �  +�  �  �()I()Ljava/lang/String;#()Loracle/xml/parser/v2/XMLElement;()Lorg/w3c/dom/Node;()S()V(C)Z!(I)Loracle/xml/parser/v2/XMLNode;(I)Lorg/w3c/dom/Node;((ILjava/lang/String;Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)Zg(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLNodeList;)Loracle/xml/parser/v2/XSLNodeList;G(Loracle/xml/parser/v2/XMLNode;)Loracle/xml/parser/v2/XSLSourceContext;h(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;)V�(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLSourceContext;)Loracle/xml/parser/v2/XSLNodeList;h(Loracle/xml/parser/v2/XMLNode;Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;Z)Vd(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLNodeList;)Loracle/xml/parser/v2/XSLNodeList;C(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLNodeList;)Vd(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLNodeList;G(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLNodeList;)V�(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLNodeList;i(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLTContext;)Vh(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLNodeList;((Loracle/xml/parser/v2/XSLParseString;)V((Loracle/xml/parser/v2/XSLParseString;)Z*(Loracle/xml/parser/v2/XSLParseString;IZ)V(Lorg/w3c/dom/Node;)V(Z)V([Ljava/lang/String;)V)*Code +ExceptionsFILineNumberTableLjava/lang/String;Loracle/xml/parser/v2/Axis; Loracle/xml/parser/v2/Predicate;"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLNodeSetExpr.javaZaddNode axisClasscheckNamespace classtype contextList +descAxisClass +doNodeTestfilterfound getAncestor +getAnchorName +getAnchorTypegetAttributeList +getChildNodesgetChildTypeNodesgetCurrentTokengetDescendantNodes getLength getNodeTypegetOwnerElement +getParentNodegetSelectedNodes +getSrcContext +getSrcRootinternitemjava/lang/String lookaheadmatch matchPattern mergeListname nameSpace nextToken nodeTestTypeoracle/xml/parser/v2/Axisoracle/xml/parser/v2/FilterExpr!oracle/xml/parser/v2/FromAncestor'oracle/xml/parser/v2/FromAncestorOrSelf#oracle/xml/parser/v2/FromAttributes!oracle/xml/parser/v2/FromChildren%oracle/xml/parser/v2/FromDescAncestor+oracle/xml/parser/v2/FromDescAncestorOrSelf&oracle/xml/parser/v2/FromDescFollowing-oracle/xml/parser/v2/FromDescFollowingSibling#oracle/xml/parser/v2/FromDescParent&oracle/xml/parser/v2/FromDescPreceding-oracle/xml/parser/v2/FromDescPrecedingSibling-oracle/xml/parser/v2/FromDescendantAttributes$oracle/xml/parser/v2/FromDescendants"oracle/xml/parser/v2/FromFollowing)oracle/xml/parser/v2/FromFollowingSiblingoracle/xml/parser/v2/FromParent"oracle/xml/parser/v2/FromPreceding)oracle/xml/parser/v2/FromPrecedingSiblingoracle/xml/parser/v2/FromSelforacle/xml/parser/v2/PathExproracle/xml/parser/v2/Predicateoracle/xml/parser/v2/Steporacle/xml/parser/v2/XMLAttroracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNode#oracle/xml/parser/v2/XPathException!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeList#oracle/xml/parser/v2/XSLParseString oracle/xml/parser/v2/XSLTContextorg/w3c/dom/Node +predicates +prevSeparatorpriorityprocessAxisNodeTestreset trustedItemtryAxis $ ���������������������*�=*�c*�C*�H*�K*�d�*�'Y�>�G�`+�Z.� +�Z��N+�Z.�#*�Y�<�C*�Y�A�H*ٵb�*�Y�9�C*�Y�3�H*ٵb+�aW�+�Z��7*� Y�-�C*�Y�6�H*��b*+�^�]*+�`�_* �e��+�Z�� +�ZƠL*� Y�-�C*�Y�6�H*+�^�]*+�`�_*+�Z�b+�Z�� *�e�I*�e�@�**+�i� +�aW�*� Y�.�C*�Y�A�H+�Z�������������������������D�����*�*ܵb+�aW+�F�8�*+�^�]* �e+�aW�*�e*�]+�Z)���"Y�+�P�?�*�e*+�Z�b+)�[W�e*��b*+�^�]*+�`�_* �e�G*+�^�]*+�`�_**�b*�e�(*+�^�]*+�`�_*ǵb*�e� *�K�+�aW+�Z[�*�Y+�@�c*�e��RT+! "#&-1!2,506B8K:V;b<h8k@vA�B�D�E�K�M�N�O�P�Q�R�K�T�U�W�X�Y�Z[ +\]\_"T%d)f1h6f9mDnPs�v�w�x�z�{�|�x����������������������&�.�4�:�=�E�M�S�Y�\�a�b�g�p�|����#���a1,+�V:*�C+*�b*�]*�_�fN*�c� +*�c-,�J�-��}��%�/��#����x*�b�s +����s����s����s����s����s����s����\����s����\*s+*�_�XS+*�]�XS����`�j�t�w�����p*�b�j +����f����\����h����c����a����^����f����f����\*\��������"�`�b�e�g�j�l�n����N �6��+�h:-�V:*�d��n*�c�%*�H*�b*�]*�_�f:,�\�w�'Y�>:�QW�B�R6 6 +�,* +�h-�I�\� + + ���5*�C*�b*�]*�_�f:*�c�*�c-�J:,�\�+�R��A,��rGIKLR&T,U:T?VERH`QaYb`dgemgohwg}e�L�p�q�p�r�s�t�G�w�#���� 56�(+�h:�S6���T:� +�U�!:6*�c� +*�G�g*�b�j +���������Y���������H����(������������������Y*��� *�]*�_�E��6*�c��*�]*�_*�G�O�����W��6*�c��*�G�O��6*�c��*�G�N�����*�]*�_�D��6*�c�y� *�G�MW�i�b6*�c�X*�]*�G�O�E�?6*�c�5*�G�O�%�6*�c�*�G�O��u*�c�R*�c*�G-�J: 6 +�1  +�Y�"*�d/� ,�B�<,�L�/� + + �R��˧*�d/� ,�B� +,�L�+�R��ձ�NS�����%�(�2�5�<�C����������������������������������� ����1�4�;�@�D�H�K�R�U�\�^�d�i�l�o�u�x����������������������������������������������� �  +  + +(�4��# ����+�Z������������oM+ ����b@*� Y�+�C*�d���*� +Y�/�H�y*� +Y�,�C*�d��e*�Y�0�H�W*� Y�-�C*�d��C*�Y�6�H�5*� Y�.�C*�d��!*�Y�A�H�*�Y�A�C*�d���**�C�H��*�Y�A�C*�d���**�C�H��*�Y�7�C*�d���*�Y�1�H��*�Y�8�C*�d���*�Y�2�H��*�Y�9�C*�d��z*�Y�3�H�l*�Y�:�C*�d��X*�Y�4�H�J*�Y�;�C*�d��6*�Y�5�H�(*�Y�<�C*�d��*�Y�A�H�����3�D�O�X�c�f�q�z������������� � � +��� + +!,/:CN Q#\$e%p&s)~*�+�,�/�0�1�2�5�6�7�8�;�=�#��PK +� �(���+*oracle/xml/parser/v2/StringHashtable.class����-D���;<=BC + + + + +  +  +   +  +# +$ +( +* 5& 74 8% 9- :" >/ ?3 @! A0()I()Ljava/lang/String;()V(I)V(II[CI)V*(Ljava/lang/Object;ILjava/lang/Object;II)V&(Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/String;[CI)V([CII)Ljava/lang/String;([CII)VCodeILineNumberTableLjava/lang/String;Loracle/xml/parser/v2/Entry; +SourceFileStringHashtable.java[C[Loracle/xml/parser/v2/Entry; arraycopycreateentriesgetCharshashinternjava/lang/Objectjava/lang/Stringjava/lang/SystemkeykeyCharslengthnextoracle/xml/parser/v2/Entry$oracle/xml/parser/v2/StringHashtable 74+#,#*d��. +75+$,- +*�*�� �.;= ;6',6 �=6+�6�:+� +6�h�4`=�����~*� �p6*� 2: �C ��3 �: + +��$>�4 +4������� �� �:  ���+�L�Y+� : + +*� 2�*�  +S+�.fCDE FHJ"K0J8MDNPRYT`VhXkYn[y\|Y�^�N�d�e�f�g�h6),> +�666�h+�4`6�����~*� �p6*� 2: �G ��6 �: + +��(6�+`4 +4������� �� �:  ����: ++ +� �Y +� +�: �Y  +� :  *� 2�*�  S �.bmnq rq#t0u<yF{M}TW�Z�h�k�s�yu��������������12PK +� �(+�4��$oracle/xml/parser/v2/UnaryExpr.class����-@456789:;< + + +  + +  +  + +  &! .# /+ 0 1% 2) 3 =$ >" ?)()D()I()V&(D)Loracle/xml/parser/v2/XSLExprValue;%(Loracle/xml/parser/v2/XSLExprBase;)VI(Loracle/xml/parser/v2/XSLParseString;)Loracle/xml/parser/v2/XSLExprBase;G(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLExprValue;Code +ExceptionsILineNumberTable"Loracle/xml/parser/v2/XSLExprBase; +SourceFile XSLExpr.java +addElement firstExprgetNumberValuegetValue lookahead nextToken'oracle/xml/parser/v2/MultiplicativeExproracle/xml/parser/v2/UnaryExpr!oracle/xml/parser/v2/XSLExceptionoracle/xml/parser/v2/XSLExpr oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue#oracle/xml/parser/v2/XSLNodeSetExpr#oracle/xml/parser/v2/XSLParseStringparsesetNumberValuesign ?)&!'* +*� *��*NP N1%'4*� ++�M,,�*��k��* +l m(=$'l8*�-�-�Y� +L+Y�h�*�W*�-���+*�� +�*��*"V X\] _)a1b3e(,-PK +� �(�����9�9+oracle/xml/parser/v2/ValidatingParser.class����-]WXY�������L\  +   !"#$%&'()*+,- +� +� +� +� +� +� +� +#� +� +� +� +� +%� +� +� +� +� +� +� +� +� +� +� � � � � � � � � � � � � � � � � � � � � � )� +� +� � +� � � � � � � � � +� � +� +� � +!� +!� + "  + + + + +  + + + + + + + & +! +! +! +! +" +# +% + + +# +%   ) + + + +% + & +! " # $ % & ' +( () * ++ +, +- +. +/ +0 +1 2 3 +4 5 +%6 +7 +%8 +9 : ; +< += += +%> +? +%@ +%A +%B +%C +%D +%E F +#G +#H +I +%J K L +M N +O +O +%P +%Q R S %T U V �b �h �z �{ �| �} �� �� �� �� �~ �� �q �� �z �� �| �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �v �� �� �� �� �� �� �� �� �d �� �r �� �l �� �f �� �� �w �x �� �u �y �� �p �t �a �Z �\ �Z �e �m �n �o �[ �[ �[ �[ �[ �� �� � j t b c c g  +Z � � � � � �  | � 0[ 1] 1� 2^ 4` 7b 8_ 9� :� ;z <� =h >| ?� @s A� B� Ch D� Eb Fb G� H[ I[ I� J[ K� M� Nz Oz PZ Qc R� S� Tk U� V[ Wi W� X� X� Y� Z� [� (()I()Ljava/lang/String;()Ljava/util/Vector;%()Loracle/xml/parser/v2/ContentModel;#()Loracle/xml/parser/v2/NSNameImpl;$()Loracle/xml/parser/v2/ParserState;"()Loracle/xml/parser/v2/XMLEntity;()Lorg/w3c/dom/NamedNodeMap;()V()Z(I)Ljava/lang/Object;(I)Ljava/lang/String;(I)Ljava/util/Vector;(I)Lorg/w3c/dom/Node;(I)V(I)Z(II)I(II)Ljava/lang/String;>(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;IIZ)V'(ILjava/lang/String;)Ljava/lang/String;9(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;K(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;&(Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/Object;)V(Ljava/lang/Object;)Z8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/String;)I&(Ljava/lang/String;)Ljava/lang/Object;&(Ljava/lang/String;)Ljava/lang/String;3(Ljava/lang/String;)Loracle/xml/parser/v2/AttrDecl;6(Ljava/lang/String;)Loracle/xml/parser/v2/ElementDecl;*(Ljava/lang/String;)Lorg/w3c/dom/Notation;(Ljava/lang/String;)V(Ljava/lang/String;B)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)VM(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZI)VF(Ljava/lang/String;Loracle/xml/parser/v2/AttrDecl;Z)Ljava/lang/String;6(Ljava/lang/String;Loracle/xml/parser/v2/XMLReader;I)V)(Ljava/lang/String;Z)Lorg/w3c/dom/Entity;#(Ljava/net/URL;Ljava/lang/String;)V"(Loracle/xml/parser/v2/AttrDecl;)V�(Loracle/xml/parser/v2/DTD;Loracle/xml/parser/v2/XMLError;Loracle/xml/parser/v2/XMLDocumentHandler;Lorg/xml/sax/EntityResolver;Z)V%(Loracle/xml/parser/v2/ElementDecl;)VV(Loracle/xml/parser/v2/NameCheck;Ljava/lang/String;Loracle/xml/parser/v2/XMLReader;I)V-(Loracle/xml/parser/v2/NonValidatingParser;)V%(Loracle/xml/parser/v2/ParserState;)Z7(Loracle/xml/parser/v2/ParserState;Ljava/lang/String;)Z'(Loracle/xml/parser/v2/XMLByteReader;)V"(Loracle/xml/parser/v2/XMLError;)VB(Loracle/xml/parser/v2/XMLError;Loracle/xml/parser/v2/XMLReader;)V%(Loracle/xml/parser/v2/XMLNotation;)V8(Loracle/xml/parser/v2/XMLReader;Ljava/lang/String;IIZ)V([CII)V([CII)Z([I)[C'([Ljava/lang/String;)Ljava/lang/String;)>ANYBCodeEMPTY +ExceptionsILineNumberTableLjava/lang/String;Ljava/net/URL;Ljava/util/Hashtable;Ljava/util/Vector;#Loracle/xml/parser/v2/ContentModel;Loracle/xml/parser/v2/DTD;"Loracle/xml/parser/v2/ElementDecl;!Loracle/xml/parser/v2/NSNameImpl; Loracle/xml/parser/v2/NameCheck;"Loracle/xml/parser/v2/ParserState;"Loracle/xml/parser/v2/SAXAttrList;)Loracle/xml/parser/v2/XMLDocumentHandler;Loracle/xml/parser/v2/XMLError; Loracle/xml/parser/v2/XMLReader;Lorg/xml/sax/DTDHandler;Lorg/xml/sax/EntityResolver;PCDATAPUBLICSYSTEM +SourceFileValidatingParser.javaZ[C[IaddAttr addAttrDecl +addElementaddElementDecladdID addNameCheckaddNamespaceDef addNotationattpresattrTypeattrlistatttypebaseURLcANYcCDATAcEMPTY cENTITIEScENTITYcFIXEDcIDcIDREFcIDREFScIMPLIEDcNMTOKEN cNMTOKENS cNOTATIONcPUBLIC cREQUIREDcSYSTEM +characterscheckAcceptState checkContentcheckDefaultAttributes +checkNamescolconcatcontent currentStatedecldefdoctypePresentdtd +dtdHandlered elementAt entResolverequalserrerrorexpectedElementsexternal externalDTD findAttrDeclfindElementDecl +findEntityfindID findNotationfixedDTDgetgetAttrDeclIndex getAttrDeclsgetContentTypegetEnumerationValues getLength getMessage0 getMessage1 getMessage2 getMessage3 getNodeName getPublicIdgetQualifiedName +getRootTag getSystemIdidAttridsignorableWhitespaceindexOfinitisEOFisEmptyitemjava/io/IOExceptionjava/lang/Objectjava/lang/Stringjava/net/MalformedURLException java/net/URLjava/util/Hashtablejava/util/Vectorlengthline localnamename nameCheckndatanextnormalizeAttrValue notationDeclnsnameoracle/xml/parser/v2/AttrDecl!oracle/xml/parser/v2/ContentModeloracle/xml/parser/v2/DTD oracle/xml/parser/v2/ElementDecloracle/xml/parser/v2/NSNameImploracle/xml/parser/v2/NameCheck(oracle/xml/parser/v2/NonValidatingParser oracle/xml/parser/v2/ParserState oracle/xml/parser/v2/SAXAttrList%oracle/xml/parser/v2/ValidatingParser"oracle/xml/parser/v2/XMLCharReader!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLEntityoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNode oracle/xml/parser/v2/XMLNotation&oracle/xml/parser/v2/XMLParseExceptionoracle/xml/parser/v2/XMLReaderorg/w3c/dom/NamedNodeMaporg/w3c/dom/Nodeorg/xml/sax/DTDHandlerorg/xml/sax/DocumentHandlerorg/xml/sax/SAXExceptionparseAttlistDecl parseAttrparseAttrValueparseContentModel parseElementparseElementDeclparseEntityDeclparseNotationDeclparseRootElement parseTextpopStateprefix +preserveWSprocessSchemaLocationpubIdpush pushState +pushXMLReaderputqnamereaderremoveAttrDeclAtreportCharactersrequireWhiteSpacereset scanChars scanNmToken scanQNamescanQuotedStringscanWhiteSpaceschemaLocationschemaValidationMode setPublicId setSystemIdsizeskipWhiteSpacestate +stateIndex substringsysIdtoStringtryReadtypevalModevalues +xmlHandler| ������b�8*�.*��� *���ñ�RT UR���"*+�9�� +][�z�C*���*�Y�/��*��++��W���������/*�Y*��+,�8���� +vt�b�� +H*�]�c�@*�]�c�vL+�1+�y=6�+���N-�~:*�]�D��6��-�B�*�h*��*�h��{��j-�_��-�E�*-�_�q�*-�_*���?-�E�a66 -�_ ��6  �-�_-�_����:�-�_ ��: `6*�q�**���? ����*-��-��-�_�@*�]�D-��-��-�_-�E�:�*�]�D�C-�EO������% + &28FLT!h"m!p$w')�*�-�0�3�5�7�5�;�<�>�?�@�A�D +EF'E*-K>G �$���� .*��M�$,�ª �@r�*,���q��+,��,�Z,��,��+�,���{��i��*�a,���p� N-� +-����+,��,�Z,��,��+i,���{i�i�i*�a,���r�[+,��,�Z,��,��+j,���{j�i�6*�a,���o�(+,��,�Z,��,��+k,���{k�i�,��M,��ޱ�n���L�W�h�x�{�~���������������������������!�$�)�-~�$�u�,*���� *��+�t���b�* +*��*����bc `�* +� +X+:,�,�E��Y+*����*�����4:�%Y*�a*�h*��*�e�7:���Y�+:��W,�E�� 2k��D����:*�q�*�h*��*�h��{��j*�>:�3��:�(*�q�**���?���:�[:�*�q�**���?����������[:�����:*�a�p� :�3�**���?��*�h*��*�hi�{i�j����w*�h*��*�hi�{i�j�Z��:�[:*�a�p� :  �3�**���?�B*�h*��*�hi�{i�j�% ���*�h*��*�hi�{i�j����������[:��n��:����:�[:����������[:���,�E� +��:� +��:,�x: +6 6 � + �d�f� 6 ��   +����� �<*�h*��*�h��{��j�*�h*��*�h��z��j��W���*�h*��*�h��z��j�7,�3,�B�+,�_�g�*�h*��*�h��{��j���gWYab!a&c6d;c@eGgPhVi�m�n�p�q�p�s�t�u�x�y�{�|�~������������"�+�.�5�D�I�M�Y�\�o�s�v�y����������������������������������� +����$�'�0�3�:�=�D�M�U�]�`�i�l�u�|���������������������������������-9U�$* +.b�c ��:*����*����N*�a-�oL+�0*-*���?�Y-�3L+�^*�a+�=*�m�+�l*����6��*����:*����W*���H�H�����Y22�5M��*���O�O�����Y22�5M��*���N�N�����Y22�5M�v*���M�M����B+��� *�h*��*�h��z��j�+���Y22�5M�%*���K�K�����Y22�5M��*���J�J�����Y22�5M��*���R�R�����Y22�5M��*���Q�Q�����Y22�5M��*���S�S����!�Y22�5M*�����S*��(����Y22 �5M�0*�h*��*�h��z��j�Y22�5M,�E� ,�E ��,�Y�,��,�E��*��(����*�h*��*�hd�{d�j��*����W,�E�.*����:*�a�r�#:�**�� �?� *����:,���<*����W*��|����.*��)����)*�h*��*�he �|e�j*������i*����*��#���]*���U�U���� ,�B�C*���P�P���� ,�B�)*���L�L����,�B*�����,�B,�B� +,�B�7,�E�*�h*��*�h��z��j*��:,*,���_+�uY6�4*�h*��*�h��{��j*�s�"+��+,�;�*�m�,�l+,�;*����6�*��>�����)*��>���*�h*��*�hd�{d�j���r�� +���"�,�6�;�C�J�O�X�[�f�n�������������������������!�4�7�I�\�_�q���������������������� �)�,FYbk v  +������������ �"�#�$ +% +&'*1+5*8B0I2U4g5l4o6�7�6�8�:�;�8�>�A�B�D�E�I�J�N�PQPR"T(U-N0Z7[<\A_J�[blc���$* +/b�� L�MN6*��,��:,2N,2:*�]�c�*�]�c�nL+�3*�`� 6�6*�h*��*�h��{��j� +�E6+� +�E6*����W*��=���*�h*��*�hz�zz�j*����W**��+��:*��� �g� *��*-�@*�]�D��6�*�]�D-�:�*�h*��*�h|�z|�j���"��� +� +��� �*�7�;�B�E�H�K�h�k�q�u�{���������������������$* +1]����Y�-L*���I�I���� +���_*���G�G���� +���E*��(���*��(��+*�h*�����!*�h*��*�hf�}f�j+��>����"�4�9�<�H�Q�]�`�w�{�~��$* +3b��*����*����L*�a+�oM,�&,�^�*�h*��*�h�+�{��j,�#�Y+�1M*�a,�=*�m�,�l�,�^*����,*���\*����W*��>���*�h*��*�hd�{d�j��J����$�?�C�L�T�[�`�c�h�o�w�������$* +4`�[/*��L+���$*�a+���r�#M,�*+��*�� �?+���� ���-��$* +5b���*����*����L*�a+�r�#M,�**�h*��*�h�+�{��j�#Y+�2M� �#Y+�2M*�a,�A*�m�,�l*����W*���T�T�����*����,*������*����>*��>�����*�h*��*�h��z��j,*������*����W*��>����*�h*��*�hd�{d�j��*���V�V����F*����,*������*����W*��>���c*�h*��*�hd�{d�j�F*�h*��*�he  +�|e�j*��>���*�h*��*�hd�{d�j�*�F��Y*�F,���6N��Y�Y*�����0,���6N,-�����W*�b+,�,����������7ilnpr:sCpFwOxWy^zc}k~}������������������������~����!�)�5�H�L�O�R�g�k�n�z������������������������������f�$* +6b��b*��<���@*��L*�a���I+��*�a���g�8*�h*��*�h��z��j�*�h*��*�hl�zl�j��"x {|~,FxI�au�$* +7b��w� +M*�]�c�g*�]�c�w�Y*��,��L,.�-*���*��+,.,.���*��+,.,.�W*��,��L,.�*+,.,.���*����>����%�+�2�B�E�U�^�d�o�r�v��$* +8_��h*�]�c�\*�]�c*�]�X�K*�`�<�<*�]�c*�]���kM*�h*��*�h�*�]����,���|��j*����:` +be"f$e'h)j;kClTmXl[n`kcq�$* +>|���*����*�]�c��*�]�c*�]-�Y��*�`� 6�6*�]�c*�]���k:���,*�h*��*�h�-*�]�c�~�|��j�.*�h*��*�h�-*�]�c�~���}��j*+,-��*�]�c:� �^�/*�`� 6�6*�h*��*�h�-�{��j��� .02$5+6.5184:G;O=W>_?i>l@r=u;xD�E�F�G�E�H�D�M�N�R�U�V�U�X�Z�+�$* +D�� +�*�]�c��*�]�c*�]�Y��*�`� 6�6*�]�c*�]���k:���+*�h*��*�h�*�]�����{��j�-*�h*��*�h�*�]�������|��j*+����V +$'*-@HPdjmp!x"�#�"�$�!�(� �$* +Fb�3*��*��*����kl mi��PK +� �(g�$B��#oracle/xml/parser/v2/WildCard.class����-L%0?@BCDEFG + + + + + + + ! " # + +$���� 1( 1, 9- :) ;' <' >' H6 I4 J* K.()F()Ljava/lang/String;()V(Ljava/lang/Object;)Z&(Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)Z((Ljava/lang/String;[Ljava/lang/String;)VF(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/NSResolver;F)Z*Code +ExceptionsFLineNumberTable!Loracle/xml/parser/v2/NSNameImpl; +SourceFile +WildCard.javacheckNamespaceequals getLocalName getPrefix getPriorityinternjava/lang/Objectjava/lang/Stringmatchoracle/xml/parser/v2/NSNameImploracle/xml/parser/v2/NSResolveroracle/xml/parser/v2/WildCardoracle/xml/parser/v2/XMLElement!oracle/xml/parser/v2/XSLException!oracle/xml/parser/v2/XSLExprValuepatternpriorityresolveNamespacePrefix +splitQname H6I41+2�n*� * �+�� MN�.�:+�2�N2�2�M�M-�*,� ���*�Y,-� ��5F#! ')*'.!/'0/283@2C5F9L:`<m#3 =&2*��5MA/2\0*�%���*��:*��:,�:+� +�5A B DEF'H78PK +� �(�N`,,"oracle/xml/parser/v2/XMLAttr.class����-�efghij������������������ + +? +@ +A +B + +C +D +E +F G +H + I J + K +L + M +N +O +P +Q +R S + T +U + V W X Y Z [ \ +] ^ _ ` + +a + b +c +d �{ �~ �� �� �y �w �p �p �� �� �x �� �v �p �t �k �l �l �n �q �� �l �r �k �� �� �� �� �� �� �� �� �� �� �l �u �s �{ "&'<()I()Ljava/lang/String;#()Loracle/xml/parser/v2/XMLElement;!()Loracle/xml/parser/v2/XMLError;()Lorg/w3c/dom/Node;()V()Z(I)Lorg/w3c/dom/Node;(I)V(II[CI)V&(Ljava/lang/Object;)Ljava/lang/String;(Ljava/lang/Object;)Z*(Ljava/lang/Object;ILjava/lang/Object;II)V&(Ljava/lang/String;)Ljava/lang/String;,(Ljava/lang/String;)Ljava/lang/StringBuffer;2(Ljava/lang/String;)Loracle/xml/parser/v2/XMLNode;(Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)ZK(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V](Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V(Ljava/lang/String;S)V*(Loracle/xml/parser/v2/XMLOutputStream;Z)V#(SLoracle/xml/parser/v2/XMLError;)V(Z)Lorg/w3c/dom/Node;*:=Code +ExceptionsILineNumberTableLjava/lang/String;Loracle/xml/parser/v2/XMLNode;"Loracle/xml/parser/v2/XMLNodeList; +SourceFile XMLAttr.javaZ[IaddTextappend arraycopy +checkArraycheckChildTypecheckNamespace +checkReadOnlychildren cloneNodeconcatcurrentOutputIndexequalsflushgetCharsgetExpandedName getLength getLocalNamegetName getNamespace getNodeValuegetOwnerElement +getParentNode getPrefixgetQualifiedName getSpecifiedgetTextgetValue getXMLError +hasChildNodesinUseinternisDisableOutputEscapingitemjava/io/IOExceptionjava/io/Serializablejava/lang/Stringjava/lang/StringBufferjava/lang/Systemlengthname namespaceoracle/xml/parser/v2/NSNameoracle/xml/parser/v2/XMLAttr$oracle/xml/parser/v2/XMLDOMExceptionoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNode oracle/xml/parser/v2/XMLNodeList$oracle/xml/parser/v2/XMLOutputStreamorg/w3c/dom/Attrorg/w3c/dom/DOMExceptionorg/w3c/dom/NodeoutputEscArrayoutputEscArrayLenparentprefixprintsetDisableOutputEscaping setNodeValuesetValue specifiedtagtexttoStringvalueOfwrite +writeChars! �����������������|�' *+,��� +V +T�~���*+�*� +�3*�$*�4*�8*�-*�6*�1*�2*+�.�1*,�.�6*-�.�2,�,*� +Y,�<��+��;�9**�9�.�9� **�1�9*�:��Nb�����#�)�/�5c=dEeMgSinjyg|n�q�`���L*-�*� +�3*�$*�4*�8*�-*�6*�1*�2*+�1*,�6*�2*�:��:�����#�)�/�5�:�?�E�K|�z�***�:+�#�:*�� +� ��p�a5*�$*�4�,*�3L**�4h� +�3+*�3*�4�*Y�4h�4��� ���*�4��s�R*���Y*�+���BFH"I&H��}�e=,�+�%�+*�1���+�%� +*�1�,*�2�%����VY],^<]���3*�"�M,*�8�8,��8 9:�l�c;*�2�0*�2�%�$� +Y*�2�<��*�1��;L�*�1L+����1�4�9��l�*�1����l�*�9����l�*�2����l�*�*�����m� *�5��� +�o����l�*�6����l�*�9����q�*�8���l�^6*�,�-*�:�!� +Y*�:�<��*�)��;�*�)�*�:�����,�1��q�+ *�$������ ����z�*�8��*�!�(>+�>+*�9�>+ �>+"�=*�:��*�:�06�:*�:�'6�[4&� +�>�E4<� +�>�24"� +�>�4'� +�>� +4�=�����#6�*�!�/�+�7����+"�=+�&���!ef hjkl%n+p2r;sAuNvTx^ydxgzq{wzz|�}�|�~��~���v�������������c� +�s�Y5*�*�3*Y�$Z`�$*�:�0dO*�3*Y�$Z`�$*�:�0O�����4��{�* +*� *+�:��!" ��{�"*+�:�� +����PK +� �(E?��&oracle/xml/parser/v2/XMLAttrList.class����-������������������� +8 + 8 +9 + +: + ; +< += + +> +? + +@ + A B C D E +F +G H +I + +J + K +L +M N +O +P Q R R + +S + T +U + V + +W + +X +Y Z wa wd wm wt �e �s �n �a �v �k �| �} �z �� �^ �f �~ �h �] �i �` �_ �b �� �g �\ � �q �o �f �p �j �j �� �|()I()Ljava/lang/Object;()Ljava/lang/String;()Ljava/util/Enumeration;!()Loracle/xml/parser/v2/XMLError;()Lorg/w3c/dom/Document;()V()Z(I)Lorg/w3c/dom/Node;(I)V(Ljava/lang/Object;)V(Ljava/lang/Object;)Z(Ljava/lang/Object;I)I3(Ljava/lang/String;)Loracle/xml/parser/v2/AttrDecl;&(Ljava/lang/String;)Lorg/w3c/dom/Node;(Ljava/lang/String;)VD(Ljava/lang/String;Ljava/lang/String;)Loracle/xml/parser/v2/XMLAttr;8(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Node;'(Ljava/lang/String;Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)Z>(Loracle/xml/parser/v2/XMLAttr;)Loracle/xml/parser/v2/XMLAttr;!(Loracle/xml/parser/v2/XMLAttr;)Z*(Loracle/xml/parser/v2/XMLOutputStream;Z)V&(Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;(Lorg/w3c/dom/Node;)V#(SLoracle/xml/parser/v2/XMLError;)V%(Z)Loracle/xml/parser/v2/XMLAttrList;(Z)Lorg/w3c/dom/Node;Code +ExceptionsILineNumberTableLjava/lang/String;"Loracle/xml/parser/v2/ElementDecl;"Loracle/xml/parser/v2/NodeFactory;Loracle/xml/parser/v2/XMLNode; +SourceFileXMLAttrList.javaZ[Ljava/lang/Object; +addElement +checkDocumentcheckNamespace +checkReadOnly cloneList cloneNodecreateAttributedefed elementCount elementDataelementsequalsfactory findAttrDecl getLengthgetName getNamedItemgetOwnerDocument getXMLErrorhasMoreElementsinUseindexOfisMemberitemjava/io/IOExceptionjava/io/Serializable(java/lang/ArrayIndexOutOfBoundsExceptionjava/lang/Stringjava/util/Enumerationjava/util/Vector nextElementoracle/xml/parser/v2/AttrDecl oracle/xml/parser/v2/ElementDecl oracle/xml/parser/v2/NodeFactoryoracle/xml/parser/v2/XMLAttr oracle/xml/parser/v2/XMLAttrList$oracle/xml/parser/v2/XMLDOMException oracle/xml/parser/v2/XMLDocumentoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNodeorg/w3c/dom/DOMExceptionorg/w3c/dom/NamedNodeMaporg/w3c/dom/Nodeparentprintputremove +removeElementremoveNamedItemsetAttributeDefault setNamedItem setNodeValuesetValue specifiedtag! �wax*��{Fwdx"*��{ +QO�ux|D� Y�M,*�.�.*�"N�$-�-� +�� +:*�.�/,�-�*���,�{& %*39B�[x*� �{_�ixU)=�*�!2� +N-�7+�#�-��*� ����{jlnoj'r�lxV*>�*�!2� +:+,����*� ����{wy{|w(�px(*+�,���{$�cx9 +*�!2��W� + +{�� +� ��qxC>�*�!2� ++�0�*� ���{ABA?y�mx�^*+�'� +N-� -,�4�5*�.�(� +:��$+,�N� +� +Y+,�N-�*-�-�-*�.�/-�+-�6�{B� � +���!�&�1�4�>�B�GKSX]��ox6*+�2W+�/+�++�{LM NP�ixr6*+�'� +M,�*,�3� *,�1W,�6�� Y*�.�)��,�{* +� � +��� �#�)�0�4�y�pxj6*�.�0*�.��M,�!,+�&�%N-�-�� ++-��5��{",.024*6274<�rx�k+� +M,�+�,�/*�.�� Y +*�.�)��*�.+�*�.�*,�&�'� +N-�*-�1W-�6,*�.�/,�+,�6*,�-�{B����$�(�0�7�C�G�M�R�Z�_�d�i�y��PK +� �(�'ĵ�(oracle/xml/parser/v2/XMLByteReader.class����-�}��~����������������� +L +L +M +N +O P +Q +R +S +T U V W +X Y +Z [ \ ] ^ ^ _ ` a b c +d e +f g +h i j k l m n o p +q r +s +t +u v +w +x y z +{ +| �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� : ()I()Ljava/lang/String;()V()[C(I)I(I)Ljava/lang/StringBuffer;(I)V<(Ljava/io/InputStream;Ljava/lang/String;Ljava/lang/String;)V(Ljava/io/OutputStream;)V,(Ljava/lang/Object;)Ljava/lang/StringBuffer;*(Ljava/lang/Object;ILjava/lang/Object;II)V,(Ljava/lang/String;)Ljava/lang/StringBuffer;(Ljava/lang/String;)V#(Loracle/xml/parser/v2/XMLReader;)V([BII)I([CII)V([III)V--- --- [--- [0.....DUMP: +BIG_ENDIANBUFSIZECode +ConstantValue +ExceptionsI +LITTLE_ENDIANLineNumberTableLjava/io/InputStream;Ljava/io/PrintStream;Ljava/lang/String;$Loracle/xml/parser/v2/XMLByteReader; Loracle/xml/parser/v2/XMLEntity; Loracle/xml/parser/v2/XMLReader; +OCTET_2143 +OCTET_3412 +SourceFileXMLByteReader.javaZ[B[C[I] ] eofPos = append arraycopybufNumbuffer byteIndexclose +closeInput copyPushBackcumLinecurLine +currentBuffer +currentPosdumpenendIndexendPoseofIndexeofPos +fillBufferfillByteBufferfirstflushfourth getBuffergetColumnNumber +getLineNumbergetPosininputjava/io/IOExceptionjava/io/InputStreamjava/io/PrintWriter(java/lang/ArrayIndexOutOfBoundsExceptionjava/lang/Objectjava/lang/StringBufferjava/lang/SystemlastLineline lineBufSizenewLine"oracle/xml/parser/v2/XMLByteReaderoracle/xml/parser/v2/XMLReaderorg/xml/sax/SAXExceptionoutparentprintlnpubIdpush pushBytespushCharreadresetLineNumbersecond setByteOrdersetEOF +setLineNumber setParentsetPossysIdthirdtoStringwrite!�������������������������������������������������������������������M�Y +TY +TY�T�=��"�� � +����;���$*@��� +wu����*�*�<*�'*�4*�E*�I*�6*�.*�?*�**���+**���$**��%**��,*�#**��/**��0**�x�1**�x�2**�<� +�;*�;O*�:*�)*�*��fzO \fghi$n)|.~3�=�G�O�W�\�d�l�v������������z���<*�*+�8*,�H*-�A���� �������N*�8�*�'�*�8�&�W�������������F*�#� +*�d<�*�<*�d=*�D�=�*�+*�+�"*Y�#`�#��2 *+,-.0#2'3)2,5:8D:�����Y�>�M,�@,�Y�+�!�!*�  �!�J�@,�Y +�*�?�-� +�!�J�@,*�+*�?�-�K,�@,�Y �*�?�-� �!*�0��!*�2��J�@,*�+*�?�-*�0*�?�-d�K,�@,�5��. | ~3�R�b�h��������y����**�(�,**�,�0*�$*�%3=�=�~3����� B�����*�+*�0�U*Y�0`�0*Y�%`�%���*�+*�0 +U**�0�G*Y�0`�0*Y�%`�% +���*�$*�%3 +��s*Y�%`�%��f*�%*�1�**�0�F*�,�*�+*�0�U*Y�0`�0*Y�%`�%��,W*�0*�� +*�3��*�,����r? @DFGDJOKYLcMfOqPyQ�R�S�T�U�W�Y�Z�]�^�_�`�c�e�f�e�h�����`<*�=*�%*�/�J*�8*�$*�/�C<�*Y�/`�/d=�#*�/*�� +*�$*�/T**�/�1������>�� ��%*48; F +P X [�_�����*�+��p��2*�7W*�,*�;*�:d.d�� +�����b**�?�*�?�9*� +*�?�-�*�,�,*�:<�*�,*�;.�*�:*�)`��*�*���**�*�:*�)*�*`��"�$�,�9�>�E�P�X���*�,��q���J"*�?�*�?Y�-d�-� +*Y�,d�,������!�����J"*�?�*�?Y�-d�-� +*Y�,d�,������!�����D �*�$*Y�%dZ�%+��.�T�����������Z2*�?�*�+*�?Y�-dZ�-�U�*�+*Y�,dZ�,�U������1�����8� *+`4�B�������� �������f*�#��*�*=*�*d>�*�;.�=� +�����66�*�;�*�;.dO�*�*���*�**Y�)`�)��> +!#&- 0!6"I!U$[%e�����u���:*�2*�� *�+U��pq +rm����P*�;*Y�*Z`�*O�>W*�;M**�<h� +�;,*�;*�<�"*Y�<h�<*�;*Y�*Z`�*O��* +������&�4�>�O����*+�?��s���*�,��r��PK +� �(���0YY#oracle/xml/parser/v2/XMLCDATA.class����-9(*+,-./012 + + +    +  +  +   ) 4$ 5% 6 7 8#cdata-section()V(Ljava/lang/String;)V*(Loracle/xml/parser/v2/XMLOutputStream;Z)V Code +ExceptionsLineNumberTableLjava/lang/String;S +SourceFile +XMLCDATA.java]]>flushjava/io/IOExceptionjava/io/Serializableoracle/xml/parser/v2/XMLCDATA!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLNode$oracle/xml/parser/v2/XMLOutputStreamoracle/xml/parser/v2/XMLTextorg/w3c/dom/CDATASectionorg/w3c/dom/Nodeprinttexttype +writeChars writeIndent writeNewLine! +  !5*� +*�*+��#?@ A=3!Q!+�+�+*��+�+�+��#FG +HIJK D"&'PK +� �(�ˡQS S (oracle/xml/parser/v2/XMLCharReader.class����-{fghijmno +$ +% +& ' +( +( ) * ++ , - . / 0 +1 +2 +3 4 5 +6 7 8 9 +: +; +< = J? JA JD KN X? YV ZV [@ \W ]N ^N _N aV bB c> d> eP kV l> pS qR rQ sI uA xA zR()I()V(I)I(I)V(II[CI)V(Ljava/io/InputStream;)V*(Ljava/io/InputStream;Ljava/lang/String;)V7(Ljava/io/Reader;Ljava/lang/String;Ljava/lang/String;)V(Ljava/lang/String;)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V'(Loracle/xml/parser/v2/XMLByteReader;)V([CII)IBUFSIZECode +ExceptionsILineNumberTableLjava/io/InputStream;Ljava/io/Reader;Ljava/lang/String;$Loracle/xml/parser/v2/XMLByteReader; +SourceFileXMLCharReader.javaZ[Cclose +closeInput closeReader copyPushBack +currentBuffer +currentPosendPoseofPos +fillBuffer fixedCoordsgetCharsgetColumnNumber +getLineNumberinjava/io/IOExceptionjava/io/InputStreamjava/io/InputStreamReaderjava/io/Readerjava/lang/StringlastCharNewLinelength"oracle/xml/parser/v2/XMLByteReader"oracle/xml/parser/v2/XMLCharReaderorg/xml/sax/SAXException +prevReaderpubIdrreadresetsetEOF setEncodingsetInputStream +setLineNumber +setPrevReadersysId!rQZVaVpSkV +JELi-*� *�*�*�*�*�*+�*,�#*-��O* +8. 356s:";'<,8MJGL�T*+�� +*�*�*�*�*�*,�#*-�++�*��*�*+��**��*��O:A. +356s!C&D+F9H>IFJNLS?MX?Lk/*��*�� +*��*��*��*�� +�W�*-O"iklm#n*i-p.gM`@L��*���**��**��=*� *�d>6�m*�*�*�� =�W*�`d66*��*�*�4 +��*�*�6�ЧV*�46 +� + +�<*�" +�#*�`4 +�*� +U����*� +U������p*�46 +� + +�E*d�" +�&*�`4 +�*�d +U���#*�d +U�*�d*�4U�����4*�4 +�*�*�d +U�*�d*�4Ud=*Y�`�d>����� **��!*��O�8wx z{}~&)�,�=�B�L�O�V�d�g�l�r�w�z������������������������������� ����!�-�0�A�K�R�^�c�o�r���������������Mc>L4*�� *���*��Oabdd>L4*�� *���*��OYZ\t?L.*�**���OQR +OvFL-*�Y*�+� ��O +��MwCL"*+��O +��yHL*+��OUTUPK +� �(�"6�ll%oracle/xml/parser/v2/XMLComment.class����-B%&3456789:;< + + + +  + +  +  +  '# 0 1. 2 >+ ?" @ A#comment()V&(Ljava/lang/String;)Ljava/lang/String;2(Ljava/lang/String;)Loracle/xml/parser/v2/XMLNode;(Ljava/lang/String;)V(Ljava/lang/String;S)V*(Loracle/xml/parser/v2/XMLOutputStream;Z)V-->1.04378508528558578608618628638658668698859-28859_18859_28859_38859_48859_58859_68859_78859_88859_9;=?>ANSI_X3.4-1968ANSI_X3.4-1986ARABICASCIIASMO-708BIG5Big5CHINESECP-ARCP-GRCP-ISCP037CP1026CP1047CP273CP278CP280CP284CP285CP297CP367CP420CP424CP437CP500CP775CP819CP850CP852CP855CP857CP860CP861CP862CP863CP864CP865CP866CP868CP869CP870CP871CP918CSASCIICSBIG5CSEUC-KRCSEUCPKDFMTJAPANESECSGB2312CSIBM037 CSIBM1026CSIBM273CSIBM277CSIBM278CSIBM280CSIBM284CSIBM285CSIBM297CSIBM420CSIBM424CSIBM500CSIBM855CSIBM857CSIBM860CSIBM861CSIBM863CSIBM864CSIBM865CSIBM866CSIBM868CSIBM869CSIBM870CSIBM871CSIBM918 CSISO2022CN CSISO2022JP CSISO2022KRCSISO58GB231280 CSISOLATIN1 CSISOLATIN2 CSISOLATIN3 CSISOLATIN4 CSISOLATIN5CSISOLATINARABICCSISOLATINCYRILLICCSISOLATINGREEKCSISOLATINHEBREWCSKOI8-R +CSKSC56011987 +CSPC775BALTICCSPC850MULTILINGUALCSPC862LATINHEBREWCSPC8CODEPAGE437CSPCP852 +CSSHIFTJIS CSWINDOWS31JCYRILLICChar (Code +ConstantValueCp037Cp1026Cp1047Cp1250Cp1251Cp1252Cp1253Cp1254Cp1255Cp1256Cp1257Cp1258Cp273Cp277Cp278Cp280Cp284Cp285Cp297Cp420Cp424Cp437Cp500Cp775Cp850Cp852Cp855Cp857Cp860Cp861Cp862Cp863Cp864Cp865Cp866Cp868Cp869Cp870Cp871Cp918EBCDIC +EBCDIC-CP-AR1 +EBCDIC-CP-AR2 EBCDIC-CP-BE EBCDIC-CP-CA EBCDIC-CP-CH EBCDIC-CP-DK EBCDIC-CP-ES EBCDIC-CP-FI EBCDIC-CP-FR EBCDIC-CP-GB EBCDIC-CP-HE EBCDIC-CP-IS EBCDIC-CP-IT EBCDIC-CP-NL EBCDIC-CP-NOEBCDIC-CP-ROECE EBCDIC-CP-SE EBCDIC-CP-US EBCDIC-CP-WT EBCDIC-CP-YUECMA-114ECMA-118ELOT_928EOFEUC-CNEUC-JPEUC-KREUC-TWEUCJISEUC_CNEUC_JPEUC_KREUC_TW-EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESEEnd +ExceptionsFGB2312GBK +GB_2312-80GREEKGREEK8HEBREWIIBM037IBM1026IBM1047IBM273IBM277IBM278IBM280IBM284IBM285IBM297IBM367IBM420IBM424IBM437IBM500IBM775IBM819IBM850IBM852IBM855IBM857IBM860IBM861IBM862IBM863IBM864IBM865IBM866IBM868IBM869IBM870IBM871IBM918ISO-10646-UCS-2ISO-10646-UCS-4 ISO-2022-CN ISO-2022-JP ISO-2022-KR +ISO-8859-1 +ISO-8859-2 +ISO-8859-3 +ISO-8859-4 +ISO-8859-5 +ISO-8859-6 +ISO-8859-7 +ISO-8859-8ISO-8859-8 VISUAL +ISO-8859-9 +ISO-IR-101 +ISO-IR-109 +ISO-IR-110 +ISO-IR-126 +ISO-IR-127 +ISO-IR-138 +ISO-IR-144 +ISO-IR-148 ISO-IR-58ISO-IR-6 +ISO-ir-100 ISO2022CN ISO2022JP ISO2022KR ISO646-US ISO8859-2 ISO8859_1 ISO8859_2 ISO8859_3 ISO8859_4 ISO8859_5 ISO8859_6 ISO8859_7 ISO8859_8 ISO8859_9ISO_646.IRV:1991 +ISO_8859-1ISO_8859-1:1987 +ISO_8859-2ISO_8859-2:1987 +ISO_8859-3ISO_8859-3:1988 +ISO_8859-4ISO_8859-4:1988 +ISO_8859-5ISO_8859-5:1988 +ISO_8859-6ISO_8859-6:1987 +ISO_8859-7ISO_8859-7:1987 +ISO_8859-8ISO_8859-8:1988 +ISO_8859-9ISO_8859-9:1989JISJUTF8KOIKOI8-RKOI8_RKOREANKSC5601 KS_C_5601KS_C_5601-1987L1L2L3L4L5LATIN1LATIN2LATIN3LATIN4LATIN5LOGICALLineNumberTableLjava/io/PrintStream;Ljava/io/PrintWriter;Ljava/lang/String;Ljava/util/Hashtable;Loracle/xml/parser/v2/DTD;&Loracle/xml/parser/v2/StringHashtable;$Loracle/xml/parser/v2/XMLByteReader;)Loracle/xml/parser/v2/XMLDocumentHandler; Loracle/xml/parser/v2/XMLEntity;Loracle/xml/parser/v2/XMLError;(Loracle/xml/parser/v2/XMLExternalReader;Lorg/xml/sax/EntityResolver;MS874MS932MS949MS950MS_KANJI SHIFT_JISSJIS +SourceFileTTIS-620UCS-2UCS-4UNICODE-1-1-UTF-8UNICODE-2-0-UTF-8USUS-ASCIIUTF-16UTF-8UTF8VISUAL WINDOWS-1250 WINDOWS-1251 WINDOWS-1252 WINDOWS-1253 WINDOWS-1254 WINDOWS-1255 WINDOWS-1256 WINDOWS-1257 WINDOWS-1258 WINDOWS-874 WINDOWS-949 WINDOWS-950X-CP1251X-EUCX-EUC-JP +X-MS-CP932X-SJISX-UNICODE-2-0-UTF-8X-X-BIG5XMLReader.javaZ[B[C[I%[Loracle/xml/parser/v2/XMLByteReader;[Z]]]>append arraycopy cCDATAEND cCDATASTART cCOMMENTENDcDECCREF cENCODINGcHEXCREFcPIENDcPISTART cSTANDALONEcVERSIONcXMLcbufcbufSizecharDataStoppercheckFillBuffercheckParEntity +checkTextDecl checkXMLDeclclose +closeInput closeReadercommentscopyCbufcreate +currentBuffer currentInput +currentPosdefPushdtddumpenencoding encodingMapencodingMap116endBufendPos entResolvereofPosequalsequalsIgnoreCaseerrerror extReader externalDTDfile +fillBuffer +findEntityflushget getBuffer +getByteStreamgetCharacterStreamgetColumnNumber getEntitygetExternalReadergetFilegetInternalReader +getLineNumber getMessage0 getMessage1 getMessage2 getNodeNamegetPos getProperty getProtocol getPublicId getReader getSystemIdinStackinput +inputArrayinputPosisEOFisFirstNameCharisInitialNameChar +isNameCharisTopLevelReaderisWhiteSpaceChar isXMLChar isXMLLetterjava/io/FileInputStreamjava/io/IOExceptionjava/io/InputStreamjava/io/InputStreamReaderjava/io/PrintStreamjava/io/PrintWriter(java/lang/ArrayIndexOutOfBoundsExceptionjava/lang/Exceptionjava/lang/Objectjava/lang/Stringjava/lang/StringBufferjava/lang/Systemjava/net/MalformedURLException java/net/URLjava/util/Hashtablelengthlinenamenamesno +openStreamopenURL.oracle.xml.parser.edcdic.default.character.setoracle/xml/parser/v2/DTD$oracle/xml/parser/v2/StringHashtable"oracle/xml/parser/v2/XMLByteReader"oracle/xml/parser/v2/XMLCharReader!oracle/xml/parser/v2/XMLConstants'oracle/xml/parser/v2/XMLDocumentHandleroracle/xml/parser/v2/XMLEntityoracle/xml/parser/v2/XMLError&oracle/xml/parser/v2/XMLExternalReaderoracle/xml/parser/v2/XMLNode&oracle/xml/parser/v2/XMLParseExceptionoracle/xml/parser/v2/XMLReader"oracle/xml/parser/v2/XMLUCS2Reader"oracle/xml/parser/v2/XMLUCS4Reader"oracle/xml/parser/v2/XMLUTF8Readeroracle/xml/parser/v2/XMLUtilorg/xml/sax/EntityResolverorg/xml/sax/InputSourceorg/xml/sax/Locatororg/xml/sax/SAXExceptionoutpeek popXMLReaderprintprintlnpubIdpubidpush pushBytespushChar +pushEntityRef +pushXMLReaderputquote [readreaderrequireWhiteSpace +resolveEntityscanAttrString scanCDATA scanCharRef scanChars scanCommentscanDecCharRefscanEntityStringscanHexCharRefscanName +scanNameChars scanNmTokenscanPI scanQNamescanQuotedString scanTextDecl scanUntilscanWhiteSpace scanXMLDecl setByteOrder setEncodingsetInputStream setParentsetPos setPublicId setSystemId setTextDecl setUTF16Mode +setXMLDeclskipIgnoreSection +skipNSNameskipQuotedString skipUntilskipWhiteSpacest +standalone synchronizesysIdtexttmpData toLowerCasetoString toUpperCase +tryCharReftryReadurlvalModevalueOfversion +version '1.0'writex-CP1250 +xmlHandleryes!���� 0x���c��������h�������}�y?���o����u~�{��|�z�z������������CJ�����Y������YX�����YX���޻�YX���߲�44�!W��a4�!W��24�!W��`4�!W��E4�!W��\4�!W���4�!W��4�!W��-4�!W��"4�!W��14�!W�� +$�!W��.$�!W��/$�!W��$�!W��N$�!W��I$�!W���$�!W��K$�!W��~$�!W�� %�!W��0%�!W��1%�!W��#%�!W��%�!W��O%�!W��J%�!W��%�!W�� &�!W��2&�!W��3&�!W��&�!W��P&�!W��K&�!W���&�!W�� +'�!W��4'�!W��5'�!W��'�!W��Q'�!W��L'�!W���'�!W��(�!W��6(�!W��7(�!W��(�!W���(�!W���(�!W��)�!W��8)�!W��9)�!W��)�!W���)�!W��3)�!W��5)�!W���)�!W��*�!W��:*�!W��;*�!W��*�!W���*�!W���*�!W���*�!W���*�!W���*�!W��+�!W��<+�!W��=+�!W��+�!W���+�!W��e+�!W��+�!W���+�!W��,�!W��>,�!W��?,�!W��,�!W��R,�!W��M,�!W���,�!W��67�!W��]7�!W��x7�!W�����!W�����!W�����!W�����!W�����!W�����!W��<��!W��a��!W�����!W��?��!W��c��!W�����!W�����!W�����!W��d��!W�����!W�����!W�����!W��@��!W��e��!W�����!W�����!W��A��!W��f��!W�����!W�����!W��B��!W��g��!W�����!W�����!W��C��!W��h��!W�����!W�����!W��D��!W��i��!W�����!W�����!W��F��!W��j��!W�����!W�����!W��G��!W��k��!W�����!W��H��!W����!W�����!W�����!W�����!W�����!W��I��!W��l��!W�����!W��J��!W�����!W�����!W��L��!W����!W�����!W�����!W����!W��M��!W�����!W�����!W��N��!W����!W��m��!W�����!W��O��!W����!W��n��!W�����!W��P��!W����!W��o��!W�����!W��Q��!W����!W��p��!W��;��!W�����!W��R��!W����!W�����!W�����!W��S��!W�� ��!W��q��!W�����!W��T��!W��r��!W�����!W��U��!W��!��!W��s��!W�����!W��"��!W��V��!W��t��!W����!W��W��!W��9��!W��u��!W����!W��X��!W��#��!W��:��!W��v��!W�����!W�����!W����!W��Y��!W��w��!W�����!W����!W��Z��!W��x��!W�����!W����!W��[��!W��y��!W�����!W��=��!W��b��!W��f��!W�����!W��g��!W��r��!W��>��!W�����!W��h��!W��i��!W��j��!W��k��!W��S��!W��l��!W��m��!W��n��!W���ض!W��8ض!W��`ض!W��}ض!W���ض!W��ض!W���ض!W���ٶ!W��_ٶ!W���ٶ!W��sٶ!W��tٶ!W��Hڶ!W���ڶ!W��Eڶ!W��Gڶ!W���ڶ!W��^ڶ!W���۶!W���߶!W���!W��z�!W�� !�!W��|!�!W�� �!W��{ �!W��CD�!W���D�!W��BD�!W��oT�!W��[T�!W��YU�!W��XU�!W��uU�!W��vU�!W���U�!W���U�!W��pV�!W��qW�!W��cd�!W��^d�!W��_d�!W��wd�!W��Ad�!W�� +%�!W��.%�!W��/%�!W��%�!W��N%�!W��I%�!W���%�!W��K%�!W��~%�!W�� &�!W��0&�!W��1&�!W��$&�!W��&�!W��O&�!W��J&�!W��&�!W�� '�!W��2'�!W��3'�!W��'�!W��P'�!W��K'�!W���'�!W�� +(�!W��4(�!W��5(�!W��(�!W��Q(�!W��L(�!W���(�!W��)�!W��6)�!W��7)�!W��)�!W���)�!W���)�!W��*�!W��8*�!W��9*�!W��*�!W���*�!W��3*�!W��5*�!W���*�!W��+�!W��:+�!W��;+�!W��+�!W���+�!W���+�!W���+�!W���+�!W���+�!W��,�!W��<,�!W��=,�!W��,�!W���,�!W��e,�!W��,�!W���,�!W��-�!W��>-�!W��?-�!W��-�!W��R-�!W��M-�!W���-�!W��YZ�!W��XZ�!W��uZ�!W��vZ�!W���Z�!W���Z�!W��@�!W���׶!W���F�!W��YATYBTYCTYDTYETYFTYGTYHTYITYJTYKTYLTYMTYNTYOTYPTYQTYRTYSTYTTYUTYVTYWTYXTYYTYZTY_TYaTYbTYcTYdTYeTYfTYgTYhTYiTYjTYkTYlTYmTYnTYoTYpTYqTYrTYsTYtTYuTYvTYwTYxTYyTYzT���Y-TY.TY0TY1TY2TY3TY4TY5TY6TY7TY8TY9TYATYBTYCTYDTYETYFTYGTYHTYITYJTYKTYLTYMTYNTYOTYPTYQTYRTYSTYTTYUTYVTYWTYXTYYTYZTY_TYaTYbTYcTYdTYeTYfTYgTYhTYiTYjTYkTYlTYmTYnTYoTYpTYqTYrTYsTYtTYuTYvTYwTYxTYyTYzT� +��Y TY +TY +TY T� ��YTYTYTYTYTYTYTYTYTY TY TYTYTYTYTYTYTYTYTYTYTYTYTYTYTYTYTYTYTY&TY<TY>TY]T�ͱv +^� � +� +�' 4 ? K V b +m x � +� � � � � � � � �    $ 1 > K X e r  !� "� #� $� %� &� '� (� )� *� + , -& .3 /? 0L 1Y 2f 3s 4 5� 6� 7� 8� 9� :� ;� <� =� >� ? @ A# B/ C; DG ES F_ Gl Hy I� J� K� L� M� N� O� P� Q� R� S T U V* W5 XA YL ZW [b \m ]x ^� _� `� a� b� c� d� e� f� g� h� i� j k l m( n3 o> pI qT r_ sj tu u� v� w� x� y� z� {� |� }� ~� � �� � � � �% �0 �; �F �Q �\ �g �r �} �� �� �� �� �� �� �� �� �� �� �� � � � �" �- �8 �C �N �Y �d �o �z �� �� �� �� �� �� �� �� �� �� �� �� � � � �* �5 �@ �K �V �a �l �w �� �� �� �� �� �� �� �� �� �� �� �� �  �  �  � * � 5 � A � L � W � b � n � y � � � � � � � � � � � � � � � � � � � � � � � + � + � + � +' � +3 � +? � +K � +V � +a � +l � +w � +� � +� � +� � +� � +� � +� � +� � +� � +� � +� � +� �  � �   " - + :  F  S  _  l  x  �  �  �  �  � ! � " � # � $ � % � &  ,  2  4 + 5 8 6 E 7 R 8 _ > k ? w @ � A � B � C � D � E � F � G � H � I � J � K + L + M + N +& O +2 P +> Q +J R +V S +b T +n U +y V +� W +� X +� Y +� Z +� [ +� \ +� ] +� ^ +� _ +� ` +� a b c d* e6 fB gM hX ic jn kz l� m� n� o� p� q� r� s� t� u� v� w x y z( {3 |? }K ~W c �o �{ �� �� �� �� �� �� �� �� �� �� �� �� � � � � � + � � � � � � � �! �" �& �' �+ �, �0 �1 �5 �6 �: �; �? �@ �D �E �I �J �N �O �S �T �X �Y �] �^ �b �c �g �h �l �m �q �r �v �w �{ �| �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � � � � � � � � � � �# �$ �( �) �- �. �2 �3 �7 �8 �< �= �A �B �F �G �K �L �P �Q �U �V �Z �[ �_ �` �d �e �i �j �n �o �s �t �x �y �} �~ �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � � � � + � � � � � � � � �" �# �' �( �, �- �1 �2 �6 �7 �; �< �@ �A �E �F �J �K �O �P �T �\ �] �a �b �f �g �k �l �p �w �x �{ �| � �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � � � � + � � � �\K���[*��*��*��*�=* ��**�̼��*��*��*���*� +�*��*c��*�#*��*�G�vB^ +� +� +� +� +�$ +�) +�. +�7 +�? +�D +�K +�P +�U +�Z^K��z*��*��*��*�=* ��**�̼��*��*��*���*� +�*��*c��*�#*��*�G*+��*,��*-�K*���*�G�vZe +� +� +� +� +�$ +�) +�. +�7 +�? +�D +�K +�P +�U +�Zh_idjikoltmye���_*��#+�*��**���+Ҷ�����*��� +*�=�**�=*�ٶ�**�ٵ=**�*�=���*�=�v2 t v w x" w% y' ~5 �A �I �X �] �������{C*��*�׾�*���**����*��*��4%�*Y��`��*�$��v& 3 5 6 7# 91 ;; <? =A ?����� + �::666 � +: + +�*�� -,*��d0��d���**+,-�0*��\. dO*�K�6�F*d��*��Y+,-���*�*Y��`Z��*�S*��\. dO*�K�6�vb���� ����!�'�-�3�?�B�L�X�[�u�~����������������������������������)�7�E�F�I�L�W]c�fkt ~ +� � �� +��������������� !#!$-%7'@(N)Q'T+Z,]-w.z0�1�.�4�5�7�9�:�7�>�@�A�B�A�C�@�>�G�HIGK +5NP!R7S:R=U@WFXIU\Zc\y]|\_�`�a�c�d�a�f�g�h�i�j�l�m�j�p�rsr p wxy{2|5{8�=�F�T�a�d�k�y������������� n + 2:::66 6 +� +:  �*�� +-,*��d0��d���,*+,-�0*��\. +dO*�K�8�H*d��*��Y+,-���*�*Y��`Z��*�S*��\. +dO*�K�8�v*���� � ����$�*�0�6�B�E�O�[�^�x��������������������������������� +��,�:�H�I�L�O�Z�`�f�i�n�w������������������������������������� +������%�(�;�F�R�\�e�s�v�y������� � +� ��� ����   +!&!<"?!B$E&K'N$a)h+~,�+�.�/�0�2�3�0�5�6�7�8�9�:�<�=�:AB DFG"D%K*M3N=OJNMPSMVRYBbUkWpY�Z�Y�\�^�_�\�a�c�d�c�f�g�h�j�k�h�mn +o#q,r;sAqDuJvMwPyVzYwl}s����}����������������������������#�1��������A*�� +*���*�*��v � � � � ��������td>*��``6*�̤@*Y��h��**�̤�*�̵�*�̼:*��*���*���*��*��*����*Y��`��v2 +~ + +� +�! +�7 +�? +�N +�T +�X +�i +�s +|���b���Y��*�����A����Y��*������A�*���������Y��*����A����Y��*�ٶ� +����*���� +�� ��*���� +���A�*���*��d<d�d<���Y��������A��*��*���J�ݶ������vN � �9 �@ �H �K �d �p �| �� �� �� �� �� �� �� �� �� � ���< ���Y��+�� +���A�*�۬v + � ����1*���*����v�� �� ��P*�*M*;�D�*��**��d.��d��*��,����N-�*��**���,�����-�v���%�2�6�N��������J"*���*��Y*���� +*��>*��v ` a ` c e���*�v j������1*���*����v� ����2*���*���vpq +r���2*���*��?�vab +c���,*��*�����v ����)*�����v ���% +*�ؙ��vL���v +����v +��{3N+���@}��+��M��Y,��N�+�N� W+�N-�(+�v. K L O Q R O# U( L+ W, Y1 [��1��d,*��*��4�W*���**����*��*��4� + +�v�� +� ���"����2���z*����*����*���*��ѧW*�ؚ*��**���Ҷ����**�*Y��dZ��2�*��**����**����ٱ$'�vB� +����$�'�(�/�C�E�H�\�c�n�y~����7��% *���v + � ����7#�' *�+��v + � + ����:��,+��!*��**���+��������+�F��*��+�+�F�%M,��,��YN�*-,�,�����,��Y:�*,�,�����,�Y:�:*��Y��,�����:*��**���+�F������*��**��������*��Y+�F��+�F+���6N*��**���+�F���-���+*��M,� *,� ��+�*�+�����������v�)��� �#�%�,�>�B�K�X�[�e�s�v�������� � � � � � � +� � � � � �        ! &" '* )���;�4 +p� +YOYOYOYO:666*�#*��*�*�ٶ56�+�"[O�� ����.��<.��2*\��6*��Y+,-���*�*Y��`Z��*�S�g.��D.��:*\��6*��Y+,-���*�*Y��`Z��*�S*��/�.�H.<�?.�8.?�/*\��*��Y+,-���*�*Y��`Z��*�S��.<�N.�G.?�>.�7*\��*��Y+,-���*�*Y��`Z��*�S*��/�|.�F.�?.�8.<�/*]��*��Y+,-���*�*Y��`Z��*�S�2.<�L.�E.�>.�7*]��*��Y+,-���*�*Y��`Z��*�S*��/��.�N.�G.<�>.�7*]��*��Y+,-���*�*Y��`Z��*�S*��/��.�N.<�E.�>.�7*]��*��Y+,-���*�*Y��`Z��*�S*��/�<.L��.o��.���.�������:*�#*��ݻ�Y+��: *��Y ,-���*�����*�*Y��`Z��*�S*���+�3*�m�*�x�*�?�*�<���.<�D.?�;.x�2.m�)*���*�� +*+,-�Ч +*+,-��6�K*d��*��Y+,-���*�*Y��`Z��*�S�:*��**���,�����*��1**����**�����*�*�4*�*�ӵ�*���;*�#�*��**�����*�ؚ*�� +*�.�*�,�5���v�j�����#�*�5�5�;�I�L�U�i�p�s������������������ +,/ +O +Vdx� +��������!=$D%R&f'n!q)�,�-�.�/�)�1�5�6�5�4�7�8�= +>?$@8DCGLHUI^Jg1jL�P�Q�P�S�T�L�X�Y�Z���]�_�`�_�cefg!h,i1l7o>pKrVtduhtkwo����;��x*��*�*�ٶ5*�#*��Y+,-���*�*Y��`Z��*�S*��!**����**�����*�*�4*�ؚ*�� +*�.�*�,�v:����%�9�@�K�V�^�l�p�s�w����;�:*�#*��**+�,-��v�� +�����;��S*��*�*�ٶ5*�#*�*Y��`Z��+S*+�*��!**����**�����*�*�4�v* +����(�-�4�?�J�R����;��+�:+��:+��YN�*-��|+��Y:�*��e+�Y:�D*�ӻ�Y��M*,�:*��8:*��**��ܶ����*��**��ܶ����Bbe�vZ{| �!�+�5�8�B�B�G�Q�X�b�e�g�y�}������u���>��r:*��*Y��Z`��4�W*���**����*��*Y��Z`��4��v������)����@��?*�<�*��**��������v~�|���B���*��**�ٵ=*��*��4=� ~3��*��*�� U�!&� +*�C�-���<�$��*Y��`�٧��W*�Κ���*�����Y*��*�=*��*�=d���**�=*�ٶջ�Y*��*���� +^a�vVZ[ +_ +ab(c3b6d<fCgFjQkTl^_anbpjqmttv�x�y���C%���=>**�ٵ=*��*��*��46*Y��`���]�9=�4�]�=�#=��]����>��@=���*����*��**���zҶ����W*z�Κ�u�*��� +*�=O+*��*�=d���dO*�װ*�=*�ٲ��d�**�=*�ٲ��d��+O+*��O*�˰���v�)  + & *13 6;BDGILQX[beg"n$u&�'�&�(�,�.�/�2�4�5�6�8�9�:�;�=���D����<*��`*�׾�**�*�=���*�=*���ž�E� *�(<�*���þ�E� *�'<�+� �!*��**���I���� ��v>����$�3�9�<�K�Q�`�s�x�{�~����E%�uY=*��>*��*�=*��46����~36� =�������"=*��*�C� *��>��*��>���� ������,�%*��*��**���z������=�!=*��*��**��ݶ������I=*��E*� �*��*��**��ݶ������W*��*�Ι *��>���*��*���+*�=O+*�=dO*�װ*�=� **�=��+O+*��O*�˰�v@LMN OSUV X+Z0\2]5^8a>dDfFgKhSjXk[m`ncqisltourxxz}|�}�~�}�����������������V����������������������S��#�*�3�8�@�I�M�T����F��� <=**�ٵ=*��*��*��46*Y��`���-�R<�M�-�<�<<�7�2>��a*��**���{�����-�<���*����*��**���Ҷ����W*�Κ�^�*��*�=d�¾d>*������Y*��*�=�����**�=*�=`�ջ�Y*��*�������v�(stu vz|}&~*�1�3~6�;�B�D�G�I�L�Q�X�[�o�t�w�~����������������������������������G����*��*Y��Z`��4=0�9� +h`0d<���;�X*��**��d.��d��>W*��*��**��d.��d���**�*�=���*�=*�'��GJ�vR '*0@DG JKR!b"f!i#k%z&'�)���H����*��**�ٵ=*��*��4=&� +*�C����%�$��*Y��`�٧��W*�Κ�ŧ*�����Y*��*�=*��*�=d���**�=*�ٶջ�Y*��*���� +?B�vJ�� +� +���$�'�2�5�?�B�C�K�N�U�n�z����I��C�*��*Y��Z`��4=0�9�h`0d<���a�f�h`ad +`<���A�F�h`Ad +`<���;�X*��**��d.��d��>W*��*��**��d.��d���**�*�=���*�=*�(����vj����'�*�6�C�F�R�_�b�h�x�|��������������������J��D$**�ٵ=*�)�*��*�=*��*�=d�ְv!" $���K���"*��*�׾�*���**�*�=���*�=*��*��4<�~3��d��*Y��`�٧_*��**���~�H�����*��*��4:�*Y��`�٧&��*��*��4��*Y��`�٧*��*��4<� +~3��*Y��`�٧���6� �/*Y��`�٧��W*��**�*�=���*�=������v�$� ���#�(�2�P�W�a�d�z�����������������������������  +�!����L���[**�ٵ=*��*��4� �/*Y��`�٧��W*��**�*�=���*�=��Ȳ*��*�=*��*�=d�ְ$$�v. ����!�$�%�,�;�@�C����M��y�<=**�ٵ=*��*��*��46*Y��`���?�#<��?����>��><���*����*��**���0Ҷ����W*0�Κ���*��*�=d�ƾd>*������Y*��*�=�����**�=*�=`�ջ�Y*��*����}}�v� ��� ����&�*�1�3�6�;�B�E�L�O�Q�X�_�r�w�z�}�~������������������N���**�ٵ=*�)*��*�׾�6*���*��*�=*��*�=d�ְ**�*�=���*�=*��*��4:�*Y��`��*�)�*��*�=*��*�=d�ְv. [\ ]_`7aFbKdYecfgh���N'�J�**�ٵ=*�)*��*�׾�A*��&+S+�*��*�=*��*�=d��S+2�**�*�=���*�=*��*��4:�b*��*�=d=+�*��*�=��S*Y��`��*�)*�=``>+�*��*��d��S�*��*�=*��*�=d�ְ+S+�*��*�=*��*�=d��S+2�vR12 357$8>9B;Q<V>d?n@�A�C�F�G�H�L�M�N���O��?�<*��*�׾�*���**����*��*��4<"�''�!*��**���  +������**Y��`Z�ٵ=*��*��4�/*Y��`�٧��W*��**�*�=���*�=���*Y��`�ٻ�Y*��*�=*��*�=dd���i���v^�����&�0�<�O�T�W�Z�i�i�v��������������������P���1*���Ǿ�E�$LM*���ʾ�E�*���Ǿ��*�<�%*��**��m��m��*���Ǿ��*���ɾ�E�6*�<@DAGDNFUGaHfJqK}L�M�O���S��*���Ǿ�E��LMN6*���ʾ�E�*���Ǿ��*�<�%*��**��m��m��*���Ǿ��*���ɾ�E�*��**���������*�*��*��4>� �*Y��`�٧��:�/*Y��`���!=���W*��**���٧��*�٠!*��**���~�H����� +AA�vZ:;< +? +ABC%B(D.F8G<I>DANBPIRW?ZUbVxW}V�8���`���b<*��*��4<"�%'�*��**���  +�����*Y��`�٧W*���**����*�:*�;�>A�vFbce fh+i0h3j4l>cAnBpIqJrXs\ua`���a��k/*��*Y��Z`��4���W*���**���٧���v"   +,���b���O<� *��*��4~3� *��*��4�<*Y��`�٧���W*���**���٧��44�v6 +#!%"/2%4'5)<*>+L���l��uA*��<*�&=�3**�=��*��*Y��Z`�� +��� +U**�ٵ=��v"�� +���5�=�?����m��}9*��*��4�*Y��`����W*���**����*�D��v* +�� +�����#�%�3����m$��\6�H+4*��*��`4�������(W**��`���**���d�٧���*Y��`���#&�v>������#�&�'�5�7�H�K�O�Z������PK +� �(���s +s +"oracle/xml/parser/v2/XMLText.class����-��MNOP�������������� +1 + 2 + +3 +4 +5 + +6 +7 +8 9 +: +; +< += +> +? @ +A B C D + E +F G H I J +K +L bT b] b` ba pa q[ rT sT tf uT vZ xR yS z_ |V ~m �Q �o �f �j �\ �Y �i �n �f �f �X �\#text&<>()I()Ljava/lang/String;!()Loracle/xml/parser/v2/XMLError;()V()Z(C)Z(I)Lorg/w3c/dom/Text;(I)V(II)Ljava/lang/String;(II[CI)V*(Ljava/lang/Object;ILjava/lang/Object;II)V(Ljava/lang/String;)V(Ljava/lang/String;S)V*(Loracle/xml/parser/v2/XMLOutputStream;Z)V9(Lorg/w3c/dom/Node;Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node;#(SLoracle/xml/parser/v2/XMLError;)V([CII)VCode +ConstantValue +ExceptionsIINCRLineNumberTableLjava/lang/String;Loracle/xml/parser/v2/XMLNode; +SourceFile XMLText.javaZ[C[IaddText arraycopy +checkArray +checkReadOnlycurrentOutputIndexflushgetChars getNodeValuegetText getXMLError insertBeforeisDisableOutputEscapingisWhiteSpaceCharisWhiteSpaceNode isWhitespacejava/io/IOExceptionjava/io/Serializablejava/lang/String)java/lang/StringIndexOutOfBoundsExceptionjava/lang/Systemlengthoracle/xml/parser/v2/CharData!oracle/xml/parser/v2/XMLConstants$oracle/xml/parser/v2/XMLDOMExceptionoracle/xml/parser/v2/XMLNode$oracle/xml/parser/v2/XMLOutputStreamoracle/xml/parser/v2/XMLTextoracle/xml/parser/v2/XMLUtilorg/w3c/dom/DOMExceptionorg/w3c/dom/Nodeorg/w3c/dom/TextoutputEscArrayoutputEscArrayLenparentprintsetDatasetDisableOutputEscaping splitText substringtext textcharstextpostextsizewrite +writeChars! ~m�n�f�fgfd�otf�f bTcL *�*�$*� +�&*�*�'�hP   +Nb\c�L*�*�$*� +�&*�*�'+�%=�N*�.*�-**�.��,+-�*-��h6 +U   +W$X([-\2]<_D`KSbacw;*�*�$*� +�&*�*�'*�.*�-**�.��,*+��h* +e   +h$i)j3m:cpac�*�$�*`66�+4�#� *�$� +����*�-�V*�.*�-`d�G*�-``6*�.�`6�6*�,:*��,*�,*�-`�*�.+*�,*�-`�*Y�-`�-�hR�� ���!�$�.�6�E�O�Y�`�d�j�r���������rTca5*�*�'�,*�&L**�'h� +�&+*�&*�'�*Y�'h�'�h� ���*�4�wRc*� �h�exRcB"*�+�*�Y*�,*�-`��+*�+�h���{Uc+ *����h�� �}Uc*�$�h��^c��*� �%>�:*�+�6�s4&� +�0�]4<� +�0�J�;4>�1�d4]�d4]� +�0�+>�/� +4�/����+��hR�� +���)�/�2�<�B�E�U�q�w�z�����������e�XcY5*�*�&*Y�Z`�*�+�%dO*�&*Y�Z`�*�+�%O�h���4��Wc�F*��Y�M*� N,-�*�)*--�%�*�)�W� +Y*�!��*�(,*�"W,�(+ h. ~� ����(�+�,�9�D�eklPK +� �(n ���#oracle/xml/parser/v2/XMLToken.class����-?  +   +efghijklm<=(ILjava/lang/String;)V AttListDeclAttNameAttValue AttributeCDSectCharDataCodeComment +ConstantValueDTDNameETagETagName ElemDeclName EmptyElemTag +EntityDeclEntityDeclName EntityValue +ExternalIDILineNumberTable NotationDeclPIPITarget ReferenceSTagSTagName +SourceFileTextDeclXMLDecl +XMLToken.java elementdecljava/lang/Objectoracle/xml/parser/v2/XMLTokentoken5/%*/%6/%/%/% /%'/%(/%"/% $/% +4/% !/% 2/% +3/%9/%8/%&/%/%;/%)/%+/%-/%,/%1/%./%>7:PK +� �( +����c�c'oracle/xml/parser/v2/XMLTokenizer.class����-{������������������������������������!#%&'()*+,-/:<=>?[]����������������������������������������������������������������������������������������������������������������������������������������|�������� 3456789:;<=>?@ABEFGIKRS`acdefijklmqstv{|~���������������������������������������� !$FIK\]_`bcopqrstuvwxyz%&'()*+,-./ +�n +�n +�o +�o +�o +�p +�p +�q +�r �s �t �u �v �w �x �y �z �{ �| �} �~ � �� �� �� �� �� �� �� �� �� �� �� +�� +�� +�� +�� +�� �� �� �� �� �� +�� +�� +�� +�� +�� +�� �� �� �� �� �� +�� �� +�� +�� +�� +�� +�� +�� +�� �� �� �� �� �� +�� �� +�� +�� +�� +�� +�� +�� +�� �� +�� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� +�� +�� �� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� �� �� +�� �� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� +�� �� +�� +�� +�� +�� �� �� �� +�� +�� �� +�� +�� +� � D D D# D( D1 L� M� N� O� V� Z� \� b� o� p� r� u� w� x� y� |� �� �� �� �� �� �� �� �� � � � �% �" �� �� �� �� �� �. � �! �0 �� �� �� �� � �� �) � � � � � � �� �� �� �� � + �� � � � � � � �  +�    �  +� � � � � � � � � � � � � � � � �  � " # + 0� 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A/ B C D E G G G' G, H JQ L� M N� O P. Q# R2 S T U V# W+ X [ + ^$ a� d e f f� g� h h j� k l- m n� !# #document&&#xx;'(()I()Ljava/lang/String;()V()Z(C)Z(I)I(I)Ljava/lang/String;(I)V(III)V(IIII)V'(ILjava/lang/String;)Ljava/lang/String;(ILjava/lang/String;)V9(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;(IZ)V(Ljava/io/InputStream;)V<(Ljava/io/InputStream;Ljava/lang/String;Ljava/lang/String;)V(Ljava/io/OutputStream;)V(Ljava/io/Reader;)V7(Ljava/io/Reader;Ljava/lang/String;Ljava/lang/String;)V&(Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/Object;)Z8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/String;)I&(Ljava/lang/String;)Ljava/lang/String;,(Ljava/lang/String;)Ljava/lang/StringBuffer;(Ljava/lang/String;)V(Ljava/lang/String;)Z(Ljava/lang/String;II)V(Ljava/net/URL;)V5(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;)V�(Loracle/xml/parser/v2/DTD;Loracle/xml/parser/v2/XMLError;Loracle/xml/parser/v2/XMLDocumentHandler;Lorg/xml/sax/EntityResolver;Z)V8(Loracle/xml/parser/v2/XMLReader;Ljava/lang/String;IIZ)V"(Loracle/xml/parser/v2/XMLToken;)V(Lorg/xml/sax/ErrorHandler;)V(Lorg/xml/sax/InputSource;)V(Z)Ljava/lang/String;(Z)V(ZZ)V([CII)Ljava/lang/String;([CII)V([CILjava/lang/String;)I)*+,---//>1.0;=>?>AMPANYASTERISKATTLIST AttListDeclAttNameAttValue AttributeBANGCCDATA&CDATA or Conditional section start tag +CDATATAGSTARTCDENDCDSect +CLOSETAGSTARTCOMMACOMMENTCharDataCodeComment +ConstantValueDASH DECLTAGSTARTDOCTYPEDTDDTDNameDoctype Doctype nameELEMENTEMPTY EMPTYTAGENDENCODINGENTITIESENTITY +ENTITY|... ENUMERATIONEOFEQETagETagNameEXTENDS ElemDeclNameElemendDecl Name"ElementDecl name in Attribute List EmptyElemTag Entity name +EntityDeclEntityDeclName EntityValue +ExceptionsExpected System ID +ExternalIDFDIGITFIXEDFLETTER FMISCNAME +FSTARTNAME FWHITESPACEHASHIIDIDREFIDREFSIGNOREIGNORETAGSTART +IMPLEMENTSIMPLIEDINCLUDEINCLUDETAGSTART INVALIDTOKENLEFTSQBLPARENLineNumberTableLjava/io/PrintStream;Ljava/lang/String;Ljava/net/URL;Ljava/util/Hashtable;&Loracle/xml/parser/v2/StringHashtable;$Loracle/xml/parser/v2/XMLByteReader;Loracle/xml/parser/v2/XMLError; Loracle/xml/parser/v2/XMLReader;Loracle/xml/parser/v2/XMLToken;NAMENAME ' NAMESPACENDATANMTOKENNMTOKENSNOTATION +Notation name NotationDeclORPCDATAPERCENTPIPI name PI or EOFPITAGEND +PITAGSTARTPITargetPLUSPUBLICPUBLICIDQMARKQUOTEREQUIREDRIGHTSQBRPAREN ReferenceSLASH +STANDALONESTagSTagNameSYSTEM +SourceFileStringTAGENDTAGSTARTTEXTTEXT 'TextDeclVERSIONVersion +WHITESPACEWORDCHARXML XML KeywordXMLDeclXMLTokenizer.javaZ[[C[I[Z]]>]]>_init_initTagaddCharaddErrorappendasciiExtNameChar +asciiNameChar asciiWSCharbufferchartype +checkCDENDclosecreate +currentBuffer +currentPoselement close tag element tag elementdeclencodingencoding or standalone entity name +entity refeofPosequalserrerror +fillBuffer flushErrorsget getMessage0 getMessage1 getMessage2inTaginputinputBufinputInxintValueinternalSubset invalidtokenisDigit +isExtNameCharisLetterisLetterOrDigit +isNameCharisWhiteSpaceChar isWhitespacejava/io/IOException(java/lang/ArrayIndexOutOfBoundsExceptionjava/lang/Characterjava/lang/Integerjava/lang/Stringjava/lang/StringBufferjava/lang/System java/net/URLjava/util/Hashtable lang code lookaheadlookupnBufnTokname nameDOCTYPE nameDOCUMENT nameENCODING +nameHashTable +nameNameSpacenameNo +namePCDATA namePUBLICIDnameSpaceSeparatornameStandalone nameVERSIONnameXML nameXMLLang nameXMLSpace nameXSLPInameYes namespace nametoken +ndata namenextChar nextTokenno.oracle/xml/parser/v2/DefaultXMLDocumentHandler$oracle/xml/parser/v2/StringHashtable"oracle/xml/parser/v2/XMLByteReader!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLError&oracle/xml/parser/v2/XMLParseExceptionoracle/xml/parser/v2/XMLReaderoracle/xml/parser/v2/XMLToken!oracle/xml/parser/v2/XMLTokenizerorg/xml/sax/InputSourceorg/xml/sax/SAXExceptionoutparseAttListDeclparseAttributes +parseCDATA +parseCharData parseComment parseContent +parseDocument parseElementparseElementDeclparseEntityDeclparseIgnoreSectContentparseIgnoreSectionparseIncludeSectionparseInternalSubset parseKeyword +parseNotationparsePI parseProlog +parseTextDecl +parseToken parseXMLDecl +percent(%) +pushXMLReaderputquestion mark(?)quote +quote(' or ")readerresetBufsNBuf scanCharRef +scanEntityRefscanNamescanSimpleNamescanSimpleString +scanString sendToken setEncodingsetErrorHandlersetErrorStreamsetTokensetTokenHandlerskipWhiteSpaceChar +standalone start tag(<) +startsWithstring +tag end(>)texttmpE1tmpP1 toLowerCasetoStringtoken tokenHandler tokenStringtokenizetokenstryDocTypeDecl +tryExternalIDtryMiscurlversion version 1.0 +whitespaceword characterxmlxml-stylesheetxml:lang xml:spacexmlnsyes yes or no|!������]��]��]n�]��]��]P�]��] ^�]��]H�]��]!��]"��]��]EJ�]��]��]X�]��]m�]��]��]��] ��] +��] ��] _�] +W�]g�]#Y�]$`�]%��]&T�]'e�](f�])I�]*��]+K�],R�]-��].��]/��]0j�]1i�]2��]3��]4��]5l�]6~�]7��]8��]9��]:��];��]<��]=q�]>��]?��]@��]Ah�]B��]CU�]D��]FN��� � +���o�u�N�M�O�Z�\���V�����p�������L���r�w�y�x���b�|�g���L��������� +�JQf� ��a�n���j������������]}�]�]��]��]Q]��������������<C [���YX�ӳi� +�������������YX�Գ%����(����+����$����*h���"����,����0����'����)����.����/����-L���#����&�ih��Y��ҶNW�i���Y�ҶNW�i���Y��ҶNW�io��Y�ҶNW�il��Y�ҶNW�im��Y�ҶNW�id��Y�ҶNW�i���Y�ҶNW�ie��Y�ҶNW�if��Y�ҶNW�iz��Y�ҶNW�i{��Y�ҶNW�i|��Y�ҶNW�io��Y�ҶNW�in��Y�ҶNW�i���Y�ҶNW�i���Y�ҶNW�iy��Y�ҶNW�i���Y�ҶNW�i���Y�ҶNW�i���Y߷ҶNW�i���Y�ҶNW�i���Y޷ҶNW�i}��YݷҶNW�i���YܷҶNW�is��Y۷ҶNW�i��YڷҶNW�i���YٷҶNW�i���YطҶNW�i���Y׷ҶNW�i���YַҶNW;�k�<��O��T��T � � +�  +���O��T����\.�O��T����\.�O��T������.\.�O��-\.�O��_\.�O���\.�O��.T��-T��_T���T<�����3T�����:T��>Oh +mrw%|-�:�B�J�R�Z�b�j�r�z�����������������������(�:�L�^�p�����������������$�6�H�Z�l�~��������������������� +����&�,�3�<�B�L�W�b�m�y����������������,D [�C*��*��R* ���*�f*��Y�ѵ*�1*�f*��*��4�\�W�4>A��6 +2' +=?&K+4054647>6A8B2D*[m5*��*��R* ���*�f*��Y�ѵ*�1*+�f*���& @' +=?&K+B0C4@� [�P**�P��**���**�P��*�� U*�**�� *�*�_*�!*�m*���2 � ��!�)�.�6�;�@�E�JO�� [�t*��*��*��*��*��*��*��*��*��*��*��*��*��*��*��*��*�*��*��*��*��*��*���b +  + # ( +-27<AFKPUZ_dins� [C*��**��� ���*�2��efgcz���%[J&*�*��*�P*��*�*�P+���� ��%�z��.[�\=*�]�;*��*�]�.*��*�>�!�**���� +���=*����**�s� s����6 +pr tuwx%z){=|?}C�K�[nz���![ �%*������0[" +�%*������[L,� ��3���-�_� +.���� +�[L,� ��3���-�_� +.����  + +�[2� ��3������ +�  [Q%�i+� M,�*,����e� *��e*�e���� ��� �" [$�*�*���*Y�`�*��*Y�`�*��*�*�*�4U*Y�`�**��*�4��W*�*��� *��*�*���**�� ����*�h�L=�+*��4U�*����*+����(RR��^tuvwy(|(~:D�Q�R�S�a�f�g�s�������������|z��# +[��*�����*�3��*����� +*�2���**�� *���*��S�����"=#%'=()*+,/�=>�?�[]|���*�e��*>�e*�2*���*�2*�>�*��e*�*�2��*/�e��*�2*�>�*��e*�*�2��*?�e��**��e*�2��*�2*��*���� +*�T*�3�*%�e�\**���O*'�e*�2�F*���� *��U�2**�ݶ ���*�2*�3�*������)<1]���)*�e��*�*�2*��O!0/B?#*��e*�2��*��e*�2*�-�<*�2*�-�*��e*�2�x**�d\� +d��*��e*�2�Y*�[�P*�2<*�%�*�2*�T<*�]=*g�C*�eޟ*�eݟ*�e�j�f*�e�$�**��I� +���*�e�*�*����*�2*�[� +*�2��**�d�� +d����**�d]� +d����*��e*�2��*<�e�}*�2*�]�:*�2*�>�*�2*յe�V*Y�d�*Y�d�*]��*Y�d�*]�*��*�]�*�2*]�e� *��e�*�e���{� ���$�'�+�.�6�=������������������ ������"�+�1�6�:�=�C�F�N�R�U�Y�k�p�u�{�~������������������(.25;? H"L#U%[&_#b*t,z-~ �0�3�5�6�8�9�:�<�=�>�?�B�E�G�J�B�N�O P +SUSY/>2^DaGcMdQeTgZi]lamjonpwr{s�t�x�y�z�m�����������������z��1 [�y*� d<*�u�H=�3*��>'� "��=>��*�2*��*�2*����*�ٙ*f*��Y*��**��� �����JUWYZ\]&_*a4c8d=e@gDZLiSj^lfmxSz��2 [ ���*� <*�!M,�.���.M*�ڙ +**��Y*=a�H*'��H*� >,�-��*���H*�!:*'��H�**�O&&<�X*�ۙ +**��Y*�ܙ**��Y*�3���h��Z��� +���"�,�4�<�A�K�S�Y�a�dry�� ����z��3 [��*� <�J*�]�=*�2*�]�4*�2*�>��,*Y�d�*Y�d�*]��*�2*����*�3>�$*�**���**�e�g����*�ݙ* *��Y��R������"�+�.�8�B�H�K�O�W�`�e�������z��4 [5�<*� =��*�]� ��,*�>�!�<**���� +����<*�&�?*�2*�#� +*�S�/*���� *�T�**�ݶ ����*�2*�<� *���q*��e*�ޙ* *��Y��nVWY +[\[]'_)`=]@cBeKgOhXj\h_ljnolrr�e�w�Y�z�|�}�Tz��5 [�*� <�R*�-�E*�2*�-�<*�2*�>��4**�ݶ ���*Y�d�*-��*�2*����*�3>�$*�**��V**�e�g����*�ߙ* +*��Y��R������"�+�.�@�J�P�S�W�_�h�m�������z��6 [�f*�e�Y����R����K����B����;<4*�<�"*�8�*�E�*�9� *�7��*�3W����:y8|<}?�C�F�L�O�S�V�Z�]�^�cwz��7 [�R*��*�2*�Q**�3�e*�F*�<*��0*�3W*�l*��**���**�e�g������2  !$#)$-%5&Qz��8 [b*�Q*� <*�e<�)**���**�e�g����*�e�� +�*��U*��**� *��Y*�!M*�6*�>*�e��*�� +*�Y�*�� +*�Y*�e>�$*�**��b**�e�g����*�3W*�:*�e���*� 6*�/� +*�2� *��U*��*`*��Y,*�!��**�y,� +y��*�3>�*�**�db� +d��*��.**��Y�**��X**�e�g�������)�� ��.�7�8�>�E�R�W�[�`�i�p�w�x�����������������������������������/�6�B�E�a�z��9 [{C*� d<*�t�H*��*h*� *��Y*>�WM*�*��*g*��Y��& ACDE$G+H0J7KB?z��: [�<*� d=*�3%� +<*�v�H*�e��+**���**�e�g����*����!�*��*k*� *��Y*�kN*�eߠ-��*���H*�3W�[*�e'�6-�2*� 6**�O%&G�X*��*j*��Y*�3W�-�**�d**�e�g� +d��*�e>�$*�**��b**�e�g����*��*i*��Y��~�� ����%AJ�MTbh +y � � +� +������ +����� �z��; [x|<�k*��]"#'#<G*�=*�� *��*�2*����*�� *��*���!?�*��*���-[�*��*�-�**�dU� +d��*��H*�-�;*��*�-�2*��*�>� *��<�**�db� +d���*�����<�d*��*�?�Y*��R*��&*�?�*��*�>�*��<�*�����<�**�ݶ ���� +*��*�]���*�����:���,�1�5�8�=�A�I�M�P�T�t�x����������������������������������� � ������"�%�.�2�;�?�A�D�H�L�N�Q�c�f�j�m�v�{�z��< [!*�?�� +\Zz��= [N**�B*�e՟**���**�e�g������RS +T)Pz��> [�0*�Q*�3<�%���������������������������J�����]x*�%�*�2*�T���**��� ���*�2���*��**��**�e�gi�����*�E��T*�9��M*p�C*�e�G����@����+����9����2*�>��*�=�� *�5��*�D���**��*�!� +������*�A���*�@��Ա��" T]afi{!�#�$�&�(�)�+�,�.�/�2�3�5�6�8�9;<>@!B%C(E,F/Hz��?[jB*�3��***�!��e�+*�e�#**��*,�h**�e�g������ !Az��@ [�h*� d<*���H*�kM,�**�ݶ ���*�e>�$*�**��b**�e�g����*��*l*��Y��. (*,-/+24495U7\8g&z��A/[�*� >� +*��C�*�3W*�e��E�*�e٠� +*�I�*�G�**���**�e�g����*����!*��**� *��Y*�!�`��^�'*�!�/��**�m� m���*�2*������� *�?�*�2*�>� +�*�2*����*�3>�$*�**��`**�e�g����*��* +*��Y���" !.2 69"=#>'Z(c+j,x.�0�3�4�3�6�8�:�;�=�B�6�F�H�ILMz��B [Q!*�e��*�E*�3W*�l*�j*�l��! #$()* z��C [��*� <*��C*�eؠQ*=a�H*'��H***�O�W�_*�_Y��!**���*�_����*Y�_*���C*�eנS*=a�H*'��H***�O�W�_*�_�+*�P*�_�Z�W**��*�_� +����*�3W*�e��$*�**��c**�e�g����*��**��Y������rpr suv%w1x=zU{[}c�l�t�|����������������������������nz��D[I)*�3�#**��*,�h**�e�g������  (z��E [�X*� d<*ز+�a�C*=a�H*'��H***�O�W�_*�_Y��!**���*�_����*Y�_*��C*�eנY*=a�H*'��H***�O�W�_*�_�+*�P*�_�Z�W**��*�_� +����*�*�a�C*�e֠V*=a�H*'��H***�O�W�_*�_�0��(*�_�'��**���*�_����*�3W*�e��$*�**��c**�e�g����*��**��Y�������"3567#8/9;;S<Y@`AiCqDyE�F�H�J�H�L�N�H�Q�U�W�X�Y�[�]_a$c)dEfLgW1z��M [f6*�<*�*� =�*��*Y�`Z�*��4U����*� ���� +��(�0�5�O []�<*�2*�x��*�2*�0�*�9�h*�`0d<�M*�a�*�f�h*�`ad +`<�(*�A�I*�F�@h*�`Ad +`<�*�2��� +h*�`0d<*�2*�0� *�9���� +� H�**�ݶ ���*�;�**�dN� +d��*�2��b�����%�2�5�G�W�Z�l�|���������������������~z��P.[s?*�d=*��U*�;�**�dZ� +d��*�2*��* *��Y��"ln +oq(s,u3v>jz��Q#[�W=**�� *��:�**�R+�V=*��:�*�R�:U*�2**�R+�V=**�R��!*��e��. *, +-/2)44586C:P;V(z��R2[ +�*����*�.~��6�*����*�_��6�&*�1�*����**�d-� +d��+�*��U*�2*����*�3��#*�����+�*��U*�2�����JC +EC"I=LBNTPeTpUtY~Z�[�\�]�^�_�W�bz��S[�R*�=�*�2*�� *����*�>*�� +*�2�**��� �����Y*��d�ذ�* +��� ��!�)�-�0�Bz��T[Y�*�6��*��?*�2*�#� +*�S�i*���� *�T�V**�ݶ ����Q*��5*�2*����%�$*�T�**�ݶ ����*�2*�� *���q*��Y*��*�d�ص_*�� +*�2�**��� �����r�� ����"�%�0�5�8�J�M�U�Y�d�j�o�r�������������������z��U[B*�f��Y*��d�عd�������W+[% *�+�[�� +XVX[= +*�+�\�W� ��KLK M IY[������;����3  +   +#+CKe�fSg[hcikjsk{l�m�*���*���*���*�ۧ�*�ڧ�*�ܧ�*�ާ�*�ߧ�*���*�ݧ{*��s*��k*��c*��[*��S*��K*�٧C*��;*��3*��+*��#*��*��*�� *�����4������������������������� � �����!�$�)�,�1�4�9�<�A�D�I�L�Q�T�Y�\�a�d�i�l�q�t�y|����� � � ��Z*["*+�f�� +��[ +[o3<*����*�3��*����� <*�2�����* +�� �%(*.�1z��h[*�h���h[����:���������^��������������������������������������������������������������������������������������������������|����y����v����s����p����m����j����g����d����a����[����X����?���� ������������!�#%�&�'(�)�*+ ,-�/�<�=�>�?�[�]�|����W�a�P�Q�J���U���M���������R�S�K�T���r�����,�,���Y���*�!��O���b���Y���*�_��O���b�`�c���[�_�X�\�h���^�l�m�d���e�f�z�{�|�o�n�������q�y���������~�����,���=���������������������������� � �������!�'�@�Y�\�_�b�e�h�k�n�q�t�w�z�}�������������������������������������������i[\0*��Y*�*�׵P*�P+�J*�;*�P��*�� +�����!�(�/�z���i[Q)*��Y*�*�׵P*�P+�K*�;*�P�������!�(�z���i#[a5*��Y*�*�׵P*�P��Y+�ֶM*�;*�P��*�� +����"�&�-�4�z���i&[_3*��Y*�*�׵P*�P++�c�L*�;*�P��*�� +��fg h$i+j2cz���i,[Z.*��Y*�*�׵P*�P+�M*�;*�P��*�� +��wxyz&{-tz���k [�*�e���*�Q*�j�C*�k�H*���*e*� *��Y*�kL*�e[�;*�*�*�B*�e]�**�d�� +d��*�*�*�3W*�e>�$*�**��b**�e�g����*�3W��V� � +���$�2�8�A�F�K�O�X�j�o�t�y�����z��l-['�MN*�6*x�C*�e����������S*��C*�e'�**�O�WN�**��O**�e�g����*��C*�e'��-�**�dw� +d��� **�O�WM*��*m*��Y*��C�,��Z��� +��0�7�@�I�L�h�o�x�|�~���������������z��m [�K�B*�e�5��������.5555%*�E� *�9��*�3W*������* +��,�2�5�9�<�=�B�J�z����PK +� �()3����(oracle/xml/parser/v2/XMLUCS2Reader.class����-n�������^_`abcd + +$ + % +& ' ( ) + * + + , - . / 0 + 1 2 + +3 4 5 + 6 + 7 8 +9 : D; DA DB EH QO RH S? T< UP VH WH XH YJ [; \H ]@ eK fH h> i> kN l= mN()V(I)I(I)Ljava/lang/String;(I)V(I)Z'(ILjava/lang/String;)Ljava/lang/String;<(Ljava/io/InputStream;Ljava/lang/String;Ljava/lang/String;)V(Ljava/lang/String;)V(Z)VBUFSIZECode +ExceptionsILineNumberTableLoracle/xml/parser/v2/XMLError; Loracle/xml/parser/v2/XMLReader; +SourceFileXMLUCS2Reader.javaZ[B[Cbuffer byteIndexcheckSurrogate copyPushBack +currentBuffer +currentPosendPoseofIndexerr +fillBufferfillByteBufferfirst getMessage1java/io/IOException(java/lang/ArrayIndexOutOfBoundsExceptionjava/lang/Integer"oracle/xml/parser/v2/XMLByteReaderoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLReader"oracle/xml/parser/v2/XMLUCS2Readerparentsecond setByteOrdersetEOF +setLineNumber setUTF16Mode surrogate toHexString utf16Mode mNkNDAF6*+,-�*�#*�!�I3- .0GS?F�H�:�4*�#�+�*�!��*�!�*�!��*�!��*�!���I>x z|~ "�'|*�1�3�8z;�=�D�F�Z<Fo�>**��**��*�*��**��*��*�*�*�`3�~x*�*�*�`3�~�=*�>�� �1*�� +*��� +� +Y� +:�Y��"���*�*��U*Y�`�*Y�`�*�*�d4 +�*�*�d4 +��?*�*�d46**�d� *�*�d +U*�*�*�`3�~x*�*�*�`3�~�=*�>�� �1*�� +*��� +� +Y� +:�Y��"���*�*��U*Y�`� +���*�*�4 +���*Y�`���wW*�*�� +*���d*����I�'9; <@BC&D+F@GSFTIZJjL�M�P�Q�R�T�U�W�X�Y�Z[#Z$]*^:`Tahdse}f�g�@�k�m�n�m�pGg>F4� +*�*��I�� +��jCF"*�#�I +��LMPK +� �(�G���(oracle/xml/parser/v2/XMLUCS4Reader.class����-q���������abcefgh + ' + ( +) * + , + - . / 0 1 +2 + 3 4 5 + 6 +7 8 9 + : + ; < = + +> G@ GE GF HK TR UK VA WS XK YK ZK [M ]@ ^K _K `D d? iN jK lC mC nQ oK pB()C()V(I)I(I)Ljava/lang/String;(I)V'(ILjava/lang/String;)Ljava/lang/String;<(Ljava/io/InputStream;Ljava/lang/String;Ljava/lang/String;)V(Ljava/lang/String;)VBUFSIZECode +ExceptionsILineNumberTableLoracle/xml/parser/v2/XMLError; Loracle/xml/parser/v2/XMLReader; +SourceFileXMLUCS4Reader.javaZ[B[Cbuffer byteIndex copyPushBack +currentBuffer +currentPosendPoseofIndexerr +fillBufferfillByteBufferfirstfourth getMessage1java/io/IOException(java/lang/ArrayIndexOutOfBoundsExceptionjava/lang/IntegernextChar"oracle/xml/parser/v2/XMLByteReaderoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLReader"oracle/xml/parser/v2/XMLUCS4Readerparentsecond setByteOrdersetEOF +setLineNumber surrogatethird toHexString  nQGEI- +*+,-�*�$�L3. 0J\AIY�**��**��*�*��**��"*��*�*�*�U*Y�`�*Y�`�*�*�d4 +�*�*�d4 +���*�*�d4=**�d�#*�*�d +U*�*�*�U*Y�`� +��j*�*�4 +��\*Y�`���OW*�*�� +*���<*���� Lb9 :>@A$B)E6G@HJIZJjLvM�N�P�R�S�T�>�X�Z�[�Z�]Jd?Iy *�*�*�`3�~x*�*�*�!`3�~x�*�*�*�%`3�~x�*�*�*�`3�~�<� � �/*� � +*� �� +� Y�M�Y,��&����8*�$� d +z`<*�$*Y�d��d�~`<*�$� �/*� � +*� �� +� Y�M�Y,��&�����L^fg*f+h@gAiShTfUkgm�n�q�s�u�v�w�s�{�|������JkCI�R�*�*�!*�%*��8�*�*�!*�%*���*�*�!*�%*��LJ�� +�����!�&�+�0�5�8�=�B�G�L�Q�OPPK +� �(��(oracle/xml/parser/v2/XMLUTF8Reader.class����-v���������ghijkmnop +) + +* + + +, +- +. +/ + +0 +1 +2 +3 +4 +5 6 + +7 8 +9 +: ; +< += + +> + ? + @ KB KH KI LO XV YO ZF [C \W ]O ^O _O `O aQ cB dU eD fG lV qR rA sE tD uD()I()V(I)I(I)Ljava/lang/String;(I)V(I)Z'(ILjava/lang/String;)Ljava/lang/String;<(Ljava/io/InputStream;Ljava/lang/String;Ljava/lang/String;)V(Ljava/lang/String;)VBUFSIZECode +ExceptionsILineNumberTableLoracle/xml/parser/v2/XMLError; Loracle/xml/parser/v2/XMLReader; +SourceFileXMLUTF8Reader.javaZ[B[Cbuffer byteIndex +checkUTF8Byte copyPushBack +currentBuffer +currentPosendPoseofIndexeofPoserr +fillBufferfillByteBufferfourByte getMessage0 getMessage1java/io/IOExceptionjava/io/UTFDataFormatException(java/lang/ArrayIndexOutOfBoundsExceptionjava/lang/Integerjava/lang/String +newLineAndUTF"oracle/xml/parser/v2/XMLByteReaderoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLReader"oracle/xml/parser/v2/XMLUTF8Readerparent readUTF8Char +setLineNumber toHexStringvalueOf  +dUlVJBM���Y +TY +TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�TY�T�#�P��� � +������� �%�&�+�,�1�2�7�8�=�>�C�D�I�J�O�P�U�V�[�\�a�b�g�h�m�n�s�t�y�z������������������������������������������������������������������������������������������ � +�������!�"�'�(�-�.�3�4�9�:�?�@�E�F�K�L�Q�R�W�X�]�^�c�d�i�j�o�p�u�v�{�|��������������8KHM- +*+,-�*� �P?: <NZFMc?*�*�`3�~��+*�$� +*�$�� +�Y�M� Y,��!���PDF.G=JNbCM��**��**��*�=*�>*�36�#�~36�*��U������.*� +U*�&�� +���*�3 +��������*�*�*�%�U*�>����*��*�U*�*�*�*��*�*�%�U���QW*�*�*��*�*�>��2*���� +P�+Q RUVZ\#]/_4`=a@bCcFeLfTgYh\i_jqktlwn}o�p�q�r�s�v�w�x�y�z�{�}�~�Z����������������NrAM��*�*�3�~��g*�W*�*�3~x*�*�`3?~`<*Y�`���/*�$� +*�$�� +�Y�M� Y,��(�"���*�*�3�~��*�W*�W*�*�3~ x*�*�`3?~x`*�*�`3?~`<� ��� +�/*�$� +*�$�� +�Y�M� Y,��'�"��*Y�`��*�*�3�~��*�W*�W*�W*�*�3~x*�*�`3?~ x`*�*�`3?~x`*�*�`3?~`<�A�;*� � d +z`<*� *Y�d��Cd�~`<*� �/*�$� +*�$�� +�Y�M� Y,��'�"��*Y�`��*�*�3�~��+*�$� +*�$�� +�Y�M� Y,��!��*�*�3�~��+*�$� +*�$�� +�Y�M� Y,��!��*�$� +*�$�� +�Y�M� Y,��!��P�:���(�6�8�B�I�b�u�w����������������������������1�7�=�C�R�c�d�u�v��������������������������������.�=�P�i�x���NSTPK +� �(�#q���"oracle/xml/parser/v2/XMLUtil.class����-i=>Z[\]^_abcde + + + +! " # $ % +& +' +( +) +* ++ +, +- +. +/ @1 @< I4 JH KG MD ND O6 P5 R: S3 U3 V3 Y3 `0 f9 g2()I()V(C)C(C)Z(I)C&(Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/Object;)Z&(Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/String;)V(Ljava/lang/String;)Z8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;'(Ljava/lang/String;Ljava/lang/String;)Z(S)V*1.1Code +ExceptionsLineNumberTableLjava/util/Hashtable; +SourceFile XMLUtil.java[C[IcharAtchartype charuppercompareNamespace encodingMapencodingMap116equalsgetgetJavaEncoding getPropertyisDigitisFirstNameCharisLetterisLetterOrDigit +isNameCharisWhiteSpaceChar isWhitespace java.versionjava/lang/Characterjava/lang/Objectjava/lang/Stringjava/lang/Systemjava/util/Hashtablelength!oracle/xml/parser/v2/XMLConstants$oracle/xml/parser/v2/XMLDOMExceptionoracle/xml/parser/v2/XMLReaderoracle/xml/parser/v2/XMLUtilorg/w3c/dom/DOMException +startsWith toUpperCase validateName!  JHKG?1A��� +���;�V�<�O � � +�  +� �O�� �\.�O�� �\.�O��U�����.\.�O�-\.�O�_\.�O��\.�O�CJ������6�<�C�L�S�\�e�o�z������"@1A*��C"L;A?+���*+����Ca b cdfQ7AY-�L+���*��M,�,��*���C*+-. /"1T3AK+��.~����� +_���CSTVW3Af>��.~����� ��-�_� +.���CDEG&H=GX3A<��.~�����C9:< h8A�f*�<��_� :�F*�=>�4*�<��$_�:�-�.� � +Y�����ͧ � +Y���C2 klno#r)s<tHuQoYl\yeiB +EFPK +� �(�H�N  'oracle/xml/parser/v2/XPathContext.class����- +  ()V%(Loracle/xml/parser/v2/XSLNodeList;)VCodeLineNumberTableLoracle/xml/parser/v2/XMLNode;"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLTContext.java currentNodecurrentNodeListjava/lang/Object!oracle/xml/parser/v2/XPathContext!oracle/xml/parser/v2/XSLConstants oracle/xml/parser/v2/XSLTContext   *�� +> + * +*�*+�� +BD BPK +� �(f��G G )oracle/xml/parser/v2/XPathException.class����-N$:HIKLM + +    + + + + + + +! +" # 4' 42 =8 >6 ?< A& A3 B( C* D, E. F/ G0 J6()I()Ljava/lang/String;()V(I)Ljava/lang/String;(I)V'(ILjava/lang/String;)Ljava/lang/String;(ILjava/lang/String;)V9(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;((ILjava/lang/String;Ljava/lang/String;)VK(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;](ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;o(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;(I[Ljava/lang/String;I)V(Ljava/lang/String;)V3(Loracle/xml/parser/v2/XMLError;)Ljava/lang/String;CodeILineNumberTableLoracle/xml/parser/v2/XMLError; +SourceFile XPath ErrorXPathException.java[Ljava/lang/String; +defaultErrerrId errParams +getErrorID +getMessage getMessage0 getMessage1 getMessage2 getMessage3 getMessage4 getMessage5java/lang/Stringjava/lang/Throwablenparamoracle/xml/parser/v2/XMLError#oracle/xml/parser/v2/XPathException!oracle/xml/parser/v2/XSLException!>6?<J6=8 4'5G*� *� *�� *�Y�� +�7 h il 4)5P$*� *� *�� *�Y�� +*� �7h il#4+5d0*� *� *�� *�Y�� +*� *� ,S*��7""h il##$*%/ 4-5o7*� *� *�� *�Y�� +*� *� ,S*� -S*��7& *h il+#,*-1.6(415�O*� *� *�� *�Y�� +*� �%*�� 6�*� ,2S����*��72 3h il4#5'7/859@8I;N1425F*+� *� *�� *�Y�� +�7h +il@%5*� �7AA&55*� �*� +�**� +��7JK MA35!�*� �*� +�*���(1@Up�+*� ��+*� *� 2��+*� *� 2*� 2��+*� *� 2*� 2*� 2��+*� *� 2*� 2*� 2*� 2��+*� *� 2*� 2*� 2*� 2*� 2��*� +�7BVW Y8[A\P]e^v_|^�`�a�`�b�c�b�d9;PK +� �(/ Y�%oracle/xml/parser/v2/XSDFactory.class����-=893456:;< + + + + + + + " " . / 0 1 7()Ljava/lang/Class;()Ljava/lang/Object;()Ljava/lang/String;&()Loracle/xml/parser/v2/ObjectBuilder;+()Loracle/xml/parser/v2/XMLDocumentHandler;()V(Ljava/lang/Object;)Z%(Ljava/lang/String;)Ljava/lang/Class;(Ljava/lang/String;)V,(Loracle/xml/parser/v2/XMLDocumentHandler;)ZCode +ConstantValue +ExceptionsLineNumberTableLjava/lang/String; +SourceFileXSDFactory.java_builder_handlercreateXSDBuildercreateXSDHandlerequalsforNamegetClassgetName isXSDHandlerjava/lang/Classjava/lang/Exceptionjava/lang/Objectjava/lang/String newInstance#oracle.xml.parser.schema.XSDBuilder"oracle.xml.parser.schema.XSDParser"oracle/xml/parser/v2/ObjectBuilder'oracle/xml/parser/v2/XMLDocumentHandleroracle/xml/parser/v2/XSDFactory *'$+'$"#*� +�&,#VK� +��K�W�Y� �*�&%&'&()+%-#VK� +��K�W�Y� �*�&0121346%2!#+*��L+� �& +;<()PK +� �(W�[�)oracle/xml/parser/v2/XSLApplyImport.class����-VHIJKLMNOPQ +  +  +  +  +  + +! +" +# +$ + +% + & + ' ( 62 >9 ?/ @+ A) B+ C* D0 E4 F- G, R5 S. T3 U;()I!()Loracle/xml/parser/v2/XMLError; ()Loracle/xml/parser/v2/XMLNode;()Lorg/w3c/dom/Node;(I)Ljava/lang/String;(I)V(Ljava/lang/String;I)VE(Loracle/xml/parser/v2/XMLElement;)Loracle/xml/parser/v2/XSLTemplate;H(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)VI(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;Z)V!(Loracle/xml/parser/v2/XMLNode;)Vd(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLTemplate;%(Loracle/xml/parser/v2/XSLTContext;)VCode +ExceptionsILineNumberTable$Loracle/xml/parser/v2/XSLStylesheet; +SourceFileXSLApplyImport.java elementTypeerrorgetCurrentNodegetCurrentTmpl getDebugNodegetErrorgetImportedNamedTemplategetMatchingImportTemplate getMessage0 +getParentNodeoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNode#oracle/xml/parser/v2/XSLApplyImport!oracle/xml/parser/v2/XSLConstants!oracle/xml/parser/v2/XSLExceptionoracle/xml/parser/v2/XSLNode"oracle/xml/parser/v2/XSLStylesheet oracle/xml/parser/v2/XSLTContext oracle/xml/parser/v2/XSLTemplate +processActionsetCurrentTmpl setDebugNode +stylesheet 617- +*+,� *� �:01 -8R57��M+�>�*�+�+�M�b�(+�:+*�++��� ++��8*�*���YM�%+�:+*�++��� ++�,�,+�+��:^69; >;@!B'C,D=EC@FIJJNIVKYM_NdOuP{TU�W�48<=PK +� �(��D��,oracle/xml/parser/v2/XSLApplyTemplates.class����-<���!)189  +   + + l + m +n +n +!n +o +p + q +r +s t +u v + +w x +y +z +{ +| +} +~ + +� +� +� +� #� + +� +� +� +� +� +� "� +� + +� +� � + +� � +� +� +� +� +� #� � � � +� +� + � +� +� +� +� +� +� � +� +� +� +� + � +� +� � � +� +� � � �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � � � � �  � "� #� $� %� &� '� (� *� +� ,� -� .� /� 0� 2� 3� 4� 5� 7� :� ;�()I()Ljava/lang/String;!()Loracle/xml/parser/v2/XMLError; ()Loracle/xml/parser/v2/XMLNode;()Lorg/w3c/dom/Node;()Lorg/w3c/dom/NodeList;()S()V()Z(I)Lorg/w3c/dom/Node;(I)V9(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/Object;)V(Ljava/lang/Object;)Z&(Ljava/lang/String;)Ljava/lang/String;&(Ljava/lang/String;)Lorg/w3c/dom/Attr;(Ljava/lang/String;)Z(Ljava/lang/String;I)VV(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/NSNameImpl;Y(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/XSLNodeSetInt;F(Loracle/xml/parser/v2/FastVector;Loracle/xml/parser/v2/XSLTContext;)VH(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)VI(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;Z)V!(Loracle/xml/parser/v2/XMLNode;)V�(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/NSName;Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLTemplate;%(Loracle/xml/parser/v2/XSLNodeList;)V!(Loracle/xml/parser/v2/XSLSort;)VF(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLNodeList;:(Loracle/xml/parser/v2/XSLTContext;)Lorg/w3c/dom/NodeList;%(Loracle/xml/parser/v2/XSLTContext;)V(Lorg/w3c/dom/Node;)V'(Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node;(Lorg/w3c/dom/NodeList;)V(Z)VCode +ExceptionsILineNumberTable!Loracle/xml/parser/v2/FastVector;Loracle/xml/parser/v2/NSName;"Loracle/xml/parser/v2/XMLAttrList;Loracle/xml/parser/v2/XSLNode;$Loracle/xml/parser/v2/XSLNodeSetInt;Loracle/xml/parser/v2/XSLSort;$Loracle/xml/parser/v2/XSLStylesheet;Lorg/w3c/dom/NodeList; +SourceFileXSLApplyTemplates.javaZ +addElementaddSecondaryKey appendChildattrlistcreateNodeSetExprdefault elementTypeequalsexpr getAttributegetAttributeNode +getChildNodesgetCurrentNodegetCurrentTmpl getDebugFlag getDebugNodegetError +getFirstChild getLength getLocalNamegetMatchingTemplate getMessage2 getNamespace getNodeName getNodeType getNodeValue +getParentNodegetSelectedNodes$http://www.w3.org/1999/XSL/TransforminternisBuiltInElementTemplateisForwardCompatibilityModeisSrcWhiteSpacePreservingisWhiteSpaceNodeitemjava/lang/StringmodenParamsoracle/xml/parser/v2/FastVectororacle/xml/parser/v2/NSNameImploracle/xml/parser/v2/XMLAttr oracle/xml/parser/v2/XMLAttrList!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNodeoracle/xml/parser/v2/XMLText&oracle/xml/parser/v2/XSLApplyTemplates!oracle/xml/parser/v2/XSLConstants!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase!oracle/xml/parser/v2/XSLExprValueoracle/xml/parser/v2/XSLNode oracle/xml/parser/v2/XSLNodeList"oracle/xml/parser/v2/XSLNodeSetInt%oracle/xml/parser/v2/XSLOtherElementsoracle/xml/parser/v2/XSLSort"oracle/xml/parser/v2/XSLStylesheet oracle/xml/parser/v2/XSLTContext oracle/xml/parser/v2/XSLTemplate oracle/xml/parser/v2/XSLVariableorg/w3c/dom/Nodeorg/w3c/dom/NodeList paramListpopCurrentNodeListpopCurrentNodeList2preserve +processActionprocessAttributesprocessChildrenpushCurrentNodeListpushCurrentNodeList2resetSrcWhiteSpaceMode resolveQnameselect selectFoundsetCurrentNodesetCurrentNode2setCurrentTmpl setDebugNode setParamssetSrcWhiteSpaceModesort sortNodessortnode +stylesheettransformChildrentransformMiscElementswarning +with-param xml:space xmlchildren xslParent 3���*�������\,*+,,�L��)*�f*�S*�^*� Y�$�R*�0��N >@BE&O+J�"�� +�M+�8� ++�9M+*�b+�6N:6*�^�*�2+�I�:��Y-�5�*:�%*�f�+�Z*�f+�e:+�U�=66-�F�z-� �3:�1�6�_�1� +�d�M�1� +�d�;6-� �4:+�9: +��b++�: �B�i+ �b*�g�L�*+�Y+�76+�Z+�[6 +�� +�P�:  �F�" ��N�+ �H�E�M��s+ �_+ �`*�g *�R+�A:�L�K�-�;�:  �R:  *�R�R+�W  �R�*�S� +*�T+�c+�W+�a� + +��U+�U+�V�+�\+�8�+,�b��&ITU WX[]^`%a4`7cDeIgPiVj`kdmkqntvv�w�y�{�|�{�}�~�}������������������������������ �)�4�5�E�H�N�T�d�i�q�{��������������������������������R�#����*+�X*�.��*�.�<=:6�k*�.�O� +N+�8�+�9:+-�b-�?:-�G�J:�*�^**�/�2�� +**�]�R+�8� +�b������Z  +!#%'+(2*8+=.C/L0S2X3b0e5l7v9}:�%��6��  +L*�j�>=N::::6�**�j�Q�N-�F�-��N��-�F��-�:�@:�C:���:�Y*�g�':+�h*�f�*��f��*�f��,���G�!Y*�g�(:*�k+�h*�T�*� Y�%�T*�T�+*Y�S`�S�W*�g�L�#�Y*�g�&:+�h*�-W�-+�9: +-�b++�:-�D*�D�B�i+ �b���ֱ��0� +� ������-�5�?�B�J�P�W�^�e�l�{�������������������������  + +  #+369<B�K����PK +� �(��ќ � 'oracle/xml/parser/v2/XSLAttribute.class����-�T�������������������� +5 +6 +7 8 +9 +: + +; +< += +> +? +@ +A +B + C +D +E +F +G +H +I +J +K +L +M +N + +O +P +Q +R S hd sm tn uk vb w` x^ yg zZ {X |W }Y ~U V �\ �V �V �V �V �[ �a �m �r �f �f �_ �] �e �c �b �o()I()Ljava/lang/String;!()Loracle/xml/parser/v2/XMLError; ()Loracle/xml/parser/v2/XMLNode;(()Loracle/xml/parser/v2/XSLEventHandler;()Z(I)Lorg/w3c/dom/Node;'(ILjava/lang/String;)Ljava/lang/String;&(Ljava/lang/String;)Ljava/lang/String;&(Ljava/lang/String;)Lorg/w3c/dom/Attr;(Ljava/lang/String;)V(Ljava/lang/String;I)V'(Ljava/lang/String;Ljava/lang/String;)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V((Ljava/lang/String;[Ljava/lang/String;)VH(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)V!(Loracle/xml/parser/v2/XMLNode;)V%(Loracle/xml/parser/v2/XSLTContext;)Vi(Loracle/xml/parser/v2/XSLTContext;Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Ljava/lang/String;Code +ExceptionsILineNumberTableLjava/lang/String;"Loracle/xml/parser/v2/XMLAttrList;$Loracle/xml/parser/v2/XSLStylesheet; +SourceFileXSLAttribute.javaZ attrNameValattrlist elementType endAttributeerrorgetAttributeNodegetAttributeTemplateValue getDebugFlag getDebugNodegetErrorgetEventHandler getLength getLocalName getMessage1 getNamespacegetNewNamespacePrefixgetValue$http://www.w3/org/XML/1998/namespaceinternitemjava/lang/Stringname namespace +namespaceAttrnsAttr nsAttrFoundoracle/xml/parser/v2/XMLAttr oracle/xml/parser/v2/XMLAttrList!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLAttribute!oracle/xml/parser/v2/XSLConstants$oracle/xml/parser/v2/XSLEventHandler!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase!oracle/xml/parser/v2/XSLExprValueoracle/xml/parser/v2/XSLNode"oracle/xml/parser/v2/XSLStylesheet oracle/xml/parser/v2/XSLTContext +processActionprocessAttributesprocessChildrenprocessSpaceAttrresolveNamespacePrefix setDebugNodespace +splitQnamestartAttribute +stylesheet + sm�m�rhdi, *+,�*��l@A =j�fi� +M+�� ++�M+*�1+�!N+*�*�:�::�22��6*�,���*�,�++*�+*�:�(:�_*�4�&S6�N*2�0:��8*�:+�: +� �1*�4+� �2�$�+ �1-2�*� +2�:-2�3*+�.-2�+��+,�1�l�&FG IJMOPO#R)S-U4VD]PcWf`ebiiknmyn|ct�v�x�y�z�{�|�{�}������������ +Dj�fi�|*+�-*���*��"=6�]*��)�N-�#:-�'�(:� *��.�*�+*�,��-�%� *�/�����lR�� � +���(�.�7�>�D�G�N�T�Y�\�c�l�r�{�jpqPK +� �(�q�DD*oracle/xml/parser/v2/XSLAttributeSet.class����-������������������������ + > +> +> +? +@ + +A B +C D + +E +F +G +H +I I +J +J + K +L + +M + +N + +O +P +Q + R +S S +T +U +V +W +X +Y Z +[ +\ +] ^ sm sr p �q �y �x �v �d �f �c �b �_ �` �h �` �` �e �` �` �f �f �g �o �o �o �i �k �n �z �o �~ �j �{()I()Ljava/lang/String;()Loracle/xml/parser/v2/NSName;!()Loracle/xml/parser/v2/XMLError; ()Loracle/xml/parser/v2/XMLNode;()Lorg/w3c/dom/NodeList;()S()Z(I)Lorg/w3c/dom/Node;9(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/String;)V(Ljava/lang/String;I)VV(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/NSNameImpl;$(Loracle/xml/parser/v2/XMLElement;)VH(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)V!(Loracle/xml/parser/v2/XMLNode;)V%(Loracle/xml/parser/v2/XSLTContext;)V(Lorg/w3c/dom/Node;)V'(Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node;(Lorg/w3c/dom/NodeList;)VCode +ExceptionsILineNumberTableLoracle/xml/parser/v2/NSName;"Loracle/xml/parser/v2/XMLAttrList;$Loracle/xml/parser/v2/XSLStylesheet;Lorg/w3c/dom/NodeList; +SourceFileXSLAttributeSet.javaZaddNode appendChild attributeattrlist attrsetName elementType +getChildNodes getDebugFlag getDebugNodegetError getLength getLocalName getMessage2getName getNamespace getNodeName getNodeTypegetText$http://www.w3.org/1999/XSL/TransforminternisForwardCompatibilityModeisWhiteSpaceNodeitemjava/lang/StringmergeAttributeSetnameoracle/xml/parser/v2/XMLAttr oracle/xml/parser/v2/XMLAttrListoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNodeoracle/xml/parser/v2/XMLText!oracle/xml/parser/v2/XSLAttribute$oracle/xml/parser/v2/XSLAttributeSet!oracle/xml/parser/v2/XSLConstants!oracle/xml/parser/v2/XSLException!oracle/xml/parser/v2/XSLExprValueoracle/xml/parser/v2/XSLNode oracle/xml/parser/v2/XSLNodeList%oracle/xml/parser/v2/XSLOtherElements"oracle/xml/parser/v2/XSLStylesheet oracle/xml/parser/v2/XSLTContextorg/w3c/dom/Nodeorg/w3c/dom/NodeList +processActionprocessAttrSetsprocessAttributesprocessChildrenprocessUseAttrSets resolveQname setDebugNode +stylesheettransformChildrentransformMiscElements transformeduse-attribute-setswarning xmlchildren +�~�xsmt5*+,�*�;*� �w?� @<u�at*��w_�lt�L*�=���Y*�=�M*,�=+�!M,�&>6�*�=�,�2� +�����w& P +RSV W'X-YBXKNu�otH*�;� +*+�:*�;*+�3*+�5�wEG HJKCu�ot��*+�4*���*��%=:6�b*��1�N+�"�+�#:+-�8-�':-�-�.:�**�7��� *�6+�"� +�8�����wV�� � +����+�2�8�=�C�L�S�]�`�g�m�t�z���u�ot� +�*�=�&=N::::6��*�=�2� +N-�,�-� �0����-�,��-�:�(:�*:�T�#� Y*�9�:*�W+�:�W*�9�/�#�Y*�9�:+�:*�W�-+�#: +-�8++�$-�+*�+�)�<+ �8���8�w�$e +f ghijln-p5r?sBuJwPyWz^|e~l�{��������������������������������l�bu|}PK +� �(�Rk))*oracle/xml/parser/v2/XSLCallTemplate.class����-�b��������������������� += +> +> +? +@ + A B +C +D +E +F +G H +I +J +K +L + M + N +O +P + +Q R S T +U +V +W +X +Y +Z +[ \ ] +^ +_ ` a wj wr ws �l �v �z �m �c �h �f �e �c �d �k �q �d �d �g �d �h �h �i �z �| �u �u �u �o �j �t �p �~ � �u �n �� �}()I()Ljava/lang/String;!()Loracle/xml/parser/v2/XMLError; ()Loracle/xml/parser/v2/XMLNode;()S()Z(I)Lorg/w3c/dom/Node;(I)V9(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/Object;)V&(Ljava/lang/String;)Lorg/w3c/dom/Attr;(Ljava/lang/String;I)VV(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/NSNameImpl;F(Loracle/xml/parser/v2/FastVector;Loracle/xml/parser/v2/XSLTContext;)VA(Loracle/xml/parser/v2/NSName;)Loracle/xml/parser/v2/XSLTemplate;H(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)VI(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;Z)V!(Loracle/xml/parser/v2/XMLNode;)V%(Loracle/xml/parser/v2/XSLTContext;)V'(Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node;Code +ExceptionsILineNumberTable!Loracle/xml/parser/v2/FastVector;Loracle/xml/parser/v2/XSLNode;$Loracle/xml/parser/v2/XSLStylesheet;"Loracle/xml/parser/v2/XSLTemplate;Lorg/w3c/dom/NodeList; +SourceFileXSLCallTemplate.java +addElement appendChild elementTypegetAttributeNodegetCurrentTmpl getDebugFlag getDebugNodegetError getLength getLocalName getMessage2getNamedTemplate getNamespace getNodeName getNodeType getNodeValue$http://www.w3.org/1999/XSL/TransformisForwardCompatibilityModeisWhiteSpaceNodeitemnParamsnameoracle/xml/parser/v2/FastVectororacle/xml/parser/v2/XMLAttroracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNodeoracle/xml/parser/v2/XMLText$oracle/xml/parser/v2/XSLCallTemplate!oracle/xml/parser/v2/XSLConstants!oracle/xml/parser/v2/XSLException!oracle/xml/parser/v2/XSLExprValueoracle/xml/parser/v2/XSLNode%oracle/xml/parser/v2/XSLOtherElements"oracle/xml/parser/v2/XSLStylesheet oracle/xml/parser/v2/XSLTContext oracle/xml/parser/v2/XSLTemplate oracle/xml/parser/v2/XSLVariableorg/w3c/dom/Nodeorg/w3c/dom/NodeList paramList +processActionprocessAttributesprocessChildren resolveQnamesetCurrentTmpl setDebugNode setParams +stylesheettemplatetransformChildrentransformMiscElementswarning +with-param xmlchildren xslParent  ��|�zwrx;*+,,�+��*�.*��{? �@:y +�ux~B*�7�+�*+�2*�8�.+�=+��4*�.�*�8*�/+�6*�8+�0+�4�{* +G +ILNO!P(Q4R<SACy +�ux�S*+�1MN*��:� �*N+� �+�!M+�5-*�3:**�7�&�8+� �+,�5�{:��� +��� �'�,�2�9�F�M�R�y +�ux� +*�;�#=N::::6��*�;�-� N-�)�-� +�,�ȧ�-�)��-�:�$:�':�x�G�Y*�7�:*�<+�9*�/�*�Y��/*Y�.`�.*�/��W*�7�+�#�Y*�7�:+�9*�W�-+�!: +-�5++�"-�(*�(�%�:+ �5����{�(Z +[ \]^_ac-e5g?hBjJlPnWo^qeslu{y�z�{�|�}�~���������������������������a +Wy +��PK +� �(V|w22'oracle/xml/parser/v2/XSLCondition.class����-�`����������������������� +> +> +> + ? +@ A B + C +D + +E + F +G +H +I J + +K + L + +M + N + O + P +Q + +R S +T +U +V +W +X Y Z +[ \ +] +] +^ _ to s �n �~ �w �j �m �k �e �g �d �c �a �b �i �b �b �f �b �g �g �h �q �q �q �l �p �z �r �r �y �q �m �{()I()Ljava/lang/String;!()Loracle/xml/parser/v2/XMLError; ()Loracle/xml/parser/v2/XMLNode;()Lorg/w3c/dom/NodeList;()S()Z(I)Lorg/w3c/dom/Node;9(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/Object;)Z&(Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/String;)V(Ljava/lang/String;I)VV(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/XSLExprInt;H(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)V!(Loracle/xml/parser/v2/XMLNode;)V%(Loracle/xml/parser/v2/XSLTContext;)V%(Loracle/xml/parser/v2/XSLTContext;)Z'(Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node;Code +ExceptionsILineNumberTable!Loracle/xml/parser/v2/XSLExprInt;$Loracle/xml/parser/v2/XSLStylesheet;Lorg/w3c/dom/NodeList; +SourceFileXSLCondition.javaZ appendChildchoosecreateBooleanExprdeferredTransform elementTypeequalserror getAttribute +getChildNodes getDebugFlag getDebugNodegetError getLength getLocalName getMessage2 getNamespace getNodeName getNodeType$http://www.w3.org/1999/XSL/TransformifinternisForwardCompatibilityModeisWhiteSpaceNodeitemjava/lang/Stringoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNodeoracle/xml/parser/v2/XMLText!oracle/xml/parser/v2/XSLCondition!oracle/xml/parser/v2/XSLConstants!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBaseoracle/xml/parser/v2/XSLExprIntoracle/xml/parser/v2/XSLNode%oracle/xml/parser/v2/XSLOtherElements"oracle/xml/parser/v2/XSLStylesheet oracle/xml/parser/v2/XSLTContextorg/w3c/dom/Nodeorg/w3c/dom/NodeList otherwise +processActionprocessAttributesprocessChildrenprocessSpaceAttr setDebugNode +stylesheettesttestBooleanExpr +testConditiontestExprtransformChildrentransformMiscElementswarningwhen xml:space xmlchildren �~�ytou�E*+,�*�+�(�*�*��&*�*�*�"�-N-� *-+��9�x2 @ BDEB!I&J+L5M;ND=v�quo +�M+�$� ++�%M+*�5*�(N-�^*�#:�'666 �< �0�:�(:�+�8�6+�1��Y�  ��çL-� -�*�� +*�*+�:*+�3�'-�!*+�8�*�� +*�*+�:*+�3+�$�+,�5�x�#TU WX[\^$_-b0e6gDiKkRm[p^tdwixlev\y{�}������{�����������������Rv�qu9*+�2*�"M*,�-�4�x�� ��v�ruw;*�9�,+�%M+*�5*�6+�&�*�+�)�!+,�5*�9+�7�x* +�� ���"�%�(�+�0�v�qu- +*��*+�;�x�� �v�qu? S*�=�'=N::::66 6 +��*�= +�0� N-�,�-� +�/�ק�-�,��-� +:�(:�*:� ���% �x6�Y*�6�:*�W���*�O �J6 �Y*�6�:*�W�W*�6�.�#�Y*�6�:+�;*�W�-+�%: +-�5++�&-�+*�+�)�<+ �5� + +���.+�%: +-�5*�6+�&�-�+�)�!+ �5�x�6� +� �������$�3�;�E�H�P�V�]�d�n�u�z�}���������������������������������� +� +����"�'�-�2�?�C�F�I�L�R�v|}PK +� �(x��"  'oracle/xml/parser/v2/XSLConstants.class����-����������zOPQRSTUVWX��������������������������������������������������������������?�##default%‰,-.01.0; +APPLY_IMPORTSAPPLY_TEMPLATES ATTRIBUTE +ATTRIBUTE_SET +CALL_TEMPLATECHOOSECOMMENTCOPYCOPY_OF +ConstantValueDDECIMAL_FORMATDECIMAL_SEPARATORDEFAULT_DECIMAL_SEPARATOR +DEFAULT_DIGITDEFAULT_GROUP_SEPARATORDEFAULT_INFINITYDEFAULT_MINUS_SIGN DEFAULT_NANDEFAULT_PATTERN_SEPARATORDEFAULT_PERCENTDEFAULT_PER_MILLEDEFAULT_PREFIXDEFAULT_ZERO_DIGITDIGIT +DISABLEOUTESCELEMENTEXCLUDE_RESULT_PREFIXESFFALLBACKFOR_EACHGROUP_SEPARATORHREFIIFIMPORTINCLUDEINFINITYInfinityKEYLOCALELineNumberTableLjava/lang/String;MATCHMESSAGE +MINUS_SIGNNAMENAMESPACE_ALIASNANNEGINFPRIORITYNODE_SETNUMBERNaN ORACLE_NAME +ORACLE_URL OTHERWISEOUTPUTOracle Corporation.PARAMPATTERN_SEPARATORPERCENT PER_MILLEPIPRESERVE_SPACE +RESULT_PREFIX RESULT_ROOTSORT STRIP_SPACESTYLESHEET_PREFIX +SourceFileTEMPLATETEMPLATE_INDEX_CALLTEMPLATETEMPLATE_INDEX_NULLTEXTUSEUSE_ATTRIBUTE_SETSVALUE_OFVARIABLEWHEN +WITH_PARAMXSLConstants.java XSLEXTFUNCNS XSLNAMESPACEXSLT_SPEC_VERSIONXSLT_SPEC_VERSION_NUMBERXSL_ROOT +ZERO_DIGIT +apply-importsapply-templates attribute +attribute-set +call-templatechoosecommentcopycopy-ofdecimal-formatdecimal-separatordigitdisable-output-escapingelementexclude-result-prefixesfallbackfor-eachgrouping-separatorhrefhttp://www.oracle.com)http://www.oracle.com/XSL/Transform/java/$http://www.w3.org/1999/XSL/Transformifimportincludeinfinityjava/lang/Objectkeylocalematchmessage +minus-signnamenamespace-aliasnode-setnumber!oracle/xml/parser/v2/XSLConstants otherwiseoutputparampattern-separator per-millepercentpreserve-spaceprocessing-instructionresult +result-prefixrootsort strip-spacestylesheet-prefixtemplatetextuseuse-attribute-setsvalue-ofvariablewhen +with-param +zero-digitLKLZ�b��bB]�bY�bw�b!��bFa�b��b3^�b{�b'��bC��b;_�bs�b[�b\�b��bE��bD��b-`�b|�b(}�b)v�b ��bG��b+��b.��b,��b5��b1t�bd�be�bx�b"~�b*��b/��b��b9��b8��bJq�b��b7f�b +h�bi�bj�b k�bm�bn�bp�b g�bl�b +��b6��b?��bI��bH��b4��b2��b0r�by�b#��bA��b=o�b��b>��b<�ub��b@��b:��b&��b%��b �cbM��b��b$�zb�zb��PK +� �(���� +� +%oracle/xml/parser/v2/XSLContext.class����-s\]^_`abcde + +! +! + " +# $ % & ' +( +) * + , - +. +/ +0 1 2 3 C8 C: C@ N< OG PI QH RJ S9 T; W5 X5 ZM [F j= n: o4 pG qG rG()I()Ljava/lang/String; ()Loracle/xml/parser/v2/XMLNode;$()Loracle/xml/parser/v2/XSLNodeList;()V(I)Ljava/lang/Object;(I)V&(Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/Object;)V8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;B(Loracle/xml/parser/v2/NSName;)Loracle/xml/parser/v2/XSLExprValue;C(Loracle/xml/parser/v2/NSName;Loracle/xml/parser/v2/XSLExprValue;)V%(Loracle/xml/parser/v2/XSLNodeList;)V(Lorg/w3c/dom/Node;)V(Z)VCodeLineNumberTableLjava/util/Hashtable;!Loracle/xml/parser/v2/FastVector;Loracle/xml/parser/v2/XMLNode;!Loracle/xml/parser/v2/XSLContext;"Loracle/xml/parser/v2/XSLNodeList; +SourceFileXSLContext.javaZ +addElementcontextscurrentContext currentNodecurrentNodeList elementAtgetgetCurrentNodegetCurrentNodeList getLocalName getNamespace getVariable +globalContextglobalVariablesjava/lang/Objectjava/lang/Stringjava/util/Hashtableoracle/xml/parser/v2/FastVectororacle/xml/parser/v2/NSName!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLConstantsoracle/xml/parser/v2/XSLContext!oracle/xml/parser/v2/XSLExprValuepopCurrentNodeList popVariablepushCurrentNodeList pushVariableputresetsetCurrentNodesetGlobalContextsetSizesizevarNames varNamespace varValues!  OGZMPIRJQHpGqGrG[F C8DK*� *�*�Y� +�*�Y� +�*�Y� +�*�Y� +�*�Y� ��E"(� *+#,0-=.J(C@D3*� *�*+��E1� 31U6D *���ERV7D *���EWY>D�a+�M+�N*��6d6�3*���,� *���-�*��� +������*�+�� +�E& abcd f0g@hMdUjf8De1*��<��*���**�d�� ��*��E"BC DEF(E+H0@g:DQ%*��=d=*��*��*���E�� ���$�h@D;� Y+�M*,�*�,��E; <=9i?De5*��*�+,�W�*�+��*�+��*�,��Ertuxy,z4pk8DR&*��*��*��*��*��E���� �%�lAD( *�+���E +M KmBD"*��E +\ZKLPK +� �(�c��CC"oracle/xml/parser/v2/XSLCopy.class����-�}������������������������ +N +O P +Q +R S T +U + V + W +X +Y +Z +[ +\ +] +^ +_ + +` + a +a +b + c +c +d d +e + f +f +g + h +h +i +j + k +l +m + +n + o +p +q +r +s +t +u +v +w +x +y +z +{ +| �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �~ �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � �� �� �� �� �� �� �� �� �� �� ��()I()Ljava/lang/Object;()Ljava/lang/String;()Ljava/util/Enumeration;()Ljava/util/Hashtable;!()Loracle/xml/parser/v2/XMLError; ()Loracle/xml/parser/v2/XMLNode;(()Loracle/xml/parser/v2/XSLEventHandler;()Lorg/w3c/dom/Node;()S()V()Z(I)Lorg/w3c/dom/Node;9(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;&(Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/Object;)Z&(Ljava/lang/String;)Ljava/lang/String;&(Ljava/lang/String;)Lorg/w3c/dom/Attr;(Ljava/lang/String;)V(Ljava/lang/String;)Z(Ljava/lang/String;I)V'(Ljava/lang/String;Ljava/lang/String;)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VK(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V(Ljava/lang/String;Z)VH(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)V!(Loracle/xml/parser/v2/XMLNode;)V%(Loracle/xml/parser/v2/XSLTContext;)V(Z)VCode +ExceptionsILineNumberTableLjava/lang/String;"Loracle/xml/parser/v2/XMLAttrList; +SourceFile XSLCopy.java attributeattrlist +characterscomment defNamespacedefault elementType +endElementequalsgetgetAllNamespaceAttrs getAttributegetAttributeNodegetCurrentNode getDebugFlag getDebugNodegetErrorgetEventHandler getLength getLocalName getMessage2 getNamespace getNodeName getNodeType getNodeValue +getParentNode getPrefixgetTexthasMoreElements$http://www.w3/org/XML/1998/namespaceinternisSrcWhiteSpacePreservingisWhiteSpaceNodeitemjava/lang/Stringjava/util/Enumerationjava/util/Hashtablekeys +namespaceAttr nextElementoracle/xml/parser/v2/XMLAttr oracle/xml/parser/v2/XMLAttrList!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNodeoracle/xml/parser/v2/XMLText!oracle/xml/parser/v2/XSLConstantsoracle/xml/parser/v2/XSLCopy$oracle/xml/parser/v2/XSLEventHandler!oracle/xml/parser/v2/XSLExceptionoracle/xml/parser/v2/XSLNode oracle/xml/parser/v2/XSLTContextorg/w3c/dom/Nodepreserve +processActionprocessAttrSetsprocessAttributesprocessChildrenprocessSpaceAttrprocessUseAttrSetsprocessingInstructionresetSrcWhiteSpaceMode setDebugNodesetSrcWhiteSpaceModespace startElementuse-attribute-setswarning xml:spacexmlns ���, *+,�*� ��BC ?���� �+�+M+�'N6-�4��g/������-� :�8���-���,�8�-�0�5��r-�7�*+�C*+�E�^-�:,�9�.�1�L�%:�"�6�]�"� +�K�K�"� +�K�96�&:+�): +��J++�*�/�M+ �J*+�C��,��A�$:�7�@: �# �B� : + +�#� : , + �A �;���*+�E�+�I,�9�.�1�!�V-�:�>�!+�7�3�=�7,�:��*,�:��,-�2-�6�H�,-�6����EHI +K +M@PFQZR]ThUrTuVxX[�\�X�`�b�c�d�b�g�h�j�l�m�l�n�o�n�r�t�u�v�wx w xwy|�%�0�7�<�C�F�R�^�f�p�u�z�~������������������������������F������*+�D*���*��,=:6�g*��?� N+�(�+�):+-�J-�-:-�5�<:� *�G��-�0� *�F+�(� +�J������Z�� � +����+�2�8�=�C�L�S�Y�\�c�l�r�y�������PK +� �(d�~eEE$oracle/xml/parser/v2/XSLCopyOf.class����-�b�������������������� +? + @ + A + B + +C D + E +F + +G +H +I +J +K +L +M N N +O +O +P +P +Q +R +S +T +T +U +V +V +W +X +Y Z [ [ + \ +] + ^ +_ + ` a |w �s �u �p �t � �r �� �y �o �i �k �m �f �g �c �d �d �h �d �l �d �j �d �e �d �d �z �n �q �{ �q �x �r �()I()Ljava/lang/String;,()Loracle/xml/parser/v2/XMLDocumentFragment; ()Loracle/xml/parser/v2/XMLNode;(()Loracle/xml/parser/v2/XSLEventHandler;$()Loracle/xml/parser/v2/XSLNodeList;()Lorg/w3c/dom/NamedNodeMap;()Lorg/w3c/dom/Node;()Lorg/w3c/dom/NodeList;()S()Z(I)Lorg/w3c/dom/Node;&(Ljava/lang/String;)Lorg/w3c/dom/Attr;(Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VK(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VV(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/XSLExprInt;(Ljava/lang/String;Z)VH(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)VI(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;Z)V!(Loracle/xml/parser/v2/XMLNode;)VG(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLEventHandler;)VG(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLExprValue;%(Loracle/xml/parser/v2/XSLTContext;)VCode +ExceptionsILineNumberTable!Loracle/xml/parser/v2/XSLExprInt; +SourceFileXSLCopyOf.java attribute +characterscommentcreateStringExpr elementType +endElementexpgenerateEventsgetAttributeNode +getAttributes +getChildNodes getDebugFlag getDebugNodegetEventHandler getLength getLocalName getNamespace getNodeList getNodeName getNodeType getNodeValue +getParentNode getPrefixgetResultTreeValuegetStringValuegetTextgetValueitem +namespaceAttroracle/xml/parser/v2/XMLAttroracle/xml/parser/v2/XMLDeclPIoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNodeoracle/xml/parser/v2/XMLText!oracle/xml/parser/v2/XSLConstantsoracle/xml/parser/v2/XSLCopyOf$oracle/xml/parser/v2/XSLEventHandler!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstantsoracle/xml/parser/v2/XSLExprInt!oracle/xml/parser/v2/XSLExprValueoracle/xml/parser/v2/XSLNode oracle/xml/parser/v2/XSLTContextorg/w3c/dom/NamedNodeMaporg/w3c/dom/Nodeorg/w3c/dom/NodeList +processActionprocessAttributesprocessingInstructionselect setDebugNode startElementtypexmlns + ��|v}- +*+,�*���12 .~ �y}W+�-�R <�CRRR"8<R<+�N,-�2-�(-�*�=-� :�-�%66�*�7�,�����-�!:�-�&66�*�8�,�����,-�2-�(-�*���+�:�1�,�'�.�9�f�'�,�.�9�N,�1�'�)�.��3+��,,+�,+�/�;�,+�/��,+��5�����*h@qErNsRrUu[v`xiyoz�y�}�~��������������������������������� �� �#�&�-�9�<�D�G�S�Ve~ �{}N�M+�"� ++�#M+*�<+�$N*�+�6:�>��>�+:�&�V�8�:�- �?�0�7�!:�-�>���3:�!:��4:-���&66�*�8�-�����+�"�+,�<��r78 :;>?$B.D5G@IMJWK_LfBiOsQzR�O�V�W�X�\�^�_�^�a�b�5~ �{}�H*+�:MN*��:� �.N+�"�+�#M+�<*-*��+�"�+,�<��6 +��� +��� �'�,�2�;�B�G�~ ��PK +� �(�K�ll-oracle/xml/parser/v2/XSLDocumentBuilder.class����- + +  +      ,()Loracle/xml/parser/v2/XMLDocumentFragment;()VCodeILineNumberTable*Loracle/xml/parser/v2/XMLDocumentFragment; +SourceFileXSLDocumentBuilder.java[Loracle/xml/parser/v2/XMLNode; +currentParentgetResultFragment$oracle/xml/parser/v2/DocumentBuilder(oracle/xml/parser/v2/XMLDocumentFragment'oracle/xml/parser/v2/XSLDocumentBuilderparentsresult!Q)*�*�*�Y��*�*Y�`Z�*�S�+) -/(+ +*��4PK +� �(��� + +%oracle/xml/parser/v2/XSLElement.class����-�W��������������������� +7 8 9 : +; +< + = +> +? +@ +A +B + C +D + E +F +G +H + I +J K L +M +N +O +P +Q + R +S +T +U V kg vq wp xn ye zc {a |j }] ~[ Z �\ �X �Y �_ �Y �Y �Y �^ �d �p �u �i �i �i �b �b �` �h �f �e �r()I()Ljava/lang/String;!()Loracle/xml/parser/v2/XMLError; ()Loracle/xml/parser/v2/XMLNode;(()Loracle/xml/parser/v2/XSLEventHandler;()Z(I)Lorg/w3c/dom/Node;'(ILjava/lang/String;)Ljava/lang/String;&(Ljava/lang/String;)Ljava/lang/String;&(Ljava/lang/String;)Lorg/w3c/dom/Attr;(Ljava/lang/String;)V(Ljava/lang/String;I)V'(Ljava/lang/String;Ljava/lang/String;)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V((Ljava/lang/String;[Ljava/lang/String;)VH(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)V!(Loracle/xml/parser/v2/XMLNode;)V%(Loracle/xml/parser/v2/XSLTContext;)Vi(Loracle/xml/parser/v2/XSLTContext;Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Ljava/lang/String;Code +ExceptionsILineNumberTableLjava/lang/String;"Loracle/xml/parser/v2/XMLAttrList;$Loracle/xml/parser/v2/XSLStylesheet; +SourceFileXSLElement.javaZattrlist elemNameVal elementType +endElementerrorgetAttributeNodegetAttributeTemplateValue getDebugFlag getDebugNodegetErrorgetEventHandler getLength getLocalName getMessage1 getNamespace getNodeValue$http://www.w3/org/XML/1998/namespaceinternitemjava/lang/Stringname namespace +namespaceAttrnsAttr nsAttrFoundoracle/xml/parser/v2/XMLAttr oracle/xml/parser/v2/XMLAttrList!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLConstantsoracle/xml/parser/v2/XSLElement$oracle/xml/parser/v2/XSLEventHandler!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase!oracle/xml/parser/v2/XSLExprValueoracle/xml/parser/v2/XSLNode"oracle/xml/parser/v2/XSLStylesheet oracle/xml/parser/v2/XSLTContext +processActionprocessAttrSetsprocessAttributesprocessChildrenprocessSpaceAttrprocessUseAttrSetsresolveNamespacePrefix setDebugNodespace +splitQname startElement +stylesheetuse-attribute-sets �p�uwpkgl, *+,�*��oVW Sm�il�  M+�� ++� M+*�3+�"N+*�*�:�::�42��6*�,���*�,�+*�+*�:�(:�N*2�2:��8*�: +� : ++ � +�3*�6+�!�2�%�+ +�3-22�5-2�*�-�5-�**+�-*+�/-22�+��+,�3�o�%\] _`cf!e#h)i-k4lDvP~W�`�b�i~l�v��������������������v�������������Zm�il6�*+�.*���*��#=:6��*��)�N+��+� :+-�3-�$:-�'�(:� *��>�*�+*�,�)� *�1��-�&� *�0+�� +�3���t�ov�� � +����+�2�8�=�C�L�S�Y�\�c�i�n�q�x�~���������������mstPK +� �(�_��"'"'*oracle/xml/parser/v2/XSLEventHandler.class����-��������� K�OPQRS\]^_`abcdefghij +� +� + � +"� +� +)� +!� +� +"� + � +� +� +� (� (� +(� (� ,� (� +(� $� (� (� (� (� + � +(� +(� $� +(� +(� +� (� ++� +� +&� +(� ++� ++� ++� +"� +&� +-� +%� +%� +%� +&� +(� +� +*� +� +� !� "� !� "� (� (� (� � !� (� (� +� ,� !� +(� +"� +(� +*� +(� + � + � (� +(� +(� $� +(� +(� +(� (� +� +� "� (� �� �� �� �� �� "� #� $� $� %� & ' (� ) *� + ,� -� . / 0 1 2� 3� 4� 5� 6� 7� 8� 9 :� <� =� >� ?� @� A� B� C� D� E� F� G� H� J� L� M� N� T� V V! W W! Y Z [ k + l m n o� p� q r� s� t� u� v� x� x y� z� {� |� }� ~�  �� �� �! �()I()Ljava/lang/String;+()Loracle/xml/parser/v2/XMLDocumentHandler;!()Loracle/xml/parser/v2/XMLError; ()Loracle/xml/parser/v2/XMLNode;()V()Z(I)Ljava/lang/Object;(I)Ljava/lang/String;(I)Ljava/lang/StringBuffer;(I)V(II[CI)V'(ILjava/lang/String;)Ljava/lang/String;9(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;&(Ljava/lang/Object;)Ljava/lang/String;(Ljava/lang/Object;)V*(Ljava/lang/Object;ILjava/lang/Object;II)V(Ljava/lang/String;)I,(Ljava/lang/String;)Ljava/lang/StringBuffer;(Ljava/lang/String;)V(Ljava/lang/String;)Z(Ljava/lang/String;I)V'(Ljava/lang/String;Ljava/lang/String;)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VK(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V_(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/String;)VZ(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/NSNameImpl;)V(Ljava/lang/String;Z)V (Loracle/xml/parser/v2/NSName;)VB(Loracle/xml/parser/v2/NSName;Loracle/xml/parser/v2/SAXAttrList;)V,(Loracle/xml/parser/v2/XMLDocumentHandler;)VN(Loracle/xml/parser/v2/XMLDocumentHandler;Loracle/xml/parser/v2/XSLTContext;)V(Z)V([CII)V([CIIZ)V , Column ---:: >?> ATTRIBUTE Attribute CHAR_DATACOMMENTCodeComment +ConstantValueELEMENTElement +ExceptionsILineNumberTableLjava/io/PrintStream;Ljava/lang/String;!Loracle/xml/parser/v2/FastVector;!Loracle/xml/parser/v2/NSNameImpl;"Loracle/xml/parser/v2/SAXAttrList;)Loracle/xml/parser/v2/XMLDocumentHandler;Loracle/xml/parser/v2/XMLError;"Loracle/xml/parser/v2/XSLTContext;MESSAGEMessage Message: NONEPI +START_ELEMENTSTR_DATA +SourceFile +Start elementXSLEventHandler.java[C[I[Ljava/lang/String;addAttr +addElementappend arraycopyattrListattrName attributecharData +characterscharlencheckAttributecommentcontextcurrentDataType currentStateelemName elementAt endAttribute +endComment +endElement +endMessageendProcessingInstructionendsWitherrerror flushEventsgetCharsgetColumnNumbergetData getDebugFlag getDebugNodegetError getLength +getLineNumber +getMessage getMessage0 getMessage1 getMessage2 getSystemId +getXMLHandlergrowNamespaceStack$http://www.w3/org/XML/1998/namespaceindexOfinitinternjava/io/PrintStreamjava/lang/Objectjava/lang/Stringjava/lang/StringBufferjava/lang/Systemlengthmessagename namespace +namespaceAttr +namespaceVectnspIndexnspStackoracle/xml/parser/v2/AttrDecloracle/xml/parser/v2/FastVectororacle/xml/parser/v2/NSNameImpl oracle/xml/parser/v2/SAXAttrList!oracle/xml/parser/v2/XMLConstants'oracle/xml/parser/v2/XMLDocumentHandleroracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLConstants$oracle/xml/parser/v2/XSLEventHandler!oracle/xml/parser/v2/XSLException&oracle/xml/parser/v2/XSLSAXPrintDriver oracle/xml/parser/v2/XSLTContextorg/xml/sax/DocumentHandlerorg/xml/sax/SAXExceptionoutprefix +prefixVect +previousStateprintlnprocessingInstructionqnamereportStartElementresetsetDisableOutEsc setNSNamesetSize +setXMLHandlersizestartAttribute startComment startElement startMessagestartProcessingInstruction +stateToStringstrDatatoStringvalueOfvalues +xmlHandlerxmlns!('�.91'&)x + / 0 n mY[ Z          ���f*�.*�g*+��*,�C*,�U�N*� Y�0�k*� Y�0�f*� +�h*���*�*���*�_�N�)Y-�X�3�*�r�=QT- B\J _`ac(d5f=h=lGmQhToUqate\ +)(�T$*�E��*+,-�x*�~*�D*+,-�H� S T +UVWX#Q +)*�T*�E� *�p*�E*�E�P+�a>���:+�P*���*�*���*�s*���?�:�)Y�X�3��*�D��r'*+�~*�D��*�~�a>*�w�+*Y�wh�w**�w��*�w�w**�w��>*�~*�>�P*�@*�D+�a6*�@`6*�w�@*Y�wh�w**�w��*�w�w*�w�:*�>*�@�:*�>+*�>*�@�P*Y�@`�@��FSV- �)AC DGLN"O#Q(R1T;UFVFXSVVZX\e^fa�d�e�f�h�i�k�l�m�o�p�r�s�t�u�wxy!z0{6}E~PS? +)*�0t*�E� *�p*�E*�E�8*���*�*���*�s*��+�?�:�)Y�X�3��*�D�!�b*�D*�w�+*Y�wh�w**�w��*�w�w**�w��>+*�>�:*�@��*�~�a6*�w�-*Y�wh�w**�w��*�w�w**�w��>*�~*�>�P*�@*�D*�@`6*�w�@*Y�wh�w**�w��*�w�w*�w�:*�>*�@�:*�>+*�>*�@�:*Y�@`�@��/;>- �(�� ���#�/�/�;�>�@�M�N�l�q�y�������������������������� +���%�;�C�R�X�f�p�s� +),��X*�;�V<=�G*�;�c2�`*�<�b�`�+*�;�e2�`*�<�d�`�*�;��*�RS������ "�� +�&�?�L�N�V�-�M*�E��*�y*+�~*�D*�I� � � +����� +)3��c*�E�5*�E��*�C�Y*�Nl�Y���2*�E�8�l�O*�E*�A�*�;+,*�<�o*�R-�6*�D� . dfgi:l?oFpSqZp]sbb +)4���*�E�5*�E��*�C�Y*�Nl�Y���2*�E�8�l�O*�E*�RL+ �^�&+ +�M�*��+�B�%M�)Y,�X�3�*�C*�N�+�Z��O�Wad- :����:�?�D�W�W�a�d�e�q��� +)5��*�E� +*�p�=*�E��*�E�+*�C�Y*�Nl�Y���2*�E�8�l�O*Y�gd�g*�k*�h*�g.�u*�f*�h*�g.�u*�E*+,-*�F�t*��*�F�J�:�)Y�X�3�����- J ! I#S$c%s'x(�)�+�)�-�/� +)6�H�*�E�+*�C�Y*�Nl�Y���2*�E�8�l�O**�l�E*�RL*�C�S��*�C�TYM�x�Y�/N,�\:,�W6,�Q6� +-�9W�7�2-�Y�2�8 �9�8�9��9W- +�9W�� +- +�9W�i-��m�i�Y�2+�9��m� V 19>"H#T%\&b'h(n*s+z-�/�0�-�2�3�4�6� +)7��*�E�5*�E��*�C�Y*�Nl�Y���2*�E�8�l�O*�E*�RM,�^�*��+,�n�%N�)Y-�X�3�*�C*�N�,�Z�O�NY\- :����:�?�D�N�N�Y�\�]�i�~� +);�� � +)>�d0L*�D� *�~L��Y*�>*�@�5L*�D*�@+� "�� ���$�)�.�I�*��� �J�E*�h�<h� +M*�h,�:*,�h� �� ���U�;*�{*+�~*�D*�K�   +  + +)X��x*�k�v>6d6�**�k�G�+�6*�f�G�,� ������*�k+�7*�f,�7+�� ,�*+,�=� +*+,�=� R�� ��#�&�6�7�?�G�O�U�`�d�g�j�m�q�t�w� +)p�O*�E��*+�|*,�~*�D*+�L� � � +����� +)r�a)*��*�F*�;�z*�;�q�L�)Y+�X�3��- ������(� +)s��g*�k�u*�f�u*�g*�D*�E*�!Y�4�F*�!Y�4�<*�"Y�1�;*�w*��>*�@� 2 ������2�E�Q�X�a�f�u�vB+�j,�b+��b�o��Y+���2 �9,�9��o-�d� "�� ����;�A�w�"*+��� +}{y��D*�E�.*�E��*�C*�N*�}**�E�}�[�O*�E*+,-*�<�t� . <>?A"B*A-B0A3E8FC: +)z��H*�E� +*�p�6*�E��*�E�$*�C*�N*�}**�E�}�[�O*�E� 6 +�� ����!�1�9�<�?�B�G� +){��z*�E� +*�p�6*�E��*�E�$*�C*�N*�}**�E�}�[�O*�g*�h��*�]*�h*Y�gZ`�g*�k�vO*�E*+,-*�F�t� F !19<?B N +R iny� +)|�C*�E�*�p**�E�l*�E� � � +)}��H*�E� +*�p�6*�E��*�E�$*�C*�N*�}**�E�}�[�O*�E� 6 +}~ }��!�1�9�<�?�B�G{ +)~�q=�9'*-036������� "�(�+�.�1�4�7�:�PK +� �(@����'oracle/xml/parser/v2/XSLException.class����- +  + (Ljava/lang/String;)VCodeLineNumberTable +SourceFileXSLException.javajava/lang/Exception!oracle/xml/parser/v2/XSLException!"*+�� +&$  +PK +� �(�!����"oracle/xml/parser/v2/XSLExpr.class����-D:;<=>?@A + + + +   + +  + + + +! +# +* 3% 4. 50 6$ 7( 80 9" B& B' C)()I()V()Z%(Loracle/xml/parser/v2/XSLExprBase;)VI(Loracle/xml/parser/v2/XSLParseString;)Loracle/xml/parser/v2/XSLExprBase;J(Loracle/xml/parser/v2/XSLParseString;Z)Loracle/xml/parser/v2/XSLExprBase;G(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLExprValue;&(Z)Loracle/xml/parser/v2/XSLExprValue;(Z)VCode +ExceptionsILineNumberTable"Loracle/xml/parser/v2/XSLExprBase; +SourceFile XSLExpr.java +addElement classtype firstExprgetBooleanValuegetValuenextExpr nextTokenoracle/xml/parser/v2/AndExproracle/xml/parser/v2/UnaryExpr!oracle/xml/parser/v2/XSLExceptionoracle/xml/parser/v2/XSLExpr oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue#oracle/xml/parser/v2/XSLParseStringparsesetBooleanValue +#,*� +�/*7(,u5*�MN�,+�N-�� -��,�M,���-� �Y� N-�/. RSU +WXY["U&]*^3`-B&,*��/.-B',�D�*�W*�N*� +�-�Y� M,-� �*�W*�N,-� *� +���,N-�/6 +45 +;=? @%B(D-E2F7B@HBK-12PK +� �(����&oracle/xml/parser/v2/XSLExprBase.class����-�Pv�������������� +1 +2 +3 +4 +5 +6 +7 +8 +9 : ; + < += + > + ? + @ + A + B C +D E F G H +I + +I + +J K L M N +O qV qZ q\ q^ qb qm qn qo ~] �u �y �W �[ �U �Q �T �h �i �y �S �u �y �x �u �e �f �u �y �t �| �X()D()F()I()Ljava/lang/String;$()Loracle/xml/parser/v2/XSLNodeList;()V()Z()[C(F)V(I)V(II[CI)V(ILjava/lang/String;)V*(Ljava/lang/Object;ILjava/lang/Object;II)V(Ljava/lang/String;)VV(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/XSLExprInt;Y(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/XSLNodeSetInt;Y(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/XSLPatternInt;6(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Vg(Loracle/xml/parser/v2/XMLNode;FLoracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLPatternInt;%(Loracle/xml/parser/v2/XSLExprBase;)VJ(Loracle/xml/parser/v2/XSLParseString;Z)Loracle/xml/parser/v2/XSLExprBase;K(Loracle/xml/parser/v2/XSLParseString;ZZ)Loracle/xml/parser/v2/XSLExprBase;%(Loracle/xml/parser/v2/XSLTContext;)D6(Loracle/xml/parser/v2/XSLTContext;)Ljava/lang/String;G(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLExprValue;:(Loracle/xml/parser/v2/XSLTContext;)Lorg/w3c/dom/NodeList;%(Loracle/xml/parser/v2/XSLTContext;)Zi(Loracle/xml/parser/v2/XSLTContext;Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Ljava/lang/String;([C)V([CII)V'([CILoracle/xml/parser/v2/NSResolver;)V([Ljava/lang/String;)VCode +ExceptionsFIInternal ErrorLineNumberTable!Loracle/xml/parser/v2/NSResolver;"Loracle/xml/parser/v2/XSLExprBase; +SourceFileXSLExprBase.java[C +addElement arraycopycreateBooleanExprcreateNodeSetExpr +createPatterncreateStringExprexprType firstExpr +getAnchorName +getAnchorTypegetAttributeTemplateValuegetBooleanValuegetChars getNodeListgetNumberValue getOperator getPrioritygetSelectedNodesgetStringValuegetValuejava/lang/Objectjava/lang/Stringjava/lang/SystemlastExprlength lookahead matchPatternnextExprnsroperator#oracle/xml/parser/v2/XPathException!oracle/xml/parser/v2/XSLExceptionoracle/xml/parser/v2/XSLExpr oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstantsoracle/xml/parser/v2/XSLExprInt!oracle/xml/parser/v2/XSLExprValue#oracle/xml/parser/v2/XSLNodeSetExpr"oracle/xml/parser/v2/XSLNodeSetInt#oracle/xml/parser/v2/XSLParseString"oracle/xml/parser/v2/XSLPatternIntparseposprevExprpriority setOperator setPrioritystrtestBooleanExpr toCharArray!  + �y�y�y�y�u�u�x�tqVrO*�*�*�#*�&*�-*���w6: ;>?G6}dr^**��*+�*+�#�+*�#�-*�#+�&*+�#�w"Z\ ]Zab$c)Xs _rzF*��Y���Y*+�M,�)N,�%��Y�Y,�/���-+�'-�w"����!�)�?�D�s �`rzF*��Y���Y*+�M,�*N,�%��Y�Y,�/���-+�'-�w"xyz{!|)}?D�s �ar{G*��Y���Y*+�M,�+N,�%��Y�Y,�/���-+�'-�w"����"�*�@�E�s �_rzF*��Y���Y*+�M,�)N,�%��Y�Y,�/���-+�'-�w"����!�)�?�D�s�pr�w>s�Sr�w9s �lr�+�0N+�$666���:��-4U-4{���-4{���Y-,�:  �): + +,�' �%}��Y�� +*�!:  �$6   �,dd6 + +�:� +`�:�  � `6 �,6�)-4}��-4}��Y������1�Y��w�$�� ������"�+�4�7�@�M�U�[�e�p�x����������������������������������s�gr! *+�"��w's�Sr*�(�wqs�Rr*�.�w4s�jr' *+�"M,��w +��s�hr! *+�"� �w!s�ir�ws�cr" +�Y��w/s�Zr"*�(�w +ljs�Yr# �Yl��wCs�kr! *+�"��wsz{PK +� �(�n]���+oracle/xml/parser/v2/XSLExprConstants.class����-%������������������������������������"'()*+,-./<=>@[]��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������{|}���������������������������������������������������i���h���g���f���e���d���8���7?���!"#$ +�� �� �� �� �� � � �()V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V +ADDITIONOPANCESTORANCESTORORSELFANDOPASTERISKAT +ATTRNSSTAR ATTRQNAMEATTRSTARAXISNAME BOOLEANFN BOOLEANVALUE CEILINGFNCOMMACOMMENT COMMENTFNCONCATFN +CONTAINSFNCOUNTFN CURRENTFNCode +ConstantValueDEFNEGPRIORITYDEFNSSTARPRIORITYDEFPOSPRIORITYDEFZEROPRIORITYDIVOP +DOCUMENTFNDOLLARDOTDOTDOT DOUBLEQUOTE DOUBLESLASHEOFEQUAL +EXPRFILTEREXTELEMENTAVAILABLEFNEXTENSIONFUNCTIONEXTENSIONVALUEEXTFUNCTIONAVAILABLEFNFFALSEFN +FIRSTOFANY FIRSTOFTYPEFLOORFNFORMATNUMBERFNFROMANCESTORFNFROMANCESTORORSELFFNFROMATTRIBUTESFNFROMCHILDRENFNFROMDESCENDANTSFNFROMFOLLOWINGFNFROMFOLLOWINGSIBLINGSGN FROMPARENTFNFROMPRECEDINGFNFROMPRECEDINGSIBLINGSFNFROMSDESCENDANTSORSELFFN +FROMSELFFN FUNCTIONNAME GENERATEIDFN GREATERTHANGREATERTHANEQUALIIDIDFNIDLITFNKEYFNKEYLITFNLANGFNLASTFN LASTOFANY +LASTOFTYPELEFTCURLYBRACES LEFTPARENLEFTSQBLESSTHAN +LESSTHANEQUALLITERAL LOCALNAMEFNLineNumberTableLjava/lang/String;Loracle/xml/parser/v2/NSName; MINUSSIGNMODOPMULTIPLICATIVEOPNAMESPACEURIFNNODEFN NODESETVALUE NORMALIZEFN NOSEPARATORNOTEQUALNOTFNNOTOPNSSTARNUMBERNUMBERFN NUMBERVALUEOROROPPIPIFNPLUSSIGN +POSITIONFNQNAMEQNAMEFNQUOTE RELATIONALOPRESULTTREEVALUERIGHTCURLYBRACES +RIGHTPARENRIGHTSQBROUNDFNSLASH STARTSWITHFNSTRINGFNSTRINGLENGTHFN STRINGVALUESUBSTRINGAFTERFNSUBSTRINGBEFOREFN SUBSTRINGFNSUMFNSYSTEMPROPERTYFN +SourceFileTEXTTEXTFN TRANSLATEFNTRUEFN UNDEFINEDUNPARSEDENTITYURIFNVARREFXSLEXTCONSTRUCTORXSLExprConstants.java XSLVENDORXSLVENDORNSNAME XSLVENDORURLXSLVENDORURLNSNAME +XSLVERSIONXSLVERSIONNSNAME$http://www.w3.org/1999/XSL/Transformjava/lang/Objectnegoneneworacle/xml/parser/v2/NSNameImpl!oracle/xml/parser/v2/XSLConstants%oracle/xml/parser/v2/XSLExprConstantsvendor +vendor-urlversionxsl��������`�������������� ��� ������ +������������������������_���a����������������� �������������� ��� +������������������ ���!���"���#���$���%���&���'���(���)���*���+���,���-���.���/���0���1���2 ��3���4���5���6���7���8���9���:���;���<���=���>���?���@���A���B���C���D���E���F���G���H���I���J���K���L���M���N���O���P���Q���R���S���T��U��V��W���X��Y��Z���[ +��\���]���^��b��c ��d���e���f��g���h��i���j���k���l���m���n��o���p���q���r���s���t��u���x���y���v���w��~��|��}�����{���m1��Y~z������Y|z������Y}z������* +�� +���� �&�*�0' +PK +� �( g�!!%oracle/xml/parser/v2/XSLExprInt.class����-%(Loracle/xml/parser/v2/XSLTContext;)D6(Loracle/xml/parser/v2/XSLTContext;)Ljava/lang/String;G(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLExprValue;%(Loracle/xml/parser/v2/XSLTContext;)ZCode +ExceptionsLineNumberTable +SourceFileXSLExprInt.javagetNumberValuegetStringValuegetValuejava/lang/Object!oracle/xml/parser/v2/XSLExceptionoracle/xml/parser/v2/XSLExprInttestBooleanExpr +      PK +� �(D����;�;'oracle/xml/parser/v2/XSLExprValue.class����-��&7EHIkqrstuv��������wxyz{|}~������������������� +"� +� +� +0� +� +.� +� +$� +.� +0� +'� +0� +0� +1� +� +0� +#� +&� +1� +$� +� 0� +#� +)� +,� +0� +0� +0� +#� 0� -� +� + � +#� +� +0� +0� +,� +0� +-� +"� +0� +,� +-� +*� +1� 3� +%� +� +0� +-� +0� +-� +-� +0� +)� +-� +0� +0� +-� +0� +-� +#� +1� +#� +� +� +� +*� +1� 3� +#� +0� +0� 0� 0� 0� (� 0� +� +0� 0� +#� +� +� +$� +1� 0�� � � � � �       3� 4 5� 8� 92 :� ;� > ?� @� A� B2 D% F� G� J� L L M� N� O� Q� S U� V� W� X� Y� Z [� \� ]� _� `� a� b� c� d� e� f� g� h� j l� m� n� o� p� �� � � �+ �# �( �� �* �� � �) �� �� �� �%()D()I()Ljava/lang/Class;()Ljava/lang/String;,()Loracle/xml/parser/v2/XMLDocumentFragment;#()Loracle/xml/parser/v2/XMLElement;$()Loracle/xml/parser/v2/XSLNodeList;()Lorg/w3c/dom/NamedNodeMap;()Lorg/w3c/dom/Node;()Lorg/w3c/dom/NodeList;()S()V()Z()[C(C)Z(D)J&(D)Loracle/xml/parser/v2/XSLExprValue;(D)V(D)Z(DDIZ)Z(I)C(I)I!(I)Loracle/xml/parser/v2/XMLNode;(I)Lorg/w3c/dom/Node;(I)V(ILjava/lang/String;)V%(Ljava/lang/Class;)Ljava/lang/Object;(Ljava/lang/Class;)Z(Ljava/lang/Object;)V(Ljava/lang/Object;)Z(Ljava/lang/String;)I%(Ljava/lang/String;)Ljava/lang/Class;&(Ljava/lang/String;)Ljava/lang/String;,(Ljava/lang/String;)Ljava/lang/StringBuffer;7(Ljava/lang/String;)Loracle/xml/parser/v2/XSLExprValue;*(Ljava/lang/String;)Lorg/w3c/dom/NodeList;(Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)Z)(Ljava/lang/String;Ljava/lang/String;IZ)ZJ(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V6(Ljava/lang/String;Loracle/xml/parser/v2/FastVector;)VV(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/NSNameImpl;((Ljava/lang/String;[Ljava/lang/String;)VO(Loracle/xml/parser/v2/XMLDocumentFragment;)Loracle/xml/parser/v2/XSLExprValue;-(Loracle/xml/parser/v2/XMLDocumentFragment;)V�(Loracle/xml/parser/v2/XMLElement;Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;)Loracle/xml/parser/v2/XSLNodeList;g(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLNodeList;)Loracle/xml/parser/v2/XSLNodeList;>(Loracle/xml/parser/v2/XMLNode;)Loracle/xml/parser/v2/XMLNode;h(Loracle/xml/parser/v2/XMLNode;ILjava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;)Vh(Loracle/xml/parser/v2/XMLNode;Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/XSLNodeList;Z)Vd(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLNodeList;)Loracle/xml/parser/v2/XSLNodeList;C(Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLNodeList;)V&(Loracle/xml/parser/v2/XSLExprValue;)VJ(Loracle/xml/parser/v2/XSLExprValue;Loracle/xml/parser/v2/XSLExprValue;I)DJ(Loracle/xml/parser/v2/XSLExprValue;Loracle/xml/parser/v2/XSLExprValue;I)ZG(Loracle/xml/parser/v2/XSLNodeList;)Loracle/xml/parser/v2/XSLExprValue;%(Loracle/xml/parser/v2/XSLNodeList;)VC(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XMLNode;)IG(Loracle/xml/parser/v2/XSLNodeList;Loracle/xml/parser/v2/XSLNodeList;)V7(Loracle/xml/parser/v2/XSLNodeList;Lorg/w3c/dom/Node;)V(Lorg/w3c/dom/Node;)V(Lorg/w3c/dom/Node;I)V(Lorg/w3c/dom/NodeList;)V&(Z)Loracle/xml/parser/v2/XSLExprValue;(Z)V(ZZIZ)Z([CII)V)*BOOLEANCode +ConstantValueD +ExceptionsIInternal Error.(LineNumberTableLjava/lang/Object;Ljava/lang/String;*Loracle/xml/parser/v2/XMLDocumentFragment;"Loracle/xml/parser/v2/XSLNodeList;NODESETNUMBER +RESULTTREESTRING +SourceFileXSLExprValue.javaZ +addElementaddNodeappend +arithmeticboolean booleanValue boolvaluecharAtcheckNamespace checkTypecomparecompareBoolean +compareDouble +compareString compareTo +constValue convertType +docOrderIddouble doubleValueequalsfalsefloatforName getAncestorgetAttributeList +getAttributesgetBooleanValue +getChildNodesgetChildTypeNodesgetClassgetDescendantAttributeListgetDescendantNodesgetDescendantTypeNodesgetElementsByTagName +getFirstChild getLength +getMessagegetNamegetNextPostOrderNodegetNextSibling getNodeList getNodeNamegetNodePosition getNodeTypegetNumberValuegetOwnerElement +getParentNodegetResultTreeValuegetStringValuegetText +getTypeString +hasChildNodesindexOf +insertList +insertNodeintinternisAssignableFromisNaN isWhitespaceitemjava.lang.Booleanjava.lang.Doublejava.lang.Floatjava.lang.Integerjava.lang.Objectjava.lang.Stringjava/lang/Booleanjava/lang/Characterjava/lang/Classjava/lang/Doublejava/lang/Exceptionjava/lang/Floatjava/lang/Integerjava/lang/Mathjava/lang/Numberjava/lang/NumberFormatExceptionjava/lang/Objectjava/lang/Stringjava/lang/StringBufferjava/lang/Throwablelength mergeList mergeNodenode-setnodelistnormalizeStringnumber numbervalueobject(oracle.xml.parser.v2.XMLDocumentFragment oracle.xml.parser.v2.XMLNodeList oracle.xml.parser.v2.XSLNodeListoracle/xml/parser/v2/FastVectororacle/xml/parser/v2/NSNameImploracle/xml/parser/v2/NSResolveroracle/xml/parser/v2/XMLAttr oracle/xml/parser/v2/XMLAttrList(oracle/xml/parser/v2/XMLDocumentFragmentoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNode#oracle/xml/parser/v2/XPathException%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue oracle/xml/parser/v2/XSLNodeListorg/w3c/dom/Nodeorg/w3c/dom/NodeListresolveNamespacePrefix resolveQnameresult tree fragment +resultTreeroundsetBooleanValue setConstantsetDocumentFragmentValue setNodeListsetNumberValuesetStringValue +splitQnamestring stringvalue toCharArraytoStringtokenizetranslateStringtrue trustedItemtype!0"/ +�%B292�)�+�#�*�( )",)"-)"/)".)"-�!=*�4*�Q*���*'��'YB [\Y$.�!:�*�4*�Q+�+�*���*+�+����+�1�*���*+�1�~�{+�3�*���*�1Y+�3�A�~�\+�#�*���*+�#���D+� �*���*+� �T��)+��*���*+��H�I�*���*+���'vkB mopm!r(t.u6r9w@yFzUwX|_~em|p�w�}����������������k$.�!=*�4*�Q*���*+���'_B ab_$.!=*�4*�Q*���*+���'eB ghe$.!=*�4*�Q*���*+�~�'SB UVS$.!=*�4*�Q*���*�I�'MB OPM$. 6!�[*�jJ+�j9�M����H����C*>+9-4)g�)c�)k�)o�)s��'& YZ \@_EaJcOeTgYj$.<�!��+�dM>*������������x�%%%+�V�u�W+ �V�u�K+ �V�u�?+ +�V�u�3+ +�V�u�', �U�,�U�,�U� ,�U�,>�'+�V�u�o+ �V�u�c+ �V�u�W+ +�V�u�K+ +�V�u�?+�V�u�3+�V�u�', �U�,�U�,�U� ,�U��>��+�V�u�c+ �V�u�W+ �V�u�K+ +�V�u�?+ +�V�u�3+�V�u�', �U�,�U�,�U� ,�U�>>�9+*���\�u�+>�&:�.Y�$Y�;�c�G�G���<����'�1<=?A0F<GHHTI`JlKuL~M�N�O�P�R�S�T�U�V�W�X�Y�Z�[�\�]^ +_`bc*d6eBfNgOhZicjlkul~m�n�q�r�s�v�x�z$. =!� +�*���� +����4*����*N+:6� +N*:6-�g:�a6����������� n��6 �B ���o:6 +� �g +���o�O��� + +�g�a��ل  ����6 �? ���o:9 +�Y�::  �S9 +�W� +�j�N���  �����n: 6 +�! +���o: �O��� + +����-�Z�Z�M���=� ĠQ*���� +����*�Z+�Z�M�*���� +����*�j+�j�N�*�n+�n�O�*�j+�j�N����!'@���� �#�&�(�+�.�4�;�`�f�r�x������������������������������������������������!�+�-�1�9�?�A�C�O�a�i�k�o�������������������$. +>!��� �;�<������F����}����_<Q=;>o�������������������������'. >@A CHFSH^JlL|N�P�R +?�!�������F���������o<R=:>�&(����&(�����(&����&(�����(&����&(�����(&����&(�����(&����&(�����'B< H"T$Y%e'q)v*�,�.�/�1�3�4�6�8 +@�! �������A���������i<I=;>�*+�U�*+�U���*+�P���*+�P����*+�P���*+�P����*+�P���*+�P����*+�P���*+�P����'B�<�BJN\jn | � +������C�!�.+�dM,�U�*�n�, �U� ,�U��Y*�j�6�, �U� ,�U��Y*�j�5�, +�U� , �U��Y*�j��8�, +�U� ,�U��Y*�Z�B�,�U�Z*���S��������NID,'8*�n��Y*�j�5��Y*�Z�B�*�g�*�m�*���*����*�g�*����*�m�*���N�.Y�$Y�;-�c�G�G���<� + +'~�����%�1�:�C�O�X�a�n�w��������������������������� +��$. K !�o,� +�U��6*�i�*�)�k:� *�l�,:�#�� ++,�L� -�F�l�,:�l����� -�F�':���%�(�1�6�7�F�L�V�^�h�n�$. L!wC*�Y�*:�`66�'�x�):+,�K�-�x�}����-�'"� ���"�,�7�A�$. L!K#*�Y�*M>�+,�x�}�,�`���+�' +!$.N�!�z*���t��������d)9T$*�I�*�~�a���*��v��*�����*���{���*���_����'& �(�-�=�G�I�X�h�x�$. O +!g3*�,��*�[M,�b>6�+,�z�-�F����'"679 +:;<);2>$. P +! +�-� ,�U��6*�,��*�[:�b66�f�z�-:  �i�L�� �,,-�L�5 �F�+�� �h,�U� �F� + �F�����'R"+1?HM!W"_#fi%o'�(�%�+��/$. R!Z2*�^:6��z�,+,-�WW��b���-�'���!�0�$. R![/*�^M,�b>6�,�z�,+�XW����+�'����$�-�$. S !�P*�,�+�*�q�A*�[M,�b>6�),�z�-:+�F�i� ++�]W����+�'2 �� ����"�/�5�>�E�N�$. T +!�/-� ,�U��6*�[:�b6h6�-: 6 +�  +dd +�z�-S� + +���� ��2K*�i�G��*�,,-�L�1*�F�(��*�h,�U�*�F� *�F*�i�v*�q�o*�[:  �b6 6 +�S�0h�-:6� 2S����: h6 �   +dd�z�-S� + + �����.�'�(FHI#J)K0M6NLMVPYRbSjUoWyXzW�Y�U�[�]�^�[�a�e�g�i�j�l�n�p�q�r�q�stvwvl)P.}$.Z !p4*�f�-L+�+�*�i�*�)�kM� *�l�-M,��,�e�'* + !!)#-$/&$.\�!=*�����.Y *�p�9�*�~�'s tv$. ^!E=�*�y+���*�a����'  $.`�!�f*���`��������//[E$*�I����Y*�n�:L+�S�W���Y*���:L+�S�W��*���3DD!IZZ!'B�(�/�133?DE +I +IUZ[_d$.c�!O/*���)��������$))))*����'('-)$.d�!�*��������������5S�(*�I���*�~�a��*�~�y�-L+�o�*����*����Y*���8L+����Y*��5L+���*���*���o�*���#� *���#��'J�,�3�6�9�C�F�R�W�g�t�y�������������$.f�!|H*���B��������74+.1(�����*���\�d��'".,0/1225384;5F7 i!O#*�+��=�*+�y�F�+�a���'�� ���"�$.�!4*�gM+�gN,-�|�'�� +��$. �!��+�a=��*�a>�b+�y�-�R66�H+��:�-�R� 6�*+���}�����-�R6*�F�����6�*+���}����'R�� +��� �&�.�;�B�L�U�X�b�h�q�rx���$. �!|@*�a=>+�-�R6���*�y�-�R���*d�y�-+� *+�s�'* +�������+�9�?�$. ��!�}*��L+�=�N66���+4�w���-�+�4U�+4�w����� ++4�w����-� U��˻#Y-�D�'N356 89<=<(?+C9A?BIELFOE_HeKn?qN$. �!V.�#M*,��,2�,+,2��S�'Y,2,2�>�'�� +����!E*�Q�*���*�I*��0Y�C�'� +���$.�!"*�Q�' +���!E*�Q�*���*+��*��0Y+�?�'�� +���$.�!E*�Q�*���*+�~*��0Y+�@�'�� +���$.��!E*�Q�*���*'�*��0Y'�7�'�� +���$.��!E*�Q�*���*+��*��0Y+�=�'�� +���$. �!�n*��M,�>66��� ,4:����>+�#Y,d�DS++2�tS�+�#Y,d�DS++2�tS� +*S+S�'F��� ����#�)�;�D�G�X�a�d�h�m��!�\*��M,�>6��� +,4�w����76��� +,4�w���#Y,d�D:+�E����'>qrs wzy!|'+�.�1�A�R�Xw[o$. �!� h*��N-�6�:66�?+*�J�rY6�,�{d� �,�JU��-4U�����#Y�D�'2 WX Y]^`)b4cB`EfQ^[h$.01PK +� �(讂���*oracle/xml/parser/v2/XSLExtFunctions.class����-�R���������������� +4 +5 +6 +7 +8 +9 +: +; +< += +> + +? +@ +A +B +C + D +E +F +G +H + H + H + I + I + J + J + +K + L + M + N + O + +P +Q nW n\ n^ n_ nb nf tk ul vl xa y` z[ {c }e ~j Y �T �U �h �Z �S �U �X �V �d �] �] �m �S �U()I()Ljava/lang/Class;()Ljava/lang/String;()Ljava/lang/Throwable;()V()[Ljava/lang/Class;"()[Ljava/lang/reflect/Constructor;()[Ljava/lang/reflect/Method;(I)Ljava/lang/Object;(I)V(I)Z(ILjava/lang/String;)V((ILjava/lang/String;Ljava/lang/String;)V%(Ljava/lang/Class;)Ljava/lang/Object;(Ljava/lang/Class;)Z(Ljava/lang/Object;)V(Ljava/lang/Object;)Z9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;%(Ljava/lang/String;)Ljava/lang/Class;(Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)Za(Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/FastVector;)Ljava/lang/reflect/Method;j(Ljava/lang/String;Ljava/lang/String;Loracle/xml/parser/v2/FastVector;)Loracle/xml/parser/v2/XSLExprValue;T(Ljava/lang/String;Loracle/xml/parser/v2/FastVector;)Ljava/lang/reflect/Constructor;e(Ljava/lang/reflect/Constructor;Loracle/xml/parser/v2/FastVector;)Loracle/xml/parser/v2/XSLExprValue;`(Ljava/lang/reflect/Method;Loracle/xml/parser/v2/FastVector;)Loracle/xml/parser/v2/XSLExprValue;'([Ljava/lang/Object;)Ljava/lang/Object;Code +ExceptionsLineNumberTable +SourceFileXSLExtFunctions.javacallConstructor +callMethodcallStaticMethod checkMethod checkType convertType elementAtequalsevaluateforNamegetConstructorgetConstructorsgetDeclaringClass +getMessage getMethod +getMethods getModifiersgetNamegetParameterTypesgetTargetExceptioninvokeisPublicisStaticjava/lang/Class java/lang/ClassNotFoundExceptionjava/lang/Exceptionjava/lang/Objectjava/lang/Stringjava/lang/Throwablejava/lang/reflect/Constructor+java/lang/reflect/InvocationTargetExceptionjava/lang/reflect/Methodjava/lang/reflect/Modifiernew newInstanceoracle/xml/parser/v2/FastVector#oracle/xml/parser/v2/XPathException%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue$oracle/xml/parser/v2/XSLExtFunctionssizetoString nWo*��q'tko�b*�+M,��N:6�-+��,2�S�,����*-�1:�W�Y*�)��W�Yl���Y��29< +29LqB�� ��� �'�(�2�2�9�<�=�L�M�X�p +ulo �*�"M*�,N-��::+��,�:6�+`��-2�S�-����*�.:�(:�Y*�*�-�3��W�Yl��� +�Y���Y��ISV +ISoqZHI +JKMN M"R(T7U>T?RIXIZSXV\X^o`pb{e�f�hpvlo�l*�,M,��N:6�-+��,2�S�,����*-�.:�(:�Y*�*�-�3��W�Yl���Y��2:= +2:VqBpq rvx y'x(v2{2}:{=?�V�W�b�pwgo�x+���M*�M,�&�/��Y*��N�Y-�#��,�%N6�#-2�(�/�-2�*+����-�����W�Yl�� +((8llqN= > @ +A +CDE(G)I8L8N=PCRPS^T`PjVlXmZp|iob2+��*,� N-,��*+,�$N-�(�0� -,��-,��q2 4589&;,?p~jo� �M*�M,�&�/��Y*��N�Y-�#��,�!N-�� :66��-2�+:-2�'6�/�i+�2���\6 6 +� + +�� +2�� 6 �� + +���� �)��-2S��Y-2�)���-���y��Y*��2�N-�W�Yl��-��-��q�#�������-�-�2�9�<�B�K�T�f�i�l�r���������������������������������p�ho:N*�N-�&�/�!�Y*��:�Y�#��-�%:�� :66��2�(6�/��2�*+����06 2�,: + +�6  � ,�2 � �{,�2 `��m ��6 6 +6�#, `�� +2�� 6 +�� +���� +�+��2S��Y2�*������6��Y+��2�:�W�Yl��/))/).q�*�������/�/�5�=�@�FPXgnx } � � +����������� ��"�&'$*)-+0.2/4prsPK +� �(e�j??&oracle/xml/parser/v2/XSLFallback.class����-)!"#$% +  + + + +     ' ( ()Loracle/xml/parser/v2/XMLNode;()ZH(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)V!(Loracle/xml/parser/v2/XMLNode;)V%(Loracle/xml/parser/v2/XSLTContext;)VCode +ExceptionsILineNumberTable +SourceFileXSLFallback.java elementType getDebugFlag getDebugNode!oracle/xml/parser/v2/XSLConstants!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLFallbackoracle/xml/parser/v2/XSLNode oracle/xml/parser/v2/XSLTContext +processActionprocessChildren setDebugNode , *+,�*��#$ &Y%M+�� ++� M+*� *+� ++��+,� �")* ,-023$'PK +� �(>�� +��%oracle/xml/parser/v2/XSLForEach.class����-������������������������������ +X +X +Y Z +[ \ + +] +^ _ +` +a +b +c +d +e +f + +g +g g + h +h +i + j +j +k k +l + m +n o +p + +q +r +s +t + +u +u u +v +w +x +y +z +{ +| +} +~ + +� +� +� +� � � +� +� � �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� ��()I()Ljava/lang/String;!()Loracle/xml/parser/v2/XMLError; ()Loracle/xml/parser/v2/XMLNode;()Lorg/w3c/dom/Node;()S()V()Z(I)Lorg/w3c/dom/Node;(I)V9(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/Object;)Z&(Ljava/lang/String;)Ljava/lang/String;&(Ljava/lang/String;)Lorg/w3c/dom/Attr;(Ljava/lang/String;)V(Ljava/lang/String;)Z(Ljava/lang/String;I)VY(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/XSLNodeSetInt;H(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)V!(Loracle/xml/parser/v2/XMLNode;)V%(Loracle/xml/parser/v2/XSLNodeList;)V!(Loracle/xml/parser/v2/XSLSort;)VF(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLNodeList;:(Loracle/xml/parser/v2/XSLTContext;)Lorg/w3c/dom/NodeList;%(Loracle/xml/parser/v2/XSLTContext;)V(Lorg/w3c/dom/Node;)V(Z)VCode +ExceptionsILineNumberTable"Loracle/xml/parser/v2/XMLAttrList;$Loracle/xml/parser/v2/XSLNodeSetInt;Loracle/xml/parser/v2/XSLSort;$Loracle/xml/parser/v2/XSLStylesheet;Lorg/w3c/dom/NodeList; +SourceFileXSLForEach.javaaddSecondaryKeyattrlistcreateNodeSetExprdefault elementTypeequalserrorexpr getAttributegetAttributeNodegetCurrentNodegetCurrentTmpl getDebugFlag getDebugNodegetError getLength getLocalName getMessage2 getNamespace getNodeName getNodeType getNodeValue +getParentNodegetSelectedNodesgetText$http://www.w3.org/1999/XSL/Transform$http://www.w3/org/XML/1998/namespaceinternisSpacesisSrcWhiteSpacePreservingisWhiteSpaceNodeitemjava/lang/Stringoracle/xml/parser/v2/DTDoracle/xml/parser/v2/XMLAttr oracle/xml/parser/v2/XMLAttrList!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLDeclPIoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNodeoracle/xml/parser/v2/XMLText!oracle/xml/parser/v2/XSLConstants!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBaseoracle/xml/parser/v2/XSLForEachoracle/xml/parser/v2/XSLNode oracle/xml/parser/v2/XSLNodeList"oracle/xml/parser/v2/XSLNodeSetIntoracle/xml/parser/v2/XSLSort oracle/xml/parser/v2/XSLTContextorg/w3c/dom/Nodeorg/w3c/dom/NodeListpopCurrentNodeListpopCurrentNodeList2preserve +processActionprocessAttributesprocessChildrenprocessSpaceAttrpushCurrentNodeListpushCurrentNodeList2resetSrcWhiteSpaceModeselectsetCurrentNodesetCurrentNode2setCurrentTmpl setDebugNodesetSrcWhiteSpaceModesort sortNodessortnodespace +stylesheettransformChildrentransformMiscElementswarning xml:space xmlchildren �������5*+,�*�S*�$��0� 1-����} yM+�,� ++�-M+*�P+�*N:6*�'+�<�:�%*�S�+�J*�S+�R:+�E�066-�9�z-� �(:�%�6�_�%� +�Q�M�%� +�Q�;6-� �): +�-: ++ ��P++�. �4�V+ +�P+�+6+�O+�J+�K6 �^ �C�:��G� ��<+�M+�N�9�"�=�?�+�;�8�@��*+�H�  ���+�E+�F+�O�+�L+�,�+,�P���<67 9:=?@C-E2G9I?JIKMMTQWT_VjWuYz[�\�[�]�^�]�a�c�d�e�f�g�f�g�f�h�n�p�s�t�w�y�{|}~�'�2�3�C�F�KwU�Y�]�c�h�l�s�x4����L�*+�G*�"��*�"�/=:6�k*�"�B� N+�,�+�-:+-�P-�2:-�:�>:�**�#�'��-�5� *�I+�,� +�P����*�'�++�-:+*�P++�.�*�7�4�&+�P��~�� � +����+�2�8�=�C�L�S�]�`�g�p�v�}���������������������������% �*�W�1=N::::6��*�W�D�N-�9�-��A�g�m-�9�\-�:�3:�6:�A�:�Y*�T� :+�U*�S�*��S�*�S��!����u��f� +� ������-�5�?�B�J�P�W�^�l�{������������������PK +� �(�f韠 +� +!oracle/xml/parser/v2/XSLKey.class����-��z����������������� +0 + +0 +1 + +2 + 3 + +4 + +5 + +6 7 +8 +9 +: ; < += +> +? @ A + B C D +E +F +G +H +I + J K eS eU od p[ qM rX sY tn uV vR wO xL {b |^ }Q ~N T �_ �a �i �k �S �` �W �d �Z �\ �j()I()Ljava/lang/Object;()Ljava/lang/String;()Ljava/util/Hashtable;()Loracle/xml/parser/v2/NSName;#()Loracle/xml/parser/v2/XMLElement;()Lorg/w3c/dom/NodeList;()V(I)Lorg/w3c/dom/Node;(I)V&(Ljava/lang/Object;)Ljava/lang/Object;8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;Y(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/XSLNodeSetInt;Y(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/XSLPatternInt;(Ljava/util/Hashtable;)VH(Ljava/util/Hashtable;Ljava/lang/String;Loracle/xml/parser/v2/XMLNode;)VX(Ljava/util/Hashtable;Loracle/xml/parser/v2/XMLNode;Loracle/xml/parser/v2/XSLTContext;)VD(Loracle/xml/parser/v2/NSName;Ljava/lang/String;Ljava/lang/String;)VG(Loracle/xml/parser/v2/XMLNode;)Loracle/xml/parser/v2/XSLSourceContext;g(Loracle/xml/parser/v2/XMLNode;FLoracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLPatternInt;%(Loracle/xml/parser/v2/XSLNodeList;)V7(Loracle/xml/parser/v2/XSLNodeList;Lorg/w3c/dom/Node;)V:(Loracle/xml/parser/v2/XSLTContext;)Lorg/w3c/dom/NodeList;v(Loracle/xml/parser/v2/XSLTContext;Ljava/lang/String;Loracle/xml/parser/v2/XMLNode;)Loracle/xml/parser/v2/XSLNodeList;(Lorg/w3c/dom/Node;)VCode +ExceptionsLineNumberTableLoracle/xml/parser/v2/NSName;$Loracle/xml/parser/v2/XSLNodeSetInt;$Loracle/xml/parser/v2/XSLPatternInt; +SourceFile XSLKey.javaZaddNode +addToTableclonecreateNodeSetExpr +createPattern evaluatedget +getChildNodes getKeyTable getLengthgetMatchingNodesgetNamegetSelectedNodes +getSrcContext +getSrcRootgetTextitemjava/lang/Cloneablejava/lang/Objectjava/util/Hashtable matchPattern mergeNodename!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLConstants!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase!oracle/xml/parser/v2/XSLExprValueoracle/xml/parser/v2/XSLKey oracle/xml/parser/v2/XSLNodeList"oracle/xml/parser/v2/XSLNodeSetInt"oracle/xml/parser/v2/XSLPatternInt%oracle/xml/parser/v2/XSLSourceContext oracle/xml/parser/v2/XSLTContextorg/w3c/dom/NodeListpatternpopCurrentNodeListpushCurrentNodeListputsetCurrentNode setKeyTableupdateHashtableuseExpr! �i�k�jtne]fM!*�*�*+�'*,��(*-��/�h5� 789 5g p[fd0+,�� +:�� +Y�:-�+,�+W� -�&�h"e +fhij&f)n/pg ycf�`-�":+-�!�:��Y�:+-�!�-*�*��*+�.*�,�� +:� �� +��h6 +xyz| }*/�7�@�E�P�U�^�g zPf*�'�h>�\f��*�(,-�%�Q� +Y�:-�*-,�,*�/-� :-�)6�*+�$��#,������,��9,�:�.�66�*+�$�-�.����hFFHIJ$K0L4M:OOM^SeUkVpXyY[�Y�Ag lmPK +� �(�ɫ� � *oracle/xml/parser/v2/XSLMiscElements.class����-�_cquv����twxyz{|}~�� +1 +2 3 4 +5 +6 +7 +8 +9 +: +; +< + = + > +> + ? + @ + +A + B +C +D +E +F +G +H +I J XS XT b] d[ eO fO gS hR iW jP kM lN mK nL oL pL rL sQ �V �V �S �U �O �O �S �a()I()Ljava/lang/String; ()Loracle/xml/parser/v2/XMLNode;(()Loracle/xml/parser/v2/XSLEventHandler;()V()Z(I)Lorg/w3c/dom/Node;&(Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/String;)VH(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)V!(Loracle/xml/parser/v2/XMLNode;)V%(Loracle/xml/parser/v2/XSLTContext;)Vi(Loracle/xml/parser/v2/XSLTContext;Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Ljava/lang/String;Code +ExceptionsILineNumberTable"Loracle/xml/parser/v2/XMLAttrList; +SourceFileTERMINATE PROCESSINGXSLMiscElements.javaZattrlistcomment elementType +endComment +endMessageendProcessingInstruction getAttributegetAttributeTemplateValue getDebugFlag getDebugNodegetEventHandler getLength getLocalName getNamespace getNodeValue$http://www.w3/org/XML/1998/namespaceinternitemjava/lang/Stringmessagenameoracle/xml/parser/v2/XMLAttr oracle/xml/parser/v2/XMLAttrList!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLElement!oracle/xml/parser/v2/XSLConstants$oracle/xml/parser/v2/XSLEventHandler!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase$oracle/xml/parser/v2/XSLMiscElementsoracle/xml/parser/v2/XSLNode oracle/xml/parser/v2/XSLTContext +processActionprocessAttributesprocessChildrenprocessSpaceAttrprocessing-instruction setDebugNodespace startComment startMessagestartProcessingInstruction terminateyes �aXTYR"*+,�*�0+�$� *��*��\+y ,-,/!(Z�VY�M+�� ++� M+*�,+�!N*�$:�$+*�*�:-�/*+�*-��?�-�-*+�*-��(�!-�.*+�*-�*�0� +�Y��+��+,�,�\n45 78;<>%A0@2C8D=EC>FHMJQKVLZH]OdQhRmSqUxV�Y�Z�2Z�VY�q*+�)*���*��"=6�R*��(� N-�#:-�&�':�-�%�#*�+��* ���0�����\B`b c +ehj(k.l7m>oGpMmPrWtghp^Z^`PK +� �(?���v"v""oracle/xml/parser/v2/XSLNode.class����-��� +  + 12=Dehqvxy~89:;EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc +"� +7� +$� +)� +*� ++� +-� +.� +0� +1� +2� +5� +6� +8� +9� +:� +=� +>� +?� +7� +=� +&� +!� $� 7� +"� ;� $� 7� + � +;� 7� +;� + � +&� +&� +<� +<� A� +&� +$� +%� +%� +$� +&� +&� +&� +&� +;� +(� +'� A� + � 7� $� $� $� +"� 7� !� +<� $� 7� +� +,� +7� +7� +$� +4� +&� +<� 7� +7� +7� +7� +7� +<� 7� 7� �� �� �� �� �� ��  �  � �  �  � � � �  !� "� #� $� %� &� '� (� )� *� +� ,� -� .� /� 0� 3� 5� 6� 7� <� >� ?� @� A� B� C� d� f� g� i j� k� m� r� s� t� u� w� z� {� |� }� �� � ��#default()I()Ljava/lang/String;!()Loracle/xml/parser/v2/XMLError; ()Loracle/xml/parser/v2/XMLNode;()Lorg/w3c/dom/Node;()Lorg/w3c/dom/NodeList;()S()Z(C)Z(I)Ljava/lang/String;(I)Lorg/w3c/dom/Node;(I)V(IILjava/lang/String;)V(II[CI)V9(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/Object;)Z*(Ljava/lang/Object;ILjava/lang/Object;II)V&(Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/String;)V(Ljava/lang/String;)Z(Ljava/lang/String;I)VV(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/NSNameImpl;:(Ljava/lang/String;Loracle/xml/parser/v2/XSLStylesheet;Z)V(Ljava/lang/String;Z)VE(Loracle/xml/parser/v2/NSName;)Loracle/xml/parser/v2/XSLAttributeSet;H(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)VI(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;Z)V!(Loracle/xml/parser/v2/XMLNode;)VE(Loracle/xml/parser/v2/XMLText;Loracle/xml/parser/v2/XSLStylesheet;)V%(Loracle/xml/parser/v2/XSLTContext;)V'(Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node; +CHAR_TEMPLATECode +ConstantValueEMPTY +ExceptionsI +INST_TEMPLATELineNumberTableLjava/io/PrintStream;Ljava/lang/String;Ljava/util/Hashtable;"Loracle/xml/parser/v2/XMLAttrList;Loracle/xml/parser/v2/XSLNode;$Loracle/xml/parser/v2/XSLStylesheet;Lorg/w3c/dom/NodeList; +MISC_ELEMENTS +MISC_TEMPLATE +SourceFile XSLNode.javaZ[Ljava/lang/String;[Loracle/xml/parser/v2/NSName;addResultPrefixes appendChild +apply-importsapply-templates arraycopy attributeattrlistattrsets +call-templatechoosecommentcopycopy-of countTokensdebug debugFlag defNamespacedefaultelement elementTypeequalserrorexclResPrefixesexcludeResultNamespacefor-eachgetAttributeSetgetChars +getChildNodesgetColumnNumber getDebugNodegetError getLength +getLineNumber getLocalName getMessage0 getMessage2 getNamespace getNodeName getNodeType +getParentNode getSystemId$http://www.w3.org/1999/XSL/TransformifisForwardCompatibilityModeisSpacesisWhiteSpaceCharisWhiteSpaceNodeitemjava/io/PrintStreamjava/lang/Stringjava/lang/Systemjava/util/StringTokenizerlengthmessagenVarsname +nameSpaces namespace nextToken numattrsetsnumberoracle/xml/parser/v2/NSNameoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNodeoracle/xml/parser/v2/XMLTextoracle/xml/parser/v2/XMLUtil#oracle/xml/parser/v2/XSLApplyImport&oracle/xml/parser/v2/XSLApplyTemplates!oracle/xml/parser/v2/XSLAttribute$oracle/xml/parser/v2/XSLAttributeSet$oracle/xml/parser/v2/XSLCallTemplate!oracle/xml/parser/v2/XSLCondition!oracle/xml/parser/v2/XSLConstantsoracle/xml/parser/v2/XSLCopyoracle/xml/parser/v2/XSLCopyOforacle/xml/parser/v2/XSLElement!oracle/xml/parser/v2/XSLException!oracle/xml/parser/v2/XSLExprValueoracle/xml/parser/v2/XSLForEach$oracle/xml/parser/v2/XSLMiscElementsoracle/xml/parser/v2/XSLNodeoracle/xml/parser/v2/XSLNumber%oracle/xml/parser/v2/XSLOtherElements%oracle/xml/parser/v2/XSLResultElement"oracle/xml/parser/v2/XSLStylesheet oracle/xml/parser/v2/XSLTContextoracle/xml/parser/v2/XSLTextoracle/xml/parser/v2/XSLValueOf oracle/xml/parser/v2/XSLVariableorg/w3c/dom/Nodeorg/w3c/dom/NodeListoutparam popVariableprefixpreserve +preserveSpaceprintln +processActionprocessAttrSetsprocessAttributesprocessChildrenprocessSpaceAttrprocessUseAttrSetsprocessing-instructionresolveNamespacePrefix resolveQname setDebugInfo setDebugNodesort +stylesheettemplatetexttransformCharTemplatetransformChildrentransformMiscElementstransformTemplatevalue-ofvariablewarning xmlchildren xslParent 7$/i>�C�w���������������������Y%*+�D*��*�w*�|*�a*�^*,����"9� ����:$7�3���$*+,�U�� +?=�3����Z*+�n,�C*+�d��*+�y�y*+�]�]*+�x�x*+��*+�z�z*+�Y�Y,�\�*+�i+�e+�q����6 +D +GJK"M*N2O:SBUIWRXVWYB�3�� ��"Y+�BM,�[>6*�a�*� �a�&*�a:�6*`� �a*�a�X::6�?,�{:�_�*��:� *�]:��*�a�S������b ���� �#�)�.�9�A�C�F�I�L�R�X�b�j�m�s�����}��$�}+���� +����^**�a��*�a�=>�*�a2+��������"�� ���� �(�4��_+*�v<�M*,�c>�,4�s��������"ab cegh!e)kk��1*��+�gl�kl�`�� +^\�3l��T(>�*��*�Z2�bM,�,+���*�|���������'��3m��V&*�p�7M,�*��M,�*,�a�a*,������qs tvxy%o�3n��v>*�dM,�h>6�,�u�7:+������*�w� +*�w�~��& cd hjk%h.n5o=a�3o��F+� *���+�*������ �����3p��xD+�_�=�"Y+�BM*,�[�|**�|�#�Z>�*�Z,�{*��S�*�|����"� ���%�*�8�C�z��� +X*���h=N:::6�9:*���u�&N-�o�0-�'�t� +*��� �=Y-�'*���V:*�WW��-�o��-�$:�j:�m:����6Y*���N:�x��=Y*���R:*�WW����)Y*���E:�> ��*Y*���F:�%��5Y*���M:�  ��-Y*���H:����0Y*���J:����1Y*���K:����>Y*���S:����8Y*���O:�� � +��.Y*���I:�o��?Y*���T:*Y�w`�w�L*���r��9Y*���P:�0+�f: +-��++�g-�n*�n�l��+ ���>*�WW+���-+�f: +-��++�g-�n*�n�l��+ �����DZ�JR� +� �����-5FW_b +j pw~�������������� �!  +"# "#$*%9$<&C'R&U(\)k(n*u+�*�,�-�,�.�0�1�.�5�7�5�;�<�=�>�?=?= +@AEF!$L*M/N7O?NBOENHPN�W��3{���J*+��*�^�@@#+38*+���*+���*+��*+�����* +uw,|1}49�<�A�F�I��3|����V�3}��  �*���h=:::6��:*���u�&N-�o�0-�'�t� +*���Z�=Y-�'*���V:*�WW�>-�o�6-�$:�j:�m:����=Y*���R:*�WW����2Y*���L:��� +� +��6Y*���N:����)Y*���E:�� ��*Y*���F:�z��5Y*���M:�a ��-Y*���H:�H��0Y*���J:�/��1Y*���K:���>Y*���S:����8Y*���O:�� � +��.Y*���I:�� +��+Y*���G:����?Y*���T:*Y�w`�w��*�j: *�^�" � +�z � +��i*���r��9Y*���P:�?+�f: ++-��++�g-�n*�n�l��+ +��� �:Y*���Q:*�WW+�����x��RT� +� +�����+�3�D�U�]�`�h�n�u�|���������������������������������,�/�6�E�H�O�^�a�h�w�z���������������������������������$�2�5�?�N�Q�W�\�d�h�l�o�r�u�{�~����������3PK +� �(�oq44&oracle/xml/parser/v2/XSLNodeList.class����-E789:>?@ + + + +  +     ( (! 0" 2 3 4# 6 ;. <* =*()I()Ljava/lang/Object;()V!(I)Loracle/xml/parser/v2/XMLNode;(I)Lorg/w3c/dom/Node;(I)V*(Ljava/lang/Object;ILjava/lang/Object;II)V(Lorg/w3c/dom/Node;)I2(Lorg/w3c/dom/Node;)Loracle/xml/parser/v2/XMLNode;(Lorg/w3c/dom/Node;)V(Lorg/w3c/dom/Node;I)V(Lorg/w3c/dom/NodeList;)VCodeILineNumberTable +SourceFileXSLNodeList.java[Loracle/xml/parser/v2/XMLNode;addNode arraycopycloneensureCapacity getLengthindexOf +insertNodeitemjava/io/Serializablejava/lang/Cloneablejava/lang/Objectjava/lang/System nodeArray nodeCountnodeSizeoracle/xml/parser/v2/XMLNode oracle/xml/parser/v2/XSLNodeListorg/w3c/dom/NodeList +removeNoderesetsetNode trustedItem!;.<*=*()B*�*�*�**����+02 340(!)B*�*�*�**����+8: ;<8(')vB*�*+� �**��**���=�*�+��S�*����+"@BCD!F&G6FA@/%)@*� *�*�+�S*Y�`��+����1)W/�Y*�� L+*��+*��*�+�*�� ++�+� ���-�2)b6*�*��-*�L**�h��+*�*�� +*Y�h��+j lmn+o5h3)*��+M4#)I!=�*�2+����*�����+�����5&)^.*� *�*�`*�d� +*�+�S*Y�`��+uv wvx#y-s6 )5�*�� +*�2��+\ ]_A$){C*+� +=��*�dd>�*�`*�� +*Y�d�*�*�S+��+& �� � +���*�4�>�B)"*��+ +SQC&)' *�+�S�+ +~ +|D)*�2�+e,-PK +� �(�rV���)oracle/xml/parser/v2/XSLNodeSetExpr.class����-[NOPQRSTUVW + + + + + ! " +# +$ % +& +' ( + ) +* ++ , +- ;0 ;2 ;8 D4 E? FA G. H: I? J3 K5 LA M/ X7 X9 Y> Z1()F()I()V(F)V(I)Vg(Loracle/xml/parser/v2/XMLNode;FLoracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLPatternInt;%(Loracle/xml/parser/v2/XSLExprBase;)V&(Loracle/xml/parser/v2/XSLExprValue;)VI(Loracle/xml/parser/v2/XSLParseString;)Loracle/xml/parser/v2/XSLExprBase;J(Loracle/xml/parser/v2/XSLParseString;Z)Loracle/xml/parser/v2/XSLExprBase;)(Loracle/xml/parser/v2/XSLParseString;Z)VK(Loracle/xml/parser/v2/XSLParseString;ZZ)Loracle/xml/parser/v2/XSLExprBase;G(Loracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLExprValue;Code +ExceptionsFILineNumberTable"Loracle/xml/parser/v2/XSLExprBase; +SourceFileXSLNodeSetExpr.java +addElementexprType firstExpr getPrioritygetValue lookahead matchPattern mergeListnextExpr nextTokenoracle/xml/parser/v2/PathExproracle/xml/parser/v2/Predicate#oracle/xml/parser/v2/XPathException!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBase%oracle/xml/parser/v2/XSLExprConstants!oracle/xml/parser/v2/XSLExprValue#oracle/xml/parser/v2/XSLNodeSetExpr#oracle/xml/parser/v2/XSLParseString"oracle/xml/parser/v2/XSLPatternIntparsepriority setPriority  +;0<+ *� *���@qs +q=H:<x8*�MN,��Yl� +�,+�N,�M�-,+��,�M,���-�@. ��� ���!�$�-�2�6�=J3<|@:*��:�,�$��+$-�� +:�E��:����@* +�� ���$�(�.�8�=�=X6<*��@|=X7<*��@�=X9<���*�W�Y*�N-:*�|�n�Y� :-�-���M�Y� +�*�W�Y*�N-����Y� +�-��-��� -��*�|����@J�� +��� �)�/�8�C�H�R�[�f�l�y�����=Z1<R"*��M�,#�,��M,���*#��@�� ����!�=BCPK +� �(Kq�VV(oracle/xml/parser/v2/XSLNodeSetInt.class����-  +:(Loracle/xml/parser/v2/XSLTContext;)Lorg/w3c/dom/NodeList;Code +ExceptionsLineNumberTable +SourceFileXSLNodeSetInt.javagetSelectedNodesjava/lang/Object!oracle/xml/parser/v2/XSLExceptionoracle/xml/parser/v2/XSLExprInt"oracle/xml/parser/v2/XSLNodeSetInt   +PK +� �(;ݟ#`,`,$oracle/xml/parser/v2/XSLNumber.class����-���z2PTil��������������������������������� +� +� +� +� +� +"� +� $� $� $� $� $� $� $� $� $� +� +� +� +� $� $� $� $� $� + � + � $� � +� "� +� +� $� $� $� $� $� $� $� $� +� +$� +$� $� $� $� $� $� %� %� +$� +� + � +� +$� +'� +'� +'� +� +� +&� +'� +� +� +� +$� +� +� +� +� (� !� (� (� +$� +'� +� +� +� +� +#� +� +$� +$� %� $� $� $� $� +$� +� +"� +� +'� +� +� +� +� +� $� +� +� +� +� +� +#� +� 4 4 4 4 4# 4% 4/ 5@ 6@ 9@ F@ G@ KA LA MA NA O Q R S UA VJ WA X; YE Z [ \B ]; ^ _; ` aA bC cA dA eA fA gA hC i j k mA nJ oA p; qE r1 s� t* u v- w x0 y z { | } ~  �" �� �, �� �� � �) � � �* �& � + �� � + � + � �� �( �( �( �A �A �A �A � � �+ � �' �! � � �. �� �D � � �� �� �� � �()I()Ljava/lang/String;"()Ljava/text/DecimalFormatSymbols;()Ljava/util/Locale; ()Loracle/xml/parser/v2/XMLNode;(()Loracle/xml/parser/v2/XSLEventHandler;$()Loracle/xml/parser/v2/XSLNodeList;()Lorg/w3c/dom/Node;()S()V()Z(C)V(C)Z(D)D(I)C(I)I(I)Ljava/lang/Object;(I)Ljava/lang/String;!(I)Loracle/xml/parser/v2/XMLNode;(I)Lorg/w3c/dom/Node;(I)V(II)Ljava/lang/String;(II[CI)V(J)Ljava/lang/String;&(Ljava/lang/Object;)Ljava/lang/String;(Ljava/lang/Object;)V(Ljava/lang/Object;)Z(Ljava/lang/String;)I&(Ljava/lang/String;)Ljava/lang/String;,(Ljava/lang/String;)Ljava/lang/StringBuffer;(Ljava/lang/String;)V'(Ljava/lang/String;Ljava/lang/String;)VV(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/XSLExprInt;Y(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/XSLPatternInt;(Ljava/lang/String;Z)V#(Ljava/text/DecimalFormatSymbols;)V,(Ljava/util/Locale;)Ljava/text/NumberFormat;(Ljava/util/Locale;)VH(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)VI(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;Z)VG(Loracle/xml/parser/v2/XMLNode;)Loracle/xml/parser/v2/XSLSourceContext;!(Loracle/xml/parser/v2/XMLNode;)Vg(Loracle/xml/parser/v2/XMLNode;FLoracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLPatternInt;%(Loracle/xml/parser/v2/XSLTContext;)D%(Loracle/xml/parser/v2/XSLTContext;)I%(Loracle/xml/parser/v2/XSLTContext;)V&(Loracle/xml/parser/v2/XSLTContext;)[Ii(Loracle/xml/parser/v2/XSLTContext;Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Ljava/lang/String;(Z)V([CII)V([I)Ljava/lang/String;([Ljava/lang/String;)V. +ALL_FORMAT +ALU_FORMATCode +ConstantValue +DEC_FORMAT +ExceptionsI LEVEL_ANYLEVEL_MULTIPLE LEVEL_SINGLELineNumberTableLjava/lang/Integer;Ljava/lang/String;Ljava/text/DecimalFormat;!Loracle/xml/parser/v2/FastVector;!Loracle/xml/parser/v2/XSLExprInt;$Loracle/xml/parser/v2/XSLPatternInt; +RML_FORMAT +RMU_FORMAT +SourceFileXSLNumber.java[Ljava/lang/String;a_Formata_GroupingSeperatora_GroupingSize +a_LetterValue +addElementanyappendcharAt +characterscountcountAnchorLocalNamecountAnchorNamecountAnchorNamespacecountAnchorType countPattern +createPatterncreateStringExpr +dec_formatter +docOrderId elementAt elementTypeequalsf_Format f_Formatsf_GroupingSeperatorf_GroupingSizef_Lang +f_LetterValuef_Prefix f_Separatorsformat format_Alpha format_RomanfromfromAnchorLocalNamefromAnchorNamefromAnchorNamespacefromAnchorType fromPattern +getAnchorName +getAnchorType getAnyCnt getAttributegetAttributeTemplateValuegetCharsgetCountStringgetCurrentNode getDebugFlag getDebugNodegetDecimalFormatSymbols +getDefaultgetDocumentOrderListgetEventHandler getInstance getLocalName getMultiCnt getNamespace getNodeName getNodeTypegetNumberValue +getParentNodegetPreviousSibling getSingleCnt +getSrcContextgrouping-separator +grouping-sizeindexOfintValueisDigitisLetterOrDigititemjava/lang/Characterjava/lang/Integerjava/lang/Mathjava/lang/Stringjava/lang/StringBufferjava/text/DecimalFormatjava/text/DecimalFormatSymbolsjava/text/NumberFormatjava/util/Localelanglength letter-valuelevelmatchCountPatternmatchFromPattern matchPatternmultipleoracle/xml/parser/v2/FastVectororacle/xml/parser/v2/XMLAttroracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLConstants$oracle/xml/parser/v2/XSLEventHandler!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBaseoracle/xml/parser/v2/XSLExprIntoracle/xml/parser/v2/XSLNode oracle/xml/parser/v2/XSLNodeListoracle/xml/parser/v2/XSLNumber"oracle/xml/parser/v2/XSLPatternInt%oracle/xml/parser/v2/XSLSourceContext oracle/xml/parser/v2/XSLTContextorg/w3c/dom/Nodep_Countp_Fromp_Levelp_ValueparseFormatStringparseInt +processActionprocessAttributesrint setDebugNodesetDecimalFormatSymbolssetGroupingSeparatorsetGroupingSizesetGroupingUsedsinglesize stringValue substring toLowerCasetoString toUpperCase trustedItemvaluevalueOf $"$>A8=A8 +<A8�A�A�A�AeAaAfAcAdAKANALAMA\B�DYEX;VJUAWAqEp;nJmAoA9@6@5@G@F@hCbCgA +37d8�Y�*�2�Y�*�1�Y�*�0�Y�*�4�Y�*�3�?� ��!�,�7D4$7�*+,�.*��*�*��*��*�N*�J*�O*�L*�M*�5*�8*�6*�7*��*�A*�@*��>*�=*�?*�Y*�X*��V*�U*�W*�P*�G�?rQ RSTZ![&\+]0^5c:d?eDfIqNrSuXv`wexjzo{t||}�~��� �: +j7�`�M,�d>�(p6l;� +6��,��A`d�U�����,��A`d�U�Y,`,�dd�/�?:�� �����"�%�3�9�>�A�N�: +k7���L=�y��Ą�x+�PU�a�4��Ą�`+�MU+�PU�:Ą�+�MU�)��4��Ą�|+�CU+�MU�Ą� +�DU��d�1��Ą�p+�CU+�DU�˄�+�CU��2�-Z���+�XU+�CU����+�LU�� +�-(���+�XU+�LU�k��+�XU�]�- ���+�IU+�XU�<��+�VU�.�)���+�IU+�VU���+�IU����Y+�/�?E��� ��� �#�*�1�7�?�G�J�X�[�b�i�o�w��������������������������������������� � + +$ ',25= EH$K%SV*[,`.c/k0s,v4y5���@:t*7�]+�aM+,�uN-�f:,�E�z��Ed66�.��M*�Y�*,+�}�*,+�|��������?B� ���!�$�'�*�2�9�D�O�R�U�Z�:x07  M�2N::666 *�K��6 +*�Q��6 : : +66+�6:�Y,���+*�P�:��M ��*�Q� � �F�:�� +�*�K��F�:N�-:�2�H��*�D �R: *�D+.��R: + +�$*�K��F��w +�{d66 � 66��Y,���+ �:��M����Y,���+ +�:��M���1�H��Y,���++.�S�:��M�{�0�H�"�Y,���++.�S���:��M�Q�4�H��Y,���++.�T�:��M�*�3�H��Y,���++.�T���:��M d�*�Q��F�::�:�Y,���+d���:��M���h,�?�;KLN OPQRS!T*U.V2W5X8Y<Z@^Va[bldogvj�m�g�p�t�v�w�y�{�|�{�}�y���������t�%�>�A�L�h�k�v��������������������d +�:�,7��Y�)M+�aN�2*-�+�|�,-�9*�Y�*-�+�}�-�rN-� +-�p���,��� +:,��d66�HO,�F�(N�+*-�+�|�-�p� \.`O-�sN-��ׄ������?Z+, +157#9*:8<?1C2M?UAcCiDsEvG�H�I�K�E�A�O:�*7�w�Y�)M+�aN6�-*�Y�*-�+�}�&*-�+�|�-�rN-�2-�p��˧%*-�+�|�-�p��-�sN-����?F[\ +]ade(g6i=aAbKlNn\ofpirpltu:�(7��*�@�z*�@+�o��*�?�f+�o�&+�:*�=�j�*�?�m�I�=�+�o�&+�:*�=�i�*�?�l�I��+�n*�=��*�A+$-�~�?F�����$�*�6�E�G�O�U�a�p�r�}��:�(7��*�X�z*�X+�o��*�W�f+�o�&+�:*�U�j�*�W�m�I�=�+�o�&+�:*�U�i�*�W�l�I��+�n*�U��*�Y+$-�~�?F�����$�*�6�E�G�O�U�a�p�r�}��:�7��*�Y�)�Q*�Y�)�K>66+� +�{Y>�*�K�2�9*�K�Y�*�9��M+,�_6,4�y�0��� +,4�y���*�Y,d�/�P6�.*�K�2�9*�K�Y�*�9�,4�y��,4�x�C`6��� +,4�x���*�K�2�9*�K�Yd�*�96��,4�`A,ISa9iF*�K�1�9�C*�K�0�9�6*�K�3�9�)*�K�4�9�*�K�2�9*�K�Y�*�9��=`6��� +,4�y���Y,d�/:*�Q�96���?�9� �����+�5�D�E�I�Q�U�_�b�e�k�u����������������������������������0�:�=�G�J�T�W�a�dn}��� � +�� +��������:�+7XlM+�b� ++�cM+*��+�gN+�a:*�5�*+*�5*�^�J**�J��*�6�7*+*�6*�^�L*�D��*�D�d:*�L�;��*�D��*�7�&*+*�7*�^�M*�D��*�D*�M����*���� +:*��+�q���O��*��B�n:**�B�A**�A�[�@*�A*�>�Z**�>2�?**�>2�=*�� +�I� +*+�k:�1*���I�� +:\.*+�\`O�� +:*+�tO*�`:-�<+�b�+,���?�6�� �����'�-�.�4�<�E�F�K�L�O�R�Z�c�p�y������������������������� "!.#3$?!B(G)P.X0_2f3k�:�+7��*+��M:+�b�+�c:+*��**�]��*���I�**��*�C����*��** �]��*���I� *��**�]�*��I� *��=**�*�B�A**�A�[�@*�A*�>�Z**�>2�?**�>2�=**�]��*���I�@**��*�B�Y**�Y�[�X*�Y*�V�Z**�V2�W**�V2�U�*��** +�]Z�N�:*�N�{�/*�N_�v�"�Y*�N����*�N�����,M,��eM*,�h��D*�D�Y,�-��*�D��**�]�5** �]�8**�]�6** �]�7+�b� +���?�19;> +?ABG&I2K>IAPFRPT\UbYlZx[}Z�_�a�b�c�d�g�i�k�l�m�no +i +rv"{:�J�U�Y�]�a�l�{��������������7:HIPK +� �(��0���+oracle/xml/parser/v2/XSLOtherElements.class����-[AHJKLMNOPQRS + + +  + + + +! " +# +$ +% & +' + +( ) +* + 62 ?5 @9 B0 C. D, E- F- G/ I1 U4 V3 W; X4 Z<()I()Ljava/lang/String; ()Loracle/xml/parser/v2/XMLNode;()S()Z(I)Lorg/w3c/dom/Node;H(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)V!(Loracle/xml/parser/v2/XMLNode;)V%(Loracle/xml/parser/v2/XSLTContext;)V'(Lorg/w3c/dom/Node;Z)Lorg/w3c/dom/Node;Code +ExceptionsILineNumberTable$Loracle/xml/parser/v2/XSLStylesheet;Lorg/w3c/dom/NodeList; +SourceFileXSLOtherElements.java appendChild elementTypefallback getDebugFlag getDebugNode getLength getLocalName getNamespace getNodeType$http://www.w3.org/1999/XSL/Transformitemoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLNode!oracle/xml/parser/v2/XSLConstants!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLFallbackoracle/xml/parser/v2/XSLNode%oracle/xml/parser/v2/XSLOtherElements oracle/xml/parser/v2/XSLTContextorg/w3c/dom/Nodeorg/w3c/dom/NodeList +processActionprocessChildren setDebugNode +stylesheettransformChildrentransformMiscElements xmlchildren 627, *+,�*��:"# 8T47Y%M+�� ++�M+*�*+�+��+,��:"() +,/12$&8Y47� �*��=N::::6�_*���N-��E-�:�:�:�*�#�Y*�� +:*�W+�������:N9 +: ;<=>@B-D5F;HBIIKWMfNnOtPw@�58=>PK +� �(���yy$oracle/xml/parser/v2/XSLOutput.class����-�}����������������������������������� +Q +"R +"S #T #U #V #W #X #Y #Z #[ #\ #] #^ #_ #` #a #b #c #d #e #f #g +h +i +j +k +l +m $n #o +p +#q +r +s #t #u #v #w +x +!y #z +{ #| �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � � �� �� �� � �~ �� �� �� �� �� �� �� �� ��()I()Ljava/lang/String;()V()Z(I)V(II)I(II)Ljava/lang/String;&(Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/Object;)Z8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;&(Ljava/lang/String;)Ljava/lang/String;&(Ljava/lang/String;)Lorg/w3c/dom/Attr;(Ljava/lang/String;)V(Ljava/lang/String;)ZV(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Loracle/xml/parser/v2/NSNameImpl;:(Ljava/lang/String;Loracle/xml/parser/v2/XSLStylesheet;Z)VH(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)VI(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;Z)V#(Loracle/xml/parser/v2/XSLOutput;)V'(Loracle/xml/parser/v2/XSLStylesheet;)V1.04.0 +CDATAELEMENTSCode +DOCTYPEPUBLIC +DOCTYPESYSTEMENCODING +ExceptionsHTMLIINDENTLineNumberTableLjava/lang/String;Ljava/util/Hashtable; MEDIATYPEMETHODNO OMITXMLDECLORAHREF +STANDALONE +SourceFileTEXTUTF-8VERSIONXMLXSLOutput.javaYEScdata-section-elementscdataSectionElementscheckCDATASectionElementdoctype-publicdoctype-system +doctypePublic +doctypeSystemencodingequalsget getAttributegetAttributeNodegetDoctypePublicgetDoctypeSystem getEncodinggetExpandedName getIndent getMediaType getMethod getNamespacegetOmitXMLDecl +getOraHref +getStandalonegetValue +getVersionhrefhtml)http://www.oracle.com/XSL/Transform/java/indentindexOf +initializeinternisEncodingSpecifiedjava/lang/Stringjava/util/Hashtablelength +media-type mediaTypemergemethodnoomit-xml-declaration omitXMLDecloraHreforacle/xml/parser/v2/NSNameImpl!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLElement!oracle/xml/parser/v2/XSLConstants!oracle/xml/parser/v2/XSLException!oracle/xml/parser/v2/XSLExprValueoracle/xml/parser/v2/XSLNodeoracle/xml/parser/v2/XSLOutputorg/w3c/dom/Attroutputput resolveQname setMethod +setOraHref +standalone substringtext text/html +text/plaintext/xmlversionxmlyes #"����������������������������������������������������������Q +�,�6�4�7�0�/�5�+�3 +�. �-�1�)�*�( �2��FJK +LOPST#U(V-W2X7Y<ZA[F\K]P5���$*+,�'�� +nk� ���- +*+�&*�E��de b� ���/*�8+�=����� � +���*�9����*�:����1*�;��*�;��� � ����v>*�C�-*�I�6� *�I� *�C�*�I�,�*�C*�C����&  #-2 :!<#���I*�H�>*�I�,� *�H�+*�I�4� *�H�*�I� *�H��*�H��2 - /0/1&2,1/586>5A8D<��*�I������h4*�J�#*�I�6� *�I� *�J�*�J*�J����"��� �#�(�0�2���*�K�����*�N�����n6*�P�+*�I�,� *�P�*�I� *�P��*�P��& � ����%�+�.�1�����B*�I*�P*�;*�N*�H*�9*�:*�Y�%�8*�J*�C��. vw xyz{$|*~7�<�At���- +*�;����� � ����'s+�/�?YM�*,�B�F�I+�5�?YM� +*,�B�P+�+�?YM� +*,�B�;+�3�?YM� +*,�B�N+�.�?YM� +*,�B�H+�)�?YM� +*,�B�9+�*�?YM� +*,�B�:+�A�F �+�2�?YM� +*,�B�K+�-�>�<� *�C�+�-�>�<�*�C+�1�>�<� *�J�+�1�>�<�*�J+�(�>N66- �D6�--�G�O:� +-�O:`6+�M�@:*�8�LW�������(H IJ%K/L;MENQO[PgQqR}S�T�U�W�Y�Z�]�^�]�_�`�b�c�bdegi#m-o3p?oBrLtRv]wiyozr}���"*+�I�� +�����"*+�K�� +����PK +� �(D{��}"}")oracle/xml/parser/v2/XSLParseString.class����-/���������������������������������   "#$%&'()+,-����� + +Dw +Cx +Fx +Jx +Jy +Jz +E{ M| M} M~ +E M� +M� +M� M� +F� +M� +M� +M� +C� +E� +B� +I� +B� +I� +E� M� M� M� M� M� M� M� +F� G� +E� M� +E� +E� +E� +E� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� � � �  +� � � � �  � !� $� *� .� .�()I()Ljava/lang/String;()V()[C(C)Ljava/lang/String;(C)Z(I)Ljava/lang/String;(I)V(ILjava/lang/String;)V((ILjava/lang/String;Ljava/lang/String;)V&(Ljava/lang/Object;)Ljava/lang/Object;&(Ljava/lang/Object;)Ljava/lang/String;(Ljava/lang/Object;)Z8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;(Ljava/lang/String;)I&(Ljava/lang/String;)Ljava/lang/String;(Ljava/lang/String;)Z6(Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)V([CII)V'([CILoracle/xml/parser/v2/NSResolver;)V*Code +ConstantValueEOF +ExceptionsFDIGITFLETTER FMISCNAME +FSTARTNAME FWHITESPACEILineNumberTableLjava/lang/String;Ljava/util/Hashtable;!Loracle/xml/parser/v2/NSResolver; +SourceFileXSLParseString.javaZ[C[Iancestorancestor-or-selfand attribute axisnamesbooleanceilingchartypechild classtypecommentconcatcontainscountcurrent +descendantdescendant-or-selfdivdocumentelement-availableequals exprStartfalse +findAxisIdfindFunctionIdfloor followingfollowing-sibling +format-numberfunction-available +functionnames generate-idgetgetCurrentToken +getLiteral getNumbergetQname)http://www.oracle.com/XSL/Transform/java/idintValueinternisDigitisFirstNameCharisLetter +isNameCharjava/lang/Characterjava/lang/Integerjava/lang/Objectjava/lang/Stringjava/util/Hashtablekeylanglastlength +local-name lookaheadmatchmodname nameSpace +namespace-uri nextTokennodenormalize-spacenotnsrnumberororacle/xml/parser/v2/NSResolver!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLUtil#oracle/xml/parser/v2/XPathException!oracle/xml/parser/v2/XSLConstants%oracle/xml/parser/v2/XSLExprConstants#oracle/xml/parser/v2/XSLParseStringparentposposition precedingpreceding-siblingprevPosprocessing-instructionputresolveNamespacePrefixroundself starts-with +startsWithstrstring +string-length substringsubstring-aftersubstring-beforesumsystem-propertytext toCharArray translatetrueunparsed-entity-urivalueOf MDL!������������ +���������������������� ����4� +�V�FY�P�\�FY�P�U;�/�<�VO�e� �V\.�O�c� �V\.�O���вV.\.�O�V-\.�O�V_\.�O�V�\.�O�\�CY�O�oW�\0�CY�O�oW�\%�CY�O�oW�\"�CY�O�oW�\#�CY�O�oW�\�CY�O�oW�\&�CY�O�oW�\)�CY߷O�oW�\(�CY޷O�oW�\ �CYݷO�oW�\�CY�d�O�oW�U �CYطO�oW�U +�CY׷O�oW�U �CYַO�oW�U�CYշO�oW�U�CYԷO�oW�U�CYӷO�oW�U�CYҷO�oW�U�CYѷO�oW�U/�CYзO�oW�U1�CYϷO�oW�U2�CYηO�oW�U5�CYͷO�oW�\,�CY�i�O�oW�\@�CY�h�O�oW�\�CY�g�O�oW�\ +�CY�f�O�oW�\$�CY�e�O�oW�\-�CY��O�oW�\�CY��O�oW�\�CY��O�oW�\4�CY��O�oW�\<�CY��O�oW�\7�CY��O�oW�\6�CY��O�oW�\�CY��O�oW�\;�CY��O�oW�\:�CY��O�oW�\+�CY��O�oW�\?�CY��O�oW�\�CY��O�oW�\�CY��O�oW�\9�CY��O�oW�\8�CY��O�oW�\=�CY��O�oW�\�CY��O�oW�\�CY��O�oW�\A�CY��O�oW�\3�CYܷO�oW�\>�CY۷O�oW�\�CYڷO�oW�\*�CYٷO�oW��JR3:< A%C(D.E5F>GEHNAXKcLnMyN�R�S�T�U�V�W�XYZ'[9\L`^acblapd�e�f�g�h�g�i�j�k�j�l�mnonp$s7tJu]vpw�z�{�|�}�~������%�7�I�[�m�����������������������������!�39���g/*�N*�n*�Y*�k*+�t�r*�m*+�g�h*,�l��& S? DHVW!X)Y.S�J���b**�N*�n*�Y*�k*+�r*�m*+��h*-�l��& `? DHbcd$e)`���:�U+�]�CM,�,�a���( *+-�J���:�\+�]�CM,�,�a���  "�J���1�EY*�r*�n*�m*�nd�T���J�����*�m=� +*Y�m`�m*�m*�h�*�r*�m4 ���*�m*�h�*�r*Y�mZ`�m4���*�r*�md4� *�md��JY��Q�*�EY*�r*�mdd�T�j*�j��  ++ Mep��J����;*�m<*�r*�m4�c��*Y�m`�m�*�m*�h�*�r*Y�mZ`�m4�c���*�r*�md4�c� +*Y�md�m*�m*�h�Z*�r*�m4.�L*Y�m`�m�*�m*�h�*�r*Y�mZ`�m4�c���*�r*�md4�c� +*Y�md�m*�W�`*�r*�m4.�R*Y�m`�m�*�m*�h�*�r*Y�mZ`�m4�c���*�r*�md4�c� +*Y�md�m*�W�EY*�r*�md�T�b��R����B�S�]�v��������������������%����u*�m<*�r*�m4�d�b*Y�m`�m�*�m*�h�*�r*Y�mZ`�m4�f���*�r*�md4�f� +*Y�md�m�EY*�r*�md�T�b���"����B�S�]�s�����**�m�n*�Y*�m*�h��JY��u�S�*Y�m`�m*�m*�h�*�r*�m4 ���*�r*�m4�*Y�m`�m�*�m*�h��JY��u�S��JY��u*�r*�m4�u�S��Blm +pr)w3vLzY|c}ep�{�}��������J�� +�uL*�i=*�W>**�m�n*�W*�k� +*Y�m`�m*�m*�h�*�r*�m4 ���*�m*�h� +*�i�*�r*Y�mZ`�m4�!9"m$�'m(�)�*S+�,-�.�/<y=p>�@[']0{ +|J}*�m*�h�$*�r*�m4.�*��i*Y�m`�m��*�m*�h�-*�r*�m4�c�*Y�md�m**�_�j*�i�t*.�i�k*,�i�b*[�i�Y*]�i�P*�m*�h�$*�r*�m4=�*ĵi*Y�m`�m�$�JY �Q�*=�i�*�m*�h�$*�r*�m4=�*̵i*Y�m`�m� *<�i*��W��*�m*�h�$*�r*�m4=�*˵i*Y�m`�m� *>�i*��W��*+�i*��W��*-�i*��W�|*{�i�s*}�i�j*�m*�h�/*�r*�m4*�!*��i*�j*�k*Y�m`�m�3**�`�j*�j��JY�*�r�v�R�*�m*�h��*�r*�m4:�*Y�m`�m*�jL**�l+�p�k*�k� +*�k��JY�+�R�*�m*�h�**�r*�m4*�*Y�m`�m*�j*Ƶi��**�`�j*��i�}*��i�t*�m*�h�$*�r*�m4/�*Y�m`�m*��i�H*/�i�?*|�i�6**�i*�j*�k*��W�**�r*�md4�i***�i�^�j*�8�W��*)�i��*(�i��*�7�i*�7�W**�`�j*�m*�h��*�r*�m4:��*Y�m`�m*�jL**�l+�p�k*�k� +*�k��JY ++�R�**�`�j�r*Y�md�m**�`�j*�j�**�_�j*�i�H*Y�m`�m*�m*�h�*�r*�m4 ���*�Y�T*�j �X� *�W�?*�j.�X� *�W�**�j�X� *��W�*�j'�X� *��W*�W��*�m*�h�F*�r*�m4(�8*Y�m`�m***�j�[�i*�i��JY�*�j�R�*�W�x*�m*�hd�V*�r*�m4:�H*�r*�m`4:�8*Y�m`�m***�j�Z�i*�i��JY *�j�R�*ŵW�*��i*�m*�h�*�r*�m4:��*Y�m`�m*�jL**�l+�p�k*�k� +*�k��JY�+�R�*�m*�h�**�r*�m4*�*Y�m`�m*�j*ǵi��**�`�j� +*Y�m`�m*�m*�h�*�r*�m4 ���*�m*�h�U*�r*�m4(�G*Y�m`�m*�k!�q��JY�!�R�**�k!�g�s�k**�k�b�k*ȵW*�i[�o*�i=�f*�iğ]*�W��T*�W��K*�i|�B*�i/�9*�i��0*�W��'*�i(�*�W�*�W� *�WŠ *�Y�*�Y*�i������� +��� �#�-�F�Q�V�X��5�;�E�H�b�l�t�z�}���������������������������������� +� +����5�;�E�H�N�T�W�]�c�f�l�r�u�{�~��������������������  +  +%1JTZ`ckqtz$}&�(�)�&�,�-�/�0�2�3�4�5�6�9�:�;�<�>?A B DEF"G;IEJJKXMhNtO|QS�T�V�X�Y�Z�_�^�f�h�i�h�j�k�j�l mlno$r+wDzN{Z|a}pvwy������������������������%�1�J�T�Z�`�c�k�n�x�����������������������$�6�H�Z�c�h�k�p��J��PK +� �(�L�_(oracle/xml/parser/v2/XSLPatternInt.class����-()F()I(F)Vg(Loracle/xml/parser/v2/XMLNode;FLoracle/xml/parser/v2/XSLTContext;)Loracle/xml/parser/v2/XSLPatternInt;([Ljava/lang/String;)VCode +ExceptionsLineNumberTable +SourceFileXSLPatternInt.java +getAnchorName +getAnchorType getPriorityjava/lang/Object matchPattern!oracle/xml/parser/v2/XSLException"oracle/xml/parser/v2/XSLPatternInt setPriority + + + + +  +PK +� �(��8���'oracle/xml/parser/v2/XSLProcessor.class����-���������������������� +H +H + +H +H +H +I +J +K +L +M +N O P +Q +R +S +T +U + V +W +X +Y +Z +Z + [ + +\ + +] +^ _ + ` + a + b +c +d +e +f +g +h +i +j + k +l +m +n +o +p +q + r +s +t �{ � �� �� �� �� �� �� �� �� �� �� �{ �{ �| �v �z �x �u �} �y �w �{ �� �~ �� �� �{ �� �� �� �� �� �{ �� �� �� �� �� �� �� �� �� �� ��()Ljava/lang/String;$()Loracle/xml/parser/v2/XMLDocument;,()Loracle/xml/parser/v2/XMLDocumentFragment;!()Loracle/xml/parser/v2/XMLError;()Lorg/w3c/dom/Document;()Lorg/w3c/dom/Element;()V(I)Ljava/lang/String;'(ILjava/lang/String;)Ljava/lang/String;(Ljava/io/InputStream;)V(Ljava/io/OutputStream;)V9(Ljava/io/OutputStream;Loracle/xml/parser/v2/XSLOutput;)V(Ljava/io/OutputStreamWriter;)V8(Ljava/io/PrintWriter;Loracle/xml/parser/v2/XSLOutput;)V(Ljava/io/Reader;)V(Ljava/lang/Object;)Z(Ljava/lang/String;I)V(Ljava/net/URL;)V(Ljava/util/Locale;)VN(Loracle/xml/parser/v2/XMLDocumentHandler;Loracle/xml/parser/v2/XSLTContext;)VF(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XMLDocument;)V)(Loracle/xml/parser/v2/XSLEventHandler;)V%(Loracle/xml/parser/v2/XSLNodeList;)V'(Loracle/xml/parser/v2/XSLStylesheet;)Vs(Loracle/xml/parser/v2/XSLStylesheet;Ljava/io/InputStream;Ljava/net/URL;)Loracle/xml/parser/v2/XMLDocumentFragment;n(Loracle/xml/parser/v2/XSLStylesheet;Ljava/io/Reader;Ljava/net/URL;)Loracle/xml/parser/v2/XMLDocumentFragment;l(Loracle/xml/parser/v2/XSLStylesheet;Ljava/net/URL;Ljava/net/URL;)Loracle/xml/parser/v2/XMLDocumentFragment;r(Loracle/xml/parser/v2/XSLStylesheet;Loracle/xml/parser/v2/XMLDocument;)Loracle/xml/parser/v2/XMLDocumentFragment;_(Loracle/xml/parser/v2/XSLStylesheet;Loracle/xml/parser/v2/XMLDocument;Ljava/io/OutputStream;)V^(Loracle/xml/parser/v2/XSLStylesheet;Loracle/xml/parser/v2/XMLDocument;Ljava/io/PrintWriter;)Vr(Loracle/xml/parser/v2/XSLStylesheet;Loracle/xml/parser/v2/XMLDocument;Loracle/xml/parser/v2/XMLDocumentHandler;)Vz(Loracle/xml/parser/v2/XSLStylesheet;Loracle/xml/parser/v2/XMLDocumentFragment;)Loracle/xml/parser/v2/XMLDocumentFragment;g(Loracle/xml/parser/v2/XSLStylesheet;Loracle/xml/parser/v2/XMLDocumentFragment;Ljava/io/OutputStream;)Vf(Loracle/xml/parser/v2/XSLStylesheet;Loracle/xml/parser/v2/XMLDocumentFragment;Ljava/io/PrintWriter;)Vz(Loracle/xml/parser/v2/XSLStylesheet;Loracle/xml/parser/v2/XMLDocumentFragment;Loracle/xml/parser/v2/XMLDocumentHandler;)V%(Loracle/xml/parser/v2/XSLTContext;)V(Lorg/w3c/dom/Node;)V(Z)VCode +ExceptionsLineNumberTable Loracle/xml/parser/v2/XSLOutput;"Loracle/xml/parser/v2/XSLTContext; +SourceFileTERMINATE PROCESSINGXSLProcessor.javaZaddNodeaddSourceContextcontext debugFlagequalserrorexecuteflush flushEventsformatErrorMessage getDocumentgetDocumentElementgetError +getMessage getMessage1getOwnerDocumentgetResultFragmentinitjava/io/IOExceptionjava/io/OutputStreamWriterjava/lang/Objectjava/lang/Stringjava/lang/Throwableoracle/xml/parser/v2/DOMParser oracle/xml/parser/v2/XMLDocumentoracle/xml/parser/v2/XMLErrororacle/xml/parser/v2/XMLNode&oracle/xml/parser/v2/XMLParseExceptionoracle/xml/parser/v2/XMLParser'oracle/xml/parser/v2/XSLDocumentBuilder$oracle/xml/parser/v2/XSLEventHandler!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLNodeList!oracle/xml/parser/v2/XSLProcessor&oracle/xml/parser/v2/XSLSAXPrintDriver"oracle/xml/parser/v2/XSLStylesheet oracle/xml/parser/v2/XSLTContextorg/xml/sax/SAXExceptionoutputparsepopCurrentNodeList +processXSLpushCurrentNodeListpushCurrentNodeList2resetretainCDATASection +setBaseURLsetCurrentNodesetCurrentNode2 setDebugModesetErrorStreamsetEventHandler setLocalesetPreserveWhitespace +setStyleSheet showWarnings!���{�0*�*�Y��!��UWU�����Y�:�=�E-�>+�"�A,�3�[:+*�!�+��(�.�$�<:+*�!�+��,�.�$�:+*�!�+��-�.�$�):*+�7�*- *L*j�J� �����$�*�-�/�I�L�N�g�j�l�����������Y�:�=�E-�>+�"�A,�4�[:+*�!�+��(�.�$�<:+*�!�+��,�.�$�:+*�!�+��-�.�$�):*+�7�*- *L*j�J� �����$�*�-�/�I�L�Ng�jl�� +������Y�:�=�E-�>+�"�A,�5�[:+*�!�+��(�.�$�<:+*�!�+��,�.�$�:+*�!�+��-�.�$�):*+�7�*- *L*j�J� �����$�*�-�/�I�L�N�g�j�l���������C� +Y�N:*+,-�8-�0:���� �������@�Y-+�2�:*+,�8�&��STUP����@�Y-+�2�:*+,�8�&��bcd_����- �,�*:�Y-*�!�:�Y�:,�*�!�1*�!,,� *�!�C*�!�:*�!�;*�!,�?*�!,�@*�!+�F+*�!�%*�!�<�:�,�#����:��:*�!�6�'��ux���bfgikl#n*o3p<qErNsVt^ufvnwuixyz{�|�i�����i�b����C� +Y�N:*+,-�9-�0:��BC DEF����@�Y-+�2�:*+,�9�&��rsto����@�Y-+�2�:*+,�9�&�����~����1��Y-*�!�:�Y�:,�*�!�1*�!,,�/�� *�!�C*�!�:*�!,�?*�!�;*�!,�@*�!+�F+*�!�%*�!�<�:�,�#����:��:*�!�6�'��ux���f$ )!0 3"<#E$M%V&^'f(n)ux+z-�.��2�3�����,*�!�Y+��B�� +������% *�!+�D�� +�����% *�!�G�� +����PK +� �(wKJ"+oracle/xml/parser/v2/XSLResultElement.class����-������������������������������� +U + V +W +X +Y +Z [ \ ] +^ +_ +` +a +b +c +d +e +f +g +h +i +j +k +l +l +m +n +n +o +p +q +r +s +s +t u + +v +w +x +y z { | +} +~ + +� +� +� +� +� +� +� � �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� ��()I()Ljava/lang/Object;()Ljava/lang/String;()Ljava/util/Enumeration;+()Loracle/xml/parser/v2/XMLDocumentHandler;!()Loracle/xml/parser/v2/XMLError; ()Loracle/xml/parser/v2/XMLNode;(()Loracle/xml/parser/v2/XSLEventHandler;()V()Z(I)Lorg/w3c/dom/Node;'(ILjava/lang/String;)Ljava/lang/String;9(Ljava/io/OutputStream;Loracle/xml/parser/v2/XSLOutput;)V&(Ljava/lang/Object;)Ljava/lang/Object;&(Ljava/lang/String;)Ljava/lang/String;)(Ljava/lang/String;)Ljava/util/Hashtable;:(Ljava/lang/String;)Loracle/xml/parser/v2/XSLEventHandler;4(Ljava/lang/String;)Loracle/xml/parser/v2/XSLOutput;(Ljava/lang/String;)V(Ljava/lang/String;)Z(Ljava/lang/String;I)V'(Ljava/lang/String;Ljava/lang/String;)V9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VK(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VN(Loracle/xml/parser/v2/XMLDocumentHandler;Loracle/xml/parser/v2/XSLTContext;)VH(Loracle/xml/parser/v2/XMLElement;Loracle/xml/parser/v2/XSLStylesheet;)V!(Loracle/xml/parser/v2/XMLNode;)V)(Loracle/xml/parser/v2/XSLEventHandler;)V;(Loracle/xml/parser/v2/XSLEventHandler;Ljava/lang/String;)V%(Loracle/xml/parser/v2/XSLTContext;)Vi(Loracle/xml/parser/v2/XSLTContext;Ljava/lang/String;Loracle/xml/parser/v2/NSResolver;)Ljava/lang/String;Code +ExceptionsILineNumberTableLjava/lang/String;"Loracle/xml/parser/v2/XMLAttrList;$Loracle/xml/parser/v2/XSLStylesheet; +SourceFileXSLResultElement.javaaddResultPrefixes attributeattrlist defNamespace elementType +endElementerrorexclude-result-prefixesexcludeResultNamespaceflushgetgetAllNamespaceAttrs getAttributegetAttributeTemplateValue getDebugFlag getDebugNodegetErrorgetEventHandler getLength getLocalName getMessage1 getNamespacegetNamespaceAlias getNodeValue +getOraHref getOutput getPrefix +getXMLHandlerhasMoreElements)http://www.oracle.com/XSL/Transform/java/$http://www.w3.org/1999/XSL/Transform$http://www.w3/org/XML/1998/namespaceinternitemjava/io/FileOutputStreamjava/io/IOExceptionjava/lang/Stringjava/util/Enumerationjava/util/Hashtablekeys +namespaceAttrnattr nextElement +oraOutputNameoracle/xml/parser/v2/XMLAttr oracle/xml/parser/v2/XMLAttrList!oracle/xml/parser/v2/XMLConstantsoracle/xml/parser/v2/XMLElementoracle/xml/parser/v2/XMLError!oracle/xml/parser/v2/XSLConstants$oracle/xml/parser/v2/XSLEventHandler!oracle/xml/parser/v2/XSLException oracle/xml/parser/v2/XSLExprBaseoracle/xml/parser/v2/XSLNodeoracle/xml/parser/v2/XSLOutput%oracle/xml/parser/v2/XSLResultElement&oracle/xml/parser/v2/XSLSAXPrintDriver"oracle/xml/parser/v2/XSLStylesheet oracle/xml/parser/v2/XSLTContextoutput +processActionprocessAttrSetsprocessAttributesprocessChildrenprocessOraOutputprocessSpaceAttrprocessUseAttrSets setDebugNodesetEventHandlerspace startElement +stylesheetuseuse-attribute-setsxmlns �������5*+,�"*�G*�'��3� 40����h�M+�0� ++�1M+*�P*�:N*�@:*�7:-��*+�M+�0�+,�P�+�3:*�T-�;:�-:�S*+�J6 +�W*�% +�D�:�9�<�? +�2�6 +��%+�<*�/: �?�6�9 �$� + +*�G���*�&�6*�&�-*�T*�&�;:  � *�&: * �*�  �F*�-:  �U �E: �A �H� +: +  +�,� +:*�T�;:�:*�*�  +�F �B���*+�L�(+�0�+,�P���49; =>ABC$E1G6H=IBJCMIOSPXQ[SfUk[q]_�b�c�f�e�i�j�i�[�r�t�v�w�y�z~����+�7�B�G�K�T�]�g�l�w�~��7����J�*+�K*�%��*�:�*�7�**�.�I�**�%�5�GN6�~*�%�D�M+�0� ++�1N+,�P,�6:,�<�C:,�9�#� *�#�) �"*�O��,�9� *�N+�0�+-�P�*�G����v�� � +��)�*�5�7�=�J�Q�V�[�a�j�s�z���������������������������E�+�3M+*�I�4N-�Y*�T*�I�>:� Y�=� :�Y�:�Y+�!N�W++�2��=�8�)+-*�I�R+-�Q*+�L-�A��+�'W*�T*�I�>:++�2��=�8�)+,�Q�EH r| �z������-�:�E�H�I�Q�V�Y�\�_�h�m�r�r�|���������������������PK +� �(��c��!�!,oracle/xml/parser/v2/XSLSAXPrintDriver.class����-����������  +   +"#*+/0128CVXYZ\`hiw��abcdefjklmnopqrs +1� +2� +0� +7� +7� +.� +;� +6� 7� :� 9� :� 9� :� :� 9� +7� +7� +.� +7� :� +9� +7� :� :� :� +1� :� +-� :� +7� +0� +-� +9� +9� +9� 3� +9� +4� 3� +9� +/� +9� 3� +9� 3� +4� +9� +4� +9� 7� +-� +9� +8� +-� :� :� 7� +1� +1� +7� +7� +6� +:� +:� :� +:� :� +1� +0� :� +:� +7� +9� :� +-� +.� +-� +7� +7� +7� +7� +7� :� � � � � �     % % & ' ' ,� -� .� 3� 4 6� 7� :) ;) < =� > @� A) B� D� E� F� G� H� I� J� K� L� M� N� O� P� Q� R� R� S� T� U� W) ]� ^� _� g� t u v x� y� y� z� { | } ~) � �) �� �� �) �� � �� �) �� �� �� �� �� �� �� �� �! ">"&'<> ()I()Ljava/lang/Object;()Ljava/lang/String;()V()Z(C)Z(I)Ljava/lang/String;(I)V(II[CI)V(Ljava/io/OutputStream;)V9(Ljava/io/OutputStream;Loracle/xml/parser/v2/XSLOutput;)V(Ljava/io/PrintWriter;)V8(Ljava/io/PrintWriter;Loracle/xml/parser/v2/XSLOutput;)V&(Ljava/lang/Object;)Ljava/lang/Object;&(Ljava/lang/Object;)Ljava/lang/String;(Ljava/lang/Object;)Z8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;,(Ljava/lang/String;)Ljava/lang/StringBuffer;(Ljava/lang/String;)V(Ljava/lang/String;)Z'(Ljava/lang/String;Ljava/lang/String;)V:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V(Ljava/lang/String;ZZ)V (Loracle/xml/parser/v2/NSName;)VB(Loracle/xml/parser/v2/NSName;Loracle/xml/parser/v2/SAXAttrList;)V%(Loracle/xml/parser/v2/SAXAttrList;)V*(Loracle/xml/parser/v2/XMLOutputStream;Z)V(Z)V([CII)V-->/> +; charset=< + + +
        + + + + + + + + + + + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Status   + + + + + + + + + + + + +
        Production
        Ready
        Live (publishes the item)
        + +
        Start Date   + + + + + + + + + + +
          :
        MonthDayYear24-HourMinutes
        + + +
        End Date   + + + + + + + + + + +
          :
        MonthDayYear24-HourMinutes
        + + +
        + +

        + + +
        + + +

      + + + + +

      + +If the user changes the status to "Live" and clicks Submit, the item will +be published to the filesystem. Note that any further changes to the +item will not be automatically reflected in the filesystem; the user must +set the status to "Live" each time he/she wishes to re-publish the item. +

      +If the status is already "Live", and the user changes it to "Production", +"Ready" or "Expired", the item will be unpublished using the + +publish::unpublish_item proc, which will remove any files +that were written when the item was published. Note that this proc is +not recursive; the child/related items of the unpublished item will +remain live. + +

      Scheduling items for release

      + +The Edit Publishing Status dialog also contains two additional fields, +"Start Date" and "End Date". These fields may be used to schedule the item +for future publication and expiration (the default expiration date is one +year in the future). +The +publish::schedule_status_sweep proc can be used to schedule +regular sweeps of the entire content repository for items which must +be published or expired. The proc accepts an optional interval +parameter, which sets the time interval between sweeps in seconds. This +interval can also be controlled by the StatusSweepInterval +in the server's INI file; the default value is 3600 (one hour). The +last line of publish-procs.tcl is in fact + +
      publish::schedule_status_sweep
      +
      + +Thus, the status sweep is always scheduled at server startup, using the +time interval specified in the INI file. Use caution when specifying the +time interval: the status sweep may potentially examine all items +in the content repository, thus consuming most of your server's CPU +time. While lower values of StatusSweepInterval provide more +precise control over the publishing and expiration dates of the item, they +run the risk of slowing the server down to a crawl. +

      +The +publish::unschedule_status_sweep proc (no parameters) may be +used to unschedule the regular status sweeps. + +

      Conclusion

      + +The child, relation and content tags +(defined in publish-procs.tcl provide a mechanism for embedding +child/related items directly in the HTML body of the parent item. While +textual and image items are automatically handled by CMS, custom handlers +should be used to render other mime types. Content items can be +published to the filesystem in order to maximize performance; in +addition, items can be scheduled for publication and expiration using +the CMS UI. + + + + + + + + Index: openacs-4/packages/cms/www/doc/templates/register-item-template.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/register-item-template.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/templates/register-item-template.html 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,66 @@ + + + Registering Templates to Content Items + + + + +

      Registering Templates to Content Items

      + +Templates Tutorial : Registering Templates to +Content Items +
      + +

      Overview

      + +

      Developers may register and unregister templates to a specific +content item for a given context.

      + + +

      Step by Step - Registering a Template to a Content Item

      + +
        +
      1. Register the template to the item's content type for a given context. + (See Associate a template with a + content type.)

        + +
      2. Browse to the item details page of the desired content item. + Click the "Publishing" tab, which contains a listing of templates + registered to the content item and templates registered to the + content type (see Figure 1).

        + +
      3. Under the "Templates Registered to Content Type" section, + click the "Register template to this item" link next to the desired + template. This will register the template to this content item for + the given context. The desired template should now appear under the + "Templates Registered to Content Item" section.

        + +
      4. Browse to the content type with which the template will be + associated. Click on the "Templates" tab to bring up a page listing + templates that are registered to this content type (see Figure 1).

        + +

        +
        Figure 1. Templates Associated with a Content Item. +

        + +
      + + +

      Step by Step - Unregistering a Template to a Content Item

      + +
        +
      1. Browse to the item details page of the desired content item. + Click the "Publishing" tab, which contains a listing of templates + registered to the content item and templates registered to the + content type (see Figure 1).

        + +
      2. Click the "Unregister" link next to the desired template under + the "Templates Registered to Content Item" section to unregister the + template from the content item. The template should only appear in the + "Templates Registered to Content Type" section.

        +
      + +
      + + + \ No newline at end of file Index: openacs-4/packages/cms/www/doc/templates/register-type-template.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/register-type-template.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/templates/register-type-template.html 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,98 @@ + + + Registering Templates to Content Types + + + + +

      Registering Templates to Content Types

      + +Templates Tutorial : Registering Templates to +Content Types +
      + +

      Overview

      + +

      Developers may register and unregister templates to a specific +content type for a given context. Additionally, developers may choose one +template to be the default for a given content type/context.

      + + +

      Step by Step - Registering a Template to a Content Type

      + +
        +
      1. Browse to the folder that contains the template that will be + associated with a content type.

        + +
      2. Check the box under the "Mark" column next to the name of the + desired template. The template should now appear in the clipboard.

        + +
      3. Browse to the content type with which the template will be + associated. Click on the "Templates" tab to bring up a page listing + templates that are registered to this content type (see Figure 1).

        + +

        +
        Figure 1. Templates Associated with a Content Type. +

        + +
      4. Click the "Register marked templates to this content type" link. + This will bring up a page that contains a form for registering any + marked templates to this content type, excluding those that have + already been registered (see Figure 2).

        + +
          +
        • Template is the full path of the template. + This field + is used to identify the template and cannot be edited.

          +
        • Context corresponds to the context the + template will + be used. For example, "Public" context means that the template will + be associated with the current content type for public pages. + As of now, CMS only supports the "public" context.

          +
        + +

        Click "Submit" to register all marked templates to the current content + type. These templates should now appear as the registered templates + for the current content type.

        + +

        + +
        Figure 2. Register a Template to a Content Type. +

        +
      + + +

      Step by Step - Unregistering a Template to a Content Type

      + +
        +
      1. Browse to the content type with which the template will be + disassociated. Click on the "Templates" tab to bring up a page listing + templates that are registered to this content type (see Figure 1).

        + +
      2. Click the "Unregister" link next to the desired template to + disassociate the template from the current content type. The template + should no longer appear in the registered templates listing.

        +
      + +

      Step by Step - Setting a Default Template for a Content Type

      + +
        +
      1. Browse to the content type for which a default template will be set. + Click on the "Templates" tab to bring up a page listing templates that + are registered to this content type (see Figure 1).

        + +

        Alternatively, browsing to a content item of the desired content + type and clicking on the "Publishing" tab will show a listing of + templates registered to the content item and templates registered to the + content type.

        + +
      2. Click the "Make Default" link next to the desired template to + distinguish a template as the default for that content type. The word + "Default" should now appear next to that template (and no other + templates with the same context).

        +
      + +
      + + + \ No newline at end of file Index: openacs-4/packages/cms/www/doc/templates/template-asset-item.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-asset-item.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/template-assets.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-assets.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/template-assets.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-assets.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/templates/template-assets.html 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,92 @@ + +Template Assets Pane + + +

      Templaet Assets Pane

      + +Templates Tutorial : Template Assets Pane +
      + +

      Overview

      + +The Assets pane in the Template UI parses the template's ADP file +and displays statistics about each image. + +

      Step by Step

      + +
        +
      1. Browse to the folder that contains the template in question. +

        +
      2. + +
      3. Click on the Assets pane. The Assets summary appears, + as shown in Figure 1:

        + +

        +
        Figure 1. The Assets summary

        +
      4. + +
      5. The Summary displays the following information about + each asset:

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        ColumnExplanation
        Source FilenameThe filename of the image, as specified in the + <img src=...> tag. +
        WidthThe width of the image, if it was specified
        HeightThe height of the image, if it was specified
        Alt TextThe alternate text that will appear if the user's browser + is unable to display the image
        WidthThe width of the image, if it was specified
        Exists ?Shows Yes if the image + can be accessed in the filesystem at the specified + path; otherwise, shows No +
        Title, Publish StatusIf an item exists in CMS with the same URL as the image, + shows the title and publish status of the image. The title + is a link that leads to the CMS content item which holds the + image. If the item does not exist in CMS, these columns + are blank. +
        + +

        + +
      6. + +
      7. Image titles in the Title column are links that can be followed + to access the content item representing the image (if any). For + example, the "Computer Design Chart" link shown above will lead + to the following item (See Figure 2):

        + +

        +
        Figure 1. The item associated with the image (fragment)

        + + +
      8. + +
      + + + \ No newline at end of file Index: openacs-4/packages/cms/www/doc/templates/template-create.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-create.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/template-data-auto.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-data-auto.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/template-data.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-data.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/templates/template-data.html 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,298 @@ + +Writing Template Datasources + + +

      Writing Template Datasources

      + +Templates Tutorial : Writing Template Datasources +
      + +

      Overview

      + +A template consists of two parts: the ADP page and the TCL executable file. +The purpose of the TCL file is to generate the datasources used by the ADP +page, and to run other setup code. In particular, the TCL file may perform +any of the following tasks: + +
        +
      1. Retrieve the attributes of the current item
      2. +
      3. Run and document database queries
      4. +
      5. Create and process forms
      6. +
      + +

      Retrieving attributes of the current item

      + +When an item is accessed (either by being viewed in the browser or by being +published), the template assigned to the item receives an implicit refrence +to the item's attributes. The TCL file may call +
      content::get_content
      +in order to access the item's attributes. The attributes will be placed in +a onerow datasource (i.e., a TCL array) called content; the live +revision for the item is used to look up the attributes. For convenience, +the TCL file may call +
      template::util::array_to_vars content
      +in order to convert the datasource to local variables, which may be used +as onevalue datasources by the ADP file. +

      +The content datasource is guaranteed to contain the following +fields: + +

        +
      • item_id - The id of the item
      • +
      • revision_id - The id of the live revision + for the item +
      • +
      • content_type - The content type of the item
      • +
      • name - The filename of the item, without + any extension
      • +
      • parent_id - The id of the container for this item
      • +
      • title - The title of the item, which may be blank
      • +
      • description - The description of the item, + which may also be blank. The maximum size for the description is + 4000 characters. +
      • +
      • mime_type - The mime-type of the item, + such as "text/html" or "image/jpeg" +
      • +
      • text - The content blob of the item, in text format. + Be careful when using this attribute - if the content + blob of the item is in fact binary data, the TCL script may crash +
      • +
      • context_id, security_inherit_p, + creation_user, creation_ip, + last_modified, modifying_user, + modifying_ip - The properties of the item's live + revision in acs_objects +
      • +
      + +In addition, any extra attributes defined by the item's content type will +be present in the datasource. For example, if the current item has the +press_release content type, which defines a company_name +attribute, the content datasource will contain a company_name +field. + +

      Content API Pitfalls

      + +The content API may lead to some unexpected behavior if used incorrectly; +some common errors are outlined below. + +

      Updating revisions

      + +The attributes of each revision are cached, in order to improve performance. +This may lead to unexpected behavior. Consider the following scenario: + +
        +
      1. The my_press_release item (item_id = 1) has a live + revision, whose revision_id is 4
      2. +
      3. The item is served in the browser, and the attributes for the revision + #4 are used. The title of the revision is "My Press Release"; this + title is cached along with other attributes
      4. +
      5. Some TCL script executes an update statement on the cr_revisions + table, changing the title of revision #4 to + "The Care and Feeding of Manatees"
      6. +
      7. The item's page is refreshed in the browser. Since the attributes for + the revision #4 are cached, the title shows up as "My Press Release", + even though the title column in the database is set to + "The Care and Feeding of Manatees"
      8. +
      + +To avoid this behavior, TCL and PL/SQL scripts should never update the +cr_revisions table. Instead, the scripts should create a new +revision for the item. + +

      Using connection-specific calls

      + +Sometimes, the item's template may need to retrieve the URL of the current +item, the package key of the active package, etc. Standalone TCL scripts +and templates may use ns_conn or ad_conn in order to +retrieve this information. However, when the item is being published (i.e., +written to the filesystem), the current URL is the URL of the publishing +script (typically, cms/modules/items/publish.tcl), not the URL +of the item itself. Similarly, the data in the ad_conn fields +will pertain to the CMS package. Thus, content items will render correctly +when being previewed in CMS or served directly from the database, but +will not render correctly when published to the filesystem. +

      +To remedy this situation, the TCL file for the item's template should +avoid using [ns_conn url] and other connection-specific calls. +Instead, the TCL file may call content::get_content in order +to retrieve the item_id of the item, and then call +

      set current_url [item::get_url $content(item_id)]
      +Once the item's ID and URL are known, the TCL file may retrieve other +information about the current page by using standard APIs. Note: +This situation could be remedied, but the solution would +involve some nontrivial coding. However, CMS-TCL is frozen, and so no +solution exists at this time. + +

      Manually querying the database

      + +In addition to the item::get_url call mentioned above, the +item namespace provides other procs which retrieve miscellaneous +data about the item. For example, item::get_extended_url can be +used to compute the full URL of the item (including the file extension). +Most of the queries performed by the item procs are cached for +efficiency. In addition, the item procs are more flexible than +hardcoded SQL queries; when the CMS implementation changes (to support +subsites, for example), the implementation of the procs will change, but +the interface will remain the same. +

      +For more information, see the auto-generated +documentation on the item +namespace. + +

      Querying the database

      + +The TCL file may query the database in order to create datasources which the +ADP page will use to render the page. In order to simplify the SQL queries, the +Content Repository provides an "x" view along with each content type. The +view joins together all the attributes of the content type, and contains +all revisions for each content item with the given content type. +For example, consider an index page whose purpose is to serve press releases for +a company. Each press release has the content type press_release +Thus, a SQL query such as +
      select 
      +  title, topic, content_item.get_path(item_id) as press_url
      +from
      +  press_releasesx
      +will select all revisions of all press releases in the system. In order to select +only the live revisions, the TCL file may join with the cr_items table: +
      select 
      +  x.title, x.topic, content_item.get_path(x.item_id) as press_url
      +from
      +  press_releasesx x, cr_items i
      +where
      +  i.live_revision = x.revision_id
      +This query, when executed through the ACS DB API or template::query, +will produce a multirow datasource which the ADP page may then use +to render a list of all available press releases. For example, the template +may use the following markup: +
      <ul>
      +  <multiple name=press_releases>
      +    <li>
      +      <a href="@press_releases.press_url@">@press_releases.title@</a>
      +      (@press_releases.topic@) 
      +    </li>
      +  </multiple>
      +</ul>
      + +resulting in a list of press releases: + + + +Multirow datasources may also be created manually, by using the +template::multirow command. In addition, the template may create +onerow (TCL arrays) and onevalue (TCL variables) datasources; +see the templating system documentation for more information. + +

      Documenting the Datasources

      + +In addition to creating the datasources, the TCL file should document them, +so that the CMS Templates UI may describe them to the user in the +Datasources pane. The format for +datasource documentation is similar to Javadoc: + +
      # @datasource datasource_name datasource_type datasource_comment
      +# @column column_name column_comment
      +# @column column_name column_comment
      +# ...
      + + +The fields are explained in greater detail below: + +
        +
      • datasource_name - The name of the datasource; + must be a valid TCL variable name
      • +
      • datasource_type - Must be multirow, + onerow, onevalue, onelist, + multilist or any other valid datasource type as described in + the templating system documentation
      • +
      • column_name, column_comment - if the + datasource type is multirow, these fields may be used + to describe the individual columns of the datasource. Otherwise, these + fields are ignored.
      • +
      • datasource_comment - The comment describing the + datasource
      • +
      + +For example, consider a fragment of the master-2 template, which +is installed by the CMS Demo: + +
      # @datasource articles multirow
      +# @column location 
      +# @column name
      +# @column title 
      +# This datasource enumerates all articles across all locations
      +#
      +# @datasource location onevalue the user clicked location
      +#
      +# @datasource current_url onevalue
      + +This documentation fragment describes three datasources: articles, +location and current_url. The articles datasource +is a multirow datasource with three columns, location, name +and title. The location and current_url are +both onevalue datasources. +

      +These pseudo-Javadoc tags merely describe the datasources - they do not have +any impact on how the template is actually rendered. However, the tags help +clarify the purpose of the template. The CMS Templating UI will attempt to parse +the template if it detects no pseudo-Javadoc datasource comments; +however, the parsed results cannot compare in quality to human-generated +documentation. + +

      Creating and Processing Forms

      + +In addition to the forms API provided by the templating system, the CMS Forms API +provides various procs designed to automate the content item creation process. +The simplest way to create a new item is to perform the following TCL calls: + +
      content::new_item_form -form_name form_name -contnent_type content_type
      +
      +if { [template::form is_valid form_name] } {
      +  content::new_item form_name
      +  template::forward next_page_url
      +}
      + +This snippet of code will execute the following steps: + +
        +
      1. Construct a blank form for the creation of the new item. The form + is constructed based on form widgets registered to the content type in + the CMS Content Type UI +
      2. +
      3. Validate the form. If any required elements are missing, if any + user-entered values do not match the proper datatypes, or if any + other error occurs, the error will be reported to the user and the form + will not submit +
      4. +
      5. Process the form, creating a new content item and its first revision + based on the user-entered values +
      6. +
      7. Forward the user to the next page in page flow
      8. +
      + +The CMS Forms API also includes other, less powerful but more versatile +procs. For example, content::add_revision_form may be used to +generate a form for editing an existing content item. More help can be +found in the auto-generated documentation of the +content namespace, or +directly in the source code of form-procs.tcl. + + + + + + + + Index: openacs-4/packages/cms/www/doc/templates/template-datasources.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-datasources.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/template-datasources.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-datasources.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/templates/template-datasources.html 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,48 @@ + +Template Datasources Pane + + +

      Template Datasources Pane

      + +Templates Tutorial : Template Datasources Pane +
      + +

      Overview

      + +The Datasources Pane in the Template UI displays the datasources found +in the template. If no datasources are +documented by the developer, +CMS will attempt to parse the template and summarize the datasources +found in it. + +

      Step by Step

      + +
        +
      1. Browse to the folder that contains the template in question. +

        +
      2. + +
      3. Click on the Datasources pane. The Datasource summary appears, + as shown in Figure 1:

        + +

        +
        Figure 1. The Datasource summary

        +
      4. + +
      5. The summary displays each documented datasource in the template, + along with its name, type and an optional comment. For multirow + datasources, each column may also be listed, along with an + optional column comment.

        +
      6. + +
      7. Only partial information will be available for datasources which + are not documented by the developer, as shown in Figure 2:

        + +

        +
        Figure 2. The auto-generated Datasource summary

        +
      8. + +
      + + + Index: openacs-4/packages/cms/www/doc/templates/template-edit.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-edit.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/template-history.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-history.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/template-new.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-new.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/template-options.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-options.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/template-root.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-root.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/templates/template-root.html 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,42 @@ + +Setting Template Root + + +

      Setting Template Root

      + +Templates Tutorial : Setting Template Root +
      + +

      Overview

      + +The Template Root parameter controls the location of the templates +in the filesystem. The directory specified by the Template Root +corresponds to the root of the Templates tree in the CMS UI. Templates +are published to and parsed from this location. + +

      Setting Template Root in standalone CMS

      + +In the standalone CMS, the TemplateRoot is controlled by the +TemplateRoot parameter under the cms section of +the server's INI file. For Example: + +
      [ns/server/cms-simple/cms]
      +TemplateRoot=/web/cms-simple/templates
      + +The syntax is similar if your server uses a TCL file for initialization: + +
      ns_section "ns/server/${servername}/cms"
      +ns_param TemplateRoot $rundir/templates
      + +The TemplateRoot parameter, if absent, defaults to the templates +directory under the run directory of your server. For example, +if the pageroot for your server is /web/fooserver/www, the +TemplateRoot parameter will default to /web/fooserver/templates. + +

      Setting Template Root in CMS-package

      + +The Template Root is controlled by the TemplateRoot parameter of the package. + + + + \ No newline at end of file Index: openacs-4/packages/cms/www/doc/templates/template-upload.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/template-upload.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/type-template-register-2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/type-template-register-2.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/type-template-register.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/type-template-register.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/type-templates.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/type-templates.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/templates/upload-template.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/upload-template.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/templates/upload-template.html 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,55 @@ + + + Uploading a Template to CMS + + + + +

      Uploading a Template to CMS

      + +Templates Tutorial : Uploading a Template to CMS +
      + +

      Overview

      + +Developers can edit existing templates by uploading files via a web browser. +The datasource files (.tcl files) associated with templates (.adp files) +should be maintained locally in the filesystem and ideally placed under +version control. Currently, there is no way to upload datasources +(.tcl files) using CMS although CMS can ascertain important information +from the datasource files. + +

      Step by Step

      + +
        +
      1. Browse to the folder that contains the template to be edited by + uploading a file.

        + +
      2. Click the Upload icon to upload a + new revision for this template.

        + +

        Alternatively, clicking the name of the template and then clicking the + "General" tab will bring up a list of options for that template (see + Figure 1). Click the "Upload" link to upload a revision for this + template.

        + +

        +
        Figure 1. Template Options.

        + +
      3. Choose a local file from which to upload the new version of the + template (see Figure 2). Clicking "Upload" will upload the new version + and clicking "Cancel" will go back to the previous page.

        + +

        Upload a Template +
        Figure 2. Upload Template Page.

        + +
      4. Clicking the "Upload" button adds a new revision to the + template, filling in the template body with the contents of the uploaded + file.

        +
      + + +
      + + + \ No newline at end of file Index: openacs-4/packages/cms/www/doc/templates/upload.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/templates/upload.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/doc/xml/cms-tasks.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/cms-tasks.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/cms-tasks.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,797 @@ + + Task Requirements + + + This document contains a listing of Content Management tasks and + the required permissions to perform them. The tasks are organized + by modules and then main sections/pages within those modules. + + + + This document is currently under construction. + + + + Modules + + + My Tasks + Site Map + + + Folder Listing + Folder Attributes + Item Listing + + + Editing + Sub-Items + Publishing + Permissions + + + + View Revision + + + + Templates + Content Types + Search + Subject Keywords + Users + Workflow + Clipboard + + + + + My Tasks + + + + Action + Required Permission(s) + Other Requirement(s) + + + + + + + Site Map + + + + Action + Required Permission(s) + Other Requirement(s) + + + + + + + + + Folder Listing + + + + + Move marked items to this folder + + + + cm_new on the destination folder + + + cm_write on the marked item + + + + + + Content type of item is registered to destination folder + + Name of item must be unique within destination folder + + + + + + + Copy marked items to this folder + + + + cm_new on the destination folder + + + cm_examine on the marked item + + + + + + Content type of item is registered to destination folder + + Name of item must be unique within destination folder + + + + + + + Link marked items to this folder + + + + cm_new on the destination folder + + + cm_examine on the marked item + + + + + + Item is not a symlink + + Content type of item is registered to destination folder + + Symlinks are registered to destination folder + + Name of item must be unique within destination folder + + + + + + + Rename this folder + + + + cm_write on the folder + + + + + + Name must be unique within the parent folder + + Folder is not a root folder + + + + + + + Delete marked items + + + + cm_write on the marked item + + + + + + Folders must be empty + + Folders are not root folder + + + + + + + Create a new folder within this folder + + + + cm_new on the (parent) folder + + + + + + Subfolders must be registered to parent folder + + Name of folder must be unique within parent folder + + + + + + + Delete this folder + + + + cm_write on folder + + + + + + Folder must be empty + + Folder is not a root folder + + + + + + + Add a new item under this folder + + + + cm_new on the (parent) folder + + + + + + Content type of item must be registered to parent folder + + Name of item must be unique within parent folder + + + + + + + + + Folder Attributes + + + + + Register marked content types to this folder + + + + cm_write on the folder + + +   + + + + + Unregister this content type + + + + cm_write on the folder + + +   + + + + + Edit folder options + + + + cm_write on the folder + + +   + + + + + + + Item Listing + + + + + Preview this content item + + + + cm_examine on the item + + + + + + Item has a live revision + + Item has an associated template + + + + + + + Rename this content item + + + + cm_write on the item + + + + + + Name of item must be unique within parent folder + + + + + + + Delete this content item + + + + cm_write on the item + + +   + + + + + + - Editing + + + + + Edit attributes for this item + + + + cm_write on the item + + + + + + Item must have a previously existing revision + + + + + + + Add a revision to this item + + + + cm_write on the item + + +   + + + + + Assign marked keywords to this item + + + + cm_new on the item + + +   + + + + + + - Sub-Items + + + + + Add a child item + + + + cm_relate on the item + + + + + + At least one child relation type must be registered to the + content type of the item + + + + + + + Relate another object to this item + + + + cm_relate on the item + + At least one item relation type must be registered to the + content type of the item + + +   + + + + + + - Publishing + + + + + Edit the publishing status + + + + cm_item_workflow on the item + + +   + + + + + Register template to this item + + + + cm_write on the item + + cm_examine on the template + + + + + + The template must be registered to the content type of the + item + + + + + + + Unregister template + + + + cm_write on the item + + cm_examine on the template + + +   + + + + + Make this template the default + + + + cm_write on the types module + + cm_examine on the template + + +   + + + + + Create a workflow for this item + + + + cm_item_workflow on the item + + + + + + Item has no associated publishing workflows + + + + + + + Finish / Approve a task + + + + Task must be assigned to user + + + + + + Task must be active + + Task must not be currently checked out by another assigned + user + + + + + + + Steal a task + + + + Task must be assigned to user + + + + + + Task must be active + + Task must be checked out by another assigned user + + + + + + + Add a comment to this item + + + + cm_write on the item + + +   + + + + + + - Permissions + + + + + Grant more permissions to a marked user + + + + cm_perm or cm_perm_admin on item + + +   + + + + + Alter/Revoke permissions + + + + cm_perm or cm_perm_admin on item + + +   + + + + + + + View Revision + + + + + Add content to this item + + + + cm_write on the item + + + + + + The current revision must have no content + + + + + + + + + + Templates + + + + + Action + Required Permission(s) + Other Requirement(s) + + + + + + + + + Content Types + + + + + Action + Required Permission(s) + Other Requirement(s) + + + + + + Add this content type to the clipboard + + + + cm_write on the types module + + +   + + + + + [ Register Widget | Edit Widget | Unregister Widget ] + + + + cm_write on the types module + + + + + + Widget does not belong to a Basic Item attribute + + + + + + + Register marked templates to this content type + + + + cm_write on the types module + + +   + + + + + Unregister template + + + + cm_write on the types module + + +   + + + + + Make this template the default + + + + cm_write on the types module + + + + + + The template is not the default template + + + + + + + Register/Unregister a new item relation type + + + + cm_write on the types module + + +   + + + + + Register/Unregister a new child relation type + + + + cm_write on the types module + + +   + + + + + Register/Unregister MIME type + + + + cm_write on the types module + + + + + + There is at least one unregistered MIME type + + + + + + + Grant more permissions to a marked user + + + + cm_examine on the types module + + cm_perm_admin or cm_perm on the types module + + +   + + + + + Alter user permissions + + + + cm_examine on the types module + + cm_perm_admin or cm_perm on the types module + + +   + + + + + + + + Index: openacs-4/packages/cms/www/doc/xml/custom-interface.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/custom-interface.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/custom-interface.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,270 @@ + + Customizing Item Information Pages and Data Entry Forms + + Once you have the defined a content type for your system, you + can use the generic interface defined by the content management + system for creating, editing and browsing items of that type. If + the generic interface does not meet your requirements, you can + customize part or all it to suit your needs. + + The generic interface for content items includes three general + types of templates, all located under + /cms/modules/items: + + + Forms for all item-related transactions. + + Information pages for displaying information about the + items. The page templates themselves may display little or no + information directly, instead relying on included components. + + Information components for providing access to specific + types information (and associated actions) in the information page. + Components are designed for inclusion in a page (either the generic + information page or a custom one), not for standalone display. + + + + Forms + + The following generic data entry forms are generated by the + system for any content type: + + + + + Page + Description + + + + + + create-1 + Form to enter attributes for a new content item. The widgets + displayed on the generic form are determined by the form metadata + the developer has associated with attributes of the content type. + Includes a radio selection allowing the user to pick a method for + adding the body of the content item. + + + + Signature: + + parent_id: item ID of container item + + + content_type: content type of new item + + + + + + + + + + + content-add-1 + Form to upload or enter the body of a content item. Displays + either a file upload widget or text area depending on user + selection + + + + Signature: + + parent_id: item ID of container item + + + content_type: content type of new item + + all other attributes from previous step (varies by content type) + + + + + + + + + + revision-add-1 + Form to edit attributes of an existing content item. The + widgets displayed on the generic form are determined by the form + metadata the developer has associated with attributes of the + content type. Includes a radio selection allowing the user to pick + a method for editing the body of the content item. + + + + Signature: + + item_id: ID of the item + + + + + + + + + + + attributes-edit + Form to edit the attributes of an existing content item. Copies + the content from the latest revision to the new revision. + + + + Signature: + + item_id: ID of the item + + + + + + + + + + If a custom form is required, you may define it in + /cms/modules/items/custom/<content_type>/ + with the same name as specified above. If a custom implementation of the + form exists, the system will redirect to it. Once the user has been + redirected to your custom form, you may choose to implement any + page flow desired before ultimately redirecting to the item + information page. + + See also the documentation on auto-generated forms. + + + + Information Components + + + + + Component + Description + + + + + + + children + List of links to child items of the current item. Includes a + select widget to add a new child item of an appropriate type. + + + + + templates + Lists templates currently associated with this item by user + context. Includes a link to register-template to change + template assignments. + + + + + permissions + Lists permissions currently associated with this item. Includes + a link to permission-add to add a new permission + record. + + + + + related-links + Lists offsite links related to this item. Includes a link to + add marked offsite links (from anywhere in the Bookmarks tree) to + the list. + + + + + related-items + Lists other items related to this item. Includes a link to add + marked links (from anywhere in the Site Map tree) to the list. + + + + + workflow + + + Gives current workflow status (active, suspended, + finished) + + If a task is currently enabled, gives the name of the task and + the deadline. If the current user is assigned to the task, gives a + link to start the task. + + If a task is currently underway (started), gives the name of + the task, the name of the person undertaking the task, and the + deadline if any. If the current user has started the task, gives a + link to finish the task. + + + + + + + keywords + Lists subject headings assigned to the content item. Includes a + link to add marked subject headings (from anywhere in the Subject + Headings tree) to the list. + + + + + revisions + Lists the n most recent revisions to the item. + Includes controls to change the sort order and number of revisions + to be displayed, as well as links to view a revision in + context. + + + + + journal + Lists all comments made on the item to date. + + + + + wizards + List of special tasks associated with a content item (defined + by a custom component under + custom/<content_type>/wizards). + + + + Any of these components may be incorporated into a custom + information page using the include tag in the page + template: + + +<include src="../../workflow" item_id=@item_id@> + + + Note that item_id is the only parameter required by the + standard information components. + + + karlg@arsdigita.com + + + Last revised: $Id: custom-interface.xml,v 1.1 2001/04/20 20:51:10 donb Exp $ + + + + + + Index: openacs-4/packages/cms/www/doc/xml/data-entry-methods.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/data-entry-methods.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/data-entry-methods.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,405 @@ + + Data Entry Methods + + + Using the cm_form_widget Package + + + The CMS cm_form_widget package can be used to generate + metadata forms for creating items or adding revisions to existing + items. + + + Registering Content Type Attributes to a Form Widget + + + In order for CMS to be able to + generate the metadata forms, it is necessary for each attribute of + a content type to be registered to a form widget via the + register_attribute_widget procedure. + + + +cm_form_widget.register_attribute_widget( + content_type => 'book_report', + attribute_name => 'summary', + widget => 'textarea', + is_required => 'f' +); + + + + content_type used to identify the appropriate + form widget. + + attribute_name is the name of the attribute, + used to identify the appropriate form widget. + + widget is the form widget used to input a value + for a content type attribute. See documentation for ATS form widgets for more info. + + is_required is a flag indicating whether or not + a value is required for the attribute form widget. By default, + attribute form widgetes are not required. + + + + + Customizing the Form Widget + + + Using + register_attribute_widget will use the default values for + the form widget. Usually these default values will be sufficient, + but sometimes it may be necessary to customize the form widget with + the + set_attribute_param_value procedure. + + + +cm_form_widget.set_attribute_param_value( + content_type => 'book_report', + attribute_name => 'summary', + param => 'rows', + param_type => 'onevalue', + param_source => 'literal', + value => 10 +); + + + + content_type used to identify the appropriate + form widget. + + attribute_name is the name of the attribute, + used to identify the appropriate form widget. + + param is one of the following: + + + an HTML tag corresponding to a specific form widget (rows for + textarea, size for select widgets, maxlength for text boxes, + ...) + + an ATS form element tag (refer to the documentation for template::element::create for + more info. + + + + param_type is one of the following: + + + 'onevalue' - The parameter has one value. + + 'onelist' - The parameter is a list of values. + + 'multilist' - The parameter is a list of lists of + values. + + + + param_source is one of the following: + + + 'literal' - The value parameter is treated + literally + + 'eval' - The value parameter is a block of + Tcl code that will be evaluated to produce the actual value(s) for + the form widget param. + + 'query' - The value parameter is a SQL query + which returns a datasource corresponding to the actual value(s) for + the form widget param. + + + + + + + Example - Creating a MIME type pick list for content + revisions + + + To create a pick list of MIME types for the + 'mime_type' attribute of the 'content revision' content type: + + + +begin + + -- register the attribute to a pick list + cm_form_widget.register_attribute_widget( + content_type => 'content_revision', + attribute_name => 'mime_type', + widget => 'select', + is_required => 't' + ); + + -- set the 'options' list + cm_form_widget.set_attribute_param_value( + content_type => 'content_revision', + attribute_name => 'mime_type', + param => 'options', + param_type => 'multilist', + param_source => 'query', + value => 'select + label, map.mime_type + from + cr_mime_types types, + cr_content_mime_type_map map + where + types.mime_type = map.mime_type + and + content_type = :content_type + order by + label' + ); + + -- set the 'size' param + cm_form_widget.set_attribute_param_value( + content_type => 'content_revision', + attribute_name => 'mime_type', + param => 'size', + param_type => 'onevalue', + param_source => 'eval', + value => 'a_tcl_proc_that_gets_the_pick_list_size' + ); + +end; +/ +show errors + + + + + + Using Metadata Forms + + + The CMS is able to generate and process metadata forms based on the + form widgets registered to each attribute of a content type. If the + metadata forms are not sufficient, custom forms can be supplied + instead. + + + + Creating Auto-generated Metadata Forms + + + Generating the metadata forms for creating content items and adding + revisions is done by calling the Tcl procedure: + + + + content::get_revision_form db + content_type item_id form_name + + + The function generates a form based on form widgets associated + with the content type's attributes. If the item_id is + null, then an item_id will be generated automatically. + + Example: + + +# a metadata form for creating new "book report" content types. +form create create_book_report +element create create_book_report item_id -datatype integer + +set db [ns_db gethandle] +content::get_revision_form $db book_report $item_id create_book_report +ns_db releasehandle $db + +if { [form is_request create_book_report] } { + query item_id onevalue "select acs_object_id_seq.nextval from dual" + element set_properties create_book_report item_id -value $item_id +} + + + + + Processing Metadata Forms + + Processing the metadata forms for creating content items and adding + revisions is done by calling the Tcl function: + + + set revision_id + [content::process_revision_form form_name content_type item_id + db] + + + + The function creates an instance of a basic revision, and then + inserts rows into each extended attribute related to that content + type. The function returns the ID of the revision that was just + created. + + Example: + + +# process a metadata form for adding a revision to "book report" content types +if { [form is_valid add_revision] } { + form get_values add_revision item_id + set db [ns_db gethandle] + + set revision_id [content::process_revision_form add_revision book_report $item_id $db] + + ns_db releasehandle $db + template::forward "view_book_report_revision.acs?revision_id=$revision_id" +} + + + + + Form Elements + + The function content::create_form_element may be used + to automatically generate a form element based on the registered + form widget for the element. + This function is useful if you wish to create a custom form for + your content type, while still relying on the automatically + generated widgets (as discussed above) for some elements. + + The function signature is as follows: + + +proc content::create_form_element { + db form_name attribute_name args +} { + ... +} + + + + The parameters to the function are as follows: + + + + + Parameter + Purpose + + + + + + db + The database handle to be used for querying + + + + form_name + The name of the form to which the element will be appended. The + form must have been previously created with the form + create statement. + + + + attribute_name + The name of the attribute for which the form element is to be + created. The form element will have the same name as the + attribute. + + + + The function also accepts the following switches: + + + + + Switch + Value + Purpose + + + + + + -revision_id + A revision id, integer + The id of the revision which will be used to determine the + value for the attribute. This revision will also be used to + discover the content type for the item. + + + + -item_id + An item id, integer + The id of the item whose live revision will be used to + determine the value for the attribute. + + + + -content_type + An object type + The content type of the object to which the attribute + belongs + + + + any other switch + A value appropriate for the switch + Any other switches will be passed directly to the element + create statement. + + + + All the switches above are optional; however, at least one of + the -content_type, -revision_id or + -item_id must be specified (in order for the function to + determine the content type of the object). + + If -revision_id or -item_id are specified, the + value of the created form element will be selected from the + specified revision in the database. + + Note that content::create_form_element will not + automatically perform DML for you in order to update the database; + the DML must be performed manually in your custom form. + + + Example Usage: + + +content::create_form_element $db my_form width -revision_id $revision_id + + + The above code will append a new element, called + "width" to the form named "my_form". It will use + the database handle contained in $db and the revision id + specified in $revision_id in order to display the default + value for the element. + + + + + Index Page + + The generic index page, located at + /cms/modules/items/index is simply a skeleton layout that + includes all available information components (see next section). + (The released system will allow the administator to specify the + components shown to each user of the system). + + In cases where the generic page is inadequate, you can define + your own custom information page at + /cms/modules/items/custom/<content_type>/index. + Whenever the generic index page is requested, the system checks for + the existence of a custom page and redirects to it if it is found. + Note that from there you may link to any number of additional + custom display pages, stored in the same directory or elsewhere. + The only required parameter to your custom page should be + item_id. + + + + + + Index: openacs-4/packages/cms/www/doc/xml/dev-permissions.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/dev-permissions.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/dev-permissions.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,438 @@ + + Using Permissions + + + Overview + + + Permissions provide a way of answering the question, "may the user + X perform some action Y on an object Z" ? The CMS permissions are + built on top of the acs-permissions package of ACS4; CMS + provides extended functionality such as recursive granting of + permissions and verifying permission changes. + + + + + CMS Privileges + + By default, CMS defines the privilege shown below. Other privileges + may be defined by calling acs_privilege.create_privilege + and as_privilege.add_child. Privileges are arranged in a + hierarchial tree; a privilege includes the capabilities of all of + its children. + + + + + + + Privilege + Pretty Name + Description + + + + + + cm_admin + Administrator + Perform any action on any item + + + +     cm_item_workflow + Modify Workflow + Modify or create item workflow; assign/unassign users to/from + workflow tasks. + + + +     cm_perm_admin + Modify Any Permissions + Modify any permissions on the item for any user; similar to the + "owner" concept in UNIX + + + +          + cm_perm + Donate Permissions + Donate own permissions to other users (cannot gain new + permissions); revoke own permissions + + + +     cm_relate + Relate Items + Relate items to this item + + + +          + cm_write + Write + Modify or delete the item + + + + +              + cm_new + Create New Item + Create new items with the current item as the parent (useful + for content creators) + + + + +              +     cm_examine + Admin-level Read + View the item in the CMS admin UI + + + + +              +          + cm_read + User-level Read + View the item in the public pages + + + + + + SQL API: Granting and Revoking Permissions + + A user (the donor) can grant a permission on an item to another + user (the recipient) under the following conditions: + + + The donor has the cm_perm_admin permission on the + item + + + or + + + The donor has the cm_perm permission on the item as + well as the permission he is trying to grant. + + + A user (the revoker) can revoke a permission an item I to + another user (the revokee) under the following conditions: + + + The revoker has the cm_perm permission on the item and + the revokee does not have the cm_perm_admin permission on + the item. + + + or + + + The revoker has the cm_perm_admin permission on the + item and the revokee does not have the cm_admin permission + on the item. + + + The procedures cms_permission.grant_permission and + cms_permission.revoke_permission may be used to grant and + revoke permissions, optionally modifying permissions on only on the + item itself but also on its children. If the conditions above are + not satisfied, these functions do nothing. In addition, + grant_permission automatically removes all children of the + permissions being granted (since the parent permission includes all + their capabilities). Similarly, revoke_permission grants + all children of the revoked permission in order to make sure that + the user does not lose all of his permissions permanently. The + parameters to the procedures are as follows: + + + Procedure cms_permission.grant_permission + + + + item_id + + The item whose permissions are to be changed + + + + + holder_id + + The person who is attempting to grant the privilege + + + + + privilege + + The privilege to be granted + + + + + recepient_id + + The person who will gain the privilege + + + + + is_recursive + + If 't', applies the operation recursively to all child items of + the item (equivalent to UNIX's chmod -r). + If 'f', only affects the item itself. + + + + + + + Procedure cms_permission.revoke_permission + + + + item_id + + The item whose permissions are to be changed + + + + + holder_id + + The person who is attempting to revoke the privilege + + + + + privilege + + The privilege to be revoked + + + + + revokee_id + + The person who will lose the privilege + + + + + is_recursive + + If 't', applies the permission change recursively to all child + items of the item (equivalent to UNIX's chmod -r). + If 'f', only affects the item itself. + + + + + + Function cms_permission.permission_p + + + + item_id + + The item whose permissions are to be checked + + + + + holder_id + + The person whose permissions are to be examined + + + + + privilege + + The privilege to be checked + + + + + Return Value + + 't' if the user has the specified permission on the item, 'f' + otherwise + + + + + + The above documentation may be out of date; a more + up-to-date description of the functions may be obtained using the + package + documentation browser. + + + In addition, whenever a new item is created, its creator gains + the cm_write and cm_perm permissions on the item, + in addition to inheriting all of his permissions from the parent + item. + + + + Example + + For example, let's say that Alice has the cm_admin + permission on a folder "foo". She may perform any action on the + folder, and so she chooses to give Bob the cm_new + permission on the folder. Bob can now view the folder in the CMS + admin UI (since cm_new entails cm_examine), and + he can create new items in the folder, but he cannot give himself + more permissions on the folder. + + Weary with the pressures of administration, Alice decides to + remove her cm_admin permission on "foo". She does so, + automatically gaining cm_write, cm_item_workflow + and cm_perm_admin. + + Bob creates a new folder under "foo", called "bar", using his + newly-acquired cm_new permission on "foo". He + automatically gains cm_write and cm_perm on + "bar"; in addition, Alice's pemissions from "foo" are inherited on + "bar". Even though Bob has cm_perm on "bar", he cannot + revoke any of Alice's permissions, since her cm_perm_admin + permission is higher. + + + + + SQL Implementation + + When a new content item is created, its context_id in + acs_objects is set to the parent_id, and + security_inherit_p is set to 't'. This enables the item to + inherit the permissions from its parent. In addition, the trigger + cr_items_permission_tr assigns the cm_perm and + cm_write permissions to the item's creator, unless no + creator has been specified. + + When permissions are modified for some item, and its + security_inherit_p flag is set to 't', permissions from + the parent item are copied to the child item, and the + security_inherit_p flag is changed to 'f'. This ensures + that individual access control lists are maintained for each + item. + + The grant_permission and revoke_permission + procedures ensure that no duplicate permissions exist in the + cms_permissions table. That is, if the user is granted a + parent privilege, all of its child privileges are removed, since + the parent privilege entails all of the child privileges. + + + + Tcl API: Checking permissions in CMS + + The CMS provides a user interface for modifying permissions; the UI + is described in more detail in the User Guide. + + The simplest way to check if a user has some permission on an + item is to query the database directly: + + +template::query permission_p onevalue " + select cms_permission.permission_p(:item_id, :user_id, :privilege) + from dual" + + + + + In addition, CMS provides a Tcl proc check_access, which + will verify that the user has a certain permission, and redirect to + an error page if the he does not. In addition, + check_accesss creates an array called + user_permissions in the calling frame. The keys of the + array are the privileges, such as cm_admin or + cm_examine, and the values are "t" or "f". The syntax for + calling the function is as follows: + + + + +content::check_access item_id privilege args + + + + where args represents any number of the following switches in any + order: + + + + + + Switch + Values + Purpose + + + + + + + -user_id + The id of some user + The user whose permissions are to be checked; the current user + will be used by the default. + + + + + -db + A valid database handle + The database handle to be used in querying; the proc will + allocate and release a handle if this switch is not specified. + + + + + -return_url + Any URL + If the standard error page is shown (which it is by default), + provide a link back from the error page to this URL + + + + + -passthrough + A Tcl list of name-value pairs + Passthrough for the return URL; soon to be deprecated + + + + + -request-error + none + Indicates that the standard ATS request error should be used + for error messages instead of the CMS error page + + + + + -refresh + none + By default, permissions retreived using check_access + are cached persistently. Specify this switch if you wish to refresh + the cache from the database. + + + + + + Index: openacs-4/packages/cms/www/doc/xml/index.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/index.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/index.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + +]> + + + Content Management System + + + + Jane L. + Doe + +
      jane_doe@arsdigita.com
      +
      +
      + + John S. + Doe + +
      john_doe@arsdigita.com
      +
      +
      +
      +
      + + + Introduction + Briefly answer two questions: + + What does this package do? + How can my business benefit from using it? + + You may want to cut and paste from your requirements doc. + + &overview; + &user-guide; + + + + ACS Administrator's guide + + Documents of interest to site administrators (an installation guide, + for example) should be included here. + + + &install; + &setup-administration; + + + + Developer's guide + + Information for developers (including the requirements and design docs) + should go here. + + &uplevels-namespaces; + &custom-interface; + &dev-permissions; + &publishing-filesystem; + &tutorials; + &requirements; + + +
      Index: openacs-4/packages/cms/www/doc/xml/install.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/install.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/install.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,110 @@ + + Installation + + This document describes how to install the Content Management + System in conjunction with ACS 4.x. + + + Install ACS 4.x + + + + + + + + +CMS is essentially an administrative interface built on the ACS + 4.x data model and stored procedure API. You must download and install ACS + 4.x prior to installing CMS. The ACS 4.x documentation includes an + excellent guide to the entire process of configuring Oracle and + AOLserver in addition to installing ACS itself. + + CMS depends on a variety of core ACS packages, which are included + in the standard ACS 4.x distribution. + + CMS is typically deployed in conjunction with a public web + service built on ACS. CMS can either run on the public web server or + on a dedicated server, using either a separate domain name or port + number from the public server. The production staff uses CMS to + create, manage and deploy content for the public web service. In + either scenario, the public server(s) access the published content in + one of two ways: + + + SQL and the Content Repository API. Provided + your public servers have access to the same database schema as CMS, + you can use SQL queries in conjunction with the Content Repository + API to access content objects and attributes dynamically on a + per-request basis. + + + Publish to File System. CMS can merge published + content with a template chosen by the publisher and write the output + to the file system. The output files may be static HTML, or may + themselves have dynamic includes appropriate for your public web + server(s) (i.e. ADP, PHP, JSP, ASP, SSI, etc.). + + + Note that although you must install ACS 4.x for CMS, you are not + required to use ACS 4.x as part of your public server architecture. + If you choose to publish all content to the file system, a + connection between your public web server(s) and the database is + likewise optional. + + + + + + Downloading and Installing CMS + + The latest release of CMS is always available from the CMS download page or + from the ArsDigita + download page. + + + The Arsdigita Package Manager takes care of all the nitty-gritty + details of installing a package such as CMS. After you have installed + ACS 4.x, it is available at /acs-admin/apm/ on + your server. + + + + + + Getting Started + + After installation, you need to mount CMS using the ACS' site + map. It is available on your server at + + /admin/site-map. CMS uses a few + parameters which you can modify from the same page once you have + mounted it. + + + + karlg@arsdigita.com + + + Last revised: $Id: install.xml,v 1.1 2001/04/20 20:51:10 donb Exp $ + + + + + + + Index: openacs-4/packages/cms/www/doc/xml/overview.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/overview.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/overview.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,183 @@ + + Introduction + + This document provides an overview of how CMS is typically + deployed for a site with highly dynamic content and + personalization. + + + + + + + + + Setup and Customization + + CMS is designed to support content production without the + regular intervention of a developer. Unless your publishing needs + are extremely simple, however, a developer is required initially to + set up and customize the system. + + + Defining Content Types + + The first step in the production process is to define the types + of content that are relevant to a particular application. Examples + of content types include Press Releases, News Stories, Images, and + Product Reviews. A content type definition specifies what kinds of + data may be associated with a content item of that type. This + includes simple attributes, such as author, summary text, + SKU number, etc., as well as valid associations with other + content items, such as between news stories and images or + graphics. + + + + Customizing the Interface + + Successful deployment of any content management system requires + careful anticipation of the needs of the entire publishing team, + including content producers, managers and any number of other + staffpersons across the organization who may be monitoring the + production and deployment process. The system must provide each + class of users with an interface this is both intuitive and robust + enough to provide access to all necessary functions. + + CMS includes a generic user interface designed to meet the basic + needs of the majority of publishing teams. In recognition of the + uniqueness of each organization, it is implemented in a highly + modular fashion that simplifies the task of assembling customized + interfaces. Common examples of customization include: + + + Simplified browsing interfaces that organize content in a + manner specific to a particular content type or categorization + scheme. + + Information display panels that emphasize what is most + important or appropriate for the particular production + context. + + Data entry forms and "wizards" to guide producers through a + specific task or related set of tasks. + + Search pages tailored to the attributes of a specific set of + content types. + + + + + Implementing Presentation Templates + + In addition to implementing an appropriate interface for + managing your content internally, you must implement templates that + specify how content is presented to the public as part of your + application. A presentation template is an HTML document + with special placeholders indicating where content should be + inserted, much like the templates used in a word processor to + generate a form letter or other standard document. The + implementation of presentation templates is typically a + collaborative effort among publisher, developer and designer. The + process is typically as follows: + + + You decide what information you want to present on a page. For + example, "This page has a news story as its centerpiece. On the + marging there is a list of related stories. The page may also + include one or two images." + + The developer implements the database queries to extract the + appropriate content from the database and make it available for + merging with the template. The developer may write a skeletal HTML + layout for the purpose of testing the queries. + + The designer implements a layout for the page in HTML, possibly + based on the skeleton provided by the developer. The initial draft + may be a mockup for illustration purposes only. + + The designer uses the documentation provided by the deveoper to + insert variable names in their proper position in the layout. + + The developer and designer test the template with actual data + and revise as necessary. + + + + + + Data Production + + Data production is the everyday process by which producers enter + content into the system, and managers edit, approve and deploy + content to the public site. + + + + Deployment + + CMS can coexist with your public server infrastructure in a + variety of ways, ranging from total indepedence to tight + integration. + + + Static Content + + Static content consists of pages that, once published, do not + change unless edited manually. Examples of static content typically + include Press Releases and News Stories. At the time of deployment, + CMS can merge content with a presentation template and write it to + the file system as a static HTML file. Your public server + infrastructure can then deliver these pages to users without any + further processing. + + + + Dynamic Content + + Dynamic content consists of pages that are constantly changing + as new content is deployed. These are typically "top-level" or + summary pages that provide links to actual content. These pages + must stay up-to-date without manual editing or intervention. For + dynamic pages, you can query the content repository directly to + ensure that the latest available content is always listed. + Depending on your public server infrastructure, you may opt to + cache this information and refresh it at regular brief intervals, + rather than performing database queries for each user request. + + + + Personalization + + Personalized pages are by necessity highly dynamic. As such, + they invariably need to query the content repository directly to + retrieve content appropropriate for the user who is making the + request. + + + + + Closing the Loop + + Monitoring usage trends is a critical final element to the + production process. Publishers must continually adjust their + content output to adapt to predominant user interests. Actual + logging and reporting of user traffic is dependent on your public + server infrastructure. + + + karlg@arsdigita.com + + + Last revised: $Id: overview.xml,v 1.1 2001/04/20 20:51:10 donb Exp $ + + + + + + + Index: openacs-4/packages/cms/www/doc/xml/page.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/page.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/page.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,83 @@ + + Relating Pages, Content Items and Templates + + Consider the site map for a simple dynamic, content-rich + site: + + + + + + + + Each page in the site map corresponds to an item in the content + repository. Note that the pages in the site map have two basic + relationships to the actual content of the site: + + + + The majority of the pages in the site are dedicated to + displaying the body and attributes of individual content items or + small logical collections of items, such as the photos on an album + page. + + + + In addition to the content pages themselves, publishers must + implement index pages to provide context for the content of the + site. These top-level pages provide an interface for searching and + navigating among the sections of the site and for reaching recent + or featured content. Besides index pages, the site may also have + special pages without a direct relationship to content. + + In order to be represented in the site map and managed in a + consistent fashion, top-level and special pages must also be + represented as content items. In the simplest case, the content + type of these items may just be a Basic Item. This is appropriate + because these pages typically possess little if any content or + special attributes of their own, acting merely as containers for + presenting aggregated summary information. If the top-level pages + of your site do possess special attributes, or if you wish to + constrain the relations on those pages, then you can also employ a + subtype. + + + + + Representing Items as Pages + + There are two necessary conditions for an item to be represented + as a page: + + + + The item must have a unique URL. This is true for all content + items. Just as the absolute path to a file reflects its location + within a directory in the file system, the URL for an item reflects + its position within the hierarchical organization of the + repository. The URL is simply composed of the name of the item + preceded by the names of all its parent items. + + One major difference from a file system is that the URL includes + all parent items, regardless of whether they are folders + or not. This is necessary to ensure that all URL's are indeed + unique. + + + + The item must be associated with a presentation template. For + content pages, the template is typically selected from the one or + more templates that are registered with the items's content type. + For top-level and special pages, the template is typically unique + to the page. + + + + + + + Index: openacs-4/packages/cms/www/doc/xml/press.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/press.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/press.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,63 @@ + + Press Release + + A simple example of defining a custom content type, performing + data entry using a system-generated form and publishing items. + + + Edit in progress... + + + The purpose of this tutorial is to illustrate the basic process + of how CMS is deployed, including both developer preparation and + the content production process itself. + + + Getting Started + + Support files for all demos are located in the demo + directory of the CMS distribution. For this demo, you will need to + execute the press.sql script in the demo/sql + directory. This script uses the content repository API to perform + the following actions: + + + Create a new content type named "Press Release" + + Add a custom attribute, location, to the "Press + Release" content type. + + Specify that the user input for the location should be + a text box. + + Create a few simple pages under the page root. + + Create a folder named press to hold press + releases. + + Create a simple index page and a press release in the + press folder. + + Register a template as the default for the "Press Release" + content type. + + + All these operations are (or will be) accessible through the CMS + UI as well. + + + karlg@arsdigita.com + + + Last revised: $Id: press.xml,v 1.1 2001/04/20 20:51:10 donb Exp $ + + + + + + + Index: openacs-4/packages/cms/www/doc/xml/publishing-filesystem.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/publishing-filesystem.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/publishing-filesystem.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,1027 @@ + + Publishing to the file system + + Note: This document links to the automatically + generated TCL documentation. You may need to + update ATS and regenerate the documentation in order to follow the + links. + + + + Overview + + A typical content item is usually a collection of child items and + related items, as shown in the page relation + document. Therefore, + the template registered to the item has to run multiple SQL queries + in order to retrieve and process all of the child / related items. + In addition to being cumbersome to write, these queries access the + datatbase each time an item is being served, thus slowing down the + site. The publishing API in CMS may be used to solve both of these + problems. + + + Relation, child and content tags + + CMS defines three new ATS tags: child, relation + and content. The purpose of these tags is to signify a + place in the ADP template for the item where a child item, a + related item or the current item's content will be inserted. + + The child tag can be used to include a child item in + the template for the parent item, similarly to the ATS + include tag. The syntax for the child tag is as + follows: + + + The Child Tag + + + <child tag=tag index=n embed args> + + + + + + Parameter + Default value + Description + + + + + + tag + + This parameter is required + + Specifies the relation tag to be used when querying for the + child item. For more information, see the acs-content-repository + documentation, sepcifically the + content_type.register_child_type procedure. + + + + index + 1 + Specifies the index of the item, starting at 1. The index is + based on the order_n of the child relation; the child item + with the lowest order_n has index 1, the item with the + next lowest order_n has index 2, and so on. + + + + embed + no value + Signifies that the child item should be statically embedded in + the current item's template. If this parameter is not specified, + the child item will instead be referenced dynamically, most likely + using the <include> tag. If the embed + parameter is specified, the child item may be written to the file + system (this is done for images, for example). See the discussion + of publishing to the file system + below + for an explanation of how the embed parameter may be + used. + + + + args + no value + Specifies extra parameters to be passed to the template, in + form name1="value1" name2="value2" .... The syntax for + passing these parameters is the same as the syntax for the + include tag. + + + + In order for the child tag to work, the child item must + be published. If the child item is not published, or if any other + error occurs, the child tag is ignored. + + + Child tag example + + For example, consider the following template: + + + + <computeroutput>kid.tcl</computeroutput> + + +request create +request set_param color -datatype text -value "#FFFFFF" -optional +content::get_content +template::util::array_to_vars content + + + + + <computeroutput>kid.adp</computeroutput> + + +<html> +<head><title>@title@</title></head> +<body bgcolor=@color@> + +I am a child + +<table> + <tr bgcolor=@color@><td>@text@</td></tr> +</table> + +</body> +</html> + + + + This template can be used to render a basic item whose context is + readable text. The template takes one parameter, color, + which is used as the background color for the item. Assume that + this template is registered to an item called called "Junior", + whose content is "Hello World !". + + + Now, consider the following template: + + + + <computeroutput>daddy.tcl</computeroutput> + + +content::get_content +template::util::array_to_vars content + + + + + <computeroutput>daddy.adp</computeroutput> + + +<html> +<head><title>@title@</title></head> +<body bgcolor="#FFFFFF"> + +<h4>The child:</h4> + +<child tag=family index=1 embed color="#00FF00"> + +<h4>The parent:</h4> + +@text@ + +</body> +</html> + + + + This template can be also be used to render a basic item whose + context is readable text. In addition, this template assumes that + the current item ahs at least one child item, which is related to + the current item using the family relation tag. Assume + that this template is registered to an item called "Senior", whose + content is "Who's your daddy ?". The diagram below shows all the + aforementioned relationships: + + + + + + + + + + Assuming that the "Junior" and "Senior" items are both + published, the user will see something like + this when requesting + "senior.acs". + + Note that the child item need not be plain text for the + child tag to work. In fact, the tag works with images and + may be extended to handle any mime type, as is discussed + below. + + + + + + Relation tag + + The syntax for the relation tag is almost identical to the + syntax of the child tag: + + + +<relation tag=tag index=n embed args> + + + + All the parameters of the relation tag are identical to + the parameters of the child tag. The only difference + between the two tags is that the child tag handles child + items, while the relation tag handles related items. + + + + + Content tag + + + The content tag accepts no parameters: + + + +<content> + + + + This tag can be used to render the content of the current item. For + example, the kid template + above + can be modified as follows: + + + + <computeroutput>kid.adp</computeroutput> + + +<html> +<head><title>@title@</title></head> +<body bgcolor=@color@> + +I am a child + +<table> + <tr bgcolor=@color@><td><content></td></tr> +</table> + +</body> +</html> + + + + Unlike the @text@ variable, however, the content + tag may also be used to render images and other mime types. The + content tag is treated similarly to the child and + relation tags, with the embed parameter always + present. + + + + + + Basic TCL API + + In order to process the relation and child tags, + the templating system must perform the following steps: + + + Retrieve the item_id of the child/related item + + Render the child item in some way, based on the item's mime + type, possibly performing one of the following tasks: + + + Merge the item with its template + + Write the body of the item to the filesystem + + Pass extra parameters to the item + + etc... + + + + Insert the rendered child/related item into the parent + item + + + Since content tag renders the content of the current item, + it does not need to perform Step 1. + + Steps 1 and 3 are performed by the private TCL proc + publish::render_subitem. In order to accomplish Step 2, + the templating system needs to know how to handle various mime + types. This is accomplished through the use of handlers. + + + Defining-mime type handlers + + + A mime-type handler for a mime type (such as "text/plain" or + "image/jpeg") is a TCL proc, with the following signature: + + + +proc publish::handle::mime_prefix::optional_mime_suffix { item_id args } { + +# Process any additional options passed to the handler + template::util::get_opts $args + +# Perform some calculation to get the HTML for the item + #... + + # Return the rendered HTML for the item + return $html +} + + + + The handler proc takes in an item_id, and any of the + following options: + + + + + + Option + Description + + + + + + + -embed + Signifies that the embed parameter was specified in + the child/relation tag (the embed + parameter is implicit in the content tag). In this case, + the handler should return the static HTML for the item. If the + -embed option is not specified, the handler should insted + return some HTML/ADP code which will dynamically include the item + in the parent item (using the include tag, for + example) + + + + + -no_merge + Usually, the child/related item is merged with its template in + order to produce static HTML. The -no_merge option + signifies that the item should not be merged with its + template. This option is passed by the content tag, in + order to prevent infinite recursion. + + + + + -revision_id id + Specifies the id of the revision which should be used when + rendering the item. If this option is ommitted, the handler is free + to use any revision; the live revision is probably the logical + choice. + + + + In order to determine which handler is to be used for rendering + a particular item, the publishing API first tries to find a proc + with the name + publish::handle::mime_prefix::mime_suffix. + If no such proc exists, the publishing API looks for a proc named + publish::handle::mime_prefix. If this proc does not + exist, either, the publishing API gives up and the item is not + rendered. + + By default, only the handlers publish::handle::image + and publish::handle::text exist in CMS. + + + + Other API + + There are several procs in the publishing API which make it easier + to write handlers: + + + + + + + Proc signature + Purpose + + + + + + + publish::merge_with_template + + Merge the item with its template and return the resulting HTML + block. The same HTML block is shown to the user when the item's URL + is accessed on the CMS server. + + + + + publish::write_content + + Publish the content blob of the specified revision by writing + it to a file under each of the root directories specified under the + PublishRoots parameter in the server's INI file, as described + below. If the parameter does not exist, + the value of the PageRoot is used as the default. If the PageRoot + parameter does not exist, either, the value of [ns_info + pageroot] is used. + + + + + publish::item_include_tag + + Create an <include> tag suitable for including + the item dynamically. The extra_args parameter is a list + of names and values to be passed to the included template, in the + same format as the -html option. + + + + + content::get_content_value + + Returns the content of the revision as a TCL string. Do not + call this function unless the revision has a textual mime type + (such as text/plain, text/html, etc.) + + + + + publish::handle_binary_file + + A helper proc for creating mime handlers for binary mime types; + see the example below. Writes the + content blob of the item to the filesystem, and attempts to merge + the item with its template. If the merge is not possible (or if the + no_merge flag was specified), returns an empty string. The + -embed flag must be specified for this proc. + + + + + Any proc in the item namespace + The procs in the item namespace simplify access to + many properties of a content item, such as the live revision, the + URL, etc. See the item documentation for more + information. + + + + + + Handler Examples + + For example, here is the annotated code for the default text + handler (found in publish-procs.tcl) : + + + + + + + Code + Comments + + + + + + + +proc publish::handle::text { item_id args } { + + + + This is a mime-type handler which will be + used for any textual mime-type, unless a more specific mime handler + exists. + + + + + + template::util::get_opts $args + + if { [template::util::is_nil opts(revision_id)] } { + set revision_id [item::get_live_revision $item_id] + } else { + set revision_id $opts(revision_id) + } + + + + Process the options and determine the + revision id to be used when rendering the item. If no revision id + is specified, use the live revision. + + + + + + if { [info exists opts(embed)] } { + + + + If the -embed option was specified, + render the item as HTML. + + + + + + if { ![info exists opts(no_merge)] } { + set code "publish::merge_with_template $item_id $args" + set html [eval $code] + + + + Unless the -no_merge option is + specified, merge the item with its template, using all the options + which were passed to the mime handler. + + + + + + } else { + set html [content::get_content_value $revision_id] + } + + + + If the -no_merge option was + specified, simply return the content of the revision as a string of + text. + + + + + + } else { + if { [info exists opts(html)] } { + set extra_args $opts(html) + } else { + set extra_args "" + } + set html [publish::item_include_tag $item_id $extra_args] + } + + + + If the -embed option was not + specified, create an <include> tag to dynamically + include the item's template. + + + + + + return $html + + + + All done - return the resulting HTML. + + + + The handler for binary files is somewhat more complicated, since + it needs to write the content blob to the filesystem in addition to + merging the item with its template. The publish::handle_binary_file + proc simplifies this process, and is used in the default image + handler: + + + + + + + Code + Comments + + + + + + + +proc publish::handle::image { item_id args } { + + + + This is a mime-type handler which will be + used for any image mime-type, unless a more specific mime handler + exists. + + + + + + template::util::get_opts $args + + set html [eval publish::handle_binary_file \ + $item_id revision_id url error_msg $args] + + + + Attempt to handle the image automatically. + After the eval returns, the following variables will exist + in the calling frame: + + + revision_id - The revision which was used to render + the item + + url - The URL of the item, including the correct + extension. The item's blob was written to the filesystem at this + URL. + + error_msg - An error message. If this variable + contains the empty string, then no error has ocurred. + + + + + + + + if { ![template::util::is_nil error_msg] } { + ns_log notice "WARNING: $error_msg" + return "" + } + + + + If some kind of error has occurred, log the + error and fail silently. Currently, handle_binary_file + fails under any of the following conditions: + + + The item or its revision could not be found + + The -embed option was not specified + + + + + + + + if { ![template::util::is_nil html] } { + return $html + } + + + + If the item was successfully merged with its + template, return the resulting HTML. It is possible, however, that + -no_merge flag was specified, or the item has no + associated template. This is not an error condition, since the item + can still be rendered in some way. + + + + + + template::query image_info onerow " + select + im.width, im.height, r.title as image_alt + from + images im, cr_revisions r + where + im.image_id = :revision_id + and + r.revision_id = :revision_id + " -cache "image_info $revision_id" + + template::util::array_to_vars image_info + + + + The item could not be merged with its + template. Read the image width, height and title, and output a + custom <img> tag. + + + + + + if { [info exists opts(html)] } { + set extra_html [publish::html_args $opts(html)] + set have_alt [expr [lsearch \ + [string tolower $opts(html)] "alt"] >= 0] + } else { + set extra_html "" + set have_alt 0 + } + + set html "<img src=$url" + + if { ![template::util::is_nil width] } { + append html " width=\"$width\"" + } + + if { ![template::util::is_nil height] } { + append html " height=\"$height\"" + } + + append html " $extra_html" + + if { !$have_alt } { + append html " alt=\"$image_alt\"" + } + + append html ">" + + + + Create an <img> tag which references + the URL where the image was written to the filesystem. Use the + image attributes for the width and height; use the image title for + the alt text, unless an alternate alt text string + was passed in to the handler. Append any other HTML arguments at + the end of the <img> tag. + + + + + + return $html + + + + All done - return the resulting HTML. + + + + While the default mime-type handlers are not very sophisticated, + they are flexible. Mime-type handlers for handling streaming video, + audio, Flash, etc., could be easily written by using the publishing + API, and by following the design patterns shown above. + + Note that, as with any CMS extensions, custom mime-type handlers + should probably placed in a separate TCL file. This way, if and + when publish-procs.tcl is updated, the upgrade process + will be painless. + + + + + + Publishing to the filesystem + + + Since it is possible to generate static HTML for the entire item in + CMS, it is also possible to write the resulting HTML to the + filesystem, producing a static page which requires no special + parsing and no database hits. Such a page could be served much + faster than the dynamic ACS template for the item. + + <computeroutput>publish_revision</computeroutput> + + The publish::publish_revision + proc could be used to accomplish this. The proc takes an + revision_id as an argument, and writes the specified + revision to the filesystem. The filename of the resulting file + consists of three parts: + + + + +/root_path/item_url.file_extension + + + + + + root_path - The file will be + written to each path returned by publish::get_publish_roots + proc. The proc attempts to retrieve the list of publish roots as + follows: + + + From the PublishRoots parameter in the server's INI + file, under the section [ns/server/your_server_name/cms]. + The value of this parameter should be a space-separated list of + directories. For example: + + +[ns/server/my-cms-server/cms] +PublishRoots=/web/my-cms-server/www /web/my-public-server/www /home/my-files + + + + + If the PublishRoots parameter does not exist, the proc + attempts to publish to the page root specified under the + PageRoot parameter in the same config section. + + If the PageRoot parameter does not exist, the proc use + the page root of the server as returned by [ns_info + pageroot]. + + + + + + item_url.file_extension - The value + returned by item::get_extended_url. + The value combines the relative URL of the item as returned by item::get_url, + and a file extension based on the template which is registered to + the item. Note that, by default, get_extended_url uses the + item's mime-type to determine the extension; however, + publish_revision overrides this behavior by specifying the + -template_url option. If there is no template registered + to render the item, the file extension is assumed to be + ".html" + + + For example, assume that the following template is registered as + the default template for the image content type: + + + <computeroutput>image_template.tcl</computeroutput> + + +content::get_content +template::util::array_to_vars content + + + + + <computeroutput>image_template.adp</computeroutput> + + +<html> +<head><title>@title@</title></head> +<body> + +<h2>@title@</h2> +@publish_date@ : @mime_type@ +<p> +@description@ +<p> +<content> + +</body> +</html> + + + + In addition, assume that an image item exists in CMS under + "Sitemap/images/my_snail"; that the server is called "myserver"; + and that the PublishRoots parameter is set to + "/web/my-cms-server/www /web/my-public-server/www". When + the item is published to the filesystem, the following four files + will be created: + + + /web/my-cms-server/www/images/my_snail.jpg - written + by the image handler + + /web/my-public-server/www/images/my_snail.jpg - + written by the image handler + + /web/my-cms-server/www/images/my_snail.html - written + by publish_revision + + /web/my-public-server/www/images/my_snail.html - + written by publish_revision + + + The my_snail.jpg file will contain the actual JPEG image + (presumably, an image of a snail), and the my_snail.html + image will contain HTML code similar to the following: + + + + <computeroutput>my_snail.html</computeroutput> + + +<html> +<head><title>My Snail</title></head> +<body> + +<h2>My Snail</h2> +12/15/2000 : image/jpeg +<p> +Watch my snail frolick happily ! +<p> +<img src=/images/my_snail.jpg width="640" height="480" alt="My Snail"> + +</body> +</html> + + + + + + CMS UI + + In CMS, the publish_revision proc is called each time the + item's publish status is changed to "Live". In order to be + published, the item must satisfy the following requirements: + + + A live revision exists for the item + + If a workflow exists on the item, the workflow must be in the + Finished state. + + If there are any child or item relationships registered to the + item, the min_n and max_n constraints of these + relationships must be satisified. + + + Assuming that these constraints are satisfied, the following panel + will appear under the Publishing tab for the item: + + + + + + + + + + The Edit link in the upper-right corner links to the Edit + Publishing Status dialog: + + + + + + + + + + If the user changes the status to "Live" and clicks Submit, the + item will be published to the filesystem. Note that any further + changes to the item will not be automatically reflected in the + filesystem; the user must set the status to "Live" each time he/she + wishes to re-publish the item. + + If the status is already "Live", and the user changes it to + "Production", "Ready" or "Expired", the item will be unpublished + using the publish::unpublish_item + proc, which will remove any files that were written when the item + was published. Note that this proc is not recursive; the + child/related items of the unpublished item will remain live. + + + + Scheduling items for release + + The Edit Publishing Status dialog also contains two additional + fields, "Start Date" and "End Date". These fields may be used to + schedule the item for future publication and expiration (the + default expiration date is one year in the future). The publish::schedule_status_sweep + proc can be used to schedule regular sweeps of the entire content + repository for items which must be published or expired. The proc + accepts an optional interval parameter, which sets the + time interval between sweeps in seconds. This interval can also be + controlled by the StatusSweepInterval in the server's INI + file; the default value is 3600 (one hour). The last line of + publish-procs.tcl is in fact + + + + +publish::schedule_status_sweep + + + + Thus, the status sweep is always scheduled at server startup, using + the time interval specified in the INI file. Use caution when + specifying the time interval: the status sweep may potentially + examine all items in the content repository, thus consuming + most of your server's CPU time. While lower values of + StatusSweepInterval provide more precise control over the + publishing and expiration dates of the item, they run the risk of + slowing the server down to a crawl. + + The publish::unschedule_status_sweep + proc (no parameters) may be used to unschedule the regular status + sweeps. + + + + + Conclusion + + The child, relation and content tags + (defined in publish-procs.tcl provide a mechanism for + embedding child/related items directly in the HTML body of the + parent item. While textual and image items are automatically + handled by CMS, custom handlers should be used to render other mime + types. Content items can be published to the filesystem in order to + maximize performance; in addition, items can be scheduled for + publication and expiration using the CMS UI. + + + + + + Index: openacs-4/packages/cms/www/doc/xml/requirements.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/requirements.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/requirements.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,239 @@ + + Content Management System Requirements + + by Karl Goldstein + + + Introduction + + This document lays out the requirements for a content management + system (CMS). A CMS is a client application that allows + non-technical members of a web site publishing team to create, + manage and deploy all types of content using a single consistent + interface. + + + + Vision Statement + + Rich content exerts a powerful draw on web users, and is a key + asset for most high-profile sites. Most corporate web sites are + supported by a publishing team that may include authors, editors, + designers, developers and managers. The CMS should improve the + productivity of all members of the publishing team by allowing them + to accomplish their respective tasks without the need for regular + developer intervention. It should also maximize the quality and + accessibility of content by allowing publishers to enforce standard + production workflows, as well as by providing publishers with + effective tools for organizing, categorizing and scheduling + content. + + + + System/Application Overview + + The basic functions provided by the CMS include: + + + Content workflow management + + Content data entry and upload interface + + Version control + + Template management + + Scheduled and manual deployment of content to public + server(s) + + Classification and linking of content items + + Site organization tools + + + + + Dependencies + + The CMS has the following dependencies: + + + Oracle 8.1.6 or higher. + + AOLserver 3.0 or higher (ArsDigita distribution). + + ArsDigita templating and form builder API (Tcl). + + ACS 4.x kernel data model and stored procedure API. + + ACS 4.x workflow data model and stored procedure API. + + ACS 4.x content repository data model and stored procedure + API. + + + + + Use-cases and User-scenarios + + The CMS has the following general classes of users: + + + + Authors have the ability to browse content and perform + data entry in particular sections of the site map. Their access to + administrative portions of the application is limited. + + + + Managers have administrative access that may be limited + to a particular section of the site map. + + + + Administrators have full access to all functions of the + system. They may manage users and departments, determine access + levels to all parts of the site, manage content type definitions, + and override the settings and actions of other users. + + + + + + Competitive Analysis + + Content management is a critical battleground in the enterprise + software arena. Companies including Broadvision, Vignette, Blue + Martini, OpenMarket/FutureTense, Interwoven and Allaire all offer + highly polished, heavily marketed solutions, all of which are + expensive and proprietary. Zope is a widely recognized open-source + alternative, but it lacks a formal content management interface and + is further constrained by scalability issues. + + The CMS has two key advantages that together provide an + advantage over the competition: + + + It is open-source and easy to extend or customize to meet a + particular client's needs. + + It is built on a highly scalable architecture (Oracle). + + + + + Related Links + + + Design document + + Developer's guide + + User's guide + + Test plan + + Competitive system(s) + + + + + Requirements: Data Model and Stored Procedure + API + + The data model and data manipulation requirements for CMS are + largely met by the ACS 4.0 foundation on which it is + constructed: + + + The ACS Kernel package provides a generic persistence + mechanism for typed objects, along with access control and + logging. + + The ACS Workflow package provides a flexible engine for + defining and managing workflows. + + The ACS Content Repository provides storage and methods for + manipulating content data and attributes. + + + The additional database-level requirements for the CMS are + solely related to storing and managing additional information + associated with the user interface: + + 10.10 Form Metadata + + + + Requirements: User Interface API + + The ACS Templating package provides a general foundation for + the CMS User Interface API, simplifying the task of customizing and + extending the standard user interface. Some additional requirements + are specific to the CMS. + + 20.10 Form Generation + + 20.20 Form Generation + + 20.30 Form Processing + + 20.40 Content Retrieval + + 20.50 Content Publishing + + + + + Requirements: User Interface + + + + + Revision History + + + + + + Document Revision # + Action Taken, Notes + When? + By Whom? + + + + + + 0.1 + Creation + 09/15/2000 + Karl Goldstein + + + + + + + + karlg@arsdigita.com + + + + + + Last modified: $Date: 2001/04/20 20:51:10 $ + + + + + + + + + Index: openacs-4/packages/cms/www/doc/xml/setup-administration.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/setup-administration.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/setup-administration.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,526 @@ + + Setup and Administration + + + Defining Content Types + + + Content Types + + + Predefined Content Types + + The ACS content repository package includes two pre-defined content types, + the basic item -- or content_revision + type -- and the + image type. Other predefined content types + include the acs_message_revision, + which is used by the ACS messaging package. All other content types should + have content_revision as an ancestor type. + + + + + + Using Methods from the <computeroutput>content_type</computeroutput> package + + +You may also define content types to suit your own needs by using +the create_type procedure in the +content_type package: + + + +procedure create_type ( + --/** Create a new content type. Automatically create the attribute table + -- for the type if the table does not already exist. + -- @author Karl Goldstein + -- @param content_type The name of the new type + -- @param supertype The supertype, defaults to content_revision + -- @param pretty_name Pretty name for the type, singular + -- @param pretty_plural Pretty name for the type, plural + -- @param table_name The name for the attribute table, defaults to + -- the name of the supertype + -- @param id_column The primary key for the table, defaults to 'XXX' + -- @param name_method As in acs_object_type.create_type + -- @see {acs_object_type.create_type} + --*/ + content_type in acs_object_types.object_type%TYPE, + supertype in acs_object_types.object_type%TYPE + default 'content_revision', + pretty_name in acs_object_types.pretty_name%TYPE, + pretty_plural in acs_object_types.pretty_plural%TYPE, + table_name in acs_object_types.table_name%TYPE, + id_column in acs_object_types.id_column%TYPE default 'XXX', + name_method in acs_object_types.name_method%TYPE default null +); + + + + content_type denotes the name + of the new content type you wish to define. + supertype + defaults to content_revision, + the root object type for content types. + + + Content types can also be defined by sub-classing other + content types -- i.e. sub-types of the + content_revision object + type. Sub-classing another content type + gives the designer the added benefit of any + pre-existing attributes associated with the sub-typed + content type. + + [include a compelling example of why that might be a good idea] + + + + + + Example + + Here's an example of a content type definition; we made cr_demo_article_image a sub-class of the image content type so that it would inherit the properties of a basic image, but also included the caption field for text information to be included with the image: + + + + +declare + attr_id integer; +begin + + content_type.create_type ( + content_type => 'cr_demo_article_image', + supertype => 'image', + pretty_name => 'Captioned image', + pretty_plural => 'Captioned images', + table_name => 'cr_demo_article_images', + id_column => 'article_image_id' + ); + + attr_id := content_type.create_attribute ( + content_type => 'cr_demo_article_image', + attribute_name => 'caption', + datatype => 'text', + pretty_name => 'Caption', + pretty_plural => 'Captions' + ); + + cm_form_widget.register_attribute_widget( + content_type => 'cr_demo_article_image', + attribute_name => 'caption', + widget => 'text', + is_required => 't' + ); + +end; +/ +show errors + + + The other procedural calls, content_type.create_attribute +and cm_form_widget.register_attribute_widget are used for creating +content type-specific attributes and for + +registering those attributes with the CMS form-builder. + + + + + + + Attributes + Content types are largely distinguished by the attributes and methods associated with +the type. CMS features convenient form-generating functions that build forms that request for +values appropriate for each content type's attributes; in order to do this, CMS requires +that content type +attributes be registered in the database. + + + Registering Attributes for Your Content Type + + + Register content type attributes with the + create_attribute function in the content_type + package: + + +function create_attribute ( + --/** Create a new attribute for the specified type. Automatically creates + -- the column for the attribute if the column does not already exist. + -- @author Karl Goldstein + -- @param content_type The name of the type to alter + -- @param attribute_name The name of the attribute to create + -- @param pretty_name Pretty name for the new attribute, singular + -- @param pretty_plural Pretty name for the new attribute, plural + -- @param default_value The default value for the attribute, defaults to null + -- @return The id of the newly created attribute + --*/ + content_type in acs_attributes.object_type%TYPE, + attribute_name in acs_attributes.attribute_name%TYPE, + datatype in acs_attributes.datatype%TYPE, + pretty_name in acs_attributes.pretty_name%TYPE, + pretty_plural in acs_attributes.pretty_plural%TYPE default null, + sort_order in acs_attributes.sort_order%TYPE default null, + default_value in acs_attributes.default_value%TYPE default null, + column_spec in varchar2 default 'varchar2(4000)' +) return acs_attributes.attribute_id%TYPE; + + + + + content_type + contains the name + of the content type with which the attribute is associated. + + datatype should contain the + one of the keyword datatype values contained in the + acs_datatypes + table, e.g. boolean, date, + integer, + money. If you wish to designate a datatype not already recorded in + the acs_datatypes table, be sure to + first insert your datatype into the + table before registering your attribute. + + + + +content_type.create_attribute returns the +attribute_id associated with your newly created attribute. See +Defining Content Types [put ref links here to ch 2.2.1 when you learn how +to do that] for an example of content_type.attribute_create in use. + + + + + + + + File Types + + + CMS Default Mime Types + + + A listing of file types, or mime types, whose storage is supported by the ACS content +repository is stored in the cr_mime_types table. The ACS +Content Repository supports four pre-registered mime types: plain and html text, as well as +image GIFs and jpegs. The CMS News Demo also registers upon installation a few +mime types designating audio files and video files: + + + +begin + + /* Insert audio and video MIME types */ + dbms_output.put_line('Inserting audio and video MIME types...'); + + insert into cr_mime_types ( + label, mime_type, file_extension + ) values ( + 'Wave Audio File','audio/x-wav','wav' + ); + + insert into cr_mime_types ( + label, mime_type, file_extension + ) values ( + 'Basic Audio File','audio/basic','au' + ); + + + insert into cr_mime_types ( + label, mime_type, file_extension + ) values ( + 'QuickTime Video','video/quicktime','qt' + ); + + insert into cr_mime_types ( + label, mime_type, file_extension + ) values ( + 'Mpeg Video','video/mpeg','mpg' + ); + +end; +/ +show errors + + + + + + Registering Mime Types to Your Content Types + + + Each content + object stored in CMS -- such as an image, text article or movie clip -- must + be associated with a specific mime type. Also, each content type + must also be pre-registered + with all of the possible mime types with which that content + type might be associated. For example, + the image content type is registered to + hold jpeg and gif files, + but each instance of the image + type -- that is, each image revision + stored in the CMS -- will contain only one file of either the jpeg or gif file type. + + + Use content_type.register_mime_type to register + pre-defined mime types with your newly created content type: + + +procedure register_mime_type ( + content_type in cr_content_mime_type_map.content_type%TYPE, + mime_type in cr_content_mime_type_map.mime_type%TYPE +); + + + + If the mime type you wish + to register is not yet defined in the ACS content repository, define it by inserting a row + in the cr_mime_types table as you saw done in + CMS Default Mime Types. + + + + + + + + Templates + + + Overview + Each piece of content requires atleast one template on which to be displayed before + the content piece can be published by CMS. Templates serve as the framework upon which + a content item is mounted. Templates are associated to content types, and each + individual content + item published by CMS will be displayed upon one of the templates associated to its content + type. Multiple templates can be associated to multiple content types, allowing a single + piece of content to be framed upon multiple templates, such as an image published with + borders of various colors, or a single template to display multiple content types, such + as using a common background for all text, images and video feeds. + + + + + Registering Templates to a Content Type + + Register templates through the CMS clipboard system, first by marking or adding + items to the CMS clipboard, then by clicking on by going to the "Templates" tabbed page + of the appropriate content type. + + + + Adding Templates to the Clipboard + + Templates can be marked for addition to the clipboard by opening the folder in which + the template is contained. A listing of templates and folders will appear in the main + right-side widow, a listing which includes a column of checkboxes for adding selected + templates to the clipboard. + + + + + + + + + + The above screenshot displays the contents of my /articles + folder, which contains three templates already added to the + clipboard. + + + + + Registering Templates from the Clipboard + + + Find the "Templates" page of your content type + by first expanding the Content Types folder (and perhaps other sub-folders) + on the CMS navigation tree, clicking on the folder or label for your content type, and then + clicking on the light blue "Templates" tab in the main frame. With your mouse, point and + click on Register marked templates to this content type, and then choose + select from the clipboard the templates you wish to register. + + + + + + + + + + The Template section of the Basic Item content type. + + + + + CMS News Demo Templates + + Though CMS does not come with any prepackaged templates, the CMS News Demo + package does contain a variety of news article templates that include image and + multimedia link tags. These templates can be found under + /cms-news-demo/templates/demo_articles in the + News Demo package. + + + + + + + + &data-entry-methods; + + + + Relationships + + + Overview + + Many applications of the content repository require that content items + be related to each other as well as to other classes of objects. Examples include: + + + Content to non-content object: + User portraits are linked to specific users. + Content to content: + An article may be linked to any number of photos or + charts that are embedded in the article. + Content within content: + A long article is divided into multiple sections, each of + which is intended for separate display. + Multiple content items to a category: + News stories may be linked to other stories on the same topic. + + + When relating content types, it is important to establish whether + your related items of content can exist separately of each other, such as an + article and piece of stock footage or photography, or whether the one of the + content items should exist only within the context of another, as in the example + from above of a sectioned article with individual portions meant for separate display. + We refer to these latter relationships as parent-child relationships. + The former can be generically grouped as Item-Object Relationships; + relationships between items of content to non-content objects (example 1) would + also fall under this category. + + Of the above examples, the first three types of relationship are handled + by the content_type package API, and the + last managed through CMS itself. + + + + + Item-Object Relationships + + Define item-object relationships with the + content_type.register_relation_type API: + + +procedure register_relation_type ( + content_type in cr_type_relations.content_type%TYPE, + target_type in cr_type_relations.target_type%TYPE, + relation_tag in cr_type_relations.relation_tag%TYPE default 'generic', + min_n in integer default 0, + max_n in integer default null +); + + + + content_type + refers to the name of the content type from + which the relationship originates. + target_type + takes the name of the object type to which the content is related. + relation_tag + accepts a simple token identifier used in distinguishing relationships + min_n and + max_n refer to the + minimum/maximum relationships of this type required before the item of + content goes live. + + + After a relationship between one content type and another + object type (content or not) has been registered, you may use + content_item.is_valid_relation to confirm + potential relationships. + + + + + Parent-Child Relationships + + Parent-child relationships are also registered using the + content_type package API: + + + +procedure register_child_type ( + parent_type in cr_type_children.parent_type%TYPE, + child_type in cr_type_children.child_type%TYPE, + relation_tag in cr_type_children.relation_tag%TYPE default 'generic', + min_n in integer default 0, + max_n in integer default null +); + + + The parameters for content_type.register_child_type + are largely analagous to those for content_type.register_relation_type + , except parent_type and + child_type must both be content types ( + content_revision or a sub-class of it). + content_item.is_valid_relation can also be used to verify the validity + of a potential parent-child relationship. + + + + + + + + Register Staff Users + [This document is still under construction] + + + + Defining Workflows + + + Departments + + + + + Roles + + + + + + Structuring the Site Map + + + Folders + + + + &user-permissions; + + + Content Types + + + + + &cms-tasks; + + + + + Index: openacs-4/packages/cms/www/doc/xml/templates.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/templates.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/templates.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,161 @@ + + Template Management + + Content is published by merging data with templates + that specify the format and layout of the finished page. A template + is a text file consisting largely of static text and markup such as + HTML, WML, SGML or XML. The template also has strategically + positioned placeholders dictating the position of content + attributes and data. + + There are two basic types of templates: + + + + Templates associated with specific content types. The template + contains placeholders for each attribute associated with a content + item of that type. For example, the template for a news story may + contain placeholders for a title, byline, image, and the body of + the story. The template may also incorporate other related dynamic + data, such as lists of related links or information such as stock + quotes, pricing or inventory. + + A content type may be associated with multiple templates, + enabling publishers and users to choose the presentation of each + item individually depending on context, device or any other + criteria. + + + + Templates associated with individual pages. The template is + applied only to a specific page on the site. Typically these pages + display summary information, such as top-level pages that list the + title and description of recent content added to the site. These + pages may also be highly personalized, providing links to relevant + content or displaying specific data based on a user's profile and + preferences. + + + + Production templates are stored in the file system under a + special directory known as the template root. Additional + directories may exist under the template root to further organize + the entire set of templates used by a site. + + + Tool Summary + + CMS includes a set of basic tools for managing the production + and deployment of templates: + + Organization. Templates may be organized into folders, + reflecting their location under the template root once they go into + production. Since the templates are never viewed directory from a + public server, this organization does not necessarily correspond to + what is specified in the site map. + + Versioning. Before templates go into production, drafts + are stored in the database. A full revision history is maintained, + enabling designers or managers to track changes and revert to + previous versions. + + Data Dictionary. Designers may review the data sources + available to a template, so they know the set of valid placeholders + to embed in the markup. + + Asset Management. Templates may include static references + to graphics, sounds, animation or other media assets that are also + managed with CMS. Designers and managers can view and manage asset + dependencies for a template. + + Deployment. The live version of a template is always + written to the file system, from where the system may use it for + publishing to either the file system or directly to clients. + + + + Template Development + + The typical process of developing a template for use with CMS is + as follows: + + + + Information design. The first step is to decide on the + information that the template will present. + + For a reusable template applicable to any item of a particular + type, this may include the following: + + + The body of the content item. + + Attributes of the content item, such as the author, title and + publication date. + + Links to related items. + + Keywords and other metadata for inclusion in the META tags of + the document. + + + For individual page templates, the information may be anything. + Index pages may query for the latest items publishing in a section, + or for featured items previously selected by the publishing + team. + + + + Implement data sources. The product of the information + design step is a list of data sources. A data source is + typically a database query, but may be modified or created in + procedural code as well (see the templating system documentation + for details). + + The data sources are implemented in a Tcl script that must + reside in the directory where the template is written when + published. CMS does not currently provide any UI for management of + the Tcl scripts. This must be done with CVS. + + The developer should document each data source using the + documentation directives provided by the templating system. CMS + parses these directives and presents the documentation to the + designer in the UI. + + + + Write template. The first simple prototype of the + template itself is typically written by the developer for the + purpose of debugging the Tcl script. The developer may create this + file in the file system, and then use the CMS UI to read it into + the repository as the first revision of the template. + + + + Revise template. Once the initial version of the template + is created, the designer may either edit the template in the + browser, or more likely, download the template and edit it in a + client editor and then upload it again to test. + + + + + + Associating Templates with Content Items + + + As mentioned earlier, templates can be associated with a specific content + type or an individual page (content item). In order to associate a + template to a specific content item, the template must first be + associated with that item's content type. + + + + + + + Index: openacs-4/packages/cms/www/doc/xml/top.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/top.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/top.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + +]> + + + Content Management System + + + + + Introduction + + + Overview + Briefly answer two questions: + + What does this package do? + How can my business benefit from using it? + + You may want to cut and paste from your requirements doc. + + + &overview; + &user-guide; + + + + + ACS Administrator's guide + + + Overview + + + Documents of interest to site administrators (an installation guide, + for example) should be included here. + + + + &install; + &setup-administration; + + + + Developer's guide + + + Overview + + + Information for developers (including the requirements and design docs) + should go here. + + + + &uplevels-namespaces; + &custom-interface; + &dev-permissions; + &publishing-filesystem; + &tutorials; + &requirements; + + + Index: openacs-4/packages/cms/www/doc/xml/tutorials.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/tutorials.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/tutorials.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,46 @@ + + Tutorials + + The tutorials in this section are intended to illustrate a + variety of common scenarios in which CMS may be applied. + + + Getting Started + + Support files for all demos are located in the demo + distribution of the CMS distribution. Before attempting any of the + tutorials, you must do the following: + + + + Execute demo/sql/demo.sql in the appropriate database + schema. This script creates a folder under the template root to + store demo templates. It also creates an instance of a master + template under this folder, and registers this template for use + with all basic content items. + + + + Link demo/templates to the demo directory + under the template root in the file system: + + +ln -s `pwd`/ats/resources templates/ats + + + This contains all the templates used in the demos. + + + + + &press-tutorial; + + + + + + Index: openacs-4/packages/cms/www/doc/xml/uplevels-namespaces.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/uplevels-namespaces.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/uplevels-namespaces.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,1036 @@ + + Uplevels, Namespaces, Arrays, and pseudo-OOP in Tcl + + + Overview + + The Tcl language is fairly good at string manipulation, but it + fails to provide advanced data structures and object-oriented + features, which often make code a lot more manageable. Using the + uplevel / upvar + and namespace commands, + in conjunction with the Tcl "array" data structure, it is possible + to create code which mimics the most basic elements of OOP: methods + and attributes. A large portion of ATS is built using this + approach. + + + + Namespaces + + The namespace + command is very similar to the namespace command in C. The command + is used to create a new lexical scope; all variables and procs + within the namespace cannot interfere with any variables and procs + in any other namespace. The syntax to create a new namespace is as + follows: + + +namespace eval namespace_name { + tcl_code +} + + + + Qualifying + + In order to access procedures defined inside a template, you must + prefix them with the template name, as follows: + + + + +namespace_name::proc_name args + + + + + This is known as "qualifying" the procedure name. + + + For example, consider the following code: + + +namespace eval apple { + proc eat { name } { + return "$name just ate an apple" + } +} + +namespace eval orange { + proc eat { name } { + return "An orange just ate $name !" + } +} + + + + The above code defines two namespaces, apple and + orange. Each namespace contains a proc named eat, + but the behavior of the procs is different. Here is the output + produced when calling eat in tclsh: + + + +% apple::eat "Stas" +Stas just ate an apple +% orange::eat "Stas" +An orange just ate Stas ! +% + + + Namespace procedures can also be defined outside the + namespace eval block, as long as they are qualified. For + example, the above code can be rewtitten as: + + +namespace eval apple {} + +namespace eval orange {} + +proc apple::eat { name } { + return "$name just ate an apple" +} + +proc orange::eat { name } { + return "An orange just ate $name !" +} + + + Namespaces may also be nested, as shown in the example + below: + + +namespace eval apple { + namespace eval core {} + namespace eval meat {} +} + +proc apple::core::eat {} { + return "The core is pretty much inedible" +} + +proc apple::meat::eat {} { + return "Yummy" +} + + + + + Name Resolution + + When a proc which is defined inside a namespace calls another proc, + the other proc is first assumed to be in the current namespace. If + the current namespace contains no such proc, the proc is then + assumed to reside in the global namespace. However, if the function + call is prepended with the :: resolution operator, the + global namespace will be searched directyl. For example, consider + the code below: + + + +namespace eval apple {} + +namespace eval orange {} + +proc eat { name } { + return "$name goes hungry today..." +} + +proc apple::eat { name } { + return "$name just ate an apple" +} + +proc orange::eat { name } { + return "An orange just ate $name !" +} + +proc apple::test {} { + set result "" +# Line 20 + append result "[eat Stas] \n" +# Line 22 + append result "[::eat Stas] \n" +# Line 24 + append result "[::orange::eat Stas] \n" + return $result +} + + + + The output of apple::test is as follows: + + + +% apple::test +Stas just ate an apple +Stas goes hungry today... +An orange just ate Stas ! + +% + + + + In line 20, the procedure eat exists in the apple + namespace, and since the current procedure (test) is in + the same namespace, the eat procedure in the + apple namespace is called. In line 22, the eat + procedure is called in the global namespace. In line 24, the fully + qualified eat procedure in the orange namespace + is called. + + + + Namespace Variables + + In addition to functions, namespaces may contain variables. + Namespace variables act similarly to global variables. A namespace + variable is only visible inside its namespace; the variable is + persistent for the duration of the request and visible only to the + current Tcl interpreter. The syntax to declare a namespace variable + is as follows: + + + +namespace eval namespace_name { + variable variable_name optional_initial_value + tcl_code +} + + + + + In order to access the variable, each proc within the namespace + must declare the variable at the beginning of the procedure body: + + + +proc namespace_name::proc_name { args } { + variable variable_name + proc_body +} + + + + + The following code demonstrates the usage of namespace variables: + + + + +namespace eval apple { + variable apple_count 0 +} + +proc apple::add_apple {} { + variable apple_count + incr apple_count +} + +proc apple::eat { name } { + variable apple_count + if { $apple_count > 0 } { + incr apple_count -1 + return "$name just ate an apple" + } else { + return "Out of apples" + } +} + + + + The Tcl evaluation below demonstrates that the variable + apple_count is persistent: + + + +% apple::eat "Stas" +Out of apples +% apple::add_apple +1 +% apple::eat "Stas" +Stas just ate an apple +% apple::eat "Stas" +Out of apples +% + + + + A note of caution about namespace variables: the variables are + persistent within the current Tcl interepreter, which may survive + across requests. Therefore, the variables should always be + initialized manually at the beginning of each request. + + + + + Emulating an OOP-like approach with namespaces + + With a small stretch of imagination, one can pretend that a + namespace is a class, the namespace procs are + methods, and namespace variables are static + attributes. For example, the apple counting example + above implements a simple class, with two + methods and a "private" static attribute (since there is no + apple::get_count method). + + + + + Mimicking method overloading with dispatch procs + + In real OOP, one class may extend (or subclass) another + (known as the superclass), inheriting all of its attributes + and methods. The subclass may then overload some of the + superclass's methods, changing their behavior. Something similar + may be accomplished in Tcl with the usage of a dispatch proc. The + proc takes a class name and some arguments, and passes them to the + appropriate method, as follows: + + + +proc namespace_name::method_name { type arg1 arg2 ... } { + if { [catch type::method_name $arg1 $arg2 ...] } { +# The specific method does not exist; perform some default action + } +} + + + + + The dispatch proc first checks if an overloaded method exists, + using the info + procs command. If the method does exist, the dispatch proc + calls the method; otherwise, the dispatch proc may throw an error + or perform some default action. + + Dispatch procs can also be used to abstract the methods within + one class, hiding its namespace-based implementation, as shown in + the example below: + + +namespace eval banana {} + +# Main dispatch procedure for the class +proc banana { method_name args } { + eval banana::$method_name $args +} + +proc banana::peel {} { + return "The banana is now peeled" +} + +proc banana::eat { inches } { + return "You bite off $inches inches from the banana" +} + + + + This approach allows the code to mimic the behavior of many + multi-purpose operators in Tcl (such as string or + info), as shown below: + + + +% banana peel +The banana is now peeled +% banana eat 5 +You bite off 5 inches from the banana +% banana foo +invalid command name "banana::foo" +% + + + + The facilities discussed above are sufficient for the + implementation of any simple "class", but they lack an important + feature: storing multiple non-static attributes (storing a distinct + set of attribute values for each instance of the "class"). + Arrays can be used to remove this deficiency. + + + + + Arrays + + Tcl provides a data structure known as the array, though in + reality the data structure resembles a hash table more than a true + array. Tcl arrays are very similar to ns_sets: just like + ns_sets, arrays associate keys with values. Unlike the + ns_sets, however, arrays are part of the Tcl interpreter + and not the AOLServer, which makes them a lot faster. The syntax to + manipulate arrays is as follows: + + + + +# Set some key to a value +set array_name(key_name) value +# Retrieve the value of some key +set result + $array_name(key_name) + + + + If the array whose key is to be set does not exist, it is + automatically created. However, if the array whose key is to be + retrieved does not exist The info + exists command can be used to determine if an array key + exists before accessing it: + + + +if { [info exists array_name(key_name)] } { +# The key exists, so access it +} else { + # The key does not exist +} + + + + + For example, the code below demonstrates some of the basic actions + that can be performed on arrays: + + + +% set basket(apples) 1 +1 +% info exists basket(apples) +1 +% info exists basket(oranges) +0 +% info exists basket +1 +% set basket(apples) +1 +% incr basket(apples) +2 +% set basket(apples) +2 +% + + + + + Advanced array operations + + The array + command can be used to manipulate Tcl arrays. Particularly, the + array get and array set commands can be used to + convert between arrays and lists. The array get command + converts an array to a list with an even number of elements. The + odd-numbered elements are the key names and the even-numbered + elements are the key values, as shown in the example below: + + + +% set basket(apples) 1 +1 +% set basket(oranges) 5 +5 +% array get basket +apples 1 oranges 5 +% + + + + The array set command takes a list in the same format, and + sets the keys of the specified array to their values in the list: + + + +% array set basket [list apples 3 oranges 4 ants 15] +% set basket(apples) +3 +% set basket(oranges) +4 +% set basket(ants) +15 +% + + + + The array command has other useful operands, detailed in + the official + man pages. In addition, ATS defines the following proc for + dealing with arrays (all procs are in the template::util + namespace): + + + + + + + Proc + Effect + Example + + + + + + array_to_vars { arrayname } + Sets local variables in the calling frame; set one variable for + each key in the array. The value of the variable is the value + associated with the key in the array. See the discussion of the + upvar command below to see how this is accomplished. + template::util::array_to_vars my_array + + + + vars_to_array { arrayname args } + The opposite of array_to_vars. Sets array keys to the + values contained in the local variables whose names are supplied to + the proc. + + +set var1 "foo" +set var2 "bar" +template::util::vars_to_array my_array var1 var2 + + + + + + proc list_to_array { values arrayname keys } + Takes a list of values and a list of keys, and sets the array + keys to the values specified in the lists. The lists must have the + same length. + template::util::list_to_array {1 15} my_array {apples + oranges} + + + + list_of_lists_to_array { lists arrayname } + Takes a list of key-value pairs, in form {{key1 value1} + {key2 value2} ...} and sets the array contents + accordingly. + template::util::list_of_lists_to_array {{apples 1} {oranges + 2} my_array + + + + list_to_lookup { values arrayname } + Converts a list of input values into an array which can be used + as a sparse lookup bitmap. Each key in the array has a numeric + value which signifies its position in the original list. + template::util::list_to_lookup {a b c} my_array + + + + + + Arrays are not first-class + + Unlike ns_sets, however, arrays in Tcl are not + "first-class". This means that they cannot be passed to procs as + parameters, and cannot be returned from procs as return values. For + example, assuming that an array variable called my_array + exists, all of the following calls are illegal: + + + + set other_array + $my_array + + + set x [some_proc + $my_array] + + + set my_array [some_proc] + + + Note that the above restrictions apply only to the arrays + themselves; array keys are no different from ordinary variables in + Tcl, and all of the following calls are legal: + + + + set var $my_array(foo) + + + set x [some_proc + $my_array(foo)] + + + set my_array(foo) + [some_proc] + + + Of course, arrays can still be passed between procs using the + array get and array set commands, but this + approach is very inefficient. Instead, the upvar command + can be used to pass the arrays by reference. + + + + + + + Upvar and Uplevel + + The upvar + command can be used to pass variables by reference. The syntax for + upvar is: + + + +upvar optional_level upper_variable1 local_variable1 upper_variable2 local_variable2 ... + + + + The upvar command makes a local variable point to the same location + as a variable in the calling frame (note that a namespace also + counts as a frame). For example, consider the following code: + + + +proc double {} { + upvar the_var x + set x [expr $x * 2] +} + + + + + The double proc associates a local variable called + x with the variable in the calling frame called + the_var, and then modifies the value of that variable. The + results of calling the proc are shown below: + + + +% set the_var 3 +3 +% double +6 +% set the_var +6 +% + + + + As with any Tcl command, the parameters to uplevel need + not be literals. For example, the classic "swap" procedure may be + implemented in Tcl as follows: + + + +proc swap { reference1 reference2 } { + upvar $reference1 a $reference2 b + set temp $a + set a $b + set b $temp +} + + + + The swap procedure looks up two variables in the calling + frame and swaps their contents, as demonstrated below: + + + +% set x 3 +3 +% set y 5 +5 +% swap x y +3 +% set x +5 +% set y +3 +% + + + + Using upvar and arrays to store objects + + Arrays may be passed to procs using the upvar statement. Since Tcl + arrays are essentially hash tables, they are ideal for storing + object attributes. Consider the following code: + + + + +######## A full-fledged Tcl "class" ########## + +namespace eval basket {} + +# Create a new fruit basket +proc basket::create { basket_ref } { + upvar $basket_ref basket + set basket(apples) 0 + set basket(oranges) 0 +} + +# Add apples to the basket +proc basket::add_apples { basket_ref count } { + upvar $basket_ref basket + incr basket(apples) $count + # An orange gets squished + if { $basket(oranges) > 0 } { + incr basket(oranges) -1 + } + return $basket(apples) +} + +# Add oranges to the basket +proc basket::add_oranges { basket_ref count } { + upvar $basket_ref basket + incr basket(oranges) $count + return $basket(oranges) +} + +# Eat the juiciest fruit +proc basket::eat_fruit { basket_ref } { + upvar $basket_ref basket + if { $basket(oranges) > $basket(apples) } { + incr basket(oranges) -1 + return "Orange" + } elseif { $basket(apples) > 0 } { + incr basket(apples) -1 + return "Apple" + } else { + error "The basket is empty" + } +} + +# Dispatch proc for the basket class +proc basket { method_name basket_ref args } { + upvar $basket_ref basket + eval basket::$method_name basket $args +} + + + The above code creates a very simple "class" which represents a + fruit basket. The class has two "attributes", apples and + oranges. The class also has two "methods" which add apples + or oranges to the basket, a method which removes a fruit from the + basket, and a constructor method (basket::create). The + attributes are maintained in an array, and the array reference is + passed to each method as the first argument (similarly to how the + "this" pointer is passed in C++ and Java). + + + The Tcl session shown below instantiates two basket + objects and performs some operations on them: + + + +% basket create gift +0 +% basket create stas +0 +% basket add_apples gift 1 +1 +% basket add_oranges stas 1 +1 +% basket add_apples gift 1 +2 +% basket eat_fruit stas +Orange +% basket eat_fruit stas +The basket is empty +% basket eat_fruit gift +Apple +% basket eat_fruit gift +Apple +% basket eat_fruit gift +The basket is empty +% + + + + A large portion of the ATS uses the approach demonstrated above; in + particular, the "form", "element" and "request" pseudo-classes are + implemented in this way. + + + + + Advanced upvar features + + Note that the basket dispatch proc above uses upvar to + bind a local variable basket to the array which holds the + basket attributes in the calling frame. It then gives + "basket" as the reference to one of the basket class + methods: + + + + + Upvar illustration 1 + + + However, the basket reference + in the ::basket + proc is not useful; it is merely used to pass the reference down to + the basket::eat_fruit proc. + By using the level + parameter to upvar, this extra reference can be + eliminated: + + + + + Upvar illustration 2 + + + The Tcl interpreter will bind the local variable to a variable in + the levelth calling frame, relative to the current frame. By + default, the level is assumed to be 1 (one), and the local variable + is bound to a variable in the caller of the current proc. If the + level is 2, the local variable will be bound to the variable in the + caller's caller; and so on. Therefore, the basket dispatch + methods may be rewritten as follows (changes from the previous + example are shown in bold): + + + +namespace eval basket {} + +# Create a new fruit basket +proc basket::create { basket_ref } { + upvar 2 $basket_ref basket + set basket(apples) 0 + set basket(oranges) 0 +} + +# Add apples to the basket +proc basket::add_apples { basket_ref count } { + upvar 2 $basket_ref basket + incr basket(apples) $count + # An orange gets squished + if { $basket(oranges) > 0 } { + incr basket(oranges) -1 + } + return $basket(apples) +} + +# Add oranges to the basket +proc basket::add_oranges { basket_ref count } { + upvar 2 $basket_ref basket + incr basket(oranges) $count + return $basket(oranges) +} + +# Eat the juiciest fruit +proc basket::eat_fruit { basket_ref } { + upvar 2 $basket_ref basket + if { $basket(oranges) > $basket(apples) } { + incr basket(oranges) -1 + return "Orange" + } elseif { $basket(apples) > 0 } { + incr basket(apples) -1 + return "Apple" + } else { + error "The basket is empty" + } +} + +# Dispatch proc for the basket class +proc basket { method_name basket_ref args } { + # Code removed ---> upvar $basket_ref basket + eval basket::$method_name $basket_ref $args +} + + + + The level parameter may also be 0 (zero). In this case, a + local variable may be "aliased" under a different name, as is shown + below: + + + +% set x 5 +5 +% upvar 0 x y +% set y +5 +% set y 6 +6 +% set x +6 +% + + + + In addition to relative levels, upvar may refer to an + absolute level. This can be accomplished by prepending the level + with a pound sign (#), despite the fact that the pound + sign is normally reserved for comments: + + +upvar #level upper_variable1 local_variable1 upper_variable2 local_variable2 ... + + + + The top level (the level which contains all the global variables) + is #0, the next level below that is #1, and so on. The absolute + level is useful when there are many (possibly recursive) procs that + wish to refer to the same object (as opposed to passing the object + between the procs by value). The ATS form API + (form create, + element create and so on) uses this + technique. + + + + + Uplevel + + In addition to binding variables in the calling frame via the + upvar command, Tcl provides the capability to execute code + in the calling frame via the uplevel + command. The syntax for uplevel is as follows: + + + +uplevel optional_level code + + + + The level is handled identically to the level in the upvar + command, and the code parameter will be executed as if it + was in the specified frame. For example, consider the following + code: + + + +proc create_gift_basket {} { + uplevel { + basket create gift_basket + basket add_apples gift_basket 2 + basket add_oranges gift_basket 3 + } +} + + + + This proc creates a fruit basket and fills it with some apples and + oranges: + + + +% create_gift_basket +3 +% basket eat_fruit gift_basket +Orange +% basket eat_fruit gift_basket +Apple +% basket eat_fruit gift_basket +Orange +% basket eat_fruit gift_basket +Apple +% basket eat_fruit gift_basket +Orange +% basket eat_fruit gift_basket +The basket is empty +% + + + + Note that, in Tcl, code is stored as text. Therefore, using + uplevel it is possible to create procs that take a piece + of code as a parameter (similar to the lambda-functions in LISP), + as is shown below: + + + +proc list_map { the_list code } { + foreach element $the_list { + upvar list_item item + set item $element + uplevel $code + } +} + + + + The list_map proc takes a list and some executable code as + parameters. It then traverses the list element-by-element. For each + element in the list, the proc uses upvar to create a + variable in the calling frame called "list_item". The + procedure then executes the arbitrary code; the code runs in the + calling frame and may refer to any variables there, including + list_item, as in this example: + + + +% set a [list 1 2 3 4] +1 2 3 4 +% set factor 3 +3 +% set b [list] +% list_map $a {lappend b [expr $list_item * $factor]} +% set b +3 6 9 12 +% + + + + + Excessive usage of upvar/uplevel considered harmful + + Despite their advantages, uplevel and upvar should be used with + caution. Excessive usage of upvar (especially upvar to absolute + levels) may render code unreadable, since it is difficult to trace + all the variable references back to their source through the + various function calls. In addition, upvar paves the way + for dreaded "pointer aliasing" bugs. Using upvar, it + becomes possible for two unrelated procedures to accidentally + reference the same variable in the calling frame, and thus corrupt + the data. Combined with namespace variables, upvar can do + a lot of damage. + + The uplevel command has the potential to introduce even + more subtle bugs, since it can overwrite arbitrary variables in the + calling frame. For example, consider the following code: + + + +proc clobber {} { + uplevel { + for { set i 1 } { $i <= 3 } { incr i } { + # Do something + } + } +} + + + The clobber proc will work fine as long as there is no + variable called "i" in the calling frame. If that variable + exists, the proc will overwrite the variable's value. Since + variables such as "i", "j", etc. are often used + in loops, the behavior of clobber may become completely + unpredictable. + + In addition, upvar and uplevel may present a + security risk. The risk is even greater than the risk posed by + eval, since eval can only execute code in the + current frame, and upvar / uplevel may execute + code in any frame. + + + + + Conclusion + + Namespaces, upvars and arrays may be used to simulate OOP behavior + in Tcl. This approach is widely used throughout ATS in order to + make the code more manageable and easily extensible. However, this + approach (and especially upvar/uplevel commands) should be used + with caution since it can decrease the readability of the code and + introduce hidden bugs. + + + + + Index: openacs-4/packages/cms/www/doc/xml/user-guide.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/user-guide.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/user-guide.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,67 @@ + + User's Guide + + + Signing In + + The Content Management System restricts access to registered users. + Attempting to access a CMS page without having properly logged in will + automatically redirect the user to a sign-in page. + + + + + Creating and Revising Content Items + + Content items are created either by entering text in a browser or + uploading files. In addition, an authorized user can add/edit + extended attributes associated with the content item. Content items + may also be edited by entering new text via a browser or uploading + new files. Changes made to the content or extended attributes are + stored as revisions of the content item. + + + + &managing-templates; + + + Previewing and Deploying Content + + Content may be previewed at any time (even before deployment) so long + as one revision is designated the Live Revision, the revision that will + be previewed. + + + + Content can either be deployed immediately or scheduled for future + deployment (and expiration). Before deployment, however, the + content item must satisfy the following preconditions: + + + + One revision must be designated the Live Revision, the + revision that will eventually be deployed. + + + The content item must be in a publishable state. The exact + conditions for a content item being publishable will vary from item + to item, depending on whether that item requires components to be + finished and whether that item has to pass through the production + workflow. + + + + + + + + &page; + + + + + Index: openacs-4/packages/cms/www/doc/xml/user-permissions.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/doc/xml/user-permissions.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/doc/xml/user-permissions.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,99 @@ + + Using Permissions + + + Overview + + Permissions provide a way of answering the question, "may the user + X perform some action Y on an object Z" ? The CMS UI provides forms + for viewing and maintaining permissions, as well as a set of + standard permissions which should be useful for web publishing + applications. For a more complete description of the various + permissions, see the CMS developer guide. + + + + Viewing Permissions + + To view permissions on folders, select the folder on the tree and + click the "Folder Attributes" link. To view permissions on items, + simply select the item in the folder and scroll down to the bottom + of the page. In both cases, the permissions listing for the + item/folder appears on the screen: + + + + + + + + + + + + To grant permissions to another user, mark the user on the + clipboard and click "[ Grant ] more permissions to a marked user". + You will only be allowed to grant permissions which you already + possess, unless you have the "Modify Any Permissions" privilege. + + To edit permissions for a particular user, click the + + icon next to the user's name. The icon + will not be visible unless you are allowed to edit permissions for that + particular user. + + + + Granting and Editing permissions + + In both cases, a permission editing form will appear on the screen: + + + + + + + + + + + + The privileges are arranged on the form in a tree-like hierarchy; + possession of a parent permission entails the possession of all of + its child permissions, as well. For example, a user with "Admin-level Read" + would also have read access to anything + requiring "User-level Read." + + Check any permissions that you wish to grant to the user and uncheck any + permissions that you wish to revoke. If you select "Yes" for the + "Apply changes to child items and subfolders" option, your changes + will affect the current item or folder, all the items in the + folder, all subfolders of the folder, all the items in the + subfolders, etc. If you select "No", only the current item or + folder will be affected. + + Note that if you revoke a permission, all of its descendants + will remain granted to the user. For example, if you revoke the + "Admin-Level Read" permission from a user, the user will retain the + "User-level Read" permission. + + Also note that you may not be able to modify some permissions on + certain items; for example, you may not revoke somebody's + "Administrator" permission if you yourself do not possess the + "Administrator" permission on the item. + + + + + + + + + + + + Index: openacs-4/packages/cms/www/item/children.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/item/children.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/item/children.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +# Display information about items for which the item is the context. \ No newline at end of file Index: openacs-4/packages/cms/www/item/create.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/item/create.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/item/create.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ + \ No newline at end of file Index: openacs-4/packages/cms/www/item/create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/item/create.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/item/create.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,60 @@ +# Create a new item and an initial revision for a content item (generic) + +form create create_item { + +element create create_item item_id -datatype integer -widget hidden +element create create_item revision_id -datatype integer -widget hidden +element create create_item context_id -datatype integer -widget hidden \ + -param -optional + +element create create_item name -datatype keyword -widget text +element create create_item title -datatype text -widget text +element create create_item description -datatype text -widget textarea \ + -html { cols 60 rows 5 } -label "Description" + +element create create_item publish_date -datatype date -widget date + +query mime_types multilist " + select label, mime_type from cr_mime_types order by label" + +element create create_item mime_type -datatype text -widget select \ + -options $mime_types + +element create create_item text -datatype text -widget textarea \ + -html { cols 60 rows 10 } + +if { [form is_request create_item] } { + + query item_id onevalue "select acs_object_id_seq.nextval from dual" + element set_properties create_item item_id -value $item_id + + query revision_id onevalue "select acs_object_id_seq.nextval from dual" + element set_properties create_item revision_id -value $revision_id +} + +if { [form is_valid create_item] } { + + set db [ns_db gethandle] + + # set the date value from the form + form get_values create_item name context_id item_id title description \ + publish_date mime_type text revision_id + + set publish_date [util::date::get_property sql_date $publish_date] + + ns_ora exec_plsql_bind $db "begin + :retval := content_item.new(:name, :context_id, :item_id, sysdate, NULL, + '[ns_conn peeraddr]', 'content_item'); + end;" retval + + ns_ora exec_plsql_bind $db "begin + :retval := content_revision.new(:title, :description, $publish_date, + :mime_type, NULL, :text, 'content_revision', + :item_id, :revision_id); + end;" retval + + ns_db releasehandle $db + + template::forward item?item_id=$item_id +} + Index: openacs-4/packages/cms/www/item/permissions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/item/permissions.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/item/permissions.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +# Display information about access control on the item. \ No newline at end of file Index: openacs-4/packages/cms/www/item/revision-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/item/revision-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/item/revision-add.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +# Add a revision of the item \ No newline at end of file Index: openacs-4/packages/cms/www/item/revision.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/item/revision.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/item/revision.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,3 @@ +# View a particular revision of the item. + +# Signature: revision_id \ No newline at end of file Index: openacs-4/packages/cms/www/item/revisions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/item/revisions.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/item/revisions.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,3 @@ +# Display a list of revisions for the item + + Index: openacs-4/packages/cms/www/item/templates.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/item/templates.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/item/templates.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +# Display information about templates associated with the item. \ No newline at end of file Index: openacs-4/packages/cms/www/item/workflow-status.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/item/workflow-status.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/item/workflow-status.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,3 @@ +# Display information about the current workflow status of the item. + +# Signature: item_id \ No newline at end of file Index: openacs-4/packages/cms/www/modules/categories/create.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/create.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/categories/create.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +Create a Keyword + +

      Create new keyword

      + + Index: openacs-4/packages/cms/www/modules/categories/create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/create.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/categories/create.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,59 @@ +request create -params { + parent_id -datatype integer -optional + mount_point -datatype keyword -optional -value categories +} + +form create add_keyword + +element create add_keyword keyword_id \ + -label "Keyword ID" -datatype integer -widget hidden -optional + +element create add_keyword parent_id \ + -label "Parent ID" -datatype integer -widget hidden -optional -param + +element create add_keyword heading \ + -label "Heading" -datatype text -widget text -html { size 30 } + +element create add_keyword description -optional \ + -label "Description" -datatype text -widget textarea -html { rows 5 cols 60 } + +if { [form is_request add_keyword] } { + template::query keyword_id onevalue " + select acs_object_id_seq.nextval from dual + " + element set_properties add_keyword keyword_id -value $keyword_id +} + +if { [form is_valid add_keyword] } { + + form get_values add_keyword keyword_id heading parent_id description + set user_id [User::getID] + set ip [ns_conn peeraddr] + + set db [template::begin_db_transaction] + + set sql " + begin :1 := content_keyword.new( + heading => :heading, + description => :description, + keyword_id => :keyword_id, + creation_user => :user_id, + creation_ip => :ip" + + if { ![template::util::is_nil parent_id] } { + append sql ", + parent_id => :parent_id" + } + + append sql "); end;" + + ns_ora exec_plsql_bind $db $sql [list 1] keyword_id + template::end_db_transaction + template::release_db_handle + + template::forward "refresh-tree?id=_all_&goto_id=$parent_id&mount_point=$mount_point" +} + + + + Index: openacs-4/packages/cms/www/modules/categories/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/categories/delete.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,39 @@ +# Delete a subject category + +template::request create +template::request set_param id -datatype keyword +template::request set_param parent_id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value categories + +# Determine if the folder is empty +template::query is_empty onevalue " + select content_keyword.is_leaf(:id) from dual +" + +# If nonempty, show error +if { [string equal $is_empty "f"] } { + + set message "This category contains subcategories and cannot be deleted." + set return_url "modules/categories/index" + set passthrough [list [list id $id] [list parent_id $parent_id]] + template::forward "../../error?message=$message&return_url=$return_url&passthrough=$passthrough" + +} else { + + # Otherwise, delete the folder + set db [template::begin_db_transaction] + template::query delete_keyword dml " + begin content_keyword.delete(:id); end; + " + template::end_db_transaction + template::release_db_handle + + # Remove it from the clipboard, if it exists + set clip [clipboard::parse_cookie] + clipboard::remove_item $clip $mount_point $id + clipboard::set_cookie $clip + clipboard::free $clip + + template::forward "refresh-tree?id=_all_&goto_id=$parent_id&mount_point=$mount_point" +} + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/categories/edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/categories/edit.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +Edit a @info.what@ + +

      Edit @info.what@

      + + Index: openacs-4/packages/cms/www/modules/categories/edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/categories/edit.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,48 @@ +# Edit a subject category + +template::request create +template::request set_param id -datatype keyword +template::request set_param parent_id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value categories + +# Get existing data +template::query info onerow " + select + content_keyword.get_heading(:id) heading, + content_keyword.get_description(:id) description, + decode(content_keyword.is_leaf(:id), 't', 'keyword', 'category') what + from + dual" + +form create edit_keyword + +element create edit_keyword keyword_id \ + -label "Keyword ID" -datatype integer -widget hidden -value $id + +element create edit_keyword heading \ + -label "Heading" -datatype text -widget text -html { size 30 } \ + -value $info(heading) \ + +element create edit_keyword description -optional \ + -label "Description" -datatype text -widget textarea -html { rows 5 cols 60 } \ + -value $info(description) + +if { [form is_valid edit_keyword] } { + + form get_values edit_keyword keyword_id heading description + + set db [template::begin_db_transaction] + template::query edit_keyword dml " + begin + content_keyword.set_heading(:keyword_id, :heading); + content_keyword.set_description(:keyword_id, :description); + end; + " + template::end_db_transaction + template::release_db_handle + + template::forward "refresh-tree?id=$keyword_id&goto_id=$parent_id&mount_point=$mount_point" +} + + + Index: openacs-4/packages/cms/www/modules/categories/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/categories/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,129 @@ + +Subject Categories + + + + + + + + + +
      + + Subject @what@ - @info.heading@ + + Subject Keywords + +  @info.path@
      +
      + +

      @info.heading@

      + +

      @info.description@

      + + + + + + + + + + +
      Subject Keywords 
      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
           Heading   Assigned Items
      + + + + + + + + + + +     + @items.heading@   @items.item_count@
      +
      + +
      + + No subcategories + + +
      +
      + + + + + Edit this @what@
      + + + + Delete this @what@
      +
      + +
      + + + + Create a new keyword + +within this category.
      + + + + Move + +marked keywords into this category.
      + +

      +

      +

      +  + + + + + + + Index: openacs-4/packages/cms/www/modules/categories/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/categories/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,81 @@ +# Index page for keywords + +request create -params { + id -datatype keyword -optional + mount_point -datatype keyword -optional -value categories + parent_id -datatype keyword -optional +} + +set original_id $id + +set img_checked "[ad_conn package_url]resources/checked.gif" + +# Create all the neccessary URL params for passthrough +set passthrough "mount_point=$mount_point&parent_id=$parent_id" + +set root_id [cm::modules::${mount_point}::getRootFolderID] +if { [util::is_nil id] || [string equal $id _all_] } { + set where_clause "k.parent_id is null" +} else { + set where_clause "k.parent_id = :id" +} + +# Get self + +if { ![util::is_nil id] && ![string equal $id _all_] } { + template::query info onerow " + select + content_keyword.is_leaf(:id) as is_leaf, + content_keyword.get_heading(:id) as heading, + content_keyword.get_description(:id) as description, + content_keyword.get_path(:id) as path + from + dual" +} else { + set info(is_leaf) "f" + set info(heading) "" + set info(description) "You can create content categories here +in order to classify content items." + set info(path) "/" +} + +if { [string equal $info(is_leaf) t] } { + set what "keyword" +} else { + set what "category" +} + +set clip [clipboard::parse_cookie] + +# Get children +template::query items multirow " + select + keyword_id, + content_keyword.is_leaf(keyword_id) as is_leaf, + content_keyword.get_heading(keyword_id) as heading, + (select count(*) from cr_item_keyword_map m + where m.keyword_id = k.keyword_id) as item_count + from + cr_keywords k + where + $where_clause + order by + is_leaf, heading +" + +# Get the parent id if it is missing +if { [util::is_nil parent_id] && ![util::is_nil id] } { + template::query parent_id onevalue " + select + context_id + from + acs_objects + where + object_id = :id" +} + + + + + + Index: openacs-4/packages/cms/www/modules/categories/keyword-assign.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/keyword-assign.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/categories/keyword-assign.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,33 @@ +# Assign marked keywords to an item + +# page variables +template::request create +template::request set_param item_id -datatype integer +template::request set_param mount_point -datatype keyword \ + -optional -value "sitemap" + +if { [template::util::is_nil item_id] } { + set resolved_id [cm::modules::${mount_point}::getRootFolderID] +} else { + set resolved_id $item_id +} + +# Preserve the item_id since the clipboard::parse_cookie wil overwrite it +set saved_item_id $item_id +set clip [clipboard::parse_cookie] + +set db [template::begin_db_transaction] +clipboard::map_code $clip categories { + if { [catch { + template::query assign_keyword dml " + begin content_keyword.item_assign(:resolved_id, :item_id); end; + " + } errmsg] } { + } +} +template::end_db_transaction +template::release_db_handle + +clipboard::free $clip + +template::forward "../items/index?item_id=$saved_item_id&mount_point=$mount_point" Index: openacs-4/packages/cms/www/modules/categories/keyword-unassign.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/keyword-unassign.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/categories/keyword-unassign.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,20 @@ +# Unassign a keyword from an item + +# page variables +template::request create +template::request set_param item_id -datatype integer +template::request set_param keyword_id -datatype integer +template::request set_param mount_point -datatype keyword \ + -optional -value "sitemap" + +if { [template::util::is_nil item_id] } { + set resolved_id [cm::modules::${mount_point}::getRootFolderID] +} else { + set resolved_id $item_id +} + +template::query unassign_keyword dml " + begin content_keyword.item_unassign(:resolved_id, :keyword_id); end; +" + +template::forward "../items/index?item_id=$item_id&mount_point=$mount_point" Index: openacs-4/packages/cms/www/modules/categories/move.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/move.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/categories/move.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,50 @@ +# Move selected keywords into the target category + +request create +# Move marked keywords into this category +request set_param target_id -datatype integer +# Mount point for the tree +request set_param mount_point -datatype keyword -optional \ + -value "categories" +# Parent id for the tree +request set_param parent_id -datatype integer -optional + +if { [template::util::is_nil target_id] } { + set update_value "null" +} else { + set update_value "$target_id" +} + +set clip [clipboard::parse_cookie] + +set db [template::begin_db_transaction] + +clipboard::map_code $clip $mount_point { + if { [catch { + template::query move_keyword_item dml " + update cr_items set parent_id = $update_value + where item_id = $item_id + and exists ( + select 1 from cr_keywords where keyword_id = item_id + )" + template::query move_keyword_keyword dml " + update cr_keywords set parent_id = $update_value + where keyword_id = $item_id" + } errmsg] } { + } +} + +template::end_db_transaction +template::release_db_handle + +clipboard::free $clip + +# Specify a null id so that the entire branch will be refreshed +template::forward "refresh-tree?goto_id=$target_id&mount_point=$mount_point" + + + + + + + Index: openacs-4/packages/cms/www/modules/categories/refresh-tree.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/refresh-tree.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/categories/refresh-tree.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + + Index: openacs-4/packages/cms/www/modules/categories/refresh-tree.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/refresh-tree.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/categories/refresh-tree.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,19 @@ +# Refresh the tree to show any new folders + +request create +request set_param id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value sitemap +request set_param goto_id -datatype keyword -optional +set user_id [User::getID] + +# Change the update time on the folder +refreshCachedFolder $user_id sitemap $id + +if { [template::util::is_nil goto_id] } { + set goto_id $id +} else { + refreshCachedFolder $user_id $mount_point $goto_id +} + + + Index: openacs-4/packages/cms/www/modules/clipboard/add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/clipboard/add.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +# Add an object to the clipboard \ No newline at end of file Index: openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,2 @@ +#clipboard::clear_cookie +#ns_returnredirect "index" \ No newline at end of file Index: openacs-4/packages/cms/www/modules/clipboard/clipboard-ui.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/clipboard-ui.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/clipboard/clipboard-ui.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,4 @@ + +Clipboard + + Index: openacs-4/packages/cms/www/modules/clipboard/clipboard-ui.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/clipboard-ui.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/clipboard/clipboard-ui.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,20 @@ +request create +request set_param form_title -datatype text + +clipboard::ui::form_create clip_form -elements {{ + the_name -datatype text -widget text -value "fdfd" -optional -label "Name" \ + -validate { \ + {expr [string equal $value bob]} \ + {Name must be bob} \ + } + }} + +clipboard::ui::generate_form clip_form [clipboard::parse_cookie] sitemap + +if { [form is_valid clip_form] } { + clipboard::ui::process_form clip_form { + if { $row(checked) } { + ns_log notice "ROW: $row(rownum) CHECKED, name = $row(the_name)" + } + } +} Index: openacs-4/packages/cms/www/modules/clipboard/clipboard.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/clipboard.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/clipboard/clipboard.js 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,177 @@ +function searchArray(a, re) { + + for (i in a) { + if (a[i].search(re) != -1) { + return i; + } + } + + return -1; +} + +function appendArray(a, s) { + + a[a.length] = s; +} + +function spliceArray(a, i) { + + c = new Array(); + + for (var j = 0; j < a.length; j++) { + if (j != i) { + c[c.length] = a[j]; + } + } + + return c; +} + +function joinArray(a, d) { + + if (a.length == 0) return ""; + + var s = ""; + + for (var i = 0; i < a.length; i++) { + + if (a[i] == "") continue; + + if (s != "") { + s += d; + } + s += a[i]; + } + + return s; +} + +// Maintain clipboard state in the form of a cookie +// mnt:id,id,id|mnt:id,id,id|mnt:id,id,id. +// This function toggles the +// mark on an item (if the item is currently marked, it is unmarked; +// if the item is not currently marked, it is marked. +function mark(root_url, mnt, id, floatclipboard_p) { + + markx(root_url, mnt, id, + root_url + 'resources/Bookmarked24', + root_url + 'resources/Bookmarks24', + floatclipboard_p); +} + +function markx(root_url, mnt, id, checked, unchecked, floatclipboard_p) { + + var marks = getCookie("content_marks"); + + // info for each mount point is delimited by "|" + mountList = marks.split("|"); + + // search for the specified mount point + mountIndex = searchArray(mountList, "^" + mnt + ":"); + + if (mountIndex == -1) { + + // no marks currently defined for mount point, so just append + appendArray(mountList, mnt + ":" + id); + is_add = true; + + } else { + + // one or more marks already defined for mount point + // info for each mount point is in form "name:id,id,id..." + mountInfo = mountList[mountIndex].split(":"); + + mountPoint = mountInfo[0]; + markList = mountInfo[1].split(","); + idIndex = searchArray(markList, id); + + if (idIndex == -1) { + appendArray(markList, id); + is_add = true; + } else { + markList = spliceArray(markList, idIndex); + is_add = false; + } + + if (markList.length > 0) { + mountList[mountIndex] = mnt + ":" + joinArray(markList, ","); + } else { + mountList = spliceArray(mountList, mountIndex); + } + } + + setCookie("content_marks", joinArray(mountList, "|")); + + if (document.images["mark" + id]) { + if (is_add) { + document.images["mark" + id].src = checked + } else { + document.images["mark" + id].src = unchecked + } + } + + if (floatclipboard_p) { + // this last call open or refresh the floating clipboard + var clipboardWin=window.open(root_url + 'modules/clipboard/index?id=' + mnt + '&mount_point=clipboard','clipboardFrame', 'toolbar=no,dependent=yes,innerWidth=500,innerHeight=300,scrollbars=yes'); + } + +} + + +function set_marks(mnt, checked) { + + var marks = getCookie("content_marks"); + + // info for each mount point is delimited by "|" + mountList = marks.split("|"); + + // search for the specified mount point + mountIndex = searchArray(mountList, "^" + mnt + ":"); + + // return if no marks currently defined for mount point + if (mountIndex == -1) { return; } + + // one or more marks defined for mount point + // info for each mount point is in form "name:id,id,id..." + mountInfo = mountList[mountIndex].split(":"); + + mountPoint = mountInfo[0]; + markList = mountInfo[1].split(","); + if (markList.length == 0) { return; } + + // look through the marks defined for this mount point and + // check for matching icons + for (i in markList) { + + id = markList[i]; + if (document.images["mark" + id]) { + document.images["mark" + id].src = checked + } + } +} + +function setCookie(name, value, expire) { + document.cookie = name + "=" + escape(value) + "; path=/ ; domain=" + + window.location.hostname + + ((expire == null) ? "" : ("; expires=" + expire.toGMTString())); +} + +function getCookie(Name) { + + var search = Name + "=" + + if (document.cookie.length > 0) { // if there are any cookies + offset = document.cookie.indexOf(search) + if (offset != -1) { // if cookie exists + offset += search.length + // set index of beginning of value + end = document.cookie.indexOf(";", offset) + // set index of end of cookie value + if (end == -1) + end = document.cookie.length + return unescape(document.cookie.substring(offset, end)) + } + } + return ""; +} + Index: openacs-4/packages/cms/www/modules/clipboard/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/clipboard/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,60 @@ + +Clipboard + + + + + + +

      Clipboard

      + + +

      There are a total of @total_items@ items on the clipboard. Select one of + the mount points on the left to view a list of clipped items for the + mount point.

      + +

      Clear the clipboard

      + +
      + + There are no items on the clipboard. + +

      Close the clipboard + + + +

      Clipped Items

      + + + + + + + + + + + +
      + + + @items.item_path@ +
      +
      +

      No items

      + + + + + Index: openacs-4/packages/cms/www/modules/clipboard/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/clipboard/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,112 @@ +# Display a list of items on the clipboard + +set heads [ns_conn headers] +set package_url [ad_conn package_url] +set clipboardfloats_p [clipboard::floats_p] + +for { set i 0 } { $i < [ns_set size $heads] } { incr i } { + ns_log notice "[ns_set key $heads $i] = [ns_set value $heads $i]" +} + +request create +request set_param id -datatype keyword -optional +request set_param parent_id -datatype keyword -optional +request set_param state -datatype text -param -optional -value [list] +request set_param mount_point -datatype keyword -optional -value clipboard +request set_param clip_tabs_tab -datatype keyword -optional + +# using the tabs to set the page id; +# then making sure that the tabs display the correct page +if {![template::util::is_nil clip_tabs_tab]} { + if {$clip_tabs_tab == "main" } { + set id "" + } else { + set id $clip_tabs_tab + } +} + +if {$id == "" } { + set curr_tab main +} else { + set curr_tab $id +} + +# The cookie for the clipboard looks like this: +# mnt:id,id,id|mnt:id,id,id|mnt:id,id,id. + +set clip [clipboard::parse_cookie] + +set total_items [clipboard::get_total_items $clip] +set user_id [User::getID] + +if { ![util::is_nil id] } { + + set item_id_list [clipboard::get_items $clip $id] + + # First, attempt to ask the module for the list of item paths in sorted order + # Could fail because of some SQL error or because the procedure does not exist + + if { [catch { + set items:rowcount 0 + cm::modules::${id}::getSortedPaths items $item_id_list \ + [cm::modules::${id}::getRootFolderID] { + switch $row(item_type) { + content_template { + set row(url) "../templates/properties?id=$row(item_id)" + } + party { + set row(url) "../$id/index?id=" + } + user { + set row(url) "../$id/one-user?id=$row(item_id)" + } + default { + set row(url) "../$id/index?id=$row(item_id)" + } + } + # this is for all items in the sitemap that need to be listed under the + # item folder + if {$id == "sitemap" && $row(item_type) != "content_folder"} { + set row(url) "../items/index?item_id=$row(item_id)" + } + append row(url) "&mount_point=$id" + } + } errmsg ] } { + # Process the list manually. Path information will not be shown, but at least + # the names will be + ns_log notice "CLIPBOARD ERROR" + set items:rowcount 0 + foreach item_id $item_id_list { + incr items:rowcount + upvar 0 "items:${items:rowcount}" row + set row(rownum) ${items:rowcount} + set row(item_id) $item_id + if { [string equal $item_id "content_revision"] && [string equal $id "types"] } { + set link_id "" + set row(item_path) "Basic Item" + } else { + set link_id $row(item_id) + set row(item_path) [folderAccess name [getFolder $user_id $id $link_id state]] + } + set row(item_type) "" + set row(url) "../$id/index?id=$link_id" + } + } +} + + +# Create the tabbed dialog +set url [ns_conn url] +append url "?mount_point=clipboard&id=$id&parent_id=$parent_id&refresh_tree=f" + +template::tabstrip create clip_tabs -base_url $url -current_tab $curr_tab +template::tabstrip add_tab clip_tabs main "Main Menu" main +template::tabstrip add_tab clip_tabs sitemap "Site Map" sitemap +template::tabstrip add_tab clip_tabs templates "Templates" templates +template::tabstrip add_tab clip_tabs types "Content Types" types +template::tabstrip add_tab clip_tabs search "Search" search +template::tabstrip add_tab clip_tabs categories "Subject Keywords" categories +template::tabstrip add_tab clip_tabs users "Users" users + + + Index: openacs-4/packages/cms/www/modules/clipboard/list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/list.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/clipboard/list.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +# list objects on the clipboard by object type with controls to remove. \ No newline at end of file Index: openacs-4/packages/cms/www/modules/clipboard/remove.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/remove.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/clipboard/remove.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +# Remove an object from the clipboard \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/assign-keywords.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/assign-keywords.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/assign-keywords.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,54 @@ +# Assign marked keywords to item + +request create -params { + id -datatype keyword + mount_point -datatype keyword -optional -value sitemap + parent_id -datatype keyword -optional +} + +set user_id [User::getID] +set ip [ns_conn peeraddr] +set folder_list [list] + +# Check permissions +content::check_access $id cm_write \ + -mount_point $mount_point -parent_id $parent_id \ + -return_url "modules/sitemap/index" \ + -passthrough [list id $parent_id] + +if { [template::util::is_nil id] } { + set root_id [cm::modules::${mount_point}::getRootFolderID] +} else { + set root_id $id +} + +set clip [clipboard::parse_cookie] + +set db [template::begin_db_transaction] + +clipboard::map_code $clip categories { + if { [catch { + ns_ora exec_plsql_bind $db " + begin + :1 := content_keyword.item_assign( + :root_id, :item_id, null, :user_id, :ip); + end;" [list 1] symlink_id + lappend folder_list [list $mount_point $item_id] + + } errmsg] } { + } +} + +template::end_db_transaction +template::release_db_handle + +clipboard::free $clip + +# Specify a null id so that the entire branch will be refreshed +template::forward "index?item_id=$id&mount_point=$mount_point" + + + + + + Index: openacs-4/packages/cms/www/modules/items/attributes-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/attributes-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/attributes-edit.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +@page_title@ +

      @page_title@

      + + Index: openacs-4/packages/cms/www/modules/items/attributes-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/attributes-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/attributes-edit.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,80 @@ +# Add a revision of the item - keep the same content as the latest revision + +request create +request set_param item_id -datatype integer + +set db [template::get_db_handle] + +# check permissions - user must have cm_write on the item +content::check_access $item_id cm_write -user_id [User::getID] + +template::query one_item onerow " + select + i.content_type, i.name, nvl(r.title, i.name) title, i.latest_revision + from + cr_items i, cr_revisions r + where + i.item_id = :item_id + and + i.latest_revision = r.revision_id (+) +" + +template::util::array_to_vars one_item + +template::release_db_handle + +# flush the sitemap folder listing cache in anticipation +# of the new item +cms_folder::flush sitemap $item_id + +# validate item_id +# if one_item doesn't exist, then this item may have no latest revision +# so redirect to the add_revision page with content_method = no_content +if { [template::util::is_nil content_type] } { + template::forward "revision-add-2?item_id=$item_id&content_method=no_content" +} + + +# check for custom form +if { [file exists [ns_url2file \ + "custom/$content_type/attributes-edit.tcl"]] } { + template::forward \ + "custom/$content_type/attributes-edit?item_id=$item_id" +} + +set page_title "Edit Attributes for $name - $title" + +# Create the form + +form create add_revision -html { enctype "multipart/form-data" } -elements { + item_id -datatype integer -widget hidden + latest_revision -datatype integer -widget hidden + revision_id -datatype integer -widget hidden + content_method -datatype keyword -widget hidden -value "no_content" +} + +# autogenerate the revision form +set attributes_list [content::add_attribute_elements add_revision \ + $content_type $latest_revision] + +# populate necessary form elements +if { [form is_request add_revision] } { + element set_value add_revision item_id $item_id + element set_value add_revision latest_revision $latest_revision + element set_value add_revision revision_id [content::get_object_id] +} + + +# Process the form +if { [form is_valid add_revision] } { + form get_values add_revision item_id latest_revision revision_id + + # autoprocess the revision form + # requires item_id and revision_id to be set in the form + content::add_revision add_revision + + # copy the content (including mime_type) + content::copy_content $latest_revision $revision_id + + template::forward "index?item_id=$item_id" +} Index: openacs-4/packages/cms/www/modules/items/attributes.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/attributes.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/attributes.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + +
      AttributesRevision #@info.revision_number@ of @info.revision_count@ + + (Live) +   + + + [Edit] +   +
      + + + + + + + + + + + + + + + + + + + + +
      @attributes.object_label@
      @attributes.attribute_label@     + @attributes.attribute_value@
      + +
      + + + + + + + Index: openacs-4/packages/cms/www/modules/items/attributes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/attributes.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/attributes.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,102 @@ +# display the attributes of an item + +request create -params { + revision_id -datatype integer + mount_point -datatype keyword -optional -value sitemap +} + +# query the content type and table so we know which view to examine + +set db [template::get_db_handle] + +template::query type_info onerow " + select + o.object_type, t.table_name + from + acs_objects o, acs_object_types t + where + o.object_id = :revision_id + and + o.object_type = t.object_type +" -cache "revision_type_table $revision_id" \ + -persistent -timeout 86400 + +if { ! [info exists type_info(table_name)] } { + template::release_db_handle + adp_abort + request error revision_id "Invalid Revision ID $revision_id" + return +} + +# query the row from the standard view + +template::query info onerow " + select + content_item.get_revision_count(x.item_id) revision_count, + content_revision.get_number(:revision_id) revision_number, + content_item.get_live_revision(x.item_id) live_revision, + x.* + from + $type_info(table_name)x x + where + object_id = :revision_id" + +if { ! [info exists info(item_id)] } { + template::release_db_handle + + request error revision_id "Attributes for Revision ID + $revision_id appear to be incomplete. Each revision must have a + row in the storage table for its own content type, as well as in + the storage table of all the supertypes of its content type." + + return +} + +# Check permissions +content::check_access $info(item_id) cm_examine \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" \ + -request_error + +# query the attributes for this content type + +set content_type $type_info(object_type) + +set query " + select + types.pretty_name object_label, + types.table_name, + types.id_column, + attr.attribute_name, + attr.pretty_name attribute_label + from + acs_attributes attr, + ( select + object_type, pretty_name, table_name, id_column, + level as inherit_level + from + acs_object_types + where + object_type ^= 'acs_object' + connect by + prior supertype = object_type + start with + object_type = :content_type) types + where + attr.object_type = types.object_type + order by + types.inherit_level desc" + +template::query attributes multirow $query -eval { + + if { [catch { set value $info($row(attribute_name)) } errmsg] } { + # catch - value doesn't exist + set value "-" + } + + if { [string equal $value {}] } { set value "-" } + + set row(attribute_value) $value +} + +template::release_db_handle Index: openacs-4/packages/cms/www/modules/items/children.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/children.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/children.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,88 @@ + +Child Items + + + + + + + + + + + + + + + + + + + + +
      Child Items + + +  
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      No child items.  Content Type  Title  Relationship TypeRelation Tag 
      +   + @children.content_type@   + @children.title@ + -  @children.type_name@@children.tag@ + + + + +
      +
      +
      +
      +   +
      + +
      + + + + + Index: openacs-4/packages/cms/www/modules/items/children.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/children.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/children.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,90 @@ +# Display information about items for which the item is the context. + +# page variables +request create -params { + item_id -datatype integer + mount_point -datatype keyword -optional -value sitemap +} + +# Check permissions +content::check_access $item_id cm_examine \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" \ + -request_error + +# create a form to add child items +set query " + select + t.pretty_name, c.child_type + from + acs_object_types t, cr_type_children c + where + c.parent_type = content_item.get_content_type(:item_id) + and + c.child_type = t.object_type" + +query child_types multilist $query + +# do not display template if this content type does not allow children +if { [llength $child_types] == 0 } { adp_abort } + +if { [string equal $user_permissions(cm_new) t] } { + form create add_child -method get -action "create-1" + element create add_child parent_id -datatype integer \ + -widget hidden -value $item_id + element create add_child content_type -datatype keyword \ + -options $child_types -widget select +} + +set query " + select + rel_id, relation_tag, + i.item_id, i.name, trim(r.title) as title, t.pretty_name, + to_char(o.creation_date, 'MM/DD/YY HH24:MM') last_modified + from + cr_items i, acs_object_types t, acs_objects o, cr_revisions r, + cr_child_rels c + where + i.parent_id = :item_id + and + o.object_id = :item_id + and + i.content_type = t.object_type + and + r.revision_id = NVL(i.live_revision, i.latest_revision) + and + c.parent_id = i.parent_id + and + c.child_id = i.item_id + order by + t.pretty_name, title" + +#query children multirow $query + + +set query " + select + r.rel_id, + r.child_id item_id, + t.pretty_name as type_name, + NVL(r.relation_tag, '-') as tag, + trim(NVL(content_item.get_title(r.child_id), i.name)) title, + ot.pretty_name as content_type + from + cr_child_rels r, acs_objects o, acs_object_types t, + cr_items i, acs_object_types ot + where + r.parent_id = :item_id + and + o.object_id = r.rel_id + and + t.object_type = o.object_type + and + i.item_id = r.child_id + and + ot.object_type = i.content_type + order by + order_n, title +" + +query children multirow $query Index: openacs-4/packages/cms/www/modules/items/comment-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/comment-add.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/comment-add.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,10 @@ + +@page_title@ + +

      @page_title@

      + + + + + + Index: openacs-4/packages/cms/www/modules/items/comment-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/comment-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/comment-add.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,51 @@ +set page_title "Add Comment" + +request create -params { + item_id -datatype integer +} + +template::query item_title onevalue " + select content_item.get_title(:item_id) from dual +" + +form create add_comment -elements " + journal_id -datatype integer -widget hidden + object_id -datatype integer -widget hidden -value $item_id + item_title -datatype text -widget inform -value $item_title \ + -label {Item Title} + msg -datatype text -widget textarea -html { rows 10 cols 40 } \ + -label {Message} +" + +if { [form is_request add_comment] } { + template::query journal_id onevalue " + select acs_object_id_seq.nextval from dual + " + element set_properties add_comment journal_id -value $journal_id +} + +if { [form is_valid add_comment] } { + + form get_values add_comment journal_id object_id msg + + set user_id [User::getID] + set ip_address [ns_conn peeraddr] + + set db [template::begin_db_transaction] + + ns_ora exec_plsql_bind $db "begin + :journal_id := journal_entry.new( + journal_id => :journal_id, + object_id => :object_id, + action => 'comment', + action_pretty => 'Comment', + creation_user => :user_id, + creation_ip => :ip_address, + msg => :msg ); + end;" journal_id + + template::end_db_transaction + template::release_db_handle + + template::forward "index?item_id=$object_id" +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/comments.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/comments.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/comments.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,55 @@ + + + + + + + + + + + + + +
      Comments + + [Add] + +     (More...) +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      By  Date  CommentNo comments
      + @comments.person@  @comments.when@   + @comments.action_pretty@. + @comments.msg@ 
      + +
      + + + Index: openacs-4/packages/cms/www/modules/items/comments.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/comments.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/comments.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,41 @@ +# List comments about an item (or add a new comment) + +request create -params { + item_id -datatype integer + mount_point -datatype keyword -optional -value sitemap +} + +# Check permissions +content::check_access $item_id cm_read \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" \ + -request_error + +# The creation_user may be null, in which case 'System' is substituted + +set query " + select + journal_id, action_pretty, msg, + decode(NVL(p.person_id, 0), + 0, 'System', + substr(p.first_names, 1, 1) || '. ' || p.last_name) person, + to_char(o.creation_date, 'MM/DD/YY HH24:MI:SS') when + from + journal_entries j, acs_objects o, persons p + where + ( + j.object_id = :item_id + or + j.object_id in (select case_id from wf_cases c + where c.object_id = :item_id) + ) and + j.journal_id = o.object_id + and + o.creation_user = p.person_id (+) + and + msg is not null + order by + o.creation_date desc +" + +template::query comments multirow $query -maxrows 10 Index: openacs-4/packages/cms/www/modules/items/content-add-1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/content-add-1.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/content-add-1.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,8 @@ + +Add Content to @name@ +

      Add Content to @name@

      + + + + + Index: openacs-4/packages/cms/www/modules/items/content-add-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/content-add-1.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/content-add-1.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,104 @@ +# content-add-1.tcl +# choose from (file upload, text entry) and forward to content-add-2 + +request create +request set_param revision_id -datatype integer + +set db [template::get_db_handle] + +template::query one_revision onerow " + select + i.item_id, content_type, title as name, mime_type + from + cr_revisions r, cr_items i + where + i.item_id = r.item_id + and + r.revision_id = :revision_id +" -db $db + +template::util::array_to_vars one_revision + +# permissions check - must have cm_write on the item +content::check_access $item_id cm_write -user_id [User::getID] -db $db + +template::release_db_handle + + + + +# check for custom content-add-1 form +if { [file exists [ns_url2file \ + "custom/$content_type/content-add-1.tcl"]] } { + template::release_db_handle + template::forward "custom/$content_type/content-add-1?revision_id=$revision_id" +} + + + + +# if we have an invalid revision_id, then redirect +if { [template::util::is_nil name] } { + template::request::error bad_revision_id \ + "content-add-1.tcl - Bad revision_id - $revision_id" +} + + +# get associated content methods +set content_methods \ + [content_method::get_content_methods $content_type -get_labels] + +# filter out xml_import and no_content +set filtered_content_methods [list] +foreach content_method $content_methods { + set label [lindex $content_method 0] + set method [lindex $content_method 1] + if { ![string equal $method no_content] && \ + ![string equal $method xml_import] } { + lappend filtered_content_methods [list $label $method] + } +} + +# throw an error if there are no content type after filtering out +# xml_import and no_content +if { [llength $filtered_content_methods] == 0 } { + template::request::error no_content_methods \ + "content-add-1.tcl - There are no valid content methods for + adding content to a revision." +} + +set first_method [lindex [lindex $filtered_content_methods 0] 1] + +# immediately forward to content-add-2 if there is only one content +# method registered (after filtering) +if { [llength $filtered_content_methods] == 1 } { + template::forward "content-add-2?revision_id=$revision_id&content_method=$first_method" +} + + + +# otherwise, create a form for choosing the content method (filtered) +form create choose_content_method +form section choose_content_method "Choose Content Creation Method" + +element create choose_content_method revision_id \ + -datatype integer \ + -widget hidden \ + -param + +element create choose_content_method content_method \ + -datatype keyword \ + -widget radio \ + -label "Method" \ + -options $filtered_content_methods \ + -values $first_method + + + + +if { [form is_valid choose_content_method] } { + + form get_values choose_content_method revision_id content_method + template::forward \ + "content-add-2?revision_id=$revision_id&content_method=$content_method" +} Index: openacs-4/packages/cms/www/modules/items/content-add-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/content-add-2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/content-add-2.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,8 @@ + +@page_title@ +

      @page_title@

      + + + + + Index: openacs-4/packages/cms/www/modules/items/content-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/content-add-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/content-add-2.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,48 @@ +# Add content + +request create +request set_param content_method -datatype keyword +request set_param revision_id -datatype integer + +set db [template::get_db_handle] + +template::query one_revision onerow " + select + item_id, title as name + from + cr_revisions + where + revision_id = :revision_id +" + +template::util::array_to_vars one_revision + +# permissions check - must have cm_write on the item +content::check_access $item_id cm_write -user_id [User::getID] + +template::release_db_handle + +# if we have an invalid revision_id, then redirect +if { [template::util::is_nil name] } { + ns_log Notice "content-add-2.tcl: ERROR - BAD REVISION_ID - $revision_id" + template::forward "../sitemap/index" +} + +set page_title "Add Content to $name" + +form create add_content -html { enctype "multipart/form-data" } -elements { + revision_id -datatype integer -widget hidden -param +} + +# add content element +content::add_content_element add_content $content_method + +# Process the form +if { [form is_valid add_content] } { + form get_values add_content revision_id + + content::add_content add_content $revision_id + + template::forward "revision?revision_id=$revision_id" +} + Index: openacs-4/packages/cms/www/modules/items/content-download.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/content-download.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/content-download.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,76 @@ +# download.tcl +# +# see if this person is authorized to read the file in question +# guess the MIME type from the original client filename +# have the Oracle driver grab the BLOB and write it to the connection + + +template::request create +template::request set_param revision_id -datatype integer + +set user_id [User::getID] + +set db [template::get_db_handle] + +template::query iteminfo onerow " + select + item_id, mime_type, content_revision.is_live( revision_id ) is_live + from + cr_revisions + where + revision_id = :revision_id +" + +template::util::array_to_vars iteminfo +# item_id, mime_type, is_live + +# check cm permissions on file +if { ![string equal $is_live t] } { + content::check_access $item_id cm_read -user_id $user_id +} + +template::query file_name onevalue " + select + name + from + cr_items + where + item_id = ( select + item_id + from + cr_revisions + where + revision_id = :revision_id ) +" + +template::release_db_handle + + +set headers_so_far "HTTP/1.0 200 OK +MIME-Version: 1.0 +Content-Type: $mime_type\n" + +set set_headers_i 0 +set set_headers_limit [ns_set size [ns_conn outputheaders]] +while {$set_headers_i < $set_headers_limit} { + append headers_so_far \ + "[ns_set key [ns_conn outputheaders] $set_headers_i]: [ns_set value [ns_conn outputheaders] $set_headers_i]\n" + incr set_headers_i +} +append entire_string_to_write $headers_so_far "\n" +ns_write $entire_string_to_write + +set db [template::get_db_handle] + +ns_ora write_blob $db " + select + content + from + cr_revisions + where + revision_id = $revision_id +" + +template::release_db_handle + + Index: openacs-4/packages/cms/www/modules/items/content-method-links.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/content-method-links.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/content-method-links.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,14 @@ + + + + [ + + + @content_methods_ds.label@ + | + + + + ] + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/content-method-links.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/content-method-links.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/content-method-links.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,31 @@ +# content-method-links.tcl +# Display content method links + +request create +request set_param item_id -datatype integer +request set_param content_type -datatype keyword +request set_param target_url -datatype text -value "" + + +# default target_url +if { [template::util::is_nil target_url] } { + set target_url "revision-add-2" +} + + +# get the list of associated content methods +set content_methods \ + [content_method::get_content_methods $content_type -get_labels] +set content_method_count [llength $content_methods] + + +# convert the list into a datasource +multirow create content_methods_ds label method +set i 1 +foreach one_method $content_methods { + set label [lindex $one_method 0] + set method [lindex $one_method 1] + + multirow append content_methods_ds $label $method + incr i +} Index: openacs-4/packages/cms/www/modules/items/create-1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/create-1.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/create-1.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +Create a New @content_type_name@ +

      Create a New @content_type_name@

      + + Index: openacs-4/packages/cms/www/modules/items/create-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/create-1.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/create-1.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,136 @@ +# create-1.tcl +# choose from (no content, file upload, text entry, xml import) +# then forward to create-2 or revision-upload + +request create +request set_param content_type -datatype keyword -value "content_revision" +request set_param mount_point -datatype keyword -value "sitemap" +request set_param parent_id -datatype integer -optional + +set flush_parent_id $parent_id + +# Manually set the value since the templating system is still broken in +# the -value flag +if { [template::util::is_nil parent_id] } { + set parent_id [cm::modules::${mount_point}::getRootFolderID] +} + +set db [template::get_db_handle] + +# permissions check - need cm_new on the parent item +content::check_access $parent_id cm_new -user_id [User::getID] + +# flush the sitemap folder listing cache in anticipation +# of the new item +cms_folder::flush sitemap $flush_parent_id + +# check for custom create-1 form +if { [file exists [ns_url2file \ + "custom/$content_type/create-1.tcl"]] } { + + template::release_db_handle + template::forward "custom/$content_type/create-1?content_type=$content_type&mount_point=$mount_point&parent_id=$parent_id" +} + + +template::query content_type_name onevalue " + select + pretty_name + from + acs_object_types + where + object_type = :content_type +" + +template::release_db_handle + + +if { [template::util::is_nil content_type_name] } { + template::request::error bad_content_type \ + "create-1.tcl - Bad content type - $content_type" +} + + +# get the list of associated content methods +set content_methods \ + [content_method::get_content_methods $content_type -get_labels] +set first_method [lindex [lindex $content_methods 0] 1] +set first_label [lindex [lindex $content_methods 0] 0] + +form create choose_content_method +form section choose_content_method "Choose Content Creation Method" + +element create choose_content_method parent_id \ + -datatype integer \ + -widget hidden \ + -value $parent_id + +element create choose_content_method content_type \ + -datatype keyword \ + -widget hidden \ + -value $content_type + + +# if there is only one valid content_method, don't show the radio buttons +# and instead use a hidden widget and inform widget for content_method +if { [llength $content_methods] == 1 } { + + element create choose_content_method content_method \ + -datatype keyword \ + -widget hidden \ + -value $first_method + + element create choose_content_method content_method_inform \ + -widget inform \ + -label "Method" \ + -value $first_label +} else { + + element create choose_content_method content_method \ + -datatype keyword \ + -widget radio \ + -label "Method" \ + -options $content_methods \ + -values $first_method +} + + +# Add the relation tag element +content::add_child_relation_element choose_content_method -section + +# if there is no relation tag necessary and there is only one content method, +# then forward to create-2 with that content method +if { ![element exists choose_content_method relation_tag] && \ + [llength $content_methods] == 1 } { + template::forward "create-2?parent_id=$parent_id&content_type=$content_type&content_method=$first_method" +} + + +# Process the form +if { [form is_valid choose_content_method] } { + + form get_values choose_content_method \ + content_type parent_id content_method + + if { [element exists choose_content_method relation_tag] } { + set relation_tag \ + [element get_value choose_content_method relation_tag] + } + if { [util::is_nil relation_tag] } { + set relation_tag "" + } + + + + # XML imports should forward to revision-upload + # otherwise pass the content_method to revision-add + if { [string equal $content_method "xml_import"] } { + template::forward "revision-upload?content_type=$content_type&parent_id=$parent_id&relation_tag=$relation_tag" + } + + template::forward "create-2?content_type=$content_type&parent_id=$parent_id&content_method=$content_method&relation_tag=$relation_tag" + +} + + + Index: openacs-4/packages/cms/www/modules/items/create-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/create-2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/create-2.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,12 @@ + + + @page_title@ + +

      @page_title@

      + + + + + + + Index: openacs-4/packages/cms/www/modules/items/create-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/create-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/create-2.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,118 @@ +# /create-2.tcl +# Get the folder where the item is being created + +# Parameters: +# +# parent_id - create the item under this parent (required) +# content_type - use this content type (required) +# content_method - no_content file_upload text_entry +# return_url - the url where the browser will go after the item is created +# (default index) +# is_wizard - use the wizard style form template? if wizard exists, +# setting this to 'f' won't override the wizard formatting + +request create +request set_param parent_id -datatype integer +request set_param content_type -datatype keyword +request set_param content_method -datatype keyword -value "no_content" +request set_param relation_tag -datatype text -optional + +# optional +request set_param return_url -datatype text -value "index" +request set_param page_title -datatype text -optional +request set_param is_wizard -datatype keyword -value f + +set db [template::get_db_handle] + +# permissions check - need cm_new on the parent item +content::check_access $parent_id cm_new -user_id [User::getID] + +template::query new_item onerow " + select + NVL(content_item.get_path(:parent_id), '/') as item_path, + pretty_name as content_type_name + from + acs_object_types + where + object_type = :content_type +" + +template::release_db_handle + +# validate content_type and parent_id +if { [template::util::is_nil new_item] } { + template::request::error create_item_form_generation_error \ + "Bad parent_id = $parent_id or bad content_type = $content_type" +} +template::util::array_to_vars new_item + +# set default page title +if { [template::util::is_nil page_title] } { + set page_title "Create a $content_type_name" +} + + +# Create a form for the basic item, no revision info +form create create_item -html { enctype "multipart/form-data" } + +element create create_item item_path \ + -datatype text \ + -widget inform \ + -label "Folder" \ + -value $item_path + +element create create_item content_type_name \ + -datatype text \ + -widget inform \ + -label "Content Type" \ + -value $content_type_name + +element create create_item return_url \ + -datatype text \ + -widget hidden \ + -optional \ + -value $return_url + +element create create_item relation_tag \ + -datatype text \ + -widget hidden \ + -optional \ + -param + +# auto-generated form +content::new_item_form -form_name create_item \ + -parent_id $parent_id \ + -content_type $content_type \ + -content_method $content_method + + +if { [wizard exists] } { + set is_wizard t + wizard submit create_item +} + + +# create a new content item +if { [form is_valid create_item] } { + + # check for duplicate name within same folder or parent item. + if { ![content::validate_name create_item] } { + set name [template::element get_value create_item name] + template::element::set_error create_item name \ + "The name \"$name\" is already in use by an existing item
      + in the same folder or parent item." + return + } + + form get_values create_item return_url item_id + + set item_id [content::new_item create_item] + + # do wizard forward or forward to return_url + if { ![wizard exists] } { + template::forward \ + [content::assemble_url $return_url "item_id=$item_id"] + } else { + template::wizard forward + } +} Index: openacs-4/packages/cms/www/modules/items/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/delete.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,46 @@ +# Delete a content item and all of its revisions, + +request create +request set_param item_id -datatype keyword +request set_param mount_point -datatype keyword -value sitemap + +set db [template::begin_db_transaction] + +# permissions check - must have cm_write permissions on item to delete +content::check_access $item_id cm_write -user_id [User::getID] + +# get all the parent_id's of the items being deleted +# because we need to flush the paginator cache for each of these folders +template::query flush_list onelist " + select + parent_id + from + cr_resolved_items + where + resolved_id = :item_id +" + +template::query item_delete dml " + begin + content_item.delete( + item_id => :item_id + ); + end;" + +template::end_db_transaction +template::release_db_handle + +# flush cache +set root_id [cm::modules::${mount_point}::getRootFolderID] +set flushed_list [list] +foreach parent_id $flush_list { + if { [lsearch -exact $flushed_list $parent_id] == -1 } { + if { $parent_id == $root_id } { + set parent_id "" + } + cms_folder::flush $mount_point $parent_id + lappend flushed_list $parent_id + } +} + +template::forward "../sitemap/index?id=" Index: openacs-4/packages/cms/www/modules/items/export-xml.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/export-xml.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/export-xml.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,19 @@ +request create -params { + revision_id -datatype integer +} + +set db [template::get_db_transaction] + +ns_ora exec_plsql_bind $db "begin + :doc_id := content_revision.export_xml(:revision_id); +end;" doc_id + +template::query xml_doc onevalue " + select doc from cr_xml_docs where doc_id = :doc_id +" + +template::end_db_transaction +template::release_db_handle + +ns_return 200 text/xml $xml_doc + Index: openacs-4/packages/cms/www/modules/items/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,112 @@ + +Content Item + + + +

      + + +
      + + + + + +
      + + + + + +
      + + + +
      + + + + + + + + + + + + + + + + + + + + + + +
      + +

      + + +

      + + +

      +

      + +

      + + +

      +



      + + + Delete + marked items. +
      + + +

      + + + +

      + + + +

      + + + +

      +

      + +

      +

      + +
      + +
      + +
      + + + + +

      + + Rename this content item + + +
      + + Delete this content item +

      + + + +

      Index: openacs-4/packages/cms/www/modules/items/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,88 @@ +# /cms/modules/items/index.tcl + +# Assemble information for a content item. Note this page is only +# appropriate for revisioned content items. Non-revisioned content +# items (symlinks, extlinks and folders) have separate admin pages + +# Most information on this page is included via components. + +# HACK: sometimes the query string does not get parsed when returning +# from revision-add-2. The reason for this is unclear. + +if { [string equal [ns_queryget item_id] {}] } { + ns_log Notice "ITEM ID NOT FOUND...PARSING QUERY STRING" + set item_id [lindex [split [ns_conn query] "="] 1] +} + +# The mount_point is used to determine the proper root context +# when querying the path to the item. + +request create +request set_param item_id -datatype integer +request set_param mount_point -datatype keyword -optional -value sitemap +request set_param page -datatype integer -optional -value 1 + +set db [template::get_db_handle] + +# resolve any symlinks +query resolved_item_id onevalue " + select content_symlink.resolve(:item_id) from dual +" -cache "symlink_resolve $item_id" -persistent + +set item_id $resolved_item_id + +# Check permissions +content::check_access $item_id cm_examine \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" + +# query the content_type of the item ID so we can check for a custom info page +template::query info onerow " + select + content_type, latest_revision + from + cr_items + where + item_id = :item_id" + +template::util::array_to_vars info + +template::release_db_handle + +# build the path to the custom interface directory for this content type + +set custom_dir [file dirname [ns_conn url]]/custom/$content_type + +# check for the custom info page and redirect if found + +if { [file exists [ns_url2file $custom_dir/index.tcl]] } { + + template::forward $custom_dir/index?item_id=$item_id +} + +# The root ID is to determine the appropriate path to the item + +if { [string equal $mount_point templates] } { + set root_id [cm::modules::templates::getRootFolderID] +} else { + set root_id [cm::modules::sitemap::getRootFolderID] +} + +# Set up passthrough for permissions +set return_url [ns_conn url] +set passthrough [content::assemble_passthrough \ + return_url mount_point item_id] + +### Create the tab strip for showing individual item property pages + +# Get the current tab, if any + + +set url [ns_conn url] +append url "?item_id=$item_id&mount_point=$mount_point&page=$page" + +template::tabstrip create item_props -base_url $url +template::tabstrip add_tab item_props editing "Editing" editing +template::tabstrip add_tab item_props children "Sub-Items" children +template::tabstrip add_tab item_props publishing "Publishing" publishing +template::tabstrip add_tab item_props permissions "Permissions" permissions Index: openacs-4/packages/cms/www/modules/items/keywords.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/keywords.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/keywords.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,55 @@ + + + + + + + + + + + + +
      Subject Keywords + + [ + Assign ] marked keywords to this item +   +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      No keywords.Heading   Description    
      + @keywords.heading@   @keywords.description@    + + + +   +
      + +
      + + Index: openacs-4/packages/cms/www/modules/items/keywords.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/keywords.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/keywords.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,33 @@ +# Display a list of keywords for the item + +# page variables +template::request create -params { + item_id -datatype integer + mount_point -datatype keyword -optional -value "sitemap" +} + +# Check permissions +content::check_access $item_id cm_examine \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" \ + -request_error + +set query "select name from cr_items where item_id = :item_id" + +query name onevalue $query + +set query "select + keyword_id, + content_keyword.get_heading(keyword_id) heading, + NVL(content_keyword.get_description(keyword_id), + '-') description + from + cr_item_keyword_map + where + item_id = :item_id + order by + heading" + +query keywords multirow $query + +set page_title "Content Keywords for $name" Index: openacs-4/packages/cms/www/modules/items/publish-status.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/publish-status.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/publish-status.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,95 @@ + + + + + + + + +
      Publishing Status + + [Edit] + +   +
      + + + + + + + + +
      @message@
      + This item is + NOT + in a publishable state:. + + +
        + + + + + +
      • This item has no live revision. + + + + + + +
      • This item's publishing workflow is still active. + + + + + + + + +
      • This item requires the following number of child items: +
          + + +
        • @child_types.difference@ @child_types.direction@ + @child_types.relation_tag@ + @child_types.child_type_pretty@ + @child_types.child_type_plural@ +
          + + +
        + + + + + + + + +
      • This item requires the following number of related items: +
          + + +
        • @rel_types.difference@ @rel_types.direction@ + @rel_types.relation_tag@ + @rel_types.target_type_pretty@ + @rel_types.target_type_plural@ +
          + + +
        + + + + + + + + +
      +
      +
      + +
      Index: openacs-4/packages/cms/www/modules/items/publish-status.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/publish-status.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/publish-status.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,211 @@ +# /cms/www/modules/items/publish-status.tcl +# Indicates whether or not the item is publishable and displays +# what needs to be done before this item can be published. +request create +request set_param item_id -datatype integer + +set db [template::get_db_handle] + +# permissions check - requires cm_item_workflow +content::check_access $item_id cm_examine -user_id [User::getID] + +# Query for publish status and release schedule, if any + +set query " + select + NVL(initcap(publish_status), 'Production') publish_status, + NVL(to_char(start_when, 'MM/DD/YY HH:MI AM'), 'Immediate') start_when, + NVL(to_char(end_when, 'MM/DD/YY HH:MI AM'), 'Indefinite') end_when, + content_item.is_publishable(:item_id) is_publishable, + live_revision + from + cr_items i, cr_release_periods r + where + i.item_id = :item_id + and + i.item_id = r.item_id (+)" + +template::query info onerow $query + +# Build a sentence describing the publishing status + +set actions [list] + +switch $info(publish_status) { + + Production { + set message "This item is in production." + } + + Ready { + set message "This item is ready for publishing. " + if { ! [string equal $info(start_when) Immediate] } { + append message "It has been scheduled for release + on $info(start_when)." + } else { + append message "It has not been scheduled for release." + } + } + + Live { + set message "This item has been published. " + if { ! [string equal $info(end_when) Indefinite] } { + append message "It has been scheduled to expire + on $info(end_when)." + } else { + append message "It has no expiration date." + } + } + + Expired { + set message "This item is expired." + } +} + +# determine whether the item is publishable or not + +template::query publish_info onerow " + select + content_item.is_publishable( item_id ) is_publishable, + live_revision + from + cr_items + where + item_id = :item_id +" + +template::util::array_to_vars publish_info + +# if the live revision doesn't exist, the item is unpublishable +if { [template::util::is_nil live_revision] } { + set is_publishable f +} + + +# determine if there is an unfinished workflow + +template::query unfinished_workflow_exists onevalue " + select content_workflow.unfinished_workflow_exists( :item_id ) from dual +" + +# determine if child type constraints have been satisfied + +set unpublishable_child_types 0 + +template::query child_types multirow " + select + child_type, relation_tag, min_n, + o.pretty_name as child_type_pretty, + o.pretty_plural as child_type_plural, + decode(max_n, null, '-', max_n) max_n, + ( + select + count(*) + from + cr_child_rels + where + parent_id = i.item_id + and + content_item.get_content_type( child_id ) = c.child_type + and + relation_tag = c.relation_tag + ) child_count + from + cr_type_children c, cr_items i, acs_object_types o + where + c.parent_type = i.content_type + and + c.child_type = o.object_type + and + -- this item is the parent + i.item_id = :item_id +" -eval { + + # set is_fulfilled to t if the relationship constraints are fulfilled + # otherwise set is_fulfilled to f + + # keep track of numbers + # difference - the (absolute) number of child items in excess or lack + # direction - whether "more" or "less" child items are needed + + set row(is_fulfilled) t + set row(difference) 0 + set row(direction) "" + + if { $row(child_count) < $row(min_n) } { + set row(is_fulfilled) f + incr unpublishable_child_types + set row(difference) [expr $row(min_n)-$row(child_count)] + set row(direction) more + } + if { ![string equal $row(max_n) -] && $row(child_count) > $row(max_n) } { + set row(is_fulfilled) f + incr unpublishable_child_types + set row(difference) [expr $row(child_count)-$row(max_n)] + set row(direction) less + } +} + + + +# determine if relation type constraints have been satisfied + +set unpublishable_rel_types 0 + +template::query rel_types multirow " + select + target_type, relation_tag, min_n, + o.pretty_name as target_type_pretty, + o.pretty_plural as target_type_plural, + decode(max_n, null, '-', max_n) max_n, + ( + select + count(*) + from + cr_item_rels + where + item_id = i.item_id + and + content_item.get_content_type( related_object_id ) = r.target_type + and + relation_tag = r.relation_tag + ) rel_count + from + cr_type_relations r, cr_items i, acs_object_types o + where + o.object_type = r.target_type + and + r.content_type = i.content_type + and + i.item_id = :item_id +" -eval { + + # set is_fulfilled to t if the relationship constraints are fulfilled + # otherwise set is_fulfilled to f + + # keep track of numbers + # difference - the (absolute) number of related items in excess or lack + # direction - whether "more" or "less" related items are needed + + set row(is_fulfilled) t + set row(difference) 0 + set row(direction) "" + + if { $row(rel_count) < $row(min_n) } { + set row(is_fulfilled) f + incr unpublishable_rel_types + set row(difference) [expr $row(min_n)-$row(rel_count)] + set row(direction) more + } + if { ![string equal $row(max_n) -] && $row(rel_count) > $row(max_n) } { + set row(is_fulfilled) f + incr unpublishable_rel_types + set row(difference) [expr $row(rel_count)-$row(max_n)] + set row(direction) less + } + +} + +template::release_db_handle + + Index: openacs-4/packages/cms/www/modules/items/publish.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/publish.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/publish.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,54 @@ +# publish.tcl +# Publish a revision to the file system. + +request create +request set_param revision_id -datatype integer + +set root_path [ns_info pageroot] + +set db [template::begin_db_transaction] + +template::query iteminfo onerow " + select + item_id, + content_item.is_publishable( item_id ) as publish_p + from + cr_revisions + where + revision_id = :revision_id +" + + +template::util::array_to_vars iteminfo +# item_id, publish_p + + +if { [string equal $publish_p t] } { + + # publish::publish_revision $revision_id + + template::query set_live_revision dml " + begin + content_item.set_live_revision( + revision_id => :revision_id + ); + end;" + + publish::unpublish_item $item_id + +} else { + + ns_ora dml $db "abort transaction" + template::release_db_handle + + set msg "This item is not in a publishable state" + set return_url "index?item_id=$item_id" + set passthrough { { item_id $item_id } } + + content::show_error $msg $return_url $passthrough +} + +template::end_db_transaction +template::release_db_handle + +template::forward "index?item_id=$item_id" Index: openacs-4/packages/cms/www/modules/items/relate-child-order.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/relate-child-order.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/relate-child-order.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,78 @@ +# Move the related item up or down + +request create +request set_param rel_id -datatype integer +request set_param order -datatype keyword +request set_param mount_point -datatype keyword -optional -value "sitemap" +request set_param return_url -datatype text -optional -value "index" +request set_param passthrough -datatype text -optional -value [content::assemble_passthrough mount_point] + +set db [template::begin_db_transaction] + +# Get the irelated items +template::query rel_info onerow " + select parent_id as item_id, order_n from cr_child_rels + where rel_id = :rel_id" + +if { ![info exists rel_info] } { + ns_db dml $db "abort transaction" + template::release_db_handle + request::error no_such_rel "The relationship $rel_id does not exist." + return +} + +template::util::array_to_vars rel_info +lappend passthrough [list item_id $item_id] + +# Move the relation up: + +if { [string equal $order up] } { + # Get the previous item's order + template::query swap_rel onerow " + select rel_id, order_n from cr_child_rels r1 + where r1.parent_id = :item_id + and r1.order_n < :order_n + and not exists (select order_n from cr_child_rels r2 + where r2.parent_id = :item_id + and r2.order_n < :order_n + and r2.order_n > r1.order_n)" +} else { + # Get the next item's order + template::query swap_rel onerow " + select rel_id, order_n from cr_child_rels r1 + where r1.parent_id = :item_id + and r1.order_n > :order_n + and not exists (select order_n from cr_child_rels r2 + where r2.parent_id = :item_id + and r2.order_n > :order_n + and r2.order_n < r1.order_n)" +} + +# Only need to perform DML if the rel is not already at the top/bottom +if { [info exists swap_rel] } { + + set swap_id $swap_rel(rel_id) + set swap_order $swap_rel(order_n) + + template::query child_swap_1 dml " + update cr_child_rels set order_n = :swap_order where rel_id = :rel_id + " + template::query child_swap_2 dml " + update cr_child_rels set order_n = :order_n where rel_id = :swap_id + " +} else { + ns_log notice "ORDER: Relation cannot be moved further" +} + +template::end_db_transaction +template::release_db_handle + +template::forward "$return_url?[content::url_passthrough $passthrough]" + + + + + + + + Index: openacs-4/packages/cms/www/modules/items/relate-items-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/relate-items-2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/relate-items-2.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,9 @@ + +@page_title@ + +

      @page_title@ (Step 2)

      +@item_title@ + +
      + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/relate-items-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/relate-items-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/relate-items-2.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,173 @@ +# Step 2 in the relate item wizard - presents a custom form +# for each relation + +request create -params { + item_id -datatype integer + mount_point -datatype keyword -value sitemap -optional + rel_list -datatype text + page_title -datatype text -optional -value "Relate Items" +} + +# rel_list is a list of lists in form of +# {item_id relation_tag order_n relation_type} + +# Check permissions +content::check_access $item_id cm_relate \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" + +# Create the basic form +form create rel_form_2 + +element create rel_form_2 item_id -label "Item Id" \ + -widget hidden -datatype integer -value $item_id +element create rel_form_2 mount_point -label "Mount Point" \ + -widget hidden -datatype keyword -value $mount_point -optional +element create rel_form_2 rel_list -label "Rel List" \ + -widget hidden -datatype text -value $rel_list +element create rel_form_2 page_title -label "Page Title" \ + -widget hidden -datatype text -value $page_title + +# Create extra widgets; one widget for each relationship, and a +# multirow datasource that encompasses them all +upvar 0 "rel_attrs:rowcount" index +set index 0 + +set db [template::get_db_handle] + +template::query item_title onevalue " + select content_item.get_title(:item_id) from dual" + +# Create the main multirow datasource + +set form_complete 1 + +foreach rel $rel_list { + incr index + upvar 0 "rel_attrs:$index" rel_row + set rel_row(rownum) $index + + set related_id [lindex $rel 0] + set relation_tag [lindex $rel 1] + set order_n [lindex $rel 2] + set relation_type [lindex $rel 3] + + set rel_row(related_id) $related_id + set rel_row(relation_tag) $relation_tag + set rel_row(order_n) $order_n + set rel_row(relation_type) $relation_type + set rel_row(elements) [list] + set row(dmls) [list] + + # Get all elements, if any + set content_type $relation_type + content::query_form_metadata $db params multirow { + object_type <> 'cr_item_rel' + } + + if { ${params:rowcount} > 0 } { + + set form_complete 0 + + # Get the header + template::query rel_info onerow " + select + content_item.get_title(:item_id) as item_title, + content_item.get_title(:related_id) as related_title, + pretty_name + from + acs_object_types + where + object_type = :relation_type + " + + # Create the form section + form section rel_form_2 \ + "$rel_info(pretty_name) : $rel_info(item_title) relates to $rel_info(related_title)" + + element create rel_form_2 tag_info_$index -label "Relation Tag" \ + -datatype text -widget inform -value $rel_row(relation_tag) + + # Create all the custom elements + set j 1 + set last_table {} + set element_list [list] + while { 1 } { + upvar 0 "params:$j" el_row + template::util::array_to_vars el_row + lappend rel_row(elements) $attribute_name + + set j [content::assemble_form_element params $attribute_name $j] + ns_log notice "$j : $attribute_name, $code_params" + eval "template::element create rel_form_2 ${attribute_name}_$index $code_params" + + if { $j > ${params:rowcount} } { + break + } + + } + } +} + + + +# Process the form +if { [form is_valid rel_form_2] || $form_complete } { + + # sort order_n for all related items for consistency + form get_values rel_form_2 item_id + cms_rel::sort_related_item_order $item_id + + + set db [template::begin_db_transaction ] + + unset row + + for { set i 1 } { $i <= ${rel_attrs:rowcount} } {incr i} { + upvar 0 "rel_attrs:$i" row + template::util::array_to_vars row + + # Insert the basic data + + # Insert at the end if no order + if { [template::util::is_nil order_n] } { + template::query order_n onevalue " + select + NVL(max(order_n) + 1, 1) + from + cr_item_rels + where + item_id = :item_id + " + } + + # Perform the insertion + ns_ora exec_plsql_bind $db "begin + :rel_id := content_item.relate ( + item_id => :item_id, + object_id => :related_id, + relation_tag => :relation_tag, + order_n => :order_n, + relation_type => :relation_type + ); + end;" rel_id + + # Insert any extra attributes + if { [llength $elements] > 0 } { + set attr_list [template::util::tcl_to_sql_list $elements] + ns_log notice "$i : $attr_list" + content::insert_element_data $db rel_form_2 $relation_type \ + [list acs_object cr_item_rel] $rel_id "_$i" \ + " attribute_name in ($attr_list)" + } + } + + template::end_db_transaction + template::release_db_handle + + template::forward "index?item_id=$item_id&mount_point=$mount_point" +} + + + + Index: openacs-4/packages/cms/www/modules/items/relate-items.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/relate-items.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/relate-items.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,21 @@ + +@page_title@ + +

      @page_title@ (Step 1)

      +@item_title@ + +
      + + +

      No items are currently available for relating. Please mark + your choices and return to this form.

      +
      + + +

      None of the marked items may be related to "@item_title@"

      +
      + + + +
      \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/relate-items.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/relate-items.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/relate-items.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,202 @@ +# This form will list all currently marked content items +# and confirm that the user wishes to link them all to the current item +request create -params { + item_id -datatype integer + mount_point -datatype keyword -value sitemap +} + +# Check permissions +content::check_access $item_id cm_relate \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" + +######################## BASIC PHASE: create default elements ################### + + # Get the item title and type + query item_info onerow " + select + content_item.get_title(i.item_id) as title, + i.content_type + from + cr_items i + where + i.item_id = :item_id" + + set item_title $item_info(title) + set item_type $item_info(content_type) + set page_title "Relate Items to \"$item_title\"" + + # get related items from the clipboard + set clip [clipboard::parse_cookie] + set items [clipboard::get_items $clip $mount_point] + + # If no items are clipped, abort + if { [llength $items] < 1 } { + set no_items_on_clipboard t + return + } else { + set no_items_on_clipboard f + } + + # Get all possible relation types + query type_options multilist " + select + lpad(' ', level, '-') || pretty_name as pretty_name, + object_type + from + acs_object_types + connect by + prior object_type = supertype + start with + object_type = 'cr_item_rel'" + + # Prepare the query + set sql_items "('" + append sql_items [join $items "','"] + append sql_items "')" + + set query " + select + i.item_id as related_id, + content_item.get_title(i.item_id) as title, + content_item.get_path(i.item_id) as path, + tr.relation_tag + from + cr_items i, cr_type_relations tr + where + content_item.is_subclass(i.content_type, tr.target_type) = 't' + and + content_item.is_subclass(:item_type, tr.content_type) = 't' + and ( + tr.max_n is null + or + (select count(*) from cr_item_rels + where item_id = :item_id + and relation_tag = tr.relation_tag) < tr.max_n + ) + and + i.item_id in $sql_items + and + i.item_id ^= :item_id + order by + path, i.item_id, tr.relation_tag" + + + template::query clip_items multirow $query + + if { ${clip_items:rowcount} < 1} { + set no_valid_items t + return + } else { + set no_valid_items f + } + + # Process the query + clipboard::ui::form_create rel_form + + # A short proc to add a row + proc add_row { } { + uplevel { + upvar 0 "clip_items:[expr $j - 1]" prev_row + clipboard::ui::add_row rel_form $mount_point $prev_row(related_id) $prev_row(title) -checked + clipboard::ui::element_create rel_form path -datatype text -widget hidden \ + -value $prev_row(path) + clipboard::ui::element_create rel_form relation_type -datatype keyword -widget select \ + -options $type_options + clipboard::ui::element_create rel_form relation_tag -datatype text -widget select \ + -options $item_tags + clipboard::ui::element_create rel_form order_n -datatype integer -widget text \ + -html { size 3 } -optional + } + } + + for { set j 1 } { $j <= ${clip_items:rowcount}} {incr j} { + upvar 0 "clip_items:$j" clip_row + + if { $j == 1 } { + + set prev_item $clip_row(related_id) + set item_tags [list [list $clip_row(relation_tag) $clip_row(relation_tag)]] + + } elseif { $prev_item != $clip_row(related_id) && [llength $item_tags] > 0 } { + + # Apppend another row + add_row + + set item_tags [list [list $clip_row(relation_tag) $clip_row(relation_tag)]] + set prev_item $clip_row(related_id) + + } else { + + # Append a tag + lappend item_tags [list $clip_row(relation_tag) $clip_row(relation_tag)] + } + + } + + # Add the last row + add_row + + # Add passthrough + element create rel_form item_id -label "Item ID" \ + -datatype integer -widget hidden -param + element create rel_form mount_point -label "Mount Point" \ + -datatype keyword -widget hidden -param -optional -value sitemap + element create rel_form next_button -label "Next >>" \ + -widget submit -datatype text + element create rel_form checked_rows -label "Checked Rows" \ + -widget hidden -datatype text -optional + element create rel_form phase -label "Phase" \ + -widget hidden -datatype keyword -value "basic" + element create rel_form item_title -label "Item Title" \ + -widget hidden -datatype text -value $item_title + element create rel_form item_type -label "Item Type" \ + -widget hidden -datatype keyword -value $item_type + + # See if any items were valid for relating + if { ![info exists rel_form_data:rowcount] || ${rel_form_data:rowcount} < 1 } { + set no_valid_items t + return + } else { + set no_valid_items f + } + + # Process the form - remember which rows were checked, prepare + # hidden variables + if { [form is_valid rel_form] } { + set rel_list [list] + set source_id $item_id + + set db [template::begin_db_transaction] + + clipboard::ui::process_form rel_form { + if { $row(checked) } { + + template::util::array_to_vars row + + lappend rel_list [list $item_id $relation_tag $order_n $relation_type] + } + } + + template::end_db_transaction + template::release_db_handle + + # If no rows are checked, we're done + if { [llength $rel_list] < 1 } { + template::forward "index?item_id=$source_id&mount_point=$mount_point" + return + } + + # There are checked rows - create a custom form for each row + template::forward "relate-items-2?item_id=$source_id&mount_point=$mount_point&rel_list=$rel_list&page_title=$page_title" + + } + + + + + + + + + Index: openacs-4/packages/cms/www/modules/items/relate-order.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/relate-order.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/relate-order.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,124 @@ +# Move the related item up or down + +request create +request set_param rel_id -datatype integer +request set_param order -datatype keyword +request set_param mount_point -datatype keyword -value "sitemap" +request set_param return_url -datatype text -value "index" +request set_param passthrough -datatype text \ + -value [content::assemble_passthrough mount_point] +request set_param relation_type -datatype keyword -value "relation" + + + +# Use hardcoding instead of inheritance, since inheritance is not in the +# data model for some reason + +if { [string equal $relation_type child] } { + set rel_table "cr_child_rels" + set rel_parent_column "parent_id" +} else { + set rel_table "cr_item_rels" + set rel_parent_column "item_id" +} + + +set db [template::begin_db_transaction] + +# Get item_id the related/child item +template::query item_id onevalue " + select + $rel_parent_column + from + $rel_table + where + rel_id = :rel_id" + +if { [template::util::is_nil item_id] } { + ns_db dml $db "abort transaction" + template::release_db_handle + request::error no_such_rel "The relationship $rel_id does not exist." + return +} + +template::util::array_to_vars rel_info +lappend passthrough [list item_id $item_id] + + + +# Check permissions - must have cm_relate on the item +content::check_access $item_id cm_relate \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" + + +# Sort the related/child items order to ensure unique order_n +if { [string equal $relation_type child] } { + cms_rel::sort_child_item_order $item_id +} else { + cms_rel::sort_related_item_order $item_id +} + +# grab the (sorted) order of the original related/child item +template::query order_n onevalue " + select + order_n + from + $rel_table + where + rel_id = :rel_id" + + +# Move the relation up or down +if { [string equal $order "up"] } { + + # Get the previous related/child + template::query swap_rel onerow " + select + rel_id, order_n + from + $rel_table + where + $rel_parent_column = :item_id + and + order_n = :order_n - 1" + +} else { + + # Get the next related/child item + template::query swap_rel onerow " + select + rel_id, order_n + from + $rel_table + where + $rel_parent_column = :item_id + and + order_n = :order_n + 1" + +} + + +# Only need to perform DML if the rel is not already at the top/bottom +if { ![template::util::is_nil swap_rel] } { + set swap_id $swap_rel(rel_id) + set swap_order $swap_rel(order_n) + + template::query relate_swap_1 dml " + update $rel_table + set order_n = :swap_order + where rel_id = :rel_id" + + template::query relate_swap_2 dml " + update $rel_table + set order_n = :order_n + where rel_id = :swap_id" + +} else { + ns_log notice "relate-order.tcl: $relation_type cannot be moved further" +} + +template::end_db_transaction +template::release_db_handle + +template::forward "$return_url?[content::url_passthrough $passthrough]" Index: openacs-4/packages/cms/www/modules/items/related-items.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/related-items.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/related-items.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,94 @@ + +Related Items + + + + + + + + + + + + + +
      Related Items + + [Add] +   +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      No related items.    Content Type   Title   Relationship Type   Tag     
      + +    @related.content_type@    +   + + @related.title@ + +    @related.type_name@    + @related.tag@    + + + +   + + + + + +
      +
      +
      +
        +
      + +
      + + + Index: openacs-4/packages/cms/www/modules/items/related-items.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/related-items.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/related-items.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,37 @@ +request create +request set_param item_id -datatype integer +request set_param mount_point -datatype keyword -value "sitemap" + +# Check permissions +content::check_access $item_id cm_examine \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" \ + -request_error + +set query " + select + r.rel_id, + r.related_object_id item_id, + t.pretty_name as type_name, + NVL(r.relation_tag, '-') as tag, + trim(NVL(content_item.get_title(r.related_object_id), i.name)) title, + ot.pretty_name as content_type + from + cr_item_rels r, acs_objects o, acs_object_types t, + cr_items i, acs_object_types ot + where + r.item_id = :item_id + and + o.object_id = r.rel_id + and + t.object_type = o.object_type + and + i.item_id = r.related_object_id + and + ot.object_type = i.content_type + order by + order_n, title +" + +query related multirow $query + Index: openacs-4/packages/cms/www/modules/items/relationship-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/relationship-view.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/relationship-view.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,72 @@ + +Relationship Details + +

      Relationship Details

      + + + + + + + + + + + + + + + + + +
      AttributesRelationship between + + @rel_info.item_title@ + + and + + + @rel_info.related_title@ + + + @rel_info.related_title@ + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Relation Tag   @rel_info.relation_tag@
      Sort Order    @rel_info.order_n@
      @rel_attrs.type_name@
      @rel_attrs.attribute_label@     + @rel_attrs.value@
      + +
      + + Index: openacs-4/packages/cms/www/modules/items/relationship-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/relationship-view.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/relationship-view.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,83 @@ +# View a relationship + +request create -params { + rel_id -datatype integer + mount_point -datatype keyword -value sitemap -optional +} + +# Get misc info + +template::query rel_info onerow " + select + t.pretty_name as type_name, t.object_type, + r.item_id, r.related_object_id,\ + content_item.get_title(i.item_id) as item_title, + acs_object.name(r.related_object_id) as related_title, + content_item.is_subclass(o2.object_type, 'content_item') as is_item, + r.relation_tag, r.order_n + from + acs_objects o, acs_object_types t, + cr_item_rels r, cr_items i, acs_objects o2 + where + o.object_type = t.object_type + and + o.object_id = :rel_id + and + r.rel_id = :rel_id + and + i.item_id = r.item_id + and + o2.object_id = r.related_object_id +" + +template::util::array_to_vars rel_info + +# Get extra attributes + +template::query rel_attrs multirow " + select + types.table_name, types.id_column, attr.attribute_name, + attr.pretty_name as attribute_label, attr.datatype, + types.pretty_name as type_name + from + acs_attributes attr, + (select + object_type, table_name, id_column, pretty_name, + level as inherit_level + from + acs_object_types + where + object_type not in ('acs_object', 'cr_item_rel') + connect by + prior supertype = object_type + start with + object_type = :object_type) types + where + attr.object_type (+) = types.object_type + order by + inherit_level desc, attr.pretty_name + " + +# Get attribute values... inefficient ! + +for { set i 1 } { $i <= ${rel_attrs:rowcount} } { incr i } { + upvar 0 "rel_attrs:$i" a_row + + if { [string equal $a_row(datatype) date] } { + set what "to_char($a_row(attribute_name), 'Mon DD, YYYY HH24:MI') as value" + } else { + set what "$a_row(attribute_name) as value" + } + + template::query value onevalue " + select $what from $a_row(table_name) + where $a_row(id_column) = :rel_id" + + set a_row(value) $value + +} + + + + + Index: openacs-4/packages/cms/www/modules/items/rename.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/rename.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/rename.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +@page_title@ +

      @page_title@

      + +

      Index: openacs-4/packages/cms/www/modules/items/rename.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/rename.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/rename.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,83 @@ +# /items/rename.tcl +# Change name of a content item + +request create +request set_param item_id -datatype integer +request set_param mount_point -datatype keyword -value sitemap + +set db [template::get_db_handle] + +# permissions check - cm_write required to rename an item +content::check_access $item_id cm_write -user_id [User::getID] + +template::query item_name onevalue " + select + name + from + cr_items + where + item_id = :item_id +" + +template::query item_name onevalue " + select name from cr_items where item_id = :item_id +" + +template::release_db_handle + +set page_title "Rename $item_name" + +form create rename_item + +element create rename_item mount_point \ + -datatype keyword \ + -widget hidden \ + -value $mount_point \ + -optional + +element create rename_item item_id \ + -datatype integer \ + -widget hidden \ + -param + +element create rename_item name \ + -label "Rename $item_name to:" \ + -datatype keyword \ + -widget text \ + -html { size 20 } \ + -validate { { expr ![string match $value "/"] } \ + { Item name cannot contain slashes }} \ + -value $item_name + +# Rename +if { [form is_valid rename_item] } { + + form get_values rename_item \ + mount_point item_id name + + set db [template::begin_db_transaction] + template::query rename_item dml " + begin + content_item.rename ( + item_id => :item_id, + name => :name + ); + end;" + + template::query parent_id onevalue " + select + parent_id + from + cr_items + where + item_id = :item_id + " + + template::end_db_transaction + template::release_db_handle + + # flush cache + cms_folder::flush $mount_point $parent_id + + template::forward "index?item_id=$item_id" +} Index: openacs-4/packages/cms/www/modules/items/revision-add-1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/revision-add-1.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/revision-add-1.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,8 @@ + +Add a Revision to @name@ +

      Add a Revision to @name@

      + + + + + Index: openacs-4/packages/cms/www/modules/items/revision-add-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/revision-add-1.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/revision-add-1.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,97 @@ +# revision-add-1.tcl +# choose from (no content, file upload, text entry, xml import) +# then forward to revision-add-2 or revision-upload.acs + +request create +request set_param item_id -datatype integer + +set db [template::get_db_handle] + +# check permissions +content::check_access $item_id cm_write -user_id [User::getID] -db $db + +template::query content_type onevalue " + select + content_item.get_content_type( :item_id ) + from + dual +" -db $db + + +# flush the sitemap folder listing cache in anticipation +# of the new item +cms_folder::flush sitemap $item_id + +# check for custom create-1 form +if { [file exists [ns_url2file \ + "custom/$content_type/revision-add-1.tcl"]] } { + + template::release_db_handle + template::forward "custom/$content_type/revision-add-1?item_id=$item_id" +} + + +template::query name onevalue " + select + name + from + cr_items + where + item_id = :item_id" -db $db + +template::release_db_handle + + + + +# if we have an invalid item_id, then throw error +if { [template::util::is_nil name] } { + template::request::error bad_item_id \ + "revision-add-1.tcl - Bad item_id - $item_id" +} + + + +# get the list of associated content methods +set content_methods \ + [content_method::get_content_methods $content_type -get_labels] +set first_method [lindex [lindex $content_methods 0] 1] + +# if only one valid content method exists, redirect to revision-add-2 +if { [llength $content_methods] == 1 } { + template::forward "revision-add-2?item_id=$item_id&content_method=$first_method" +} + + +form create choose_content_method +form section choose_content_method "Choose Content Creation Method" + +element create choose_content_method item_id \ + -datatype integer \ + -widget hidden \ + -param + +element create choose_content_method content_method \ + -datatype keyword \ + -widget radio \ + -label "Method" \ + -options $content_methods \ + -values $first_method + + + + +if { [form is_valid choose_content_method] } { + + form get_values choose_content_method item_id content_method + + # XML imports should forward to revision-upload + # otherwise pass the content_method to revision-add + if { [string equal $content_method "xml_import"] } { + template::forward revision-upload?item_id=$item_id" + } + + template::forward \ + "revision-add-2?item_id=$item_id&content_method=$content_method" + +} Index: openacs-4/packages/cms/www/modules/items/revision-add-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/revision-add-2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/revision-add-2.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,38 @@ + + + @page_title@ + + + + +

      @page_title@

      + + + + + + + + + + + Index: openacs-4/packages/cms/www/modules/items/revision-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/revision-add-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/revision-add-2.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,57 @@ +# Add a revision of the item + +request create +request set_param item_id -datatype integer +request set_param content_method -datatype keyword -value no_content + + +set db [template::get_db_handle] + +# check permissions - user must have cm_write on the item +content::check_access $item_id cm_write -user_id [User::getID] + +# get content_type and name of item +template::query one_item onerow " + select + content_type, name + from + cr_items + where + item_id = :item_id +" + +template::release_db_handle + +template::util::array_to_vars one_item + +# validate item_id +if { [template::util::is_nil content_type] } { + template::request::error add_revision "Error - invalid item_id - $item_id" +} + +set page_title "Add a Revision to $name" + + +# check for custom revision-add-1 form +if { [file exists [ns_url2file \ + "custom/$content_type/revision-add-1.tcl"]] } { + template::forward "custom/$content_type/revision-add-1?item_id=$item_id&content_method=$content_method" +} + +form create add_revision -html { enctype "multipart/form-data" } + +# autogenerate the revision form +content::add_revision_form \ + -form_name add_revision \ + -content_method $content_method \ + -content_type $content_type \ + -item_id $item_id + +if { [form is_valid add_revision] } { + form get_values add_revision item_id + + # autoprocess the revision form + content::add_revision add_revision + + template::forward "index?item_id=$item_id" +} Index: openacs-4/packages/cms/www/modules/items/revision-upload.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/revision-upload.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/revision-upload.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,8 @@ + +@page_title@ + +

      @page_title@

      + + + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/revision-upload.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/revision-upload.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/revision-upload.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,130 @@ +# Form for uploading a revision in XML format. + +set page_title "Upload Revision" + +request create +request set_param item_id -datatype integer -optional +request set_param parent_id -datatype integer -optional +request set_param content_type -datatype keyword -optional + +form create upload -html { enctype multipart/form-data } -elements { + item_id -datatype integer -param -widget hidden -optional + revision_id -datatype integer -widget hidden + create_p -datatype keyword -widget hidden -value "f" + parent_id -datatype integer -param -widget hidden -optional + content_type -datatype keyword -param -widget hidden -optional +} + + +# if item_id is null, then we need to create the item +if { [template::util::is_nil item_id] } { + + # parent_id and content_type must not be null! + if { [template::util::is_nil parent_id] || \ + [template::util::is_nil content_type] } { + ns_log Notice "revision-upload.tcl: BAD CREATE ITEM PARAMETERS" + template::forward "../sitemap/index" + } + + set db [template::get_db_handle] + template::query new_item onerow " + select + NVL(content_item.get_path(:parent_id), '/') as item_path, + pretty_name as content_type_name + from + acs_object_types + where + object_type = :content_type + " + template::release_db_handle + + + if { [template::util::is_nil new_item] } { + ns_log Notice "revision-upload.tcl - ERROR: BAD PARENT_ID OR CONTENT_TYPE - $parent_id, $content_type" + template::forward "../sitemap/index" + } + + set page_title "Create a New $new_item(content_type_name)" + + element create upload item_path \ + -datatype text \ + -widget inform \ + -label "Folder" \ + -value $new_item(item_path) + + element create upload content_type_name \ + -datatype keyword \ + -widget inform \ + -label "Content Type" \ + -value $new_item(content_type_name) + + element create upload name \ + -datatype keyword \ + -widget text \ + -html { maxlength 30 } \ + -label "File Name" + + element set_properties upload create_p -value "t" +} + +element create upload xml_file \ + -datatype text \ + -widget file \ + -label "XML File" + + + + + + + +if { [form is_request upload] } { + + query revision_id onevalue "select acs_object_id_seq.nextval from dual" + element set_properties upload revision_id -value $revision_id +} + + +# Process the form +if { [form is_valid upload] } { + + form get_values upload revision_id create_p + + set db [template::begin_db_transaction] + + # create the new item first, if necessary + # otherwise read item_id from the form + if { [string equal $create_p "t"] } { + + form get_values upload name parent_id content_type + + ns_log Notice "revision-upload.tcl - Creating content item... $name" + ns_ora exec_plsql_bind $db "begin + :item_id := content_item.new( + name => :name, + parent_id => :parent_id, + content_type => :content_type, + creation_user => [User::getID], + creation_ip => '[ns_conn peeraddr]' ); + end;" item_id + } else { + form get_values upload item_id + } + + ns_log Notice "XML [ns_queryget xml_file.tmpfile]" + set tmp_filename [ns_queryget xml_file.tmpfile] + set doc [template::util::read_file $tmp_filename] + + ns_ora clob_dml $db "insert into cr_xml_docs + values ($revision_id, empty_clob()) returning doc into :1" $doc + + ns_ora exec_plsql_bind $db "begin + :revision_id := content_revision.import_xml( + :item_id, :revision_id, :revision_id); + end;" revision_id + + template::end_db_transaction + template::release_db_handle + + template::forward index?item_id=$item_id +} Index: openacs-4/packages/cms/www/modules/items/revision.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/revision.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/revision.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,112 @@ + +@page_title@ +

      @page_title@

      + + +

      Content Type: @content_type@

      + + + This revision is live.   + + Unpublish + + + + + [ + Make this revision live + ] + + +

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @revision_attr_html@ + +
      AttributeRevision TypeValue
      TitleBasic Item@one_revision.title@
      Mime TypeBasic Item@one_revision.mime_type_pretty@
      DescriptionBasic Item +   + @one_revision.description@ +
      Publish DateBasic Item +   + @one_revision.publish_date_pretty@ +
      + + + + + + + + + + + + + +
      Content +   + + + [Add] + +   + +
      + + @content@ + + + + + + + View Content + + + + + No Content +
      + + +

      + + + + + Add a revision this content item +
      +
      + + +Back to the content item +

      Index: openacs-4/packages/cms/www/modules/items/revision.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/revision.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/revision.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,243 @@ +# View a particular revision of the item. + +request create -params { + revision_id -datatype integer + mount_point -datatype keyword -value sitemap +} + +# flag indicating this is the live revision +set live_revision_p 0 + +set db [template::get_db_handle] + +query one_revision onerow " + select + revision_id, title, description, item_id, mime_type, + content_revision.get_number( revision_id ) revision_number, + ( + select + label + from + cr_mime_types + where + mime_type = cr_revisions.mime_type + ) mime_type_pretty, + to_char(publish_date,'Month DD, YYYY') as publish_date_pretty, + dbms_lob.getlength(content) as content_size + from + cr_revisions + where + revision_id = :revision_id +" + +template::util::array_to_vars one_revision + + +# Check permissions - must have cm_examine on the item +content::check_access $item_id cm_examine \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" + + +# validate revision +if { [template::util::is_nil item_id] } { + template::release_db_handle + template::request::error invalid_revision \ + "revision - Invalid revision - $revision_id" + return +} + + +# check if the item is publishable (but does not need live revision) +template::query is_publishable onevalue " + select content_item.is_publishable( :item_id ) from dual +" + + +# get total number of revision for this item +template::query revision_count onevalue " + select count(*) from cr_revisions where item_id = :item_id +" + +set valid_revision_p "t" + +# flag indicating whether the MIME type of the content is text +set is_text_mime_type f +set is_image_mime_type f +if { [regexp {text/} $mime_type] } { + set is_text_mime_type t + template::query content onevalue " + select + blob_to_string(content) + from + cr_revisions + where + revision_id = :revision_id + " + + ns_log notice $content + + # HACK: special chars in the text confuse TCL + if { [regexp {<|>|\[|\]|\{|\}|\$} $content match] } { + set is_text_mime_type f + } + +} elseif { [regexp {image/} $mime_type] } { + set is_image_mime_type t +} + + +# get item info +query one_content_item onerow " + select + name, locale, live_revision as live_revision_id, + ( + select + pretty_name + from + acs_object_types + where + object_type = cr_items.content_type + ) content_type, + content_item.get_path(item_id) as path + from + cr_items + where + item_id = :item_id +" + +template::util::array_to_vars one_content_item + +if { $live_revision_id == $revision_id } { + set live_revision_p 1 +} + +################################################################ +################################################################ + + +# get the attribute types for a given revision item +# if attr.table_name is null, then use o.table_name +# if column_name is null, then use the attribute_name +# if id_column is null, then use 'attribute_id' and 'acs_attribute_values' + +template::query meta_attributes multilist " + select + attribute_id, pretty_name, + (select pretty_name from acs_object_types + where object_type = attr.object_type) object_type, + nvl(column_name,attribute_name) attribute_name, + nvl(attr.table_name,o.table_name) table_name, + nvl(o.id_column,'object_id') id_column + from + acs_attributes attr, + (select + object_type, table_name, id_column + from + acs_object_types + where + object_type not in ('acs_object','content_revision') + connect by + prior supertype = object_type + start with + object_type = (select + object_type + from + acs_objects + where + object_id = :revision_id) ) o + where + o.object_type = attr.object_type + order by + attr.object_type, attr.sort_order +" + +set attr_columns [list] +set attr_tables [list] +set column_id_cons [list] +set attr_display [list] + +foreach meta $meta_attributes { + set attribute_id [lindex $meta 0] + set pretty_name [lindex $meta 1] + set object_type [lindex $meta 2] + set attribute_name [lindex $meta 3] + set table_name [lindex $meta 4] + set id_column [lindex $meta 5] + + lappend attr_display [list $pretty_name $object_type] + + # add the column constraint and table to the query only if it + # isn't there already + if { [lsearch -exact $attr_tables $table_name] == -1 } { + lappend attr_tables $table_name + lappend column_id_cons "$table_name.$id_column = :revision_id" + } + + # the attribute value columns we want to fetch are either in + # acs_attribute_values (object_id,attribute_id) + # or in $table_name ($id_column) + if { ![string equal $attribute_name ""] && \ + ![string equal $table_name ""] } { + lappend attr_columns "$table_name.$attribute_name" + } else { + lappend attr_columns "acs_attribute_values.attr_value" + + if { [lsearch -exact $attr_tables "acs_attribute_values"] == -1 } { + lappend attr_tables "acs_attribute_values" + lappend column_id_cons \ + "acs_attribute_values.attribute_id = $attribute_id + and acs_attribute_values.object_id = :revision_id" + } + } +} + +if { ![string equal $attr_columns ""] } { + + set sql " + select + [join $attr_columns ", "] + from + [join $attr_tables ", "] + where + [join $column_id_cons " and "]" + + #ns_log Notice "Mike's Dynamic SQL = $sql" + template::query attribute_values multilist $sql + + + # write the body of the attribute display table to $revision_attr_html + set revision_attr_html "" + set i 0 + set attribute_count [llength $attribute_values] + foreach attr_value [lindex $attribute_values 0] { + set pretty_name [lindex [lindex $attr_display $i] 0] + set object_type [lindex [lindex $attr_display $i] 1] + + if { [expr [expr $i+1] % 2] == 0 } { + set bgcolor "#EEEEEE" + } else { + set bgcolor "#ffffff" + } + if { [string equal $attr_value ""] } { + set attr_value " " + } + + append revision_attr_html " + + $pretty_name + $object_type + $attr_value + + " + incr i + } +} else { + set revision_attr_html "" +} + +template::release_db_handle + +set page_title \ + "$title : Revision $revision_number of $revision_count for $name" + Index: openacs-4/packages/cms/www/modules/items/revisions.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/revisions.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/revisions.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,87 @@ + + + + + + + + + +
      Revisions + + Add revised content via + + +   +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      No revisions.#   Title   Description     
      + + @revisions.revision_number@ + +    @revisions.title@-    + @revisions.description@ + - +     + + + + Make this revision live +   + + +   + + + + Live Revision + + + + + Unpublish + Unset live revision + + +   + +
      + +
      + +@pagination_html@ + Index: openacs-4/packages/cms/www/modules/items/revisions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/revisions.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/revisions.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,63 @@ +# Display a list of revisions for the item + +# page variables +template::request create -params { + item_id -datatype integer + mount_point -datatype keyword -optional -value sitemap +} + +# pagination vars +template::request set_param page -datatype integer -value 1 + +set db [template::get_db_handle] + +# Check permissions +content::check_access $item_id cm_examine \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" \ + -request_error + +# add content html +template::query content_type onevalue " + select + content_item.get_content_type( :item_id ) + from + dual +" + + +# get item info +set query " + select + item_id, name, locale, live_revision, publish_status, + content_item.is_publishable(item_id) as is_publishable + from + cr_items + where + item_id = :item_id" + +template::query iteminfo onerow $query -db $db +template::util::array_to_vars iteminfo + + +# get all revisions +set sql " + select + revision_id, + trim(title) as title, + trim(description) as description, + content_revision.get_number(revision_id) as revision_number + from + cr_revisions r + where + r.item_id = :item_id + order by + revision_number desc" + +template::query revisions multirow [pagination::paginate_query $sql $page] + +set total_pages [pagination::get_total_pages $db] + +template::release_db_handle + +set pagination_html [pagination::page_number_links $page $total_pages] Index: openacs-4/packages/cms/www/modules/items/status-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/status-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/status-edit.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +Content Item + +

      Edit Publishing Status

      + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/status-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/status-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/status-edit.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,143 @@ +# Build an appropriate form to edit the publishing status for an item. +request create +request set_param item_id -datatype integer +request set_param mount_point -datatype keyword -value sitemap +request set_param parent_id -datatype integer -optional + +## Create the form + +form create publish_status + +element create publish_status item_id \ + -datatype integer -widget hidden -value $item_id + +element create publish_status is_live \ + -datatype keyword -widget hidden -optional -value "f" + +if { [form is_request publish_status] } { + + # Determine whether the item has a live revision + template::query live_revision onevalue " + select live_revision from cr_items where item_id = :item_id + " + + if { [template::util::is_nil live_revision] } { + element set_value publish_status is_live f + } else { + element set_value publish_status is_live t + } +} + + + + + +# generate status options + +# always show production +set options [list [list "Production" production]] + +query is_publishable onevalue " + select content_item.is_publishable( :item_id ) from dual" + +set is_live [element get_value publish_status is_live] + +# show "Ready" and "Live" if a live revision exists and the item is +# publishable +if { [string equal $is_live t] && [string equal $is_publishable t] } { + lappend options [list "Ready" ready] [list "Live (publishes the item)" live] +} + +query is_published onevalue " + select content_item.is_published( :item_id ) from dual" + +# show "Expired" only if the item is currently published +if { [string equal $is_published t] } { + lappend options [list Expired expired] +} + + + + + + + + + + +element create publish_status publish_status \ + -datatype keyword -widget radio -label Status \ + -options $options + +if { [llength $options] == 1 } { + element set_properties publish_status publish_status -widget hidden + + element create publish_status publish_status_inform \ + -datatype text \ + -widget inform \ + -value "Production" \ + -label "Status" +} + +element create publish_status start_when \ + -datatype date -widget date -minutes_interval { 0 59 1 } \ + -format {MONTH DD, YYYY HH24:MI} -optional -help -label {Start Date} + +element create publish_status end_when \ + -datatype date -widget date -minutes_interval { 0 59 1 } \ + -format {MONTH DD, YYYY HH24:MI} -optional -help -label {End Date} + +# Populate the form +if { [form is_request publish_status] } { + + # Get the current status + set query " + select + NVL(publish_status, 'production') as publish_status, + to_char(NVL(start_when, sysdate), 'YYYY MM DD HH24 MI SS') start_when, + to_char(NVL(end_when, sysdate + 365), 'YYYY MM DD HH24 MI SS') end_when + from + cr_items i, cr_release_periods r + where + i.item_id = :item_id + and + i.item_id = r.item_id (+)" + + template::query info onerow $query + + form set_values publish_status info +} + +# Process the form + +if { [form is_valid publish_status] } { + + form get_values publish_status publish_status start_when end_when item_id + + set db [template::begin_db_transaction] + + publish::set_publish_status $db $item_id $publish_status + + set start_when [template::util::date get_property sql_date $start_when] + set end_when [template::util::date get_property sql_date $end_when] + + ns_ora dml $db "begin + content_item.set_release_period( + item_id => :item_id, + start_when => $start_when, + end_when => $end_when + ); + end;" + + template::end_db_transaction + + template::forward index?item_id=$item_id +} + +# If the item is in a production state, we may simply be marking +# the item as ready or deploying it. + +# If the item is ready, we may want to move it back to production, +# schedule it for publishing, or publish it immediately. + +# If the item is live, we way want to expire it, move it back to or edit the Index: openacs-4/packages/cms/www/modules/items/symlink.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/symlink.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/symlink.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,18 @@ + # if the item is or is linked to a content_folder, then + # use the sitemap module to browse the folder + set sql "select parent_id, + content_folder.is_folder(item_id) as folder_p + from cr_items + where item_id = :resolved_id" + + query folder_check onerow $sql + + if { [info exists folder_check] } { + set folder_p $folder_check(folder_p) + set parent_id $folder_check(context_id) + + if { [string equal $folder_p "t"] } { + template::forward "../sitemap/index?id=$resolved_id&parent_id=$parent_id" + } + } + } Index: openacs-4/packages/cms/www/modules/items/template-register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/template-register.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/template-register.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,33 @@ +# Add a template of the item + +request create +request set_param item_id -datatype integer +request set_param template_id -datatype integer +request set_param context -datatype keyword + + +set sql "begin content_item.register_template( + item_id => :item_id, + template_id => :template_id, + use_context => :context ); + end;" + +set db [template::begin_db_transaction] + +# check to make sure that no template is already registered +# to this item in this context +template::query second_template_p onevalue " + select count(1) from cr_item_template_map + where use_context = :context + and item_id = :item_id" + +if { $second_template_p == 0 } { + if { [catch { template::query template_register dml $sql } err_msg] } { + ns_log notice "template-register.tcl got an error: $err_msg" + } +} + +template::end_db_transaction +template::release_db_handle + +forward "../items/index?item_id=$item_id&#templates" Index: openacs-4/packages/cms/www/modules/items/template-unregister.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/template-unregister.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/template-unregister.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,24 @@ +# Add a template of the item + +request create +request set_param item_id -datatype integer +request set_param template_id -datatype integer +request set_param context -datatype text + + +set sql "begin + content_item.unregister_template( + template_id => :template_id, + item_id => :item_id, + use_context => :context ); + end;" + + +set db [template::begin_db_transaction] +if { [catch { template::query template_unregiser dml $sql } err_msg] } { + ns_log notice "template-remove.tcl got an error: $err_msg" +} +template::end_db_transaction +template::release_db_handle + +template::forward "../items/index?item_id=$item_id&#templates" Index: openacs-4/packages/cms/www/modules/items/templates.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/templates.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/templates.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,116 @@ + + + + + + + + + + + + +
      Registered Templates 
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + Templates Registered to @iteminfo.name@ +
      + No templates registered to this content item. + Name   Context     
      @registered_templates.path@   @registered_templates.use_context@       + + + Unregister + +   +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + Templates Registered to @iteminfo.pretty_name@ +
      + No templates registered to this content type. + Name   Context     
      @type_templates.path@   @type_templates.use_context@    + Default + + + + Make default + +   + + + Registered + + + + Register template to this item + +   + +
      + + +
      \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/templates.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/templates.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/templates.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,82 @@ +# /modules/items/templates.tcl +# Display information about templates associated with the item. + +request create +request set_param item_id -datatype integer +request set_param mount_point -datatype keyword -optional -value sitemap + +set db [template::get_db_handle] + +set user_id [User::getID] + +# Check permissions +content::check_access $item_id cm_examine \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" \ + -request_error + +# check if the user has write permission on the types module +template::query can_set_default_template onevalue " + select + cms_permission.permission_p( module_id, :user_id, 'cm_write' ) + from + cm_modules + where + key = 'types' +" + +template::query iteminfo onerow " + select + object_type, pretty_name, + content_item.get_title(:item_id) name + from + acs_object_types + where + object_type = content_item.get_content_type(:item_id) +" + +set content_type $iteminfo(object_type) + + +# templates registered to this item +template::query registered_templates multirow " + select + template_id, use_context, + content_item.get_path( template_id ) path, + cms_permission.permission_p( template_id, :user_id, 'cm_examine') + as can_read_template + from + cr_item_template_map t + where + t.item_id = :item_id + order by + path, use_context +" + +# templates registered to this content type +template::query type_templates multirow " + select + template_id, use_context, is_default, + content_item.get_path( template_id ) path, + cms_permission.permission_p( template_id, :user_id, 'cm_examine') + as can_read_template, + (select 1 + from + cr_item_template_map itmap + where + itmap.template_id = t.template_id + and + itmap.use_context = t.use_context + and + itmap.item_id = :item_id) already_registered_p + from + cr_type_template_map t + where + t.content_type = :content_type + order by + path, use_context +" + +template::release_db_handle + +set return_url "index?item_id=$item_id&mount_point=sitemap" Index: openacs-4/packages/cms/www/modules/items/unpublish.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/unpublish.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/unpublish.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,18 @@ +# unpublish.tcl +# Publish a revision to the file system. + +request create +request set_param item_id -datatype integer + +set sql "begin + content_item.unset_live_revision( :item_id ); + end;" + +publish::unpublish_item $item_id + +set db [template::begin_db_transaction] +template::query unset_live_revision dml $sql +template::end_db_transaction +template::release_db_handle + +template::forward "index?item_id=$item_id" \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/unrelate-item.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/unrelate-item.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/unrelate-item.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,40 @@ +# Delete a relationship + +request create +request set_param rel_id -datatype integer +request set_param mount_point -datatype keyword -value "sitemap" +request set_param return_url -datatype text -value "index" +request set_param passthrough -datatype text -value [content::assemble_passthrough mount_point] + +set db [template::begin_db_transaction] + +# Get the item_id; determine if the relationship exists +template::query item_id onevalue " + select item_id from cr_item_rels where rel_id = :rel_id" + +if { [template::util::is_nil item_id] } { + ns_db dml $db "abort transaction" + template::release_db_handle + request::error no_such_rel "The relationship $rel_id does not exist." + return +} + +# Check permissions +content::check_access $item_id cm_relate \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" \ + -db $db + +lappend passthrough [list item_id $item_id] + +template::query unrelate_item dml " + begin + content_item.unrelate ( + rel_id => :rel_id + ); + end;" + +template::end_db_transaction +template::release_db_handle + +template::forward "$return_url?[content::url_passthrough $passthrough]" Index: openacs-4/packages/cms/www/modules/items/custom/cr_demo_article_image/create-1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/custom/cr_demo_article_image/create-1.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/custom/cr_demo_article_image/create-1.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +Create a new Captioned Image + +

      Create a new Captioned Image

      + Index: openacs-4/packages/cms/www/modules/items/custom/cr_demo_article_image/create-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/custom/cr_demo_article_image/create-1.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/custom/cr_demo_article_image/create-1.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,83 @@ +# create-1.tcl +# choose from no content, or file upload +# then forward to create-2 or revision-upload + +request create +request set_param content_type -datatype keyword -value "content_revision" +request set_param mount_point -datatype keyword -value "sitemap" +request set_param parent_id -datatype integer -optional + +# Manually set the value since the templating system is still broken in +# the -value flag +if { [template::util::is_nil parent_id] } { + set parent_id [cm::modules::${mount_point}::getRootFolderID] +} + + +set db [ns_db gethandle] + +# permissions check - need cm_new on the parent item +content::check_access $parent_id cm_new -user_id [User::getID] -db $db +ns_db releasehandle $db + + + + + +set db [ns_db gethandle] + +template::query content_type_name onevalue " + select + pretty_name + from + acs_object_types + where + object_type = :content_type +" -db $db + +ns_db releasehandle $db + +if { [template::util::is_nil content_type_name] } { + ns_log Notice "ERROR: create-1.tcl - BAD CONTENT_TYPE - $content_type" + template::forward "../sitemap/index" +} + + +set page_title "Create a New $content_type_name" + +form create choose_captioned_image_content_method +form section choose_captioned_image_content_method "Choose Content Creation Method" + +element create choose_captioned_image_content_method parent_id \ + -datatype integer \ + -widget hidden \ + -optional + +# ATS doesn't like "-value -100" +set value [element get_value choose_captioned_image_content_method parent_id] +if { [template::util::is_nil value] } { + upvar 0 "choose_captioned_image_content_method:parent_id" element + set element(value) $parent_id +} + +element create choose_captioned_image_content_method content_type \ + -datatype keyword \ + -widget hidden \ + -value $content_type + +element create choose_captioned_image_content_method content_method \ + -datatype keyword \ + -widget radio \ + -label "Method" \ + -options { {{No Content} no_content} {{File Upload} file_upload} } \ + -values [list "no_content"] + +if { [form is_valid choose_captioned_image_content_method] } { + + form get_values choose_captioned_image_content_method \ + content_type parent_id content_method + + template::forward \ + "create-2?content_type=$content_type&parent_id=$parent_id&content_method=$content_method" + +} Index: openacs-4/packages/cms/www/modules/items/custom/cr_demo_article_image/create-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/custom/cr_demo_article_image/create-2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/custom/cr_demo_article_image/create-2.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +Create a new Captioned Image + +

      Create a new Captioned Image

      + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/custom/cr_demo_article_image/create-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/custom/cr_demo_article_image/create-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/custom/cr_demo_article_image/create-2.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,214 @@ +# custom creation form for content_type = cr_demo_article_image + + + +request create +request set_param parent_id -datatype integer +request set_param content_type -datatype keyword +request set_param content_method -datatype keyword + + +set db [ns_db gethandle] + +# permissions check - need cm_new on parent_id to create new captioned image +content::check_access $parent_id cm_new -user_id [User::getID] -db $db + + + +form create captioned_image -html { enctype "multipart/form-data" } -elements { + parent_id -datatype integer -widget hidden -param + content_type -datatype keyword -widget hidden -param + content_method -datatype keyword -widget hidden -param + item_id -datatype integer -widget hidden + name -datatype keyword -widget hidden +} + +ns_db releasehandle $db + +content::add_attribute_element captioned_image content_revision title +content::add_attribute_element captioned_image content_revision description + +content::add_attribute_element captioned_image image width +element set_properties captioned_image width -help_text "(optional)" + +content::add_attribute_element captioned_image image height +element set_properties captioned_image height -help_text "(optional)" + +# regardless of method, we are going to have a caption for this item +content::add_attribute_element captioned_image cr_demo_article_image caption + + + +if { [string equal $content_method "file_upload"] } { + # if the method is file upload, provide a form element to specify the file + element create captioned_image upload \ + -datatype text \ + -widget file \ + -label "Upload Image" + + # also keep the caption form element visible and) add some help text + element set_properties captioned_image caption -help_text "(optional)" +} else { + # if "No content" then provide a default value for the caption + element set_properties captioned_image caption \ + -widget hidden \ + -value "Enter caption here" +} + + + + +if { [form is_request captioned_image] } { + set item_id [content::get_object_id] + element set_value captioned_image item_id $item_id + element set_value captioned_image name "image_$item_id" +} + + + + +if { [form is_valid captioned_image] } { + form get_values captioned_image \ + parent_id content_type item_id name title description caption + + # default + set mime_type "" + + if { [string equal $content_method "file_upload"] } { + + form get_values captioned_image upload + set tmp_filename [ns_queryget upload.tmpfile] + + # MIME type validation + set mime_type [ns_guesstype $upload] + + if { ![regexp {image/(.*)} $mime_type match image_type] } { + template::request::error invalid_image_mime_type \ + "The specified MIME is not valid for an image - $mime_type." + return + } + + # image width and height validation + set size_command "ns_${image_type}size" + if { [catch {set image_size [$size_command $tmp_filename] } errmsg] } { + template::request::error invalid_image_size \ + "The file is not a valid image file - $tmp_filename" + return + } + } + + # use user input width and height + if { [element exists captioned_image width] } { + set width [element get_value captioned_image width] + } + if { [element exists captioned_image height] } { + set height [element get_value captioned_image height] + } + + if { [string equal $content_method "file_upload"] } { + # otherwise use detected width and height + if { [template::util::is_nil width] } { + set width [lindex $image_size 0] + } + if { [template::util::is_nil height] } { + set height [lindex $image_size 1] + } + } + + # some auditing info + set user_id [User::getID] + set ip_address [ns_conn peeraddr] + + + + set db [ns_db gethandle] + ns_ora dml $db "begin transaction" + + # create a new cr_demo_article_image item + set sql " + begin + :item_id := content_item.new( + name => :name, + item_id => :item_id, + parent_id => :parent_id, + content_type => :content_type, + creation_user => :user_id, + creation_ip => :ip_address + ); + end;" + + if { [catch {ns_ora exec_plsql_bind $db $sql item_id} errmsg] } { + ns_log notice "custom/cr_demo_article_image/create-1.tcl caught error + - $errmsg" + + # check for double click + query clicks onevalue " + select + count(1) + from + cr_items + where + item_id = :item_id + " -db $db + + ns_ora dml $db "abort transaction" + ns_db releasehandle $db + + if { $clicks > 0 } { + # double click error - do nothing, forward to view the item + template::forward \ + "../../index?item_id=$item_id" + } else { + template::request::error new_item_error \ + "custom/cr_demo_article_image/create-1.tcl - + while creating new $content_type item - $errmsg" + return + } + } + + # create the revision + ns_ora exec_plsql_bind $db " + begin + :revision_id := content_revision.new ( + item_id => :item_id, + title => :title, + description => :description, + mime_type => :mime_type, + creation_user => :user_id, + creation_ip => :ip_address + ); + end; + " revision_id + + # insert the extended attributes + ns_ora dml $db " + insert into images ( + image_id, width, height + ) values ( + :revision_id, :width, :height + )" + + ns_ora dml $db " + insert into cr_demo_article_images ( + article_image_id, caption + ) values ( + :revision_id, :caption + )" + + if { [string equal $content_method "file_upload"] } { + # upload the image + ns_ora blob_dml_file $db " + update cr_revisions + set content = empty_blob() + where revision_id = $revision_id + returning content into :1" $tmp_filename + } + + ns_ora dml $db "end transaction" + ns_db releasehandle $db + + # flush the paginator cache + cms_folder::flush sitemap $parent_id + + template::forward "../../index?item_id=$item_id" +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/custom/image/attributes-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/custom/image/attributes-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/custom/image/attributes-edit.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,9 @@ + +Edit Attributes for @name@ - @title@ + +

      Edit Attributes for @name@ - @title@

      + + + + + Index: openacs-4/packages/cms/www/modules/items/custom/image/attributes-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/custom/image/attributes-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/custom/image/attributes-edit.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,128 @@ +# attributes-edit.tcl +# custom form for content_type = image + +request create +request set_param item_id -datatype integer + +set db [ns_db gethandle] + +# permissions check - need cm_write on item_id to add a revision +content::check_access $item_id cm_write -user_id [User::getID] -db $db + +form create image -html { enctype "multipart/form-data" } -elements { + item_id -datatype integer -widget hidden -param + revision_id -datatype integer -widget hidden +} + +query item_info onerow " + select + i.name, i.latest_revision, r.title + from + cr_items i, cr_revisions r + where + i.item_id = :item_id + and + i.item_id = r.item_id + and + i.latest_revision = r.revision_id +" -db $db + +template::util::array_to_vars item_info + +ns_db releasehandle $db + + +content::add_attribute_elements image image $latest_revision + +element set_properties image mime_type -widget hidden +element set_properties image width -help_text "(optional)" +element set_properties image height -help_text "(optional)" + +if { [form is_request image] } { + + set revision_id [content::get_object_id] + element set_value image revision_id $revision_id + +} + + +if { [form is_valid image] } { + + form get_values image item_id revision_id title description width height + + # some auditing info + set user_id [User::getID] + set ip_address [ns_conn peeraddr] + + set db [ns_db gethandle] + ns_ora dml $db "begin transaction" + + query latest_revision onevalue " + select + latest_revision + from + cr_items + where + item_id = :item_id + " -db $db + + set sql " + begin + :revision_id := content_revision.copy( + target_item_id => :item_id, + copy_id => :revision_id, + revision_id => :latest_revision, + creation_user => :user_id, + creation_ip => :ip_address + ); + end;" + + # create the revision + if { [catch {ns_ora exec_plsql_bind $db $sql revision_id} errmsg] } { + + # check for dupe submit + query clicks onevalue " + select + count(1) + from + cr_revisions + where + revision_id = :revision_id + " -db $db + + ns_ora dml $db "abort transaction" + ns_db releasehandle $db + + if { $clicks > 0 } { + # double click error - forward to view the item + template::forward \ + "../../index?item_id=$item_id" + return + } else { + template::request::error new_revision_error \ + "custom/image/attributes-edit.tcl - + while creation new revision for item $item_id - $errmsg" + return + } + } + + # update the new title and description + ns_ora dml $db " + update cr_revisions + set title = :title, + description = :description + where revision_id = :revision_id" + + + # update image dimensions + ns_ora dml $db " + update images + set width = :width, + height = :height + where image_id = :revision_id" + + ns_ora dml $db "end transaction" + ns_db releasehandle $db + + template::forward "../../index?item_id=$item_id" +} Index: openacs-4/packages/cms/www/modules/items/custom/image/content-add-1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/custom/image/content-add-1.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/custom/image/content-add-1.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +Upload an Image + +

      Upload an Image

      + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/custom/image/content-add-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/custom/image/content-add-1.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/custom/image/content-add-1.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,86 @@ +# custom creation form for content_type = image + +request create +request set_param revision_id -datatype integer + + +set db [ns_db gethandle] + +query item_id onevalue " + select + item_id + from + cr_revisions + where + revision_id = :revision_id +" -db $db + +# permissions check - need cm_new on parent_id to create new image +content::check_access $item_id cm_write -user_id [User::getID] -db $db + + + +form create image -html { enctype "multipart/form-data" } -elements { + revision_id -datatype integer -widget hidden -param + item_id -datatype integer -widget hidden +} + +element set_value image item_id $item_id + +element create image upload \ + -datatype text \ + -widget file \ + -label "Upload Image" + +ns_db releasehandle $db + + + +if { [form is_valid image] } { + form get_values image \ + revision_id item_id upload + set tmp_filename [ns_queryget upload.tmpfile] + + # MIME type validation + set mime_type [ns_guesstype $upload] + + if { ![regexp {image/(.*)} $mime_type match image_type] } { + template::request::error invalid_image_mime_type \ + "The specified MIME is not valid for an image - $mime_type." + return + } + + # image width and height validation + set size_command "ns_${image_type}size" + if { [catch {set image_size [$size_command $tmp_filename] } errmsg] } { + template::request::error invalid_image_size \ + "The file is not a valid image file - $tmp_filename" + return + } + set width [lindex $image_size 0] + set height [lindex $image_size 1] + + + set db [ns_db gethandle] + ns_ora dml $db "begin transaction" + + # insert the extended attributes + ns_ora dml $db " + update images + set width = :width, + height = :height + where image_id = :revision_id" + + # upload the image + ns_ora blob_dml_file $db " + update cr_revisions + set content = empty_blob() + where revision_id = $revision_id + returning content into :1" $tmp_filename + + ns_ora dml $db "end transaction" + ns_db releasehandle $db + + + template::forward "../../index?item_id=$item_id" +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/custom/image/create-1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/custom/image/create-1.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/custom/image/create-1.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +Create a new Image + +

      Create a new Image

      + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/custom/image/create-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/custom/image/create-1.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/custom/image/create-1.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,186 @@ +# custom creation form for content_type = image + +request create +request set_param parent_id -datatype integer +request set_param content_type -datatype keyword + + +set db [ns_db gethandle] + +# permissions check - need cm_new on parent_id to create new image +content::check_access $parent_id cm_new -user_id [User::getID] -db $db + + + +form create image -html { enctype "multipart/form-data" } -elements { + parent_id -datatype integer -widget hidden -param + content_type -datatype keyword -widget hidden -param + item_id -datatype integer -widget hidden + name -datatype keyword -widget hidden +} + +ns_db releasehandle $db + +content::add_attribute_element image content_revision title +content::add_attribute_element image content_revision description + +content::add_attribute_element image image width +element set_properties image width -help_text "(optional)" + +content::add_attribute_element image image height +element set_properties image height -help_text "(optional)" + +element create image upload \ + -datatype text \ + -widget file \ + -label "Upload Image" + +# Add the relation tag element +content::add_child_relation_element image -section + +if { [form is_request image] } { + + set item_id [content::get_object_id] + + element set_value image item_id $item_id + element set_value image name "image_$item_id" +} + + + + +if { [form is_valid image] } { + form get_values image \ + parent_id content_type item_id name title description upload + + if { [element exists image relation_tag] } { + set relation_tag [element get_value image relation_tag] + } else { + set relation_tag "" + } + + set tmp_filename [ns_queryget upload.tmpfile] + + # MIME type validation + set mime_type [ns_guesstype $upload] + + if { ![regexp {image/(.*)} $mime_type match image_type] } { + template::request::error invalid_image_mime_type \ + "The specified MIME is not valid for an image - $mime_type." + return + } + + + # image width and height validation + set size_command "ns_${image_type}size" + if { [catch {set image_size [$size_command $tmp_filename] } errmsg] } { + template::request::error invalid_image_size \ + "The file is not a valid image file - $tmp_filename" + return + } + + # use user input width and height + if { [element exists image width] } { + set width [element get_value image width] + } + if { [element exists image height] } { + set height [element get_value image height] + } + + # otherwise use detected width and height + if { [template::util::is_nil width] } { + set width [lindex $image_size 0] + } + if { [template::util::is_nil height] } { + set height [lindex $image_size 1] + } + + # some auditing info + set user_id [User::getID] + set ip_address [ns_conn peeraddr] + + + + + set db [ns_db gethandle] + ns_ora dml $db "begin transaction" + + # create a new image item + set sql " + begin + :item_id := content_item.new( + name => :name, + item_id => :item_id, + parent_id => :parent_id, + content_type => :content_type, + creation_user => :user_id, + creation_ip => :ip_address, + relation_tag => :relation_tag + ); + end;" + + if { [catch {ns_ora exec_plsql_bind $db $sql item_id} errmsg] } { + ns_log notice "custom/image/create-1.tcl caught error - $errmsg" + + # check for double click + query clicks onevalue " + select + count(1) + from + cr_items + where + item_id = :item_id + " -db $db + + ns_ora dml $db "abort transaction" + ns_db releasehandle $db + + if { $clicks > 0 } { + # double click error - do nothing, forward to view the item + template::forward \ + "../../index?item_id=$item_id" + } else { + template::request::error new_item_error \ + "custom/image/create-1.tcl - + while creating new $content_type item - $errmsg" + return + } + } + + # create the revision + ns_ora exec_plsql_bind $db " + begin + :revision_id := content_revision.new ( + item_id => :item_id, + title => :title, + description => :description, + mime_type => :mime_type, + creation_user => :user_id, + creation_ip => :ip_address + ); + end; + " revision_id + + # insert the extended attributes + ns_ora dml $db " + insert into images ( + image_id, width, height + ) values ( + :revision_id, :width, :height + )" + + # upload the image + ns_ora blob_dml_file $db " + update cr_revisions + set content = empty_blob() + where revision_id = $revision_id + returning content into :1" $tmp_filename + + ns_ora dml $db "end transaction" + ns_db releasehandle $db + + # flush the paginator cache + cms_folder::flush sitemap $parent_id + + template::forward "../../index?item_id=$item_id" +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/items/custom/image/revision-add-1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/custom/image/revision-add-1.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/custom/image/revision-add-1.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,9 @@ + +Add a Revision to @name@ - @title@ + +

      Add a Revision to @name@ - @title@

      + + + + + Index: openacs-4/packages/cms/www/modules/items/custom/image/revision-add-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/custom/image/revision-add-1.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/custom/image/revision-add-1.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,145 @@ +# revision-add-1.tcl +# custom form for content_type = image + +request create +request set_param item_id -datatype integer + +set db [ns_db gethandle] + +# permissions check - need cm_write on item_id to add a revision +content::check_access $item_id cm_write -user_id [User::getID] -db $db + + + + +form create image -html { enctype "multipart/form-data" } -elements { + item_id -datatype integer -widget hidden -param +} + +query item_info onerow " + select + i.name, i.latest_revision, r.title + from + cr_items i, cr_revisions r + where + i.item_id = :item_id + and + i.item_id = r.item_id + and + i.latest_revision = r.revision_id +" -db $db + +template::util::array_to_vars item_info + +ns_db releasehandle $db + + +content::add_attribute_elements image image $latest_revision + +element set_properties image mime_type -widget hidden +element set_properties image width -help_text "(optional)" +element set_properties image height -help_text "(optional)" + + +element create image upload \ + -datatype text \ + -widget file \ + -label "Upload Image" + + +if { [form is_request image] } { + + set db [template::get_db_handle] + ns_db releasehandle $db +} + + + + + + +if { [form is_valid image] } { + + form get_values image item_id title description upload + set tmp_filename [ns_queryget upload.tmpfile] + + + # MIME type validation + set mime_type [ns_guesstype $upload] + + if { ![regexp {image/(.*)} $mime_type match image_type] } { + template::request::error invalid_image_mime_type \ + "The specified MIME is not valid for an image - $mime_type." + return + } + + + # image width and height validation + set size_command "ns_${image_type}size" + if { [catch {set image_size [$size_command $tmp_filename] } errmsg] } { + template::request::error invalid_image_size \ + "The file is not a valid image file - $tmp_filename" + return + } + + # if the width or height exist in the form, use it + if { [element exists image width] } { + set width [element get_value image width] + } + if { [element exists image height] } { + set height [element get_value image height] + } + + # otherwise use the auto generated image dimensions + if { [template::util::is_nil width] } { + set width [lindex $image_size 0] + } + if { [template::util::is_nil height] } { + set height [lindex $image_size 1] + } + + # some auditing info + set user_id [User::getID] + set ip_address [ns_conn peeraddr] + + set db [ns_db gethandle] + ns_ora dml $db "begin transaction" + + # create the revision + ns_ora exec_plsql_bind $db " + begin + :revision_id := content_revision.new ( + item_id => :item_id, + title => :title, + description => :description, + mime_type => :mime_type, + creation_user => :user_id, + creation_ip => :ip_address + ); + end; + " revision_id + + # insert the extended attributes + ns_ora dml $db " + insert into images ( + image_id, width, height + ) values ( + :revision_id, :width, :height + )" + + # upload the image + ns_ora blob_dml_file $db " + update cr_revisions + set content = empty_blob() + where revision_id = $revision_id + returning content into :1" $tmp_filename + + + + + ns_ora dml $db "end transaction" + ns_db releasehandle $db + + template::forward "../../index?item_id=$item_id" + +} Index: openacs-4/packages/cms/www/modules/permissions/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/permissions/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/permissions/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      No permissions.User   Email   Privilege(s) 
      + + @permissions.grantee_name@ + + + + @permissions.grantee_name@ + +    @permissions.email@    + + , + + @permissions.pretty_name@ + + + @permissions.privilege@ + + + + + + + +   +
      + + + + +

      + Index: openacs-4/packages/cms/www/modules/permissions/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/permissions/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/permissions/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,77 @@ +request create +request set_param object_id -datatype integer +request set_param mount_point -datatype keyword -optional -value sitemap +request set_param parent_id -datatype keyword -optional +request set_param return_url -datatype text -optional +request set_param passthrough -datatype text -optional + +#set passthrough "id=$object_id&mount_point=$mount_point&parent_id=$parent_id" + +set user_id [User::getID] + +set db [template::get_db_handle] + +# Determine if the user can modify permissions on this object +# Should it dump a user to an error page if no access ? +#content::check_access $id "cm_perm" -db $db -user_id $user_id \ +# -parent_id $parent_id -mount_point $mount_point + +# Determine if the user is the site wide admin, and if he has the rights to \ +# modify permissions at all +content::check_access $object_id "cm_examine" \ + -user_id $user_id -mount_point $mount_point -parent_id $parent_id + +if { ![string equal $user_permissions(cm_perm) t] } { + template::release_db_handle + return +} + +# Get a list of permissions that users have on the item +template::query permissions multirow " + select * from ( + select + p.pretty_name, + p.privilege, + u.party_id as grantee_id, + n.first_names || ' ' || n.last_name as grantee_name, + u.email + from + acs_permissions per, acs_privileges p, parties u, + persons n, + (select object_id from acs_objects + connect by prior context_id = object_id + and prior security_inherit_p = 't' + start with object_id = :object_id) o + where + per.privilege = p.privilege + and + per.grantee_id = u.party_id + and + per.object_id = o.object_id + and + u.party_id = n.person_id + union + select + p.pretty_name, p.privilege, + -1 as grantee_id, 'All Users' as grantee_name, ' ' as email + from + acs_permissions per, acs_privileges p, parties u + where + u.party_id = -1 + and + per.object_id = :object_id + and + per.privilege = p.privilege + and + per.grantee_id = u.party_id + ) order by + grantee_name, privilege + " + +template::release_db_handle + +# Create a URL passthrough stub to access permissions +set perms_url_extra "return_url=$return_url&passthrough=$passthrough&object_id=$object_id" + + +set header "\[ Grant \] more permissions to a marked user" Index: openacs-4/packages/cms/www/modules/permissions/permission-alter.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/permissions/permission-alter.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/permissions/permission-alter.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,11 @@ + +Permissions on @info.object_name@ for @info.grantee_name@ + + + +

      Permissions on @info.object_name@ for @info.grantee_name@

      + +

      Alter permissions

      + + + Index: openacs-4/packages/cms/www/modules/permissions/permission-alter.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/permissions/permission-alter.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/permissions/permission-alter.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,34 @@ +request create +request set_param object_id -datatype integer +request set_param grantee_id -datatype integer +request set_param return_url -datatype text -optional +request set_param passthrough -datatype text -optional +request set_param ext_passthrough -datatype text -optional -value $passthrough + +set user_id [User::getID] + +set db [template::get_db_handle] + +template::query info onerow " + select + acs_object.name(:object_id) as object_name, + acs_object.name(:grantee_id) as grantee_name, + acs_permission.permission_p(:object_id, :user_id, 'cm_perm') as user_cm_perm + from + dual" + +if { [string equal $info(user_cm_perm) t] } { + + form create own_permissions + content::perm_form_generate own_permissions \ + { ext_passthrough return_url } + content::perm_form_process own_permissions + + if { [form is_valid own_permissions] && ![util::is_nil return_url] } { + template::query::flush_cache "content::check_access ${grantee_id}*" + template::release_db_handle + template::forward "$return_url?[content::url_passthrough $ext_passthrough]" + } +} + +template::release_db_handle \ No newline at end of file Index: openacs-4/packages/cms/www/modules/permissions/permission-grant.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/permissions/permission-grant.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/permissions/permission-grant.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,29 @@ +request create +request set_param object_id -datatype integer +request set_param return_url -datatype text -optional +request set_param passthrough -datatype text -optional +request set_param ext_passthrough -datatype text -optional -value $passthrough + +set user_id [User::getID] + +# Determine if we have one and only one user on the clipboard +set clip [clipboard::parse_cookie] +set users [clipboard::get_items $clip users] + +if { [llength $users] < 1 } { + content::show_error \ + "There are no users on the clipboard." \ + $return_url $passthrough + +} elseif { [llength $users] > 1 } { + content::show_error \ + "There is more than one user on the clipboard. Make sure only + one user is marked and try again" \ + $return_url $passthrough +} + +set grantee_id [lindex $users 0] + +template::forward "../permissions/permission-alter?object_id=$object_id&return_url=$return_url&passthrough=$passthrough&grantee_id=$grantee_id" + + Index: openacs-4/packages/cms/www/modules/search/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/search/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/search/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,8 @@ + +Search + + + + Index: openacs-4/packages/cms/www/modules/search/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/search/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/search/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,167 @@ +request create +request set_param id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value search +request set_param parent_id -datatype keyword -optional + +set db [template::get_db_handle] + +# Get the tabulated list of content types +set content_types [cm::modules::types::getTypesTree] + +# Get a list of mime-types +query mime_types multilist " + select + label, mime_type as value + from + cr_mime_types +" + +form create search -html { name search method post } + +form section search "Search Parameters" + +element create search content_type \ + -label "Content Type" -datatype keyword -widget select -optional \ + -options $content_types + +element create search keywords \ + -label "Keywords" -datatype text -widget text \ + -html { size 40 } + +element create search fields \ + -label "Search in" -datatype text -widget checkbox \ + -options { {Title title} {Description description} {Content content} } \ + -values { title } + +element create search mime_type \ + -label "Mime Type" -datatype text -widget select -optional \ + -options [concat [list [list "--" ""]] $mime_types] + +element create search which_revisions \ + -label "Which Revisions" -datatype keyword -widget radio \ + -options { {{Search only the live revisions} live} {{Search all revisions} all}} \ + -values { live } + +form section search "Date Range" + +element create search start_date \ + -label "Start Date" -datatype date -widget date \ + -format "YYYY/MM/DD HH24:MI" -year_interval { 2000 2005 1 } -optional -help + +element create search end_date \ + -label "End Date" -datatype date -widget date \ + -format "YYYY/MM/DD HH24:MI" -year_interval { 2000 2005 1 } -optional -help + +# Assemble the query and redirect to the result page if the +# query is valid +if { [form is_valid search] } { + + form get_values search content_type keywords mime_type which_revisions start_date end_date + + # Assemble the literal query, no bind vars, since the keywords make it pretty + # much unpredictable + + # Create the contains clause, the within clause + set word_list [split $keywords " "] + set inter_clause "" + set the_or "" + set within_clause "" + foreach word $word_list { + append inter_clause "${the_or}%[string tolower $word]%" + append within_clause "${the_or}%[string tolower $word]% within \$field" + set the_or "," + } + + set attrs_table "" + set attrs_where "" + + # Use this clause for each of the selected fields + set contains_clause "" + set score_expr "" + set the_or "" + set the_plus "" + set label 10 + foreach field [element get_values search fields] { + if { ![string equal $field content] } { + set search_clause [subst $within_clause] + set column_name "ra.attributes" + set attrs_table ", cr_revision_attributes ra" + set attrs_where "\n and ra.revision_id = r.revision_id" + } else { + set search_clause $inter_clause + set column_name "r.content" + } + append contains_clause "$the_or contains($column_name, '$search_clause', $label) > 0" + set the_or " or " + append score_expr "$the_plus score($label)" + set the_plus " +" + incr label 10 + } + + # Build the basic query + + set sql_query " + select + i.item_id, content_item.get_path(i.item_id) item_path, + r.revision_id, + t.pretty_name as pretty_type, t.object_type, + r.title, to_char(r.publish_date) as pretty_date, + NVL(NVL(m.label, r.mime_type), 'unknown') as pretty_mime_type, + rownum as row_index, + ($score_expr) as search_score + from + cr_items i, cr_revisions r, + cr_mime_types m, acs_object_types t $attrs_table + where + m.mime_type(+) = r.mime_type + and + t.object_type = i.content_type $attrs_where + and + ($contains_clause)" + + # Append other search parameters to the query + + if { [string equal $which_revisions live] } { + append sql_query "\n and r.revision_id(+) = i.live_revision" + } else { + append sql_query "\n and r.item_id = i.item_id" + } + + if { ![util::is_nil mime_type] } { + append sql_query "\n and r.mime_type = '$mime_type'" + } + + if { ![util::is_nil content_type] } { + append sql_query "\n and i.content_type = '$content_type'" + } + + if { ![util::is_nil start_date] && ![util::is_nil end_date] } { + append sql_query "\n and (r.publish_date between " + append sql_query [util::date get_property sql_date $start_date] + append sql_query " and " + append sql_query [util::date get_property sql_date $end_date] + append sql_query ")" + } + + ns_log notice $sql_query + + # Perform the query and get the total results + template::query total_results onevalue " + select count(*) from ($sql_query) + " + + # Memoize the query - can't pass it through :-( + nsv_set browser_state "[User::getID].search.sql_query" $sql_query + + template::forward "search-results?total_results=$total_results&id=$id&parent_id=$parent_id" + +} + + + + + + + + + Index: openacs-4/packages/cms/www/modules/search/search-results.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/search/search-results.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/search/search-results.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,101 @@ + +Search Results + + + + + + + + + + + + + + + + + +
      Search Results
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      # ScoreTitlePathRevisionContent TypeMime Type
      @results.offset@ + @results.search_score@@results.title@ + @results.item_path@ + @results.pretty_date@@results.pretty_type@@results.pretty_mime_type@
      +
      + + + + + + + + +
      + + + << Previous @rows_per_page@ results +   + + + Pages: + + + @pages.label@ + + @pages.label@ + + +   + + + + Next @rows_per_page@ results >> +   +
      +
      + +
      + + No matches found + + +
      + + Your query has expired. Please return to the search page and repeat your search. + Index: openacs-4/packages/cms/www/modules/search/search-results.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/search/search-results.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/search/search-results.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,66 @@ +# Display and paginate the search results + +request create +request set_param id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value search +request set_param parent_id -datatype keyword -optional + +request set_param sql_query -datatype text +request set_param total_results -datatype integer +request set_param start_row -datatype integer -optional -value 1 + +set query_key "[User::getID].search.sql_query" +if { ![nsv_exists browser_state $query_key] } { + set sql_query "" +} else { + set sql_query [nsv_get browser_state $query_key] +} + +set passthrough "id=$id&mount_point=$mount_point&parent_id=$parent_id&total_results=$total_results" + +set package_url [ad_conn package_url] +set clipboardfloats_p [clipboard::floats_p] + +if { ![util::is_nil sql_query] } { + + set clip [clipboard::parse_cookie] + + # In the future, get this from the db prefs + set rows_per_page 10 + + # Perform the query, get results + template::query results multirow " + select * from ($sql_query) + where row_index >= :start_row and row_index < (:start_row + :rows_per_page) + order by search_score desc, title + " -eval { + clipboard::get_bookmark_icon $clip $mount_point $row(item_id) + set row(offset) [expr $row(rownum) + $start_row - 1] + } + + # Prepare a multirow datasource for pages + set page_count [expr $total_results / $rows_per_page] + if { [expr $total_results % $rows_per_page] > 0 } { + incr page_count + } + + if { $page_count > 10 } { + set page_count 10 + } + + for { set i 0 } { $i <= $page_count } { incr i } { + set index [expr $i + 1] + upvar 0 "pages:$index" row + set row(rownum) $index + set row(label) $index + set row(url) "search-results?$passthrough&start_row=[expr [expr $i * $rows_per_page] + 1]" + } + set pages:rowcount $page_count + + set current_page [expr [expr $start_row / $rows_per_page] + 1] + set next_row [expr $start_row + $rows_per_page] + set prev_row [expr $start_row - $rows_per_page] +} + + + Index: openacs-4/packages/cms/www/modules/sitemap/ancestors.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/ancestors.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/ancestors.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,48 @@ + + + + + + + + + + + +
      + + + + + + + @context.title@ + + + + + + @context.title@ + + + : + + + + + + +   + + + @display_path@ + + @display_path@ + +
      + + Index: openacs-4/packages/cms/www/modules/sitemap/ancestors.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/ancestors.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/ancestors.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,144 @@ +# ancestors.tcl +# show ancestors with navigational links to view them +# shows path with possible link to 'preview' the item +# if the item is a sitemap folder and has an index item +# if the item is not a folder and is under the sitemap mount point + +request create -params { + item_id -datatype integer + mount_point -datatype keyword -value sitemap + index_page_id -datatype integer -optional +} + +set root_id [cm::modules::${mount_point}::getRootFolderID] + +# special case - when the item_id is null, set it to the root folder +if { [template::util::is_nil item_id] } { + set item_id $root_id +} + + +# Get the cookie; prepare for setting bookmarks +#set clip [clipboard::parse_cookie] + +# use the appropriate icon depending on whether the item is bookmarked or not +# sets this_item(bookmark) as the icon +#set bookmark [clipboard::get_bookmark_icon $clip $mount_point $item_id] + +set db [template::get_db_handle] + +# get the context bar info +set query " + select + t.tree_level, t.parent_id, + content_folder.is_folder(i.item_id) is_folder, + content_item.get_title(t.parent_id) as title + from + cr_items i, + ( + select + parent_id, level as tree_level + from + cr_items + where + parent_id ^= 0 + connect by + prior parent_id = item_id + start with + item_id = :item_id + ) t + where + i.item_id = t.parent_id + order by + tree_level desc" + +template::query context multirow $query + + +# pass in index_page_id to improve efficiency +if { ![template::util::is_nil index_page_id] } { + + set index_page_sql "" + set has_index_page t + +} else { + set index_page_sql " + decode( nvl( + content_folder.get_index_page( :item_id ),0) + ,0,'f','t') has_index_page, " + +} + +# get the path of the item +set query " + select + $index_page_sql + -- does it have a template + content_item.get_template( item_id, 'public' ) template_id, + -- symlinks to this folder will have the path of this item + content_item.get_virtual_path( item_id, :root_id ) virtual_path, + content_item.get_path( + content_symlink.resolve( item_id ), :root_id ) physical_path, + content_folder.is_folder( item_id ) is_folder, + live_revision + from + cr_items + where + item_id = :item_id" + +template::query preview_info onerow $query + +template::util::array_to_vars preview_info + + +template::util::array_to_vars preview_info +# physical_path, virtual_path, is_folder, has_index_page + +if { [string equal $physical_path "../"] } { + set display_path "/" +} else { + set display_path "/$physical_path" +} + +# preview_p - flag indicating whether the path is previewable or not +# t => if the item is a sitemap folder and has an index item +# t => if the item is not a folder and is under the sitemap mount point +set preview_p f +set preview_path $virtual_path + +# Determine the root of the preview link. If CMS is running as a package, +# the index.vuh file should be under this root. +if { [catch { + set root_path [ad_conn package_url] +} errmsg] } { + set root_path "" +} + +#set preview_path [ns_normalizepath "$root_path/$preview_path"] +set preview_path [ns_normalizepath "/$preview_path"] + + +if { [string equal $mount_point sitemap] } { + if { [string equal $is_folder t] && [string equal $has_index_page t] } { + set preview_p t + } elseif { ![string equal $is_folder t] && \ + ![template::util::is_nil live_revision] } { + set preview_p t + } +} +# an item cannot be previewed if it has no associated template +if { [string equal $has_index_page t] } { + template::query template_id onevalue " + select + content_item.get_template( + nvl( content_folder.get_index_page( :item_id ), 0), 'public' ) + from + dual + " +} + +if { [template::util::is_nil template_id] } { + set preview_p f +} + +template::release_db_handle Index: openacs-4/packages/cms/www/modules/sitemap/attributes.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/attributes.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/attributes.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,72 @@ + +@page_title@ +

      @page_title@

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      There are no content types registered to this folder.
      Content Type 
      @content_types.pretty_name@ + + Unregister this content type + +   +
      + + + + + + + + +

      + + + + + + + + +
      + + + + +
      Folder Options
      +
      + +
      + +

      + + + + + + + Index: openacs-4/packages/cms/www/modules/sitemap/attributes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/attributes.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/attributes.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,127 @@ +# display content-types that are registered to this folder + +request create +request set_param folder_id -datatype integer -optional +request set_param mount_point -datatype keyword -value sitemap + +# default folder_id is the root folder +if { [template::util::is_nil folder_id] } { + set folder_id [cm::modules::${mount_point}::getRootFolderID] +} + +set db [template::get_db_handle] + +# permissions check - user must have cm_examine on this folder +content::check_access $folder_id cm_examine -user_id [User::getID] -db $db + + +# Get the registered types for the folder +# (besides symlinks/templates/subfolders) +cms_folder::get_registered_types $folder_id multirow content_types + +# Get other misc values +query folder_name onevalue " + select label from cr_folders where folder_id = :folder_id +" + +set page_title "Folder Attributes - $folder_name" +set register_marked_content_types \ + " + \"Register + Register marked content types to this folder." + +# Set up passthrough for permissions +set return_url [ns_conn url] +set passthrough [content::assemble_passthrough \ + return_url mount_point folder_id] + + +# Determine registered types +query folder_options onerow " + select + content_folder.is_registered(:folder_id,'content_folder') allow_subfolders, + content_folder.is_registered(:folder_id,'content_symlink') allow_symlinks, + content_folder.is_registered(:folder_id,'content_template') allow_templates + from dual +" + +template::release_db_handle + + +# Create the form for registering special types to the folder +form create register_types + +element create register_types folder_resolved_id \ + -datatype integer \ + -widget hidden \ + -optional + +# PATCH to set a negative number (with a dash in front of it) as the value +if { [util::is_nil "register_types:folder_resolved_id(value)"] } { + set "register_types:folder_resolved_id(value)" $folder_id +} + +element create register_types folder_id \ + -datatype integer \ + -widget hidden \ + -param -optional + +element create register_types mount_point \ + -datatype keyword \ + -widget hidden \ + -param -optional + +element create register_types allow_subfolders \ + -datatype keyword \ + -widget radio \ + -label "Allow Subfolders?" \ + -options { {Yes t} {No f} } \ + -values [list $folder_options(allow_subfolders)] + +element create register_types allow_symlinks \ + -datatype keyword \ + -widget radio \ + -label "Allow Symlinks?" \ + -options { {Yes t} {No f} } \ + -values [list $folder_options(allow_symlinks)] + + +# Process the form + +if { [form is_valid register_types] } { + + form get_values register_types \ + allow_subfolders allow_symlinks folder_resolved_id mount_point + + set db [template::begin_db_transaction] + + # permissions check - must have cm_write on folder to modify its options + content::check_access $folder_resolved_id cm_write \ + -user_id [User::getID] -db $db + + + if { [string equal $allow_subfolders "t"] } { + set subfolder_sql "content_folder.register_content_type(:folder_resolved_id,'content_folder');" + } else { + set subfolder_sql "content_folder.unregister_content_type(:folder_resolved_id,'content_folder');" + } + + if { [string equal $allow_symlinks "t"] } { + set symlink_sql "content_folder.register_content_type(:folder_resolved_id,'content_symlink');" + } else { + set symlink_sql "content_folder.unregister_content_type(:folder_resolved_id,'content_symlink');" + } + + set sql "begin + $subfolder_sql + $symlink_sql + end;" + + ns_ora dml $db $sql + template::end_db_transaction + template::release_db_handle + + forward "attributes?folder_id=$folder_id&mount_point=$mount_point" +} Index: openacs-4/packages/cms/www/modules/sitemap/copy.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/copy.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/copy.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,64 @@ + +Copy Items to @path@ +

      Copy Items to @path@

      + + + +

      No items are currently available for linking. Please mark + your choices and return to this form.

      +
      + + + + +

      + + Please choose at least one item to copy + +

      + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + +
       NameTitle
      + + + + @marked_items.name@ + + @marked_items.title@ +
      + +
      + +
      + + + +
      +
      \ No newline at end of file Index: openacs-4/packages/cms/www/modules/sitemap/copy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/copy.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/copy.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,143 @@ +# Copy folders under another folder + +request create +request set_param id -datatype integer -optional +request set_param mount_point -datatype keyword -value sitemap + + +set root_id [cm::modules::${mount_point}::getRootFolderID] +if { [template::util::is_nil id] } { + set folder_id $root_id +} else { + set folder_id $id +} + + +set db [template::get_db_handle] + +# permission check - must have cm_new on the current folder +set user_id [User::getID] +content::check_access $folder_id cm_new -user_id $user_id + +set clip [clipboard::parse_cookie] +set clip_items [clipboard::get_items $clip $mount_point] +set clip_length [llength $clip_items] +if { $clip_length == 0 } { + set no_items_on_clipboard "t" + return +} else { + set no_items_on_clipboard "f" +} + +template::query path onevalue " + select + content_item.get_path( :folder_id ) + from + dual +" + +# get relevant marked items +template::query marked_items multirow " + select + content_item.get_title(item_id) title, + content_item.get_path(item_id,:root_id) name, + item_id, parent_id + from + cr_items + where + item_id in ([join $clip_items ","]) + and + -- only for those items which user has cm_examine + cms_permission.permission_p(item_id, :user_id, 'cm_examine') = 't' +" + +template::release_db_handle + + +form create copy +element create copy mount_point \ + -datatype keyword \ + -widget hidden \ + -value $mount_point + +element create copy id \ + -datatype integer \ + -widget hidden \ + -param \ + -optional + +element create copy copied_items \ + -datatype integer \ + -widget checkbox + +set marked_item_size [multirow size marked_items] + +for { set i 1 } { $i <= $marked_item_size } { incr i } { + set title [multirow get marked_items $i title] + set name [multirow get marked_items $i name] + set item_id [multirow get marked_items $i item_id] + set parent_id [multirow get marked_items $i parent_id] + + element create copy "parent_id_$item_id" \ + -datatype integer \ + -widget hidden + + element set_value copy parent_id_$item_id $parent_id +} + + + + + + + +if { [form is_valid copy] } { + set user_id [User::getID] + set ip [ns_conn peeraddr] + + form get_values copy id mount_point + set copied_items [element get_values copy copied_items] + + set db [template::begin_db_transaction] + + set folder_flush_list [list] + foreach cp_item_id $copied_items { + set parent_id [element get_values copy "parent_id_$cp_item_id"] + + set sql " + begin + content_item.copy( + item_id => :cp_item_id, + target_folder_id => :folder_id, + creation_user => :user_id, + creation_ip => :ip + ); + end;" + + if { [catch {template::query copy_item dml $sql} errmsg] } { + # possibly a duplicate name + ns_log notice "ERROR: copy.tcl - while copying $errmsg" + } + + # flush the cache + if { [lsearch -exact $folder_flush_list $parent_id] == -1 } { + lappend folder_flush_list $parent_id + cms_folder::flush $mount_point $parent_id + } + + } + + template::end_db_transaction + template::release_db_handle + + # flush cache for destination folder + if { $folder_id == [cm::modules::${mount_point}::getRootFolderID] } { + set folder_id "" + } + cms_folder::flush $mount_point $folder_id + clipboard::free $clip + + # Specify a null id so that the entire branch will be refreshed + template::forward \ + "refresh-tree?goto_id=$folder_id&mount_point=$mount_point" +} Index: openacs-4/packages/cms/www/modules/sitemap/create.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/create.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/create.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +Create a Folder + +

      Create new folder

      + + Index: openacs-4/packages/cms/www/modules/sitemap/create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/create.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/create.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,103 @@ +# Create a new folder under the current folder + +request create -params { + parent_id -datatype integer -optional + mount_point -datatype keyword +} + +if { [util::is_nil parent_id] } { + set create_parent_id [cm::modules::${mount_point}::getRootFolderID] +} else { + set create_parent_id $parent_id +} + +set db [template::get_db_handle] + +# permissions check - user must have cm_new on parent +content::check_access $create_parent_id cm_new -user_id [User::getID] + +# Get the path +query path onevalue " + select content_item.get_path(:create_parent_id) from dual +" + +template::release_db_handle + +# Create the form + +form create add_folder + +element create add_folder parent_id \ + -label "Parent ID" -datatype keyword -widget hidden -param -optional + +element create add_folder mount_point \ + -label "Mount Point" -datatype keyword -widget hidden -param -optional + +if { [string equal $path ""] } { + set path "/" +} + +element create add_folder path \ + -label "In" -datatype text -widget inform -value "$path" + +element create add_folder name \ + -label "Name" -datatype keyword -widget text -html { size 20 } \ + -validate { { expr ![string match $value "/"] } + { Folder name cannot contain slashes }} + +element create add_folder label \ + -label "Label" -widget text -datatype text \ + -html { size 30 } -optional + +element create add_folder description \ + -label "Description" -widget textarea -datatype text \ + -html { rows 5 cols 40 wrap physical } -optional + +#set parent_id [element get_value add_folder parent_id] +#set mount_point [element get_value add_folder mount_point] + + +# Insert the folder +if { [form is_valid add_folder] } { + form get_values add_folder \ + name label description parent_id mount_point + + set user_id [User::getID] + set ip [ns_conn peeraddr] + + set db [template::begin_db_transaction] + + ns_ora exec_plsql_bind $db " + begin + :folder_id := content_folder.new( + name => :name, + label => :label, + description => :description, + parent_id => :create_parent_id, + creation_user => :user_id, + creation_ip => :ip ); + end;" folder_id + + if { [string equal $mount_point "templates"] } { + + template::query register_content_type dml " + begin + content_folder.register_content_type( + folder_id => :folder_id, + content_type => 'content_template', + include_subtypes => 'f' + ); + end;" + } + + template::end_db_transaction + template::release_db_handle + + # Flush the paginator cache + cms_folder::flush $mount_point $parent_id + + # Update the folder and refresh the tree + refreshCachedFolder $user_id sitemap $parent_id + + forward "refresh-tree?id=$parent_id&goto_id=$parent_id&mount_point=$mount_point" +} Index: openacs-4/packages/cms/www/modules/sitemap/delete-items.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/delete-items.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/delete-items.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,70 @@ + +Delete Items +

      Delete Items

      + + + +

      No items are currently available for deleting. Please mark + your choices and return to this form.

      +
      + + + +

      + + Please choose at least one item to delete + +

      + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + +
       TitlePathContent Type
      + + + + + + @marked_items.title@ + + @marked_items.path@ + + @marked_items.content_type_pretty@ +
      + +
      + +
      + + + +
      +
      \ No newline at end of file Index: openacs-4/packages/cms/www/modules/sitemap/delete-items.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/delete-items.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/delete-items.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,167 @@ +# delete.tcl +# Delete marked items +request create +request set_param id -datatype integer +request set_param mount_point -datatype keyword -value sitemap + + +set clip [clipboard::parse_cookie] +set clip_items [clipboard::get_items $clip $mount_point] +set clip_length [llength $clip_items] +if { $clip_length == 0 } { + set no_items_on_clipboard "t" + return +} else { + set no_items_on_clipboard "f" +} + +set user_id [User::getID] + +# get title, content_type, path, item_id of each marked item +set query " + select + item_id, + nvl(content_item.get_title(item_id),name) title, + content_item.get_path(item_id) path, + pretty_name as content_type_pretty, + content_symlink.is_symlink(item_id) is_symlink, + content_folder.is_folder(item_id) is_folder, + content_template.is_template(item_id) is_template + from + cr_items i, acs_object_types t + where + i.content_type = t.object_type + and + item_id in ([join $clip_items ","]) + and + -- permissions check + cms_permission.permission_p( item_id, :user_id, 'cm_write' ) = 't' + order by + -- this way parents are deleted after their children + item_id desc +" +query marked_items multirow $query + + + + +form create delete + +element create delete deleted_items \ + -datatype integer \ + -widget checkbox + +set marked_item_size [multirow size marked_items] + +for { set i 1 } { $i <= $marked_item_size } { incr i } { + set item_id [multirow get marked_items $i item_id] + set is_symlink [multirow get marked_items $i is_symlink] + set is_folder [multirow get marked_items $i is_folder] + set is_template [multirow get marked_items $i is_template] + + element create delete "is_symlink_$item_id" \ + -datatype keyword \ + -widget hidden \ + -value $is_symlink + + element create delete "is_folder_$item_id" \ + -datatype keyword \ + -widget hidden \ + -value $is_folder + + element create delete "is_template_$item_id" \ + -datatype keyword \ + -widget hidden \ + -value $is_template +} + + + + + +if { [form is_valid delete] } { + + set user_id [User::getID] + set ip [ns_conn peeraddr] + + set deleted_items [element get_values delete deleted_items] + + set db [template::begin_db_transaction] + + set parents [list] + foreach del_item_id $deleted_items { + set is_symlink [element get_values delete "is_symlink_$del_item_id"] + set is_folder [element get_values delete "is_folder_$del_item_id"] + set is_template [element get_values delete "is_template_$del_item_id"] + + # get all the parent_id's of the items being deleted + # because we need to flush the paginator cache for each of + # these folders + template::query flush_list onelist " + select + parent_id + from + cr_resolved_items + where + resolved_id = :del_item_id + " + + + # set up the call to the proper PL/SQL delete procedure + if { [string equal $is_symlink "t"] } { + set delete_proc "content_symlink.delete" + set delete_key "symlink_id" + } elseif { [string equal $is_folder "t"] } { + set delete_proc "content_folder.delete" + set delete_key "folder_id" + } elseif { [string equal $is_template "t"] } { + set delete_proc "content_template.delete" + set delete_key "template_id" + } else { + set delete_proc "content_item.delete" + set delete_key "item_id" + } + + # the following SQL will have this form: + # content_something.delete( + # something_id => :del_item_id + # ); + set sql " + begin + $delete_proc ( + $delete_key => :del_item_id + ); + end;" + + + if { [catch { template::query delete_items dml $sql } errmsg] } { + ns_log notice \ + "../../sitemap/delete.tcl caught error in dml: $sql - $errmsg" + ns_log notice \ + "../../sitemap/delete.tcl - Item $del_item_id was not deleted" + } + + # build a list of parent items whose paginator cache needs flushing + foreach parent_id $flush_list { + # flush as few times as necessary + if { [lsearch -exact $parents $parent_id] == -1 } { + # flush cache + lappend parents $parent_id + + if { $parent_id == [cm::modules::${mount_point}::getRootFolderID] } { + set parent_id "" + } + cms_folder::flush $mount_point $parent_id + + } + } + } + + template::end_db_transaction + template::release_db_handle + + clipboard::free $clip + + # Specify a null id so that the entire branch will be refreshed + forward "refresh-tree?goto_id=$id&id=$id&mount_point=$mount_point" +} Index: openacs-4/packages/cms/www/modules/sitemap/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/delete.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,48 @@ +# Delete a folder (only if does not contain any items). +# Delete any symlinks pointing to this folder (possibly give a warning). + +template::request create +template::request set_param id -datatype keyword +template::request set_param parent_id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value sitemap + + +set db [template::get_db_handle] + +# permission check - user must have cm_write on this folder to delete it +content::check_access $id cm_write -user_id [User::getID] -db $db + +# Determine if the folder is empty +template::query is_empty onevalue " + select content_folder.is_empty(:id) from dual +" + +template::release_db_handle + +# If nonempty, show error +if { [string equal $is_empty "f"] } { + + set message "This folder is not empty." + set return_url "modules/sitemap/index" + set passthrough [list [list id $id] [list parent_id $parent_id]] + template::forward "../../error?message=$message&return_url=$return_url&passthrough=$passthrough" + +} else { + + # Otherwise, delete the folder + set db [template::begin_db_transaction] + template::query delete_folder dml "begin content_folder.delete(:id); end;" + template::end_db_transaction + template::release_db_handle + + # Remove it from the clipboard, if it exists + set clip [clipboard::parse_cookie] + clipboard::remove_item $clip $mount_point $id + clipboard::set_cookie $clip + clipboard::free $clip + + # Flush paginator cache + cms_folder::flush $mount_point $parent_id + + template::forward "refresh-tree?id=$parent_id&goto_id=$parent_id&mount_point=$mount_point" +} Index: openacs-4/packages/cms/www/modules/sitemap/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,302 @@ + +Folder Listing + + + + + + + + + +
      + + + Symlink to + + @info.label@ + +
      +
      + + + @info.description@ + +

      + + + + + + + + + + + + + +
      + + + << +    + + + + < + +   + + + + @pages.page@ + + + @page@ + + + + + > + +   + + +    + + >> + +
      + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + Name + + Name + + + + Size + + Size + + + Publish Date + + Publish Date + + + Type + + Type + + + Last Modified + + Last Modified +
      +   + + + + + + + @items.title@ + + + + @items.title@ + + + + @items.title@ + + +
      -
      + @items.file_size@ K +
      + - + @items.publish_date@ + + @items.content_type@ +   + @items.last_modified_date@
      + +
      + +
      + +

      This folder is empty.

      + + + + + +
      +
      + +

      + + Links to this folder: + + + + + +
      + + + @symlinks.path@ + +
      +
      +


      + + + + + + Folder attributes... + +
      + + + + + + + Delete + + this @what@ + + + + + Delete + + this @what@ + +
      + + + + + Rename + + this @what@ + +
      +
      + + + + + + + Move, + Copy or + Link + + + Move or + Copy + + marked items to this @what@.
      + + + + + Delete + marked items. +
      +
      + + + + + Create a new folder + + within this @what@. + +
      + + + + + + + + Add a new under this @what@. + +
      +
      +
      + + + + + + Add a template + + to this @what@. + + +
      + +

      + + + + + + + + + Index: openacs-4/packages/cms/www/modules/sitemap/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,372 @@ +# List contents of a folder +# List path of this folder +# List path of any symlinks to this folder + +request create +request set_param id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value sitemap +request set_param parent_id -datatype keyword -optional +request set_param orderby -datatype keyword -optional -value name + + +# paginator variables +request set_param page -datatype integer -value 1 + +# Create all the neccessary URL params for passthrough +set passthrough "mount_point=$mount_point&parent_id=$parent_id" + +set original_id $id +set user_id [User::getID] +set root_id [cm::modules::${mount_point}::getRootFolderID] + +set db [template::get_db_handle] + +# Get the folder label/description +# If :id does not exist, then use :root_id +if { [template::util::is_nil id] } { + + set parent_var :root_id + + template::query module_name onevalue " + select name from cm_modules where key = :mount_point + " + + set info(label) $module_name + set info(description) "" + set what "Folder" + set is_symlink f + + # get all the content types registered to this folder + # check whether this folder allows subfolders, symlinks, and templates + template::query registered_types onelist " + select + content_type + from + cr_folder_type_map + where + folder_id = :root_id + " + + set subfolders_allowed f + set symlinks_allowed f + set templates_allowed f + if { [lsearch -exact $registered_types "content_folder"] != -1 } { + set subfolders_allowed t + } + if { [lsearch -exact $registered_types "content_symlink"] != -1 } { + set symlinks_allowed t + } + if { [lsearch -exact $registered_types "content_template"] != -1 } { + set templates_allowed t + } + + set parent_id "" + +} else { + + set parent_var :id + + # Resolve the symlink, if any + template::query resolved_id onevalue " + select content_symlink.resolve( :id ) from dual + " + + if { $resolved_id != $id } { + set is_symlink t + set id $resolved_id + set what "Link" + } else { + set is_symlink f + set what "Folder" + } + + template::query info onerow " + select + parent_id, NVL(label, name) label, description + from + cr_items i, cr_folders f + where + i.item_id = f.folder_id + and + f.folder_id = :id + " + + # Determine the parent id if none exists + set parent_id $info(parent_id) + if { [template::util::is_nil parent_id] } { + set parent_id "" + } + + + # get all the content types registered to this folder + # check whether this folder allows subfolders, symlinks, and templates + template::query registered_types onelist " + select + content_type + from + cr_folder_type_map + where + folder_id = :id + " + + set subfolders_allowed f + set symlinks_allowed f + set templates_allowed f + if { [lsearch -exact $registered_types "content_folder"] != -1 } { + set subfolders_allowed t + } + if { [lsearch -exact $registered_types "content_symlink"] != -1 } { + set symlinks_allowed t + } + if { [lsearch -exact $registered_types "content_template"] != -1 } { + set templates_allowed t + } + + +} + + +# Make sure the user has the right access to this folder, +# set up the user_permissions array +if { [template::util::is_nil id] } { + set object_id $root_id +} else { + set object_id $id +} + +content::check_access $object_id "cm_examine" \ + -user_id $user_id -mount_point $mount_point -parent_id $parent_id \ + -return_url "modules/sitemap/index" \ + -passthrough [list [list id $original_id] [list orderby $orderby]] + + +# If the user doesn't have the New permission, he can't create any new items +# at all +if { [string equal $user_permissions(cm_new) f] } { + set info(subfolders_allowed) f + set info(symlinks_allowed) f + set info(templates_allowed) f +} + + + + +# Get the cookie; prepare for setting bookmarks +#set clip [clipboard::parse_cookie] + +# Get the index page ID + +template::query index_page_id onevalue " + select content_folder.get_index_page($parent_var) from dual +" + + +set id_sql " + select + r.item_id, '' as context, + decode(o.object_type, 'content_symlink', r.label, + 'content_folder', f.label, + nvl(v.title, i.name)) title, + decode(r.item_id, :index_page_id, 't', 'f') is_index_page, + nvl(to_char(round(dbms_lob.getlength(v.content) / 1000, 1)), '-') file_size + from + cr_resolved_items r, cr_items i, cr_folders f, cr_revisions v, + cr_revisions u, acs_objects o, acs_object_types t + where + r.parent_id = $parent_var + and + r.resolved_id = i.item_id + and + i.item_id = o.object_id + and + i.content_type = t.object_type + and + i.latest_revision = v.revision_id (+) + and + i.live_revision = u.revision_id (+) + and + i.item_id = f.folder_id (+) + order by + is_index_page desc " + +# sort table by columns +switch -exact -- $orderby { + size { + set orderby_clause ", o.object_type, file_size desc" + } + publish_date { + set orderby_clause ", o.object_type, publish_date desc" + } + last_modified { + set orderby_clause ", o.object_type, last_modified desc" + } + object_type { + set orderby_clause ", o.object_type, content_type, upper(title)" + } + default { + set orderby_clause ", o.object_type, upper(title)" + } +} + + +append id_sql $orderby_clause + + + + +set display_sql " + select + decode(i.content_type, 'content_folder', 't', 'f') is_folder, + decode(i.content_type, 'content_template', 't', 'f') is_template, + r.item_id, r.resolved_id, r.is_symlink, r.name, + NVL(trim( + decode(o.object_type, 'content_symlink', r.label, + 'content_folder', f.label, + nvl(v.title, i.name))), + '-') title, + decode(i.publish_status, 'live', + to_char(u.publish_date, 'MM/DD/YYYY'), '-') publish_date, + o.object_type, t.pretty_name content_type, + to_char(o.last_modified, 'MM/DD/YYYY HH24:MI') last_modified_date, + decode(r.item_id, :index_page_id, 't', 'f') is_index_page, + nvl(to_char(round(dbms_lob.getlength(v.content) / 1000, 1)), '-') file_size + from + cr_resolved_items r, cr_items i, cr_folders f, cr_revisions v, + cr_revisions u, acs_objects o, acs_object_types t + where + r.parent_id = $parent_var + and + r.resolved_id = i.item_id + and + i.item_id = o.object_id + and + i.content_type = t.object_type + and + i.latest_revision = v.revision_id (+) + and + i.live_revision = u.revision_id (+) + and + i.item_id = f.folder_id (+) + and + -- paginator sql + r.item_id in (CURRENT_PAGE_SET) + order by + is_index_page desc $orderby_clause" + + +template::release_db_handle + +# paginator +set p_name "folder_contents_${mount_point}_$id" +paginator create $p_name $id_sql -pagesize 10 -groupsize 10 -contextual + +paginator get_data $p_name items $display_sql item_id $page +paginator get_display_info $p_name info $page + +set group [paginator get_group $p_name $page] + +paginator get_context $p_name pages [paginator get_pages $p_name $group] +paginator get_context $p_name groups [paginator get_groups $p_name $group 10] + + +set db [template::get_db_handle] + +# determine whether item is marked (on clipboard), its link and icon +for { set i 1 } { $i <= [multirow size items] } { incr i } { + multirow get items $i + + # use the appropriate icon depending on whether + # the icon is bookmarked or not + #clipboard::get_bookmark_icon $clip $mount_point $items(item_id) items + + # Create a link based on object type + if { [string equal $items(is_folder) t] } { + if { [string equal $items(is_symlink) t] } { + set base_url "index?id=$items(item_id)" + } else { + set base_url "index?id=$items(resolved_id)" + } + } else { + set base_url \ + "../items/index?item_id=$items(resolved_id)" + } + set items(link) "${base_url}&mount_point=$mount_point&parent_id=$id" + + # Specify an item based on object type + if { [string equal $items(is_symlink) t] } { + set items(icon) "Shortcut24" + } elseif { [string equal $items(is_folder) t] } { + set items(icon) "Open24" + } elseif { [string equal $items(is_template) t] } { + set items(icon) "generic-item" + } else { + set items(icon) "Page24" + } + + # Set the correct name if the object is a template + # Change this to actually do the right thing ! + if { [string equal $items(is_template) t] } { + set items(title) $items(name) + } +} + + + +# symlinks to this folder/item +template::query symlinks multirow " + select + i.item_id id, + content_item.get_path(i.item_id) path + from + cr_items i, cr_symlinks s + where + i.item_id = s.target_id + and + i.item_id = :original_id +" + +template::release_db_handle + + +form create add_item + +if { [template::util::is_nil id] } { + set the_id $root_id +} else { + set the_id $id +} + +element create add_item id \ + -datatype keyword -widget hidden -param -optional + +element create add_item mount_point \ + -datatype keyword -widget hidden -param -optional + +set revision_types [cms_folder::get_registered_types $the_id] +set num_revision_types [llength $revision_types] + +element create add_item content_type \ + -datatype keyword \ + -widget select \ + -label "Content Type" \ + -options $revision_types + +if { [form is_valid add_item] } { + form get_values add_item id mount_point content_type + + # if the folder_id is empty, then it must be the root folder + if { [template::util::is_nil id] } { + set folder_id [cm::modules::${mount_point}::getRootFolderID] + } else { + set folder_id $id + } + + if { [string equal $mount_point "templates"] } { + forward "../items/template?parent_id=$folder_id&mount_point=$mount_point" + } else { + forward "../items/create-1?parent_id=$folder_id&mount_point=$mount_point&content_type=$content_type" + } +} + + + Index: openacs-4/packages/cms/www/modules/sitemap/move.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/move.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/move.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,64 @@ + +Move Items to @path@ +

      Move Items to @path@

      + + + +

      No items are currently available for linking. Please mark + your choices and return to this form.

      +
      + + + + +

      + + Please choose at least one item to move + +

      + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + +
       NameTitle
      + + + + @marked_items.name@ + + @marked_items.title@ +
      + +
      + +
      + + + +
      +
      \ No newline at end of file Index: openacs-4/packages/cms/www/modules/sitemap/move.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/move.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/move.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,146 @@ +# Move folders under another folder + +request create +request set_param id -datatype integer -optional +request set_param mount_point -datatype keyword -value sitemap + + +set root_id [cm::modules::${mount_point}::getRootFolderID] +if { [template::util::is_nil id] } { + set folder_id $root_id +} else { + set folder_id $id +} + + +set db [template::get_db_handle] + +# permission check - must have cm_write on the current folder +set user_id [User::getID] +content::check_access $folder_id cm_new -user_id $user_id + +set clip [clipboard::parse_cookie] +set clip_items [clipboard::get_items $clip $mount_point] +set clip_length [llength $clip_items] +if { $clip_length == 0 } { + set no_items_on_clipboard "t" + return +} else { + set no_items_on_clipboard "f" +} + +template::query path onevalue " + select + content_item.get_path( :folder_id ) + from + dual +" + +# get relevant marked items +template::query marked_items multirow " + select + content_item.get_title(item_id) title, + content_item.get_path(item_id,:root_id) name, + item_id, parent_id + from + cr_items + where + item_id in ([join $clip_items ","]) + and + -- only for those items which user has cm_write + cms_permission.permission_p(item_id, :user_id, 'cm_write') = 't' +" + +template::release_db_handle + +form create move +element create move mount_point \ + -datatype keyword \ + -widget hidden \ + -value $mount_point + +element create move id \ + -datatype integer \ + -widget hidden \ + -param \ + -optional + + +element create move moved_items \ + -datatype integer \ + -widget checkbox + +set marked_item_size [multirow size marked_items] + +for { set i 1 } { $i <= $marked_item_size } { incr i } { + set title [multirow get marked_items $i title] + set name [multirow get marked_items $i name] + set item_id [multirow get marked_items $i item_id] + set parent_id [multirow get marked_items $i parent_id] + + element create move parent_id_$item_id \ + -datatype integer \ + -widget hidden + + # need to do this to get around negative values + element set_value move parent_id_$item_id $parent_id +} + + + +if { [form is_valid move] } { + + set user_id [User::getID] + set ip [ns_conn peeraddr] + set root_id [cm::modules::${mount_point}::getRootFolderID] + + form get_values move id mount_point + set moved_items [element get_values move moved_items] + + + set db [template::begin_db_transaction] + + set folder_flush_list [list] + foreach mv_item_id $moved_items { + set parent_id [element get_values move "parent_id_$mv_item_id"] + + set sql " + begin + content_item.move( + item_id => :mv_item_id, + target_folder_id => :folder_id + ); + end;" + + if { [catch {template::query move_items dml $sql} errmsg] } { + # possibly a duplicate name + ns_log notice "move.tcl - while moving $errmsg" + } + + # flush the cache + if { [lsearch -exact $folder_flush_list $parent_id] == -1 } { + lappend folder_flush_list $parent_id + if { $parent_id == $root_id } { + set parent_id "" + } + cms_folder::flush $mount_point $parent_id + } + + } + + template::end_db_transaction + template::release_db_handle + + + # flush cache for destination folder + if { $folder_id == $root_id } { + set folder_id "" + } + + cms_folder::flush $mount_point $folder_id + clipboard::free $clip + + # Specify a null id so that the entire branch will be refreshed + template::forward \ + "refresh-tree?goto_id=$folder_id&mount_point=$mount_point" +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/sitemap/refresh-tree.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/refresh-tree.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/refresh-tree.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + + Index: openacs-4/packages/cms/www/modules/sitemap/refresh-tree.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/refresh-tree.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/refresh-tree.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,19 @@ +# Refresh the tree to show any new folders + +request create +request set_param id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value sitemap +request set_param goto_id -datatype keyword -optional +set user_id [User::getID] + +# Change the update time on the folder +refreshCachedFolder $user_id sitemap $id + +if { [template::util::is_nil goto_id] } { + set goto_id $id +} else { + refreshCachedFolder $user_id $mount_point $goto_id +} + + + Index: openacs-4/packages/cms/www/modules/sitemap/rename.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/rename.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/rename.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,20 @@ + + + + + +

      Rename folder

      + + + + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/sitemap/rename.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/rename.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/rename.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,93 @@ +# Change name, label and description of folder. + +request create +request set_param item_id -datatype integer +request set_param mount_point -datatype keyword -value sitemap + + +set db [template::get_db_handle] +# permissions check - renaming a folder requires cm_write on the folder +content::check_access $item_id cm_write -user_id [User::getID] +template::release_db_handle + + +# Create then form +form create rename_folder + +element create rename_folder item_id \ + -datatype integer -widget hidden -param + +element create rename_folder parent_id \ + -datatype integer -widget hidden -optional -param + +element create rename_folder mount_point \ + -datatype keyword -widget hidden -value $mount_point + +element create rename_folder name \ + -label "Name" -datatype keyword -widget text -html { size 20 } \ + -validate { { expr ![string match $value "/"] } + { Folder name cannot contain slashes }} + +element create rename_folder label \ + -label "Label" -widget text -datatype text \ + -html { size 30 } -optional + +element create rename_folder description \ + -label "Description" -widget textarea -datatype text \ + -html { rows 5 cols 40 wrap physical } -optional + + +if { [form is_request rename_folder] } { + + set item_id [element get_value rename_folder item_id] + + # Get existing folder parameters + set db [template::get_db_handle] + template::query info onerow " + select + i.name, f.label, f.description + from + cr_items i, cr_folders f + where + i.item_id = :item_id + and + f.folder_id = :item_id" + template::release_db_handle + + element set_properties rename_folder name -value $info(name) + element set_properties rename_folder label -value $info(label) + element set_properties rename_folder description -value $info(description) +} + + + + + + +# Rename +if { [form is_valid rename_folder] } { + + form get_values rename_folder \ + item_id name label description parent_id mount_point + + set db [template::begin_db_transaction] + + template::query rename_folder dml " + begin + content_folder.rename ( + folder_id => :item_id, + name => :name, + label => :label, + description => :description + ); + end;" + + template::end_db_transaction + template::release_db_handle + + # flush paginator cache for this folder + cms_folder::flush $mount_point $parent_id + + template::forward "refresh-tree?id=$parent_id&goto_id=$item_id" +} + Index: openacs-4/packages/cms/www/modules/sitemap/symlink.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/symlink.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/symlink.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,69 @@ + +Symlink Items +

      Symlink Items

      + + + +

      No items are currently available for linking. Please mark + your choices and return to this form.

      +
      + + + + +

      + + Please choose at least one item to symlink + +

      + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + +
       TargetSymlink NameSymlink Label
      + + + @marked_items.title@ + + + + +
      + +
      + +
      + + + +
      +
      + Index: openacs-4/packages/cms/www/modules/sitemap/symlink.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/symlink.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/symlink.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,149 @@ +# symlink.tcl +# Create symlink for each marked item under this folder + + +request create +# current (destination) folder +request set_param id -datatype integer -optional +request set_param mount_point -datatype keyword -value sitemap + + + +if { [template::util::is_nil id] } { + set folder_id [cm::modules::${mount_point}::getRootFolderID] +} else { + set folder_id $id +} + + +set db [template::get_db_handle] +# permission check - must have cm_new on id +set user_id [User::getID] +content::check_access $folder_id cm_new -user_id $user_id + +set clip [clipboard::parse_cookie] +set clip_items [clipboard::get_items $clip $mount_point] +set clip_length [llength $clip_items] +if { $clip_length == 0 } { + set no_items_on_clipboard "t" + return +} else { + set no_items_on_clipboard "f" +} + +# get title, name, item_id of each marked item +template::query marked_items multirow " + select + content_item.get_title(item_id) title, 'symlink_to_' || name as name, + item_id + from + cr_items + where + item_id in ([join $clip_items ","]) + and + -- only items which have are not symlinks + content_type ^= 'content_symlink' + and + -- only for those item which user has cm_examine + cms_permission.permission_p(item_id, :user_id, 'cm_examine') = 't' +" + +template::release_db_handle + +form create symlink + +element create symlink mount_point \ + -datatype keyword \ + -widget hidden \ + -value $mount_point + +element create symlink id \ + -datatype integer \ + -widget hidden \ + -param \ + -optional + +#element set_value symlink id $folder_id + + +element create symlink symlinked_items \ + -datatype integer \ + -widget checkbox + +set marked_item_size [multirow size marked_items] + +for { set i 1 } { $i <= $marked_item_size } { incr i } { + set title [multirow get marked_items $i title] + set name [multirow get marked_items $i name] + set item_id [multirow get marked_items $i item_id] + + set element_name_1 "name_$item_id" + set element_name_2 "title_$item_id" + + element create symlink $element_name_1 \ + -datatype keyword \ + -widget text \ + -value $name + + element create symlink $element_name_2 \ + -datatype text \ + -widget text \ + -value $title + +} + + + + + +if { [form is_valid symlink] } { + + set user_id [User::getID] + set ip [ns_conn peeraddr] + + form get_values symlink id mount_point + set symlinked_items [element get_values symlink symlinked_items] + + set db [template::begin_db_transaction] + + foreach sym_item_id $symlinked_items { + set element_name_1 "name_$sym_item_id" + set element_name_2 "title_$sym_item_id" + + set name [element get_values symlink $element_name_1] + set label [lindex [element get_values symlink $element_name_2] 0] + + set sql " + begin + :symlink_id := content_symlink.new( + name => :name, + label => :label, + target_id => :sym_item_id, + parent_id => :folder_id, + creation_date => sysdate, + creation_user => :user_id, + creation_ip => :ip + ); + end;" + + if { [catch {ns_ora exec_plsql_bind $db $sql symlink_id} errmsg] } { + # possibly a duplicate name + ns_log notice "symlink.tcl - while symlinking $errmsg" + } + + } + + + template::end_db_transaction + template::release_db_handle + + clipboard::free $clip + + + # flush folder listing cache + cms_folder::flush $mount_point $folder_id + + + # Specify a null id so that the entire branch will be refreshed + forward "refresh-tree?goto_id=$folder_id&id=$folder_id&mount_point=$mount_point"\ +} Index: openacs-4/packages/cms/www/modules/sitemap/type-register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/type-register.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/type-register.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,30 @@ +# register content types from clipboard to a folder + +request create +request set_param folder_id -datatype integer + + +set clip [clipboard::parse_cookie] +set marked_types [clipboard::get_items $clip "types"] + +set sql "begin + content_folder.register_content_type( + folder_id => :folder_id, + content_type => :type, + include_subtypes => 'f' + ); + end;" + +set db [template::begin_db_transaction] +foreach type $marked_types { + + ns_ora dml $db $sql +} +template::end_db_transaction +template::release_db_handle + +cms_folder::flush_registered_types $folder_id + +clipboard::free $clip + +forward "attributes?folder_id=$folder_id" Index: openacs-4/packages/cms/www/modules/sitemap/type-unregister.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/type-unregister.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/sitemap/type-unregister.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,23 @@ +# unregister a content type to a folder + +request create +request set_param folder_id -datatype keyword +request set_param type_key -datatype keyword + + +set sql "begin + content_folder.unregister_content_type( + folder_id => :folder_id, + content_type => :type_key, + include_subtypes => 'f' + ); + end;" + +set db [template::begin_db_transaction] +ns_ora dml $db $sql +template::end_db_transaction +template::release_db_handle + +cms_folder::flush_registered_types $folder_id + +forward "attributes?folder_id=$folder_id" Index: openacs-4/packages/cms/www/modules/templates/assets.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/assets.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,89 @@ + + This template has no revisions yet + + + + This template has no body yet + + + + + This template contains no assets + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      #  Source Filename  Width  Height  Alt Text  Exists ?  Title  Publish Status  
      @assets.rownum@ @assets.src@  + + @assets.width@ + + @assets.width@ +   + + @assets.height@ + + @assets.height@ +  @assets.alt@  + + No + + + + Yes + + + @assets.missing_files@ + + +   + @assets.title@ +  @assets.status@  + Not managed by CMS +
      + +
      + +
      +
      +
      \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/assets.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/assets.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,112 @@ +# Regexp out all the tags. Determine whether the image files +# exist, and whether they reference CMS items. + +request create +request set_param template_id -datatype integer + +### Load the template ADP file + +set template_revision [item::get_best_revision $template_id] +if { [template::util::is_nil template_revision] } { + set template_exists f + return +} + +set template_exists t + +set text [content::get_content_value $template_revision] +if { [template::util::is_nil text] } { + set body_exists f + return +} + +set body_exists t + +# Get page root for checking whether images exist +set page_root [publish::get_page_root] + +### Parse the file for tags, stick the result into a +### multirow datasource +set columns [list src width height alt exists_some missing_some \ + missing_files item_id title status auto_width auto_height] + +eval multirow create assets $columns + +while { \ + [regexp -nocase -- {< *img +([^>]+) *>(.*)} $text match img_body rest] \ +} { + + # Parse the tag + regexp -nocase -- {src *= *\"*([a-zA-Z0-9_/\.\-]+)\"*} $img_body match src + regexp -nocase -- {width *= *\"*([0-9]+)\"*} $img_body match width + regexp -nocase -- {height *= *\"*([0-9]+)\"*} $img_body match height + + # Try to get the alt with and without quotes + if { ![regexp -nocase -- {alt *= *\"([^\"]+)\"} $img_body match alt] } { + regexp -nocase -- {alt *= *([^ ]+)} $img_body match alt + } + + set auto_width f + set auto_height f + + if { ![template::util::is_nil src] } { + + # Detetmine all the publish roots where the src exists + set exists_some 0 + set missing_some 0 + publish::foreach_publish_path $src { + if { [file exists $filename] } { + set exists_some 1 + } else { + set missing_some 1 + append missing_files \ + "Missing from: $current_page_root
      " + } + } + + set item_id [item::get_id $src] + if { ![template::util::is_nil item_id] } { + set title [item::get_title $item_id] + set status [string totitle [item::get_publish_status $item_id]] + + # Get width/height if not specified in the tag + if { [template::util::is_nil width] || \ + [template::util::is_nil height] } { + set revision_id [item::get_best_revision $item_id] + template::query image_info onerow " + select width, height from images + where image_id = :revision_id + " -cache "image_width_height $revision_id" + + if { [template::util::is_nil width] } { + set width $image_info(width) + set auto_width t + } + + if { [template::util::is_nil height] } { + set height $image_info(height) + set auto_height t + } + } + } + } + + # Append the columns to the multirow datasource + set code [list template::multirow append assets] + + foreach column $columns { + if { [template::util::is_nil $column] } { + lappend code "-" + } else { + lappend code [set $column] + } + + # Clear the variable for next iteration + set $column "" + } + + eval $code + + set text $rest +} + Index: openacs-4/packages/cms/www/modules/templates/clipboard.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/clipboard.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/clipboard.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        @prompt@  
          @templates.path@  
        + +
        No templates are currently on the +clipboard. Please mark one or more templates and try +again.  
      +
      Index: openacs-4/packages/cms/www/modules/templates/clipboard.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/clipboard.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/clipboard.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,21 @@ +set clipboard [clipboard::parse_cookie] + +set cookie [clipboard::parse_cookie] + +set in_list [join [clipboard::get_items $cookie templates] ","] + +set template_count [llength $in_list] + +if { $template_count > 0 } { + + set query "select + template_id, content_item.get_path(template_id) path + from + cr_templates + where + template_id in ($in_list)" + + query templates multirow $query +} + +set return_url [ns_set iget [ns_conn headers] Referer] \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/copy.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/copy.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/copy.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,82 @@ + + + + +Copy Templates + + + + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + +
       Copy Templates
      +
      + + + +
      + +
      + + + + Index: openacs-4/packages/cms/www/modules/templates/copy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/copy.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/copy.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,32 @@ +request create -params { + folder_id -datatype integer +} + +if { ! [request is_valid] } { return } + +set submit [ns_queryget submit] + +if { ! [string equal $submit {}] } { + + if { $submit == "Copy" } { + + set db [begin_db_transaction] + set creation_user [User::getID] + set creation_ip [ns_conn peeraddr] + + foreach template_id [ns_querygetall template_id] { + ns_ora dml $db "declare copy_id integer; begin + copy_id := content_item.copy2( + :template_id, :folder_id, :creation_user, :creation_ip + ); + insert into cr_templates (template_id) values (copy_id); + end;" + } + + end_db_transaction + } + + template::forward [ns_queryget return_url] +} + +query path onevalue "select content_item.get_path(:folder_id) from dual" \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/datasources.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/datasources.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/datasources.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,80 @@ + + This template does not exist. + + + + The code for this template does not exist. + + + + There are no known data sources in this template. + + + + + + +
      + + + + + + + + + + + + + + + + + + + +
      #  Name  Type  Comments  
      @datasources.rownum@ @datasources.name@ @datasources.structure@  + + @datasources.comment@ + @datasources.comment@ + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      ColumnComment
      @datasources.column_name@@datasources.column_comment@
      NameTypeComment
      @datasources.input_name@@datasources.input_type@@datasources.input_comment@
      +
      +
      +
       
      + +
      +
      +
      +
      Index: openacs-4/packages/cms/www/modules/templates/datasources.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/datasources.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/datasources.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,97 @@ +# Load the TCL file for the template and parse out the datasource +# documentation + +request create +request set_param template_id -datatype integer + +# Get the name for the template's TCL file +set url [item::get_url $template_id] + +if { [template::util::is_nil url] } { + set template_exists f + return +} + +set template_exists t + +set tcl_stub "${url}.tcl" + +# In the future, we may have many roots ! +set template_root [publish::get_template_root] +set tcl_file [ns_normalizepath "/$template_root/${url}.tcl"] + +# Load and process the file +if { ![file exists $tcl_file] } { + set file_exists f + set code_exists f + return +} + +set file_exists t +set code [template::util::read_file $tcl_file] + +if { [template::util::is_nil code] } { + set code_exists f +} + +set code_exists t + +set datasource_names [template::get_datasources $code] + +# Attempt to auto-generate any missing datasources +# NOTE: This should really be a proc (or multiple procs), but +# ATS is frozen now... + +upvar 0 "datasources:rowcount" rowcount + +# Concatenate split lines +regsub -all -- {\\\n} $code " " line_code + +set query_exp \ + {query +([a-zA-Z0-9_]+) +(onevalue|onelist|onerow|multirow) +[^ ]+} +set multi_exp \ + {multirow +create +([a-zA-Z0-9_]+) +(.*)} + +foreach line [split $line_code "\n"] { + + set name "" + + # Try looking for "query ..." or "multirow create..." + if { [regexp -nocase -- $query_exp $line match name type] } { + set cols [list "-"] + } elseif { [regexp -nocase -- $multi_exp $line match name cols] } { + set type "multirow" + } + + # If found, try to add the datasource + if { ![template::util::is_nil name] } { + + # See if the datasource exists already + set found 0 + for { set j 1} { $j <= $rowcount } { incr j } { + template::multirow get datasources $j + if { [string equal $datasources(name) $name] } { + set found 1 + break + } + } + + # If the datasource does not exist, add it + if { !$found } { + foreach col $cols { + incr rowcount + upvar 0 "datasources:$rowcount" datasources + set datasources(rownum) $rowcount + set datasources(name) $name + set datasources(structure) $type + set datasources(comment) "Auto-generated from query" + set datasources(is_auto) t + set datasources(column_name) $col + set datasources(column_comment) "unknown" + set datasources(input_name) $col + set datasources(input_type) "unknown" + set datasources(input_comment) "unknown" + } + } + } +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/delete.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/delete.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,84 @@ + + + + +Delete Templates + + + + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + +
       Delete Templates
      +
      + + + +
      + +
      + + + + + + Index: openacs-4/packages/cms/www/modules/templates/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/delete.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,26 @@ +request create -params { + folder_id -datatype integer +} + +if { ! [request is_valid] } { return } + +# check for a submission + +set submit [ns_queryget submit] + +if { ! [string equal $submit {}] } { + + if { $submit == "Delete" } { + + set db [begin_db_transaction] + + foreach template_id [ns_querygetall template_id] { + ns_ora dml $db "begin content_template.delete(:template_id); end;" + } + + end_db_transaction + } + + template::forward [ns_queryget return_url] +} + Index: openacs-4/packages/cms/www/modules/templates/download.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/download.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/download.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,18 @@ +request create -params { + template_id -datatype integer + edit_revision -datatype integer -optional +} + +if { ! [request is_valid] } { return } + +if { [string equal $edit_revision {}] } { + + set edit_revision [content::get_latest_revision $template_id] +} + +set text [content::get_content_value $edit_revision] + +ns_return 200 text/plain $text + + + Index: openacs-4/packages/cms/www/modules/templates/edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/edit.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,97 @@ + + + + +Edit Template + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + + + +
      Edit Template: @path@
      +
        
        Output Type: + +
        Create new revision: + + @formgroup.widget@ @formgroup.label@ + +
      +   + +
      +
      + + + + Index: openacs-4/packages/cms/www/modules/templates/edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/edit.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,112 @@ +request create -params { + template_id -datatype integer + edit_revision -datatype integer -optional +} + +if { ! [request is_valid] } { return } + +query path onevalue " + select content_item.get_path(:template_id) from dual" + +form create edit_template -html { enctype multipart/form-data } + +element create edit_template return_url -datatype url -widget hidden + +element create edit_template template_id -datatype integer \ + -value $template_id -widget hidden + +element create edit_template revision_id -datatype integer -widget hidden + +element create edit_template content -widget textarea -label {} \ + -datatype text -html { cols 80 rows 30 } template + +query mime_types multilist " + select label, m.mime_type from cr_mime_types m, cr_content_mime_type_map t + where t.content_type = 'content_template' and t.mime_type = m.mime_type" + +element create edit_template mime_type -widget select -label "Template Type" \ + -datatype text -options $mime_types + +element create edit_template is_update -widget radio -optional \ + -label "Create New Revision" -datatype keyword \ + -options { {"Yes" "t" } { "No" "f" } } -value "f" + + + + + + +if { [form is_request edit_template] } { + + element set_value edit_template revision_id [content::get_object_id] + + if { [string equal $edit_revision {}] } { + + set edit_revision [content::get_latest_revision $template_id] + } + + # if a revision exists, display it + if { ![template::util::is_nil edit_revision] } { + + # can't update an existing revision if there is none + element set_properties edit_template is_update -values t + + element set_value edit_template content \ + [content::get_content_value $edit_revision] + + query mime_type onevalue " + select mime_type from cr_revisions where revision_id = :edit_revision" + + element set_value edit_template mime_type $mime_type + } + + set return_url [ns_set iget [ns_conn headers] Referer] + element set_value edit_template return_url $return_url + +} else { + + set return_url [element get_value edit_template return_url] +} + + +if { [string equal [ns_queryget action] "Cancel"] } { + template::forward $return_url +} + + + + + + + + + + +if { [form is_valid edit_template] } { + + form get_values edit_template template_id revision_id is_update mime_type + + set tmpfile [content::prepare_content_file edit_template] + + query revision_count onevalue " + select count(revision_id) from cr_revisions where item_id = :template_id" + + if { $revision_count == 0 } { + set is_update t + } + + if { [string equal $is_update "t"] } { + + content::add_basic_revision $template_id $revision_id "Template" \ + -tmpfile $tmpfile -mime_type $mime_type + + } else { + + set revision_id [content::get_latest_revision $template_id] + content::update_content_from_file $revision_id $tmpfile + } + + template::forward $return_url +} + + Index: openacs-4/packages/cms/www/modules/templates/general.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/general.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/general.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ +

      Edit this template in the browser.

      + +

      Save the latest version of this template to a file.

      + +

      Upload a new version of this template.

      \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,170 @@ + + + + +Template Browser + + + + + + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + + + + + + +
      Create New TemplateCreate New FolderMove Marked ItemsCopy Marked ItemsDelete Marked Items
      +
      + + + + + + + +
       Folder:
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Mark     Name                      Size  Modified  Edit  Upload
        @parent.label@ @parent.name@ - -    
        @folders.label@ @folders.name@ - @folders.modified@    
         @items.name@ @items.file_size@ @items.modified@  
      +
      + +
      + + + + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,108 @@ +# List the contents of a folder under in the template repository + +# Either a path or a folder ID may be passed to the page. + +request create -params { + id -datatype integer + path -datatype text +} + +set package_url [ad_conn package_url] +set clipboardfloats_p [clipboard::floats_p] + +# Tree hack +if { $id == [cm::modules::templates::getRootFolderID] } { + set refresh_id "" +} else { + set refresh_id $id +} + +if { ! [string equal $path {}] } { + + query id onevalue " + select + content_item.get_id(:path, content_template.get_root_folder) + from dual" + + if { [string equal $id {}] } { + + set msg "The requested folder $path does not exist." + request error invalid_path $msg + } +} else { + + if { [string equal $id {}] } { + query id onevalue " + select content_template.get_root_folder from dual" + } + + query path onevalue " + select content_item.get_path(:id) from dual" +} + +# query for the content type and redirect if a folder + +query type onevalue " + select content_type from cr_items where item_id = :id" + +if { [string equal $type content_template] } { + template::forward properties?id=$id +} + +# Query for the parent + +if { ! [string equal $path /] } { +query parent onerow " + select + f.folder_id, f.label, i.name, + to_char(o.last_modified, 'MM/DD/YY HH:MI AM') modified + from + cr_folders f, cr_items i, acs_objects o + where + i.item_id = (select parent_id from cr_items where item_id = :id) + and + i.item_id = f.folder_id + and + i.item_id = o.object_id" +} + +# Query folders first + +query folders multirow " + select + f.folder_id, f.label, i.name, + to_char(o.last_modified, 'MM/DD/YY HH:MI AM') modified + from + cr_folders f, cr_items i, acs_objects o + where + i.parent_id = :id + and + i.item_id = f.folder_id + and + i.item_id = o.object_id + order by + upper(f.label), upper(i.name)" + +# items in the folder + +query items multirow " + select + t.template_id, i.name, + to_char(o.last_modified, 'MM/DD/YY HH:MI AM') modified, + nvl(round(dbms_lob.getlength(r.content) / 1000), 0) || ' KB' as file_size + from + cr_templates t, cr_items i, acs_objects o, cr_revisions r + where + i.parent_id = :id + and + i.item_id = t.template_id + and + i.item_id = o.object_id + and + i.latest_revision = r.revision_id (+) + order by + upper(i.name)" + +# set a flag indicating whether the folder is empty + +set is_empty [expr ! ( ${items:rowcount} || ${folders:rowcount} )] \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/items.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/items.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/items.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +Not implemented yet. \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/move.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/move.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/move.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,82 @@ + + + + +Move Templates + + + + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + +
       Move Templates
      +
      + + + +
      + +
      + + + + Index: openacs-4/packages/cms/www/modules/templates/move.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/move.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/move.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,32 @@ +request create -params { + folder_id -datatype integer +} + +if { ! [request is_valid] } { return } + +set submit [ns_queryget submit] + +if { ! [string equal $submit {}] } { + + if { $submit == "Move" } { + + set db [begin_db_transaction] + set creation_user [User::getID] + set creation_ip [ns_conn peeraddr] + + foreach template_id [ns_querygetall template_id] { + ns_ora dml $db "begin + content_item.move( + :template_id, :folder_id + ); + end;" + } + + end_db_transaction + } + + template::forward [ns_queryget return_url] +} + +query path onevalue "select content_item.get_path(:folder_id) from dual" + Index: openacs-4/packages/cms/www/modules/templates/new-folder.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/new-folder.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/new-folder.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,118 @@ + + + + +New Folder + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + +
      + + + + + + + + +
        New Folder Parent Folder: @path@  
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Name:   +
      + @formerror.name@ +
      +    +
        Label:    
        Description:    
      +   + +
      + +
      +
      + + + + Index: openacs-4/packages/cms/www/modules/templates/new-folder.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/new-folder.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/new-folder.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,62 @@ +request create -params { + parent_id -datatype integer +} + +query path onevalue " + select content_item.get_path(:parent_id) from dual" + +form create new_folder -elements " + return_url -datatype url -widget hidden + folder_id -datatype integer -widget hidden + parent_id -datatype integer -widget hidden + name -datatype filename -html { size 40 } -label {Folder Name} + label -datatype text -html { size 40 } -optional + description -datatype text -widget textarea -optional \ + -html { rows 4 cols 40 } +" + +if { [form is_request new_folder] } { + + element set_value new_folder folder_id [content::get_object_id] + element set_value new_folder parent_id $parent_id + + set return_url [ns_set iget [ns_conn headers] Referer] + element set_properties new_folder return_url -value $return_url + +} else { + + set return_url [element get_value new_folder return_url] +} + +if { [string equal [ns_queryget action] "Cancel"] } { + template::forward $return_url +} + +if { [form is_valid new_folder] } { + + form get_values new_folder parent_id name folder_id label description + + set creation_ip [ns_conn peeraddr] + set creation_user [User::getID] + + set db [template::begin_db_transaction] + + set sql "begin :folder_id := content_folder.new( + folder_id => :folder_id, + name => :name, + label => :label, + description => :description, + parent_id => :parent_id, + creation_ip => :creation_ip, + creation_user => :creation_user + ); end;" + + ns_ora exec_plsql_bind $db $sql folder_id + + content::add_basic_revision $folder_id "" "Template" \ + -text "" + + template::end_db_transaction + + template::forward $return_url +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/new-template.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/new-template.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/new-template.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,90 @@ + + + + +New Template + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + + + +
      New Template Folder: @path@
      +
        Name:    
        Output Type:    
      +   + +
      +
      + + + + Index: openacs-4/packages/cms/www/modules/templates/new-template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/new-template.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/new-template.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,66 @@ +request create -params { + folder_id -datatype integer +} + +ns_log Notice "folder_id is $folder_id" + +query path onevalue " + select content_item.get_path(:folder_id) from dual" + +form create new_template -elements " + return_url -datatype url -widget hidden + template_id -datatype integer -widget hidden + folder_id -datatype integer -widget hidden + name -datatype filename -html { size 40 } +" + +query mime_types multilist " + select label, m.mime_type from cr_mime_types m, cr_content_mime_type_map t + where t.content_type = 'content_template' and t.mime_type = m.mime_type" + +element create new_template mime_type -widget select -label "Template Type" \ + -datatype text -options $mime_types + +if { [form is_request new_template] } { + + element set_value new_template template_id [content::get_object_id] + element set_value new_template folder_id $folder_id + + set return_url [ns_set iget [ns_conn headers] Referer] + element set_properties new_template return_url -value $return_url + +} else { + + set return_url [element get_value new_template return_url] +} + +if { [string equal [ns_queryget action] "Cancel"] } { + template::forward $return_url +} + +if { [form is_valid new_template] } { + + form get_values new_template template_id name folder_id mime_type + + set creation_ip [ns_conn peeraddr] + set creation_user [User::getID] + + set db [template::begin_db_transaction] + + set sql "begin :template_id := content_template.new( + template_id => :template_id, + name => :name, + parent_id => :folder_id, + creation_ip => :creation_ip, + creation_user => :creation_user + ); end;" + + ns_ora exec_plsql_bind $db $sql template_id + + content::add_basic_revision $template_id "" "Template" \ + -text "" -mime_type $mime_type + + template::end_db_transaction + + template::forward $return_url +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/properties.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/properties.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/properties.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,141 @@ + + + + +Template Properties + + + + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + + +
       Template:
      +
       
      + + + + + + + + + + + + + + + + + + +
         + + + + + + + + + + + + + + + + + + + + + + +
       @tabs.label@  @tabs.label@ 
      + + + + + +
      + +
        
        
         + + + +  
      + + + +
       
      + +
      + + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/properties.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/properties.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/properties.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,48 @@ +request create -params { + id -datatype integer + path -datatype text + tab -datatype keyword -value revisions +} + +if { ! [string equal $path {}] } { + + query id onevalue " + select + content_item.get_id(:path, content_template.get_root_folder) + from dual" + + if { [string equal $id {}] } { + + set msg "The requested folder $path does not exist." + request error invalid_path $msg + } + +} else { + + if { [string equal $id {}] } { + query id onevalue " + select content_template.get_root_folder from dual" + } + + query path onevalue " + select content_item.get_path(:id) from dual" +} + +# query for the content type and redirect if a folder + +query type onevalue " + select content_type from cr_items where item_id = :id" + +if { [string equal $type content_folder] } { + template::forward index?id=$id +} + +multirow create tabs label name +multirow append tabs General general +multirow append tabs History revisions +multirow append tabs {Data Sources} datasources +multirow append tabs Assets assets +multirow append tabs {Content Types} types +multirow append tabs {Content Items} items + +set tab_count [expr ${tabs:rowcount} * 2] \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/publish.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/publish.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/publish.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,36 @@ +request create -params { + revision_id -datatype integer +} + +set db [get_db_handle] + +# query for the path and ID of the template + +query info onerow " + select + content_item.get_path(item_id) path, item_id + from + cr_items + where item_id = ( + select item_id from cr_revisions where revision_id = :revision_id)" + +# write the template to the file system + +set text [content::get_content_value $revision_id] + +set path [content::get_template_path]/$info(path) + +util::write_file $path.adp $text + +# update the live revision + +set template_id $info(item_id) + +ns_ora dml $db "update cr_items set live_revision = :revision_id + where item_id = :template_id" + +release_db_handle + +set return_url [ns_set iget [ns_conn headers] Referer] +template::forward $return_url + Index: openacs-4/packages/cms/www/modules/templates/refresh-tree.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/refresh-tree.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/refresh-tree.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + + Index: openacs-4/packages/cms/www/modules/templates/refresh-tree.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/refresh-tree.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/refresh-tree.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,19 @@ +# Refresh the tree to show any new folders + +request create +request set_param id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value sitemap +request set_param goto_id -datatype keyword -optional +set user_id [User::getID] + +# Change the update time on the folder +refreshCachedFolder $user_id sitemap $id + +if { [template::util::is_nil goto_id] } { + set goto_id $id +} else { + refreshCachedFolder $user_id $mount_point $goto_id +} + + + Index: openacs-4/packages/cms/www/modules/templates/revisions.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/revisions.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/revisions.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,42 @@ + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      #  Size  Modified  Author  Comment  Publish  Revert  
      @revisions.revision_number@ @revisions.file_size@ @revisions.modified@ @revisions.modified_by@ @revisions.msg@   
      + +
      \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/revisions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/revisions.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/revisions.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,46 @@ +# template ID is passed to included template + +query live_revision onevalue " + select live_revision from cr_items where item_id = :template_id" + +# first count all revisions + +set query " + select + count(*) + from + cr_revisions + where + item_id = :template_id" + +query revision_count onevalue $query + +set counter $revision_count + +set query " + select + revision_id, + to_char(o.creation_date, 'MM/DD/YY HH:MI AM') modified, + round(dbms_lob.getlength(r.content) / 1000) || ' KB' as file_size, + decode(NVL(p.person_id, 0), + 0, '-', + substr(p.first_names, 1, 1) || substr(p.last_name, 1, 1)) modified_by, + nvl(j.msg, '-') msg + from + cr_revisions r, acs_objects o, persons p, journal_entries j + where + item_id = :template_id + and + o.object_id = r.revision_id + and + o.creation_user = p.person_id (+) + and + o.object_id = j.journal_id (+) + order by + o.creation_date desc" + + +query revisions multirow $query -maxrows 12 -eval { + set row(revision_number) $counter + incr counter -1 +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/template-create.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template-create.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/template-create.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +@page_title@ + +

      @page_title@

      + Index: openacs-4/packages/cms/www/modules/templates/template-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template-create.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/template-create.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,68 @@ +# /templates/template-create.tcl +# create a content_template + +request create +request set_param parent_id -datatype integer -optional + +# Cannot use -value due to negative values +if { [template::util::is_nil parent_id] } { + set parent_id [cm::modules::templates::getRootFolderID] +} + +query folder_name onevalue " + select name from cr_items where item_id = :parent_id" + +if { [util::is_nil folder_name] } { + set folder_name "/" +} + + +set page_title "Add a Template to $folder_name" + + +# Create a new item and an initial revision for a content item (generic) +form create create_template -elements { + template_id -datatype integer -widget hidden + parent_id -datatype integer -widget hidden -param -optional + name -datatype keyword -widget text -label "File Name" +} + +set parent_id [element get_value create_template parent_id] + +if { [form is_request create_template] } { + + # to avoid dupe submits + query template_id onevalue "select acs_object_id_seq.nextval from dual" + element set_properties create_template template_id -value $template_id +} + + +if { [form is_valid create_template] } { + + form get_values create_template name parent_id template_id + set user_id [User::getID] + set ip_address [ns_conn peeraddr] + + if { [util::is_nil parent_id] } { + set parent_id [cm::modules::templates::getRootFolderID] + } + + + set db [template::begin_db_transaction] + + ns_ora exec_plsql_bind $db "begin + :ret_val := content_template.new( + template_id => :template_id, + name => :name, + parent_id => :parent_id, + creation_user => :user_id, + creation_ip => :ip_address + ); + end;" ret_val + + template::end_db_transaction + template::release_db_handle + + template::forward ../templates/template?template_id=$template_id +} + Index: openacs-4/packages/cms/www/modules/templates/template-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/template-delete.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,45 @@ +# templates/template-delete.tcl +# Delete a template +# throw an error if the template has child items + +template::request create +template::request set_param template_id -datatype keyword +template::request set_param parent_id -datatype keyword -optional + + +# Determine if the item has subitems is empty +query empty_p onevalue " + select 't' from dual + where not exists ( + select + 1 + from + cr_templates t, acs_objects o + where + o.object_id = t.template_id + and + o.context_id = :template_id + and not exists (select 1 from cr_revisions + where revision_id = t.template_id)) +" + +# If nonempty, show error +if { [template::util::is_nil empty_p] } { + set message "This item contains subitems and cannot be deleted" + set return_url "modules/templates/index" + set passthrough [list [list id $template_id] [list parent_id $parent_id]] + template::redirect "../../../error?message=$message&return_url=$return_url&passthrough=$passthrough" +} else { + # Otherwise, delete the item + + set db [template::begin_db_transaction] + template::query delete_template dml " + begin + content_template.delete(:template_id); + end;" + template::end_db_transaction + template::release_db_handle + + template::forward "../templates/index?id=" +} + Index: openacs-4/packages/cms/www/modules/templates/template.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/template.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,97 @@ + +Content Template + + + + + + +
      + + + + + @context.title@ + : + +@path@
      + + +

      + + + This template is not registered to any content items.

      + + + + + + + + +
      Registered Content Items
      + + + + + + + + + + + + + + + + + +
      TitleContext 
      @items.title@@items.use_context@ + Unregister +
      +
      + +
      + +

      + + + + This template is not registered to any content types.

      + + + + + + + + +
      Registered Content Types
      + + + + + + + + + + + + + + + + + +
      Content TypeContext 
      @types.pretty_name@@types.use_context@ + Unregister +
      + +
      +
      + +

      +Rename this template
      +Delete this template Index: openacs-4/packages/cms/www/modules/templates/template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/template.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,89 @@ +# /cms/modules/templates/template.tcl + +# Assemble information for a content item. Note this page is only +# appropriate for revisioned content items. Non-revisioned content +# items (symlinks, extlinks and folders) have separate admin pages + +# Most information on this page is included via components. + +# The mount_point is used to determine the proper root context +# when querying the path to the item. + +request create -params { + template_id -datatype integer +} + +# The root ID is to determine the appropriate path to the item +set root_id [cm::modules::templates::getRootFolderID] + +set db [template::get_db_handle] + +# resolve any symlinks +template::query resolved_template_id onevalue " + select content_symlink.resolve(:template_id) from dual +" + +set template_id $resolved_template_id + +# get the path +template::query path onevalue " + select content_item.get_path(:template_id, :root_id) from dual +" + +# check for valid template_id +if { [template::util::is_nil path] } { + template::release_db_handle + ns_log Notice "/templates/template.tcl - BAD TEMPLATE_ID - $template_id" + template::forward "../sitemap/index?mount_point=templates&id=" +} + + +# get the context bar info +set query "select + t.tree_level, t.context_id, content_item.get_title(t.context_id) as title + from ( + select + context_id, level as tree_level + from + acs_objects + where + context_id <> 0 + connect by + prior context_id = object_id + start with + object_id = :template_id + ) t, cr_items i + where + i.item_id = t.context_id + order by + tree_level desc" + +template::query context multirow $query + + +# find out which items this template is registered to +template::query items multirow " + select + content_item.get_title(item_id) title, item_id, use_context + from + cr_item_template_map + where + template_id = :template_id + order by + use_context" + + +# find out which types this template is registered to +template::query types multirow " + select + pretty_name, content_type, use_context + from + acs_object_types types, cr_type_template_map map + where + map.template_id = :template_id + and + types.object_type = map.content_type + order by + types.pretty_name" + +template::release_db_handle \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/types.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/types.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/types.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +Not implemented yet. \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/upload.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/upload.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/upload.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,88 @@ + + + + +Upload Template + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + + + +
      Upload Template: @path@
      +
          
      +   + +
      +
      + + + + Index: openacs-4/packages/cms/www/modules/templates/upload.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/upload.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/templates/upload.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,51 @@ +request create -params { + template_id -datatype integer +} + +if { ! [request is_valid] } { return } + +query path onevalue " + select content_item.get_path(:template_id) from dual" + +form create edit_template -html { enctype multipart/form-data } + +element create edit_template return_url -datatype url -widget hidden + +element create edit_template template_id -datatype integer \ + -value $template_id -widget hidden + +element create edit_template revision_id -datatype integer -widget hidden + +element create edit_template content -widget file -label Local File \ + -datatype text -html { size 50 } + +if { [form is_request edit_template] } { + + element set_properties edit_template revision_id \ + -value [content::get_object_id] + + set return_url [ns_set iget [ns_conn headers] Referer] + element set_properties edit_template return_url -value $return_url + +} else { + + set return_url [element get_value edit_template return_url] +} + +if { [string equal [ns_queryget action] "Cancel"] } { + template::forward $return_url +} + +if { [form is_valid edit_template] } { + + form get_values edit_template template_id revision_id + + set tmpfile [content::prepare_content_file edit_template] + + content::add_basic_revision $template_id $revision_id "Template" \ + -tmpfile $tmpfile + + template::forward $return_url +} + + Index: openacs-4/packages/cms/www/modules/templates/assets/Edit16.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/Edit16.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/Edit24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/Edit24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/Export16.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/Export16.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/Export24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/Export24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/Import16.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/Import16.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/Import24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/Import24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/Undo16.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/Undo16.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/Up16.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/Up16.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/Up24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/Up24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/back-down.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/back-down.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/back-over.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/back-over.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/back-up.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/back-up.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/checked.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/checked.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/copy-down.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/copy-down.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/copy-over.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/copy-over.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/copy-up.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/copy-up.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/delete-down.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/delete-down.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/delete-over.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/delete-over.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/delete-up.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/delete-up.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/folder.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/folder.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/gray-dot.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/gray-dot.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/light-gray-dot.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/light-gray-dot.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/move-down.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/move-down.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/move-over.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/move-over.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/move-up.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/move-up.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/multirow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/multirow.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/new-folder-down.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/new-folder-down.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/new-folder-over.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/new-folder-over.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/new-folder-up.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/new-folder-up.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/new-template-down.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/new-template-down.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/new-template-over.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/new-template-over.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/new-template-up.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/new-template-up.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/onerow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/onerow.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/onevalue.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/onevalue.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/template.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/template.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/toolbar-separator.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/toolbar-separator.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/unchecked.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/unchecked.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/vertical-bar.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/vertical-bar.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/templates/assets/white-dot.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/assets/white-dot.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/modules/types/content-method-set-default.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method-set-default.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/content-method-set-default.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,33 @@ +# /cms/www/modules/types/content-method-set-default.tcl +# +# Set the default content insertion method for a content type + + +request create +request set_param content_type -datatype keyword +request set_param content_method -datatype keyword +request set_param return_url -datatype text -value "" + +# default return_url +if { [template::util::is_nil return_url] } { + set return_url "index?id=$content_type" +} + + +set db [template::begin_db_transaction] + +template::query set_content_method_default dml " + begin + content_method.set_default_method ( + content_type => :content_type, + content_method => :content_method + ); + end; +" + +template::end_db_transaction +template::release_db_handle + +content_method::flush_content_methods_cache $content_type + +template::forward $return_url \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/content-method-unregister.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method-unregister.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/content-method-unregister.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,32 @@ +# /cms/www/modules/types/content-method-unregister.tcl +# +# Unregister a content method from a content type + + +request create +request set_param content_type -datatype keyword +request set_param content_method -datatype keyword +request set_param return_url -datatype text -value "" + +# default return_url +if { [template::util::is_nil return_url] } { + set return_url "index?id=$content_type" +} + + +set db [template::begin_db_transaction] + +template::query content_method_unregister dml " + begin + content_method.remove_method ( + content_type => :content_type, + content_method => :content_method + ); + end; +" + +template::end_db_transaction +template::release_db_handle + + +template::forward $return_url \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/content-method-unset-default.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method-unset-default.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/content-method-unset-default.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,32 @@ +# /cms/www/modules/types/content-method-unset-default.tcl +# +# Unset the default content insertion method for a given content type + + +request create +request set_param content_type -datatype keyword +request set_param return_url -datatype text -value "" + +# default return_url +if { [template::util::is_nil return_url] } { + set return_url "index?id=$content_type" +} + + +set db [template::begin_db_transaction] + +template::query unset_content_method_default dml " + begin + content_method.unset_default_method ( + content_type => :content_type + ); + end; +" + +template::end_db_transaction +template::release_db_handle + +content_method::flush_content_methods_cache $content_type + + +template::forward $return_url \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/content-method.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/content-method.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + +
      + + +
      + Register Content Insertion Method:   + + +   + +
      +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + There are no content methods registered to this content type. + By default, all content methods will be available to this + content type. +
      Content MethodDescriptionIs Default? 
      @content_methods.label@@content_methods.description@ + YesNo + + + + [ + + Unset default + + + Set as default + + | + Unregister + ] + +   +
      +
      + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/content-method.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/content-method.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,125 @@ +request create +request set_param content_type -datatype keyword -value content_revision +request set_param return_url -datatype text -value "" + +# permissions check - user must have cm_examine on the types module +set types_module_id [cm::modules::get_module_id types] +content::check_access $types_module_id cm_examine -user_id [User::getID] + +# default return_url +if { [template::util::is_nil return_url] } { + set return_url "index?id=$content_type" +} + +set db [template::get_db_handle] + +# fetch the content methods registered to this content type +template::query content_methods multirow " + select + m.content_method, label, is_default, description + from + cm_content_type_method_map map, cm_content_methods m + where + m.content_method = map.content_method + and + map.content_type = :content_type + order by + is_default desc, label +" + + +# text_entry content method filter +# don't show text entry if a text mime type is not registered to the item +template::query has_text_mime_type onevalue " + select + count( mime_type ) + from + cr_content_mime_type_map + where + mime_type like ('%text/%') + and + content_type = :content_type +" + +if { $has_text_mime_type == 0 } { + set text_entry_filter_sql "and content_method ^= 'text_entry'" +} else { + set text_entry_filter_sql "" +} + + +# fetch the content methods not register to this content type +template::query unregistered_content_methods multilist " + select + label, m.content_method + from + cm_content_methods m + where + not exists ( + select 1 + from + cm_content_type_method_map + where + content_method = m.content_method + and + content_type = :content_type ) + $text_entry_filter_sql + order by + label +" + +set unregistered_method_count [llength $unregistered_content_methods] + +template::release_db_handle + + + +# form to register unregistered content methods to this content type +form create register + +element create register content_type \ + -datatype keyword \ + -widget hidden \ + -value $content_type + +element create register return_url \ + -datatype text \ + -widget hidden \ + -value $return_url + +element create register content_method \ + -datatype keyword \ + -widget select \ + -options $unregistered_content_methods + +element create register submit \ + -datatype keyword \ + -widget submit \ + -label "Register" + + + +if { [form is_valid register] } { + + form get_values register content_type content_method + + set db [template::begin_db_transaction] + + + template::query content_method_add dml " + begin + content_method.add_method ( + content_type => :content_type, + content_method => :content_method, + is_default => 'f' + ); + end; + " + + template::end_db_transaction + template::release_db_handle + + content_method::flush_content_methods_cache $content_type + + template::forward $return_url +} Index: openacs-4/packages/cms/www/modules/types/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,212 @@ + +@page_title@ + + + + + +

      @page_title@

      + + + + + + +
      + + Inheritance:  + + Basic Item + + + + : + + @content_type_tree.pretty_name@ + + + + @content_type_tree.pretty_name@ + + + + + + +   + Add this content type to the clipboard. +
      + +

      + + + +
      + + + + + +
      + + + + + +
      + + + +
      + + + + + + + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      This content type has no attributes.
      Attribute NameObject TypeData TypeWidget 
      @attribute_types.attribute_name_pretty@@attribute_types.pretty_name@@attribute_types.datatype@ + None + @attribute_types.widget@ + + + + + Register Widget + + + [ Edit Widget | + Unregister Widget ] + + +   + +   +
      + +

      + + +

      + + +

      + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + There are no templates registered to this content type. +
      Template NamePathContent TypeContext  
      @type_templates.name@@type_templates.path@@type_templates.pretty_name@@type_templates.use_context@ + Default + + + Make this the default + +   + + + + Unregister + +   +
      + +
      + +
      + +
      + +
      + +
      + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,143 @@ +# query for attributes of this subclass of content_revision and display them + +request create +request set_param id -datatype keyword -value content_revision +request set_param parent_id -datatype keyword -optional +request set_param mount_point -datatype keyword -value types +request set_param refresh_tree -datatype keyword -optional -value t + +# Tree hack +if { [string equal $id content_revision] } { + set refresh_id "" +} else { + set refresh_id $id +} + +set content_type $id +set user_id [User::getID] +set root_id [cm::modules::templates::getRootFolderID] + +set db [template::get_db_handle] + +query module_id onevalue " + select module_id from cm_modules where key = 'types' +" + +content::check_access $module_id cm_examine -user_id $user_id -db $db + +set can_edit_widgets $user_permissions(cm_write) + + +# get the content type pretty name +query object_type_pretty onevalue " + select + pretty_name + from + acs_object_types + where + object_type = :content_type +" + + +if { [string equal $object_type_pretty ""] } { + # error - invalid content_type + template::release_db_handle + template::forward index +} + + +# get all the content types that this content type inherits from +query content_type_tree multirow " + select + decode (supertype, 'acs_object', '', supertype) as parent_type, + decode (object_type, 'content_revision', '', object_type) as object_type, + pretty_name + from + acs_object_types + where + object_type ^= 'acs_object' + connect by + object_type = prior supertype + start with + object_type = :content_type + order by + rownum desc +" + +# get all the attribute properties for this object_type +query attribute_types multirow " + select + attr.attribute_id, attr.attribute_name, attr.object_type, + attr.pretty_name as attribute_name_pretty, + datatype, types.pretty_name as pretty_name, + nvl(description_key,' ') as description_key, + description, widget + from + acs_attributes attr, acs_attribute_descriptions d, + cm_attribute_widgets w, + ( select + object_type, pretty_name + from + acs_object_types + where + object_type ^= 'acs_object' + connect by + prior supertype = object_type + start with + object_type = :content_type + ) types + where + attr.object_type = types.object_type + and + attr.attribute_id = w.attribute_id(+) + and + attr.attribute_name = d.attribute_name(+) + order by + types.object_type, sort_order, attr.attribute_name +" + +# get template information +query type_templates multirow " + select + template_id, ttmap.content_type, use_context, is_default, name, + content_item.get_path( + template_id,:root_id) as path, + (select pretty_name + from acs_object_types + where object_type = :content_type) pretty_name + from + cr_type_template_map ttmap, cr_items i + where + i.item_id = ttmap.template_id + and + ttmap.content_type = :content_type + order by + upper(name) +" + +template::release_db_handle + +set page_title "Content Type - $object_type_pretty" + +# for the permissions include +set return_url [ns_conn url] +set passthrough [content::assemble_passthrough return_url mount_point id] + +# for templates table +if { [string equal $user_permissions(cm_write) t] } { + set footer " + Register marked templates to this content type" +} else { + set footer "" +} + +# Create the tabbed dialog +set url [ns_conn url] +append url "?id=$id&mount_point=$mount_point&parent_id=$parent_id&refresh_tree=f" + +template::tabstrip create type_props -base_url $url +template::tabstrip add_tab type_props attributes "Attributes and Uploads" attributes +template::tabstrip add_tab type_props relations "Relation Types" relations +template::tabstrip add_tab type_props templates "Templates" templates +template::tabstrip add_tab type_props permissions "Permissions" permissions + Index: openacs-4/packages/cms/www/modules/types/mime-types.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/mime-types.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/mime-types.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,63 @@ + +

      + + + + + + + + + + + + + +
      + + +
      + Register MIME type:   + + + + +
      +
      +
      + + + + + + + + + + + + + + + + + + + + + +
      + There are no MIME types registered to this content type. +
      Registered MIME Types 
      @registered_mime_types.label@ + + Unregister + +   +
      + + +
      + +

      + + Index: openacs-4/packages/cms/www/modules/types/mime-types.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/mime-types.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/mime-types.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,112 @@ +# /types/register-mime-types.tcl +# A form for registering mime types to a content type + + +request create +request set_param content_type -datatype keyword -value 'content_revision' + +set db [template::get_db_handle] + +query module_id onevalue " + select module_id from cm_modules where key = 'types' +" + +# permissions check - must have cm_examine +content::check_access $module_id cm_examine -user_id [User::getID] + +template::query content_type_name onevalue " + select + pretty_name + from + acs_object_types + where + object_type = :content_type +" + +template::query unregistered_mime_types multilist " + select + label, mime_type + from + cr_mime_types + where + not exists ( select 1 + from + cr_content_mime_type_map + where + mime_type = cr_mime_types.mime_type + and + content_type = :content_type ) + order by + label +" + +set unregistered_mime_types_count [llength $unregistered_mime_types] + +if { [template::util::is_nil content_type_name] } { + template::release_db_handle + ns_log Notice \ + "register-mime-types.tcl - ERROR: BAD CONTENT_TYPE - $content_type" + template::forward "index?id=content_revision" +} + +set db [template::get_db_handle] + +template::query registered_mime_types multirow " + select + label, m.mime_type + from + cr_mime_types m, cr_content_mime_type_map map + where + m.mime_type = map.mime_type + and + map.content_type = :content_type + order by + label +" + +template::release_db_handle + + +set page_title "Register MIME types to $content_type_name" + + +form create register +#-action "mime-types" + +element create register id \ + -datatype keyword \ + -widget hidden \ + -value $content_type + +element create register content_type \ + -datatype keyword \ + -widget hidden \ + -value $content_type + +element create register mime_type \ + -datatype text \ + -widget select \ + -label "Register MIME Types" \ + -options $unregistered_mime_types + + + +if { [form is_valid register] } { + form get_values register content_type mime_type + set db [template::begin_db_transaction] + + template::query register_mime_type dml " + begin + content_type.register_mime_type ( + content_type => :content_type, + mime_type => :mime_type + ); + end;" + + template::end_db_transaction + ns_db releasehandle $db + + content_method::flush_content_methods_cache $content_type + + template::forward "index?id=$content_type" +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/register-templates.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/register-templates.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/register-templates.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,17 @@ + +@page_title@ + +

      @page_title@

      + + + This is an invalid content type.

      + + + + There are no templates in the clipboard. + + + + + +

      Index: openacs-4/packages/cms/www/modules/types/register-templates.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/register-templates.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/register-templates.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,170 @@ +# query for attributes of this subclass of content_revision +# and display them + +request create +request set_param content_type -datatype keyword + + +# get the content type pretty name +query object_type_pretty onevalue " + select + pretty_name + from + acs_object_types + where + object_type = :content_type" + +set invalid_content_type_p f +if { [string equal $object_type_pretty ""] } { + set invalid_content_type_p t +} + + + +# in addition to the template_count and content_type +# this form will contain 2 elements for each template +# found on the clipboard +form create register_templates + +element create register_templates content_type \ + -datatype keyword \ + -widget hidden \ + -param + + + +# grab marked templates from the clipboard +#set root_id [cm::modules::templates::getRootFolderID] +set clip [clipboard::parse_cookie] +set marked_templates [clipboard::get_items $clip templates] +set marked_templates_csv [join $marked_templates ","] + +if { [llength $marked_templates] == 0 } { + set marked_templates_sql "1 = 0" +} else { + set marked_templates_sql "t.template_id in ($marked_templates_csv)" +} + +# make sure we only get content templates (not folders, symlinks, +# etc.) that aren't already registered to this content type +query only_marked_templates multilist " + select + template_id, + content_item.get_path( template_id, content_template.get_root_folder ) + as name + from + cr_templates t, cr_items i + where + t.template_id = i.item_id + and not exists ( + select 1 + from + cr_type_template_map + where + template_id = t.template_id + and + content_type = :content_type ) + and + $marked_templates_sql" + + +set template_count [llength $only_marked_templates] + +element create register_templates template_count \ + -datatype integer \ + -widget hidden \ + -value $template_count + + +if { $template_count > 0 } { + + # for the context pick list(s) + query cr_use_contexts multilist " + select use_context, use_context + from cr_template_use_contexts + order by 1" +} + + + +# generate form elements for each marked template +# ==> template_id, context +set counter 1 +foreach temp $only_marked_templates { + + # append _# to each of the form element name tags, to + # distinguish between the different templates + set temp_name "template_name_$counter" + set id_name "template_id_$counter" + set context_name "context_$counter" + + set t_id [lindex $temp 0] + set t_name [lindex $temp 1] + + element create register_templates $temp_name \ + -datatype text \ + -widget inform \ + -label "Template" \ + -value "/$t_name" + + element create register_templates $id_name \ + -datatype integer \ + -widget hidden \ + -value $t_id + + element create register_templates $context_name \ + -datatype keyword \ + -widget select \ + -label "Context" \ + -options $cr_use_contexts \ + -values public + + incr counter +} + + + +set page_title "Register Templates for Content Type - $object_type_pretty" + + + + + + + + + +if { [form is_valid register_templates] } { + + form get_values register_templates \ + template_count content_type + + # get the variable number of elements + for { set i 1 } { $i <= $template_count } { incr i } { + set id_name "template_id_$i" + set context_name "context_$i" + + form get_values register_templates \ + $id_name $context_name + + eval "set template_id $$id_name" + eval "set context $$context_name" + + set sql "begin + content_type.register_template( + content_type => :content_type, + template_id => :template_id, + use_context => :context ); + end;" + + set db [template::begin_db_transaction] + template::query register_templates dml $sql + template::end_db_transaction + template::release_db_handle + + } + + + forward "index?id=$content_type" + +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/relation-register.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relation-register.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/relation-register.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +Register a @rel_type_pretty@ Relation Type to @pretty_name@ + +

      Register a @rel_type_pretty@ Relation Type to @pretty_name@

      + Index: openacs-4/packages/cms/www/modules/types/relation-register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relation-register.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/relation-register.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,130 @@ +request create +request set_param rel_type -datatype keyword +request set_param content_type -datatype keyword -value content_revision + +set db [template::get_db_handle] + +template::query module_id onevalue " + select module_id from cm_modules where key = 'types' +" + +# permissions check - must have cm_write on the types module +content::check_access $module_id cm_write -user_id [User::getID] + +form create relation -elements { + rel_type -datatype keyword -widget hidden -param + content_type -datatype keyword -widget hidden -param +} + +if { [string equal $rel_type item_rel] } { + set rel_type_pretty "Item" + set type_label "Related Object Type" + +} elseif { [string equal $rel_type child_rel] } { + set rel_type_pretty "Child" + set type_label "Child Content Type" + +} else { + template::release_db_handle + template::forward index?id=$content_type +} + +template::query pretty_name onevalue " + select + pretty_name + from + acs_object_types + where + object_type = :content_type +" + +template::query target_types multilist " + select + lpad(' ', level, '-') || pretty_name, object_type + from + acs_object_types + connect by + prior object_type = supertype + start with + object_type = 'content_revision' +" + +template::release_db_handle + + +element create relation target_type \ + -datatype keyword \ + -widget select \ + -options $target_types \ + -label $type_label + +element create relation relation_tag \ + -datatype text \ + -html { size 30 } \ + -label "Relation Tag" + +element create relation min_n \ + -datatype integer \ + -html { size 4 } \ + -label "Min Relations" + +element create relation max_n \ + -datatype integer \ + -html { size 4 } \ + -label "Max Relations (optional)" \ + -optional + + + + + + + + +if { [form is_valid relation] } { + form get_values relation \ + rel_type content_type target_type relation_tag min_n max_n + + # max_n should be null + if { [template::util::is_nil max_n] } { + set max_n "" + } + + if { [string equal $rel_type item_rel] } { + set sql " + begin + content_type.register_relation_type ( + content_type => :content_type, + target_type => :target_type, + relation_tag => :relation_tag, + min_n => :min_n, + max_n => :max_n + ); + end;" + + } elseif { [string equal $rel_type child_rel] } { + set sql " + begin + content_type.register_child_type ( + parent_type => :content_type, + child_type => :target_type, + relation_tag => :relation_tag, + min_n => :min_n, + max_n => :max_n + ); + end;" + } + + set db [template::begin_db_transaction] + + if { [catch {template::query register_rel_types dml $sql} errmsg] } { + template::release_db_handle + template::request::error register_relation_type \ + "Could not register relation type - $errmsg" + } + + template::end_db_transaction + template::release_db_handle + + template::forward "index?id=$content_type" +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/relation-unregister.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relation-unregister.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/relation-unregister.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,57 @@ +# relation-unregister.tcl +# Unregister a relation type from a content type +# @author Michael Pih + +request create +request set_param rel_type -datatype keyword -value item +request set_param content_type -datatype keyword +request set_param target_type -datatype keyword +request set_param relation_tag -datatype text -value "" + +set db [template::get_db_handle] + +template::query module_id onevalue " + select module_id from cm_modules where key = 'types' +" + +# permissions check - must have cm_write on the types module +content::check_access $module_id cm_write -user_id [User::getID] + +if { [string equal $rel_type child_rel] } { + + set sql " + begin + content_type.unregister_child_type( + parent_type => :content_type, + child_type => :target_type, + relation_tag => :relation_tag + ); + end;" + +} elseif { [string equal $rel_type item_rel] } { + + set sql " + begin + content_type.unregister_relation_type( + content_type => :content_type, + target_type => :target_type, + relation_tag => :relation_tag + ); + end;" + +} else { + # bad rel_type, don't do anything + template::release_db_handle + template::forward "index?id=$content_type" +} + + +if { [catch {ns_ora dml $db $sql} errmsg] } { + template::release_db_handle + template::request::error unregister_relation_type \ + "Could not unregister relation type - $errmsg" +} + +template::release_db_handle + +template::forward "index?id=$content_type" \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/relations.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relations.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/relations.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,130 @@ + + + + + + + + + + + + + +
      Registered Item Relation Types
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + There are no item relation types registered to this + content type. +
      Related Object TypeRelation TagMin RelationsMax Relations 
      @rel_types.pretty_name@@rel_types.relation_tag@ + 0 + @rel_types.min_n@ + + - + @rel_types.max_n@ + + + Unregister + +   +
      +
      + + Register a new item relation type +
      +

      + + + + + + + + + + + + + + + +
      Registered Child Relation Types
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + There are no child relation types registered to this + content type. +
      Child TypeRelation TagMin RelationsMax Relations 
      @child_types.pretty_name@@child_types.relation_tag@ + 0 + @child_types.min_n@ + + - + @child_types.max_n@ + + + Unregister + +   +
      +
      + + Register a new child relation type +
      +

      Index: openacs-4/packages/cms/www/modules/types/relations.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relations.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/relations.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,45 @@ +# relations.tcl +# display registered relation types +# @author Michael Pih + +request create +request set_param type -datatype integer -value content_revision + +set db [template::get_db_handle] + +template::query module_id onevalue " + select module_id from cm_modules where key = 'types' +" + +# permission check - must have cm_examine on types module +content::check_access $module_id cm_examine -user_id [User::getID] + + +template::query rel_types multirow " + select + pretty_name, target_type, relation_tag, min_n, max_n + from + cr_type_relations r, acs_object_types o + where + o.object_type = r.target_type + and + r.content_type = :type + order by + pretty_name, relation_tag +" + + +template::query child_types multirow " + select + pretty_name, child_type, relation_tag, min_n, max_n + from + cr_type_children c, acs_object_types o + where + c.child_type = o.object_type + and + c.parent_type = :type + order by + pretty_name, relation_tag +" + +template::release_db_handle Index: openacs-4/packages/cms/www/modules/types/set-default-template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/set-default-template.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/set-default-template.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,32 @@ +# /cms/www/modules/types/set-default-template.tcl +# Sets a template registered to a content type/context to be the default + + +request create +request set_param template_id -datatype integer +request set_param context -datatype keyword +request set_param content_type -datatype keyword +request set_param return_url -datatype text -optional + + +set db [template::begin_db_transaction] + + +# set the default template, automatically unsetting any preexisting default +template::query set_default_template dml " + begin + content_type.set_default_template( + template_id => :template_id, + content_type => :content_type, + use_context => :context ); + end;" + +template::end_db_transaction +template::release_db_handle + +# set the default return_url if none exists +if { [template::util::is_nil return_url] } { + set return_url "index?id=$content_type&mount_point=types" +} + +forward $return_url Index: openacs-4/packages/cms/www/modules/types/unregister-mime-type.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/unregister-mime-type.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/unregister-mime-type.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,31 @@ +# /types/unregister-mime-type.tcl +# Unregister a MIME type to a content type + + +request create +request set_param content_type -datatype keyword +request set_param mime_type -datatype text + +set db [template::begin_db_transaction] + +template::query module_id onevalue " + select module_id from cm_modules where key = 'types' +" + +# permissions check - must have cm_write to unregister mime type +content::check_access $module_id cm_write -user_id [User::getID] + +template::query unregister_mime_type dml " + begin + content_type.unregister_mime_type( + content_type => :content_type, + mime_type => :mime_type + ); + end;" + +template::end_db_transaction +template::release_db_handle + +content_method::flush_content_methods_cache $content_type + +template::forward "index?id=$content_type" Index: openacs-4/packages/cms/www/modules/types/unregister-template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/unregister-template.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/unregister-template.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,24 @@ +# modules/types/unregister-template.tcl +# unregisters a template + + +request create +request set_param template_id -datatype integer +request set_param context -datatype keyword +request set_param content_type -datatype keyword + + +set db [template::begin_db_transaction] + +template::query unregister_template dml " + begin + content_type.unregister_template( + template_id => :template_id, + content_type => :content_type, + use_context => :context ); + end;" + +template::end_db_transaction +template::release_db_handle + +template::forward "../types/index?id=$content_type&mount_point=types" Index: openacs-4/packages/cms/www/modules/types/widget-register-1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register-1.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/widget-register-1.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +Register Attribute Widget + +

      Register Attribute Widget

      + + Index: openacs-4/packages/cms/www/modules/types/widget-register-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register-1.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/widget-register-1.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,141 @@ +# register a widget to an attribute + +request create +request set_param attribute_id -datatype integer + + +form create widget_register -elements { + content_type_pretty -datatype text -widget inform -label "Content Type" + attribute_name_pretty -datatype text -widget inform -label "Attribute" + attribute_id -datatype integer -widget hidden -param + content_type -datatype keyword -widget hidden + attribute_name -datatype keyword -widget hidden +} + + +set db [ns_db gethandle] + +query form_widgets multilist " + select + widget, widget + from + cm_form_widgets +" -db $db + +ns_db releasehandle $db + +element create widget_register widget \ + -datatype keyword \ + -widget select \ + -options $form_widgets \ + -label "Form Widget" + +element create widget_register is_required \ + -datatype keyword \ + -widget radio \ + -label "Is Required?" \ + -options { {Yes t} {No f} } + +wizard submit widget_register -buttons { next } + + + + +if { [form is_request widget_register] } { + + set db [ns_db gethandle] + + query attribute_info onerow " + select + a.pretty_name as attribute_name_pretty, + t.pretty_name as content_type_pretty, + t.object_type as content_type, + a.attribute_name + from + acs_attributes a, acs_object_types t + where + a.object_type = t.object_type + and + a.attribute_id = :attribute_id + " -db $db + + query register_widget onerow " + select + widget as registered_widget, is_required + from + cm_attribute_widgets + where + attribute_id = :attribute_id + " -db $db + + ns_db releasehandle $db + + template::util::array_to_vars attribute_info + element set_properties widget_register content_type_pretty \ + -value $content_type_pretty + element set_properties widget_register attribute_name_pretty \ + -value $attribute_name_pretty + element set_properties widget_register attribute_name \ + -value $attribute_name + element set_properties widget_register content_type \ + -value $content_type + + template::util::array_to_vars register_widget + if { ![template::util::is_nil registered_widget] } { + element set_properties widget_register widget \ + -values $registered_widget + element set_properties widget_register is_required \ + -values $is_required + } +} + + + + + +if { [form is_valid widget_register] } { + + form get_values widget_register \ + widget is_required attribute_name content_type + + set db [ns_db gethandle] + ns_ora dml $db "begin transaction" + + query already_registered onevalue " + select 1 + from + cm_attribute_widgets + where + attribute_id = :attribute_id + and + widget = :widget + " -db $db + + # just update the is_required column if this widget is already registered + # this way we don't overwrite the existing attribute widget params + if { ![template::util::is_nil already_registered] && \ + $already_registered } { + ns_ora dml $db " + update cm_attribute_widgets + set is_required = decode(is_required,'t','f','t') + where attribute_id = :attribute_id + and widget = :widget" + } else { + + # (re)register a widget to an attribute + ns_ora dml $db " + begin + cm_form_widget.register_attribute_widget( + content_type => :content_type, + attribute_name => :attribute_name, + widget => :widget, + is_required => :is_required + ); + end;" + } + ns_ora dml $db "end transaction" + ns_db releasehandle $db + + wizard set_param widget $widget + wizard forward +} Index: openacs-4/packages/cms/www/modules/types/widget-register-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register-2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/widget-register-2.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,14 @@ + +Set Attribute Widget Params + + +

      You must select a widget for this attribute!

      + + Select a widget +
      + + +

      Set Attribute Widget Params

      + + +
      \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/widget-register-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/widget-register-2.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,114 @@ +# register a widget to an attribute + +request create +request set_param attribute_id -datatype integer +request set_param widget -datatype keyword + +form create widget_register -elements { + content_type_pretty -datatype text -widget inform -label "Content Type" + attribute_name_pretty -datatype text -widget inform -label "Attribute" + widget_inform -datatype keyword -widget inform -label "Widget" + content_type -datatype keyword -widget hidden + attribute_name -datatype keyword -widget hidden + widget -datatype keyword -widget hidden -param + attribute_id -datatype integer -widget hidden -param +} + + +set db [template::get_db_handle] + +template::query attribute_info onerow " + select + a.pretty_name as attribute_name_pretty, + a.attribute_name, + t.pretty_name as content_type_pretty, + a.object_type as content_type + from + acs_attributes a, acs_object_types t + where + a.object_type = t.object_type + and + a.attribute_id = :attribute_id +" + +template::util::array_to_vars attribute_info +element set_properties widget_register content_type_pretty \ + -value $content_type_pretty +element set_properties widget_register attribute_name_pretty \ + -value $attribute_name_pretty +element set_properties widget_register widget_inform \ + -value $widget +element set_properties widget_register content_type \ + -value $content_type +element set_properties widget_register attribute_name \ + -value $attribute_name + + +# get a list of params for this widget +template::query widget_params multilist " + select + f.param_id, param, + decode(f.is_required,'t','t',w.is_required) is_required, is_html, + nvl(w.value,f.default_value) default_value, + nvl(w.param_source,'literal') param_source + from + cm_form_widget_params f, + ( select + is_required, param_id, param_source, value + from + cm_attribute_widget_params awp, cm_attribute_widgets aw + where + awp.attribute_id = :attribute_id + and + awp.attribute_id = aw.attribute_id + ) w + where + widget = :widget + and + f.param_id = w.param_id (+) +" + +template::release_db_handle + + +# create form sections and elements for each widget param +set i 0 +foreach wparam $widget_params { + set param_id [lindex $wparam 0] + set param [lindex $wparam 1] + set is_required [lindex $wparam 2] + set is_html [lindex $wparam 3] + set default_value [lindex $wparam 4] + set param_source [lindex $wparam 5] + + form section widget_register "Param - $param" + widget::param_element_create widget_register $param $i $param_id \ + $default_value $is_required $param_source + incr i +} + +element create widget_register param_count \ + -datatype integer \ + -widget hidden \ + -value $i + +wizard submit widget_register -buttons { back next } + +# Process form + +if { [form is_valid widget_register] } { + form get_values widget_register \ + content_type attribute_name param_count + + set db [template::begin_db_transaction] + + for { set i 0 } { $i < $param_count } { incr i } { + widget::process_param $db \ + widget_register $i $content_type $attribute_name + } + + template::end_db_transaction + template::release_db_handle + + wizard forward +} Index: openacs-4/packages/cms/www/modules/types/widget-register-3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register-3.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/widget-register-3.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,24 @@ + +Preview Attribute Widget + + +

      You must select a widget for this attribute!

      + + Select a widget +
      + + + +

      Preview Attribute Widget

      + +
      + +

      The following widget params must have values:

      + @outstanding_params_list@ + +

      + Please Go Back and edit widget params. + + + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/widget-register-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register-3.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/widget-register-3.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,66 @@ +# register a widget to an attribute + +request create +request set_param attribute_id -datatype integer +request set_param widget -datatype keyword -optional + +set step [wizard current_step] +set last_step [expr $step-1] +set back_url [wizard get_forward_url $last_step] + +# no widget, no form +if { [template::util::is_nil widget] } { + return +} + + +# the preview form +form create widget_preview +wizard submit widget_preview -buttons { back finish } + +if { [form is_request widget_preview] } { + set db [template::get_db_handle] + + template::query outstanding_params_list onelist " + select + distinct param + from + cm_form_widget_params f + where + is_required = 't' + and + widget = :widget + and + not exists ( + select 1 + from + cm_attribute_widget_params + where + attribute_id = :attribute_id + and + param_id = f.param_id ) + " + + # the number of required widget params that are missing + set outstanding_params [llength $outstanding_params_list] + + template::query attribute_names onerow " + select + pretty_name, attribute_name, object_type + from + acs_attributes + where + attribute_id = :attribute_id + " + + template::release_db_handle + + template::util::array_to_vars attribute_names + content::add_attribute_element widget_preview $object_type $attribute_name +} + +if { [form is_valid widget_preview] } { + form get_values widget_preview + wizard forward +} + Index: openacs-4/packages/cms/www/modules/types/widget-register.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/widget-register.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,19 @@ + +Form Widget Wizard + +

      Form Widget Wizard

      + + + + @wizard.rownum@. @wizard.label@ + + + @wizard.rownum@. @wizard.label@ + + + § + + +
      + + Index: openacs-4/packages/cms/www/modules/types/widget-register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/widget-register.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,39 @@ +# wizard for registering widgets to content type attributes + +request create +request set_param attribute_id -datatype integer +request set_param content_type -datatype keyword +request set_param widget -datatype keyword -optional + +set db [template::get_db_handle] + +template::query module_id onevalue " + select + module_id + from + cm_modules + where + key = 'types' +" + +# permissions check - need cm_write on types module to edit a widget +content::check_access $module_id cm_write -user_id [User::getID] + +template::release_db_handle + +wizard set_param attribute_id $attribute_id +wizard set_param content_type $content_type +if { ![template::util::is_nil widget] } { + wizard set_param widget $widget +} + + +wizard create -action "index?id=$content_type" -params { + attribute_id content_type widget +} -steps { + 1 -label "Choose a widget" -url "widget-register-1" + 2 -label "Edit Widget Params" -url "widget-register-2" + 3 -label "Preview Widget" -url "widget-register-3" +} + +wizard get_current_step Index: openacs-4/packages/cms/www/modules/types/widget-unregister.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-unregister.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/widget-unregister.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,46 @@ +request create +request set_param attribute_id -datatype integer + +set db [template::get_db_handle] + +# permissions check - must have cm_write on the types module to unregister +# a widget +template::query module_id onevalue " + select + module_id + from + cm_modules + where + key = 'types' +" + +content::check_access $module_id cm_write -user_id [User::getID] + + +template::query attribute_info onerow " + select + attribute_name, object_type as content_type + from + acs_attributes + where + attribute_id = :attribute_id +" + +template::util::array_to_vars attribute_info + +set sql " + begin + cm_form_widget.unregister_attribute_widget ( + content_type => :content_type, + attribute_name => :attribute_name + ); + end; +" + +if { [catch {ns_ora dml $db $sql} errmsg] } { + template::request::error unregister_attribute_widget $errmsg +} + +template::release_db_handle + +template::forward index?id=$content_type \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/content_symlink/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content_symlink/delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/content_symlink/delete.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,14 @@ +# Delete a content symlink + +template::request create +template::request set_param id -datatype keyword +template::request set_param parent_id -datatype keyword -optional + +set db [template::begin_db_transaction] +template::query symlink_delete dml " + begin content_symlink.delete(:id); end; +" +template::end_db_transaction +template::release_db_handle + +template::forward "../../sitemap/refresh-tree?id=$parent_id" Index: openacs-4/packages/cms/www/modules/users/access.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/access.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/access.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +# Page component listing permission records on any object. \ No newline at end of file Index: openacs-4/packages/cms/www/modules/users/change-user-state.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/change-user-state.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/change-user-state.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,19 @@ +# Change the user's membership state + +request create +request set_param rel_id -datatype keyword +request set_param group_id -datatype keyword +request set_param new_state -datatype keyword +request set_param parent_id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value users + +set db [template::begin_db_transaction] +template::query change_member_state dml " + update membership_rels set + member_state=:new_state + where + rel_id=:rel_id" +template::end_db_transaction +template::release_db_handle + +template::forward "index?id=$group_id&parent_id=$parent_id&mount_point=$mount_point" Index: openacs-4/packages/cms/www/modules/users/create.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/create.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/create.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +Create a Group + +

      Create new group

      + + Index: openacs-4/packages/cms/www/modules/users/create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/create.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/create.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,76 @@ +# Create a subgroup + +request create + +request set_param parent_id -datatype integer -optional +request set_param mount_point -datatype keyword -optional -value users + +form create add_group + +element create add_group group_id \ + -label "Group ID" -datatype integer -widget hidden -optional + +element create add_group user_id \ + -label "User ID" -datatype integer -widget hidden -value [User::getID] + +element create add_group parent_id \ + -label "Parent ID" -datatype integer -widget hidden -param -optional + +element create add_group group_name \ + -label "Name" -datatype text -widget text -html { size 20 } + +element create add_group email \ + -label "Email" -datatype text -widget text -optional -html { size 40 } + +element create add_group url \ + -label "URL" -datatype text -widget text -optional -html { size 40 } + + +if { [form is_request add_group] } { + + # Get the next folder id + set db [template::get_db_handle] + template::query group_id onevalue " + select acs_object_id_seq.nextval from dual + " + template::release_db_handle + + element set_properties add_group group_id -value $group_id +} + +# Insert the folder +if { [form is_valid add_group] } { + + set ip [ns_conn peeraddr] + + template::form get_values add_group group_name parent_id \ + group_id user_id email url + + set db [template::begin_db_transaction] + + ns_ora exec_plsql_bind $db "begin :1 := acs_group.new( + group_id => :group_id, + group_name => :group_name, + email => :email, + url => :url, + creation_user => :user_id, + creation_ip => :ip ); end;" [list 1] group_id + + if { ![util::is_nil parent_id] } { + ns_ora exec_plsql_bind $db "begin :1 := composition_rel.new( + object_id_one => :parent_id, + object_id_two => :group_id, + creation_user => :user_id, + creation_ip => :ip ); end;" [list 1] rel_id + } + + template::end_db_transaction + template::release_db_handle + + # Update the folder and refresh the tree + refreshCachedFolder $user_id sitemap $parent_id + + template::forward "refresh-tree?id=$parent_id&goto_id=$parent_id&mount_point=$mount_point" +} + + Index: openacs-4/packages/cms/www/modules/users/delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/delete.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,45 @@ +# Delete a subgroup + +template::request create +template::request set_param id -datatype keyword +template::request set_param parent_id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value users + +# Determine if the group is empty +template::query is_empty onevalue " + select NVL((select 'f' from dual where exists ( + select 1 from acs_rels + where object_id_one = :id + and rel_type in ('composition_rel', 'membership_rel'))), + 't') as is_empty from dual" + +# If nonempty, show error +if { [string equal $is_empty "f"] } { + + set message "This group is not empty." + set return_url "modules/sitemap/index" + set passthrough [list [list id $id] [list parent_id $parent_id]] + template::forward "../../error?message=$message&return_url=$return_url&passthrough=$passthrough" + +} else { + + # Otherwise, delete the group + set db [template::begin_db_transaction] + template::query delete_group dml "begin acs_group.delete(:id); end;" + template::end_db_transaction + template::release_db_handle + + # Remove it from the clipboard, if it exists + set clip [clipboard::parse_cookie] + clipboard::remove_item $clip $mount_point $id + clipboard::set_cookie $clip + clipboard::free $clip + + template::forward "refresh-tree?id=$parent_id&goto_id=$parent_id&mount_point=$mount_point" +} + + + + + + Index: openacs-4/packages/cms/www/modules/users/edit-user.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/edit-user.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/edit-user.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +Edit a User + +

      Edit a user

      + + Index: openacs-4/packages/cms/www/modules/users/edit-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/edit-user.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/edit-user.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,112 @@ +request create + +request set_param id -datatype integer -optional +request set_param parent_id -datatype integer -optional +request set_param mount_point -datatype keyword -optional -value users + +form create edit_user + +form section edit_user "User Parameters" + +element create edit_user item_id \ + -label "Item ID" -datatype integer -widget hidden -value $id +element create edit_user user_id \ + -label "User ID" -datatype integer -widget hidden -value [User::getID] +element create edit_user mount_point \ + -label "Mount Point" -datatype keyword -widget hidden -param -optional +element create edit_user parent_id \ + -label "Parent ID" -datatype keyword -widget hidden -param -optional +element create edit_user first_names \ + -label "First Names" -datatype text -widget text -html { size 30 } +element create edit_user last_name \ + -label "Last Name" -datatype text -widget text -html { size 30 } +element create edit_user screen_name \ + -label "Screen Name" -datatype text -widget text -html { size 20 } +element create edit_user email \ + -label "Email" -datatype text -widget text -optional -html { size 40 } +element create edit_user url \ + -label "URL" -datatype text -widget text -optional -html { size 40 } + +form section edit_user "Alerts" + +element create edit_user no_alerts_until \ + -label "No alerts until" -datatype date -widget date -optional \ + -format "DD/MONTH/YYYY" -year_interval { 2000 2010 1 } -help + +form section edit_user "Change Password" + +element create edit_user password \ + -label "New Password" -datatype text -widget password -optional \ + -html { size 20 } + +element create edit_user password2 \ + -label "Re-type Password" -datatype text -widget password -optional \ + -html { size 20 } -validate { + { string equal $value [template::element get_value edit_user password] } { + Passwords do not match + } + } + +if { [form is_request edit_user] } { + + # Find basic user params + query info onerow " + select + p.first_names, p.last_name, + pp.email, pp.url, + u.screen_name, + to_char(u.no_alerts_until, 'YYYY/MM/DD') as no_alerts_until + from + persons p, parties pp, users u + where + p.person_id = :id + and + pp.party_id = :id + and + u.user_id = :id + " + + form set_values edit_user info +} + +if { [form is_valid edit_user] } { + + form get_values edit_user first_names last_name screen_name item_id \ + user_id parent_id mount_point email url password no_alerts_until + + set users_update "set screen_name=:screen_name" + if { [util::date get_property not_null $no_alerts_until] } { + append users_update ", no_alerts_until=[util::date get_property sql_date $no_alerts_until]" + } + if { ![util::is_nil password] } { + + # hash the password + + set salt [ns_rand] + set hashed_password [ns_sha1 "$password$salt"] + + append users_update ", password=:hashed_password, salt=:salt" + } + + set db [template::begin_db_transaction] + template::query edit_user_1 dml " + update users $users_update where user_id = :item_id + " + template::query edit_user_2 dml " + update persons set first_names=:first_names, last_name = :last_name + where person_id=:item_id + " + template::query edit_user_3 dml " + update parties set email=:email, url=:url where party_id = :item_id + " + template::end_db_transaction + template::release_db_handle + + template::forward "one-user?id=$item_id&parent_id=$parent_id&mount_point=$mount_point" + +} + + + + + Index: openacs-4/packages/cms/www/modules/users/edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/edit.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +Edit a Group + +

      Edit a group

      + + Index: openacs-4/packages/cms/www/modules/users/edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/edit.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,78 @@ +# Edit a subgroup + +request create + +request set_param id -datatype integer -optional +request set_param parent_id -datatype integer -optional +request set_param mount_point -datatype keyword -optional -value users + +form create edit_group + +element create edit_group group_id \ + -label "Group ID" -datatype integer -widget hidden -value $id + +element create edit_group user_id \ + -label "User ID" -datatype integer -widget hidden -value [User::getID] + +element create edit_group mount_point \ + -label "Mount Point" -datatype keyword -widget hidden -param -optional + +element create edit_group parent_id \ + -label "Parent ID" -datatype keyword -widget hidden -param -optional + +element create edit_group group_name \ + -label "Name" -datatype text -widget text -html { size 20 } + +element create edit_group email \ + -label "Email" -datatype text -widget text -optional -html { size 40 } + +element create edit_group url \ + -label "URL" -datatype text -widget text -optional -html { size 40 } + +if { [form is_request edit_group] } { + + query info onerow " + select + g.group_name, p.url, p.email + from + groups g, parties p + where + g.group_id = :id + and + p.party_id = :id + " + + element set_properties edit_group group_name -value $info(group_name) + element set_properties edit_group email -value $info(email) + element set_properties edit_group url -value $info(url) +} + +if { [form is_valid edit_group] } { + + template::form get_values edit_group group_id user_id group_name \ + email url mount_point + + set db [template::begin_db_transaction] + template::query edit_group_1 dml " + update groups + set group_name = :group_name + where group_id = :group_id + " + template::query edit_group_2 dml " + update parties + set email = :email, url = :url + where party_id = :group_id + " + template::end_db_transaction + template::release_db_handle + + refreshCachedFolder $user_id $mount_point $parent_id + + template::forward "refresh-tree?id=$parent_id&goto_id=$group_id&mount_point=$mount_point" +} + + + + + + Index: openacs-4/packages/cms/www/modules/users/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,182 @@ + +User Groups + + + + + + + +
      +   + @info.group_name@ +
      +
      + + + Email: @info.email@ +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameEmailUsers 
      + + + + + + + + @subgroups.group_name@ + + @subgroups.email@@subgroups.user_count@Make Admin
      + +

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameScreen NameEmailMembership 
      + + + + + + + + @users.pretty_name@ + + @users.screen_name@@users.email@@users.state_html@Make Admin
      + +

      + + + + There are no users in this group. + + + + +

      + + + + + +


      + + + + + Edit this group
      + + + + Delete this group
      +
      + +
      + + +Create a new subgroup + within this group.
      + + +Associate + marked users with this group.
      + + +Search + members of this group.
      + +

      + + + + + + + + + + Index: openacs-4/packages/cms/www/modules/users/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,186 @@ +# This page should allow browsing of group components, with creation of +# new components. + +# links: +# users-add.tcl (Add Users to this Group) + +request create +request set_param id -datatype keyword -optional +request set_param mount_point -datatype keyword -value users +request set_param parent_id -datatype keyword -optional + +# Determine if the user has admin privileges on the user module +set user_id [User::getID] +set module_id [cm::modules::get_module_id $mount_point] +template::query admin_p onevalue " + select + cms_permission.permission_p (:module_id, :user_id, 'cm_admin') + from + dual" -cache "module_permission $module_id $user_id" + +if { [string equal $admin_p t] } { + set admin_url "make-admin?mount_point=$mount_point&parent_id=$parent_id&target_user_id=" +} + +template::query perm_p onevalue " + select + cms_permission.permission_p (:module_id, :user_id, 'cm_perm') + from + dual" -cache "module_permission $module_id $user_id" + + +# Create all the neccessary URL params for passthrough +set passthrough "mount_point=$mount_point&parent_id=$parent_id" +set root_id [cm::modules::${mount_point}::getRootFolderID] + + +if { ![util::is_nil id] } { + + set current_id $id + + # Get info about the current group + query info onerow " + select + g.group_id, g.group_name, p.email, p.url, + NVL((select 'f' from dual where exists ( + select 1 from acs_rels + where object_id_one = :id + and rel_type in ('composition_rel', 'membership_rel'))), + 't') as is_empty + from + groups g, parties p + where + g.group_id = :id + and + p.party_id = :id" + + set groups_query " + select + g.group_id, g.group_name, + NVL(pg.email, ' ') as email, + (select count(*) from group_member_map + where group_id = g.group_id) as user_count + from + groups g, parties pg, acs_rels rg, composition_rels rc + where + g.group_id = pg.party_id + and + rg.object_id_one = :id + and + rg.object_id_two = g.group_id + and + rc.rel_id = rg.rel_id + order by + upper(g.group_name)" + + set users_query " + select + u.user_id, ppu.first_names || ' ' || ppu.last_name as pretty_name, + NVL(u.screen_name, ' ') as screen_name, + pu.email, aru.member_state, + aru.rel_id + from + users u, persons ppu, parties pu, + acs_rels ru, membership_rels aru + where + u.user_id = ppu.person_id + and + u.user_id = pu.party_id + and + ru.object_id_one = :id + and + ru.object_id_two = u.user_id + and + aru.rel_id = ru.rel_id + and + (aru.member_state <> 'deleted' or aru.member_state is null) + order by + upper(pretty_name)" + + set users_eval { + set state_html "" + set the_pipe "" + foreach pair { {Approved approved} {Rejected rejected} {Banned banned}} { + + set label [lindex $pair 0] + set value [lindex $pair 1] + + append state_html $the_pipe + + if { [string equal $row(member_state) $value] } { + append state_html "$value" + } else { + append state_html "" + append state_html "$value" + } + + set the_pipe " | " + } + + set row(state_html) $state_html + } + +} else { + + set current_id $module_id + + # the everyone party + query info onerow " + select + party_id group_id, 'All Users' as group_name, + email, url, 'f' as is_empty + from + parties + where + party_id = -1 + " + + #clipboard::get_bookmark_icon $clip $mount_point $info(group_id) info + + set groups_query " + select + g.group_id, g.group_name, + NVL(pg.email, ' ') as email, + (select count(*) from group_member_map + where group_id = g.group_id) as user_count + from + groups g, parties pg + where + g.group_id = pg.party_id + and + not exists ( + select 1 from acs_rels ar, composition_rels cr + where ar.rel_id = cr.rel_id + and ar.object_id_two = g.group_id) + order by + g.group_name" + + set users_query " + select + u.user_id, ppu.first_names || ' ' || ppu.last_name as pretty_name, + NVL(u.screen_name, ' ') as screen_name, + pu.email, '' as member_state, + null as rel_id + from + users u, persons ppu, parties pu + where + u.user_id = ppu.person_id + and + u.user_id = pu.party_id + and + not exists ( + select 1 from acs_rels ar, membership_rels mr + where ar.rel_id = mr.rel_id + and ar.object_id_two = u.user_id) + order by + pretty_name" + + set users_eval {} +} + +# Select subgroups, users +query subgroups multirow $groups_query +query users multirow $users_query -eval $users_eval + +set return_url [ns_conn url] \ No newline at end of file Index: openacs-4/packages/cms/www/modules/users/make-admin.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/make-admin.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/make-admin.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,47 @@ +# Make some user a total administrator for everything +request create +request set_param target_user_id -datatype integer +request set_param mount_point -datatype keyword -value users +request set_param parent_id -datatype keyword -optional +request set_param return_url -datatype text -optional \ + -value "../$mount_point" + +# The current user must have cm_admin on the users module in order +# to do this +set user_id [User::getID] + +set db [template::begin_db_transaction] + +content::check_access [cm::modules::sitemap::getRootFolderID] "cm_admin" \ + -mount_point $mount_point -parent_id $parent_id -db $db + +# Grant cm_admin on sitemap, templates, users + +ns_ora dml $db " + declare + cursor c_module_cur is + select module_id from cm_modules; + v_module_id cm_modules.module_id%TYPE; + begin + open c_module_cur; + loop + fetch c_module_cur into v_module_id; + exit when c_module_cur%NOTFOUND; + cms_permission.grant_permission ( + v_module_id, :user_id, 'cm_admin', :target_user_id, 't' + ); + end loop; + close c_module_cur; + + cms_permission.grant_permission ( + content_item.get_root_folder, :user_id, 'cm_admin', :target_user_id, 't' + ); + + cms_permission.grant_permission ( + content_template.get_root_folder, :user_id, 'cm_admin', :target_user_id, 't' + ); + end;" + +template::end_db_transaction + +template::forward $return_url \ No newline at end of file Index: openacs-4/packages/cms/www/modules/users/one-user.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/one-user.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/one-user.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,57 @@ + +One User + +

      User: @info.first_names@ @info.last_name@

      + +

      User Info

      + + + + + + + + + + + + + + + + + + +
      First Names:@info.first_names@
      Last Name:@info.last_name@
      Screen Name:@info.screen_name@
      Email:@info.email@
      URL: + @info.url@ +   +
      Last Visit: + @info.last_visit@ + never +
      No Alerts Until:@info.no_alerts_until@
      + +

      Groups this user belongs to

      + + + + , + @groups.group_name@ + + + + none + + +
      +
      + + +Edit this user
      + + +Delete this user
      + + + Index: openacs-4/packages/cms/www/modules/users/one-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/one-user.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/one-user.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,37 @@ +request create +request set_param id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value sitemap +request set_param parent_id -datatype keyword -optional + +set passthrough "mount_point=$mount_point&parent_id=$parent_id" + +# Find basic user params +template::query info onerow " + select + p.first_names, p.last_name, + pp.email, pp.url, + u.screen_name, + to_char(u.last_visit, 'YYYY/MM/DD HH24:MI') as last_visit, + to_char(u.no_alerts_until, 'YYYY/MM/DD') as no_alerts_until + from + persons p, parties pp, users u + where + p.person_id = :id + and + pp.party_id = :id + and + u.user_id = :id +" + +# Find the groups to which this user belongs +template::query groups multirow " + select + g.group_name, g.group_id + from + groups g, group_member_map m + where + m.group_id = g.group_id + and + m.member_id = :id +" + Index: openacs-4/packages/cms/www/modules/users/permission-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/permission-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/permission-add.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +# Add a permission record to an object. \ No newline at end of file Index: openacs-4/packages/cms/www/modules/users/permission-remove.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/permission-remove.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/permission-remove.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +# Remove a permission record from an object. \ No newline at end of file Index: openacs-4/packages/cms/www/modules/users/refresh-tree.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/refresh-tree.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/refresh-tree.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + + Index: openacs-4/packages/cms/www/modules/users/refresh-tree.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/refresh-tree.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/refresh-tree.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,19 @@ +# Refresh the tree to show any new folders + +request create +request set_param id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value sitemap +request set_param goto_id -datatype keyword -optional +set user_id [User::getID] + +# Change the update time on the folder +refreshCachedFolder $user_id sitemap $id + +if { [template::util::is_nil goto_id] } { + set goto_id $id +} else { + refreshCachedFolder $user_id $mount_point $goto_id +} + + + Index: openacs-4/packages/cms/www/modules/users/search-results.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/search-results.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/search-results.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,23 @@ + +Search Results + +

      Search Results

      + + + + + + No users found + + + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/users/user-assoc.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/user-assoc.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/user-assoc.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,76 @@ +request create +request set_param id -datatype keyword +request set_param mount_point -datatype keyword -optional -value users +request set_param parent_id -datatype keyword -optional + +set user_id [User::getID] +set ip [ns_conn peeraddr] + +set db [template::begin_db_transaction] + +if { [template::util::is_nil id] } { + set code { + if { [catch { + template::query user_assoc_root dml " + declare + v_id membership_rels.rel_id%TYPE; + cursor c_rel_cur is + select + m.rel_id + from + acs_rels r, membership_rels m + where + r.object_id_two=$item_id + and + m.rel_id = r.rel_id; + begin + open c_rel_cur; + loop + fetch c_rel_cur into v_id; + exit when c_rel_cur%NOTFOUND; + membership_rel.delete(v_id); + end loop; + end;" + } errmsg] } { + } + } + +} else { + set code { + if { [catch { + ns_ora exec_plsql_bind $db " + declare + v_group_id groups.group_id%TYPE; + v_user_id users.user_id%TYPE; + begin + select g.group_id, u.user_id into v_group_id, v_user_id + from groups g, users u + where g.group_id = :id and u.user_id = :item_id; + + :1 := membership_rel.new( + object_id_one => :id, object_id_two => :item_id, + creation_user => :user_id, creation_ip => :ip); + + exception when no_data_found then null; + end;" [list 1] rel_id + } errmsg] } { + } + } +} + +set clip [clipboard::parse_cookie] + +clipboard::map_code $clip $mount_point $code +template::end_db_transaction +template::release_db_handle + +clipboard::free $clip + +# Specify a null id so that the entire branch will be refreshed +template::forward "refresh-tree?goto_id=$id&id=$id&mount_point=$mount_point" + + + + + + Index: openacs-4/packages/cms/www/modules/users/user-search.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/user-search.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/user-search.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +User Search + +

      @form_title@

      + + Index: openacs-4/packages/cms/www/modules/users/user-search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/users/user-search.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/users/user-search.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,112 @@ +# This should be a search page that allows input of various user +# search criteria (start with a simple like query on screen name, +# email, and first and last name). This page will pass along the +# group to users-add.tcl + +form create user_search + +element create user_search keyword \ + -label "Name" -datatype text -widget text -optional -html { size 40 } +element create user_search search_in \ + -label "Search In" -datatype text -widget checkbox \ + -options { {Name name} {{Screen Name} screen_name} {Email email}} \ + -values { screen_name } +element create user_search form_title \ + -label "Form Title" -datatype text -widget hidden -param -optional + +element create user_search mount_point \ + -label "Mount Point" -datatype keyword -widget hidden -param -optional +element create user_search group_id \ + -label "Group ID" -datatype integer -widget hidden -param -optional +element create user_search return_url \ + -label "Return URL" -datatype text -widget hidden -param -optional \ + -value "one-user" +element create user_search passthrough \ + -label "Passthrough" -datatype text -widget hidden -param -optional +element create user_search result_id_ref \ + -label "Result ID reference" -datatype keyword -widget hidden -param -optional \ + -value "id" + +set result_id_ref [element get_value user_search result_id_ref] + +set group_id [element get_value user_search group_id] +set form_title [element get_value user_search form_title] + + +# Set default form title if none specified + +if { [util::is_nil form_title] } { + if { ![util::is_nil group_id] } { + template::query who onevalue "select acs_object.name(:group_id) from dual" + set form_title "Search members of $who" + } else { + set form_title "Search All Users" + } + element set_properties user_search form_title -value $form_title +} + +# If form is valid, compile the query and display search results + +if { [form is_valid user_search] } { + + form get_values user_search keyword mount_point group_id \ + return_url passthrough + + set extra_url [content::url_passthrough $passthrough] + + set clauses [list] + set search_in [element get_values user_search search_in] + set keyword [string tolower "%$keyword%"] + + if { [lsearch $search_in name] != -1 } { + lappend clauses "lower(p.first_names) like :keyword" + lappend clauses "lower(p.last_name) like :keyword" + } + + if { [lsearch $search_in screen_name] != -1 } { + lappend clauses "lower(u.screen_name) like :keyword" + } + + if { [lsearch $search_in email] != -1 } { + lappend clauses "lower(pp.email) like :keyword" + } + + if { [util::is_nil group_id] } { + set extra_table "" + set where_clause "" + } else { + set extra_table ", group_member_map m" + set where_clause " and + m.member_id = u.user_id and m.group_id = :group_id" + } + + set clauses [join $clauses " or "] + + set sql_query " + select + distinct u.user_id, u.screen_name, + p.first_names || ' ' || p.last_name as name, + pp.email + from + users u, persons p, parties pp $extra_table + where + ($clauses) + and + p.person_id = u.user_id + and + pp.party_id = u.user_id + $where_clause" + + ns_log notice "$sql_query\n$keyword" + + query results multirow $sql_query + + template::set_file "[file dir $__adp_stub]/search-results" +} + + + + + + + Index: openacs-4/packages/cms/www/modules/workflow/case-create.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/case-create.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/case-create.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +Create Workflow + +

      Create Workflow

      + Index: openacs-4/packages/cms/www/modules/workflow/case-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/case-create.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/case-create.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,284 @@ +# Create a workflow for an item by making assignments +# if is_edit is true, modify an existing workflow + +form create case_create -elements { + case_id -datatype integer -widget hidden -param + item_id -datatype integer -widget hidden -param + is_edit -datatype keyword -widget hidden -param -optional + transitions -datatype text -widget hidden +} + + +set user_id [User::getID] +set is_edit [element get_value case_create is_edit] + +set db [template::get_db_handle] + +# check if this user has permission to create a workflow +set item_id [element get_value case_create item_id] +content::check_access $item_id cm_item_workflow \ + -mount_point workflow \ + -return_url "../items/index?item_id=$item_id" \ + -db $db \ + -request_error + +# get a list of users (this should be context-specific) +query users multilist " + select + person.name(user_id) name, user_id + from + users + where + user_id > 0 + order by + name +" + +# Prepare the form elements +set query " + select + transition_name, transition_key + from + wf_transitions + where + workflow_key = 'publishing_wf' + order by + sort_order" + +set transition_list [list] +query::iterate $db $query { + + form section case_create $row(transition_name) + + element create case_create ${row(transition_key)}_assign \ + -datatype integer \ + -widget multiselect \ + -options $users \ + -label "Assignment" + + # Create an element to hold the old values, for later comparison + if { [string equal $is_edit t] } { + element create case_create ${row(transition_key)}_assign_old \ + -datatype text \ + -widget hidden \ + -optional + } + + element create case_create ${row(transition_key)}_deadline \ + -datatype date \ + -widget date \ + -format "DD/MONTH/YYYY" -year_interval { 2000 2001 1 } \ + -label "Deadline" \ + -value [util::date today] + + lappend transition_list $row(transition_key) +} + + +# Remember the list of transitions +element set_properties case_create transitions -value $transition_list + + +element create case_create msg \ + -datatype text \ + -widget textarea \ + -label "Comment" \ + -html { rows 10 cols 40 wrap physical } + + + +# Get the case id an/or current values +if { [form is_request case_create] } { + + if { [string equal $is_edit t] } { + + # Get existing case assignments + set case_id [element get_value case_create case_id] + set sql_query " + select + transition_key, party_id + from + wf_case_assignments + where + workflow_key = 'publishing_wf' + and + case_id = :case_id" + + query::iterate $db $sql_query { + lappend case_values($row(transition_key)) $row(party_id) + } + + foreach {transition_key party_id_list} [array get case_values] { + element set_properties case_create \ + "${transition_key}_assign" \ + -values $party_id_list + element set_properties case_create \ + "${transition_key}_assign_old" \ + -value $party_id_list + } + + # Get existing deadlines + set sql_query " + select + transition_key, + to_char(deadline, 'YYYY MM DD HH24 MI SS') as deadline + from + wf_case_deadlines + where + workflow_key = 'publishing_wf' + and + case_id = :case_id" + + query::iterate $db $sql_query { + element set_properties case_create \ + "${row(transition_key)}_deadline" \ + -value [util::date acquire sql_date $row(deadline)] + } + + } else { + query case_id onevalue " + select acs_object_id_seq.nextval from dual + " + + element set_properties case_create case_id -value $case_id + } +} + +template::release_db_handle + +if { [form is_valid case_create] } { + + form get_values case_create item_id case_id is_edit transitions msg + set creation_ip [ns_conn peeraddr] + + set db [template::begin_db_transaction] + + if { ![string equal $is_edit t] } { + + + # create the workflow + ns_ora exec_plsql_bind $db "begin :1 := workflow_case.new( + workflow_key => 'publishing_wf', + context_key => NULL, + object_id => :item_id, + creation_user => :user_id, + creation_ip => :creation_ip, + case_id => :case_id + ); + end;" [list 1] case_id + + # make assignments for each transition + foreach transition $transitions { + foreach value [element get_values case_create \ + ${transition}_assign] { + + ns_ora dml $db " + begin + workflow_case.add_manual_assignment( + case_id => :case_id, + transition_key => :transition, + party_id => :value + ); + end; + " + } + + set deadline [element get_value case_create \ + ${transition}_deadline] + set dead_sql [util::date get_property sql_date $deadline] + + ns_ora dml $db " + insert into wf_case_deadlines ( + case_id, workflow_key, transition_key, deadline + ) values ( + :case_id, 'publishing_wf', :transition, $dead_sql + )" + } + } else { + + # Modify the workflow + foreach transition $transitions { + set new_values \ + [element get_values case_create ${transition}_assign] + set old_values \ + [element get_value case_create ${transition}_assign_old] + + # Remove cleared values + if { [llength $old_values] > 0 } { + + set query " + delete from + wf_case_assignments + where + workflow_key = 'publishing_wf' + and + transition_key = :transition + and + case_id = :case_id + and + party_id in ([join $old_values ,])" + + if { [llength $new_values] > 0 } { + append query " and party_id not in ([join $new_values ,])" + } + ns_ora dml $db $query + } + + # Update existing deadlines + set new_deadline \ + [element get_value case_create ${transition}_deadline] + set new_dead_sql [util::date get_property sql_date $new_deadline] + ns_ora dml $db " + update + wf_case_deadlines + set + deadline = $new_dead_sql + where + workflow_key = 'publishing_wf' + and + transition_key = :transition + and + case_id = :case_id" + + # Insert new values + foreach new_value $new_values { + if { [lsearch $old_values $new_value] == -1 } { + + ns_ora dml $db " + begin + workflow_case.add_manual_assignment( + case_id => :case_id, + tranisition_key => :transition, + party_id => :new_value + ); + end; + " + } + } + } + } + + # enable the transitions (insert tasks for each transition) + ns_ora dml $db " + begin + workflow_case.start_case( + case_id => :case_id, + creation_user => :user_id, + creation_ip => :creation_ip, + msg => :msg + ); + end; + " + + # email notifications of task assignments + workflow::notify_of_assignments $db $case_id $user_id + + + template::end_db_transaction + template::release_db_handle + + # Flush the access cache in order to clear permissions + content::flush_access_cache $item_id + + template::forward "../items/index?item_id=$item_id" +} Index: openacs-4/packages/cms/www/modules/workflow/case-status.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/case-status.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/case-status.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,58 @@ + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + +
      Workflow 
      Current workflow status:@caseinfo.state@
      No tasks are current started or enabled
      Current task:@transinfo.transition_name@ + + + (Finish) + + + + (Finish) + + + (Steal from @transinfo.hold_name@) + + + +
      + +
      + + + + + +
      Workflow
      + + Create a workflow for this item. +
      + +
      + +
      \ No newline at end of file Index: openacs-4/packages/cms/www/modules/workflow/case-status.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/case-status.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/case-status.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,73 @@ +# Display the next action to perform on this object, if any + +# If the task is currently being performed by someone else, display that +# If the task is not currently being performed and you are assigned to it, +# have links to either check out or perform (finish) the task. + +# requires: item_id + +request create -params { + item_id -datatype integer + mount_point -datatype keyword -optional -value sitemap +} + +set db [template::get_db_handle] + +# Check permissions +content::check_access $item_id cm_item_workflow \ + -mount_point $mount_point \ + -return_url "modules/sitemap/index" \ + -request_error + +# Look up the workflow associated with this item, if any: + +#set query "select case_id, initcap(toplevel_state) state +# from wf_cases where object_id = :item_id" +set query "select case_id, initcap(state) state + from wf_cases where object_id = :item_id" + +template::query caseinfo onerow $query + +# Look up the enabled or started transition for this workflow, if any: + +if { ! [template::util::is_nil caseinfo] } { + + set case_id $caseinfo(case_id) + + set query "select k.transition_key, k.task_id, t.transition_name, + k.holding_user, + content_workflow.get_holding_user_name(k.task_id) hold_name + from wf_tasks k, wf_transitions t + where k.case_id = :case_id + and k.state in ('enabled', 'started') + and k.transition_key = t.transition_key" + template::query transinfo onerow $query + + # Determine whether the current user is assigned to the active transition + + if { [array exists transinfo] } { + + set user_id [User::getID] + set transition_key $transinfo(transition_key) + + set query "select decode(count(*), 0, 'no', 'yes') + from wf_case_assignments + where case_id = :case_id + and transition_key = :transition_key + and party_id = :user_id" + template::query is_assigned onevalue $query + + # if eligible, add a link to complete this task + if { $is_assigned } { + set query "select to_char(deadline, 'DD MON') deadline + from wf_case_deadlines + where case_id = :case_id + and transition_key = :transition_key" + template::query deadlline onevalue $query + } + } +} + +template::release_db_handle + +set return_url "../items/index?item_id=$item_id&mount_point=$mount_point" Index: openacs-4/packages/cms/www/modules/workflow/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,121 @@ + +@page_title@ + + +

      @page_title@

      +

      + + + + + + +
      + Workflow Items by Task +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      There are no publishing workflows.Workflow StateWorkflow ItemsActive ItemsChecked Out ItemsOverdue Items
      + + @transitions.transition_name@ + + @transitions.transition_count@@transitions.active_count@@transitions.checkout_count@ + + @transitions.overdue_count@ + + + @transitions.overdue_count@ + +
      Total@wf_stats.total_count@@wf_stats.active_count@@wf_stats.checkout_count@@wf_stats.overdue_count@
      + +
      + + + + + +

      + + + + +
      + Workflow Items by Assigned Parties +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      There are no publishing workflows.
      Assigned PartyWorkflow ItemsActive ItemsChecked Out ItemsOverdue Items
      + + @user_tasks.first_names@ @user_tasks.last_name@ + + @user_tasks.transition_count@@user_tasks.active_count@@user_tasks.checkout_count@ + @user_tasks.overdue_count@ +
      + +
      + + Index: openacs-4/packages/cms/www/modules/workflow/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,113 @@ +# Display a list of currently defined workflows + +request create +request set_param id -datatype keyword -optional +request set_param parent_id -datatype keyword -optional +request set_param mount_point -datatype keyword -value workflow + +set db [template::get_db_handle] + +# workflow totals + +template::query wf_stats onerow " + select + count( decode(content_workflow.is_finished(c.case_id, transition_key), + 'f',1,null) + ) as total_count, + count( decode(content_workflow.is_overdue(c.case_id, transition_key), + 't',1,null) + ) as overdue_count, + count( decode(content_workflow.is_active(c.case_id, transition_key), + 't',1,null) + ) as active_count, + count( decode(content_workflow.is_checked_out(c.case_id, transition_key), + 't',1,null) + ) as checkout_count + from + wf_cases c, wf_transitions trans + where + c.workflow_key = trans.workflow_key + and + c.workflow_key = 'publishing_wf' + and + c.state = 'active' +" + +set sql " + select + trans.transition_key, transition_name, sort_order, + count(transition_name) as transition_count, + count(decode ( + content_workflow.is_overdue(c.case_id, trans.transition_key), + 't',1,null) + ) as overdue_count, + count(decode ( + content_workflow.is_active(c.case_id, trans.transition_key), + 't',1,null) + ) as active_count, + count( decode( + content_workflow.is_checked_out(c.case_id, trans.transition_key), + 't',1,null) + ) as checkout_count + from + wf_cases c, wf_transitions trans + where + trans.workflow_key = c.workflow_key + and + trans.workflow_key = 'publishing_wf' + and + c.state in ('active') + and + -- don't include tasks that have been finished or canceled + content_workflow.is_finished(c.case_id, trans.transition_key) = 'f' + group by + sort_order, transition_name, trans.transition_key +" + +# workflow tasks by transition state: content items, overdue items +template::query transitions multirow $sql + + + +# workflow tasks by user: content items, overdue items +query user_tasks multirow " + select + p.person_id, p.first_names, p.last_name, + count(transition_name) as transition_count, + count(decode ( + content_workflow.is_overdue(c.case_id, t.transition_key), + 't',1,null) + ) as overdue_count, + count(decode ( + content_workflow.is_active(c.case_id, t.transition_key), + 't',1,null) + ) as active_count, + count( decode( + content_workflow.is_checked_out(c.case_id, t.transition_key, ca.party_id), + 't',1,null) + ) as checkout_count + from + wf_cases c, wf_case_assignments ca, + wf_transitions t, persons p + where + t.workflow_key = 'publishing_wf' + and + t.workflow_key = c.workflow_key + and + c.state = 'active' + and + c.case_id = ca.case_id + and + ca.transition_key = t.transition_key + and + p.person_id = ca.party_id + and + -- don't include tasks that have been finished or canceled + content_workflow.is_finished(c.case_id, t.transition_key) = 'f' + group by + first_names, last_name, person_id +" + +template::release_db_handle + +set page_title "Workflow Statistics" Index: openacs-4/packages/cms/www/modules/workflow/overdue-items.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/overdue-items.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/overdue-items.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,72 @@ + +@page_title@ +

      @page_title@

      +

      + + + There are no overdue workflow tasks.

      + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TaskItemAssigned PartyDeadlineStatus
      + + @overdue_tasks.transition_name@ + + + + @overdue_tasks.title@ + + + + @overdue_tasks.assigned_party@ + + +   + @overdue_tasks.deadline_pretty@ + + + Waiting for a previous task to be completed + + @overdue_tasks.status@ +
      +
      + + +
      + +

      + + View all outstanding workflow tasks + Index: openacs-4/packages/cms/www/modules/workflow/overdue-items.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/overdue-items.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/overdue-items.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,55 @@ +request create +request set_param transition -datatype keyword -value "all" + + +if { ![string equal $transition "all"] } { + query transition_name onevalue " + select transition_name + from wf_transitions + where transition_key = :transition + and workflow_key = 'publishing_wf'" + + set transition_sql "and ca.transition_key = :transition" + +} else { + set transition_name "All Tasks" + set transition_sql "" +} + + +set date_format "'Mon. DD, YYYY HH24:MI:SS'" + +query overdue_tasks multirow " + select + ca.transition_key, transition_name, ca.party_id, + item_id, content_item.get_title(item_id) as title, + nvl(party.name(ca.party_id),person.name(ca.party_id)) as assigned_party, + to_char(dead.deadline,'Mon. DD, YYYY') as deadline_pretty, + content_workflow.get_status(c.case_id, ca.transition_key) as status + from + wf_transitions trans, wf_cases c, wf_case_deadlines dead, + wf_case_assignments ca, cr_items i + where + c.case_id = dead.case_id + and + c.case_id = ca.case_id + and + ca.transition_key = dead.transition_key + and + trans.transition_key = ca.transition_key + and + c.workflow_key = 'publishing_wf' + and + c.workflow_key = trans.workflow_key + and + c.state = 'active' + and + c.object_id = i.item_id + and + content_workflow.is_overdue(c.case_id, ca.transition_key) = 't' + $transition_sql + order by + transition_name, dead.deadline desc, title, assigned_party" + + +set page_title "Outstanding Workflow Tasks - $transition_name" Index: openacs-4/packages/cms/www/modules/workflow/task-checkin.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-checkin.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/task-checkin.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + + +Check-In a Task +

      Check-In a Task

      + Index: openacs-4/packages/cms/www/modules/workflow/task-checkin.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-checkin.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/task-checkin.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,135 @@ +# /task-checkin.tcl +# This is form for checking in an item that this user holds + +request create +request set_param task_id -datatype integer +request set_param return_url -datatype text -value "../workspace/index" + + +set user_id [User::getID] +set db [template::get_db_handle] + +# check that the task is still valid +query is_valid_task onevalue " + select content_workflow.can_approve( :task_id, :user_id ) from dual +" + +if { [string equal $is_valid_task f] } { + template::release_db_handle + template::forward $return_url +} + + +# task info + +template::query task_info onerow " + select + c.object_id, tr.transition_name, + content_item.get_title(c.object_id) title, + tk.holding_user as holding_user, + to_char(tk.hold_timeout,'Mon. DD, YYYY') hold_timeout, + content_workflow.get_holding_user_name(tk.task_id) holding_user_name + from + wf_tasks tk, wf_transitions tr, wf_cases c + where + tk.task_id = :task_id + and + tk.transition_key = tr.transition_key + and + tk.case_id = c.case_id +" + +template::release_db_handle + + +set holding_user $task_info(holding_user) + + +form create task_start -elements { + task_id -datatype integer -widget hidden -param +} + +element create task_start return_url \ + -datatype text \ + -widget hidden \ + -value "../workspace/index" \ + -param + +element create task_start task_name \ + -datatype text \ + -widget inform \ + -value $task_info(transition_name) \ + -label "Task" + +element create task_start title \ + -datatype text \ + -widget inform \ + -value $task_info(title) \ + -label "Title" + +# add holding user info to the form (if any) +if { ![template::util::is_nil holding_user] } { + + element create task_start holding_user_name \ + -datatype text \ + -widget inform \ + -value $task_info(holding_user_name) \ + -label "Held by" + + element create task_start hold_timeout \ + -datatype text \ + -widget inform \ + -value $task_info(hold_timeout) \ + -label "Held until" + + if { $holding_user != $user_id } { + set page_title "Steal a Task" + } +} + +element create task_start msg \ + -datatype text \ + -label "Comment" \ + -widget textarea \ + -html { rows 10 cols 40 wrap physical } + + + +if { [form is_valid task_start] } { + + form get_values task_start task_id msg + + set ip_address [ns_conn peeraddr] + set user_id [User::getID] + + set db [template::begin_db_transaction] + + # check that the task is still valid + template::query is_valid_task onevalue " + select content_workflow.can_approve( :task_id, :user_id ) from dual + " + + if { [string equal $is_valid_task f] } { + ns_ora dml $db "abort transaction" + template::release_db_handle $db + template::request::error invalid_task \ + "task-checkin.tcl - invalid task - $task_id" + return + } + + template::query workflow_checkin dml " + begin + content_workflow.checkin( + task_id => :task_id, + user_id => :user_id, + ip_address => :ip_address, + msg => :msg + ); + end; + " + + template::end_db_transaction + template::release_db_handle + + template::forward $return_url +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/workflow/task-finish.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-finish.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/task-finish.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +@page_title@ + +

      @page_title@

      + + Index: openacs-4/packages/cms/www/modules/workflow/task-finish.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-finish.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/task-finish.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,128 @@ +# /workflow/task-finish.tcl +# Indicate that a task has been finished for a particular workflow case. + +request create +request set_param task_id -datatype integer +request set_param return_url -datatype text -value "../workspace/index" + + + + +set user_id [User::getID] +set db [template::get_db_handle] + +# check that the task is still valid +template::query is_valid_task onevalue " + select content_workflow.can_approve( :task_id, :user_id ) from dual +" + +if { [string equal $is_valid_task f] } { + template::release_db_handle + template::forward $return_url +} + + +# Get the name of the item and of the task +template::query task_info onerow " + select + c.object_id, content_item.get_title(c.object_id) title, + tr.transition_name + from + wf_tasks tk, wf_cases c, + wf_transitions tr + where + tk.task_id = :task_id + and + tk.transition_key = tr.transition_key + and + tk.workflow_key = tr.workflow_key + and + tk.workflow_key = 'publishing_wf' + and + c.case_id = tk.case_id + and + content_workflow.can_approve( tk.task_id, :user_id ) = 't' +" + +template::release_db_handle + + +form create task_finish -elements { + task_id -datatype integer -widget hidden -param +} + +element create task_finish return_url \ + -datatype text \ + -widget hidden \ + -value "../workspace/index" \ + -param + +element create task_finish task_name \ + -datatype text \ + -widget inform \ + -value $task_info(transition_name) \ + -label "Task" + +element create task_finish title \ + -datatype text \ + -widget inform \ + -value $task_info(title) \ + -label "Title" + +element create task_finish msg \ + -datatype text \ + -label "Comment" \ + -widget textarea \ + -html { rows 10 cols 40 wrap physical } + +set page_title "Finish a Task" + + + + + + +if { [template::form is_valid task_finish] } { + + form get_values task_finish task_id msg + + set ip_address [ns_conn peeraddr] + set user_id [User::getID] + + + set db [template::begin_db_transaction] + + template::query is_valid_task onevalue " + select content_workflow.can_approve( :task_id, :user_id ) from dual + " + + if { [string equal $is_valid_task f] } { + ns_ora dml $db "abort transaction" + template::release_db_handle + template::request::error invalid_task \ + "task-finish.tcl - This task is no longer valid - $task_id" + return + } + + template::query workflow_approve dml " + begin + content_workflow.approve( + task_id => :task_id, + user_id => :user_id, + ip_address => :ip_address, + msg => :msg + ); + end; + " + + # send email notification to the creator of the item + workflow::notify_admin_of_finished_task $db $task_id + + template::end_db_transaction + template::release_db_handle + + # Flush the access cache in order to clear permissions + content::flush_access_cache $task_info(object_id) + + template::forward $return_url +} Index: openacs-4/packages/cms/www/modules/workflow/task-reject.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-reject.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/task-reject.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +Reject a Task + +

      Reject a Task

      + + Index: openacs-4/packages/cms/www/modules/workflow/task-reject.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-reject.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/task-reject.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,164 @@ +# /workflow/task-reject.tcl +# Indicate that a task has been rejected for a particular workflow case. + +request create +request set_param task_id -datatype integer +request set_param return_url -datatype text -value "../workspace/index" + + +set user_id [User::getID] +set db [template::get_db_handle] + + +# check that the task is still valid +template::query is_valid_task onevalue " + select content_workflow.can_reject( :task_id, :user_id ) from dual +" + +if { [string equal $is_valid_task f] } { + template::release_db_handle + forward $return_url +} + + + +# Get the name of the item and of the task +template::query task_info onerow " + select + c.object_id, content_item.get_title(c.object_id) title, + tr.transition_name + from + wf_tasks tk, wf_cases c, + wf_transitions tr + where + tk.task_id = :task_id + and + tk.transition_key = tr.transition_key + and + tk.workflow_key = tr.workflow_key + and + tk.workflow_key = 'publishing_wf' + and + tk.case_id = c.case_id + and + content_workflow.can_reject( tk.task_id, :user_id ) = 't' +" + + +# get the places I can reject to +template::query reject_places multilist " + select + trans.transition_name, trans.transition_key + from + wf_places src, wf_places dest, wf_tasks t, wf_transitions trans + where + src.workflow_key = dest.workflow_key + and + src.workflow_key = 'publishing_wf' + and + src.workflow_key = trans.workflow_key + and + src.place_key = content_workflow.get_this_place( t.transition_key ) + and + -- for the publishing_wf, past transitions have a lower sort order + dest.sort_order < src.sort_order + and + -- get the transition associated with that place + content_workflow.get_this_place( trans.transition_key ) = dest.place_key + and + t.task_id = :task_id + order by + dest.sort_order desc +" + +template::release_db_handle + +# Create the form + +form create reject -elements { + task_id -datatype integer -widget hidden -param +} + +element create reject return_url \ + -datatype text \ + -widget hidden \ + -value "../workspace/index" \ + -param + +element create reject task_name \ + -datatype text \ + -widget inform \ + -value $task_info(transition_name) \ + -label "Task" + +element create reject title \ + -datatype text \ + -widget inform \ + -value $task_info(title) \ + -label "Title" + +element create reject msg \ + -datatype text \ + -label "Comment" \ + -widget textarea \ + -html { rows 10 cols 40 wrap physical } + +element create reject transition_key \ + -datatype keyword \ + -widget select \ + -label "Regress To" \ + -options $reject_places + +set page_title "Reject a Task" + + + + + + + + +# Process the form +if { [template::form is_valid reject] } { + + form get_values reject task_id msg transition_key + + set ip_address [ns_conn peeraddr] + set user_id [User::getID] + + + set db [template::begin_db_transaction] + + # check that the task is still valid + template::query is_valid_task onevalue " + select content_workflow.can_reject( :task_id, :user_id ) from dual + " + + if { [string equal $is_valid_task f] } { + ns_ora dml $db "abort transaction" + template::release_db_handle + template::request::error invalid_task \ + "task-reject.tcl - invalid task - $task_id" + return + } + + template::query workflow_reject dml " + begin + content_workflow.reject( + task_id => :task_id, + user_id => :user_id, + ip_address => :ip_address, + transition_key => :transition_key, + msg => :msg + ); + end; + " + + template::end_db_transaction + template::release_db_handle + + # Flush the access cache in order to clear permissions + content::flush_access_cache $task_info(object_id) + + forward $return_url +} Index: openacs-4/packages/cms/www/modules/workflow/task-start.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-start.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/task-start.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +@page_title@ + +

      @page_title@

      + +

      \ No newline at end of file Index: openacs-4/packages/cms/www/modules/workflow/task-start.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/task-start.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/task-start.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,150 @@ +# This is form for checking out an item or stealing the lock from +# another assigned user. + +request create +request set_param task_id -datatype integer +request set_param return_url -datatype text -value "../workspace/index" + +set user_id [User::getID] +set db [template::get_db_handle] + +# make sure the task hasn't expired yet +template::query is_valid_task onevalue " + select content_workflow.can_start( :task_id, :user_id ) from dual +" + +# if the task is no longer valid, go to My Tasks page +if { [string equal $is_valid_task f] } { + template::release_db_handle + template::forward $return_url +} + + +# task info +template::query task_info onerow " + select + c.object_id, tr.transition_name, + content_item.get_title(c.object_id) title, + tk.holding_user as holding_user, + to_char(tk.hold_timeout,'Mon. DD, YYYY') hold_timeout, + content_workflow.get_holding_user_name(tk.task_id) holding_user_name + from + wf_tasks tk, + wf_transitions tr, + wf_cases c + where + tk.task_id = :task_id + and + tk.transition_key = tr.transition_key + and + tk.case_id = c.case_id +" + +template::release_db_handle + +set holding_user $task_info(holding_user) + +form create task_start -elements { + task_id -datatype integer -widget hidden -param +} + + +element create task_start return_url \ + -datatype text \ + -widget hidden \ + -value "../workspace/index" \ + -param + +element create task_start task_name \ + -datatype text \ + -widget inform \ + -value $task_info(transition_name) \ + -label "Task" + +element create task_start title \ + -datatype text \ + -widget inform \ + -value $task_info(title) \ + -label "Title" + +# add holding user info to the form (if any) +if { ![template::util::is_nil holding_user] } { + + element create task_start holding_user_name \ + -datatype text \ + -widget inform \ + -value $task_info(holding_user_name) \ + -label "Held by" + + element create task_start hold_timeout \ + -datatype text \ + -widget inform \ + -value $task_info(hold_timeout) \ + -label "Held until" + + if { $holding_user != $user_id } { + set page_title "Steal a Task" + } +} + +element create task_start hold_date \ + -datatype date \ + -widget date \ + -label "Hold Item Until:" + +element create task_start msg \ + -datatype text \ + -label "Comment" \ + -widget textarea \ + -html { rows 10 cols 40 wrap physical } + + + +if { ![info exists page_title] } { + set page_title "Start a Task" +} + +if { [form is_request task_start] } { + element set_properties task_start hold_date -value [util::date today] +} + +if { [form is_valid task_start] } { + + form get_values task_start task_id msg hold_date + set hold_timeout_sql [util::date::get_property sql_date $hold_date] + + set ip_address [ns_conn peeraddr] + set user_id [User::getID] + + set db [template::begin_db_transaction] + + # check that task has not expired, if it has display error msg + template::query is_valid_task onevalue " + select content_workflow.can_start( :task_id, :user_id ) from dual + " + + if { [string equal $is_valid_task f] } { + ns_ora dml $db "abort transaction" + template::release_db_handle + template::request::error invalid_task \ + "task-start.tcl - invalid task - $task_id" + return + } + + template::query workflow_checkout dml " + begin + content_workflow.checkout( + task_id => :task_id, + hold_timeout => $hold_timeout_sql, + user_id => :user_id, + ip_address => :ip_address, + msg => :msg + ); + end; + " + + template::end_db_transaction + template::release_db_handle + + template::forward $return_url +} \ No newline at end of file Index: openacs-4/packages/cms/www/modules/workflow/user-tasks.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/user-tasks.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/user-tasks.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,130 @@ + +@page_title@ +

      @page_title@

      +

      + + + + + + + + +
      + Active Tasks +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      There are no active tasks.
      TaskItemDeadlineStatus
      @active_tasks.transition_name@ + + @active_tasks.title@ + + +   + + + @active_tasks.deadline_pretty@ + + + @active_tasks.deadline_pretty@ + + + + + + + + + +
      + Activated on @active_tasks.enabled_date_pretty@ +
      + Checked Out by + + @active_tasks.holding_user_name@ + + on @active_tasks.started_date_pretty@ + until @active_tasks.hold_timeout_pretty@ +
      +
      +
      + + + +

      + + + + + + + + + + + +
      + Awaiting Tasks +
      + + + + + + + + + + + + + + + + + +
      TaskItemDeadline
      @awaiting_tasks.transition_name@ + + @awaiting_tasks.title@ + + +   + + + @awaiting_tasks.deadline_pretty@ + + + @awaiting_tasks.deadline_pretty@ + + +
      +
      + + +
      + Index: openacs-4/packages/cms/www/modules/workflow/user-tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/user-tasks.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/user-tasks.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,100 @@ +# workflow/user-tasks.tcl + +request create +request set_param party_id -datatype integer + + +set date_format "'Mon. DD, YYYY HH24:MI:SS'" + +template::query party_name onevalue " + select nvl(party.name(:party_id),person.name(:party_id)) from dual +" + + +set date_format "'Mon., DD, YYYY HH24:MI:SS'" + +set sql " + select + trans.transition_key, transition_name, + item_id, content_item.get_title(item_id) as title, + t.state, + to_char(deadline,'Mon. DD, YYYY') as deadline_pretty, + to_char(enabled_date,$date_format) as enabled_date_pretty, + to_char(started_date,$date_format) as started_date_pretty, + to_char(hold_timeout,'Mon. DD, YYYY') as hold_timeout_pretty, + holding_user, person.name(holding_user) as holding_user_name, + content_workflow.is_overdue(c.case_id, ca.transition_key) as is_overdue + from + wf_transitions trans, wf_tasks t, cr_items i, + wf_cases c, wf_case_assignments ca + where + c.workflow_key = 'publishing_wf' + and + c.workflow_key = trans.workflow_key + and + c.case_id = ca.case_id + and + c.case_id = t.case_id + and + c.object_id = i.item_id + and + t.transition_key = trans.transition_key + and + ca.transition_key = trans.transition_key + and + c.state = 'active' + and + t.state in ('enabled','started') + and + ca.party_id = :party_id + order by + trans.sort_order, title" + + +template::query active_tasks multirow $sql + +set sql " + select + ca.transition_key, transition_name, + item_id, content_item.get_title(item_id) as title, + to_char(deadline,'Mon. DD, YYYY') as deadline_pretty, + content_workflow.is_overdue(c.case_id, ca.transition_key) as is_overdue + from + wf_case_assignments ca, wf_case_deadlines dead, wf_cases c, + cr_items i, wf_transitions trans + where + c.workflow_key = 'publishing_wf' + and + c.workflow_key = trans.workflow_key + and + c.case_id = ca.case_id + and + c.case_id = dead.case_id + and + ca.transition_key = trans.transition_key + and + dead.transition_key = trans.transition_key + and + c.object_id = i.item_id + and + c.state = 'active' + and + content_workflow.is_finished(c.case_id, ca.transition_key) = 'f' + and + not exists ( select 1 + from + wf_tasks + where + case_id = c.case_id + and + transition_key = ca.transition_key + and + state in ('enabled','started') ) + and + ca.party_id = :party_id + order by + trans.sort_order, title" + +template::query awaiting_tasks multirow $sql + +set page_title "Workflow Tasks Assigned to $party_name" \ No newline at end of file Index: openacs-4/packages/cms/www/modules/workflow/workflow.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/workflow.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/workflow.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,166 @@ + +@page_title@ +

      @page_title@

      +

      + + + + + + + + + +
      + Active Tasks +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + There are no active tasks. +
      TaskItemAssigned PartyDeadlineStatus
      + + @active_tasks.transition_name@ + + + + @active_tasks.title@ + + +   + + + @active_tasks.assigned_party@ + + + +   + + + @active_tasks.deadline_pretty@ + + + @active_tasks.deadline_pretty@ + + + + + + + + + +
      + Activated on @active_tasks.enabled_date_pretty@
      Checked Out by + + @active_tasks.holding_user_name@ + + on @active_tasks.started_date_pretty@ until + @active_tasks.hold_timeout_pretty@
      +
      + +
      + +

      + + + + + + + + + + +
      + Awaiting Tasks +
      + + + + + + + + + + + + + + + + + + + + + + + + +
      TaskItemAssigned PartyDeadline
      + + @awaiting_tasks.transition_name@ + + + + @awaiting_tasks.title@ + + +   + + + @awaiting_tasks.assigned_party@ + + + +   + + + @awaiting_tasks.deadline_pretty@ + + + @awaiting_tasks.deadline_pretty@ + + +
      + +
      +
      + +

      + + View all workflow tasks + + + Index: openacs-4/packages/cms/www/modules/workflow/workflow.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/workflow.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workflow/workflow.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,132 @@ +# workflow.tcl + + +request create +request set_param transition -datatype keyword -value "all" + + +set db [template::get_db_handle] + +if { [string equal $transition "all"] } { + set transition_name "All Tasks" + set transition_sql "" +} else { + + template::query transition_name onevalue " + select + transition_name + from + wf_transitions + where + transition_key = :transition + and + workflow_key = 'publishing_wf' + " -cache "workflow_transition_name $transition" -persistent \ + -timeout 3600 + + if { [template::util::is_nil transition_name] } { + template::release_db_handle + ns_log notice "workflow.tcl - Bad transition - $transition" + forward "workflow" + } + set transition_sql "and ca.transition_key = :transition" +} + + + +set date_format "'Mon. DD, YYYY HH24:MI:SS'" + +set sql " + select + t.transition_key, transition_name, + item_id, content_item.get_title(item_id) as title, + t.state, ca.party_id, + nvl(party.name(ca.party_id),person.name(ca.party_id)) as assigned_party, + holding_user, + person.name(holding_user) as holding_user_name, + to_char(hold_timeout,'Mon. DD, YYYY') as hold_timeout_pretty, + to_char(deadline,'Mon., DD, YYYY') as deadline_pretty, + to_char(enabled_date,$date_format) as enabled_date_pretty, + to_char(started_date,$date_format) as started_date_pretty, + content_workflow.is_overdue(c.case_id, t.transition_key) as is_overdue + from + wf_tasks t, wf_transitions trans, cr_items i, + wf_cases c, wf_case_assignments ca + where + c.workflow_key = 'publishing_wf' + and + c.workflow_key = trans.workflow_key + and + c.case_id = t.case_id + and + c.case_id = ca.case_id + and + c.state = 'active' + and + -- the workflow item is a content item + c.object_id = i.item_id + and + t.transition_key = trans.transition_key + and + ca.transition_key = t.transition_key + and + t.state in ('started','enabled') + $transition_sql + order by + trans.sort_order, title, assigned_party, deadline desc, state +" + +template::query active_tasks multirow $sql + + + +set sql " + select + ca.transition_key, transition_name, ca.party_id, + item_id, content_item.get_title(item_id) as title, + nvl(party.name(ca.party_id),person.name(ca.party_id)) as assigned_party, + to_char(dead.deadline,'Mon.DD, YYYY') as deadline_pretty, + content_workflow.is_overdue(c.case_id, ca.transition_key) as is_overdue + from + wf_cases c, wf_case_assignments ca, wf_case_deadlines dead, + wf_transitions trans, cr_items i + where + c.workflow_key = 'publishing_wf' + and + c.workflow_key = trans.workflow_key + and + c.object_id = i.item_id + and + c.case_id = ca.case_id + and + c.case_id = dead.case_id + and + ca.transition_key = trans.transition_key + and + dead.transition_key = trans.transition_key + and + c.state = 'active' + and + -- non active task + not exists ( select 1 + from + wf_tasks + where + state in ('enabled','started') + and + case_id = c.case_id + and + transition_key = ca.transition_key ) + and + -- its finished + content_workflow.is_finished(c.case_id, ca.transition_key) = 'f' + -- ca.transition_key = transition + $transition_sql + order by + trans.sort_order, title, assigned_party, dead.deadline desc" + +template::query awaiting_tasks multirow $sql + +template::release_db_handle + +set page_title "Workflow Tasks - $transition_name" Index: openacs-4/packages/cms/www/modules/workspace/assignments.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workspace/assignments.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workspace/assignments.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,57 @@ + + + + + + +
      + Tasks Checked Out By Other Users +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + You have no outstanding tasks that have been started by another user. +
      TypeTitleMy TasksDeadlineChecked out byChecked out until 
      @locked_tasks.pretty_name@@locked_tasks.title@@locked_tasks.transition_name@@locked_tasks.deadline@ + +   + + @locked_tasks.holding_user_name@ + @locked_tasks.hold_timeout@Steal
      + +
      + + + Index: openacs-4/packages/cms/www/modules/workspace/assignments.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workspace/assignments.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workspace/assignments.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,54 @@ +# assignments.tcl +# Display items which have been assigned to the +# current user but are currently checked out by someone else. +# The current user can "steal" the lock from the holding user. + + +set user_id [User::getID] + +query locked_tasks multirow " + select + types.pretty_name, + obj.object_id item_id, + content_item.get_title(obj.object_id) title, + task.task_id, + content_workflow.get_holding_user_name(task.task_id) holding_user_name, + to_char(task.hold_timeout,'Mon. DD, YYYY') hold_timeout, + assign.case_id, + trans.transition_name, trans.transition_key, + to_char(dead.deadline,'Mon. DD, YYYY') deadline + from + acs_object_types types, + acs_objects obj, + wf_case_assignments assign, + wf_transitions trans, + wf_tasks task, + wf_cases case, + wf_case_deadlines dead + where + dead.case_id = case.case_id + and + dead.transition_key = task.transition_key + and + assign.party_id = :user_id + and + assign.case_id = task.case_id + and + assign.transition_key = task.transition_key + and + task.state = 'started' + and + task.transition_key = trans.transition_key + and + assign.case_id = case.case_id + and + case.object_id = obj.object_id + and + types.object_type = content_item.get_content_type(obj.object_id) + and + task.holding_user ^= :user_id + order by + dead.deadline" + + +set page_title "Task Assignments" Index: openacs-4/packages/cms/www/modules/workspace/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workspace/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workspace/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,109 @@ + +My Work Items + + + +

      My Tasks

      + + + + + + + + + +
      + My Tasks +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      You have no outstanding tasks.
      TypeTitleMy TasksDeadline   
      @items.pretty_name@ + + @items.title@ + +   + @items.transition_name@@items.deadline@ + + + Checkout + + + + + + Steal + + + + + Check-in + + + + + + + @items.approve_string@ + + + +   + + + + + Reject + + + +   + +
      +
      + + + +

      + + +

      \ No newline at end of file Index: openacs-4/packages/cms/www/modules/workspace/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workspace/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workspace/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,67 @@ +# /workspace/index.tcl + +request create +request set_param id -datatype keyword -optional +request set_param parent_id -datatype keyword -optional +request set_param mount_point -datatype keyword -optional -value workspace + +set user_id [User::getID] + + +# first part of the where clause gets all assignments for the individual +# and for any groups to which the individual belongs. +set query " + select + types.pretty_name, + obj.object_id item_id, + content_item.get_title(obj.object_id) title, + task.task_id, + task.holding_user, + task.state, + assign.case_id, + trans.transition_name, trans.transition_key, + to_char(dead.deadline,'Mon. DD, YYYY') deadline, + content_workflow.can_reject(task.task_id, :user_id) can_reject, + content_workflow.approve_string(task.task_id, :user_id) approve_string + from + acs_object_types types, + acs_objects obj, + wf_case_assignments assign, + wf_transitions trans, + wf_tasks task, + wf_cases case, + wf_case_deadlines dead + where + dead.case_id = case.case_id + and + dead.transition_key = task.transition_key + and + assign.party_id = :user_id + and + assign.case_id = task.case_id + and + assign.transition_key = task.transition_key + and ( + task.state = 'enabled' + or (task.state = 'started' and task.holding_user = :user_id) + ) and + task.transition_key = trans.transition_key + and + assign.case_id = case.case_id + and + case.object_id = obj.object_id + and + types.object_type = content_item.get_content_type(obj.object_id) + order by + dead.deadline" + +query items multirow $query + + +# don't cache this page +#ns_set put [ns_conn outputheaders] Pragma "No-cache" + + + + + Index: openacs-4/packages/cms/www/modules/workspace/preferences.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workspace/preferences.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/workspace/preferences.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +# Form for controlling user preferences for workspace display. \ No newline at end of file Index: openacs-4/packages/cms/www/resources/Add24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Add24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Bookmarked24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Bookmarked24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Bookmarks16.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Bookmarks16.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Bookmarks24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Bookmarks24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Copy24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Copy24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Delete16.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Delete16.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Delete24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Delete24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Edit16.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Edit16.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Edit24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Edit24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Import24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Import24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Open24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Open24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Page24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Page24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Refresh16.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Refresh16.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Refresh24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Refresh24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Search24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Search24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Shortcut24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Shortcut24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/Stop24.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/Stop24.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/blank.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/blank.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/blue-box.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/blue-box.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/checked.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/checked.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/collapse.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/collapse.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/expand.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/expand.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/folder.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/folder.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/generic-item.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/generic-item.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/generic-item16.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/generic-item16.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/mark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/mark.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/open-folder.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/open-folder.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/open-shortcut.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/open-shortcut.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/shortcut.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/shortcut.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/treeBlank.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/treeBlank.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/treeSelect.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/treeSelect.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/triangle-dn.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/triangle-dn.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/triangle-up.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/triangle-up.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/unchecked.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/unchecked.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/corners/lower-left.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/corners/lower-left.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/corners/lower-right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/corners/lower-right.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/corners/upper-left.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/corners/upper-left.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms/www/resources/corners/upper-right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/resources/corners/upper-right.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms-news-demo/cms-news-demo.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/cms-news-demo.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/cms-news-demo.info 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,74 @@ + + + + + CMS News Site Demo + CMS News Site Demos + t + + + + oracle + postgresql + + Michael Pih +

      A demo news site built using CMS. + 2001-02-14 + ArsDigita Corporation + A demo news site built using CMS. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/cms-news-demo/sql/oracle/cms-news-demo-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/sql/oracle/cms-news-demo-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/sql/oracle/cms-news-demo-create.sql 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,367 @@ +-- Data model for the news site demo +-- Author: Simon Huynh (shuynh@arsdigita.com) +-- Author: Michael Pih (pihman@arsdigita.com) + + +begin + + /* Insert audio and video MIME types */ + dbms_output.put_line('Inserting audio and video MIME types...'); + + insert into cr_mime_types ( + label, mime_type, file_extension + ) values ( + 'Wave Audio File','audio/x-wav','wav' + ); + + insert into cr_mime_types ( + label, mime_type, file_extension + ) values ( + 'Basic Audio File','audio/basic','au' + ); + + insert into cr_mime_types ( + label, mime_type, file_extension + ) values ( + 'Aiff Audio File','audio/aiff','aif' + ); + + insert into cr_mime_types ( + label, mime_type, file_extension + ) values ( + 'AVI Video','video/x-msvideo','avi' + ); + + insert into cr_mime_types ( + label, mime_type, file_extension + ) values ( + 'QuickTime Video','video/quicktime','qt' + ); + + insert into cr_mime_types ( + label, mime_type, file_extension + ) values ( + 'Mpeg Video','video/mpeg','mpg' + ); + + insert into cr_mime_types ( + label, mime_type, file_extension + ) values ( + 'ADP Text', 'text/adp', 'adp' + ); + + -- register text/adp mime type to templates + content_type.register_mime_type( + content_type => 'content_template', + mime_type => 'text/adp' + ); + +end; +/ +show errors + + +/* Data model for cr_demo_articles */ + +create table cr_demo_articles ( + cr_demo_article_id integer + constraint cr_demo_articles_id_fk + references cr_revisions + constraint cr_demo_articles_id_pk + primary key, + location varchar(500), + author varchar(500), + type varchar(500) +); + + +declare + attr_id integer; +begin + dbms_output.put_line('Creating cr_demo_article content type...'); + + content_type.create_type ( + content_type => 'cr_demo_article', + supertype => 'content_revision', + pretty_name => 'Article', + pretty_plural => 'Articles', + table_name => 'cr_demo_articles', + id_column => 'cr_demo_article_id' + ); + + attr_id := content_type.create_attribute ( + content_type => 'cr_demo_article', + attribute_name => 'location', + datatype => 'text', + pretty_name => 'Location', + pretty_plural => 'Locations' + ); + + + cm_form_widget.register_attribute_widget ( + content_type => 'cr_demo_article', + attribute_name => 'location', + widget => 'select', + is_required => 't' + ); + + cm_form_widget.set_attribute_param_value ( + content_type => 'cr_demo_article', + attribute_name => 'location', + param => 'options', + value => '{Berkeley Berkeley} {Boston Boston} {{Los Angeles} {Los Angeles}} {Munich Munich} {Tokyo Tokyo}', + param_type => 'onevalue', + param_source => 'literal' + ); + + attr_id := content_type.create_attribute ( + content_type => 'cr_demo_article', + attribute_name => 'author', + datatype => 'text', + pretty_name => 'Author', + pretty_plural => 'Authors' + ); + + cm_form_widget.register_attribute_widget( + content_type => 'cr_demo_article', + attribute_name => 'author', + widget => 'text', + is_required => 't' + ); + + cm_form_widget.set_attribute_param_value ( + content_type => 'cr_demo_article', + attribute_name => 'author', + param => 'maxlength', + param_type => 'onevalue', + param_source => 'literal', + value => '50' + ); + + attr_id := content_type.create_attribute ( + content_type => 'cr_demo_article', + attribute_name => 'type', + datatype => 'keyword', + pretty_name => 'Type', + pretty_plural => 'Types' + ); + + cm_form_widget.register_attribute_widget( + content_type => 'cr_demo_article', + attribute_name => 'type', + widget => 'select', + is_required => 't' + ); + + cm_form_widget.set_attribute_param_value ( + content_type => 'cr_demo_article', + attribute_name => 'type', + param => 'options', + value => '{News news} {Sports sports} {Features features} {Editorial editorial} {Column column}', + param_type => 'onevalue', + param_source => 'literal' + ); + + content_type.register_mime_type( + content_type => 'cr_demo_article', + mime_type => 'text/plain' + ); + + content_type.register_mime_type( + content_type => 'cr_demo_article', + mime_type => 'text/html' + ); + + content_type.register_mime_type( + content_type => 'cr_demo_article', + mime_type => 'text/rtf' + ); + +end; +/ +show errors + + + +/* Data model for cr_demo_article_images */ + +create table cr_demo_article_images ( + article_image_id integer + constraint cr_demo_article_images_id_fk + references images + constraint cr_demo_article_images_id_pk + primary key, + caption varchar(4000) +); + +declare + attr_id integer; +begin + dbms_output.put_line('Creating cr_demo_article_image content type...'); + + content_type.create_type ( + content_type => 'cr_demo_article_image', + supertype => 'image', + pretty_name => 'Captioned Image', + pretty_plural => 'Captioned Images', + table_name => 'cr_demo_article_images', + id_column => 'article_image_id' + ); + + attr_id := content_type.create_attribute ( + content_type => 'cr_demo_article_image', + attribute_name => 'caption', + datatype => 'text', + pretty_name => 'Caption', + pretty_plural => 'Captions' + ); + + cm_form_widget.register_attribute_widget( + content_type => 'cr_demo_article_image', + attribute_name => 'caption', + widget => 'text', + is_required => 't' + ); + + content_type.register_mime_type( + content_type => 'cr_demo_article_image', + mime_type => 'image/jpeg' + ); + + content_type.register_mime_type( + content_type => 'cr_demo_article_image', + mime_type => 'image/gif' + ); + +end; +/ +show errors + + + +/* Data model for cr_demo_links */ + +create table cr_demo_links ( + link_id integer + constraint cr_demo_links_id_fk + references cr_revisions + constraint cr_demo_links_pk + primary key, + type varchar(500), + ref_tag varchar(1000), + caption varchar(4000) +); + +declare + attr_id integer; +begin + dbms_output.put_line('Creating cr_demo_links content type...'); + + content_type.create_type ( + content_type => 'cr_demo_link', + supertype => 'content_revision', + pretty_name => 'Multimedia Link', + pretty_plural => 'Multimedia Links', + table_name => 'cr_demo_links', + id_column => 'link_id' + ); + + attr_id := content_type.create_attribute ( + content_type => 'cr_demo_link', + attribute_name => 'type', + datatype => 'keyword', + pretty_name => 'Type', + pretty_plural => 'Types' + ); + + cm_form_widget.register_attribute_widget( + content_type => 'cr_demo_link', + attribute_name => 'type', + widget => 'select', + is_required => 't' + ); + + cm_form_widget.set_attribute_param_value ( + content_type => 'cr_demo_link', + attribute_name => 'type', + param => 'options', + value => '{Audio audio} {Video video}', + param_type => 'onevalue', + param_source => 'literal' + ); + + attr_id := content_type.create_attribute ( + content_type => 'cr_demo_link', + attribute_name => 'caption', + datatype => 'text', + pretty_name => 'Caption', + pretty_plural => 'Captions' + ); + + cm_form_widget.register_attribute_widget( + content_type => 'cr_demo_link', + attribute_name => 'caption', + widget => 'textarea', + is_required => 't' + ); + + content_type.register_mime_type( + content_type => 'cr_demo_link', + mime_type => 'audio/x-wav' + ); + + content_type.register_mime_type( + content_type => 'cr_demo_link', + mime_type => 'audio/aiff' + ); + + content_type.register_mime_type( + content_type => 'cr_demo_link', + mime_type => 'audio/basic' + ); + + content_type.register_mime_type( + content_type => 'cr_demo_link', + mime_type => 'video/x-msvideo' + ); + + content_type.register_mime_type( + content_type => 'cr_demo_link', + mime_type => 'video/quicktime' + ); + + content_type.register_mime_type( + content_type => 'cr_demo_link', + mime_type => 'video/mpeg' + ); + +end; +/ +show errors + + + + +/* Registering relationship types for cr_demo_article */ + +begin + dbms_output.put_line('Registering relationship types to cr_demo_article...'); + + + content_type.register_child_type ( + parent_type => 'cr_demo_article', + child_type => 'cr_demo_article_image', + relation_tag => 'demo_article_image', + min_n => 0 + ); + + content_type.register_child_type ( + parent_type => 'cr_demo_article', + child_type => 'cr_demo_link', + relation_tag => 'demo_article_mm_link', + min_n => 0 + ); + +end; +/ +show errors Index: openacs-4/packages/cms-news-demo/tcl/cms-news-demo-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/tcl/cms-news-demo-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/tcl/cms-news-demo-procs.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,115 @@ +# procs to publish audio and video mime types + + +namespace eval cms_news {} + +# Util procedure to fetch the URL of the cms-news-demo package static page root +proc cms_news::get_static_content_root {} { + set package_id [apm_package_id_from_key "cms-news-demo"] + set static_root [ad_parameter -package_id $package_id StaticPageRoot \ + "cms-news-demo" ""] + return $static_root +} + + +set package_id [apm_package_id_from_key "cms-news-demo"] +set static_root [ad_parameter -package_id $package_id StaticPageRoot \ + "cms-news-demo" ""] + + + +namespace eval publish { + variable item_id_stack + variable main_item_id + variable main_revision_id + + variable revision_html + + + namespace eval handle {} +} + + +# Publish the audio file to the filesystem and create an tag +proc publish::handle::audio { item_id args } { + + template::util::get_opts $args + + if { [template::util::is_nil opts(revision_id)] } { + set revision_id [item::get_live_revision $item_id] + } else { + set revision_id $opts(revision_id) + } + + # If the embed tag is true, return the html. Otherwise, + # just write the file to the filesystem + if { [info exists opts(embed)] } { + + set file_url [publish::write_content $revision_id \ + -item_id $item_id -get_url] + + # If write_content aborted, give up + if { [template::util::is_nil file_url] } { + return "" + } + + # Try to use the registered template for the file + if { ![info exists opts(no_merge)] } { + set code "publish::merge_with_template $item_id $args" + set html [eval $code] + if { ![template::util::is_nil html] } { + return $html + } + } + + # Merging failed, output a straight tag + + template::query audio_info onerow " + select caption, type from cr_demo_links where link_id = :revision_id + " -cache "audio_info $revision_id" + + template::util::array_to_vars audio_info + + # Concatenate all the extra html arguments into a string + if { [info exists opts(html)] } { + set extra_html [publish::html_args $opts(html)] + } else { + set extra_html "" + } + + + if { ![template::util::is_nil type] \ + && ![template::util::is_nil caption] } { + + switch -exact -- $type { + audio { + set link "\"Listen\"" + } + video { + set link "\"Watch\"" + } + default { + set link "" + } + } + + set html "$link + $caption" + } + + append html $extra_html + return $html + } else { + ns_log notice \ + "WARNING: publish::handle_audio: No embed specified for audio, aborting" + return "" + } + +} + + + +# Publish the video file to the filesystem and create an tag +proc publish::handle::video { item_id args } { + return [eval publish::handle::audio $item_id $args] +} Index: openacs-4/packages/cms-news-demo/templates/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/master.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,60 @@ + + + @content.title@ + + + + + + + +
      + DNN
      Demo News Network
      +
      @content.title@
      +
      + + + + +
      @folders.title@ : +
      + + @folders.title@ + + + +
      + +
      + +@content.text@ + + + +
      + +
      + +Copyright © 2000 Demo News Network. All Rights Reserved. + + + Index: openacs-4/packages/cms-news-demo/templates/master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/master.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/master.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,3 @@ +content::get_content + +content::get_folder_labels Index: openacs-4/packages/cms-news-demo/templates/demo_articles/article-link-template.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/article-link-template.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/article-link-template.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,14 @@ + + Listen + + + Watch + + +@caption@ + + + + + + Index: openacs-4/packages/cms-news-demo/templates/demo_articles/article-link-template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/article-link-template.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/article-link-template.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,7 @@ +content::get_content +template::util::array_to_vars content + +set url [item::get_extended_url $item_id] + +set static_root [cms_news::get_static_content_root] + Index: openacs-4/packages/cms-news-demo/templates/demo_articles/article-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/article-list.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/article-list.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,41 @@ + + + Published articles by location: +

      + + + + + + + + + + + + +
      + + + @articles.location@ + + + @articles.location@ + +
      +      + + + + + @articles.title@ + + + @articles.title@ + + +
      + + + +
      Index: openacs-4/packages/cms-news-demo/templates/demo_articles/article-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/article-list.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/article-list.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,41 @@ +# @datasource articles multirow +# @column location +# @column name +# @column title +# @onevalue location the user clicked location + +# @onevalue current_url + +set current_url [ns_conn url] + +request create +request set_param title -datatype text -value "" +request set_param location -datatype text -optional + +request set_param location_color -datatype text +request set_param article_link_color -datatype text + + +template::query articles multirow " + select + live_revision, location, title, name, + content_item.get_path( i.item_id ) as url + from + cr_items i, cr_demo_articles a, cr_revisions r + where + i.live_revision = r.revision_id + and + r.item_id = i.item_id + and + r.revision_id = a.cr_demo_article_id + and + i.publish_status = 'live' + order by + location, title, name +" -eval { + + set row(encoded_location) [ns_urlencode $row(location)] +} + + +set static_root [cms_news::get_static_content_root] Index: openacs-4/packages/cms-news-demo/templates/demo_articles/article-template-1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/article-template-1.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/article-template-1.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,26 @@ + +@title@ + + + + + + + +
      + +   + +

      + + + +
      +
      +
      +

      + + + + + Index: openacs-4/packages/cms-news-demo/templates/demo_articles/article-template-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/article-template-1.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/article-template-1.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,16 @@ +content::get_content +template::util::array_to_vars content + + +template::query links multirow " + select + relation_tag + from + cr_child_rels + where + relation_tag = 'cr_demo_article-cr_demo_link' + and + parent_id = :item_id + order by + order_n +" \ No newline at end of file Index: openacs-4/packages/cms-news-demo/templates/demo_articles/article-template-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/article-template-2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/article-template-2.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,41 @@ + +@title@ + + + + + + + + + + + +
      + DNN News : @title@ +
      + @title@
      +     by @author@ +

      + +

      + +

      +   +

      + + +

      Multimedia Links

      + + + +
      +
      +
      + +
      + + + + + Index: openacs-4/packages/cms-news-demo/templates/demo_articles/article-template-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/article-template-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/article-template-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,15 @@ +content::get_content +template::util::array_to_vars content + +template::query links multirow " + select + relation_tag + from + cr_child_rels + where + relation_tag = 'cr_demo_article-cr_demo_link' + and + parent_id = :item_id + order by + order_n +" Index: openacs-4/packages/cms-news-demo/templates/demo_articles/captioned-image-template.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/captioned-image-template.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/captioned-image-template.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,15 @@ + + + + + + + +
      + +
      + @caption@ +
      + + + Index: openacs-4/packages/cms-news-demo/templates/demo_articles/captioned-image-template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/captioned-image-template.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/captioned-image-template.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,7 @@ +content::get_content +template::util::array_to_vars content + + +if { ![template::util::is_nil width] && $width < 150 } { + set width 150 +} \ No newline at end of file Index: openacs-4/packages/cms-news-demo/templates/demo_articles/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/index.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,25 @@ + + + +

      + + + + + + + + + + + + + +
      \@items.publish_date\@       \@items.title\@
      + + + + + + + Index: openacs-4/packages/cms-news-demo/templates/demo_articles/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/index.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,24 @@ +# List latest live press releases + +# Get the folder + +set query " + select + r.title, initcap(to_char(r.publish_date, 'MONTH DD, YYYY')) publish_date, + r.description, i.name + from + cr_revisions r, cr_items i, acs_objects o + where + o.context_id = content_item.get_id('/demo_articles') + and + o.object_id = i.item_id + and + i.live_revision = r.revision_id + and + i.publish_status = 'live' + and + i.name ^= 'index' + order by + publish_date" + +query items multirow $query Index: openacs-4/packages/cms-news-demo/templates/demo_articles/master-1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/master-1.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/master-1.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,59 @@ + + +@title@ + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + +
      +

      Article: @title@

      +
      +
       
      + + + + + +
      + + + + + +
      +
       
       
      + + + + + + Index: openacs-4/packages/cms-news-demo/templates/demo_articles/master-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/master-1.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/master-1.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,7 @@ +set current_url [ns_conn url] + +request create +request set_param title -value "" +request set_param location -optional -datatype text + +set static_root [cms_news::get_static_content_root] Index: openacs-4/packages/cms-news-demo/templates/demo_articles/master-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/master-2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/master-2.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,44 @@ + + + DNN News - @title@ + + + + + + + + + + + + + + + + + + + + + + +
      +

      DNN.com

      +
      + +
      + +
      +
      + + +
      + +
      +
      + This demo site was created with the Arsdigita Content Management System. +
      + + + Index: openacs-4/packages/cms-news-demo/templates/demo_articles/master-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/templates/demo_articles/master-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/templates/demo_articles/master-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,45 @@ +# @datasource multirow articles +# @column location +# @column name +# @column title +# @onevalue location the user clicked location + + +request create +request set_param title -datatype text -value "" +request set_param location -datatype text -optional + +if { ![template::util::is_nil location] } { + set where_clause "where location in '$location'" +} else { + set where_clause "" +} + + +template::query articles multirow " + select + live_revision, location, title, name + from + cr_items i, cr_demo_articles a, cr_revisions r + where + i.live_revision = r.revision_id + and + r.item_id = i.item_id + and + r.revision_id = a.cr_demo_article_id + and + i.publish_status = 'live' + order by + location, title, name" + + +lappend articles:columns encoded_location + +set rowcount [multirow size articles] + +for {set i 1} {$i <= $rowcount } {incr i} { + set articles:[set i](encoded_location) [ns_urlencode [multirow get articles $i location]] +} + + +set static_root [cms_news::get_static_content_root] \ No newline at end of file Index: openacs-4/packages/cms-news-demo/www/install-wizard-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/install-wizard-2.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/www/install-wizard-2.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,51 @@ + + + CMS News Site Demo Installation Wizard + + + +

      CMS News Site Demo Installation Wizard

      + + + + +
      + + + +
      + + Creating folders and templates for the CMS News Demo... +
        + +
      • Folders and templates for the CMS News Site Demo have + already been created. + + + + @html@ + +
      +

      + + Publishing templates to the file system... +

        + +
      • News Demo templates have already been published to the filesystem. + + + + @html2@ + +
      +

      + +

      + +
      +
      +
      + + + + \ No newline at end of file Index: openacs-4/packages/cms-news-demo/www/install-wizard-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/install-wizard-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/www/install-wizard-2.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,577 @@ +# install-wizard-2.tcl +# +# A web interface for installing the CMS News Site Demo +# Step 2: Create demo folders and templates +# +# @author Michael Pih + + + +# check if the news demo folders have been created +# by checking if the demo_articles folder exists under the +# templates root and the sitemap root + +set db [template::get_db_handle] + +template::query demo_folders onevalue " + select + count(1) + from + cr_items + where + ( parent_id = content_item.get_root_folder + or + parent_id = content_template.get_root_folder ) + and + name = 'demo_articles' + and + content_type = 'content_folder' +" -db $db + +if { $demo_folders != 2 } { + set demo_folders_p f +} else { + set demo_folders_p t +} + + + +# check if templates have been published by counting the number +# of live templates in the /demo_articles folder under the +# templates mount point + +template::query published_templates onevalue " + select + count(1) + from + cr_items + where + publish_status = 'live' + and + live_revision is not null + and + content_type = 'content_template' + and + parent_id = ( select + item_id + from + cr_items + where + parent_id = content_template.get_root_folder + and + name = 'demo_articles' + and + content_type = 'content_folder' ) +" -db $db + +if { $published_templates < 8 } { + set published_templates_p f +} else { + set published_templates_p t +} + + + +# get the user id of a cm_admin + +template::query cm_admin onevalue " + select + distinct user_id + from + users u, cm_modules m + where + cms_permission.permission_p( + content_item.get_root_folder, user_id, 'cm_admin') = 't' + and + cms_permission.permission_p( + content_template.get_root_folder, user_id, 'cm_admin') = 't' + and + cms_permission.permission_p( + module_id, user_id, 'cm_admin') = 't' + and + user_id = [User::getID] +" -db $db + +template::release_db_handle + +if { [template::util::is_nil cm_admin] } { + template::forward install-wizard + return +} else { + set cm_admin_p t +} + + +# some default variables +set creation_ip [ns_conn peeraddr] +set user_id $cm_admin + + + +# create the demo folders and templates +if { $demo_folders != 2 } { + + # create folders and templates + + set html "" + + set db [template::begin_db_transaction] + + # some root folders + template::query sitemap onevalue " + select content_item.get_root_folder from dual + " -db $db + + template::query templates onevalue " + select content_template.get_root_folder from dual + " -db $db + + + # create demo_articles folder + ns_ora exec_plsql_bind $db " + begin + :folder_id := content_folder.new ( + name => 'demo_articles', + label => 'Demo Articles', + description => 'Articles for publication', + creation_user => :user_id, + creation_ip => :creation_ip, + parent_id => :sitemap + ); + end; + " folder_id + + append html "
    10. Created /demo_articles folder under the sitemap." + + # register content types to demo_articles folder + ns_ora dml $db " + begin + delete from cr_folder_type_map + where folder_id = :folder_id; + + content_folder.register_content_type( + folder_id => :folder_id, + content_type => 'cr_demo_article' + ); + + content_folder.register_content_type( + folder_id => :folder_id, + content_type => 'content_revision' + ); + end;" + + append html "
    11. Registered content types to /demo_articles." + + # create article index + ns_ora exec_plsql_bind $db " + begin + :item_id := content_item.new ( + name => 'index', + parent_id => :folder_id, + content_type => 'content_revision', + title => 'Article Index', + text => 'All curent articles', + is_live => 't', + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; + " item_id + + append html "
    12. Created /demo_articles/index content item." + + # create demo templates folder and templates + ns_ora exec_plsql_bind $db " + begin + :folder_id := content_folder.new ( + name => 'demo_articles', + label => 'Demo Article Templates', + description => 'Templates for demo articles and links', + creation_user => :user_id, + creation_ip => :creation_ip, + parent_id => :templates + ); + end; + " folder_id + + append html "
    13. Created /demo_articles folder under the templates mount point." + + # register content type to the folder + ns_ora dml $db " + begin + content_folder.register_content_type ( + folder_id => :folder_id, + content_type => 'content_template' + ); + end;" + + append html "
    14. Registered templates to the /demo_articles folder." + + # create index template + ns_ora exec_plsql_bind $db " + begin + :template_id := content_template.new ( + name => 'index', + parent_id => :folder_id, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; + " template_id + + # make the index template an adp file + ns_ora dml $db " + update cr_revisions + set mime_type = 'text/adp' + where item_id = :template_id" + + append html "
    15. Created /demo_articles/index template for articles index page." + + # register template index template to content_revision and index page + ns_ora dml $db " + begin + content_type.register_template ( + content_type => 'content_revision', + template_id => :template_id, + use_context => 'public', + is_default => 'f' + ); + + content_item.register_template ( + item_id => :item_id, + template_id => :template_id, + use_context => 'public' + ); + end;" + + append html "
    16. Registered the index page template to /demo_articles/index." + + + # create more templates + ns_ora exec_plsql_bind $db " + begin + :template_id := content_template.new ( + name => 'master-1', + parent_id => :folder_id, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; + " template_id + + append html "
    17. Created /demo_articles/master-1 master template." + + ns_ora exec_plsql_bind $db " + begin + :template_id := content_template.new ( + name => 'article-template-1', + parent_id => :folder_id, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; + " template_id + + append html "
    18. Created /demo_articles/article-template-1 article template." + + # register template to articles + ns_ora dml $db " + begin + content_type.register_template ( + content_type => 'cr_demo_article', + template_id => :template_id, + use_context => 'public', + is_default => 't' + ); + end;" + + append html "
    19. Registered the article template as the default for articles." + + # more article templates + ns_ora exec_plsql_bind $db " + begin + :template_id := content_template.new ( + name => 'master-2', + parent_id => :folder_id, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; + " template_id + + append html "
    20. Createed /demo_articles/master-2 master template." + + ns_ora exec_plsql_bind $db " + begin + :template_id := content_template.new ( + name => 'article-template-2', + parent_id => :folder_id, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; + " template_id + + append html "
    21. Created /demo_articles/article-template-2 article template." + + ns_ora dml $db " + begin + content_type.register_template ( + content_type => 'cr_demo_article', + template_id => :template_id, + use_context => 'public', + is_default => 'f' + ); + end;" + + append html "
    22. Registered the 2nd article template to articles." + + # article list template + ns_ora exec_plsql_bind $db " + begin + :template_id := content_template.new ( + name => 'article-list', + parent_id => :folder_id, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; + " template_id + + append html "
    23. Created /demo_articles/article-list template for listing articles." + + # multimedia link template + ns_ora exec_plsql_bind $db " + begin + :template_id := content_template.new ( + name => 'article-link-template', + parent_id => :folder_id, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; + " template_id + + append html "
    24. Created /demo_articles/article-link-template." + + + ns_ora dml $db " + begin + content_type.register_template ( + content_type => 'cr_demo_link', + template_id => :template_id, + use_context => 'public', + is_default => 't' + ); + end;" + + append html "
    25. Registered /demo_articles/article-link-template + to the cr_demo_link content type." + + # captioned image template + ns_ora exec_plsql_bind $db " + begin + :template_id := content_template.new ( + name => 'captioned-image-template', + parent_id => :folder_id, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; + " template_id + + append html "
    26. Created /demo_articles/captioned-image-template." + + ns_ora dml $db " + begin + content_type.register_template ( + content_type => 'cr_demo_article_image', + template_id => :template_id, + use_context => 'public', + is_default => 't' + ); + end;" + + append html "
    27. Registered /demo_articles/captioned-image-template + to the cr_demo_article_image content type." + + # master template + ns_ora exec_plsql_bind $db " + begin + :template_id := content_template.new ( + name => 'master', + parent_id => :templates, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; + " template_id + + append html "
    28. Created /master, the demo master template." + + template::end_db_transaction +} + + + +set published_templates 0 + + +# publish templates to the file system + +set html2 "" + +if { $published_templates < 8 } { + + # the phyiscal (destination) location where the templates will be published + set template_root [content::get_template_root] + + # the physical location where the cms-news-demo package resides + set package_key [apm_package_key_from_id [ad_conn package_id]] + set package_root [acs_package_root_dir $package_key] + + set demo_templates_list { + /master + /demo_articles/captioned-image-template + /demo_articles/index + /demo_articles/article-list + /demo_articles/article-link-template + /demo_articles/master-1 + /demo_articles/master-2 + /demo_articles/article-template-1 + /demo_articles/article-template-2 + } + + # upload and publish each template + + foreach template $demo_templates_list { + + set revision_id [content::get_object_id] + set tmpfile "$package_root/templates$template.adp" + + set db [template::begin_db_transaction] + + template::query template_id onevalue " + select + content_item.get_id( :template, content_template.get_root_folder ) + from + dual + " -db $db + + # upload the template + + # this is safe because none of the templates exceeds the max size + set adp_text [template::util::read_file $tmpfile] + + template::query index_template onevalue " + select + item_id + from + cr_items + where + item_id = content_item.get_id( '/demo_articles/index', + content_template.get_root_folder ) + " -db $db + + if { $template_id == $index_template } { + set mime_type "text/adp" + } else { + set mime_type "text/html" + } + + ns_ora exec_plsql_bind $db " + begin + :revision_id := content_revision.new ( + revision_id => :revision_id, + item_id => :template_id, + title => 'News Demo Template', + mime_type => :mime_type, + text => :adp_text, + creation_user => :user_id, + creation_ip => :creation_ip + ); + end; + " revision_id + + ns_ora dml $db " + update cr_items + set live_revision = :revision_id, + publish_status = 'live' + where item_id = :template_id" + + template::end_db_transaction + + # publish the template to the file system and set the live revision + set text [content::get_content_value $revision_id] + set path "$template_root$template" + + util::write_file $path.adp $text + + append html2 "
    29. Published $path.adp." + } + + ############################## + # copy the datasources (tcl files) to the template root + + set datasource_list { + /master + /demo_articles/captioned-image-template + /demo_articles/article-link-template + /demo_articles/article-list + /demo_articles/article-template-1 + /demo_articles/article-template-2 + /demo_articles/master-1 + /demo_articles/master-2 + /demo_articles/index + } + + foreach datasource $datasource_list { + set tmpfile "$package_root/templates$datasource.tcl" + set tcl_text [template::util::read_file $tmpfile] + set path "$template_root$datasource" + util::write_file $path.tcl $tcl_text + append html2 "
    30. Wrote $path.tcl.
      " + } + + + # copy the index.tcl datasource to the publish root(s) + set tmpfile "$package_root/templates/demo_articles/index.tcl" + set tcl_text [template::util::read_file $tmpfile] + + publish::write_multiple_files "/demo_articles/index.tcl" $tcl_text + append html2 "
    31. Copied $path.tcl.
      " + + # publish the index item + template::query revision_id onevalue " + select + live_revision + from + cr_items + where + item_id = content_item.get_id('/demo_articles/index')" + + publish::publish_revision $revision_id + append html2 "
    32. Published /demo_articles/index.
      " + +} + + + + + + + + +# create buttons to go to the next step +form create install +element create install submit \ + -datatype text \ + -widget submit \ + -label "Continue >>" + +if { [form is_valid install] } { + + template::forward install-wizard-3 + +} + Index: openacs-4/packages/cms-news-demo/www/install-wizard-3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/install-wizard-3.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/www/install-wizard-3.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,39 @@ + + + CMS News Site Demo Installation Wizard + + + +

      CMS News Site Demo Installation Wizard

      + + + + + +
      + + + +
      + + Registering basic users for the CMS News Demo... +
        + +
      • Demo users have already been created. + + + + @html@ + +
      +

      + +

      + +
      +
      + +
      + + + \ No newline at end of file Index: openacs-4/packages/cms-news-demo/www/install-wizard-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/install-wizard-3.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/www/install-wizard-3.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,132 @@ +# install-wizard-3.tcl +# +# A web interface for installing the CMS News Site Demo +# Step 3: Register Demo Users +# +# @author Michael Pih + + + +set db [template::get_db_handle] + +# get the user id of a cm_admin +template::query cm_admin onevalue " + select + distinct user_id + from + users u, cm_modules m + where + cms_permission.permission_p( + content_item.get_root_folder, user_id, 'cm_admin') = 't' + and + cms_permission.permission_p( + content_template.get_root_folder, user_id, 'cm_admin') = 't' + and + cms_permission.permission_p( + module_id, user_id, 'cm_admin') = 't' + and + user_id = [User::getID] +" -db $db + + +# check if author, editor, and publisher users have been created +template::query demo_users onevalue " + select + count(1) + from + users + where + screen_name in ('author','editor','publisher') +" -db $db + +if { $demo_users < 3 } { + set demo_users_p f +} else { + set demo_users_p t +} + + +template::release_db_handle + +if { [template::util::is_nil cm_admin] } { + template::forward install-wizard + return +} else { + set cm_admin_p t +} + + +# some default variables +set creation_ip [ns_conn peeraddr] +set user_id $cm_admin + + + + + + +# register demo users if not already registered: +# author, editor, publisher + +set html "" + +if { $demo_users < 3 } { + + set db [template::begin_db_transaction] + + set demo_user_list \ + { {Author author} {Editor editor} {Publisher publisher} } + + foreach demo_user $demo_user_list { + set name [lindex $demo_user 0] + set screen_name [lindex $demo_user 1] + + # check if the user exists already + template::query user_exists_p onevalue " + select + count(1) + from + users + where + screen_name = :screen_name + " -db $db + + # if the user doesn't exists, create the user + if { $user_exists_p == 0 } { + + append html "
    33. Creating $name... " + + set password $screen_name + set email "${screen_name}@host.com" + + set user_id [ad_user_new $email $name $name $password "" ""] + + ns_ora dml $db " + update users + set screen_name = :screen_name + where user_id = :user_id" + + append html "created.
      " + + } else { + append html "
    34. $name already exists.
      " + } + } + + template::end_db_transaction +} + + + +# create buttons to go to the next step +form create install +element create install submit \ + -datatype text \ + -widget submit \ + -label "Continue >>" + +if { [form is_valid install] } { + + template::forward install-wizard-4 + +} \ No newline at end of file Index: openacs-4/packages/cms-news-demo/www/install-wizard-4.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/install-wizard-4.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/www/install-wizard-4.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,36 @@ + + + CMS News Site Demo Installation Wizard + + + +

      CMS News Site Demo Installation Wizard

      + + + +
      + + + +
      + + Granting permissions to demo users... +
        + + @html@ +
      +

      + +

      + +

      Finished!

      + +
      +
      + + + + + + + Index: openacs-4/packages/cms-news-demo/www/install-wizard-4.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/install-wizard-4.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/www/install-wizard-4.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,194 @@ +# install-wizard-3.tcl +# +# A web interface for installing the CMS News Site Demo +# Step 4: Grant permissions to demo users +# +# @author Michael Pih + +set html "" + +set db [template::get_db_handle] + +# get the user id of a cm_admin +template::query cm_admin onevalue " + select + distinct user_id + from + users u, cm_modules m + where + cms_permission.permission_p( + content_item.get_root_folder, user_id, 'cm_admin') = 't' + and + cms_permission.permission_p( + content_template.get_root_folder, user_id, 'cm_admin') = 't' + and + cms_permission.permission_p( + module_id, user_id, 'cm_admin') = 't' + and + user_id = [User::getID] +" -db $db + + +template::release_db_handle + +if { [template::util::is_nil cm_admin] } { + template::forward install-wizard + return +} else { + set cm_admin_p t +} + + +# some default variables +set creation_ip [ns_conn peeraddr] +set user_id $cm_admin + + + + + +# grant permissions to demo users + +set db [template::begin_db_transaction] + +# some root folders +template::query sitemap onevalue " + select content_item.get_root_folder from dual +" -db $db + +template::query templates onevalue " + select content_template.get_root_folder from dual +" -db $db + +# some user ID's +template::query author onevalue " + select user_id from users where screen_name = 'author' +" -db $db + +template::query editor onevalue " + select user_id from users where screen_name = 'editor' +" -db $db + +template::query publisher onevalue " + select user_id from users where screen_name = 'publisher' +" -db $db + + +# some folder/module ID's +template::query demo_articles onevalue " + select content_item.get_id( '/demo_articles' ) from dual +" -db $db + +template::query other_modules onelist " + select module_id from cm_modules where key ^= 'sitemap' +" -db $db + + +# grant permissions +ns_ora dml $db " + begin + cms_permission.grant_permission ( + item_id => :sitemap, + holder_id => :user_id, + privilege => 'cm_examine', + recepient_id => :author, + is_recursive => 't' + ); + + cms_permission.grant_permission ( + item_id => :demo_articles, + holder_id => :user_id, + privilege => 'cm_write', + recepient_id => :author, + is_recursive => 't' + ); + + cms_permission.grant_permission ( + item_id => :sitemap, + holder_id => :user_id, + privilege => 'cm_examine', + recepient_id => :editor, + is_recursive => 't' + ); + + cms_permission.grant_permission ( + item_id => :demo_articles, + holder_id => :user_id, + privilege => 'cm_write', + recepient_id => :editor, + is_recursive => 't' + ); + + cms_permission.grant_permission ( + item_id => :sitemap, + holder_id => :user_id, + privilege => 'cm_item_workflow', + recepient_id => :publisher, + is_recursive => 't' + ); + + cms_permission.grant_permission ( + item_id => :sitemap, + holder_id => :user_id, + privilege => 'cm_relate', + recepient_id => :publisher, + is_recursive => 't' + ); + + end;" + +append html "
    35. Granted cm_examine to author on sitemap." +append html "
    36. Granted cm_write to author on /demo_articles folder." +append html "
    37. Granted cm_examine to editor on sitemap." +append html "
    38. Granted cm_write to editor on /demo_articles folder." +append html "
    39. Granted cm_item_relate, cm_item_workflow to publisher on sitemap." + + +foreach module_id $other_modules { + ns_ora dml $db " + begin + cms_permission.grant_permission ( + item_id => :module_id, + holder_id => :user_id, + privilege => 'cm_examine', + recepient_id => :author, + is_recursive => 't' + ); + end;" +} + +append html "
    40. Granted cm_examine to author on all other modules." + +foreach module_id $other_modules { + ns_ora dml $db " + begin + cms_permission.grant_permission ( + item_id => :module_id, + holder_id => :user_id, + privilege => 'cm_examine', + recepient_id => :editor, + is_recursive => 't' + ); + end;" +} + +append html "
    41. Granted cm_examine to editor on all other modules." + +foreach module_id $other_modules { + ns_ora dml $db " + begin + cms_permission.grant_permission ( + item_id => :module_id, + holder_id => :user_id, + privilege => 'cm_write', + recepient_id => :publisher, + is_recursive => 't' + ); + end;" +} + +append html "
    42. Granted cm_write to publisher on all other modules." + +template::end_db_transaction + + Index: openacs-4/packages/cms-news-demo/www/install-wizard.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/install-wizard.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/www/install-wizard.adp 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,55 @@ + + + CMS News Site Demo Installation Wizard + + + +

      CMS News Site Demo Installation Wizard

      + + + +
        +
      • The CMS News Demo data model has not been properly loaded. + Please load the data model and return here when finished. +
      +
      + + + + +
        +
      • You are not a CMS Administrator. The CMS News Demo installation + requires an existing CMS administrator. +
      +
      + + + + + +
      + + + +
      + + CMS News Demo prerequisites check... +
        +
      • The CMS News Demo data model has been loaded. +
      • You are a CMS administrator. +
      +

      + +

      + +
      +
      +
      +
      + +
      + + + + + \ No newline at end of file Index: openacs-4/packages/cms-news-demo/www/install-wizard.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/install-wizard.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/www/install-wizard.tcl 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,83 @@ +# install-wizard.tcl +# +# A web interface for installing the CMS News Site Demo +# @author Michael Pih + + + +# check if the news demo data model has been installed +# by checking if the cr_demo_article, cr_demo_article_image, and cr_demo_link +# content types exist + +set db [template::get_db_handle] + +template::query news_demo_content_types onevalue " + select + count(1) + from + acs_object_types + where + object_type in ('cr_demo_article','cr_demo_article_image', 'cr_demo_link') +" -db $db + + +if { $news_demo_content_types != 3 } { + template::release_db_handle + set data_model_p f + return +} else { + set data_model_p t +} + + + + +# check if a cm_admin user exists -- a user who has the 'cm_admin' privilege +# on the CMS root folders and CMS modules + +template::query cm_admin onevalue " + select + distinct user_id + from + users u, cm_modules m + where + cms_permission.permission_p( + content_item.get_root_folder, user_id, 'cm_admin') = 't' + and + cms_permission.permission_p( + content_template.get_root_folder, user_id, 'cm_admin') = 't' + and + cms_permission.permission_p( + module_id, user_id, 'cm_admin') = 't' + and + user_id = [User::getID] +" -db $db + +template::release_db_handle + +if { [template::util::is_nil cm_admin] } { + set cm_admin_p f + return +} else { + set cm_admin_p t +} + + + + + +# if the data model has been installed and an admin user exists, +# create buttons to go to the next step +form create install +element create install submit \ + -datatype text \ + -widget submit \ + -label "Continue >>" + + +if { [form is_valid install] } { + + template::forward install-wizard-2 + +} + Index: openacs-4/packages/cms-news-demo/www/doc/demo-news-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/doc/demo-news-install.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/www/doc/demo-news-install.html 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,98 @@ + + + Installing the CMS News Demo + + + +

      Installing the CMS News Demo

      + +CMS Demo Documentation : +News Site Demo Installation Guide +
      + +

      +This document contains instructions on installing the News Site demo for the +Arsdigita Content Management System. +

      + + + + + + + + +

      Where to get the CMS News Site Demo

      + +There are two options for obtaining the CMS News Demo: + +
        + +
      1. Download a tarball from + cms.arsdigita.com. +

        + +

      2. Checkout the latest version from the CVS repository: +
          cvs -d :ext:ls.arsdigita.com:/cvsweb/ co cms-news-demo
        +

        + +

      + + +

      Prerequisites

      + +
        + +
      1. The CMS 4.1 package is mounted onto ACS 4.1.

        + Packages can be mounted in $YOURSERVER/admin/site-map/. You must be + logged in as a site-wide administrator to mount a package. +

        + +

      2. The CMS News Site Demo 1.2 package is mounted onto ACS 4.1.

        + Packages can be mounted in $YOURSERVER/admin/site-map/. You must be + logged in as a site-wide administrator to mount a package. +

        + +

      3. The CMS News Site Demo 1.2 data model is loaded.

        + If the data model wasn't loaded when installing ACS 4.1, then you can + load it manually:

        +

          cd $CMS_NEWS_DEMO_ROOT/sql
          + sqlplus $DB_USER/$DB_PASSWD < cms-news-demo-create.sql
        +

        + + +

        + +

      4. You are a registered user and have CMS Administrative privileges + on the entire Content Management System.

        + If no user is registered to CMS with Administrative privileges, then the + next user to register under CMS will automatically be granted Administrative + privileges on the entire CMS. +

        + +

      + +

      + + + + +

      Installation Instructions

      + +
        + +
      1. Browse to $YOUR_SERVER/cms-news-demo/install-wizard to start the + CMS News Demo Installation Wizard. Running the install wizard will + register demo users and create and publish demo folders and templates. +

        + +

      2. That's it! +

        + +

      + +

      + + + + Index: openacs-4/packages/cms-news-demo/www/doc/demo-news-planning.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/doc/demo-news-planning.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/www/doc/demo-news-planning.html 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,118 @@ + + + + CMS News Site Planning Guide + + + + +

      CMS News Site Planning Guide

      + +CMS Demo Documentation : News Site Demo Install Guide +
      + + +

      +This document defines some basic user roles and explains the basic steps in +developing a typical news site using the Arsdigita Content Management System. +

      + + + + +

      User Roles

      + +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Information Architect Designs and develops the data model for generating dynamic content.
        Site Administrator Has administrative permissions on the entire CMS. Can create new roles + and assign permissions to different CMS users.
        Author Writes new content to be uploaded into CMS.
        Photographer A specialized Author, responsible for generating image and multimedia + content.
        Editor Edits and approves the work of the Author (and Photographer) roles.
        Publisher Places a request for new content by assigning the Author and Editor to + create and edit content. Chooses a template to display dynamic content + on the public site. Approves content before publishing it to the live + site.
        Template Developer Designs and develops the templates for generating and displaying + dynamic content. Responsibilities include page layout, web graphics, + and overall site flow.
        +
      + + +

      Designing a News Site

      + +
        +
      • Determine the types of content that the site will contain. A news + site usually incorporates Articles, Images, and Multimedia Files into its + repository. +
      • Determine the roles necessary to generate content (a news article page) + from scratch, that is, designate Authors, Editors, + Publishers, Template Developers, etc. +
      • Design the overall site flow. +
      • Design templates for displaying the content on the public site. +
      • Design custom forms (templates) for generating the content. +
      • Create data model for the content types. The data model + should include how the different content types are related and how the + content will be inserted into the database. +
      + +

      Writing the Public Pages

      + +
        +
      • Write the custom forms (templates) for generating content. +
      • Write the templates to display dynamic content on the public pages. +
      + +

      Content Management

      + +
        +
      • Publisher chooses a template to display the dynamic content on the + public site. +
      • Publisher creates empty content item(s) (articles, images, multimedia + files) that eventually will be revised by the Author and Editor. +
      • Publisher places a request for new content by assigning the Author to + create content via the workflow engine. +
      • The Author writes and uploads articles. The Photographer uploads + images and multimedia files. +
      • The Editor approves or rejects the articles and images that the + Author and Photographer have uploaded. +
      • The Publisher approves or rejects the final work before publishing + the content to the file system and to the live site. +
      + + +

      + + + Index: openacs-4/packages/cms-news-demo/www/doc/demo-news-walkthru.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/doc/demo-news-walkthru.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/www/doc/demo-news-walkthru.html 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,310 @@ + + + CMS News Demo Walkthru + + + +

      CMS News Demo Walkthru

      + +CMS Demo Documentation : News Site Demo Walkthru +
      + +

      Overview

      + +This walkthru demonstrates a typical publishing workflow for a news site using +the Arsdigita Content Management System. + + +

      Prerequisites

      + +This demonstration walkthru assumes the following: + +
        +
      • The CMS News Demo has been installed and all demo templates have been + edited and published according to the demo installation instructions. +

        + +

      • The following three registered CMS users exists: +

        + +

          + + +
          + + + + + + + + + + + + + + + + + + + + + +
          User Role
          Content Manager Places requests for news articles and publishes finished articles to + the public site
          Author Submits articles, images, and multimedia files
          Editor Edits the Author's work
          +
          +
        + + + +

        +  +
        +

      + +

      Walkthru - Publishing a News Article

      + +
      + +
        + + +

        1) Becoming familiar with the CMS Admin UI

        + +
          +
        1. Log in to CMS as the Content Manager. + +
        2. Browse the Site Map: +
            +
          • Click on the Site Map folder. It should contain a demo_articles + folder. +
          • Click on demo_articles folder under the Site Map. This folder + contains an item titled "Article Index". +
          • Click the Article Index item to bring up a screen displaying + information about "Article Index". Notice that there are four + tabbed links near the top of the page: Editing, Sub-Items, Publishing, + and Permissions. +
          + +
        3. Preview and publish a content item: +
            +
          • Click the "/demo_articles/index" link in the upper right corner + to preview the "Article Index" page in a new frame. Close the preview + frame. +
          • Click the "Publishing" link near the top of the page to display + the item's publishing information. +
          • Click the "Edit" link in the upper right corner of the Publishing + Status box to schedule this item for publishing. +
          • Publish the item by changing the publishing status to "live" and + hitting Submit. +
          • Open a new browser window and + $HOSTNAME:$PORT/demo_article/index.html to view the + published item on the public site. +
          + +
        4. Browse the Content Types mount point: +
            +
          • Click on the Content Types folder. It should contain several folders, + namely, Article, Image, and Multimedia Link. +
          • Click on the Article folder to view information about the Article + content type. +
          • Notice that its attributes include Author, Location, + and Type. +
          • Notice that there are two templates listed in the + Registered Templates box and one of them is the default. +
          • Notice that the Captioned Image and Multimedia Link content types + appear in the Registered Child Relation Types box. +
          + +
        + + +

        2) Placing a request for news

        + +
          +
        1. Navigate to the demo_articles folder under the Site Map. + Notice there is the option to "Add a new Basic Item under this Folder." +
        2. Create an empty article: +
            +
          • Select "Article" from the pick list and hit the "Add Item" button. +
          • Select "No Content" and hit Submit. +
          • Fill in the Title, Description, Location, Author, and Type form + fields and then submit the form. A successful form submission will + result in an item details page being displayed. +
          • On the item's publishing details page, click the "Create a workflow + for this item" link to apply the publishing workflow to this article. +
          • Assign the Author to the Authoring task, Editor to the Editing + task, and Publisher to the Approval of this article by selecting + the appropriate name from the pick list for each task. Fill + in the Comment form field and then hit Submit. +
          • Add a captioned image to the Article: +
              +
            • Navigate to the Article's item details page and click the + "Sub-Items" link near the top of the page to navigate to the + related item details page. +
            • In the Child Items box, choose the Captioned Image content type + from the pick list and click the Add button. +
            • Select "No Content" and then hit Submit. +
            • Fill in the Title, Description, Width, and Height form fields + and then submit the form. +
            • Click the "Create a workflow for this item" in the Publishing + section of the item details page to link to apply the + publishing workflow to the captioned image. +
            • Assign the Author to the Authoring task, Editor to the Editing + task, and Publisher to the Approval of the captioned image. Fill + in the Comment form field and then hit Submit. +
            + +
          • Add multimedia links to the Article: +
              +
            • Navigate to the item details page of the Article you created. +
            • In the Child Items box in the Sub-Items section, choose the + Multimedia Link content type from the pick list and click the + Add button. +
            • Select "No Content" under Content Creation Method and + "(Default)" for Child relation tag and then hit Submit. +
            • Fill in Title, Description, Type, and Caption form fields and + hit Submit. +
            • Click the "Create a workflow for this item" link in the Publishing + section of the item details page to apply the + publishing workflow to the multimedia link. +
            • Assign the Author to the Authoring task, Editor to the Editing + task, and Publisher to the Approval of the multimedia link. Fill + in the Comment form field and then hit Submit. +
            • Repeat these steps to add more multimedia links. +
            + +
          + +
        3. Sign out. +
        + + + + +

        3) Submitting an article

        + +
          +
        1. Log in to CMS as the Author. +
        2. Notice that there are three (or more) items listed in the Authoring + stage in the "My Tasks" box, namely an Article, Captioned Image, + and one or more Multimedia Links. + +
        3. Upload an Article: +
            +
          • Click the title of the Article to navigate to the item details page. +
          • In the Revisions box under the Editing section, click the + "Text Entry" link to add a revision to the Article. +
          • In the Content form section, either type or paste some text into + the form. Then submit the form. +
          • Go back to the "My Tasks" folder. +
          • Click the Finish link for the Article. Fill in the comment field and + hit Submit. Notice the Authoring task for the Article no longer + appears in the "My Tasks" box. +
          + + +
        4. Upload a Captioned Image: +
            +
          • Now click the title of the Captioned Image to navigate to its item + details page. +
          • In the Revisions box under the "Editing" section of the item + details page, click the "File Upload" link to add a + revision to the Captioned Image. +
          • Upload an image using the "Upload Content" form field then hit + Submit. +
          • Click the Finish link for this Captioned Image under the Workflow + section of the item details page. Fill in the comment field and hit + Submit. Notice that the Authoring task for the Captioned Image + no longer appears in the "My Tasks" box. +
          + + +
        5. Upload Multimedia Links: +
            +
          • The steps for uploading a Captioned Image can be applied to uploading + Multimedia Links. Upload as many multimedia links as you created. +
          + +
        6. Sign out. +
        + + + + +

        4) Editing the article

        + +
          +
        1. Log in to CMS as the Editor. +
        2. Notice that there are three (or more) items listed in the Editing + stage in the "My Tasks" box, namely an Article, Captioned Image, + and one or more Multimedia Links. Notice also, that the Editor can + Approve or Reject an item in the Editing stage. +
        3. Browse the latest content of the Article, Captioned Image, and + Multimedia Links by navigating to their respective item details pages + and either clicking on a revision number in the Revisions box or + clicking the preview link in the upper right hand corner of the page. + From the item + details page, you can edit an item either by clicking the Edit link in + the upper right corner of the Attributes box, or by clicking the "File + Upload" or "Text Entry" links in the Revisions box. Make one or more + changes to the Article. +
        4. Navigate to the "My Tasks" page and approve all the items that the + Author created. Notice that the approved items no longer appear in the + "My Tasks" box. +
        5. Sign out. +
        + + + + +

        5) Publishing the article to the live site

        + +
          +
        1. Log in to CMS as the Content Manager. +
        2. Notice that there are three (or more) items listed in the Approval + stage in the "My Tasks" box, namely an Article, Captioned Image, + and one or more Multimedia Links. Notice also, that the Approver can + Approve or Reject an item in the Approval stage. +
        3. Browse the latest content of the Article, Captioned Image, and + Multimedia Links by navigating to their respective item details pages + and either clicking on a revision number in the Revisions box or + clicking the preview link in the upper right hand corner of the page. + +
        4. Publish the Article, starting with the child items (Captioned Image + and Multimedia Links). The following steps apply to publishing any + items: +
            +
          • On the items details page, make the latest revision ready to go live + by clicking the "Make this revision live" link in the Revisions box + next to the latest revision (the one with the highest revision number). +
          • Click the "Edit" link in the upper right hand corner of the + "Publishing Status" box. Choose "live" and hit Submit. The item has + now been published. +
          + +
        5. Re-publish the Article Index page by editing the publish status of + that item. +
        6. In a new browser window, visit $HOSTNAME:$PORT/demo_articles/ + to view the published Article on the live site. +
        + +

        6) Changing the look of the public site with templates

        + +
          +
        1. Navigate to the Article content type details page. +
        2. Switch templates for the Article content type by clicking the "Make + this the default" link in the "Registered Templates" box. +
        3. Navigate to the Article item details page and click the preview link + in the upper right hand corner. Notice the new look of the Article. + Re-publish the Article to cause the templating changes to take effect. +
        + +
      + +

      + + + Index: openacs-4/packages/cms-news-demo/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/doc/index.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms-news-demo/www/doc/index.html 20 Apr 2001 20:51:11 -0000 1.1 @@ -0,0 +1,22 @@ + + + CMS Demo + + + + +

      Arsdigita Content Management System Demos

      + +
      + +

      News Site Demo

      + + + + + + \ No newline at end of file Index: openacs-4/packages/cms-news-demo/www/static/audio.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/static/audio.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms-news-demo/www/static/dnn-logo-ball.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/static/dnn-logo-ball.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms-news-demo/www/static/dnn-logo.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/static/dnn-logo.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms-news-demo/www/static/small-ball.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/static/small-ball.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms-news-demo/www/static/triangle-down.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/static/triangle-down.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms-news-demo/www/static/triangle-right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/static/triangle-right.gif,v diff -u -N Binary files differ Index: openacs-4/packages/cms-news-demo/www/static/video.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms-news-demo/www/static/video.gif,v diff -u -N Binary files differ Index: openacs-4/packages/directory/directory.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/directory/directory.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/directory/directory.info 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,44 @@ + + + + + Directory + Directories + f + + + + oracle + postgresql + + Mike Bonnet + Andrew Grumet + User Directory + 2001-04-17 + ArsDigita Corporation + This package lets you browse or search for users of an ACS site. It is subsite-aware, and allows you to view the members of the current subsite, or all users of the site. See doc/ for more information. + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/directory/sql/oracle/directory-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/directory/sql/oracle/directory-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/directory/sql/oracle/directory-create.sql 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,33 @@ +-- +-- packages/directory/sql/directory-create.sql +-- +-- @author mikeb@arsdigita.com +-- @creation-date 2001-04-16 +-- @cvs-id $Id: directory-create.sql,v 1.1 2001/04/20 20:51:10 donb Exp $ +-- + +-- call this view using "and group_id = :application_group_id" +-- to find all members of an application_group +create or replace view dir_group_members as + select p.party_id as user_id, p.email, pe.first_names, pe.last_name, p.url, r.object_id_one as group_id + from parties p, persons pe, acs_rels r + where p.party_id = pe.person_id + and p.party_id = r.object_id_two + and r.rel_type = 'membership_rel'; + +-- call this view using "and subsite_id = :subsite_id" +-- to find all members of a subsite +create or replace view dir_subsite_members as + select m.*, g.package_id as subsite_id + from dir_group_members m, + application_groups g + where g.group_id = m.group_id; + +-- view to display all registered users +-- (the ACS registered_users view is slower, and retrieves a lot of information that we don't need) +create or replace view dir_all_users as + select p.party_id as user_id, p.email, pe.first_names, pe.last_name, p.url + from parties p, persons pe + where p.party_id = pe.person_id; + + Index: openacs-4/packages/directory/sql/oracle/directory-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/directory/sql/oracle/directory-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/directory/sql/oracle/directory-drop.sql 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,12 @@ +-- +-- packages/directory/sql/directory-create.sql +-- +-- @author mikeb@arsdigita.com +-- @creation-date 2001-04-16 +-- @cvs-id $Id: directory-drop.sql,v 1.1 2001/04/20 20:51:10 donb Exp $ +-- + +drop view dir_all_users; +drop view dir_subsite_members; +drop view dir_group_members; + Index: openacs-4/packages/directory/tcl/directory-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/directory/tcl/directory-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/directory/tcl/directory-procs.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,168 @@ +ad_library { + + Definitions for the User Directory module + + @author Mike Bonnet (mikeb@arsdigita.com) + @cvs-id $Id: directory-procs.tcl,v 1.1 2001/04/20 20:51:10 donb Exp $ + +} + +ad_proc dir_navbar_list { + -top:boolean + {navbar_list_list ""} +} { + set subsite_home [site_node_closest_ancestor_package_url -package_key "acs-subsite"] + + set package_home [ad_conn package_url] + + set default_elements [list \ + [list $subsite_home Home]\ + [list $package_home "User Directory"]] + + if { $top_p } { + set default_elements [lrange $default_elements 0 [expr [llength $default_elements] - 2]] + } + + set navbar_list_list [concat $default_elements $navbar_list_list] + + set navbar_list {} + + foreach pair $navbar_list_list { + lappend navbar_list "[lindex $pair 1]" + } + + return $navbar_list +} + +# code borrowed from intranet module +ad_proc dir_all_letters {} {returns a list of all A-Z letters in uppercase} { + return [list A B C D E F G H I J K L M N O P Q R S T U V W X Y Z] +} + +ad_proc dir_alpha_nav_bar { + -group_id + -all_users + letter + {excluded_vars ""} +} { + Returns an A-Z bar with greyed out letters not + in initial_list and bolds "letter". + + Includes all existing url vars except those in + the "excluded_vars" list. +} { + if {$all_users == "t"} { + set table_and_group " dir_all_users m + where 1=1" + } else { + set table_and_group " dir_group_members m + where group_id = :group_id" + set group_id [lindex [dir_app_group_info] 0] + } + + set url "[ad_conn url]?" + set exclude_list [list "letter"] + foreach v $excluded_vars { + lappend exclude_list $v + } + + set query_args [export_ns_set_vars url $exclude_list] + if { ![empty_string_p $query_args] } { + append url "$query_args&" + } + + set initial_list [db_list initial_list " + select distinct upper(substr(last_name,1,1)) + from $table_and_group"] + + set html_list [list] + foreach l [dir_all_letters] { + if { [lsearch -exact $initial_list $l] == -1 } { + # This means no user has this initial + lappend html_list "$l" + } elseif { [string compare $l $letter] == 0 } { + lappend html_list "$l" + } else { + lappend html_list "$l" + } + } + if { [empty_string_p $letter] || [string compare $letter "all"] == 0 } { + lappend html_list "All" + } else { + lappend html_list "All" + } + return [join $html_list " | "] +} + +ad_proc dir_app_group_info {} { + + Return a list containing the group_id (lindex 0) and group_name (lindex 1) of the application group associated with the subsite that the current directory package is mounted under. + The directory package does not need to be mounted directly under the subsite; it will find the closest instance of subsite than is an ancestor of the package. + +} { + + set package_id [ad_conn package_id] + db_1row n_id { + select node_id from site_nodes + where object_id = :package_id + } + + # find the closest subsite to the current package on the site_nodes tree + # the inner query is guaranteed to always return at least 1 row, + # because the Main Site subsite is mounted at / + db_1row subsite_p { + select * from ( + select object_id as subsite_id + from site_nodes n + where (select package_key from apm_packages p where p.package_id = n.object_id) = 'acs-subsite' + connect by node_id = prior parent_id + start with node_id = :node_id + order by level + ) where rownum = 1 + } + + db_1row g_i { + select g.group_id, g.group_name + from groups g, application_groups a + where a.package_id = :subsite_id + and a.group_id = g.group_id + } + + return [list $group_id $group_name] +} + +ad_proc dir_subsite_info {} { + + Return a list containing the subsite_id (lindex 0) and subsite_name (lindex 1) of the subsite that the current directory package is mounted under. + The directory package does not need to be mounted directly under the subsite; it will find the closest instance of subsite than is an ancestor of the package. + +} { + + set package_id [ad_conn package_id] + db_1row n_id { + select node_id from site_nodes + where object_id = :package_id + } + + # find the closest subsite to the current package on the site_nodes tree + # the inner query is guaranteed to always return at least 1 row, + # because the Main Site subsite is mounted at / + db_1row subsite_p { + select * from ( + select object_id as subsite_id, acs_object.name(object_id) as subsite_name + from site_nodes n + where (select package_key from apm_packages p where p.package_id = n.object_id) = 'acs-subsite' + connect by node_id = prior parent_id + start with node_id = :node_id + order by level + ) where rownum = 1 + } + + return [list $subsite_id $subsite_name] +} + +set mods_file [ns_info tcllib]/directory-mods.tcl + +if [file exists $mods_file] { + source $mods_file +} Index: openacs-4/packages/directory/templates/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/directory/templates/master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/directory/templates/master.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,97 @@ + + + @title@ + + + + + + + + + + + + + + +
      @title@
      +
      @fine_print@
      +
      + + +
      + + + Index: openacs-4/packages/directory/templates/master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/directory/templates/master.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/directory/templates/master.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +set page_width [ad_parameter PageWidth] Index: openacs-4/packages/directory/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/directory/www/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/directory/www/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,87 @@ + +@page_title@ +@navbar_list@ + +
      + @search_vars@ + + + + + + + + + + + +
      show: + [  all    @valid_numrows:item@    all@valid_numrows:item@  |] + browse by letter ] search: 
      +
      + + + + + + +
      +

      There are @total_users@ registered usersmembers of @group_name@.
      + + + +Showing @start_row@ - @last_row@ of @queried_users@ usersmembers @where_text@:
      +
      + +Showing @queried_users@ usersmembers@where_text@:
      +
      +
      +

      + [ subsite memberssubsite members | all usersall users ] +
      + +
      + + +

      + + + + + + + + + +
      @alpha_nav_bar@
      + + + + + +
      + + @row_range_html@ + + + + + + + + + + + + + + + + + +
      @name_header@@email_header@
      @all_user_data.last_name@, @all_user_data.first_names@@all_user_data.email@
      +
      + +
      + + Index: openacs-4/packages/directory/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/directory/www/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/directory/www/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,155 @@ +ad_page_contract { + + Browse all users. + + @author mikeb@arsdigita.com + @cvs-id $Id: index.tcl,v 1.1 2001/04/20 20:51:10 donb Exp $ + @param order_by Column to order the results by + @param num_rows Number of users to display at a time + @param start_row Row number to start at + @param search Text to search for in the users name or email address + @param letter Letter to use when browsing by last name + +} { + {order_by:optional "name"} + {start_row:optional,naturalnum 1} + {num_rows:optional,naturalnum 20} + {letter:optional ""} + {search:optional ""} + {all_users:optional,boolean "f"} +} -properties { + page_title:onevalue + all_user_data:multirow + context_bar_args:onevalue + system_name:onevalue + package_url:onevalue + header_link_vars:onevalue + start_row:onevalue + last_row:onevalue + option_list:onevalue + total_users:onevalue +} + +set valid_numrows [list 10 20 50 0] +if { [lsearch $valid_numrows $num_rows] < 0 } { + set num_rows 20 +} +set numrow_vars [export_ns_set_vars url [list num_rows]] +set search_vars [export_ns_set_vars form [list search start_row letter]] +set browse_vars [export_ns_set_vars url [list search start_row]] + +set page_width [ad_parameter PageWidth] +set navbar_list [dir_navbar_list] +set master_template [ad_parameter MasterTemplate] + +# if they want to see all users, select from dir_all_users +# and use a dummy where clause +if {$all_users == "t"} { + set table_and_group " dir_all_users m +where 1=1" + set group_name "this site" + set group_id -1 + set page_title "Browse users" +} else { + set table_and_group " dir_group_members m +where group_id = :group_id" + foreach {group_id group_name} [dir_app_group_info] {} + set page_title "Browse members" +} + + +set order_clause "" +if {$order_by == "name"} { + set order_clause " order by lower(last_name)" +} elseif {$order_by == "email"} { + set order_clause " order by lower(email)" +} elseif {$order_by == "name-"} { + set order_clause " order by lower(last_name) desc" +} elseif {$order_by == "email-"} { + set order_clause " order by lower(email) desc" +} + +if {![empty_string_p $search]} { + set where_clause "and (lower(first_names) like '%' || lower(:search) || '%' + or lower(last_name) like '%' || lower(:search) || '%' + or lower(email) like '%' || lower(:search) || '%')" + set where_text " with something matching "$search"" + set alpha_nav_bar "" +} elseif {![empty_string_p $letter] && $letter != "all"} { + set where_clause "and upper(last_name) like :letter || '%'" + set where_text " with a last name starting with $letter" + set alpha_nav_bar [dir_alpha_nav_bar -group_id $group_id -all_users $all_users $letter start_row] +} else { + set where_clause "" + set where_text "" + set alpha_nav_bar [dir_alpha_nav_bar -group_id $group_id -all_users $all_users $letter start_row] +} + +set total_users [db_string total_users " + select count(1) + from $table_and_group"] + +if {[empty_string_p $where_clause]} { + set queried_users $total_users +} else { + set queried_users [db_string total_users " + select count(1) + from $table_and_group + $where_clause"] + +} + +set header_link_vars "[export_ns_set_vars url {order_by}]" + +set name_header [ad_decode $order_by "name" "Name: ^" "name-" "Name: v" "Name:"] +set email_header [ad_decode $order_by "email" "E-mail Address: ^" "email-" "E-mail Address: v" "E-mail Address:"] + + +# this query is really ugly (3 nested selects!) but it's the only way to get a +# "between" to work correctly on the rownum of an ordered set +# if anyone knows a better way, I'd love to hear it - mikeb +set sql_query "select m.* + from $table_and_group + $where_clause + $order_clause" + +if {$num_rows != "0"} { + set end_row [expr $start_row + $num_rows - 1] + set sql_query " + select * from ( + select first_names, last_name, email, user_id, rownum as my_rownum from ( + $sql_query + ) + ) where my_rownum between :start_row and :end_row" +} + +db_multirow all_user_data get_all_users $sql_query + +set rowcount [template::multirow size all_user_data] + +set last_row [expr $start_row + $rowcount - 1] + +set row_range_html "" +if {$rowcount < $queried_users} { + set row_range_html "\n" + if {$start_row > 1} { + if {[expr $start_row - $num_rows] < 1} { + append row_range_html "< Back\n" + } else { + append row_range_html "< Back\n" + } + } else { + append row_range_html " \n" + } + + append row_range_html "\n" + append row_range_html "" + + if {[expr $start_row + $num_rows - 1] < $queried_users} { + append row_range_html "Forward >\n" + } else { + append row_range_html " \n" + } + + append row_range_html "\n" +} Index: openacs-4/packages/directory/www/doc/ad.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/directory/www/doc/ad.css,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/directory/www/doc/ad.css 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,17 @@ +body, ol, td, th, hr, h1, h2, h3, strong, dl, a, blockquote, em, .force, dt, dd, ul, li, p{font-family:verdana,helvetica,arial,sans-serif} +a:link{color:0000ff} +a:visited{color:000099} +a.topnav{font-size:13px} +a.bottomnav{font-size:13px} + +code{font-family:mono-space} +.CVS, .cvstag{font-family:mono-space; font-size:small; color:#999999} + +.codeblock{background-color:#eeeedd;font-family:monospace} +.topnav{font-size:13px} + +.darkshaded{background-color:#cccccc} +.lightshaded{background-color:#eeeedd} + +.revisionheader{background-color:#eeeedd} +.revisionbody{background-color:#ffffee} Index: openacs-4/packages/directory/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/directory/www/doc/index.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/directory/www/doc/index.html 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,37 @@ + +Directory Package Documentation

      Home : Directory Package Documentation 


      Directory Package Documentation


      By Mike Bonnet

      Installation

      +This is the Directory Package. It is a very simple (1 page) package for listing +and searching through the members of a subsite. It is fully subsite-aware, using the +application_groups functionality in ACS4.2 to define subsite membership. +

      +If you're reading this, then you probably have the package installed already. If not, +load the .apm file into the package manager (/acs-admin/apm/) and click install. The data +model for this package is very minimal (3 views) and should load very quickly. If there are +any errors loading this package, make sure you are using ACS4.2, since this package requires +the new subsite-scoping features. If you geta "query returned no rows" error, visit the admin/groups +page for your subsite, so that it can configure itself as necessary, and then try the Directory +package again. +

      Using the Directory Package

      +Now that you have the package installed, you need to mount it somewhere. If you only +have one instance of the acs-subsite package mounted (the "Main Site") you can mount it anyhwere +under that package. If you have multiple instances of acs-subsite, you can mount an instance of +Directory under each subsite. +

      +When listing users, the Directory package will find the nearest subsite above it on the site_nodes +tree. It will then list everybody that is a member of that subsite (based on membership in the +application_group associated with that subsite, see +packages/acs-subsite/sql/application-groups-create.sql). +

      +A user can make themself a member of a subsite instance by visiting <subsite_url>/register/user-join. +They will then show up in the Directory listing for that subsite. An admin can also make a user a member of +a subsite instance by going to <subsite_url>/admin/groups/?view_by=rel_type. Note that to add a user to +a subsite, they must be a member of all of the subsites above it in the site_nodes tree. register/user-join takes +care of this automatically, but an admin must manually handle all of the constraints when adding a new member. +

      +The list of users displayed can be restricted by the letter their last name starts with, or a search criteria. +The search shows users that have the search criteria anywhere in their first name, last name, or email address +(case-insensitive). When searching, a "browse by letter" link will appear next to the search box, to allow you to +go back to browse mode. When searching or browsing, the number of results per page can be restricted by clicking +one of the "show" links on the left side. You also have the choice of viewing "subsite members" (people who have +been explicitly made a member of the current subsite) or "all users" (all registered users of the site). +

      Index: openacs-4/packages/directory/www/doc/images/arsdigita2.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/directory/www/doc/images/arsdigita2.gif,v diff -u -N Binary files differ Index: openacs-4/packages/directory/www/doc/xml/index.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/directory/www/doc/xml/index.xml,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/directory/www/doc/xml/index.xml 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,62 @@ + + + + +Directory Package Documentation + + +By Mike Bonnet + + + +Installation + +This is the Directory Package. It is a very simple (1 page) package for listing +and searching through the members of a subsite. It is fully subsite-aware, using the +application_groups functionality in ACS4.2 to define subsite membership. + + +If you're reading this, then you probably have the package installed already. If not, +load the .apm file into the package manager (/acs-admin/apm/) and click install. The data +model for this package is very minimal (3 views) and should load very quickly. If there are +any errors loading this package, make sure you are using ACS4.2, since this package requires +the new subsite-scoping features. If you geta "query returned no rows" error, visit the admin/groups +page for your subsite, so that it can configure itself as necessary, and then try the Directory +package again. + + + + +Using the Directory Package + +Now that you have the package installed, you need to mount it somewhere. If you only +have one instance of the acs-subsite package mounted (the "Main Site") you can mount it anyhwere +under that package. If you have multiple instances of acs-subsite, you can mount an instance of +Directory under each subsite. + + +When listing users, the Directory package will find the nearest subsite above it on the site_nodes +tree. It will then list everybody that is a member of that subsite (based on membership in the +application_group associated with that subsite, see +packages/acs-subsite/sql/application-groups-create.sql). + + +A user can make themself a member of a subsite instance by visiting <subsite_url>/register/user-join. +They will then show up in the Directory listing for that subsite. An admin can also make a user a member of +a subsite instance by going to <subsite_url>/admin/groups/?view_by=rel_type. Note that to add a user to +a subsite, they must be a member of all of the subsites above it in the site_nodes tree. register/user-join takes +care of this automatically, but an admin must manually handle all of the constraints when adding a new member. + + +The list of users displayed can be restricted by the letter their last name starts with, or a search criteria. +The search shows users that have the search criteria anywhere in their first name, last name, or email address +(case-insensitive). When searching, a "browse by letter" link will appear next to the search box, to allow you to +go back to browse mode. When searching or browsing, the number of results per page can be restricted by clicking +one of the "show" links on the left side. You also have the choice of viewing "subsite members" (people who have +been explicitly made a member of the current subsite) or "all users" (all registered users of the site). + + + + + Index: openacs-4/packages/download/download.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/download.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/download.info 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,100 @@ + + + + + Download + Download + f + + + + oracle + postgresql + + Joseph Bank + ACS 4.x version of download module. Supports the functionality required by the current acs-repository. + 2001-01-19 + ArsDigita Corporation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/download/sql/oracle/download-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/sql/oracle/download-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/sql/oracle/download-create.sql 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,280 @@ +-- Note cr_items has available: +-- parent_id +-- name +-- publish_status +-- Note cr_revisions has available: +-- title +-- description +-- publish_date +-- content + +-- QUESTION: How do we store information about vendors like their +-- URL, or a description + +-- +-- Download Repository Instances: +-- Each has a description and some help text. +-- parent_id is the package_id +-- +create table download_repository ( + repository_id integer + constraint download_repository_id_fk + references cr_items (item_id) on delete cascade + constraint download_repository_id_pk primary key +); + +begin + content_type.create_type ( + content_type => 'cr_download_rep', + pretty_name => 'Download Repository', + pretty_plural => 'Download Repositories', + table_name => 'download_repository', + id_column => 'repository_id' + ); +end; +/ +show errors + + + +comment on table download_repository is ' +This table stores the actual download repositories. Each repository has a title +and description of the repository. Meta information about what can be stored in +the repository is keyed to this table'; + +-- DESIGN QUESTION: We could make the archive type part of the metadata, +-- but then we couldn't very well conditionalize other metadata based on it. + +-- Each download module will support certain archive types, we need to indicate +-- what those types are. +create sequence download_archive_type_seq; +create table download_archive_types ( + archive_type_id integer + constraint download_archive_types_pk primary key, + repository_id constraint download_archive_rep_id_fk references download_repository (repository_id), + pretty_name varchar(100) not null, + description varchar(500) not null +-- unique (repository_id, short_name) constraint download_archive_types_shrt_name_un unique +); + +comment on table download_archive_types is ' + This table stores the types of archives that can be stored in a given download repository. +'; + +create sequence download_reasons_seq; +create table download_reasons ( + download_reason_id integer + constraint download_archive_reasons_pk primary key, + repository_id constraint download_reason_id_fk references download_repository (repository_id) , + reason varchar(500) not null +-- unique (repository_id, reason) constraint download_reason_un unique +); + +comment on table download_archive_types is ' + This table stores the types of archives that can be stored in a given download repository. +'; + + +-- +-- Meta Information for Each Archive in a Particular Repository +-- We must be able to support meta info per archive for things like: +-- owners (email addresses) +-- vendors +-- dependencies +-- This is basically survey simple. +-- +create table download_archive_metadata ( + metadata_id integer + constraint download_ma_pk primary key, + repository_id constraint download_ma_rep_id_fk + references download_repository (repository_id), + --if archive_type_id is null, applies to all archive types + archive_type_id integer + constraint download_ma_type_fk references download_archive_types, + sort_key integer + constraint download_ma_sort_key_nn + not null, + pretty_name varchar(100) not null, + data_type varchar(30) + constraint download_data_type_ck + check (data_type in ('text', 'shorttext', 'boolean', 'number', 'integer', 'date', 'choice')), + required_p varchar(1) + constraint download_ma_required_p_ck check(required_p in ('t','f')), + --linked_p indicates whether we should have links to show all + --archives with a particular link + linked_p varchar(1) + constraint download_ma_linked_p_ck check(linked_p in ('t','f')), + --is this field shown on the main page? + mainpage_p varchar(1) + constraint download_ma_mainpage_p_ck check(mainpage_p in ('t','f')), + --is this field computed, or should we ask the user to enter it? + computed_p varchar(1) + constraint download_ma_computed_p_ck check(computed_p in ('t','f')) +); + +--When a piece of metadata has a fixed set of responses +create sequence download_md_choice_id_sequence start with 1; + +create table download_metadata_choices ( + choice_id integer not null primary key, + metadata_id not null references download_archive_metadata, + -- human readable + label varchar(500) not null, + -- might be useful for averaging or whatever, generally null + numeric_value number, + -- lower is earlier + sort_order integer +); + +comment on table download_archive_metadata is ' + This table stores information about all metadata stored for each archive in a given + repository.'; + +-- +-- The Archives Themselves +-- We need at least the following pieces of info: +-- archive_name (via cr_item.name) +-- repository_id (via cr_item.parent_id) +-- summary (via archive_desc_id.title) +-- description (via archive_desc_id.text) +-- description_type (i.e. archive_desc_id.mime_type for description) +-- +create table download_archives ( + archive_id constraint download_archive_id_fk + references cr_items (item_id) on delete cascade + constraint download_archives_id_pk primary key, + archive_type_id integer + constraint download_aa_type_fk references download_archive_types, +--we use another content_type to hold the content of the archive description, which we +--need in addition to version descriptions + archive_desc_id integer + constraint download_ad_type_fk references cr_revisions +); + +-- We need at least the following +-- +-- approved_p +-- approved_date +-- approved_user +-- approved_comment +-- archive_id (via cr_revision.cr_item) +-- version_name (via cr_revision.description) +-- file_name (via cr_revision.title) +-- file_type (via cr_revision.mime_type) +-- file_content (via cr_revision.content) +-- version_url (via metadata) +-- release_notes (via metadata) +-- release_date (via metadata) +-- vendor (via metadata) +-- owner (via metadata) + +create table download_archive_revisions ( + revision_id constraint download_ar_id_fk + references cr_revisions (revision_id) on delete cascade + constraint download_ar_id_pk primary key, + approved_p varchar(1) + constraint download_ar_app_p_ck check(approved_p in ('t','f')), + approved_date date, + approved_user integer + constraint download_ar_usr_fk references users, + approved_comment varchar(1000) +); + + +-- Storage of the metadata per archive +-- Long skinny table. +create table download_revision_data ( + revision_id constraint download_revision_data_fk + references download_archive_revisions(revision_id), + metadata_id constraint download_revision_metadata_fk + references download_archive_metadata(metadata_id), + --The possible responses. + choice_id references download_metadata_choices (choice_id), + boolean_answer char(1) check(boolean_answer in ('t','f')), + clob_answer clob, + number_answer number, + varchar_answer varchar(4000), + date_answer date +); + + +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- +-- Information about who has downloaded stuff +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- + +-- We want to collect statistics on downloads. +create sequence download_downloads_seq; +create table download_downloads ( + download_id integer + constraint downloads_download_id_pk primary key, + user_id constraint downloads_user_id_fk references users + on delete set null, + revision_id constraint download_dr_id_fk references download_archive_revisions + on delete cascade, + download_date date not null, + download_hostname varchar(400), + download_ip varchar(20), + user_agent varchar(200), + reason_id references download_reasons(download_reason_id) on delete set null, + reason varchar(1000) +); + +begin + content_type.create_type ( + content_type => 'cr_download_archive', + pretty_name => 'Download Archive', + pretty_plural => 'Download Archive', + table_name => 'download_archives', + id_column => 'archive_id' + ); + + content_type.register_child_type( + parent_type => 'cr_download_rep', + child_type => 'cr_download_archive' + ); + + + content_type.create_type ( + content_type => 'cr_download_archive_desc', + pretty_name => 'Download Archive Description', + pretty_plural => 'Download Archive Description', + table_name => 'download_archive_descs', + id_column => 'archive_desc_id' + ); + + content_type.register_child_type( + parent_type => 'cr_download_rep', + child_type => 'cr_download_archive_desc' + ); + +end; +/ +show errors + +create or replace view download_repository_obj as + select repository_id, o.*, i.parent_id, r.title, r.description, r.content as help_text + from download_repository dr, acs_objects o, cr_items i, cr_revisions r + where dr.repository_id = o.object_id and i.item_id = o.object_id and + r.revision_id = i.live_revision; + +create or replace view download_archives_obj as + select cri.parent_id as repository_id, cri.name as archive_name, cri.latest_revision, cri.live_revision, + da.archive_id, da.archive_type_id, da.archive_desc_id, + desc_item.title as summary, desc_item.description as description, desc_item.mime_type as description_type, + desc_item.creation_user, desc_item.creation_date, desc_item.creation_ip + from download_archives da, cr_items cri, download_archive_descsi desc_item + where da.archive_desc_id = desc_item.revision_id and da.archive_id = cri.item_id; + +create or replace view download_arch_revisions_obj as + select dar.*, o.*, r.item_id as archive_id, r.title as file_name, r.description as version_name, r.publish_date, r.mime_type, r.content + from download_archive_revisions dar, acs_objects o, cr_revisions r + where dar.revision_id = o.object_id and dar.revision_id = r.revision_id; + +create or replace view download_downloads_repository as + select dd.*, + (select repository_id from download_archives_obj da, cr_revisions r where dd.revision_id = r.revision_id and r.item_id = da.archive_id) as repository_id + from download_downloads dd; + +@@ download-packages Index: openacs-4/packages/download/sql/oracle/download-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/sql/oracle/download-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/sql/oracle/download-drop.sql 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,97 @@ +-- +-- Drop the data model and the PL/SQL packages. +-- + +/* Drop all content items */ +begin + for archive_rec in (select item_id from cr_items where content_type = 'cr_download_archive_desc') + loop + content_item.delete(archive_rec.item_id); + end loop; +end; +/ + +begin + for archive_rec in (select item_id from cr_items where content_type = 'cr_download_archive') + loop + content_item.delete(archive_rec.item_id); + end loop; +end; +/ + +begin + for archive_rec in (select item_id from cr_items where content_type = 'cr_download_rep') + loop + content_item.delete(archive_rec.item_id); + end loop; +end; +/ + +/* Sequences */ +drop sequence download_archive_type_seq; +drop sequence download_reasons_seq; +drop sequence download_md_choice_id_sequence; +drop sequence download_downloads_seq; + +/* Views */ +drop view download_archives_obj; +drop view download_arch_revisions_obj; +drop view download_downloads_repository; + +/* Tables */ +drop table download_downloads; +drop table download_revision_data; +drop table download_archive_revisions; +drop table download_archives; +drop table download_metadata_choices; +drop table download_archive_metadata; +drop table download_reasons; +drop table download_archive_types; +drop table download_repository; +drop table download_archive_descs; +/* acs_object_type */ +begin + content_type.unregister_child_type( + parent_type => 'cr_download_rep', + child_type => 'cr_download_archive', + relation_tag => 'generic' + ); + + content_type.unregister_child_type( + parent_type => 'cr_download_rep', + child_type => 'cr_download_archive_desc', + relation_tag => 'generic' + ); +end; +/ + +begin + acs_object_type.drop_type( + object_type => 'cr_download_archive_desc', + cascade_p => 't' + ); +end; +/ +show errors + +begin + acs_object_type.drop_type( + object_type => 'cr_download_rep', + cascade_p => 't' + ); +end; +/ +show errors + +begin + acs_object_type.drop_type( + object_type => 'cr_download_archive', + cascade_p => 't' + ); + +end; +/ +show errors + + +drop package download_rep; \ No newline at end of file Index: openacs-4/packages/download/sql/oracle/download-packages.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/sql/oracle/download-packages.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/sql/oracle/download-packages.sql 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,152 @@ +--Defines the following packages: +-- +-- Download Repository +-- -new +-- -delete +-- -edit +-- -new_archive_type (no need for proc) +-- -delete_archive_type (no need for proc) +-- -edit_archive_type (no need for proc) +-- -new_reason (no need for proc) +-- -delete_reason (no need for proc) +-- -edit_reason (no need for proc) +-- -new_metadata (no need for proc) +-- -delete_metadata (no need for proc) +-- -edit_metadata (no need for proc) +-- -new_metadata_choice (no need for proc) +-- -delete_metadata_choice (no need for proc) +-- -edit_metadata_choice (no need for proc) +-- +-- +-- Download Archive +-- -new +-- -delete +-- -edit +-- -new_revision +-- -approve_revision +-- -set_metadata_value +-- -downloaded_by + +create or replace package download_rep as + + function new ( + repository_id in acs_objects.object_id%TYPE, + title in cr_revisions.title%TYPE, + description in cr_revisions.description%TYPE, + help_text in varchar2 default null, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + parent_id in cr_items.parent_id%TYPE default null, + context_id in acs_objects.context_id%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null + ) return download_repository.repository_id%TYPE; + + procedure edit ( + repository_id in acs_objects.object_id%TYPE, + title in cr_revisions.title%TYPE, + description in cr_revisions.description%TYPE, + help_text in varchar2 default null, + last_modified in acs_objects.last_modified%TYPE default sysdate, + modifying_user in acs_objects.modifying_user%TYPE default null, + modifying_ip in acs_objects.modifying_ip%TYPE default null + ); + + procedure delete ( + repository_id in acs_objects.object_id%TYPE + ); + +end download_rep; +/ +show errors + + +create or replace package body download_rep as + + function new ( + repository_id in acs_objects.object_id%TYPE, + title in cr_revisions.title%TYPE, + description in cr_revisions.description%TYPE, + help_text in varchar2 default null, + creation_date in acs_objects.creation_date%TYPE default sysdate, + creation_user in acs_objects.creation_user%TYPE default null, + parent_id in cr_items.parent_id%TYPE default null, + context_id in acs_objects.context_id%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null + ) return download_repository.repository_id%TYPE + is + v_name cr_items.name%TYPE; + v_repository_id integer; + begin + v_name := 'download_repository' || repository_id; + v_repository_id := content_item.new ( + content_type => 'cr_download_rep', + item_id => new.repository_id, + name => v_name, + parent_id => new.parent_id, + context_id => new.context_id, + title => new.title, + description => new.description, + text => new.help_text, + creation_date => new.creation_date, + creation_user => new.creation_user, + creation_ip => new.creation_ip, + is_live => 't' + ); + + insert into download_repository + (repository_id) + values + (new.repository_id); + + return v_repository_id; + end new; + + procedure edit ( + repository_id in acs_objects.object_id%TYPE, + title in cr_revisions.title%TYPE, + description in cr_revisions.description%TYPE, + help_text in varchar2 default null, + last_modified in acs_objects.last_modified%TYPE default sysdate, + modifying_user in acs_objects.modifying_user%TYPE default null, + modifying_ip in acs_objects.modifying_ip%TYPE default null + ) + is + v_revision_id integer; + begin + v_revision_id := content_revision.new ( + item_id => edit.repository_id, + title => edit.title, + description => edit.description, + text => edit.help_text, + creation_date => edit.last_modified, + creation_user => edit.modifying_user, + creation_ip => edit.modifying_ip + ); + content_item.set_live_revision(v_revision_id); + + + update acs_objects set + last_modified = edit.last_modified, + modifying_user = edit.modifying_user, + modifying_ip = edit.modifying_ip + where object_id = edit.repository_id; + + end edit; + + + procedure delete ( + repository_id in acs_objects.object_id%TYPE + ) + is + begin + update acs_objects set context_id = null where context_id = download_rep.delete.repository_id; + + delete from download_repository + where repository_id = download_rep.delete.repository_id; + + acs_object.delete(repository_id); + end; + +end download_rep; +/ +show errors Index: openacs-4/packages/download/tcl/download-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/tcl/download-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/tcl/download-procs.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,373 @@ +# /packages/download/tcl/download-procs.tcl +ad_library { + Procs used by the download module. + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Tue Dec 12 15:13:52 2000 + @cvs-id +} + +# @author jbank@arsdigita.com [jbank@arsdigita.com] +# @creation-date Tue Dec 12 15:14:13 2000 +ad_proc download_repository_info { {package_id ""} {do_redirect 1}} { + Get information about the repository mounted for package_id. +} { + if [empty_string_p $package_id] { + set package_id [ad_conn package_id] + } + if { ![db_0or1row repository_info { + select repository_id, title, description, help_text from download_repository_obj where parent_id = :package_id + } -column_array repository ] } { + #Package not setup + if { $do_redirect } { + set admin_p [ad_permission_p $package_id "admin"] + if { $admin_p } { + set repository_id [db_nextval acs_object_id_seq] + set return_url "[ad_conn package_url]admin/repository-types" + ad_return_error "Not setup" "Please configure this instance of the download module." + } else { + ad_return_error "Not setup" "Please have an admin configure this instance of the download module." + } + } + } else { + if { $do_redirect } { + set repository_id $repository(repository_id) + set count [db_string type_info { + select count(*) from download_archive_types where repository_id = :repository_id + }] + if { $count == 0 } { + set return_url "[ad_conn url]?[ad_conn query]" + ad_return_error "Not setup" "Please add a download type." + } + } + } + return [array get repository] +} + +ad_proc download_repository_id { {package_id ""} {do_redirect 1}} { + Get repository_id mounted for package_id. +} { + array set repository [download_repository_info $package_id $do_redirect] + return $repository(repository_id) +} + +# @author jbank@arsdigita.com [jbank@arsdigita.com] +# @creation-date Tue Dec 12 17:52:07 2000 +ad_proc download_metadata_widget { data_type name metadata_id {user_value ""}} { + Return a widget to take input of the given data_type +} { + set html "" + set element_name "metadata.$metadata_id" + switch -- $data_type { + "number" { + append html "" + } + "integer" { + append html "" + } + "shorttext" { + append html "" + } + + "text" { + append html "" + } + "date" { + append html "[ad_dateentrywidget $element_name $user_value]" + } + "boolean" { + append html " + " + } + "choice" { + append html "" + } + } + return " + $name + $html + " +} + +ad_proc download_file_downloader { +} { + Sends the requested file to the user. Note that the path has the + original file name, so the browser will have a sensible name if you + save the file. Version downloads are supported by looking for + the form variable version_id. We don't actually check that the + version_id matches the path, we just serve it up. +} { + ad_page_contract { + } { + { revision_id:naturalnum,notnull "" } + { download_id:naturalnum,notnull "" } + { reason_id "" } + { reason_other ""} + } + + ns_log Notice "download_file_downloader: $revision_id" + + set user_id [ad_verify_and_get_user_id] + set download_ip [ad_conn peeraddr] + if [catch { + set download_hostname [ns_hostbyaddr $download_ip] + }] { + set download_hostname [db_null] + } + set user_agent [ns_set iget [ad_conn headers] user-agent] + + regexp "[ad_conn package_url]download/(.*)" [ad_conn url] match path + + if [empty_string_p $revision_id] { + ad_script_abort + } + + ad_require_permission $revision_id "read" + + ##Record the download for all time!! + set double_click_p [db_string download_count "select count(*) from download_downloads where download_id = :download_id"] + if { $double_click_p == 0 } { + if [catch { + db_dml download_insert { + insert into download_downloads ( + download_id, + user_id, + revision_id, + download_date, + download_ip, + download_hostname, + user_agent, + reason_id, + reason) + values + (:download_id, + :user_id, + :revision_id, + sysdate, + :download_ip, + :download_hostname, + :user_agent, + :reason_id, + :reason_other) + } + } errmsg] { + ns_log Error "Download: Unable to log download due to an error: $errmsg" + } + } + + db_1row file_type " + select mime_type + from cr_revisions + where revision_id = :revision_id" + + ReturnHeaders $mime_type + + db_write_blob version_write "select content + from cr_revisions + where revision_id = $revision_id" + + + + return filter_return +} + +##Borrowed from file-storage +ad_proc download_maybe_create_new_mime_type { + file_name +} { + The content repository expects the MIME type to already be defined + when you upload content. We use this procedure to add a new type + when we encounter something we haven't seen before. +} { + + set mime_type [ns_guesstype $file_name] + set extension [string trimleft [file extension $file_name] "."] + + # don't know how to generate nice names like "JPEG Image" + # have to leave it blank for now + + #set pretty_mime_type ??? + + if { [db_string mime_type_exists " + select count(*) from cr_mime_types + where mime_type = :mime_type"] == 0 } { + db_dml new_mime_type " + insert into cr_mime_types + (mime_type, file_extension) + values + (:mime_type, :extension)" + } + + return $mime_type +} + +# @author jbank@arsdigita.com [jbank@arsdigita.com] +# @creation-date Fri Dec 15 14:07:02 2000 +ad_proc download_metadata_column { data_type } { Dummy comment.} { + switch -- $data_type { + date { set answer_column "date_answer" } + boolean { set answer_column "boolean_answer" } + number { set answer_column "number_answer" } + integer { set answer_column "number_answer" } + choice { set answer_column "choice_answer" } + text { set answer_column "clob_answer" } + default { + set answer_column "varchar_answer" + } + } + return $answer_column +} + + +# @author jbank@arsdigita.com [jbank@arsdigita.com] +# @creation-date Fri Dec 15 16:14:40 2000 +ad_proc download_validate_metadata { repository_id metadata_info archive_type_id } { + Validate metadata arguments for a given archive_type +} { + ns_log Notice "FOOOO: $metadata_info" + array set metadata $metadata_info + set metadata_with_missing_responses [list] + ##Iterate over the metadata information + db_foreach metadata { + select + dam.metadata_id, + dam.pretty_name, + dam.data_type, + dam.required_p + from download_archive_metadata dam + where dam.repository_id = :repository_id and + dam.computed_p = 'f' and + (dam.archive_type_id = :archive_type_id or + dam.archive_type_id is null) + order by sort_key + } { + if { $data_type == "date" } { + if [catch { set metadata($metadata_id) [validate_ad_dateentrywidget "" metadata.$metadata_id [ns_getform]]} errmsg] { + ad_complain "$errmsg: Please make sure your dates are valid." + } + } + if { [exists_and_not_null metadata($metadata_id)] } { + set response_value [string trim $metadata($metadata_id)] + } elseif {$required_p == "t"} { + lappend metadata_with_missing_responses $pretty_name + continue + } else { + set response_to_question($question_id) "" + set response_value "" + } + if {![empty_string_p $response_value]} { + if { $data_type == "number" } { + if { ![regexp {^(-?[0-9]+\.)?[0-9]+$} $response_value] } { + + ad_complain "The value for \"$metadata\" must be a number. Your value was \"$response_value\"." + continue + } + } elseif { $data_type == "integer" } { + if { ![regexp {^[0-9]+$} $response_value] } { + ad_complain "The value for \"$metadata\" must be an integer. Your value was \"$response_value\"." + continue + } + } + } + + + ns_log Notice "LOGGING: Metadata $pretty_name: $metadata($metadata_id)" + } + if { [llength $metadata_with_missing_responses] > 0 } { + ad_complain "You didn't respond to all required sections. You skipped:" + ad_complain [join $metadata_with_missing_responses "\n"] + } + return [array get metadata] +} + +# @author jbank@arsdigita.com [jbank@arsdigita.com] +# @creation-date Fri Dec 15 16:16:41 2000 +ad_proc download_insert_metadata { repository_id archive_type_id revision_id metadata_array} { + Do metadata insertion. Assume within transaction. +} { + array set metadata $metadata_array + set metadata_list [db_list_of_lists survsimp_question_info_list { + select + dam.metadata_id, + dam.data_type + from download_archive_metadata dam + where dam.repository_id = :repository_id and + dam.computed_p = 'f' and + (dam.archive_type_id = :archive_type_id or + dam.archive_type_id is null) + order by sort_key + }] + + foreach metadata_info $metadata_list { + set metadata_id [lindex $metadata_info 0] + set data_type [lindex $metadata_info 1] + set response $metadata($metadata_id) + set answer_column [download_metadata_column $data_type] + db_dml metadata_inserts " + insert into download_revision_data(revision_id, metadata_id, $answer_column) + values ( :revision_id, :metadata_id, :response ) + " + } +} + +# @author jbank@arsdigita.com [jbank@arsdigita.com] +# @creation-date Fri Dec 15 16:20:38 2000 +ad_proc download_insert_revision { upload_file tmpfile repository_id archive_type_id archive_id version_name revision_id user_id creation_ip approved_p metadata_array } { + Dummy comment. +} { + # get the filename part of the upload file + if ![regexp {[^//\\]+$} $upload_file filename] { + # no match + set filename $upload_file + } + + set mime_type [download_maybe_create_new_mime_type $upload_file] + db_exec_plsql revision_new { + declare + v_revision_id integer; + begin + v_revision_id := content_revision.new( + item_id => :archive_id, + title => :filename, + description => :version_name, + revision_id => :revision_id, + mime_type => :mime_type, + creation_user => :user_id, + creation_ip => :creation_ip + ); + + insert into download_archive_revisions (revision_id, approved_p) values + (v_revision_id, :approved_p); + end; + } + + db_dml content_add { + update cr_revisions + set content = empty_blob() + where revision_id = :revision_id + returning content into :1 + } -blob_files [list $tmpfile] + + db_exec_plsql make_live { + begin + content_item.set_live_revision(:revision_id); + end; + } + + download_insert_metadata $repository_id $archive_type_id $revision_id $metadata_array +} Index: openacs-4/packages/download/www/all-metadata.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/all-metadata.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/all-metadata.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,7 @@ + +All @pretty_name@ + + +@table@ + + Index: openacs-4/packages/download/www/all-metadata.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/all-metadata.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/all-metadata.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,52 @@ +# /packages/download/www/all-metadata.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Fri Dec 15 17:52:24 2000 + @cvs-id +} { + metadata_id:naturalnum,notnull + {orderby ""} +} + +if { ![db_0or1row metadata { + select dam.pretty_name, + dam.data_type + from download_archive_metadata dam + where dam.linked_p = 't' and + dam.metadata_id = :metadata_id +}] } { + ad_return_complaint "Not found" "Metadata id not found" +} +set answer_column [download_metadata_column $data_type] +set metadata_select "metadata$metadata_id" + +set table_def [list \ + [list $metadata_select $pretty_name {} \ + "\$$metadata_select"] \ + {version_count "# Versions" + {version_count $order} + {$version_count}} \ + {archive_count "# Files" + {archive_count $order} + {$archive_count}} \ +] + + +set sql_query " + select $answer_column as $metadata_select, + count(dar.revision_id) as version_count, + count(distinct dar.archive_id) as archive_count + from download_revision_data drd, download_arch_revisions_obj dar + where drd.revision_id = dar.revision_id and + drd.metadata_id = :metadata_id + group by $answer_column + [ad_order_by_from_sort_spec $orderby $table_def]" + +set table [ad_table \ + -Torderby $orderby \ + -Ttable_extra_html { width=100% } \ + -bind [ad_tcl_vars_to_ns_set metadata_id] \ + all_metadata_list $sql_query $table_def ] + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/archive-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-add-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/archive-add-2.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,94 @@ +# /packages/download/www/archive-add-2.tcl +ad_page_contract { + Add a new archive and version. + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Tue Dec 12 23:21:40 2000 + @cvs-id +} { + upload_file:notnull,trim + upload_file.tmpfile:tmpfile + {return_url "[ad_conn package_url]"} + archive_type_id:integer,notnull + archive_name:notnull + {version_name ""} + summary:notnull + description:notnull,html + html_p + metadata:array,optional,html +} -validate { + check_metadata -requires { archive_type_id } { + set repository_id [download_repository_id] + array set metadata [download_validate_metadata $repository_id [array get metadata] $archive_type_id] + } +} + +##First, do a download_archive.new +##Then do a download_archive_revision.new +##Then insert into the download_revision_data +set user_id [ad_conn user_id] +set admin_p [ad_permission_p $repository_id admin] + +# check for write permission on this repository +ad_require_permission $repository_id write + +set approved_p [ad_decode $admin_p 0 [db_null] "t"] +set approved_date [ad_decode $admin_p 0 [db_null] "sysdate"] +set approved_user [ad_decode $admin_p 0 [db_null] ":user_id"] +set approved_comment [ad_decode $admin_p 0 [db_null] "Automatic approval, add by admin."] + +# get the ip +set creation_ip [ad_conn peeraddr] + +set archive_id [db_nextval acs_object_id_seq] +set archive_desc_id [db_nextval acs_object_id_seq] +set revision_id [db_nextval acs_object_id_seq] + +if { $html_p == "f" } { + set description_format "text/plain" +} else { + set description_format "text/html" +} + +db_transaction { + db_exec_plsql archive_new { + declare + v_archive_id integer; + v_archive_desc_id integer; + v_name cr_items.name%TYPE; + begin + v_name := 'Download Archive Desc for ' || :archive_id; + + v_archive_desc_id := content_item.new ( + content_type => 'cr_download_archive_desc', + item_id => :archive_desc_id, + name => v_name, + title => :summary, + description => :description, + mime_type => :description_format, + parent_id => :repository_id, + context_id => :repository_id, + creation_user => :user_id, + creation_ip => :creation_ip, + is_live => 't' + ); + insert into download_archive_descs (archive_desc_id) values (content_item.get_live_revision(v_archive_desc_id)); + + v_archive_id := content_item.new( + content_type => 'cr_download_archive', + item_id => :archive_id, + name => :archive_name, + parent_id => :repository_id, + context_id => :repository_id, + creation_user => :user_id, + creation_ip => :creation_ip + ); + + insert into download_archives (archive_id, archive_type_id, archive_desc_id) values (v_archive_id, :archive_type_id, content_item.get_live_revision(v_archive_desc_id)); + end; + } + + download_insert_revision $upload_file ${upload_file.tmpfile} $repository_id $archive_type_id $archive_id $version_name $revision_id $user_id $creation_ip $approved_p [array get metadata] + +} + +ad_returnredirect $return_url \ No newline at end of file Index: openacs-4/packages/download/www/archive-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-add.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/archive-add.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,57 @@ + +Add a New Software Archive +@context_bar@ + +
      +<%= [export_form_vars archive_type_id return_url]%> + +

      Add a New Software Archive

      + + + + + + + + + + + + + + + + + + + + @extra_form_elts@ + + + + + + + + + + + + + + + + + + +
      Software Name: +
      Summary: +
      Description:
      Description is:
      Version Number (optional):
      File:
       Use the "Browse..." button to locate your file, + then click "Open".
      +
      + +
      + Index: openacs-4/packages/download/www/archive-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/archive-add.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,40 @@ +# /packages/download/www/archive-add.tcl +ad_page_contract { + Add a new archive. + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Tue Dec 12 22:38:49 2000 + @cvs-id +} { + archive_type_id:integer,notnull + {return_url "[ad_conn package_url]"} +} + +ad_maybe_redirect_for_registration +set context_bar {"Add an Archive"} +set user_id [ad_verify_and_get_user_id] + +array set repository [download_repository_info] +set repository_id $repository(repository_id) +set title $repository(title) +set description $repository(description) +set help_text $repository(help_text) + +set admin_p [ad_permission_p $repository_id admin] + +set extra_form_elts "" +db_foreach metadata { + select + dam.metadata_id, + dam.pretty_name, + dam.data_type + from download_archive_metadata dam + where dam.repository_id = :repository_id and + dam.computed_p = 'f' and + (dam.archive_type_id = :archive_type_id or + dam.archive_type_id is null) + order by sort_key +} { + append extra_form_elts [download_metadata_widget $data_type $pretty_name $metadata_id] +} + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/archive-version-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-version-add-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/archive-version-add-2.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,46 @@ +# /packages/download/www/archive-version-add-2.tcl +ad_page_contract { + Add a new archive and version. + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Tue Dec 12 23:21:40 2000 + @cvs-id +} { + upload_file:notnull,trim + upload_file.tmpfile:tmpfile + {return_url "[ad_conn package_url]"} + version_name:notnull + archive_id:integer,notnull + metadata:array,optional,multiple,html +} -validate { + check_metadata -requires { } { + set archive_type_id [db_string get_archive_type "select archive_type_id from download_archives where archive_id = :archive_id"] + set repository_id [download_repository_id] + array set metadata [download_validate_metadata $repository_id [array get metadata] $archive_type_id] + } +} + +##First, do a download_archive.new +##Then do a download_archive_revision.new +##Then insert into the download_revision_data +set repository_id [download_repository_id] +set user_id [ad_conn user_id] +set admin_p [ad_permission_p $repository_id admin] + +# check for write permission on this folder +ad_require_permission $archive_id write + +set approved_p [ad_decode $admin_p 0 [db_null] "t"] +set approved_date [ad_decode $admin_p 0 [db_null] "sysdate"] +set approved_user [ad_decode $admin_p 0 [db_null] ":user_id"] +set approved_comment [ad_decode $admin_p 0 [db_null] "Automatic approval, add by admin."] + + +# get the ip +set creation_ip [ad_conn peeraddr] +set revision_id [db_nextval acs_object_id_seq] + +db_transaction { + download_insert_revision $upload_file ${upload_file.tmpfile} $repository_id $archive_type_id $archive_id $version_name $revision_id $user_id $creation_ip $approved_p [array get metadata] +} + +ad_returnredirect $return_url \ No newline at end of file Index: openacs-4/packages/download/www/archive-version-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-version-add.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/archive-version-add.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,35 @@ + +Add a New Software Archive +@context_bar@ + +
      +<%= [export_form_vars archive_id return_url]%> + +

      Add a New Archive Revision to @archive_name@

      + + + + + + + + @extra_form_elts@ + + + + + + + + + + + + + +
      Version Number:
      File:
       Use the "Browse..." button to locate your file, + then click "Open".
      +
      + +
      + Index: openacs-4/packages/download/www/archive-version-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/archive-version-add.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/archive-version-add.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,58 @@ +# /packages/download/www/archive-version-add.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Thu Dec 14 00:44:30 2000 + @cvs-id +} { + archive_id:naturalnum,notnull + {return_url ""} +} + +if [empty_string_p $return_url] { + set return_url "[ad_conn package_url]/one-archive?archive_id=$archive_id" +} + +ad_maybe_redirect_for_registration +set repository_id [download_repository_id] + +ad_require_permission $archive_id write + +if ![db_0or1row archive_info_select { + select da.archive_name, + da.archive_type_id, + da.summary, + da.description, + da.description_type, + u.last_name || ', ' || u.first_names as creation_user_name, + da.creation_user, + to_char(da.creation_date,'Mon DD, YYYY') as creation_date + from download_archives_obj da, cc_users u + where da.archive_id = :archive_id + and u.user_id = da.creation_user +}] { + ad_return_complaint 1 "The archive you are looking for (archive ID $archive_id) could not be found" + return +} + +#FIXME: Do the conversion based on mime type +#set description [ad_format_text $description $description_type] +set extra_form_elts "" +db_foreach metadata { + select + dam.metadata_id, + dam.pretty_name, + dam.data_type + from download_archive_metadata dam + where dam.repository_id = :repository_id and + dam.computed_p = 'f' and + (dam.archive_type_id = :archive_type_id or + dam.archive_type_id is null) + order by sort_key +} { + append extra_form_elts [download_metadata_widget $data_type $pretty_name $metadata_id] +} + +set context_bar [list "Add an Revision to $archive_name"] + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/download-verify.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/download-verify.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/download-verify.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,27 @@ + +Download @archive_name@ @version_name@ +@context_bar@ + +

      Download @archive_name@ @version_name@

      + + + + + + +<%= [export_form_vars download_id revision_id] %> + + + + + + +
      File Size:<%= [expr $file_size / 1024]%>k
      Reason for Download: +@reason_widget@ +
      If you have selected "Other"
      please tell us why: +
      +
      +
      + +

      + Index: openacs-4/packages/download/www/download-verify.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/download-verify.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/download-verify.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,51 @@ +# /packages/download/www/download-verify.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Wed Dec 13 00:23:21 2000 + @cvs-id +} { + revision_id:integer,notnull +} + +set user_id [ad_verify_and_get_user_id] +set repository_id [download_repository_id] + +ad_maybe_redirect_for_registration +ad_require_permission $revision_id "read" + +set admin_p [ad_permission_p $repository_id admin] +set approval "" +if { $admin_p == 0 } { + set approval "and dar.approved_p = 't'" +} + +if ![db_0or1row revision_info_select " +select da.archive_id, + da.repository_id as repository_id, + da.archive_name, + da.summary, + dar.revision_id, + dar.file_name, + dar.version_name, + dbms_lob.getlength(dar.content) as file_size +from download_archives_obj da, + download_arch_revisions_obj dar +where da.archive_id = dar.archive_id and + dar.revision_id = :revision_id + $approval +"] { + ad_return_complaint 1 "The version you are looking for (revision ID $revision_id) could not be found" + return +} + +set context_bar [list [list "one-archive?archive_id=$archive_id" $archive_name] "Download $archive_name $version_name"] + +##TODO Get version name +set action "[ad_conn package_url]download/$file_name" + +set reason_widget [ad_db_select_widget -option_list {{"" "Other"}} reasons " + select reason, download_reason_id from download_reasons where repository_id = $repository_id" reason_id] + +set download_id [db_nextval download_reasons_seq] +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/help.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/help.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/help.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,17 @@ + +Help on @title@ +@context_bar@ + + + +@help_text@ + +

      Permissions on Archives

      +
      + + + + + +
      PermissionDescription
      ReadAllows a user to view or download the archive. Revoke this privalege to make an archive private.
      WriteWrite permission is necessary to add a version to an existing archive.
      AdministerAdminister permission is necessary to grant or revoke archive permissions
      +
      Index: openacs-4/packages/download/www/help.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/help.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/help.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,15 @@ +# /packages/download/www/help.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Tue Dec 12 22:17:40 2000 + @cvs-id +} { +} + +array set repository [download_repository_info] +set title $repository(title) +set help_text $repository(help_text) +set context_bar [list "Help on $title"] + +ad_return_template Index: openacs-4/packages/download/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,51 @@ + +@title@ + +
      +

      @title@

      +

      +@description@ + + +

      You must + register + before you can download any files. +

      + + +

      Available Software:

      + +@dimensional@ +@table@ + + +

      Upload a New Version of Software:

      + +
      + + + +

      My Unapparoved Revisions:

      + + +
      +
      + +
      + +
      + Index: openacs-4/packages/download/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,172 @@ +# /packages/download/www/index.tcl +ad_page_contract { + Main download page. + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Mon Dec 11 18:28:29 2000 + @cvs-id +} { + {archive_type_id ""} + {orderby "archive_name"} + {query_string ""} +} -properties { + title:onevalue + description:onevalue + help_text:onevalue +} + +set return_url "[ad_conn url]?[ad_conn query]" +set user_id [ad_verify_and_get_user_id] + +array set repository [download_repository_info] +set repository_id $repository(repository_id) + +set admin_p [ad_permission_p $repository_id admin] +set write_p [ad_permission_p $repository_id write] + +set title $repository(title) +set description $repository(description) +set help_text $repository(help_text) + +#select the current list of archives +set type_dimlist {{all "All" {}}} +db_foreach archive_type { + select archive_type_id as at_id, pretty_name from download_archive_types where repository_id = :repository_id +} { + lappend type_dimlist [list $at_id $pretty_name [list where "da.archive_type_id = $at_id"]] +} + +set dimensional [list \ + {versions "Versions" current { + {current "current" {where "dar.revision_id = content_item.get_live_revision(da.archive_id)" }} + {all "all" {where "da.archive_id = dar.archive_id"}} + }} \ + [list archive_type_id "Type" all $type_dimlist] \ + {updated "Updated" all { + {1d "last 24hrs" {where "dar.publish_date + 1 > SYSDATE"}} + {1w "last week" {where "dar.publish_date + 7 > SYSDATE"}} + {1m "last month" {where "dar.publish_date + 30 > SYSDATE"}} + {all "all" {}} + }} \ +] + +if { $admin_p } { + set approval "" + lappend dimensional {approved "Approval" approved { + {pending "pending" {where "dar.approved_p is null"}} + {approved "approved" {where "dar.approved_p = 't'"}} + {rejected "rejected" {where "dar.approved_p = 'f'"}} + {all "all" {}} + }} +} else { + set approval " and dar.approved_p = 't' " +} + + +set table_def { + {archive_name "Software Name" + {lower(archive_name) $order} + {  $archive_name $version_name  ([expr $file_size / 1024]k)
      $summary}} + {archive_type "Software Type" {} {}} + {downloads "# Downloads" {} {}} +} + +#Setup the metadata +set metadata_selects "" +db_foreach metadata { + select dam.metadata_id, + dam.pretty_name, + dam.data_type, + dam.linked_p + from download_archive_metadata dam + where dam.mainpage_p = 't' and + dam.repository_id = :repository_id and + (dam.archive_type_id = :archive_type_id or dam.archive_type_id is null) + order by sort_key +} { + set answer_column [download_metadata_column $data_type] + set metadata_select "metadata$metadata_id" + append metadata_selects ", (select $answer_column from download_revision_data where revision_id = dar.revision_id and metadata_id = $metadata_id) as $metadata_select + " + if { $linked_p == "t" } { + set display "\$$metadata_select" + } else { + set display "" + } + lappend table_def [list $metadata_select $pretty_name {} $display] +} + +##Add on the metadata columns + +if { $admin_p } { + lappend table_def {dar.approved_p "Approval" + {} + { + [ad_decode $approved_p \ + "t" "approved + \[ + reject\]" \ + "f" "rejected + \[ + approve\]" \ + "pending + \[ + approve | + reject\] + "] + }} + } + +set sql_query " +select da.archive_id, + dat.pretty_name as archive_type, + da.archive_type_id, + da.archive_name, + da.summary, + dar.revision_id, + dar.file_name, + dar.version_name, + dbms_lob.getlength(dar.content) as file_size, + (select count(*) from download_downloads where revision_id = dar.revision_id) as downloads, + dar.approved_p + $metadata_selects +from download_archives_obj da, + download_archive_types dat, + download_arch_revisions_obj dar +where da.repository_id = :repository_id and + dat.archive_type_id = da.archive_type_id and + da.archive_id = dar.archive_id and + acs_permission.permission_p(dar.revision_id, :user_id, 'read') = 't' + $approval + [ad_dimensional_sql $dimensional where] + [ad_order_by_from_sort_spec $orderby $table_def]" + +set dimensional [ad_dimensional $dimensional] +set table [ad_table \ + -Torderby $orderby \ + -Tband_colors {{} {\"\#cccccc\"}} \ + -bind [ad_tcl_vars_to_ns_set user_id repository_id] \ + -Ttable_extra_html { cellpadding=3 } \ + download_index_query $sql_query $table_def ] + +db_multirow types types_select { + select archive_type_id, pretty_name, description from download_archive_types where repository_id = :repository_id +} + +db_multirow my_revisions my_revisions { + select da.archive_name, + dar.version_name, + dar.revision_id, + dar.approved_p, + nvl(dar.approved_comment, 'No comment') approved_comment, + to_char(dar.creation_date,'Mon DD, YYYY') as creation_date + from download_arch_revisions_obj dar, download_archives_obj da + where da.repository_id = :repository_id and + dar.archive_id = da.archive_id and + approved_p != 't' and + dar.creation_user = :user_id + order by creation_date +} + + + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/Attic/master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/master.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,12 @@ +@master_header@ +

      @master_title@

      +

      +@master_context_bar@ +


      + +
      Administration
      +
      +
      Help
      + +
      +@master_footer@ Index: openacs-4/packages/download/www/master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/Attic/master.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/master.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,15 @@ +# /packages/download/www/master.tcl +ad_page_contract { + Code to setup the master template + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Fri Dec 15 15:20:12 2000 + @cvs-id +} { +} + +set master_header [ad_header [ad_decode [value_if_exists title] "" "" [value_if_exists title]] ] +set master_title [value_if_exists title] +set master_context_bar [eval ad_context_bar [value_if_exists context_bar]] +set master_footer [ad_footer] + +set master_admin_p [ad_permission_p [ad_conn package_id] admin] Index: openacs-4/packages/download/www/one-archive.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/one-archive.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/one-archive.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,49 @@ + +One Archive: @archive_name@ +@context_bar@ + + + + + + + + + + + + + + + + + + + + +
      @archive_name@
      Created by:@creation_user_name@ on @creation_date@
      Summary:@summary@
      Description:@description@
      View Download History +

      Edit Permissions on this Archive +

      (permission descriptions) +

      Versions:

      +
      + +
    43. @pending_count@ pending approval. + + +
    44. @archive_name@ @revisions.version_name@ + (download)
      + Created by @revisions.creation_user_name@ on @revisions.creation_date@ + + + + +

    45. add a version + +
    46. + +

      +

      +@gc_link@ +

      +@gc_comments@ +

      Index: openacs-4/packages/download/www/one-archive.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/one-archive.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/one-archive.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,71 @@ +# /packages/download/www/one-archive.tcl +ad_page_contract { + Display information about one archive. + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Wed Dec 13 14:38:45 2000 + @cvs-id +} { + archive_id:integer,notnull +} + + +ad_require_permission $archive_id read + +set admin_p [ad_permission_p $archive_id admin] +set write_p [ad_permission_p $archive_id write] + +if ![db_0or1row archive_info_select { + select da.archive_name, + da.summary, + da.description, + da.description_type, + u.last_name || ', ' || u.first_names as creation_user_name, + da.creation_user, + to_char(da.creation_date,'Mon DD, YYYY') as creation_date + from download_archives_obj da, cc_users u + where da.archive_id = :archive_id + and u.user_id = da.creation_user +}] { + ad_return_complaint 1 "The archive you are looking for (archive ID $archive_id) could not be found" + return +} + +set description [acs_messaging_format_as_html $description_type $description] + +set pending_count [db_string pending_count_select { + select count(*) + from download_arch_revisions_obj dar + where dar.archive_id = :archive_id + and approved_p is null + }] + +db_multirow revisions rep_get_revisions { + select dar.file_name, + dar.version_name, + dar.revision_id, + u.last_name || ', ' || u.first_names as creation_user_name, + dar.creation_user, + to_char(dar.creation_date,'Mon DD, YYYY') as creation_date + + from download_arch_revisions_obj dar, cc_users u + where dar.archive_id = :archive_id + and approved_p = 't' and + u.user_id = dar.creation_user + order by version_name +} + +set context_bar [list $archive_name] + +set gc_link "" +set gc_comments "" +if { [catch { + set gc_link [general_comments::create_link $archive_id $archive_name [ad_conn url]?[ad_conn query] "Add a comment"] + set gc_comments [general_comments::get_comments $archive_id [ad_conn url]?[ad_conn query]] +} error] } { + global errorInfo errorCode + ns_log Notice "gc_link: $errorInfo, $errorCode" +} + + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/one-metadata.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/one-metadata.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/one-metadata.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,12 @@ + +One @pretty_name@ +@context_bar@ + +

      @pretty_name@

      + +
        + +
      • @archives.archive_name@ + (@archives.num_versions@ <%= [ad_decode @archives.num_versions@ 1 version versions] %>) + +
      \ No newline at end of file Index: openacs-4/packages/download/www/one-metadata.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/one-metadata.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/one-metadata.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,35 @@ +# /packages/download/www/one-metadata.tcl +ad_page_contract { + Show all revisions with a given metadata value. + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Fri Dec 15 17:33:03 2000 + @cvs-id +} { + metadata_id:naturalnum,notnull + value +} + +if { ![db_0or1row metadata { + select dam.pretty_name, + dam.data_type + from download_archive_metadata dam + where dam.linked_p = 't' and + dam.metadata_id = :metadata_id +}] } { + ad_return_complaint "Not found" "Metadata id not found" +} +set answer_column [download_metadata_column $data_type] + +##TODO: Add archive types +db_multirow archives archives " + select da.archive_name, + da.archive_id, + count(dar.revision_id) as num_versions + from download_arch_revisions_obj dar, download_archives_obj da + where dar.archive_id = da.archive_id and + dar.revision_id in (select revision_id from download_revision_data where $answer_column = :value and metadata_id = :metadata_id) + group by da.archive_name, da.archive_id +" + +set context_bar [list [list "all-metadata?metadata_id=$metadata_id" "All $pretty_name"] "One $pretty_name"] +ad_return_template Index: openacs-4/packages/download/www/one-revision.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/one-revision.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/one-revision.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,58 @@ + +One Revision: @archive_name@ @version_name@ +@context_bar@ + + +

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      @archive_name@
      version @version_name@
      + [Download Now] + [>See All Versions]
       

      Summary:

      @summary@
      Description:@description@

      Edit Permissions on This Revision +

      (permission descriptions) +
      Created by:@creation_user_name@ on @creation_date@
      Downloads:@downloads@ + + (download history) + + +
      @metadata.pretty_name@:<%= [set @metadata.select_var@]%> +
      + +

      +

      +@gc_link@ +

      +@gc_comments@ +

      Index: openacs-4/packages/download/www/one-revision.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/one-revision.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/one-revision.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,84 @@ +# /packages/download/www/one-revision.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Thu Dec 14 00:18:11 2000 + @cvs-id +} { + revision_id:naturalnum,notnull +} + +set repository_id [download_repository_id] +set admin_p [ad_permission_p $revision_id "admin"] + +##FIXME: Need to do the metadata thing here! +ad_require_permission $revision_id "read" + +set archive_type_id [db_string get_archive_type "select archive_type_id from download_arch_revisions_obj dar, download_archives da where dar.archive_id = da.archive_id and dar.revision_id = :revision_id"] + +set metadata_selects "" +template::multirow create metadata pretty_name select_var +db_foreach metadata { + select dam.metadata_id, + dam.pretty_name, + dam.data_type + from download_archive_metadata dam + where dam.repository_id = :repository_id and + (dam.archive_type_id = :archive_type_id or dam.archive_type_id is null) + order by sort_key +} { + set answer_column [download_metadata_column $data_type] + set metadata_select "metadata$metadata_id" + template::multirow append metadata $pretty_name $metadata_select + append metadata_selects ", (select $answer_column from download_revision_data where revision_id = :revision_id and metadata_id = $metadata_id) as $metadata_select + " +} + + +if ![db_0or1row revision_info_select " +select da.archive_id, + dat.pretty_name as archive_type, + da.archive_type_id, + da.archive_name, + da.summary, + da.description, + da.description_type, + dar.revision_id, + dar.file_name, + dar.version_name, + dar.version_name, + dbms_lob.getlength(dar.content) as file_size, + (select count(*) from download_downloads where revision_id = dar.revision_id) as downloads, + dar.approved_p, + u.last_name || ', ' || u.first_names as creation_user_name, + dar.creation_user, + dar.creation_date + $metadata_selects +from download_archives_obj da, + download_archive_types dat, + download_arch_revisions_obj dar, + cc_users u +where da.repository_id = :repository_id and + dat.archive_type_id = da.archive_type_id and + da.archive_id = dar.archive_id and + dar.revision_id = :revision_id and + dar.creation_user = u.user_id +"] { + ad_return_complaint 1 "The revision you are looking for (revision ID $revision_id) could not be found" + return +} + +set description [acs_messaging_format_as_html $description_type $description] + +set context_bar [list [list "one-archive?archive_id=$archive_id" $archive_name] "$archive_name $version_name"] +set gc_link "" +set gc_comments "" +if { [catch { + set gc_link [general_comments::create_link $revision_id "$archive_name $version_name" [ad_conn url]?[ad_conn query] "Add a comment"] + set gc_comments [general_comments::get_comments $revision_id [ad_conn url]?[ad_conn query]] +} error] } { + global errorInfo errorCode + ns_log Notice "gc_link: $errorInfo, $errorCode" +} + +ad_return_template Index: openacs-4/packages/download/www/admin/approve-or-reject-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/approve-or-reject-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/approve-or-reject-2.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,96 @@ +# /packages/download/www/admin/approve-or-reject-2.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Wed Dec 13 10:10:30 2000 + @cvs-id +} { + action:notnull + revision_id:integer,notnull + { approved_comment [db_null] } + {return_url "[ad_conn package_url]"} +} -validate { + valid_action_value { + if { $action != "approve" && $action != "reject" } { + ad_complain "The value for 'action' must be 'approve' or 'reject'" + } + } +} + +array set repository_info [download_repository_info] + +set repository_id $repository_info(repository_id) +set user_id [ad_verify_and_get_user_id] + +ad_require_permission $repository_id "admin" + +if { $action == "approve" } { + set approved_p "t" + set approval_action "approving" + set approval_status "APPROVED" +} else { + set approved_p "f" + set approval_action "rejecting" + set approval_status "NOT APPROVED" +} + +# Here's where we update the database to set the version as approved +if [catch { + db_dml version_approve " + update download_archive_revisions + set approved_p = :approved_p, + approved_comment = :approved_comment, + approved_user = :user_id, + approved_date = sysdate + where revision_id = :revision_id + " +} errmsg] { + ad_return_error "Problem $approval_action version" "There was a problem $approval_action the version + in the database. Here's the error message: $errmsg" + return +} + +# Everything after here is email related, so let's send the user on their way +ad_returnredirect $return_url + +if {[ad_parameter -package_id [ad_conn package_id] "approval_notification" "download" 1] == 1} { + # We want to send email to use who submitted the version to let + # them know it's approved (or rejected). + + # This is the email address of the user who submitted the version. + db_1row creation_email_select { + select da.archive_name, + dar.creation_user, + dar.version_name + from download_arch_revisions_obj dar, download_archives_obj da + where da.archive_id = dar.archive_id and dar.revision_id = :revision_id + } + + # This is the email address and name of the user who approved (or rejected) the version + db_1row approving_user_select { + select email as approving_email, + first_names || ' ' || last_name as approving_name + from cc_users + where user_id = :user_id + } + + set body " + Your posting to [ad_system_name] $repository_info(title): $archive_name $version_name + + [ad_url][ad_conn package_url]/one-revision?revision_id=$revision_id + + was approved by $approving_name:\n\n$approved_comment" + + set subject "$repository_info(title): $archive_name $version_name $approval_status: " + + db_exec_plsql sendmail { + begin + :1 := nt.post_request( + party_from => :user_id, + party_to => :creation_user, + expand_group => 'f', + subject => :subject, + message => :body); + end; + } +} Index: openacs-4/packages/download/www/admin/approve-or-reject.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/approve-or-reject.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/approve-or-reject.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,25 @@ + +@pretty_noun@ @archive_name@ @version_name@ + + + + <%= [export_form_vars return_url action revision_id] %> + + + + + + + + + + + + + +
      + [Version History]
      + @archive_name@ + (current version) + +
      Created by:@creation_user_name@ on @creation_date@
      Reason for @pretty_noun@:
      Index: openacs-4/packages/download/www/admin/approve-or-reject.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/approve-or-reject.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/approve-or-reject.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,53 @@ +# /packages/download/www/admin/approve-or-reject.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Wed Dec 13 10:10:30 2000 + @cvs-id +} { + action:notnull + revision_id:integer,notnull + {return_url "[ad_conn package_url]"} +} -validate { + valid_action_value { + if { $action != "approve" && $action != "reject" } { + ad_complain "The value for 'action' must be 'approve' or 'reject'" + } + } +} + +set package_id [ad_conn package_id] + +if ![db_0or1row revision_info_select { +select da.repository_id as repository_id, + da.archive_name, + da.summary, + dar.revision_id, + dar.file_name, + dar.version_name, + dbms_lob.getlength(dar.content) as file_size, + decode(da.latest_revision, dar.revision_id, 't', 'f') as current_version_p, + dar.creation_user, + dar.creation_date, + u.last_name || ', ' || u.first_names as creation_user_name +from download_archives_obj da, + download_arch_revisions_obj dar, + cc_users u +where da.archive_id = dar.archive_id and + dar.revision_id = :revision_id and + u.user_id = dar.creation_user +}] { + ad_return_complaint 1 "The version id $revision_id was not found" + return +} + +if { $action == "approve" } { + set pretty_action "Approve" + set pretty_noun "Approval" +} else { + set pretty_action "Reject" + set pretty_noun "Rejection" +} + +ad_return_template + Index: openacs-4/packages/download/www/admin/export-csv.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/export-csv.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/export-csv.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,32 @@ +# /packages/download/www/admin/export-cvs.tcl +ad_page_contract { + returns a comma-separated values file where each row is one + user in a class (designated by the args); this CSV file is + suitable for importation into any standard spreadsheet program + + @param + @author Joseph Bank (based on view-csv.tcl by philg@mit.edu) + @creation-date + @cvs-id $Id: export-csv.tcl,v 1.1 2001/04/20 20:51:10 donb Exp $ +} { + sql_query:verify +} + +set admin_user_id [ad_verify_and_get_user_id] + +# Header for CSV file +set csv_rows "\"User Name\",\"Version\",\"Download Date\",\"From IP\",\"From Hostname\",\"Download Reason\"\n" + +set count 0 +db_foreach download_info_select $sql_query { + append csv_rows "\"$user_name\",\"$version_name\",\"$download_date\",\"$download_ip\",\"$download_hostname\",\"$reason\"\n" + incr count +} + +if { $count == 0 } { + doc_return 200 text/plain "There is no user meet your criteria" +} else { + doc_return 200 text/plain $csv_rows +} + + Index: openacs-4/packages/download/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/index.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/index.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,22 @@ + +@title@ Repository Administration + +@description@ + + \ No newline at end of file Index: openacs-4/packages/download/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/index.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/index.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,18 @@ +# /packages/download/www/admin/index.tcl +ad_page_contract { + Top level admin page. + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Tue Dec 12 15:11:08 2000 + @cvs-id +} { +} + +array set repository [download_repository_info] +set repository_id $repository(repository_id) +set title $repository(title) +set description $repository(description) +set help_text $repository(help_text) + +ad_require_permission $repository_id "admin" + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/admin/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/Attic/master.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/master.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,8 @@ +@master_header@ +

      @master_title@

      +

      +@master_context_bar@ +


      + +
      +@master_footer@ Index: openacs-4/packages/download/www/admin/master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/Attic/master.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/master.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,14 @@ +# /packages/download/www/master.tcl +ad_page_contract { + Code to setup the master template + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Fri Dec 15 15:20:12 2000 + @cvs-id +} { +} + +set master_header [ad_header [ad_decode [value_if_exists title] "" "" [value_if_exists title]] ] +set master_title [value_if_exists title] +set master_context_bar [eval ad_context_bar [value_if_exists context_bar]] +set master_footer [ad_footer] + Index: openacs-4/packages/download/www/admin/report-by-ip.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-by-ip.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/report-by-ip.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,10 @@ + +Downloads by IP +@context_bar@ + +

      +Spam Downloaders +

      + +@dimensional@ +@table@ \ No newline at end of file Index: openacs-4/packages/download/www/admin/report-by-ip.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-by-ip.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/report-by-ip.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,56 @@ +# /packages/download/www/admin/all-user-downloads.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Wed Dec 13 13:39:29 2000 + @cvs-id +} { + {downloaded "1m"} +} + +set repository_id [download_repository_id] + +##TODO: Add support for other +set dimensional { + {downloaded "Download Period" 1m { + {1d "last 24hrs" {where "d.download_date + 1 > SYSDATE"}} + {1w "last week" {where "d.download_date + 7 > SYSDATE"}} + {1m "last month" {where "d.download_date + 30 > SYSDATE"}} + {all "all" {}}}} +} + +set table_def { + {download_ip "From IP" + {no_sort} + {$download_ip}} + {download_hostname "Hostname" {} {}} + {num_downloads "# Downloads" {no_sort} {}} +} + +set sql_query " + select min(u.last_name || ', ' || u.first_names) as user_name, + min(u.email) as email, + min(d.user_id) as user_id, + d.download_ip, + nvl(min(d.download_hostname),'unavailable') as download_hostname, + count(*) as num_downloads, + min('$downloaded') as downloaded + from download_downloads_repository d, cc_users u + where d.repository_id = $repository_id and + d.user_id = u.user_id + [ad_dimensional_sql $dimensional where] + group by d.download_ip + order by 2 desc +" + +set export_sql_query [export_vars -url -sign {sql_query}] + +set dimensional [ad_dimensional $dimensional] +set table [ad_table \ + -Ttable_extra_html { width= 90% align=center} \ + -bind [ad_tcl_vars_to_ns_set repository_id downloaded] \ + download_table $sql_query $table_def ] + +set context_bar [list "Downloads by IP"] + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/admin/report-by-user.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-by-user.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/report-by-user.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,9 @@ + +Downloads by User +@context_bar@ + +

      +Spam Downloaders +

      +@dimensional@ +@table@ \ No newline at end of file Index: openacs-4/packages/download/www/admin/report-by-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-by-user.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/report-by-user.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,51 @@ +# /packages/download/www/admin/all-user-downloads.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Wed Dec 13 13:39:29 2000 + @cvs-id +} { + {downloaded "1m"} +} + +set repository_id [download_repository_id] +##TODO: Add support for other +set dimensional { + {downloaded "Download Period" 1m { + {1d "last 24hrs" {where "d.download_date + 1 > SYSDATE"}} + {1w "last week" {where "d.download_date + 7 > SYSDATE"}} + {1m "last month" {where "d.download_date + 30 > SYSDATE"}} + {all "all" {}}}} +} + +set table_def { + {user_name "User Name (Last name, first name)" + {no_sort} + {$user_name ($email)}} + {num_downloads "# Downloads" {no_sort} {}} +} + +set sql_query " + select min(u.last_name || ', ' || u.first_names) as user_name, + min(u.email) as email, + d.user_id, + count(*) as num_downloads, + min('$downloaded') as downloaded + from download_downloads_repository d, cc_users u + where d.repository_id = $repository_id and + d.user_id = u.user_id + [ad_dimensional_sql $dimensional where] + group by d.user_id + order by 2 desc +" + +set export_sql_query [export_vars -url -sign {sql_query}] + +set dimensional [ad_dimensional $dimensional] +set table [ad_table \ + -Ttable_extra_html { width= 90% align=center} \ + -bind [ad_tcl_vars_to_ns_set repository_id downloaded] \ + download_table $sql_query $table_def ] + +set context_bar [list "Downloads by User"] +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/admin/report-one-ip.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-one-ip.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/report-one-ip.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,9 @@ + +Downloads by IP @download_ip@ +@context_bar@ + +

      +Spam Downloaders +

      +@dimensional@ +@table@ \ No newline at end of file Index: openacs-4/packages/download/www/admin/report-one-ip.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-one-ip.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/report-one-ip.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,76 @@ +# /packages/download/www/admin/report-one-ip-.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Thu Dec 14 16:11:49 2000 + @cvs-id +} { + download_ip:notnull + {orderby "archive_name"} + {downloaded "1m"} +} + + +set repository_id [download_repository_id] +set dimensional { + {downloaded "Download Period" 1m { + {1d "last 24hrs" {where "d.download_date + 1 > SYSDATE"}} + {1w "last week" {where "d.download_date + 7 > SYSDATE"}} + {1m "last month" {where "d.download_date + 30 > SYSDATE"}} + {all "all" {}} +} } + +} + + +set table_def { + {archive_name "Archive" + {archive_name $order} + {$archive_name}} + {version_name "Version" + {version_name $order} + {$version_name}} + {user_name "User Name" + {user_name} + {$user_name}} + {download_date "Download Date" + {download_date} + {}} + {reason "Download Reason" + {reason} + {}} +} + +set sql_query " + select da.archive_name, + da.archive_id, + dar.revision_id, + dar.version_name, + d.download_date, + u.last_name || ', ' || u.first_names as user_name, + u.user_id, + u.email, + nvl(d.download_hostname,'unavailable') as download_hostname, + nvl2(d.reason_id, d.reason, dr.reason) as reason + from download_archives_obj da, download_arch_revisions_obj dar, download_downloads d, download_reasons dr, cc_users u + where da.repository_id = $repository_id + and da.archive_id = dar.archive_id + and d.revision_id = dar.revision_id + and d.download_ip = '$download_ip' + and dr.download_reason_id(+) = d.reason_id + and u.user_id = d.user_id + [ad_dimensional_sql $dimensional where] + [ad_order_by_from_sort_spec $orderby $table_def] +" + +set export_sql_query [export_vars -url -sign {sql_query}] + +set dimensional [ad_dimensional $dimensional] +set table [ad_table \ + -Ttable_extra_html { width= 90% align=center} \ + -bind [ad_tcl_vars_to_ns_set repository_id download_ip] \ + download_table $sql_query $table_def ] + +set context_bar [list [list "report-by-ip" "Downloads by IP"] "$download_ip"] + +ad_return_template Index: openacs-4/packages/download/www/admin/report-one-user.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-one-user.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/report-one-user.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +Downloads by User @first_names@ @last_name@ +@context_bar@ + +@dimensional@ +@table@ \ No newline at end of file Index: openacs-4/packages/download/www/admin/report-one-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-one-user.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/report-one-user.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,74 @@ +# /packages/download/www/admin/one-user-downloads.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Thu Dec 14 16:11:49 2000 + @cvs-id +} { + user_id:integer,notnull + {orderby "archive_name"} + {downloaded "1m"} +} + +set repository_id [download_repository_id] +set dimensional { + {downloaded "Download Period" 1m { + {1d "last 24hrs" {where "d.download_date + 1 > SYSDATE"}} + {1w "last week" {where "d.download_date + 7 > SYSDATE"}} + {1m "last month" {where "d.download_date + 30 > SYSDATE"}} + {all "all" {}} +} } + +} + + +set table_def { + {archive_name "Archive" + {archive_name $order} + {$archive_name}} + {version_name "Version" + {version_name $order} + {$version_name}} + {download_date "Download Date" + {download_date} + {}} + {download_ip "From IP" + {download_ip} + {$download_ip ($download_hostname)}} + {reason "Download Reason" + {reason} + {}} +} + +set sql_query " + select da.repository_id, + da.archive_name, + da.archive_id, + dar.revision_id, + dar.version_name, + d.download_date, + d.download_ip, + nvl(d.download_hostname,'unavailable') as download_hostname, + nvl2(d.reason_id, d.reason, dr.reason) as reason + from download_archives_obj da, download_arch_revisions_obj dar, download_downloads d, download_reasons dr + where da.repository_id = $repository_id + and da.archive_id = dar.archive_id + and d.revision_id = dar.revision_id + and d.user_id = $user_id + and dr.download_reason_id(+) = d.reason_id + [ad_dimensional_sql $dimensional where] + [ad_order_by_from_sort_spec $orderby $table_def] +" + +db_1row name_select "select u.last_name, u.first_names + from cc_users u + where u.user_id = :user_id " + +set dimensional [ad_dimensional $dimensional] +set table [ad_table \ + -Ttable_extra_html { width= 90% align=center} \ + -bind [ad_tcl_vars_to_ns_set repository_id user_id] \ + download_table $sql_query $table_def ] + +set context_bar [list [list "report-by-user" "Downloads by User"] "$first_names $last_name"] +ad_return_template Index: openacs-4/packages/download/www/admin/report-version-downloads.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-version-downloads.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/report-version-downloads.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,14 @@ + +@archive_name@ Download History +@context_bar@ + + + + +@dimensional@ +
      Total downloads listed: @count@; Overall Total for @archive_name@: @total_count@ +
      +@table@ \ No newline at end of file Index: openacs-4/packages/download/www/admin/report-version-downloads.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-version-downloads.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/report-version-downloads.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,110 @@ +# /packages/download/www/admin/report-version-downloads.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Thu Dec 14 17:37:31 2000 + @cvs-id +} { + {archive_id:integer,notnull} + {orderby "last_name"} + {downloaded 1m} + {versions "current"} +} + +ad_require_permission $archive_id "admin" + +set dimensional { + {versions "Versions" current { + {current "current" {where "dar.revision_id = content_item.get_live_revision(dar.archive_id)" }} + {all "all" ""} + }} + + {downloaded "Download Period" 1m { + {1d "last 24hrs" {where "d.download_date + 1 > SYSDATE"}} + {1w "last week" {where "d.download_date + 7 > SYSDATE"}} + {1m "last month" {where "d.download_date + 30 > SYSDATE"}} + {all "all" {}} + }} +} + +set table_def { + {user_name "User Name" + {user_name $order} + {$user_name}} + {version_name "Version" + {version_name $order} + {$version_name}} + {download_date "Download Date" + {download_date $order} + {}} + {download_ip "From IP (hostname)" + {download_ip $order} + {$download_ip ($download_hostname)}} + {reason "Download Reason" + {reason $order} + {$reason}} +} + +db_1row name_select { + select da.archive_name from download_archives_obj da where da.archive_id = :archive_id +} + +if {$versions == "all" } { + set version_str " in ( + select revision_id from download_arch_revisions_obj + where archive_id = :archive_id )" +} else { + set version_str " = ( + select revision_id from download_arch_revisions_obj + where archive_id = :archive_id + and revision_id = content_item.get_live_revision(:archive_id)) + " +} + +set count [db_string count_select "select count(*) +from download_downloads d, download_arch_revisions_obj dar +where dar.archive_id = :archive_id and + d.revision_id = dar.revision_id + [ad_dimensional_sql $dimensional where] +"] + +set temp_downloaded $downloaded + +set total_count [db_string count_select "select count(*) +from download_downloads d, download_arch_revisions_obj dar +where dar.archive_id = :archive_id and + d.revision_id = dar.revision_id + [ad_dimensional_sql $dimensional where] +"] +set downloaded $temp_downloaded + +set sql_query " + select u.last_name || ', ' || u.first_names as user_name, + d.download_date, + d.download_ip, + nvl(d.download_hostname,'unavailable') as download_hostname, + nvl(dar.version_name, 'unnamed') as version_name, + dar.revision_id, + u.user_id, + u.email, + nvl2(d.reason_id, d.reason, dr.reason) as reason + from download_arch_revisions_obj dar, download_downloads d, download_reasons dr, cc_users u + where d.user_id = u.user_id + and dar.archive_id = $archive_id + and dar.revision_id = d.revision_id + and dr.download_reason_id(+) = d.reason_id + [ad_dimensional_sql $dimensional where] + [ad_order_by_from_sort_spec $orderby $table_def] +" + +set export_sql_query [export_vars -url -sign {sql_query}] + +set dimensional [ad_dimensional $dimensional] +set table [ad_table \ + -Ttable_extra_html { width= 90% align=center} \ + -bind [ad_tcl_vars_to_ns_set archive_id] \ + download_table $sql_query $table_def ] + +set context_bar [list "$archive_name Download History"] + +ad_return_template Index: openacs-4/packages/download/www/admin/repository-ae.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-ae.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-ae.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,6 @@ + +Add/Edit Repository +{Add/Edit Repository} + + + Index: openacs-4/packages/download/www/admin/repository-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-ae.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-ae.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,72 @@ +# /packages/download/www/admin/repository-ae.tcl +ad_page_contract { + Repository add/edit page. + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Mon Dec 11 18:49:53 2000 + @cvs-id +} { + repository_id:integer,notnull + {return_url "[ad_conn package_url]/admin/"} +} + +set package_id [ad_conn package_id] +set user_id [ad_verify_and_get_user_id] +ad_require_permission $package_id "admin" + +form create ae_repository +element create ae_repository return_url -label "ReturnUrl" -datatype text -widget hidden +element create ae_repository repository_id -label "RepositoryID" -datatype integer -widget hidden +element create ae_repository title -label "Title" -datatype text +element create ae_repository description -label "Description" -datatype text -widget textarea -html {rows 4 cols 40} -optional +element create ae_repository help_text -label "Help Text" -datatype text -widget textarea -html {rows 4 cols 40} -optional + +#For now, just show link to admin page +if { ![db_0or1row repository_info { + select title, description, help_text from download_repository_obj where repository_id = :repository_id +}] } { + set title "" + set description "" + set help_text "" +} + +if { [form is_request ae_repository] } { + element set_properties ae_repository repository_id -value $repository_id + element set_properties ae_repository title -value $title + element set_properties ae_repository description -value $description + element set_properties ae_repository help_text -value $help_text + element set_properties ae_repository return_url -value $return_url +} + +if { [form is_valid ae_repository] } { + form get_values ae_repository + set edit_p [db_string rep_count_get "select count(*) from download_repository_obj where repository_id = :repository_id"] + if { $edit_p == "0" } { + db_dml todo_insert { + declare + the_id integer; + begin + the_id := download_rep.new(repository_id => :repository_id, + title => :title, + description => :description, + help_text => :help_text, + creation_user => :user_id, + parent_id => :package_id, + context_id => :package_id); + end; + } + } else { + db_dml repository_edit { + begin + download_rep.edit(repository_id => :repository_id, + title => :title, + description => :description, + help_text => :help_text, + modifying_user => :user_id + ); + end; + } + } + ad_returnredirect "$return_url" +} + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/admin/repository-metadata-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-metadata-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-metadata-delete.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,19 @@ +# /packages/download/www/admin/repository-metadata-delete.tcl +ad_page_contract { + Delete an archive type. + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Tue Dec 12 16:46:37 2000 + @cvs-id +} { + metadata_id:integer,notnull +} + +set repository_id [download_repository_id] +ad_require_permission $repository_id "admin" + +db_dml metadata_delete { + delete from download_archive_metadata where metadata_id = :metadata_id +} + +ad_returnredirect "repository-metadata" + Index: openacs-4/packages/download/www/admin/repository-metadata-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-metadata-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-metadata-edit.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +Edit Metadata +{Metadata Edit} + + Index: openacs-4/packages/download/www/admin/repository-metadata-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-metadata-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-metadata-edit.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,98 @@ +# /packages/download/www/admin/repository-metadata-edit.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Fri Dec 15 14:53:56 2000 + @cvs-id +} { + metadata_id:integer,notnull +} + +set repository_id [download_repository_id] +ad_require_permission $repository_id "admin" + +db_0or1row metadata_select { + select + dam.metadata_id, + dam.repository_id, + dam.archive_type_id, + nvl(dat.pretty_name, 'All') as archive_name, + dam.sort_key, + dam.pretty_name, + dam.data_type, + dam.required_p, + dam.linked_p, + dam.mainpage_p, + dam.computed_p + from download_archive_metadata dam, download_archive_types dat + where dam.repository_id = :repository_id and + dam.metadata_id = :metadata_id and + dam.archive_type_id = dat.archive_type_id(+) + order by archive_type_id +} + +set choices [db_list choices { + select label from download_metadata_choices where metadata_id = :metadata_id +}] +set choices [join $choices ","] + + +form create edit_metadata +element create edit_metadata metadata_id -label "MetadataID" -datatype integer -widget hidden +element create edit_metadata archive_type_id -label "Archive Type" -datatype integer -widget select -optional +element create edit_metadata pretty_name -label "Field Name" -datatype text +element create edit_metadata sort_key -label "Sort Key" -datatype integer +element create edit_metadata data_type -label "Data Type" -datatype text -widget select -options { {"short text" "shorttext"} {"long text" "text"} {"boolean" "boolean"} {"number" "number"} {"integer" "integer"} {"date" "date"} {"choice" "choice"}} +element create edit_metadata choices -label "Choices (, seperated list of choices if data type is choice)" -datatype text -optional +element create edit_metadata required_p -label "Is the field required" -datatype text -widget select -value "f" -options {{"True" "t"} {"False" "f"}} +element create edit_metadata linked_p -label "Should there be a link to show all archives with this value" -datatype text -widget select -value "f" -options {{"True" "t"} {"False" "f"}} +element create edit_metadata mainpage_p -label "Should this value show up in the main page table" -datatype text -widget select -value "f" -options {{"True" "t"} {"False" "f"}} +element create edit_metadata computed_p -label "Is this value computed (probably no)?" -datatype text -widget select -value "f" -options {{"True" "t"} {"False" "f"}} + +element set_properties edit_metadata archive_type_id -options [concat {{"All" ""}} [db_list_of_lists archiv_types " + select pretty_name, archive_type_id from download_archive_types where repository_id = $repository_id"]] + +if {[form is_request edit_metadata]} { + foreach name {metadata_id archive_type_id pretty_name sort_key data_type choices required_p linked_p mainpage_p computed_p} { + element set_properties edit_metadata $name -value [set $name] + element set_properties edit_metadata $name -values [set $name] + } +} + +if {[form is_valid edit_metadata]} { + form get_values edit_metadata + db_transaction { + db_dml metadata_update { + update download_archive_metadata set + archive_type_id = :archive_type_id, + sort_key = :sort_key, + pretty_name = :pretty_name, + data_type = :data_type, + required_p = :required_p, + linked_p = :linked_p, + mainpage_p = :mainpage_p, + computed_p = :computed_p + where metadata_id = :metadata_id and + repository_id = :repository_id + } + db_dml choices_delete { + delete from download_metadata_choices where metadata_id = :metadata_id + } + + if { $data_type == "choice" } { + set choices [split $choices ","] + set count 0 + foreach choice $choices { + incr count + db_dml choice_insert { + insert into download_metadata_choices (choice_id, metadata_id, label, sort_order) + values (download_md_choice_id_sequence.nextval, :metadata_id, :choice, :count) + } + } + } + } + ad_returnredirect "repository-metadata" +} + + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/admin/repository-metadata.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-metadata.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-metadata.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,22 @@ + +@title@ +@context_bar@ + + + +

      Current Metadata

      +
        + +
      • Name: @metadata.pretty_name@
        + Archive Type: @metadata.archive_name@
        + Sort key: @metadata.sort_key@
        + Data Type: @metadata.data_type@
        + Required: @metadata.required_p@
        + Linked: @metadata.linked_p@
        + Mainpage: @metadata.mainpage_p@
        + Computed: @metadata.computed_p@
        + + Delete | + Edit + +
      Index: openacs-4/packages/download/www/admin/repository-metadata.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-metadata.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-metadata.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,102 @@ +# /packages/download/www/admin/repository-metadata.tcl +ad_page_contract { + Repository metadata + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Tue Dec 12 15:58:00 2000 + @cvs-id +} { +} + +set repository_id [download_repository_id] +set title "Download Repository Metadata" +set context_bar [list "Metadata"] + +form create add_metadata +element create add_metadata metadata_id -label "MetadataID" -datatype integer -widget hidden +element create add_metadata archive_type_id -label "Archive Type" -datatype integer -widget select -optional +element create add_metadata pretty_name -label "Field Name" -datatype text +element create add_metadata sort_key -label "Sort Key" -datatype integer +element create add_metadata data_type -label "Data Type" -datatype text -widget select -options { {"short text" "shorttext"} {"long text" "text"} {"boolean" "boolean"} {"number" "number"} {"integer" "integer"} {"date" "date"} {"choice" "choice"}} +element create add_metadata choices -label "Choices (, seperated list of choices if data type is choice)" -datatype text -optional +element create add_metadata required_p -label "Is the field required" -datatype text -widget select -value "f" -options {{"True" "t"} {"False" "f"}} +element create add_metadata linked_p -label "Should there be a link to show all archives with this value" -datatype text -widget select -value "f" -options {{"True" "t"} {"False" "f"}} +element create add_metadata mainpage_p -label "Should this value show up in the main page table" -datatype text -widget select -value "f" -options {{"True" "t"} {"False" "f"}} +element create add_metadata computed_p -label "Is this value computed (probably no)?" -datatype text -widget select -value "f" -options {{"True" "t"} {"False" "f"}} + +element set_properties add_metadata archive_type_id -options [concat {{"All" ""}} [db_list_of_lists archiv_types " + select pretty_name, archive_type_id from download_archive_types where repository_id = $repository_id"]] + +if { [form is_request add_metadata] } { + element set_properties add_metadata metadata_id -value [db_nextval acs_object_id_seq] +} + +if {[form is_valid add_metadata]} { + form get_values add_metadata + db_transaction { + db_dml metadata_insert { + insert into download_archive_metadata ( + metadata_id, + repository_id, + archive_type_id, + sort_key, + pretty_name, + data_type, + required_p, + linked_p, + mainpage_p, + computed_p) + values ( + :metadata_id, + :repository_id, + :archive_type_id, + :sort_key, + :pretty_name, + :data_type, + :required_p, + :linked_p, + :mainpage_p, + :computed_p) + } + + if { $data_type == "choice" } { + set choices [split $choices ","] + set count 0 + foreach choice $choices { + incr count + db_dml choice_insert { + insert into download_metadata_choices (choice_id, metadata_id, label, sort_order) + values (download_md_choice_id_sequence.nextval, :metadata_id, :choice, :count) + } + } + } + #Clear up all old values to defaults + foreach name {archive_type_id pretty_name sort_key data_type choices} { + element set_properties add_metadata $name -value "" + } + foreach name {required_p linked_p mainpage_p computed_p} { + element set_properties add_metadata $name -value "f" + } + element set_properties add_metadata metadata_id -value [db_nextval acs_object_id_seq] + } +} + +db_multirow metadata metadata_select { + select + dam.metadata_id, + dam.repository_id, + dam.archive_type_id, + nvl(dat.pretty_name, 'All') as archive_name, + dam.sort_key, + dam.pretty_name, + dam.data_type, + dam.required_p, + dam.linked_p, + dam.mainpage_p, + dam.computed_p + from download_archive_metadata dam, download_archive_types dat + where dam.repository_id = :repository_id and + dam.archive_type_id = dat.archive_type_id(+) + order by archive_type_id, sort_key +} + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/admin/repository-reasons-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-reasons-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-reasons-delete.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,19 @@ +# /packages/download/www/admin/repository-reasons-delete.tcl +ad_page_contract { + Delete a reason. + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Tue Dec 12 16:46:37 2000 + @cvs-id +} { + download_reason_id:integer,notnull +} + +set repository_id [download_repository_id] +ad_require_permission $repository_id "admin" + +db_dml reason_delete { + delete from download_reasons where download_reason_id = :download_reason_id +} + +ad_returnredirect "repository-reasons" + Index: openacs-4/packages/download/www/admin/repository-reasons-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-reasons-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-reasons-edit.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +@title@ +@context_bar@ + + Index: openacs-4/packages/download/www/admin/repository-reasons-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-reasons-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-reasons-edit.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,39 @@ +# /packages/download/www/admin/repository-reasons-edit.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Wed Jan 10 18:34:23 2001 + @cvs-id +} { + download_reason_id:integer,notnull +} + +set repository_id [download_repository_id] +set user_id [ad_verify_and_get_user_id] + +ad_require_permission $repository_id "admin" + +form create edit_reason +element create edit_reason download_reason_id -label "Reason ID" -datatype integer -widget hidden +element create edit_reason reason -label "Reason" -datatype text -widget textarea -optional -html {rows 4 cols 40} + + +db_1row edit_info {select download_reason_id, reason from download_reasons where download_reason_id = :download_reason_id} +if { [form is_request edit_reason] } { + element set_properties edit_reason download_reason_id -value $download_reason_id + element set_properties edit_reason reason -value $reason +} + +if {[form is_valid edit_reason]} { + form get_values edit_reason + db_dml edit_reason { + update download_reasons set reason = :reason + where download_reason_id = :download_reason_id + } + ad_returnredirect "repository-reasons" +} + +set title "Edit Reason" +set context_bar [list [list "repository-types" "Repository Types"] $title] + +ad_return_template Index: openacs-4/packages/download/www/admin/repository-reasons.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-reasons.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-reasons.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,16 @@ + +@title@ +@context_bar@ + +

      Add a new Download Reason

      + + + +

      Current Reasons

      + Index: openacs-4/packages/download/www/admin/repository-reasons.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-reasons.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-reasons.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,38 @@ +# /packages/download/www/admin/repository-reasons.tcl +ad_page_contract { + Repository reasons + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Tue Dec 12 15:58:00 2000 + @cvs-id +} { +} + +set repository_id [download_repository_id] +ad_require_permission $repository_id "admin" + +set title "Download Repository Download Reasons" +set context_bar [list "Download Reasons"] + +form create add_reason +element create add_reason download_reason_id -label "Reason ID" -datatype integer -widget hidden +element create add_reason reason -label "Reason" -datatype text -widget textarea -optional -html {rows 4 cols 40} + + +if { [form is_request add_reason] } { + element set_properties add_reason download_reason_id -value [db_nextval acs_object_id_seq] +} + +if { [form is_valid add_reason] } { + form get_values add_reason + db_dml repository_reasons_insert { + insert into download_reasons (download_reason_id, repository_id, reason) values (:download_reason_id, :repository_id, :reason) + } + element set_properties add_reason download_reason_id -value [db_nextval acs_object_id_seq] + element set_properties add_reason reason -value "" +} + +db_multirow reasons reasons_select { + select download_reason_id, reason from download_reasons where repository_id = :repository_id +} + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/admin/repository-types-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-types-delete.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-types-delete.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,19 @@ +# /packages/download/www/admin/repository-reasons-delete.tcl +ad_page_contract { + Delete an archive type. + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Tue Dec 12 16:46:37 2000 + @cvs-id +} { + archive_type_id:integer,notnull +} + +set repository_id [download_repository_id] +ad_require_permission $repository_id "admin" + +db_dml type_delete { + delete from download_archive_types where repository_id = :repository_id and archive_type_id = :archive_type_id +} + +ad_returnredirect "repository-types" + Index: openacs-4/packages/download/www/admin/repository-types-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-types-edit.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-types-edit.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,5 @@ + +@title@ +@context_bar@ + + Index: openacs-4/packages/download/www/admin/repository-types-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-types-edit.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-types-edit.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,40 @@ +# /packages/download/www/admin/repository-types-edit.tcl +ad_page_contract { + + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Wed Jan 10 18:34:23 2001 + @cvs-id +} { + archive_type_id:integer,notnull +} + +set repository_id [download_repository_id] +set user_id [ad_verify_and_get_user_id] + +ad_require_permission $repository_id "admin" + +form create edit_type +element create edit_type archive_type_id -label "ArchiveType ID" -datatype integer -widget hidden +element create edit_type pretty_name -label "Name" -datatype text +element create edit_type description -label "Description" -datatype text -widget textarea -html {rows 4 cols 40} + +db_1row edit_info {select archive_type_id, pretty_name, description from download_archive_types where archive_type_id = :archive_type_id} +if { [form is_request edit_type] } { + element set_properties edit_type archive_type_id -value $archive_type_id + element set_properties edit_type pretty_name -value $pretty_name + element set_properties edit_type description -value $description +} + +if {[form is_valid edit_type]} { + form get_values edit_type + db_dml edit_type { + update download_archive_types set pretty_name = :pretty_name, description = :description + where archive_type_id = :archive_type_id + } + ad_returnredirect "repository-types" +} + +set title "Edit $pretty_name" +set context_bar [list [list "repository-types" "Repository Types"] $title] + +ad_return_template Index: openacs-4/packages/download/www/admin/repository-types.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-types.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-types.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,15 @@ + +@title@ +@context_bar@ + + + +

      Current Archive Types

      +
        + +
      • @types.pretty_name@
        + @types.description@
        + Delete | + Edit + +
      Index: openacs-4/packages/download/www/admin/repository-types.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/repository-types.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/repository-types.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,40 @@ +# /packages/download/www/admin/repository-types.tcl +ad_page_contract { + Repository types + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Tue Dec 12 15:58:00 2000 + @cvs-id +} { +} + +set repository_id [download_repository_id [ad_conn package_id] 0] +ad_require_permission $repository_id "admin" + +set title "Download Repository Archive Types" +set context_bar [list "Archive Types"] + +form create add_type +element create add_type archive_type_id -label "ArchiveType ID" -datatype integer -widget hidden +element create add_type pretty_name -label "Name" -datatype text +element create add_type description -label "Description" -datatype text -widget textarea -html {rows 4 cols 40} + +if { [form is_request add_type] } { + element set_properties add_type archive_type_id -value [db_nextval acs_object_id_seq] +} + +if {[form is_valid add_type]} { + form get_values add_type + db_dml repository_types_insert { + insert into download_archive_types (archive_type_id, repository_id, pretty_name, description) values (:archive_type_id, :repository_id, :pretty_name, :description) + } + element set_properties add_type archive_type_id -value [db_nextval acs_object_id_seq] + element set_properties add_type pretty_name -value "" + element set_properties add_type description -value "" +} + + +db_multirow types types_select { + select archive_type_id, pretty_name, description from download_archive_types where repository_id = :repository_id +} + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/admin/spam-users-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/spam-users-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/spam-users-2.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,65 @@ +# /packages/download/www/admin/spam-users-2.tcl +ad_page_contract { + Spam downloaders. + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Mon Jan 8 18:05:51 2001 + @cvs-id +} { + userid_list:verify + subject:notnull + msgbody:notnull +} + +ad_require_permission [ad_conn package_id] "admin" + +set user_id [ad_verify_and_get_user_id] + +set page_content "[ad_header "Spam Downloaders"] + +

      Spam Downloaders

      +

      +[ad_context_bar "Spam Downloader"] + +

      Spam Downloader

      + +Spam is being sent out. You may move to a different url if you don't want to +wait for this process to complete. + +

      +... +" + +# Takes too long to send emails +ad_return_top_of_page $page_content + +# send out email +set count 0 +foreach to_user_id $userid_list { + db_exec_plsql sendmail { + begin + :1 := nt.post_request( + party_from => :user_id, + party_to => :to_user_id, + expand_group => 'f', + subject => :subject, + message => :msgbody); + end; + } + incr count +} + +set page_content " + +

      +$count users are spammed successfully! + +[ad_footer] +" + +ns_write $page_content + + + + + + Index: openacs-4/packages/download/www/admin/spam-users.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/spam-users.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/spam-users.adp 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,26 @@ + +Spam Downloaders + +

      +@userid_list_export@ + + + + + + + + + + + + + +
      Email Subject:
      Message:
      +
      + +

      +The following users will receive your spam: +

        +@userlist_str@ +
      Index: openacs-4/packages/download/www/admin/spam-users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/spam-users.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/admin/spam-users.tcl 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,36 @@ +# /packages/download/www/admin/spam-users.tcl +ad_page_contract { + Spam downloaders based on the queyr passed in + @author jbank@arsdigita.com [jbank@arsdigita.com] + @creation-date Mon Jan 8 17:33:15 2001 + @cvs-id +} { + sql_query:verify +} + +ad_require_permission [ad_conn package_id] "admin" +set user_id [ad_verify_and_get_user_id] + +set userlist_str "" +set email_list [list] +set old_userid 0 +set count 0 + +#TODO: Add where clause that checks from no_spam pref. +db_foreach user_select "select u.email, u.user_id, u.user_name from ($sql_query) u" { + if { $user_id != $old_userid } { + append userlist_str "
    47. $user_name ($email)" + lappend userid_list $user_id + } + set old_userid $user_id + incr count +} + +# Display user name only when count is less than 25 +if { $count > 25 } { + set userlist_str "
    48. $count users will receive your spam." +} + +set userid_list_export [export_vars -form -sign {userid_list}] + +ad_return_template \ No newline at end of file Index: openacs-4/packages/download/www/doc/features.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/doc/features.txt,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/doc/features.txt 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,80 @@ +-Set the object names to be something that will make sense when setting permissions, etc. +-Check for unique object names before doing insert. + +-Show some or all versions (check this because live_revision may not be the same as the most recent approved version) + -see file storage (use content-repository) + +DONE-Record and show number of downloads + +-Optional Approval (how is this handled by the content-repository?) + -need to add parameter + +DONE-Edit permissions (set default to world readable??) + +-Need to define permissions for a couple of non-obvious things + (like who can download, upload or approve) + +DONE-Need to make descriptions that support both plain text and html +-Need to add code to convert descriptions based on type + +DONE-For revisions, need to determine what is used for the revision_name + and what is used for the filename + +DONE-Add general comments links + +DONE-Add version_name to revision + +DONE-Add context bars +-------------------------------------------------------------------------------- + +Each Repository Has The Following Configuration Features: + +1.) Name, Message + +2.) What types of archives are collected. + +3.) What MetaData is collected per archive + +4.) What reasons can downloaders give + +5.) Other parameters: + -do we need admin approval? + -default permissions, this can be setup by inheriting properly + +-------------------------------------------------------------------------------- + +Pages That I Envision: + + Repository Level Admin Pages: + MOSTLYDONE-Configuration Page, shows current config + MOSTLYDONE-Add/Edit Name, Message of Repository + MOSTLYDONE-Add/Edit Archive Types + MOSTLYDONE-Add/Edit MetaData collected + -Add choices as appropriate + MOSTLYDONE-Add/Edit reasons + DONE-Download Reports: + DONE-Downloads by IP/User + DONE-Downloads by Version + DONE-Report by one IP/User + DONE-Show list of archives, with approval status + DONE-Spam downloaders + DONE-Export csv of downloaders + -Delete an archive + + User Pages: + DONE-Index page lists archives, with sensible filtering, sorting + DONE-Help Page + DONE-Show all archives with a specific piece of metadata + DONE-Detail page about one archive + DONE-Detail page about one version + DONE-Show all values of one type of metadata, with counts + DONE-Download page, with list of reasons + + Archive Level Admin Pages: + DONE-add an archive + DONE-add a version to an archive (upload the file, plus metadata) + -edit archive info + -delete a version + DONE-approve, reject versions + -special page to upload an apm that adds the correct metadata + automatically Index: openacs-4/packages/download/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/doc/index.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/doc/index.html 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,26 @@ + + +Download Package Documentation + + + +

      Download Package Documentation

      + +ACS Documentation + +
      +

      +

      + +
      + +
      + +
      jbank@arsdigita.com
      + + + Index: openacs-4/packages/download/www/doc/requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/doc/requirements.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/doc/requirements.html 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1,337 @@ + + + + Download Package Requirements + + + +

      Download Package Requirements

      + by Joseph Bank + based largely on the ACS Repository requirements written by by Todd Nightingale +
      + + This is a DRAFT + +

      I. Introduction

      + +

      ACS 4.x has a file storage module, so an obvious question is: + "Why do we need a seperate download module?" The download module + is targeted at a different usage pattern and interface. The + intent of the download module is to provide an online repository + for the public (or pseudo-public) distribution of infrequently + modified files. The ACS 3.4 download module, used at + http://www.arsdigita.com/download for distribution of software + provided by ArsDigita, and the acs-repository, used at + http://www.arsdigita.com/acs-repository for distribution of ACS + packages, are the prime examples of this usage pattern. While + the file-storage module could be used for this purpose, it would + be an akward fit. Additionally, we would like to track who has + downloaded the file and have the ability to spam or charge those + users as appropriate. + +

      II. Vision Statement

      + +

      + There are thousands of independent developers all over the world + writing their own ACS packages. Without a canonical distribution + point finding the packages you need becomes a formidable task, + forcing developers to duplicating each others efforts. The + download module allows us to setup a package repository service + for users to upload their own packages and download contributed + packages in order to facilitate true development collaboration. + +

      + +

      III. System/Application Overview

      + +

      + The ACS download package provides an application for managing file + distribution. +

      + +

      + The package consists of the following components: +

      + +
        +
      • A data model for storing files. +
      • A data model for storing meta-information about files. +
      • A data model for storing information about who has downloaded files. +
      • A user interface for displaying available files. +
      • A user interface for downloading files. +
      • A user interface for uploading files. +
      • A user interface for administering files. +
      + +

      IV. Use-cases and User Scenarios

      + + The download package is intended to support two user roles: +
        +
      1. User (downloading and contributing) +
      2. Administrator +
      + + Joe Contributer (currently working for Joe.com) writes a piece + of software used to do knowledge management (KM) for the ACS. He + packages his code using the APM. Joe + feels that others could gain from using his knew package so he uploads + it the the ArsDigita Package Repository. Since it is in APM format in + one step a package, version, vendor, owner and description data are + all uploaded (extracted from the .info file). + +

      + + Jane Admin who installed and configured the download package chose + to not allow users to download versions pending approval. That forces + her to download Joe's package from the admin pages and install it. + She notices that it isn't malicious in any way and doesn't harm her + ACS installation so she approves it to go live on her package + repository. Joe is informed via email that his package was approved + (because Jane set this configuration parameter). + +

      + + Don Downloader is scanning through the most recently uploaded APMs on + a package repository and finds Joe's KM package. He notices that + many other users have downloaded the package and have made comments + praising the package as well as Joe.com. Since Ben is a + follower by heart he decides to download the package as well and + install it on his system. (Ben's crafty friend Alyssa later informs + Ben that he could have just had the APM install directly from the + repository url). + +

      + + Benny Beancounter loves to learn about who's downloading files from + his site and what reasons they give for downloads. On a frequent basis + Benny visits the download packages admin pages and views a report of + how many downloads occured for each file. He then drills down on a + particular file and views a list of the users who downloaded the file + and their specified reason for downloading. + + +

      V. Related Links

      + + + + +

      VI.A Requirements: Datamodel

      + +

      10.0 Versioned File Storage +

      +

      + ACS Download must provide versioned file storage. +

      + +

      20.0 User Tracking +

      +

      + ACS Download must store information about which users have downloaded which files (including versions). +

      + +

      20.0 Package Based Meta Information +

      +

      + ACS Download must be able to store arbitrary meta information on a per package basis. + i.e. All files provided by this instance of the package require the fields x, y and z. +

      + +

      VI.B Requirements: Users Interface

      + + The requirement of the user interface is to enable the user to access + package versions in the repository and upload his own packages and + versions. + +

      + 100.0 Define a Package (must be logged in) +

      +

      + 100.1 + The user must be able to create a repository package by specifying all the necessary information: + +
        +
      • package key (unique) +
      • package name +
      • package url (unique) +
      • owner information +
      • vendor information (optional) +
      • Description +
      • Description Format +
      • package type +
      • package category (optional) +
      + +

      + 100.2 + If the user fails to provide the required information the package + cannot be created. + +

      + 100.3 + If the tries to add a package with overlapping values in any unique + field the package cannot be created. + +

      + 100.4 + All the package information should be edit-able after package + creation. + +

      + +

      + 110.0 Manage Package Permissions (must be logged in) + +

      +

      + 110.1 + The user may grant or revoke write and administer privileges on + any package which he/she has administer privileges. + +

      + 110.2 + The user who creates a package starts with write and administer + privileges. + +

      +

      + 120.0 Upload Versions (must be logged in) +

      +

      + 120.1 + The user must be able to upload versions of a package to the + repository. These versions contain the actual package content in + a tarball (gzipped tar archive). Along with these versions come + their own meta-data: +
        +
      • version number (like 1.1 or 1.2.3d4) +
      • version url (unique) +
      • Description +
      • Description Format +
      + +

      + 120.2 + If the user fails to provide the required information the version + cannot be created. + +

      + 120.3 + If the user tries to add a version with overlapping values in any + unique field the package cannot be created. + +

      + 120.4 + If the user tries to upload a version which already resides in the + repository the version cannot be created. + +

      + 120.5 + If the user will not be able to attempt to upload versions into + packages which he does not have write permission on. + +

      +

      + + 130.0 APM Auto-load (must be logged in) + +

      +

      + 130.1 + When a user is uploading an APM all package and version information + must be automatically entered (without additional user + prompting). + +

      + 130.2 + If it is the first version of a package all package information + must be added to the repository as well as version data. + +

      + 130.3 + If the package already exists then all package information + conflicts must be reported to the user. + +

      +

      + 140.0 Package Downloading
      + Users must be able to access packages once they are live on the + site. + +

      +

      + 140.1 + Users must be able to view the package meta-data without + downloading the package. + +

      + 140.2 + Users must be able to download the actual package data. + +

      +

      + + 150.0 User commenting
      +

      + A logged in user must be able to comment on vendors, packages, and versions. + + +

      VI.C Requirements: Administrator's Interface

      + + The requirement of the administrator's interface is to enable + administrators to approve or reject package versions as they are + uploaded by users. Naturally any site administrator would have + rights on all the packages in the repository + + 200.0 Approval Parameters + +
      +

      + 200.1 + Administrators must be able to set whether or not packages pending + approval are accessible to users. + +

      + 200.2 + Administrators must be able to set whether or not users are + notified when their uploaded packages are approved or rejected. +

      +

      + 210.0 Version Approval +

      + The administrator should be able to approve or reject any submitted + package version, and enter a comment as to why the version was + rejected or approved. + +

      VII. Revision History

      + + + + + + + + + + + + + + + + + + + + + + +
      Document Revision #Action Taken, NotesWhen?By Whom?
      0.2Edited to include original requirements from the ACS Repository12/10/2000Joseph Bank
      0.1Creation11/23/2000Joseph Bank
      + +
      +
      +Last modified: $Id: requirements.html,v 1.1 2001/04/20 20:51:10 donb Exp $ + + Index: openacs-4/packages/download/www/download/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/download/index.vuh,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/download/www/download/index.vuh 20 Apr 2001 20:51:10 -0000 1.1 @@ -0,0 +1 @@ +download_file_downloader \ No newline at end of file Index: openacs-4/packages/download/www/graphics/download.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/graphics/download.gif,v diff -u -N Binary files differ Index: openacs-4/packages/ecommerce/ecommerce.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/ecommerce.info,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/ecommerce.info 20 Apr 2001 20:51:12 -0000 1.1 @@ -0,0 +1,515 @@ + + + + + E-Commerce + E-Commerce-ii + f + + + + oracle + postgresql + + Janine Sisk + Jerry Asher + The goal of this release was to bring the ACS 3x ecommerce module's features to an ACS 4x package. + 2001-04-08 + furfly.net, LLC + This module implements all that IT needs for a standard business-to-consumer Web service. You can find a feature summary in the www/doc/ecommerce-features document. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +