|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.javaprinciples.resource.servlet.ResourceModel<T>
public class ResourceModel<T>
| Constructor Summary | |
|---|---|
ResourceModel()
|
|
| Method Summary | |
|---|---|
void |
addProperty(String name,
String value)
Add a property that would be returned in the header. |
String |
getProperty(String key)
The property value for a key. |
Set<String> |
getPropertyKeys()
A method to iterator the properties. |
Resource<T> |
getResource()
The resource previously set. |
int |
getStatusCode()
A status code that may have been optional set. |
void |
setResource(Resource<T> resource)
The resource that contains the data of interest. |
void |
setStatusCode(int statusCode)
A code that will be set on the response. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceModel()
| Method Detail |
|---|
public void setStatusCode(int statusCode)
statusCode - An Http status code or zero for dont care.public int getStatusCode()
public void addProperty(String name,
String value)
name - A header namevalue - Any string valuepublic Set<String> getPropertyKeys()
public String getProperty(String key)
key - Hopefully a key that was returned in addProperty.
public void setResource(Resource<T> resource)
resource - Must not be null.public Resource<T> getResource()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||