org.silverpeas.attachment.web
Class SimpleDocumentResourceCreator

java.lang.Object
  extended by com.silverpeas.web.RESTWebService
      extended by org.silverpeas.attachment.web.AbstractSimpleDocumentResource
          extended by org.silverpeas.attachment.web.SimpleDocumentResourceCreator

@Service
@RequestScoped
@Authorized
public class SimpleDocumentResourceCreator
extends AbstractSimpleDocumentResource

Author:
ehugonnet

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
SimpleDocumentResourceCreator()
           
 
Method Summary
 javax.ws.rs.core.Response createDocument(String filename)
          Create the document identified by the requested URI and from the content and some additional parameters passed within the request.
protected  SimpleDocumentEntity createSimpleDocument(SimpleDocumentUploadData uploadData, String filename)
           
 
Methods inherited from class org.silverpeas.attachment.web.AbstractSimpleDocumentResource
checkUploadedFile, getBundleLocation, getComponentId, performRuntimeException
 
Methods inherited from class com.silverpeas.web.RESTWebService
getBundle, 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

SimpleDocumentResourceCreator

public SimpleDocumentResourceCreator()
Method Detail

createDocument

public javax.ws.rs.core.Response createDocument(String filename)
                                         throws IOException
Create the document identified by the requested URI and from the content and some additional parameters passed within the request.

A SimpleDocumentUploadData is extracted from request parameters.

Returns:
an HTTP response embodied an entity in a format expected by the client (that is identified by the xRequestedWith parameter).
Throws:
IOException - if an error occurs while updating the document.

createSimpleDocument

protected SimpleDocumentEntity createSimpleDocument(SimpleDocumentUploadData uploadData,
                                                    String filename)
                                             throws IOException
Throws:
IOException


Copyright © 2016 Silverpeas. All Rights Reserved.