SAP ABAP Class CL_REST_ROUTER (REST Router)
Hierarchy
SAP_BASIS (Software Component) SAP Basis Component
   BC-MID-RST (Application Component) REST-based Protocols
     SREST_CORE (Package) REST Core
Meta Relationship - Using
# Relationship type Using Short Description Created on
1 Interface implementation (CLASS c. INTERFACES i_ref)  IF_REST_HANDLER REST Request Handler 20100208
Properties
Class CL_REST_ROUTER  
Short Description REST Router    
Super Class    
Instantiability of a Class 2  Public 
Final    
General Data
Message Class    
Program status     
Category 0   
Package SREST_CORE   REST Core 
Created 20100205   SAP 
Last change 20130531   SAP 
Shared Memory-enabled    
Fixed point arithmetic    
Unicode checks active    
Forward declarations
# Type group / Object type Type Type Description
1 ABAP Type group use (TYPE-POOLS tp)  Type group use (TYPE-POOLS tp)
Interfaces
# Interface Abstract Final Description Created on
1 IF_REST_HANDLER REST Request Handler 20100208
Friends
Class CL_REST_ROUTER has no friend class.
Attributes
# Attribute Level Visibility Read only Typing Associated Type Initial Value Description Created on
1 GC_MAP_EMPTY Constant Private Type reference (TYPE) I 0 Mapping empty 20100916
2 GC_MAP_HANDLER Constant Private Type reference (TYPE) I 1 Mapping to a Resource Handler 20100510
3 GC_MAP_REDIRECT Constant Private Type reference (TYPE) I 2 Mapping to a Redirect Handler 20100510
4 GC_READING_REGEX Constant Private Type reference (TYPE) I 2 Status constant for URI Template Parser 20100212
5 GC_READING_VARIABLE Constant Private Type reference (TYPE) I 1 Status constant for URI Template Parser 20100212
6 MT_TEMPLATE_HANDLER Instance attribute Private Type reference (TYPE) TT_TEMPLATE_HANDLER_MAP List of assignments of Template to Handler 20100215
Methods
# Method Level Visibility Method type Description Created on
1 ATTACH Instance method Public Method Attaches a Handler 20100205
2 ATTACH_REDIRECT Instance method Public Method Forward Path to a different Path 20100510
3 FIND_MATCH Instance method Public Method Find matching Handler for a Path 20100210
4 GET_FIRST_MATCH Static method Private Method Get Occurrence with Highest Priority 20100210
5 PARSE_URI_TEMPLATE Static method Private Method Get Regular Expression for URI Template 20100209
6 PARSE_URI_TEMPLATE_ABAP Static method Private Method Regulären Ausdruck für URI Template bestimmen 20120601
7 PROCESS_TEMPLATE_VAR Static method Private Method Extract Template Variables from URI Template 20100210
8 _PARSE_URI_TEMPLATE Static method Private Method Get Regular Expression for URI Template 20120601
Events
Class CL_REST_ROUTER has no event.
Types
# Type Visibility Typing Associated Type Description Created on Type Source
1 TT_TEMPLATE_HANDLER_MAP Private See coding Mapping Table 20100215 tt_template_handler_map TYPE STANDARD TABLE OF ty_template_handler_map
2 TY_MATCH_INFO Public See coding Match Information 20100510 BEGIN OF ty_match_info, type TYPE i, handler_class TYPE seoclsname, handler_class_parameter type abap_parmbind_tab, attributes TYPE tihttpnvp, handler_path TYPE string, location TYPE string, status_code TYPE i, END OF ty_match_info
3 TY_TEMPLATE_HANDLER_MAP Private See coding Mapping Table Entry 20100215 BEGIN OF ty_template_handler_map, "used for <|> set by type TYPE i, "always used, set internally uri_template TYPE string, "always used, set by user uri_pattern TYPE string, "always used, set internally location TYPE string, "-C_redirect, set by user handler_class TYPE seoclsname,"always used, set by user handler_class_parameter type abap_parmbind_tab, variables TYPE string_table, "always used, set internally literals TYPE i, "always used, set internally status_code TYPE i, "used for GC_redirect END OF ty_template_handler_map
Method Signatures

Method ATTACH Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IT_PARAMETER Call by reference Type reference (TYPE) ABAP_PARMBIND_TAB Resource contructor parameters 20120523
2 Importing IV_HANDLER_CLASS Call by reference Type reference (TYPE) SEOCLSNAME Object Type Name 20100210
3 Importing IV_TEMPLATE Call by reference Type reference (TYPE) STRING Unified Name for Resources 20100210

Method ATTACH on class CL_REST_ROUTER has no exception.

Method ATTACH_REDIRECT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_LOCATION Call by reference Type reference (TYPE) STRING Redirect Location 20100510
2 Importing IV_STATUS_CODE Call by reference Type reference (TYPE) I HTTP Status Code for Redirect 20100510
3 Importing IV_TEMPLATE Call by reference Type reference (TYPE) STRING Unified Name for Resources 20100510

Method ATTACH_REDIRECT on class CL_REST_ROUTER has no exception.

Method FIND_MATCH Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ES_MATCH_INFO Call by reference Type reference (TYPE) TY_MATCH_INFO Information about found Handlers 20100510
2 Exporting EV_MATCH_TYPE Call by reference Type reference (TYPE) I 20100707
3 Importing IV_PATH Call by reference Type reference (TYPE) STRING Pfad for Routing 20100210

Method FIND_MATCH on class CL_REST_ROUTER has no exception.

Method GET_FIRST_MATCH Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IT_ROUTES Call by reference Type reference (TYPE) TT_TEMPLATE_HANDLER_MAP URI Resource Mapping Table 20100210
2 Returning RV_INDEX Value transfer Type reference (TYPE) I Table Index of Entry with the Highest Priority 20100210

Method GET_FIRST_MATCH on class CL_REST_ROUTER has no exception.

Method PARSE_URI_TEMPLATE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_VARS Call by reference Type reference (TYPE) STRING_TABLE List of Strings 20100209
2 Exporting EV_GROUPS Call by reference Type reference (TYPE) I Count of found Groups 20100210
3 Exporting EV_LITERALS Call by reference Type reference (TYPE) I Count of found Literals 20100210
4 Exporting EV_REGEX Call by reference Type reference (TYPE) STRING Regular Expression 20100209
5 Importing IV_TEMPLATE Call by reference Type reference (TYPE) STRING Template 20100210

Method PARSE_URI_TEMPLATE on class CL_REST_ROUTER has no exception.

Method PARSE_URI_TEMPLATE_ABAP Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_VARS Call by reference Type reference (TYPE) STRING_TABLE 20120601
2 Exporting EV_GROUPS Call by reference Type reference (TYPE) I 20120601
3 Exporting EV_LITERALS Call by reference Type reference (TYPE) I 20120601
4 Exporting EV_REGEX Call by reference Type reference (TYPE) STRING 20120601
5 Importing IV_TEMPLATE Call by reference Type reference (TYPE) STRING 20120601

Method PARSE_URI_TEMPLATE_ABAP on class CL_REST_ROUTER has no exception.

Method PROCESS_TEMPLATE_VAR Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing CV_OFFSET Call by reference Type reference (TYPE) I Offset in Text 20100210
2 Changing CV_REGEX Call by reference Type reference (TYPE) STRING Regular Expression 20100210
3 Exporting EV_VARNAME Call by reference Type reference (TYPE) STRING Variable Name 20100210
4 Importing IV_TEMPLATE Call by reference Type reference (TYPE) STRING Template 20100210

Method PROCESS_TEMPLATE_VAR on class CL_REST_ROUTER has no exception.

Method _PARSE_URI_TEMPLATE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_VARS Call by reference Type reference (TYPE) STRING_TABLE 20120601
2 Exporting EV_GROUPS Call by reference Type reference (TYPE) I 20120601
3 Exporting EV_LITERALS Call by reference Type reference (TYPE) I 20120601
4 Exporting EV_PARSE_OK Call by reference Type reference (TYPE) I 20120601
5 Exporting EV_REGEX Call by reference Type reference (TYPE) STRING 20120601
6 Importing IV_TEMPLATE Call by reference Type reference (TYPE) STRING 20120601

Method _PARSE_URI_TEMPLATE on class CL_REST_ROUTER has no exception.
History
Last changed by/on SAP  20130531 
SAP Release Created in 72L