fr.paris.lutece.plugins.document.modules.rest.rs
Class DocumentRest

java.lang.Object
  extended by fr.paris.lutece.plugins.document.modules.rest.rs.DocumentRest

public class DocumentRest
extends Object

DocumentRest


Constructor Summary
DocumentRest()
           
 
Method Summary
 String doAssignDocumentToPortlet(String strIdDocument, String strIdPortlet, javax.servlet.http.HttpServletRequest request)
          Assign a document to the portlet
 String doCreateDocument(javax.servlet.http.HttpServletRequest request)
          Create document
 String doModifyDocument(javax.servlet.http.HttpServletRequest request)
          Modify document
 String doPublishDocument(String strIdDocument, String strIdPortlet, javax.servlet.http.HttpServletRequest request)
          Publish a document
 String doSubmitOrUnsubmitDocumentToValidate(String strIdDocument, String strIdAction, String strIdUser, javax.servlet.http.HttpServletRequest request)
          Method to submit or not a document to validate it
 String doUnassignDocumentToPortlet(String strIdDocument, String strIdPortlet, javax.servlet.http.HttpServletRequest request)
          Unassign a document to the portlet
 String doUnpublishDocument(String strIdDocument, String strIdPortlet, javax.servlet.http.HttpServletRequest request)
          Unpublish a document
 String doValidateDocument(String strIdDocument, String strIdAction, String strIdUser, javax.servlet.http.HttpServletRequest request)
          Validate a document
 String getCreatingDocumentFields(String strCodeDocumentType)
          Get different type document fields to create it
 String getDeletingDocument(String strIdDocument)
          Remove the document by id
 List<fr.paris.lutece.plugins.document.business.Document> getDocument(String strIdDocument)
          Get document by id document
 String getDocumentAttributesByCodeType(String strCodeType)
          Get all atributes of a selected document type
static String getDocumentData(fr.paris.lutece.portal.web.upload.MultipartHttpServletRequest multipartRequest, fr.paris.lutece.plugins.document.business.Document document, Locale locale)
          Return the data of a document object
 List<fr.paris.lutece.plugins.document.business.Document> getDocumentsList(String strIdSpace)
          Get documents list by id space
 String getDocumentSpaces(String strIdUser)
          Get document spaces by id user
 String getDocumentSpacesByCodeType(String strCodeType)
          Get list of all spaces selected by a specific code document type
 String getListDocumentTypes()
          Get list of different types document
 List<fr.paris.lutece.util.ReferenceItem> getPortletsListToAssignDocument(String strIdDocument)
          Get the list of list documents portlets
 List<fr.paris.lutece.util.ReferenceItem> getPortletsToAssignDocument(String strIdDocument)
          Get the list of document portlets
 List<fr.paris.lutece.plugins.document.business.publication.DocumentPublication> getPortletsToPublishDocument(String strIdDocument)
          Get the list of document/list documents portlets where the document is assigned
 List<fr.paris.lutece.plugins.document.business.spaces.DocumentSpace> getSpaceById(String strIdSpace)
          Get space by id
 String getWADL(javax.servlet.http.HttpServletRequest request)
          Get the wadl.xml content
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentRest

public DocumentRest()
Method Detail

getWADL

public String getWADL(@Context
                      javax.servlet.http.HttpServletRequest request)
Get the wadl.xml content

Parameters:
request - HttpServletRequest
Returns:
the content of wadl.xml

getDocumentSpaces

public String getDocumentSpaces(String strIdUser)
Get document spaces by id user

Parameters:
strIdUser - the id user
Returns:
the xml of spaces

getDocumentSpacesByCodeType

public String getDocumentSpacesByCodeType(String strCodeType)
Get list of all spaces selected by a specific code document type

Parameters:
strCodeType - The specific code document type
Returns:
the xml of spaces by code document type

getDocumentAttributesByCodeType

public String getDocumentAttributesByCodeType(String strCodeType)
Get all atributes of a selected document type

Parameters:
strCodeType - The code document type
Returns:
A xml list of all attributes of the document type

getSpaceById

public List<fr.paris.lutece.plugins.document.business.spaces.DocumentSpace> getSpaceById(String strIdSpace)
Get space by id

Parameters:
strIdSpace - the id space
Returns:
the xml of space informations

getDocumentsList

public List<fr.paris.lutece.plugins.document.business.Document> getDocumentsList(String strIdSpace)
Get documents list by id space

Parameters:
strIdSpace - the id space
Returns:
the xml of documents list

getDocument

public List<fr.paris.lutece.plugins.document.business.Document> getDocument(String strIdDocument)
Get document by id document

Parameters:
strIdDocument - the id document
Returns:
the xml of document

getCreatingDocumentFields

public String getCreatingDocumentFields(String strCodeDocumentType)
Get different type document fields to create it

Parameters:
strCodeDocumentType - type document code
Returns:

getListDocumentTypes

public String getListDocumentTypes()
Get list of different types document

Returns:
the list of Document Type on XML file

getDeletingDocument

public String getDeletingDocument(String strIdDocument)
Remove the document by id

Parameters:
strIdDocument - id document
Returns:

getPortletsToAssignDocument

public List<fr.paris.lutece.util.ReferenceItem> getPortletsToAssignDocument(String strIdDocument)
Get the list of document portlets

Parameters:
strIdDocument - id document
Returns:
listPortlet portlets list (will be formatted in xml format)

getPortletsListToAssignDocument

public List<fr.paris.lutece.util.ReferenceItem> getPortletsListToAssignDocument(String strIdDocument)
Get the list of list documents portlets

Parameters:
strIdDocument -
Returns:
listPortlet portlets list (will be formatted in xml format)

getPortletsToPublishDocument

public List<fr.paris.lutece.plugins.document.business.publication.DocumentPublication> getPortletsToPublishDocument(String strIdDocument)
Get the list of document/list documents portlets where the document is assigned

Parameters:
strIdDocument - id document
Returns:
listDocumentPublication DocumentPublication list (will be formatted in xml format)

doSubmitOrUnsubmitDocumentToValidate

public String doSubmitOrUnsubmitDocumentToValidate(String strIdDocument,
                                                   String strIdAction,
                                                   String strIdUser,
                                                   @Context
                                                   javax.servlet.http.HttpServletRequest request)
Method to submit or not a document to validate it

Parameters:
strIdDocument - id document
strIdAction - id action
strIdUser - id user
request - request
Returns:
response xml

doValidateDocument

public String doValidateDocument(String strIdDocument,
                                 String strIdAction,
                                 String strIdUser,
                                 @Context
                                 javax.servlet.http.HttpServletRequest request)
Validate a document

Parameters:
strIdDocument - id document
strIdAction - id action
strIdUser - id user
request - request
Returns:
response

doAssignDocumentToPortlet

public String doAssignDocumentToPortlet(String strIdDocument,
                                        String strIdPortlet,
                                        @Context
                                        javax.servlet.http.HttpServletRequest request)
Assign a document to the portlet

Parameters:
strIdDocument - id document
strIdPortlet - id portlet
request - request
Returns:
response xml

doUnassignDocumentToPortlet

public String doUnassignDocumentToPortlet(String strIdDocument,
                                          String strIdPortlet,
                                          @Context
                                          javax.servlet.http.HttpServletRequest request)
Unassign a document to the portlet

Parameters:
strIdDocument - id document
strIdPortlet - id portlet
request - request
Returns:
response xml

doPublishDocument

public String doPublishDocument(String strIdDocument,
                                String strIdPortlet,
                                @Context
                                javax.servlet.http.HttpServletRequest request)
Publish a document

Parameters:
strIdDocument - id document
strIdPortlet - id portlet
request - request
Returns:
response xml

doUnpublishDocument

public String doUnpublishDocument(String strIdDocument,
                                  String strIdPortlet,
                                  @Context
                                  javax.servlet.http.HttpServletRequest request)
Unpublish a document

Parameters:
strIdDocument - id document
strIdPortlet - id portlet
request - request
Returns:
response xml

doCreateDocument

public String doCreateDocument(@Context
                               javax.servlet.http.HttpServletRequest request)
Create document

Parameters:
request - request
Returns:
response xml

getDocumentData

public static String getDocumentData(fr.paris.lutece.portal.web.upload.MultipartHttpServletRequest multipartRequest,
                                     fr.paris.lutece.plugins.document.business.Document document,
                                     Locale locale)
Return the data of a document object

Parameters:
multipartRequest - map of parameters
document - The document object
Returns:
data of document object

doModifyDocument

public String doModifyDocument(@Context
                               javax.servlet.http.HttpServletRequest request)
Modify document

Parameters:
request - request
Returns:
response xml


Copyright © 2014 Mairie de Paris. All Rights Reserved.