271ff45097e271a2ed072a175c27c2fc4829ef67
[sdc.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.openecomp.server.interceptors;
22
23
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;
33 import java.net.URI;
34 import java.util.Date;
35 import java.util.Locale;
36 import java.util.Map;
37 import java.util.Set;
38
39 public class DefaultOutput extends Response implements Serializable {
40
41   private static final long serialVersionUID = 8061802931931401706L;
42
43   private final int status;
44   private final transient Object entity;
45   private MultivaluedMap<String, Object> metadata;
46
47   public DefaultOutput(int s0, Object e0) {
48     this.status = s0;
49     this.entity = e0;
50   }
51
52   public Object getEntity() {
53     return entity;
54   }
55
56   @Override
57   public <T> T readEntity(Class<T> asClass) {
58     return null;
59   }
60
61   @Override
62   public <T> T readEntity(GenericType<T> genericType) {
63     return null;
64   }
65
66   @Override
67   public <T> T readEntity(Class<T> asClass, Annotation[] annotations) {
68     return null;
69   }
70
71   @Override
72   public <T> T readEntity(GenericType<T> var1, Annotation[] var2) {
73     return null;
74   }
75
76   @Override
77   public boolean hasEntity() throws IllegalStateException {
78     return false;
79   }
80
81   @Override
82   public boolean bufferEntity() {
83     return false;
84   }
85
86   @Override
87   public void close() {
88   }
89
90   @Override
91   public MediaType getMediaType() {
92     return null;
93   }
94
95   @Override
96   public Locale getLanguage() {
97     return null;
98   }
99
100   @Override
101   public int getLength() {
102     return 0;
103   }
104
105   @Override
106   public Set<String> getAllowedMethods() {
107     return null;
108   }
109
110   @Override
111   public Map<String, NewCookie> getCookies() {
112     return null;
113   }
114
115   @Override
116   public EntityTag getEntityTag() {
117     return null;
118   }
119
120   @Override
121   public Date getDate() {
122     return null;
123   }
124
125   @Override
126   public Date getLastModified() {
127     return null;
128   }
129
130   @Override
131   public URI getLocation() {
132     return null;
133   }
134
135   @Override
136   public Set<Link> getLinks() {
137     return null;
138   }
139
140   @Override
141   public boolean hasLink(String s0) {
142     return false;
143   }
144
145
146   @Override
147   public Link getLink(String s0) {
148     return null;
149   }
150
151   @Override
152   public Link.Builder getLinkBuilder(String s0) {
153     return null;
154   }
155
156   public int getStatus() {
157     return status;
158   }
159
160   @Override
161   public StatusType getStatusInfo() {
162     return null;
163   }
164
165   void addMetadata(MultivaluedMap<String, Object> meta) {
166     this.metadata = meta;
167   }
168
169   public MultivaluedMap<String, Object> getMetadata() {
170     // don't worry about cloning for now
171     return metadata;
172   }
173
174   @Override
175   public MultivaluedMap<String, String> getStringHeaders() {
176     return null;
177   }
178
179   @Override
180   public String getHeaderString(String s0) {
181     return null;
182   }
183
184 }