2 * Copyright © 2016-2017 European Support Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.openecomp.server.interceptors;
19 import javax.ws.rs.core.*;
20 import java.lang.annotation.Annotation;
24 public class DefaultOutput extends Response {
26 private static final long serialVersionUID = 8061802931931401706L;
28 private final int status;
29 private final Object entity;
30 private MultivaluedMap<String, Object> metadata;
32 public DefaultOutput(int s0, Object e0) {
38 public Object getEntity() {
43 public <T> T readEntity(Class<T> asClass) {
48 public <T> T readEntity(GenericType<T> genericType) {
53 public <T> T readEntity(Class<T> asClass, Annotation[] annotations) {
58 public <T> T readEntity(GenericType<T> var1, Annotation[] var2) {
63 public boolean hasEntity() {
68 public boolean bufferEntity() {
74 //close() is not implemented for DefaultOutput
78 public MediaType getMediaType() {
83 public Locale getLanguage() {
88 public int getLength() {
93 public Set<String> getAllowedMethods() {
94 return Collections.emptySet();
98 public Map<String, NewCookie> getCookies() {
103 public EntityTag getEntityTag() {
108 public Date getDate() {
113 public Date getLastModified() {
118 public URI getLocation() {
123 public Set<Link> getLinks() {
124 return Collections.emptySet();
128 public boolean hasLink(String s0) {
134 public Link getLink(String s0) {
139 public Link.Builder getLinkBuilder(String s0) {
144 public int getStatus() {
149 public StatusType getStatusInfo() {
153 void addMetadata(MultivaluedMap<String, Object> meta) {
154 this.metadata = meta;
158 public MultivaluedMap<String, Object> getMetadata() {
159 // don't worry about cloning for now
164 public MultivaluedMap<String, String> getStringHeaders() {
169 public String getHeaderString(String s0) {