push addional code
[sdc.git] / openecomp-be / api / openecomp-sdc-rest-webapp / onboarding-rest-war / src / main / java / org / openecomp / server / interceptors / DefaultOutput.java
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 import java.io.Serializable;
24 import java.lang.annotation.Annotation;
25 import java.net.URI;
26 import java.util.Date;
27 import java.util.Locale;
28 import java.util.Map;
29 import java.util.Set;
30
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;
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 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   public Object getEntity() {
52     return entity;
53   }
54
55   @Override
56   public <T> T readEntity(Class<T> asClass) {
57     return null;
58   }
59
60   @Override
61   public <T> T readEntity(GenericType<T> genericType) {
62     return null;
63   }
64
65   @Override
66   public <T> T readEntity(Class<T> asClass, Annotation[] annotations) {
67     return null;
68   }
69
70   @Override
71   public <T> T readEntity(GenericType<T> var1, Annotation[] var2) {
72     return null;
73   }
74
75   @Override
76   public boolean hasEntity() throws IllegalStateException {
77     return false;
78   }
79
80   @Override
81   public boolean bufferEntity() {
82     return false;
83   }
84
85   @Override
86   public void close() {
87   }
88
89   @Override
90   public MediaType getMediaType() {
91     return null;
92   }
93
94   @Override
95   public Locale getLanguage() {
96     return null;
97   }
98
99   @Override
100   public int getLength() {
101     return 0;
102   }
103
104   @Override
105   public Set<String> getAllowedMethods() {
106     return null;
107   }
108
109   @Override
110   public Map<String, NewCookie> getCookies() {
111     return null;
112   }
113
114   @Override
115   public EntityTag getEntityTag() {
116     return null;
117   }
118
119   @Override
120   public Date getDate() {
121     return null;
122   }
123
124   @Override
125   public Date getLastModified() {
126     return null;
127   }
128
129   @Override
130   public URI getLocation() {
131     return null;
132   }
133
134   @Override
135   public Set<Link> getLinks() {
136     return null;
137   }
138
139   @Override
140   public boolean hasLink(String s0) {
141     return false;
142   }
143
144   @Override
145   public Link getLink(String s0) {
146     return null;
147   }
148
149   @Override
150   public Link.Builder getLinkBuilder(String s0) {
151     return null;
152   }
153
154   public int getStatus() {
155     return status;
156   }
157
158   @Override
159   public StatusType getStatusInfo() {
160     return null;
161   }
162
163   void addMetadata(MultivaluedMap<String, Object> meta) {
164     this.metadata = meta;
165   }
166
167   public MultivaluedMap<String, Object> getMetadata() {
168     // don't worry about cloning for now
169     return metadata;
170   }
171
172   @Override
173   public MultivaluedMap<String, String> getStringHeaders() {
174     return null;
175   }
176
177   @Override
178   public String getHeaderString(String s0) {
179     return null;
180   }
181
182 }