站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

FragmentResult - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.portlet.result
Class FragmentResult

java.lang.Object
  extended byorg.jboss.portal.portlet.result.Result
      extended byorg.jboss.portal.portlet.result.FragmentResult

public class FragmentResult
extends Result

Data produced.


Field Summary
protected  int expirationSecs
          Number of seconds this result remains valid, a value of -1 indicates that it never expires.
protected  Properties properties
          The response properties.
static int TYPE_BYTES
           
static int TYPE_CHARS
           
static int TYPE_EMPTY
           
 
Constructor Summary
FragmentResult()
           
 
Method Summary
 java.io.ByteArrayOutputStream getBytes()
          Return the bytes of the content held by the fragment.
 java.io.StringWriter getChars()
          Return the chars of the content held by the fragment.
 java.lang.String getContentType()
          Return the content type of the generated fragment.
 int getExpirationSecs()
           
 java.lang.String getHeader()
           
 java.io.OutputStream getOutputStream()
           
 Properties getProperties()
           
 java.lang.String getTitle()
          Return the fragment title.
 int getType()
           
 java.io.PrintWriter getWriter()
           
 void resetBuffer()
           
 void setContentType(java.lang.String contentType)
          Set the fragment of the content type.
 void setExpirationSecs(int expirationSecs)
           
 void setHeader(java.lang.String header)
           
 void setTitle(java.lang.String title)
          Set the fragment title.
 
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

properties

protected Properties properties
The response properties.


expirationSecs

protected int expirationSecs
Number of seconds this result remains valid, a value of -1 indicates that it never expires.

Constructor Detail

FragmentResult

public FragmentResult()
Method Detail

getHeader

public java.lang.String getHeader()

setHeader

public void setHeader(java.lang.String header)

getType

public int getType()

getBytes

public java.io.ByteArrayOutputStream 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.io.StringWriter 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

getTitle

public java.lang.String getTitle()
Return the fragment title.

Returns:
the title.

setTitle

public void setTitle(java.lang.String title)
Set the fragment title.

Parameters:
title - the new title

getContentType

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

Returns:
the content type

setContentType

public void setContentType(java.lang.String contentType)
Set the fragment of the content type.

Parameters:
contentType - the content type

getWriter

public java.io.PrintWriter getWriter()
                              throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException - if the output stream is already used or if no content type is defined

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException,
                                            java.lang.IllegalStateException
Throws:
java.io.IOException
java.lang.IllegalStateException - if the window writer is already used or if no content type is defined

resetBuffer

public void resetBuffer()

getProperties

public Properties getProperties()

getExpirationSecs

public int getExpirationSecs()

setExpirationSecs

public void setExpirationSecs(int expirationSecs)