Beispiel #1
0
  /* return icon name */
  public static String getIconName(Device device, int statusCode, BasicPrivateLabel pl) {

    /* device code */
    if (device != null) {
      StatusCode code = device.getStatusCode(statusCode);
      if (code != null) {
        return code.getIconName();
      }
    }

    /* default */
    return StatusCodes.GetIconName(statusCode, pl);
  }
Beispiel #2
0
  /* Return status code description */
  public static String getDescription(
      Device device, int statusCode, BasicPrivateLabel bpl, String dftDesc) {

    /* device code */
    if (device != null) {
      StatusCode code = device.getStatusCode(statusCode);
      if (code != null) {
        return code.getDescription();
      }
    }

    /* default */
    if (!StringTools.isBlank(dftDesc)) {
      return dftDesc;
    } else {
      return StatusCodes.GetDescription(statusCode, bpl);
    }
  }