Interface DependencyServiceInternal
- All Known Implementing Classes:
DependencyServiceInternalImpl
public interface DependencyServiceInternal
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteItemDependencies(String site, String sourcePath) Delete the dependencies of sourcePathgetDependentItems(String siteId, String path) Get list of paths of content items that are dependent on given pathgetDependentPaths(String siteId, List<String> paths) Get list of paths of content items that are dependent on given pathsgetHardDependencies(String site, List<String> paths) Get a hard dependencies of a item.getItemSpecificDependencies(String siteId, String path) Get item specific dependencies for given pathgetItemSpecificDependencies(String siteId, List<String> paths) Get item specific dependencies for given pathgetSoftDependencies(String site, List<String> paths) Get a soft dependencies of a list of items.voidinvalidateDependencies(String siteId, String targetPath) Mark as invalid the dependency records with the given target pathbooleanisValidDependencySource(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 filesresolveDependencies(String site, String sourcePath) Resolves dependent files for given content of given pathvoidupsertDependencies(String site, String path) 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.voidvalidateDependencies(String siteId) Mark as valid/invalid all site dependencies depending on the existence of the target_path in the sitevoidvalidateDependencies(String siteId, String targetPath) Mark as valid the dependency records with the given target path
-
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 onpaths- List of paths to items to retrieve deps for- Returns:
- list of soft dependencies
- Throws:
SiteNotFoundException- Site doesn't existServiceLayerException- 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 onpaths- List of paths to items to retrieve deps for- Returns:
- list of hard dependencies
- Throws:
SiteNotFoundException- Site doesn't existServiceLayerException- Internal error, see exception details
-
getDependentPaths
Get list of paths of content items that are dependent on given paths- Parameters:
siteId- site identifierpaths- list of paths to get dependent items for- Returns:
- list of paths dependent on given paths
-
getDependentItems
Get list of paths of content items that are dependent on given path- Parameters:
siteId- site identifierpath- path to get dependent items for- Returns:
- list of
DependencyItemdependent on given path
-
getItemSpecificDependencies
Get item specific dependencies for given path- Parameters:
siteId- site identifierpath- path to get item specific dependencies for- Returns:
- list of item specific dependencies
-
getItemSpecificDependencies
Get item specific dependencies for given path- Parameters:
siteId- site identifierpaths- 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 idsourcePath- 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 onpath- Path to item to scan- Throws:
SiteNotFoundException- Site doesn't existContentNotFoundException- Path doesn't existServiceLayerException- Internal error, see exception details
-
deleteItemDependencies
Delete the dependencies of sourcePath- Parameters:
site- the site idsourcePath- the source path of the dependencies to delete- Throws:
ServiceLayerException
-
invalidateDependencies
Mark as invalid the dependency records with the given target path- Parameters:
siteId- the site idtargetPath- the target path of the dependencies to invalidate- Throws:
ServiceLayerException
-
validateDependencies
Mark as valid the dependency records with the given target path- Parameters:
siteId- the site idtargetPath- the target path of the dependencies to validate- Throws:
ServiceLayerException
-
validateDependencies
Mark as valid/invalid all site dependencies depending on the existence of the target_path in the site- Parameters:
siteId- the site id
-
isValidDependencySource
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 idpath- the path to check- Returns:
- true if the path is a valid dependency source, false otherwise
-