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;
23 import java.io.Serializable;
24 import java.lang.annotation.Annotation;
26 import java.util.Date;
27 import java.util.Locale;
31 import javax.ws.rs.core.EntityTag;
32 import javax.ws.rs.core.GenericType;
33 import javax.ws.rs.core.Link;
34 import javax.ws.rs.core.MediaType;
35 import javax.ws.rs.core.MultivaluedMap;
36 import javax.ws.rs.core.NewCookie;
37 import javax.ws.rs.core.Response;
39 public class DefaultOutput extends Response implements Serializable {
41 private static final long serialVersionUID = 8061802931931401706L;
43 private final int status;
44 private final Object entity;
45 private MultivaluedMap<String, Object> metadata;
47 public DefaultOutput(int s0, Object e0) {
51 public Object getEntity() {
56 public <T> T readEntity(Class<T> asClass) {
61 public <T> T readEntity(GenericType<T> genericType) {
66 public <T> T readEntity(Class<T> asClass, Annotation[] annotations) {
71 public <T> T readEntity(GenericType<T> var1, Annotation[] var2) {
76 public boolean hasEntity() throws IllegalStateException {
81 public boolean bufferEntity() {
90 public MediaType getMediaType() {
95 public Locale getLanguage() {
100 public int getLength() {
105 public Set<String> getAllowedMethods() {
110 public Map<String, NewCookie> getCookies() {
115 public EntityTag getEntityTag() {
120 public Date getDate() {
125 public Date getLastModified() {
130 public URI getLocation() {
135 public Set<Link> getLinks() {
140 public boolean hasLink(String s0) {
145 public Link getLink(String s0) {
150 public Link.Builder getLinkBuilder(String s0) {
154 public int getStatus() {
159 public StatusType getStatusInfo() {
163 void addMetadata(MultivaluedMap<String, Object> meta) {
164 this.metadata = meta;
167 public MultivaluedMap<String, Object> getMetadata() {
168 // don't worry about cloning for now
173 public MultivaluedMap<String, String> getStringHeaders() {
178 public String getHeaderString(String s0) {