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