T4S4  18.2 C7549 A21431
Teamcenter Gateway for SAP S/4HANA API Reference
SYSTEM utility functions

Functions

 bindProcToUser procname user
 This function binds a user to a Tcl function. If the rights system is active (e.g. Worker context), then only this user can call the Tcl function. More...
 
 getCallerMethode args
 This function returns the current http method. More...
 
 getClient args
 This function returns the current client ip. More...
 
 getHttpHeader args
 This function returns the current http header. More...
 
 getPasswd args
 This function returns the current user password. More...
 
 getServerId args
 This function returns the current server ID (see CONFIG.APPSRV.SRVCONF). More...
 
 getServerInstInfo srvid key
 This function returns a key from the server instance configuration. More...
 
 getSessionId args
 This function returns the current sessionid ID . More...
 
 getTOTicks args
 This function calculates the time until the timeout. More...
 
 getUser args
 This function returns the current user ID. More...
 
 getWTHID args
 This function returns the current worker ID. More...
 

Detailed Description

Function Documentation

◆ bindProcToUser()

SYSUtils::bindProcToUser   procname user  

This function binds a user to a Tcl function. If the rights system is active (e.g. Worker context), then only this user can call the Tcl function.

.

Parameters
procname: the Tcl function with full namespace definition.
user: the name of the user
Returns
SUCCESS or Exeption
1 ::SYSUtils::bindProcToUser ::Test::MyTestService otto

References tpco_scanHEX16(), tpco_shmget(), and tpco_shmset().

◆ getCallerMethode()

SYSUtils::getCallerMethode   args  

This function returns the current http method.

getCallerMethode only works in the context of a T4x server call.

T4x support follow http methods: GET POST HEAD OPTION PUT DELETE.

Returns
the http caller method
2 
3 output:
4 get

◆ getClient()

SYSUtils::getClient   args  

This function returns the current client ip.

getClient only works in the context of a T4x server call.

Returns
the client host or ip
2 
3 output:
4 ::1

◆ getHttpHeader()

SYSUtils::getHttpHeader   args  

This function returns the current http header.

getHttpHeader only works in the context of a http server call.

Returns
the HTTP haeder dict
2 foreach key [dict keys $hd *] {
3  puts "$key -- [dict get $hd $key]"
4  }
5 
6 output:
7 URL -- GET /pxml/testenviro HTTP/1.1
8 Host -- [::1]:11300
9 User-Agent -- Mozilla/5.0 (X11; Debian; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0
10 Accept -- text/html,application/xhtml+xml,application/xml;q=0.9
11 Accept-Language -- en-US,en;q=0.5
12 Accept-Encoding -- gzip, deflate
13 Cookie -- doxygen_width=300
14 Authorization -- Basic dDRhZG06Z2VoZWlt
15 Connection -- keep-alive

References tpco_formatHEX16().

◆ getPasswd()

SYSUtils::getPasswd   args  

This function returns the current user password.

getPasswd only works in the context of a T4x server call.

Returns
the user password
2 
3 output:
4 geheim

◆ getServerId()

SYSUtils::getServerId   args  

This function returns the current server ID (see CONFIG.APPSRV.SRVCONF).

getServerId only works in the context of a T4x server call.

Returns
the server id
2 
3 output:
4 2

Referenced by T4X::SOAP::CLIENT::callSoapOperation().

◆ getServerInstInfo()

SYSUtils::getServerInstInfo   srvid key  

This function returns a key from the server instance configuration.

Returns
the key value
1 puts [::SYSUtils::getServerInstInfo 0 HTTPROOT]
2 
3 output:
4 /home/joerg/work/CR2886/tp_core_Linux_x86_64_debug/var/httpd/apps

References tpco_shmget().

◆ getSessionId()

SYSUtils::getSessionId   args  

This function returns the current sessionid ID .

getSessionId only works in the context of a T4x server call.

Returns
the sessionid
2 
3 output:
4 7zw6f0W7kRZsUaO0-r5onDyEe3Nfuiay

◆ getTOTicks()

SYSUtils::getTOTicks   args  

This function calculates the time until the timeout.

getTOTicks only works in the context of a T4x server call.

Returns
the number of seconds before timing out
2 
3 output:
4 18

◆ getUser()

SYSUtils::getUser   args  

This function returns the current user ID.

getUser only works in the context of a T4x server call.

Returns
the user ID
2 
3 output:
4 t4adm

◆ getWTHID()

SYSUtils::getWTHID   args  

This function returns the current worker ID.

getWTHID only works in the context of a T4x server call.

Returns
the worker ID
2 
3 output:
4 2