View Javadoc

1   /* The contents of this file are subject to the license and copyright terms
2    * detailed in the license directory at the root of the source tree (also 
3    * available online at http://www.fedora.info/license/).
4    */
5   package org.fedoracommons.funapi;
6   
7   import java.io.InputStream;
8   
9   
10  /**
11   * Wrapper object that contains either a redirectUrl or InputStream.
12   * 
13   * @author Edwin Shin
14   * @since 0.1
15   * @version $Id: UnapiObject.java 33 2008-10-25 19:31:36Z pangloss $
16   */
17  public class UnapiObject {
18      private InputStream is;
19      private String redirectUrl;
20      private String contentType;
21      
22      public UnapiObject(String redirectUrl) {
23          this.redirectUrl = redirectUrl;
24      }
25      
26      public UnapiObject(InputStream is, String contentType) {
27          this.is = is;
28          this.contentType = contentType;
29      }
30      
31      public String getRedirectUrl() {
32          return redirectUrl;
33      }
34      
35      public InputStream getInputStream() {
36          return is;
37      }
38      
39      public String getContentType() {
40          return contentType;
41      }
42  }