[PORTLETSPEC3-28] Add setStatus method on ResourceResponse Created: 21/May/13  Updated: 22/Jan/16  Resolved: 26/Aug/13

Status: Closed
Project: portletspec3
Component/s: Ideas for JSR 362 Extensions
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: julien_viet Assignee: msnicklous
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to PORTLETSPEC3-26 Errata: Clarify that certain methods ... Closed

 Description   

Resource serving can provide an HTTP response status with the ResourceResponse.HTTP_STATUS_CODE property. Adding a setStatus (like in javax.servlet.http.HttpServletResponse) method on the ResourceResponse that would simply delegate to the status code property would be more explicit and developer friendly, instead of:

response.addProperty(ResourceResponse.HTTP_STATUS_CODE, "404");

we would have:

response.setStatus404);



 Comments   
Comment by msnicklous [ 19/Aug/13 ]

I agree that we should add this helper method.

Comment by msnicklous [ 26/Aug/13 ]

Added method ResourceResponse.setStatus(int sc)

Comment by msnicklous [ 22/Jan/16 ]

done.

Generated at Thu Sep 29 07:24:38 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.