View Javadoc

1   package com.atlassian.plugins.rest.module.util;
2   
3   import javax.ws.rs.core.MultivaluedMap;
4   import javax.ws.rs.core.Response;
5   import java.net.URI;
6   
7   /**
8    * Dummy response solely for URI generation
9    */
10  class GeneratedURIResponse extends Response
11  {
12      private URI uri;
13  
14      GeneratedURIResponse(URI uri)
15      {
16          this.uri = uri;
17      }
18  
19      public URI getURI()
20      {
21          return uri;
22      }
23  
24      public String toString()
25      {
26          return uri.toString();
27      }
28  
29      @Override
30      public Object getEntity()
31      {
32          throw new UnsupportedOperationException();
33      }
34  
35      @Override
36      public int getStatus()
37      {
38          throw new UnsupportedOperationException();
39      }
40  
41      @Override
42      public MultivaluedMap<String, Object> getMetadata()
43      {
44          throw new UnsupportedOperationException();
45      }
46  
47  }