Uploaded image for project: 'File Manager Application'
  1. File Manager Application
  2. FILEMAN-24

Implement the folder web service

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Major
    • 2.0-milestone-1
    • 1.1.6
    • None

    Description

      Folders are XWiki documents that have an object of type FolderClass. The URL to access a folder will look like this:

      /xwiki/bin/get/drive/folder
      

      This is also the URL that will expose the web service, which is going to be implemented in FolderSheet. A drive is an XWiki space where the File Manager looks for files and folders. The following operations should be possible on a folder:

      • create a new sub-folder
        /xwiki/bin/get/drive/folder?action=newFolder&name=NewFolder
        

        The response should be redirected to the created folder:

        /xwiki/bin/get/drive/NewFolder
        

        Note that the id of the created folder may be suffixed by a counter in case there is already a file or folder with the same name in another place on the same drive (XWiki space).

      • create a new child file
        /xwiki/bin/get/drive/folder?action=newFile&name=NewFile
        

        Additional parameters for the file meta data can be specified. The response should be redirected to the created file:

        /xwiki/bin/get/drive/NewFile
        

        Note that the id of the created file may be suffixed by a counter in case there is already a file or folder with the same name in another place on the same drive (XWiki space).

      • get
        /xwiki/bin/get/drive/folder
        

        The response should be in JSON format and it should include the list of sub-folders and the list of direct child files.

      • move to a different parent and/or rename
        /xwiki/bin/get/drive/folder?action=move&parent=NewParent&name=NewName
        

        The response should be redirected to the new URL:

        /xwiki/bin/get/drive/NewName
        

        Again, the new id may be suffixed by a counter in case there is already a file or folder with the same name in another place on the same drive (XWiki space).

      • copy to a different parent and/or a different name
        /xwiki/bin/get/drive/folder?action=copy&parent=OtherParent&name=OtherName
        
      • delete
        /xwiki/bin/get/drive/folder?action=delete
        

        The HTTP status of the response should inform about the success/failure. Additional parameters could be added to control if the descendant files that are included in other folders too are to be removed or not.

      Attachments

        Activity

          People

            mflorea Marius Dumitru Florea
            mflorea Marius Dumitru Florea
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: