Class AbstractContributionResource
- java.lang.Object
-
- org.silverpeas.core.web.rs.RESTWebService
-
- org.silverpeas.core.webapi.contribution.AbstractContributionResource
-
- All Implemented Interfaces:
ProtectedWebResource,WebAuthenticationValidation,WebAuthorizationValidation,SilverpeasWebResource
- Direct Known Subclasses:
ContributionContentResource
public abstract class AbstractContributionResource extends RESTWebService
User: Yohann Chastagnier Date: 21/05/13
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.silverpeas.core.web.rs.RESTWebService
RESTWebService.WebProcess<R>, RESTWebService.WebTreatment<R>
-
-
Field Summary
-
Fields inherited from class org.silverpeas.core.web.rs.RESTWebService
RESPONSE_HEADER_ARRAYSIZE
-
Fields inherited from interface org.silverpeas.core.web.SilverpeasWebResource
BASE_PATH
-
-
Constructor Summary
Constructors Constructor Description AbstractContributionResource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringgetContributionId()protected StringgetDefaultFormId()protected StringgetDefaultPublicationTemplateLanguage()protected FormFieldValueEntitygetFormFieldValue(FieldTemplate fieldTemplate, DataRecord data, String lang)Gets the value of a field.protected List<FormFieldValueEntity>getFormFieldValues(FieldTemplate fieldTemplate, DataRecord data, String lang)protected PublicationTemplategetPublicationTemplate(String formId)Gets the publication template of the specified form id-
Methods inherited from class org.silverpeas.core.web.rs.RESTWebService
createWebResourceUri, fromPage, getBundle, getBundleLocation, getHighestUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getResourceBasePath, getSilverpeasContext, getUri, getUser, getUserPreferences, getUserRoles, identifiedBy, identifiedBy, initContext, initWebResourceUri, isUserDefined, process
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.web.rs.ProtectedWebResource
validateUserAuthorization
-
Methods inherited from interface org.silverpeas.core.web.SilverpeasWebResource
getComponentId
-
Methods inherited from interface org.silverpeas.core.web.rs.WebAuthenticationValidation
validateUserAuthentication
-
-
-
-
Method Detail
-
getContributionId
public abstract String getContributionId()
-
getDefaultFormId
protected String getDefaultFormId()
- Returns:
- the default form id
-
getDefaultPublicationTemplateLanguage
protected String getDefaultPublicationTemplateLanguage()
- Returns:
- the default publication template language
-
getFormFieldValues
protected List<FormFieldValueEntity> getFormFieldValues(FieldTemplate fieldTemplate, DataRecord data, String lang) throws FormException
- Throws:
FormException
-
getFormFieldValue
protected FormFieldValueEntity getFormFieldValue(FieldTemplate fieldTemplate, DataRecord data, String lang) throws FormException
Gets the value of a field.- Parameters:
fieldTemplate- a field template.data- the data of a form registration.lang- the content language of data.- Returns:
- a
FormFieldValueEntityinstance initialized with given form data. - Throws:
FormException- which could be thrown by form services.
-
getPublicationTemplate
protected PublicationTemplate getPublicationTemplate(String formId)
Gets the publication template of the specified form id- Parameters:
formId- an identifier of a form.- Returns:
- the corresponding
PublicationTemplateinstance if any, null otherwise.
-
-