XOBWUS ;ALB/MJK - HWSC :: Web Service Manager ; 09/13/10 4:00pm
;;1.0;HwscWebServiceClient;;September 13, 2010;Build 31
;
QUIT
;
EN ; -- main entry point for XOBW WEB SERVICE
KILL ^TMP("XOB WEBSERVICES",$JOB)
SET VALMBCK=""
DO EN^VALM("XOBW WEB SERVICE")
QUIT
;
HDR ; -- header code
NEW Y
SET X=" HWSC Web Service Manager"
SET VALMHDR(1)=X
SET X=" Version: "_$PIECE($TEXT(XOBWUS+1),";",3)_" Build: "_$$VERSION^XOBWENV()
SET VALMHDR(2)=X
QUIT
;
INIT ; -- init variables and list array
DO CLEAR
DO MSG
QUIT
;
MSG ; -- set default message
SET VALMSG=""
QUIT
;
BUILD ; -- build list
NEW XOBI,X,XOBDATA,XOBROOT,Y
DO KILL
;
SET VALMCNT=0
SET XOBROOT=$NAME(XOBDATA("DILIST","ID"))
DO LIST^DIC(18.02,"",".01;.02;200","","","","","","","",$NAME(XOBDATA))
SET XOBI=0
FOR SET XOBI=$ORDER(@XOBROOT@(XOBI)) QUIT:'XOBI DO
. SET VALMCNT=VALMCNT+1
. SET X=""
. SET X=$$SETFLD^VALM1(VALMCNT,X,"ID")
. SET X=$$SETFLD^VALM1($GET(@XOBROOT@(XOBI,.01)),X,"NAME")
. SET X=$$SETFLD^VALM1($GET(@XOBROOT@(XOBI,.02)),X,"TYPE")
. SET Y=$GET(@XOBROOT@(XOBI,200))
. IF $LENGTH(Y)>35 SET Y=$EXTRACT(Y,1,35)_"..."
. SET X=$$SETFLD^VALM1(Y,X,"CONTEXT")
. DO SET^VALM10(VALMCNT,X,VALMCNT)
. SET ^TMP("XOB WEBSERVICES","IDX",$JOB,VALMCNT,VALMCNT)=+$GET(XOBDATA("DILIST",2,XOBI))
;
QUIT
;
CLEAR ; -- clean up entries
DO REFRESH
QUIT
;
REFRESH ; -- refresh display
DO BUILD
SET VALMBCK="R"
QUIT
;
KILL ; -- kill off list location
KILL ^TMP("XOB WEBSERVICES",$JOB)
KILL ^TMP("XOB WEBSERVICES","IDX",$JOB)
QUIT
;
HELP ; -- help code
SET X="?" DO DISP^XQORM1 WRITE !!
QUIT
;
EXIT ; -- exit code
QUIT
;
ADD ; -- add an web service entry
; -- Protocol: XOBW WEB SERVICE ADD
DO ACTION("ADD",0)
QUIT
;
EDIT ; -- edit web service entry
; -- Protocol: XOBW WEB SERVICE EDIT
DO ACTION("EDIT",0)
QUIT
;
DEL ; -- delete web service entry
; -- Protocol: XOBW WEB SERVICE DELETE
DO ACTION("DEL",0)
QUIT
;
EXPAND ; -- expand web service entry
DO ACTION("EXPAND",0)
QUIT
;
ACTION(TYPE,XOBPAUSE) ; -- execute action
DO FULL^VALM1
NEW X,Y
SET X="DO "_TYPE_"^XOBWUS1"
XECUTE X
IF XOBPAUSE DO PAUSE^VALM1
DO REFRESH
DO MSG
QUIT
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXOBWUS 2306 printed Dec 13, 2024@02:46:21 Page 2
XOBWUS ;ALB/MJK - HWSC :: Web Service Manager ; 09/13/10 4:00pm
+1 ;;1.0;HwscWebServiceClient;;September 13, 2010;Build 31
+2 ;
+3 QUIT
+4 ;
EN ; -- main entry point for XOBW WEB SERVICE
+1 KILL ^TMP("XOB WEBSERVICES",$JOB)
+2 SET VALMBCK=""
+3 DO EN^VALM("XOBW WEB SERVICE")
+4 QUIT
+5 ;
HDR ; -- header code
+1 NEW Y
+2 SET X=" HWSC Web Service Manager"
+3 SET VALMHDR(1)=X
+4 SET X=" Version: "_$PIECE($TEXT(XOBWUS+1),";",3)_" Build: "_$$VERSION^XOBWENV()
+5 SET VALMHDR(2)=X
+6 QUIT
+7 ;
INIT ; -- init variables and list array
+1 DO CLEAR
+2 DO MSG
+3 QUIT
+4 ;
MSG ; -- set default message
+1 SET VALMSG=""
+2 QUIT
+3 ;
BUILD ; -- build list
+1 NEW XOBI,X,XOBDATA,XOBROOT,Y
+2 DO KILL
+3 ;
+4 SET VALMCNT=0
+5 SET XOBROOT=$NAME(XOBDATA("DILIST","ID"))
+6 DO LIST^DIC(18.02,"",".01;.02;200","","","","","","","",$NAME(XOBDATA))
+7 SET XOBI=0
+8 FOR
SET XOBI=$ORDER(@XOBROOT@(XOBI))
if 'XOBI
QUIT
Begin DoDot:1
+9 SET VALMCNT=VALMCNT+1
+10 SET X=""
+11 SET X=$$SETFLD^VALM1(VALMCNT,X,"ID")
+12 SET X=$$SETFLD^VALM1($GET(@XOBROOT@(XOBI,.01)),X,"NAME")
+13 SET X=$$SETFLD^VALM1($GET(@XOBROOT@(XOBI,.02)),X,"TYPE")
+14 SET Y=$GET(@XOBROOT@(XOBI,200))
+15 IF $LENGTH(Y)>35
SET Y=$EXTRACT(Y,1,35)_"..."
+16 SET X=$$SETFLD^VALM1(Y,X,"CONTEXT")
+17 DO SET^VALM10(VALMCNT,X,VALMCNT)
+18 SET ^TMP("XOB WEBSERVICES","IDX",$JOB,VALMCNT,VALMCNT)=+$GET(XOBDATA("DILIST",2,XOBI))
End DoDot:1
+19 ;
+20 QUIT
+21 ;
CLEAR ; -- clean up entries
+1 DO REFRESH
+2 QUIT
+3 ;
REFRESH ; -- refresh display
+1 DO BUILD
+2 SET VALMBCK="R"
+3 QUIT
+4 ;
KILL ; -- kill off list location
+1 KILL ^TMP("XOB WEBSERVICES",$JOB)
+2 KILL ^TMP("XOB WEBSERVICES","IDX",$JOB)
+3 QUIT
+4 ;
HELP ; -- help code
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
+3 ;
EXIT ; -- exit code
+1 QUIT
+2 ;
ADD ; -- add an web service entry
+1 ; -- Protocol: XOBW WEB SERVICE ADD
+2 DO ACTION("ADD",0)
+3 QUIT
+4 ;
EDIT ; -- edit web service entry
+1 ; -- Protocol: XOBW WEB SERVICE EDIT
+2 DO ACTION("EDIT",0)
+3 QUIT
+4 ;
DEL ; -- delete web service entry
+1 ; -- Protocol: XOBW WEB SERVICE DELETE
+2 DO ACTION("DEL",0)
+3 QUIT
+4 ;
EXPAND ; -- expand web service entry
+1 DO ACTION("EXPAND",0)
+2 QUIT
+3 ;
ACTION(TYPE,XOBPAUSE) ; -- execute action
+1 DO FULL^VALM1
+2 NEW X,Y
+3 SET X="DO "_TYPE_"^XOBWUS1"
+4 XECUTE X
+5 IF XOBPAUSE
DO PAUSE^VALM1
+6 DO REFRESH
+7 DO MSG
+8 QUIT
+9 ;