UNICOM® Digital Transformation Toolkit (UDTT™) extension developers also can extend their own naming convention variable “GBP_SEI”. Refer to the sample code BTTExtensionSample.zip.
1 Create a new variable generator class “com.ibm.btt.extension.naming. WsOperationGBP_SEIGenerator”, this class is extended from “AbstractVariableGenerator”. It will get the substring of UDTT default variable “SEI”. Developer need to override method “getValue(INamingContext context)”:
@Override public String getValue(INamingContext context) throws ExpectedInfoNotFoundException { if(context instanceof WsWizardNamingContext) { String SEI_string=Utils.getSimpleTypeName(((WsWizardNamingContext)context).getSEIName()); int start=3; int end=10; if (SEI_string.length(){ end=SEI_string.length(); if(SEI_string.length()<=start){ start=0; } } return SEI_string.substring(start, end); } return null; }
2 Create a new variable_generator “GBP_SEI” and set the generator as “com.ibm.btt.extension.naming.WsOperationGBP_SEIGenerator”.
3 Add the naming variable in naming convention properties file ” namingextension.properties”: