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 java.io.Serializable;
25 import java.lang.annotation.Annotation;
27 import java.util.Date;
28 import java.util.Locale;
32 import javax.ws.rs.core.EntityTag;
33 import javax.ws.rs.core.GenericType;
34 import javax.ws.rs.core.Link;
35 import javax.ws.rs.core.MediaType;
36 import javax.ws.rs.core.MultivaluedMap;
37 import javax.ws.rs.core.NewCookie;
38 import javax.ws.rs.core.Response;
40 public class DefaultOutput extends Response implements Serializable {
42 private static final long serialVersionUID = 8061802931931401706L;
44 private final int status;
45 private final Object entity;
46 private MultivaluedMap<String, Object> metadata;
48 public DefaultOutput(int s0, Object e0) {
53 public Object getEntity() {
58 public <T> T readEntity(Class<T> asClass) {
63 public <T> T readEntity(GenericType<T> genericType) {
68 public <T> T readEntity(Class<T> asClass, Annotation[] annotations) {
73 public <T> T readEntity(GenericType<T> var1, Annotation[] var2) {
78 public boolean hasEntity() throws IllegalStateException {
83 public boolean bufferEntity() {
92 public MediaType getMediaType() {
97 public Locale getLanguage() {
102 public int getLength() {
107 public Set<String> getAllowedMethods() {
112 public Map<String, NewCookie> getCookies() {
117 public EntityTag getEntityTag() {
122 public Date getDate() {
127 public Date getLastModified() {
132 public URI getLocation() {
137 public Set<Link> getLinks() {
142 public boolean hasLink(String s0) {
148 public Link getLink(String s0) {
153 public Link.Builder getLinkBuilder(String s0) {
157 public int getStatus() {
162 public StatusType getStatusInfo() {
166 void addMetadata(MultivaluedMap<String, Object> meta) {
167 this.metadata = meta;
170 public MultivaluedMap<String, Object> getMetadata() {
171 // don't worry about cloning for now
176 public MultivaluedMap<String, String> getStringHeaders() {
181 public String getHeaderString(String s0) {