Interface DependencyServiceInternal

All Known Implementing Classes:
DependencyServiceInternalImpl

public interface DependencyServiceInternal
  • Method Details

    • getSoftDependencies

      Collection<String> getSoftDependencies(String site, List<String> paths) throws SiteNotFoundException, ServiceLayerException
      Get a soft dependencies of a list of items. A soft dependency is: * an edited, shared (not item specific) dependency
      Parameters:
      site - Site to operate on
      paths - List of paths to items to retrieve deps for
      Returns:
      list of soft dependencies
      Throws:
      SiteNotFoundException - Site doesn't exist
      ServiceLayerException - Internal error, see exception details
    • getHardDependencies

      List<String> getHardDependencies(String site, List<String> paths) throws SiteNotFoundException, ServiceLayerException
      Get a hard dependencies of a item. A hard dependency is: * Never-published item that this item depends on * Item-specific dependency that has been modified but not published
      Parameters:
      site - Site to operate on
      paths - List of paths to items to retrieve deps for
      Returns:
      list of hard dependencies
      Throws:
      SiteNotFoundException - Site doesn't exist
      ServiceLayerException - Internal error, see exception details
    • getDependentPaths

      List<String> getDependentPaths(String siteId, List<String> paths)
      Get list of paths of content items that are dependent on given paths
      Parameters:
      siteId - site identifier
      paths - list of paths to get dependent items for
      Returns:
      list of paths dependent on given paths
    • getDependentItems

      List<DependencyItem> getDependentItems(String siteId, String path)
      Get list of paths of content items that are dependent on given path
      Parameters:
      siteId - site identifier
      path - path to get dependent items for
      Returns:
      list of DependencyItem dependent on given path
    • getItemSpecificDependencies

      List<String> getItemSpecificDependencies(String siteId, String path)
      Get item specific dependencies for given path
      Parameters:
      siteId - site identifier
      path - path to get item specific dependencies for
      Returns:
      list of item specific dependencies
    • getItemSpecificDependencies

      List<String> getItemSpecificDependencies(String siteId, List<String> paths)
      Get item specific dependencies for given path
      Parameters:
      siteId - site identifier
      paths - path to get item specific dependencies for
      Returns:
      list of item specific dependencies
    • resolveDependencies

      Map<String,Set<DependencyResolver.ResolvedDependency>> resolveDependencies(String site, String sourcePath)
      Resolves dependent files for given content of given path
      Parameters:
      site - the site id
      sourcePath - the path to resolve dependencies for
      Returns:
      Map of ResolvedDependency's of files that content is dependent on by type
    • upsertDependencies

      void upsertDependencies(String site, String path) throws SiteNotFoundException, ContentNotFoundException, ServiceLayerException
      Scan item for direct dependencies and synchronize those to the dependencies database adding the new deps, updating existing, and removing what was removed from the item.
      Parameters:
      site - Site to operate on
      path - Path to item to scan
      Throws:
      SiteNotFoundException - Site doesn't exist
      ContentNotFoundException - Path doesn't exist
      ServiceLayerException - Internal error, see exception details
    • deleteItemDependencies

      void deleteItemDependencies(String site, String sourcePath) throws ServiceLayerException
      Delete the dependencies of sourcePath
      Parameters:
      site - the site id
      sourcePath - the source path of the dependencies to delete
      Throws:
      ServiceLayerException
    • invalidateDependencies

      void invalidateDependencies(String siteId, String targetPath) throws ServiceLayerException
      Mark as invalid the dependency records with the given target path
      Parameters:
      siteId - the site id
      targetPath - the target path of the dependencies to invalidate
      Throws:
      ServiceLayerException
    • validateDependencies

      void validateDependencies(String siteId, String targetPath) throws ServiceLayerException
      Mark as valid the dependency records with the given target path
      Parameters:
      siteId - the site id
      targetPath - the target path of the dependencies to validate
      Throws:
      ServiceLayerException
    • validateDependencies

      void validateDependencies(String siteId)
      Mark as valid/invalid all site dependencies depending on the existence of the target_path in the site
      Parameters:
      siteId - the site id
    • isValidDependencySource

      boolean isValidDependencySource(String siteId, String path)
      Indicate if the given path is a valid dependency source. e.g.: templates, pages, components Some files cannot have dependencies, like images or txt files
      Parameters:
      siteId - the site id
      path - the path to check
      Returns:
      true if the path is a valid dependency source, false otherwise