Class DirectoryResource


  • public class DirectoryResource
    extends AbstractJaxRSResource
    This resource manages folders in the repository and provides methods for creating new folders.
    • Constructor Detail

      • DirectoryResource

        public DirectoryResource()
      • DirectoryResource

        public DirectoryResource​(javax.servlet.http.HttpServletResponse httpServletResponse)
    • Method Detail

      • createDirs

        public javax.ws.rs.core.Response createDirs​(String pathId)
        Creates a new folder with the specified name.

        Example Request:
        PUT pentaho/api/repo/dirs/home
        PUT data:

            This PUT body does not contain data.
          

        Parameters:
        pathId - The path from the root folder to the root node of the tree to return using colon characters in place of / or \ characters. To clarify /path/to/file, the encoded pathId would be :path:to:file.
        Returns:
        A jax-rs Response object with the appropriate status code, header, and body.

        Example Response:

             couldNotCreateFolderDuplicate
          
      • isDirVisible

        public javax.ws.rs.core.Response isDirVisible​(String pathId)
        Determines whether a current user has permission to see the folder or not

        Example Request:
        GET pentaho/api/repo/dirs/home/isVisible

        Parameters:
        pathId - The path from the root folder to the root node of the tree to return using colon characters in place of / or \ characters. To clarify /path/to/file, the encoded pathId would be :path:to:file.
        Returns:
        String "true" if the folder is visible to the current user, or "false" otherwise.

        Example Response:

              true
            
      • getDefaultLocation

        public javax.ws.rs.core.Response getDefaultLocation​(String pathId)
        Checks to see if the current user is an administer of the platform and returns a boolean response.

        Example Request:
        GET pentaho/api/repo/dirs/home/defaultSaveLocation

        Returns:
        path for a default save location.

        Example Response:

              /public