org.silverpeas.contribution.web
Class ContributionContentResource

java.lang.Object
  extended by com.silverpeas.web.RESTWebService
      extended by org.silverpeas.contribution.web.AbstractContributionResource
          extended by org.silverpeas.contribution.web.ContributionContentResource

@Service
@RequestScoped
@Authorized
public class ContributionContentResource
extends AbstractContributionResource

User: Yohann Chastagnier Date: 21/05/13


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
ContributionContentResource()
           
 
Method Summary
 String getComponentId()
          Gets the identifier of the component instance to which the requested resource belongs to.
 String getContributionId()
           
 FormEntity getFormContent(String lang)
          Gets the JSON representation of contribution template.
 FormEntity getFormContent(String formId, String lang, boolean renderView)
          Gets the JSON representation of contribution template.
 
Methods inherited from class org.silverpeas.contribution.web.AbstractContributionResource
getDefaultFormId, getDefaultPublicationTemplateLanguage, getFormFieldValue, getPublicationTemplate
 
Methods inherited from class com.silverpeas.web.RESTWebService
getBundle, getBundleLocation, getGreaterUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getUriInfo, getUserDetail, getUserPreferences, getUserRoles, process, validateUserAuthentication, validateUserAuthorization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContributionContentResource

public ContributionContentResource()
Method Detail

getComponentId

public String getComponentId()
Description copied from class: RESTWebService
Gets the identifier of the component instance to which the requested resource belongs to.

Specified by:
getComponentId in class RESTWebService
Returns:
the identifier of the Silverpeas component instance.

getContributionId

public String getContributionId()
Specified by:
getContributionId in class AbstractContributionResource

getFormContent

public FormEntity getFormContent(String lang)
Gets the JSON representation of contribution template. If it doesn't exist, a 404 HTTP code is returned. If the user isn't authentified, a 401 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 form informations.

getFormContent

public FormEntity getFormContent(String formId,
                                 String lang,
                                 boolean renderView)
Gets the JSON representation of contribution template. If it doesn't exist, a 404 HTTP code is returned. If the user isn't authentified, a 401 HTTP code is returned. If a problem occurs when processing the request, a 503 HTTP code is returned.

Parameters:
formId -
lang -
Returns:
the response to the HTTP GET request with the JSON representation of form informations.


Copyright © 2016 Silverpeas. All Rights Reserved.