2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.server.interceptors;
24 import javax.ws.rs.core.EntityTag;
25 import javax.ws.rs.core.GenericType;
26 import javax.ws.rs.core.Link;
27 import javax.ws.rs.core.MediaType;
28 import javax.ws.rs.core.MultivaluedMap;
29 import javax.ws.rs.core.NewCookie;
30 import javax.ws.rs.core.Response;
31 import java.io.Serializable;
32 import java.lang.annotation.Annotation;
34 import java.util.Date;
35 import java.util.Locale;
39 public class DefaultOutput extends Response implements Serializable {
41 private static final long serialVersionUID = 8061802931931401706L;
43 private final int status;
44 private final transient Object entity;
45 private MultivaluedMap<String, Object> metadata;
47 public DefaultOutput(int s0, Object e0) {
52 public Object getEntity() {
57 public <T> T readEntity(Class<T> asClass) {
62 public <T> T readEntity(GenericType<T> genericType) {
67 public <T> T readEntity(Class<T> asClass, Annotation[] annotations) {
72 public <T> T readEntity(GenericType<T> var1, Annotation[] var2) {
77 public boolean hasEntity() throws IllegalStateException {
82 public boolean bufferEntity() {
91 public MediaType getMediaType() {
96 public Locale getLanguage() {
101 public int getLength() {
106 public Set<String> getAllowedMethods() {
111 public Map<String, NewCookie> getCookies() {
116 public EntityTag getEntityTag() {
121 public Date getDate() {
126 public Date getLastModified() {
131 public URI getLocation() {
136 public Set<Link> getLinks() {
141 public boolean hasLink(String s0) {
147 public Link getLink(String s0) {
152 public Link.Builder getLinkBuilder(String s0) {
156 public int getStatus() {
161 public StatusType getStatusInfo() {
165 void addMetadata(MultivaluedMap<String, Object> meta) {
166 this.metadata = meta;
169 public MultivaluedMap<String, Object> getMetadata() {
170 // don't worry about cloning for now
175 public MultivaluedMap<String, String> getStringHeaders() {
180 public String getHeaderString(String s0) {