org.silverpeas.notification.web
Class MessageResource

java.lang.Object
  extended by com.silverpeas.web.RESTWebService
      extended by org.silverpeas.notification.web.AbstractMessageResource
          extended by org.silverpeas.notification.web.MessageResource

@Service
@RequestScoped
@Authenticated
public class MessageResource
extends AbstractMessageResource

A REST Web resource giving gallery data.

Author:
Yohann Chastagnier

Nested Class Summary
 
Nested classes/interfaces inherited from class com.silverpeas.web.RESTWebService
RESTWebService.WebProcess<RETURN_VALUE>, RESTWebService.WebTreatment<RETURN_VALUE>
 
Field Summary
 
Fields inherited from class com.silverpeas.web.RESTWebService
RESPONSE_HEADER_ARRAYSIZE, REST_WEB_SERVICES_URI_BASE
 
Constructor Summary
MessageResource()
           
 
Method Summary
 MessageContainerEntity getMessageContainer(String registredKey)
          Gets the JSON representation of message container.
 void validateUserAuthentication(UserPriviledgeValidation validation)
          User authentication is not necessary for this WEB Service.
 
Methods inherited from class org.silverpeas.notification.web.AbstractMessageResource
asWebEntity, getComponentId, getLanguage
 
Methods inherited from class com.silverpeas.web.RESTWebService
getBundle, getBundleLocation, getGreaterUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getUriInfo, getUserDetail, getUserPreferences, getUserRoles, process, validateUserAuthorization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageResource

public MessageResource()
Method Detail

validateUserAuthentication

public void validateUserAuthentication(UserPriviledgeValidation validation)
                                throws javax.ws.rs.WebApplicationException
User authentication is not necessary for this WEB Service. The authentication processing is used here to identify the user behind the call if possible.

Overrides:
validateUserAuthentication in class RESTWebService
Parameters:
validation - the validation instance to use.
Throws:
javax.ws.rs.WebApplicationException
See Also:
UserPriviledgeValidation

getMessageContainer

public MessageContainerEntity getMessageContainer(String registredKey)
Gets the JSON representation of message container. If it doesn't exist, a 404 HTTP code is returned. If a problem occurs when processing the request, a 503 HTTP code is returned.

Returns:
the response to the HTTP GET request with the JSON representation of the asked photo.


Copyright © 2016 Silverpeas. All Rights Reserved.