ServiceErrorStatusType.java [src/csip] Revision:   Date:
/*
 * $Id: $
 *
 * This file is part of the Cloud Services Integration Platform (CSIP),
 * a Model-as-a-Service framework, API and application suite.
 *
 * 2012-2022, Olaf David and others, OMSLab, Colorado State University.
 *
 * OMSLab licenses this file to you under the MIT license.
 * See the LICENSE file in the project root for more information.
 */

package csip;

import javax.ws.rs.core.Response;

/**
 *
 * @author od
 */
class ServiceErrorStatusType implements Response.StatusType {

  private final int statusCode;


  ServiceErrorStatusType(int statusCode) {
    this.statusCode = statusCode;
  }


  @Override
  public Response.Status.Family getFamily() {
    return Response.Status.Family.SERVER_ERROR;
  }


  @Override
  public String getReasonPhrase() {
    return "Service Error";
  }


  @Override
  public int getStatusCode() {
    return statusCode;
  }

}