Advertisement
Guest User

Untitled

a guest
Mar 12th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.28 KB | None | 0 0
  1.     public String retreiveEndpoint(String fullExternalDatapoint) {
  2.         if (fullExternalDatapoint == null) return null;
  3.  
  4.         String externalDatapoint = fullExternalDatapoint;
  5.  
  6.         switch(fullExternalDatapoint) {
  7.             case 'P006-40170891-O-41':
  8.                 return "+AAR+LWA+CVY_SEND";
  9.         }
  10.  
  11.         if (externalDatapoint.length() > 13) {
  12.             externalDatapoint = fullExternalDatapoint.substring(0,13);
  13.         }
  14.  
  15.         switch(externalDatapoint) {
  16.             case 'P006-35170342':
  17.                 return "+AAR+FLS+M442=FLA_SEND";
  18.             case 'P006-35170443':
  19.                 return "+AAR+FLS+M443=FLA_SEND";
  20.             case 'P006-35170545':
  21.                 return "+AAR+FLS+M445=FLA_SEND";
  22.             case 'P006-35170646':
  23.                 return "+AAR+FLS+M446=FLA_SEND";
  24.             case 'P006-35170749':
  25.                 return "+AAR+FLS+M449=FLA_SEND";
  26.             case 'P006-11150101':
  27.                 return "+AAR+COAT+M490_SEND";
  28.             case 'P006-12180661':
  29.                 return "+AAR+EXT+M461_SEND";
  30.             case 'P006-12180762':
  31.                 return "+AAR+EXT+M462_SEND";
  32.             case 'P006-40180690':
  33.                 return "+AAR+EXT=DOWN=LIN_SEND";
  34.             case 'P006-30180115':
  35.                 return "+AAR+ERF+M415=PRI_SEND";
  36.             case 'P006-30170109':
  37.                 return "+AAR+CONV+M009=PRI_SEND";
  38.             case 'P006-30170211':
  39.                 return "+AAR+CONV+M411=PRI_SEND";
  40.             case 'P006-40170891':
  41.                 return "+AAR+FLS=DOWN=LIN_SEND";
  42.             default:
  43.                 return externalDatapoint;
  44.         }
  45.         return null;
  46.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement