com.sapportals.portal.prt.component
Interface IPortalComponentResponse


public interface IPortalComponentResponse

The IPortalComponentResponse encapsulates all the information sent from the Portal Component to the Client.


Field Summary
static int ERROR
           
static int OK
           
 
Method Summary
 void addCookie(javax.servlet.http.Cookie cookie)
          Helper method to add a cookie in the response
 void addResource(IResource resource)
          Deprecated. This method is not recommended to be used anymore. It might lead to unexpected results due to the undefined coupling of a request object to a response object. Please use include(IPortalComponentRequest, IResource) instead.
 PortalComponentContentType getContentType()
          Returns the reponse type of this response
 IPortalComponentRequest getRequest()
          Deprecated. Note: this method should not be called. It is only used in conjunction with addResource, which is deprecated also. The association of a request object with a response object is not "design-stable".
 int getStatus()
          Gets the status of the response
 java.io.Writer getWriter()
          Gets the writer associated to this response
 void include(IPortalComponentRequest aRequest, INode aNode)
          Includes the content of another Portal Component in this response.
 void include(IPortalComponentRequest aRequest, IResource aResource)
          Includes the content of a Resource in this response.
 void setContentType(PortalComponentContentType type)
          Sets the response type of this response.
 void setStatus(int status)
          Sets the status of the response
 void write(java.lang.String aString)
          Adds a String in this response.
 

Field Detail

ERROR

public static final int ERROR

OK

public static final int OK
Method Detail

addCookie

public void addCookie(javax.servlet.http.Cookie cookie)
Helper method to add a cookie in the response
Parameters:
cookie - The feature to be added to the Cookie attribute

addResource

public void addResource(IResource resource)
Deprecated. This method is not recommended to be used anymore. It might lead to unexpected results due to the undefined coupling of a request object to a response object. Please use include(IPortalComponentRequest, IResource) instead.

Adds a resource in the response. This method provides a generic mechanism to output any kind of resource in the response.
Parameters:
resource - The feature to be added to the Resource attribute

write

public void write(java.lang.String aString)
Adds a String in this response.
Parameters:
aString - The String to be outputed in the response.

getWriter

public java.io.Writer getWriter()
Gets the writer associated to this response
Returns:
the writer of this response.

include

public void include(IPortalComponentRequest aRequest,
                    IResource aResource)
Includes the content of a Resource in this response.
Parameters:
aRequest - the the client's request
aResource - the resource to include in the responce

include

public void include(IPortalComponentRequest aRequest,
                    INode aNode)
Includes the content of another Portal Component in this response. The content of the target component is added in the current content of this response.
Parameters:
aRequest - the the client's request
aNode - the node representing the target component.

setContentType

public void setContentType(PortalComponentContentType type)
Sets the response type of this response.
This value does not correspond to the final content type returned to the browser. It 's only relevant for the current proccession portal component that may want to render alternate content type.
Parameters:
type - The new ContentType value

getContentType

public PortalComponentContentType getContentType()
Returns the reponse type of this response
Returns:
The ContentType value

setStatus

public void setStatus(int status)
Sets the status of the response
Parameters:
status - The status to sent

getStatus

public int getStatus()
Gets the status of the response
Returns:
the status as an int

getRequest

public IPortalComponentRequest getRequest()
Deprecated. Note: this method should not be called. It is only used in conjunction with addResource, which is deprecated also. The association of a request object with a response object is not "design-stable".

Gets an associated request object.
Returns:
the associated request object