Index: openacs-4/packages/acs-service-contract/acs-service-contract.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/acs-service-contract.info,v
diff -u -r1.8.2.2 -r1.8.2.3
--- openacs-4/packages/acs-service-contract/acs-service-contract.info 8 Jan 2003 23:26:24 -0000 1.8.2.2
+++ openacs-4/packages/acs-service-contract/acs-service-contract.info 5 Mar 2003 14:52:26 -0000 1.8.2.3
@@ -7,7 +7,7 @@
t
t
-
+
oracle
postgresql
@@ -18,7 +18,7 @@
2002-10-27
OpenACS
-
+
Index: openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl,v
diff -u -r1.7.2.1 -r1.7.2.2
--- openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl 16 Oct 2002 15:01:00 -0000 1.7.2.1
+++ openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl 5 Mar 2003 14:52:43 -0000 1.7.2.2
@@ -6,6 +6,41 @@
@cvs-id $Id$
}
+namespace eval acs_sc {}
+
+#####
+#
+# Invoke
+#
+#####
+
+ad_proc -public acs_sc::invoke {
+ {-contract:required}
+ {-operation:required}
+ {-impl:required}
+ {-call_args {}}
+} {
+ A wrapper for the acs_sc_call procedure, with explicitly named
+ parameters so it's easier to figure out how to use it.
+
+ @param contract_name The name of the contract you wish to use.
+ @param operation_name The name of the operation in the contract you wish to call.
+ @param impl_name The name of the implementation you wish to use.
+ @param args The arguments you want to pass to the proc.
+
+ @author Lars Pind (lars@collaboraid.biz)
+ @see acs_sc_call
+} {
+ return [acs_sc_call $contract $operation $call_args $impl]
+}
+
+
+#####
+#
+# All the rest that used to be there
+#
+#####
+
ad_proc -public acs_sc_binding_exists_p {
contract
impl
@@ -29,7 +64,6 @@
contract
impl
operation
-
} {
generate the internal proc name.
@@ -50,9 +84,11 @@
@author Neophytos Demetriou
} {
+ # LARS
+ set exists_p [acs_sc_binding_exists_p $contract $impl]
+
+ #set exists_p [util_memoize "acs_sc_binding_exists_p $contract $impl"]
- set exists_p [util_memoize "acs_sc_binding_exists_p $contract $impl"]
-
if ![set exists_p] {return ""}
db_0or1row get_alias {
@@ -219,7 +255,6 @@
@author Neophytos Demetriou
} {
-
set proc_name [acs_sc_generate_name $contract $impl $operation]
if { [llength [info procs $proc_name]] == 1 } {
@@ -239,24 +274,12 @@
## Logging
##
+# Private logging proc
proc acs_sc_log {level msg} {
# If you want to debug the SC, uncomment the Debug log below
if {![string equal "SCDebug" $level]} {
ns_log $level "$msg"
} else {
# ns_log Debug "$msg"
}
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
+}
\ No newline at end of file
Index: openacs-4/packages/acs-service-contract/tcl/msg-type-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/tcl/msg-type-procs-postgresql.xql,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/acs-service-contract/tcl/msg-type-procs-postgresql.xql 25 Feb 2003 15:15:33 -0000 1.2
+++ openacs-4/packages/acs-service-contract/tcl/msg-type-procs-postgresql.xql 5 Mar 2003 14:52:43 -0000 1.2.2.1
@@ -11,6 +11,14 @@
+
+
+ select msg_type_name as name
+ from acs_sc_msg_types
+ where msg_type_id = :msg_type_id
+
+
+
select acs_sc_msg_type__delete(:name);
@@ -31,3 +39,6 @@
+
+
+
Index: openacs-4/packages/acs-service-contract/tcl/msg-type-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/tcl/msg-type-procs.tcl,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/acs-service-contract/tcl/msg-type-procs.tcl 25 Feb 2003 15:15:33 -0000 1.2
+++ openacs-4/packages/acs-service-contract/tcl/msg-type-procs.tcl 5 Mar 2003 14:52:43 -0000 1.2.2.1
@@ -86,10 +86,10 @@
# Remove the 'multiple' flag
set flagsv [lreplace $flagsv $idx $idx]
set element_type "[lindex $flagsv 0]"
- set isset_p "t"
+ set isset_p t
} else {
set element_type [lindex $flagsv 0]
- set isset_p "f"
+ set isset_p f
}
acs_sc::msg_type::element::new \