Class AbstractAttachmentResource
- java.lang.Object
-
- org.silverpeas.core.web.rs.RESTWebService
-
- org.silverpeas.core.webapi.attachment.AbstractAttachmentResource
-
- All Implemented Interfaces:
ProtectedWebResource,WebAuthenticationValidation,WebAuthorizationValidation,SilverpeasWebResource
- Direct Known Subclasses:
AttachmentResource,SharedAttachmentResource
public abstract class AbstractAttachmentResource extends RESTWebService
A REST Web resource providing access to attachments.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.silverpeas.core.web.rs.RESTWebService
RESTWebService.WebProcess<R>, RESTWebService.WebTreatment<R>
-
-
Field Summary
Fields Modifier and Type Field Description protected StringcomponentId-
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 AbstractAttachmentResource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringgetComponentId()Gets the identifier of the component instance to which the requested resource belongs to.protected javax.ws.rs.core.ResponsegetFileContent(String attachmentId)protected abstract booleanisFileReadable(SimpleDocument attachment)-
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.rs.WebAuthenticationValidation
validateUserAuthentication
-
-
-
-
Field Detail
-
componentId
@PathParam("componentId") protected String componentId
-
-
Method Detail
-
getComponentId
public String getComponentId()
Description copied from interface:SilverpeasWebResourceGets the identifier of the component instance to which the requested resource belongs to.- Returns:
- the identifier of the Silverpeas component instance.
-
getFileContent
protected javax.ws.rs.core.Response getFileContent(String attachmentId)
-
isFileReadable
protected abstract boolean isFileReadable(SimpleDocument attachment)
-
-