@Test public void getFromServiceTest() { final List<VitamCode> codes = VitamCodeHelper.getFromService(ServiceName.VITAM); assertNotNull(codes); assertEquals(VitamCode.TEST, codes.get(0)); }
public static List<VitamCode> getFromService(ServiceName service) { ParametersChecker.checkParameter("Invalid argument to retrieve Vitam code", service); final List<VitamCode> codes = new ArrayList<>(); for (final VitamCode vitamCode : VitamCode.values()) { if (vitamCode.getService().equals(service)) { codes.add(vitamCode); } } return codes; }
VitamCodeHelper { public static List<VitamCode> getFromService(ServiceName service) { ParametersChecker.checkParameter("Invalid argument to retrieve Vitam code", service); final List<VitamCode> codes = new ArrayList<>(); for (final VitamCode vitamCode : VitamCode.values()) { if (vitamCode.getService().equals(service)) { codes.add(vitamCode); } } return codes; } }
VitamCodeHelper { public static List<VitamCode> getFromService(ServiceName service) { ParametersChecker.checkParameter("Invalid argument to retrieve Vitam code", service); final List<VitamCode> codes = new ArrayList<>(); for (final VitamCode vitamCode : VitamCode.values()) { if (vitamCode.getService().equals(service)) { codes.add(vitamCode); } } return codes; } private  VitamCodeHelper(); }
VitamCodeHelper { public static List<VitamCode> getFromService(ServiceName service) { ParametersChecker.checkParameter("Invalid argument to retrieve Vitam code", service); final List<VitamCode> codes = new ArrayList<>(); for (final VitamCode vitamCode : VitamCode.values()) { if (vitamCode.getService().equals(service)) { codes.add(vitamCode); } } return codes; } private  VitamCodeHelper(); static boolean isAlphanumericCode(String code); static VitamCode getFrom(String code); static VitamCode getFrom(ServiceName service, DomainName domain, String item); static String getMessage(ServiceName service, DomainName domain, String item); static String getMessageFromVitamCode(VitamCode vitamCode); static String getMessage(String vitamCode); static String getParametrizedMessageFromVitamCode(VitamCode vitamCode, Object... params); static String getParametrizedMessageFromCode(String vitamCode, Object... params); static String getParametrizedMessage(ServiceName service, DomainName domain, String item, Object... params); static List<VitamCode> getFromDomain(DomainName domain); static List<VitamCode> getFromService(ServiceName service); static String getCode(VitamCode vitamCode); static String getLogMessage(VitamCode vitamCode, Object... params); static VitamError toVitamError(VitamCode vitamCode, String description); }
VitamCodeHelper { public static List<VitamCode> getFromService(ServiceName service) { ParametersChecker.checkParameter("Invalid argument to retrieve Vitam code", service); final List<VitamCode> codes = new ArrayList<>(); for (final VitamCode vitamCode : VitamCode.values()) { if (vitamCode.getService().equals(service)) { codes.add(vitamCode); } } return codes; } private  VitamCodeHelper(); static boolean isAlphanumericCode(String code); static VitamCode getFrom(String code); static VitamCode getFrom(ServiceName service, DomainName domain, String item); static String getMessage(ServiceName service, DomainName domain, String item); static String getMessageFromVitamCode(VitamCode vitamCode); static String getMessage(String vitamCode); static String getParametrizedMessageFromVitamCode(VitamCode vitamCode, Object... params); static String getParametrizedMessageFromCode(String vitamCode, Object... params); static String getParametrizedMessage(ServiceName service, DomainName domain, String item, Object... params); static List<VitamCode> getFromDomain(DomainName domain); static List<VitamCode> getFromService(ServiceName service); static String getCode(VitamCode vitamCode); static String getLogMessage(VitamCode vitamCode, Object... params); static VitamError toVitamError(VitamCode vitamCode, String description);  }