GLS ShipIT  2.8.11
GLS ShipIT - REST services
ConverterUtils.java
Go to the documentation of this file.
1 package eu.glsgroup.fpcs.soap.util;
2 
4 import eu.glsgroup.fpcs.dto.ConsigneeCategory;
5 
6 public final class ConverterUtils {
7 
8  //Suppress default constructor for non-instantiability
9  private ConverterUtils() {
10 
11  throw new AssertionError("ConverterUtils cannot be instantiated.");
12  }
13 
14  public static ConsigneeCategory convertCategoryType(CategoryType categoryType) {
15 
16  if (categoryType == null) {
17  return null;
18  }
19  switch (categoryType) {
20  case PRIVATE:
21  return ConsigneeCategory.PRIVATE;
22  case BUSINESS:
23  return ConsigneeCategory.BUSINESS;
24  default:
25  throw new IllegalArgumentException("Unexpected categoryType '" + categoryType + "'");
26  }
27  }
28 }
static ConsigneeCategory convertCategoryType(CategoryType categoryType)