|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.web.RESTWebService
public abstract class RESTWebService
The class of the Silverpeas REST web services. It provides all of the common features required by the web services in Silverpeas like the user priviledge checking.
Nested Class Summary | |
---|---|
protected class |
RESTWebService.WebProcess<RETURN_VALUE>
This class handles the execution of a RESTWebService.WebTreatment . |
protected class |
RESTWebService.WebTreatment<RETURN_VALUE>
Inner class handled by |
Field Summary | |
---|---|
static String |
RESPONSE_HEADER_ARRAYSIZE
The HTTP header parameter that provides the real size of an array of resources. |
static String |
REST_WEB_SERVICES_URI_BASE
|
Constructor Summary | |
---|---|
RESTWebService()
|
Method Summary | ||
---|---|---|
protected ResourceLocator |
getBundle()
Gets the bundle to use. |
|
protected String |
getBundleLocation()
Gets the location of the bundle to use. |
|
abstract String |
getComponentId()
Gets the identifier of the component instance to which the requested resource belongs to. |
|
SilverpeasRole |
getGreaterUserRole()
Gets the greater role of the user behind the service call. |
|
HttpRequest |
getHttpRequest()
Gets the HTTP request mapped with the execution context of this web service. |
|
javax.servlet.http.HttpServletRequest |
getHttpServletRequest()
Gets the HTTP servlet request mapped with the execution context of this web service. |
|
javax.servlet.http.HttpServletResponse |
getHttpServletResponse()
Gets the HTTP servlet response mapped with the execution context of this web service. |
|
protected OrganisationController |
getOrganisationController()
Gets the organization controller. |
|
javax.ws.rs.core.UriInfo |
getUriInfo()
Gets information about the URI with which this web service was invoked. |
|
protected UserDetail |
getUserDetail()
Gets the detail about the user that has called this web service. |
|
protected UserPreferences |
getUserPreferences()
Gets the preference of the user that requested the resource backed by this web service. |
|
protected Collection<SilverpeasRole> |
getUserRoles()
Gets roles of the authenticated user. |
|
protected
|
process(RESTWebService.WebTreatment<RETURN_VALUE> webTreatment)
This method permits to start the setting of a .WebTreatment . |
|
void |
validateUserAuthentication(UserPriviledgeValidation validation)
Validates the authentication of the user requesting this web service. |
|
void |
validateUserAuthorization(UserPriviledgeValidation validation)
Validates the authorization of the user to request this web service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REST_WEB_SERVICES_URI_BASE
public static final String RESPONSE_HEADER_ARRAYSIZE
Constructor Detail |
---|
public RESTWebService()
Method Detail |
---|
public abstract String getComponentId()
public void validateUserAuthentication(UserPriviledgeValidation validation) throws javax.ws.rs.WebApplicationException
validation
- the validation instance to use.
javax.ws.rs.WebApplicationException
- if the authentication isn't valid (no authentication and
authentication failure).UserPriviledgeValidation
public void validateUserAuthorization(UserPriviledgeValidation validation) throws javax.ws.rs.WebApplicationException
validation
- the validation instance to use.
javax.ws.rs.WebApplicationException
- if the rights of the user are not enough to access this web
resource.UserPriviledgeValidation
public javax.ws.rs.core.UriInfo getUriInfo()
public javax.servlet.http.HttpServletRequest getHttpServletRequest()
public HttpRequest getHttpRequest()
public javax.servlet.http.HttpServletResponse getHttpServletResponse()
protected UserDetail getUserDetail()
protected UserPreferences getUserPreferences()
protected Collection<SilverpeasRole> getUserRoles()
protected OrganisationController getOrganisationController()
protected String getBundleLocation()
protected ResourceLocator getBundle()
public SilverpeasRole getGreaterUserRole()
protected <RETURN_VALUE> RESTWebService.WebProcess<RETURN_VALUE> process(RESTWebService.WebTreatment<RETURN_VALUE> webTreatment)
.WebTreatment
.
RETURN_VALUE
- webTreatment
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |