Interface LibraryService


@Deprecated public interface LibraryService
Deprecated.
This service is deprecated and will be removed in a future release. Please use the Library REST APIs instead.
A public SOAP web service for the Spotfire Server Library.

Authorization

  • All access to this service require an access token that is issued for the "api.soap.library-service" scope.
  • Some operations require an access token that is also issued for the "api.soap.impersonate" scope.
  • Apart from the impersonation operations, all operations evaluate the library permissions of the calling user (the OAuth 2.0 client principal), where applicable.

Important things to note

  • All modifying operations are atomic unless stated otherwise.
  • An analysis file (.dxp) may be downloaded from http[s]://<host>[:<port>]/spotfire/library?guid=<id>.
  • An analysis file (.dxp) may be opened in Spotfire Web Player from http[s]://<host>[:<port>]/spotfire/wp/OpenAnalysis?file=<id>.
  • Recent changes to the Library may also be viewed through an RSS feed: http[s]://<host>[:<port>]/spotfire/library?rss.
Since:
5.5
  • Field Details

  • Method Details

    • getRootItem

      LibraryItem getRootItem() throws LibraryServiceException
      Deprecated.
      Returns the root item.
      Returns:
      the root item
      Throws:
      LibraryServiceException - if an unexpected error occurs
    • getChildItems

      List<LibraryItem> getChildItems(Guid folderId) throws LibraryServiceException
      Deprecated.
      Returns all items (if any) within the given folder that the calling user has read access to.
      Parameters:
      folderId - the ID of the folder item to retrieve the child items of
      Returns:
      a (possibly empty) list of all child items of the given folder item
      Throws:
      LibraryServiceException - if the folder item does not exist or isn't a folder or if an unexpected error occurs
    • getChildItemsAsUser

      List<LibraryItem> getChildItemsAsUser(Guid folderId, UserName userName) throws LibraryServiceException
      Deprecated.
      Returns all items (if any) within the given folder that the given user has read access to.

      Authorization
      Access to this operation requires an access token that is issued for the "api.soap.impersonate" scope, in addition to the "api.soap.library-service" scope.

      Parameters:
      folderId - the ID of the folder item to retrieve the child items of
      userName - the name of the user for which to retrieve the child items as
      Returns:
      a (possibly empty) list of all child items of the given folder item
      Throws:
      LibraryServiceException - if the folder item does not exist or isn't a folder or if an unexpected error occurs
    • getItems

      List<LibraryItem> getItems(List<Guid> itemIds) throws LibraryServiceException
      Deprecated.
      Returns the items with the given IDs that the calling user has read access to. Items that cannot be found are ignored.
      Parameters:
      itemIds - the IDs of the items to retrieve
      Returns:
      a list of the items with the given IDs
      Throws:
      LibraryServiceException - if an unexpected error occurs
    • getItemsAsUser

      List<LibraryItem> getItemsAsUser(List<Guid> itemIds, UserName userName) throws LibraryServiceException
      Deprecated.
      Returns the items with the given IDs that the given user has read access to. Items that cannot be found are ignored.

      Authorization
      Access to this operation requires an access token that is issued for the "api.soap.impersonate" scope, in addition to the "api.soap.library-service" scope.

      Parameters:
      itemIds - the IDs of the items to retrieve
      userName - the name of the user to retrieve items for
      Returns:
      a list of the items with the given IDs
      Throws:
      LibraryServiceException - if an unexpected error occurs
    • searchItems

      List<LibraryItem> searchItems(String searchExpression, Guid locationId, int maxResults) throws LibraryServiceException
      Deprecated.
      Returns all items, up to the given limit, in the given location that matches the given search expression. Only items that the calling user has access to will be returned.
      Parameters:
      searchExpression - a library search expression
      locationId - the ID of a folder item in which to search (all subfolders will also be included) or null if the entire library should be searched
      maxResults - the maximum number of items to be returned or a number less than or equal to 0 if all matching items should be returned
      Returns:
      a (possibly) empty list of items in the given location matching the search expression
      Throws:
      LibraryServiceException - if an unexpected error occurs
    • searchItemsAsUser

      List<LibraryItem> searchItemsAsUser(String searchExpression, Guid locationId, int maxResults, UserName userName) throws LibraryServiceException
      Deprecated.
      Returns all items, up to the given limit, in the given location that matches the given search expression. Only items that the given user has access to will be returned.

      Authorization
      Access to this operation requires an access token that is issued for the "api.soap.impersonate" scope, in addition to the "api.soap.library-service" scope.

      Parameters:
      searchExpression - a library search expression
      locationId - the ID of a folder item in which to search (all subfolders will also be included) or null if the entire library should be searched
      maxResults - the maximum number of items to be returned or a number less than or equal to 0 if all matching items should be returned
      userName - the name of the user to search as
      Returns:
      a (possibly) empty list of items in the given location matching the search expression
      Throws:
      LibraryServiceException - if an unexpected error occurs
    • getItemTypes

      List<String> getItemTypes() throws LibraryServiceException
      Deprecated.
      Returns all item types. Each library item has one, and only one, item type which together with its parent and title uniquely identifies the item.

      Example of available types:

      • spotfire.folder - A folder
      • spotfire.dxp - A DXP file
      • spotfire.query - An information link
      • spotfire.filter - An Information Services filter
      • spotfire.join - An Information Services join
      • spotfire.datasource - An Information Services data source
      • spotfire.column - An Information Services column
      • spotfire.procedure - An Information Services procedure
      • spotfire.datafunction - A data function
      • spotfire.colorscheme - A color scheme
      • spotfire.dxpscript - A script
      • spotfire.sbdf - An sbdf file with data
      Returns:
      all item types
      Throws:
      LibraryServiceException - if an unexpected error occurs
    • createFolder

      LibraryItem createFolder(String title, String description, Guid parentId) throws LibraryServiceException
      Deprecated.
      Creates a new folder.
      Parameters:
      title - the title of the new folder, must not be null or an empty string and must not exceed 256 characters, it also cannot contain any of the following characters: \ / : * ? " < > |
      description - a description of the folder, may be null but must not exceed 1000 characters
      parentId - the ID of the parent item, or null if the item should be created directly under the root
      Returns:
      the newly created item
      Throws:
      LibraryServiceException - if the title or the description is invalid, if the parent item doesn't exists, if a folder with the same name in the same location already exists, if the calling user doesn't have write access to the location or if an unexpected error occurs
    • setTitle

      void setTitle(Guid itemId, String title) throws LibraryServiceException
      Deprecated.
      Sets the title of the given library item.
      Parameters:
      itemId - the ID of the library item to set the title for, must not be null
      title - the new title, must not be null or an empty string and must not exceed 256 characters, it also cannot contain any of the following characters: \ / : * ? " < > |
      Throws:
      LibraryServiceException - if the library item doesn't exist, if the title is invalid, if the calling user doesn't have write access to the item or if an unexpected error occurs
    • setDescription

      void setDescription(Guid itemId, String description) throws LibraryServiceException
      Deprecated.
      Sets the description of the given library item.
      Parameters:
      itemId - the ID of the library item to set the title for, must not be null
      description - the new description, must not exceed 1000 characters
      Throws:
      LibraryServiceException - if the library item doesn't exist, if the description is invalid, if the calling user doesn't have write access to the item or if an unexpected error occurs
    • setProperties

      void setProperties(Guid itemId, Collection<LibraryProperty> properties) throws LibraryServiceException
      Deprecated.
      Sets the properties of the given library item.
      Parameters:
      itemId - the ID of the library item to set the properties for, must not be null
      properties - the set of new properties, may be null or empty but each key must not be null or empty or exceed 150 characters, each value must not be null or empty
      Throws:
      LibraryServiceException - if the library item doesn't exist, if any property key exceeds 150 characters, if the calling user doesn't have write access to the item or if an unexpected error occurs
    • copyItems

      List<LibraryItem> copyItems(List<Guid> itemIds, Guid destinationFolderId, LibraryConflictResolution conflictResolution) throws LibraryServiceException
      Deprecated.
      Copies the given items to the given destination folder.
      Parameters:
      itemIds - the IDs of the library items to copy
      destinationFolderId - the ID of the destination folder, must not be null
      conflictResolution - the conflict resolution algorithm to use on any ID or path conflicts, must not be null
      Returns:
      the newly copied items
      Throws:
      LibraryServiceException - if the destination folder or any of the items to be copied doesn't exist, if the calling user doesn't have read access to any of the items or doesn't have write access to the destination folder, or if an unexpected error occurs
    • copyFolders

      List<String> copyFolders(List<String> folders, String destinationFolder, LibraryConflictResolution conflictResolution) throws LibraryServiceException
      Deprecated.
      Copies the given folders to the given destination folder. If the destination folder doesn't exist it will create it. This operation uses copyItems(List, Guid, LibraryConflictResolution) internally and is only provided for convenience.
      Parameters:
      folders - the paths of the library folders to copy
      destinationFolder - the path of the destination folder, must not be null.
      conflictResolution - the conflict resolution algorithm to use on any ID or path conflicts, must not be null
      Returns:
      the paths to the newly copied folders
      Throws:
      LibraryServiceException - if any of the items to be copied doesn't exist, if the calling user doesn't have read access to any of the folders or doesn't have write access to the destination folder, or if an unexpected error occurs
      Since:
      6.5.1
    • moveItems

      List<LibraryItem> moveItems(List<Guid> itemIds, Guid destinationFolderId, LibraryConflictResolution conflictResolution) throws LibraryServiceException
      Deprecated.
      Moves the given items to the given destination folder.
      Parameters:
      itemIds - the IDs of the library items to move
      destinationFolderId - the ID of the destination folder, must not be null
      conflictResolution - the conflict resolution algorithm to use on any ID or path conflicts, must not be null
      Returns:
      the newly moved items
      Throws:
      LibraryServiceException - if the destination folder or any of the items to be moved doesn't exist, if the calling user doesn't have read access to any of the items or doesn't have write access to the destination folder, or if an unexpected error occurs
    • removeItems

      void removeItems(List<Guid> itemIds) throws LibraryServiceException
      Deprecated.
      Removes the given items.
      Parameters:
      itemIds - the IDs of the items to remove
      Throws:
      LibraryServiceException - if the calling user doesn't have write access to any of the items or if an unexpected error occurs
    • pathToId

      Guid pathToId(String path, String type) throws LibraryServiceException
      Deprecated.
      Returns the ID of the item of the given type in the given location.
      Parameters:
      path - the location of the item, a path starts with a slash and each component is separated with a slash as well
      type - the type of the item
      Returns:
      the ID of an item or null if no such item exists
      Throws:
      LibraryServiceException - if an unexpected error occurs
    • idToPath

      String idToPath(Guid itemId) throws LibraryServiceException
      Deprecated.
      Returns the path to the given library item.
      Parameters:
      itemId - the ID of the library item, must not be null
      Returns:
      the path to the given library item
      Throws:
      LibraryServiceException - if the item doesn't exist, if the calling user doesn't have read access to the item or if an unexpected error occurs
    • getPermissions

      AclEntryCollection getPermissions(Guid itemId) throws LibraryServiceException
      Deprecated.
      Returns the effective permissions of the given library item.
      Parameters:
      itemId - the ID of the library item, must not be null
      Returns:
      the effective permissions of the given library item
      Throws:
      LibraryServiceException - if the item doesn't exist, if the calling user doesn't have read access to the item or if an unexpected error occurs
    • setPermissions

      void setPermissions(Guid itemId, AclEntryCollection aclEntryCollection) throws LibraryServiceException
      Deprecated.
      Sets the permissions on the given library item. If the list is empty the permissions on the item is effectively cleared and it will inherit its permissions instead.
      Parameters:
      itemId - the ID of the library item, must not be null
      aclEntryCollection - a collection of Access Control List (ACL) entries for the given item, each ACL entry must have a principal name and at least one permission
      Throws:
      LibraryServiceException - if the item doesn't exist, if the calling user doesn't have owner access to the item or if an unexpected error occurs
    • clearPermissions

      void clearPermissions(Guid itemId, boolean includeDescendants) throws LibraryServiceException
      Deprecated.
      Clears the permissions on the given library item (and possibly on all of its descendants) meaning that the item will inherit its permissions instead.
      Parameters:
      itemId - the ID of the library item, must not be null
      includeDescendants - true if the permissions on any descendants should be cleared as well, false otherwise
      Throws:
      LibraryServiceException - if the item doesn't exist, if the calling user doesn't have owner access to the item or if an unexpected error occurs