org.jboss.portal.portlet.invocation.response
Class ContentResponse

java.lang.Object
  extended by org.jboss.portal.portlet.invocation.response.PortletInvocationResponse
      extended by org.jboss.portal.portlet.invocation.response.ContentResponse
Direct Known Subclasses:
FragmentResponse

public class ContentResponse
extends PortletInvocationResponse

Data produced.

Version:
$Revision: 5602 $
Author:
Julien Viet

Field Summary
static int TYPE_BYTES
          .
static int TYPE_CHARS
          .
static int TYPE_EMPTY
          .
 
Constructor Summary
ContentResponse(ResponseProperties properties, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String contentType, byte[] bytes, java.lang.String chars, CacheControl cacheControl)
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getAttributes()
           
 byte[] getBytes()
          Return the bytes of the content held by the fragment.
 CacheControl getCacheControl()
           
 java.lang.String getChars()
          Return the chars of the content held by the fragment.
 java.lang.String getContent()
          Return the content as a string.
 java.lang.String getContentType()
          Return the content type of the generated fragment.
 ResponseProperties getProperties()
           
 int getType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_EMPTY

public static final int TYPE_EMPTY
.

See Also:
Constant Field Values

TYPE_CHARS

public static final int TYPE_CHARS
.

See Also:
Constant Field Values

TYPE_BYTES

public static final int TYPE_BYTES
.

See Also:
Constant Field Values
Constructor Detail

ContentResponse

public ContentResponse(ResponseProperties properties,
                       java.util.Map<java.lang.String,java.lang.Object> attributes,
                       java.lang.String contentType,
                       byte[] bytes,
                       java.lang.String chars,
                       CacheControl cacheControl)
Method Detail

getProperties

public ResponseProperties getProperties()

getCacheControl

public CacheControl getCacheControl()

getAttributes

public java.util.Map<java.lang.String,java.lang.Object> getAttributes()

getType

public int getType()

getContent

public java.lang.String getContent()
Return the content as a string.

Returns:
the content

getBytes

public byte[] getBytes()
                throws java.lang.IllegalArgumentException
Return the bytes of the content held by the fragment.

Returns:
the bytes
Throws:
java.lang.IllegalArgumentException - if the type is not bytes

getChars

public java.lang.String getChars()
                          throws java.lang.IllegalArgumentException
Return the chars of the content held by the fragment.

Returns:
the chars
Throws:
java.lang.IllegalArgumentException - if the type is not chars

getContentType

public java.lang.String getContentType()
Return the content type of the generated fragment.

Returns:
the content type


Copyright © 2008. All Rights Reserved.