Interface I_CmsRepositorySession

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void copy​(java.lang.String src, java.lang.String dest, boolean overwrite)
      Copies the item found at the source path to the destination path.
      void create​(java.lang.String path)
      Creates a new item at the given path.
      void delete​(java.lang.String path)
      Deletes the item at the given path.
      boolean exists​(java.lang.String path)
      Returns if an item exists at the given path.
      I_CmsRepositoryItem getItem​(java.lang.String path)
      Returns the item found at the given path.
      CmsRepositoryLockInfo getLock​(java.lang.String path)
      Returns the lock for the resource at the given path.
      java.util.List<I_CmsRepositoryItem> list​(java.lang.String path)
      Returns a list with all items found directly in the given path.
      boolean lock​(java.lang.String path, CmsRepositoryLockInfo lock)
      Creates a new lock on the item at the path with the given information in the lock info.
      void move​(java.lang.String src, java.lang.String dest, boolean overwrite)
      Moves an item from a source path to a destination path.
      void save​(java.lang.String path, java.io.InputStream inputStream, boolean overwrite)
      Saves an item at the given path.
      void unlock​(java.lang.String path)
      Unlocks the item found at the path.
    • Method Detail

      • copy

        void copy​(java.lang.String src,
                  java.lang.String dest,
                  boolean overwrite)
           throws CmsException
        Copies the item found at the source path to the destination path.

        Parameters:
        src - the path of the item which should be copied
        dest - the destination path where to copy to
        overwrite - should any existing item be overwritten
        Throws:
        CmsException - if something goes wrong
      • create

        void create​(java.lang.String path)
             throws CmsException
        Creates a new item at the given path.

        In this case this should be a collection (directory).

        Parameters:
        path - the complete path of the new collection
        Throws:
        CmsException - if something goes wrong
      • delete

        void delete​(java.lang.String path)
             throws CmsException
        Deletes the item at the given path.

        Parameters:
        path - the complete path of the item to delete
        Throws:
        CmsException - if something goes wrong
      • exists

        boolean exists​(java.lang.String path)
        Returns if an item exists at the given path.

        Parameters:
        path - the complete path of the item to check existance
        Returns:
        true if the item exists otherwise false
      • getItem

        I_CmsRepositoryItem getItem​(java.lang.String path)
                             throws CmsException
        Returns the item found at the given path.

        Parameters:
        path - the complete path of the item to return
        Returns:
        the item found at the path
        Throws:
        CmsException - if something goes wrong
      • getLock

        CmsRepositoryLockInfo getLock​(java.lang.String path)
        Returns the lock for the resource at the given path.

        Parameters:
        path - the complete path where to return the lock for
        Returns:
        the found lock as CmsWebdavLockInfo or null if not found
      • list

        java.util.List<I_CmsRepositoryItemlist​(java.lang.String path)
                                          throws CmsException
        Returns a list with all items found directly in the given path.

        Parameters:
        path - the complete path from which to return the items
        Returns:
        a list with I_CmsRepositoryItem found in the path
        Throws:
        CmsException - if something goes wrong
      • lock

        boolean lock​(java.lang.String path,
                     CmsRepositoryLockInfo lock)
              throws CmsException
        Creates a new lock on the item at the path with the given information in the lock info.

        Parameters:
        path - the complete path of the item
        lock - the information about the lock to create
        Returns:
        if the lock was successfully
        Throws:
        CmsException - if something goes wrong
      • move

        void move​(java.lang.String src,
                  java.lang.String dest,
                  boolean overwrite)
           throws CmsException
        Moves an item from a source path to a destination path.

        Parameters:
        src - the complete path to the item which should be copied
        dest - the complete destination path where to copy to
        overwrite - should any existing item should be overwritten
        Throws:
        CmsException - if something goes wrong
      • save

        void save​(java.lang.String path,
                  java.io.InputStream inputStream,
                  boolean overwrite)
           throws CmsException,
                  java.io.IOException
        Saves an item at the given path.

        This creates a new single item (file) if it does not exist.

        Parameters:
        path - the complete path of the new item
        inputStream - the content of the item
        overwrite - should an existing item at the path be overwritten
        Throws:
        CmsException - if something goes wrong
        java.io.IOException - if a write error occurs
      • unlock

        void unlock​(java.lang.String path)
        Unlocks the item found at the path.

        Parameters:
        path - The complete path of the item to unlock