Class DependencyServiceImpl
java.lang.Object
org.craftercms.studio.impl.v1.service.dependency.DependencyServiceImpl
- All Implemented Interfaces:
DependencyService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentRepositoryprotected ContentServiceprotected DependencyMapperprotected DependencyServiceInternalprotected ItemDAOprotected RetryingDatabaseOperationFacadeprotected ServicesConfigprotected StudioConfiguration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateDependencies(String site, List<String> paths) Calculate dependencies for publishingcalculateDependenciesPaths(String site, List<String> paths) Calculate dependencies paths for publishingvoiddeleteSiteDependencies(String site) Delete all dependencies from the database for a given site.getDeleteDependencies(String site, String path) getDeleteDependencies(String site, List<String> paths) getItemDependencies(String site, String path, int depth) Get all item dependencies of an item.getItemsDependingOn(String site, String path, int depth) Get all items that depend on this item.getItemSpecificDependencies(String site, String path, int depth) Get item-specific dependencies of an item.getPublishingDependencies(String site, String path) Get a all publishing dependencies of a list of items.getPublishingDependencies(String site, List<String> paths) Get a all publishing dependencies of a list of items.voidsetContentRepository(ContentRepository contentRepository) voidsetContentService(ContentService contentService) voidsetDependencyMapper(DependencyMapper dependencyMapper) voidsetDependencyService(DependencyServiceInternal dependencyService) voidsetItemDao(ItemDAO itemDao) voidsetRetryingDatabaseOperationFacade(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade) voidsetServicesConfig(ServicesConfig servicesConfig) voidsetStudioConfiguration(StudioConfiguration studioConfiguration)
-
Field Details
-
dependencyMapper
-
studioConfiguration
-
contentService
-
contentRepository
-
servicesConfig
-
dependencyService
-
itemDao
-
retryingDatabaseOperationFacade
-
-
Constructor Details
-
DependencyServiceImpl
public DependencyServiceImpl()
-
-
Method Details
-
getPublishingDependencies
public List<String> getPublishingDependencies(String site, String path) throws ServiceLayerException Description copied from interface:DependencyServiceGet a all publishing dependencies of a list of items. A publishing dependency is: * Never-published item that this item depends on * Item-specific dependency that has been modified but not published- Specified by:
getPublishingDependenciesin interfaceDependencyService- Parameters:
site- Site to operate onpath- Paths to item to retrieve deps for- Returns:
- list of mandatory dependencies paths for publishing
- Throws:
ServiceLayerException- Internal error, see exception details
-
getPublishingDependencies
public List<String> getPublishingDependencies(String site, List<String> paths) throws ServiceLayerException Description copied from interface:DependencyServiceGet a all publishing dependencies of a list of items. A publishing dependency is: * Never-published item that this item depends on * Item-specific dependency that has been modified but not published- Specified by:
getPublishingDependenciesin interfaceDependencyService- Parameters:
site- Site to operate onpaths- List of paths to items to retrieve deps for- Returns:
- list of mandatory dependencies paths for publishing
- Throws:
ServiceLayerException- Internal error, see exception details
-
getItemSpecificDependencies
public Set<String> getItemSpecificDependencies(String site, String path, int depth) throws ServiceLayerException Description copied from interface:DependencyServiceGet item-specific dependencies of an item. An item-specific dependency is: * Only referenced by the parent item * Sits in a special path pattern defined during content modeling- Specified by:
getItemSpecificDependenciesin interfaceDependencyService- Parameters:
site- Site to operate onpath- Path to items to retrieve deps fordepth- Depth of tree to traverse. Depth of -1 disables depth limits- Returns:
- set of hard dependencies
- Throws:
ServiceLayerException- Internal error, see exception details
-
getItemDependencies
public Set<String> getItemDependencies(String site, String path, int depth) throws ServiceLayerException Description copied from interface:DependencyServiceGet all item dependencies of an item.- Specified by:
getItemDependenciesin interfaceDependencyService- Parameters:
site- Site to operate onpath- Path to items to retrieve deps fordepth- Depth of tree to traverse. Depth of -1 disables depth limits- Returns:
- set of items that given item depends on
- Throws:
ServiceLayerException- Internal error, see exception details
-
getItemsDependingOn
public Set<String> getItemsDependingOn(String site, String path, int depth) throws ServiceLayerException Description copied from interface:DependencyServiceGet all items that depend on this item.- Specified by:
getItemsDependingOnin interfaceDependencyService- Parameters:
site- Site to operate onpath- Path to items to retrieve deps fordepth- Depth of tree to traverse. Depth of -1 disables depth limits- Returns:
- set of items depending on given item path
- Throws:
ServiceLayerException- Internal error, see exception details
-
deleteSiteDependencies
Description copied from interface:DependencyServiceDelete all dependencies from the database for a given site.- Specified by:
deleteSiteDependenciesin interfaceDependencyService- Parameters:
site- Site to operate on- Throws:
ServiceLayerException- Internal error, see exception details
-
getDeleteDependencies
- Specified by:
getDeleteDependenciesin interfaceDependencyService- Parameters:
site- Site to operate onpath- Path to item to retrieve delete dependencies for- Returns:
- Set of paths included as delete dependencies
- Throws:
ServiceLayerException- Internal error
-
getDeleteDependencies
public Set<String> getDeleteDependencies(String site, List<String> paths) throws ServiceLayerException - Specified by:
getDeleteDependenciesin interfaceDependencyService- Parameters:
site- Site to operate onpaths- Paths to items to retrieve delete dependencies for- Returns:
- Set of paths included as delete dependencies
- Throws:
ServiceLayerException- Internal error
-
getItemSpecificDependenciesPatterns
-
calculateDependencies
public Map<String,List<CalculateDependenciesEntityTO>> calculateDependencies(String site, List<String> paths) throws ServiceLayerException Description copied from interface:DependencyServiceCalculate dependencies for publishing- Specified by:
calculateDependenciesin interfaceDependencyService- Parameters:
site- Site to operate onpaths- List of items to calculate dependencies for- Returns:
- Formatted result set
- Throws:
ServiceLayerException- general service error
-
calculateDependenciesPaths
public Set<String> calculateDependenciesPaths(String site, List<String> paths) throws ServiceLayerException Description copied from interface:DependencyServiceCalculate dependencies paths for publishing- Specified by:
calculateDependenciesPathsin interfaceDependencyService- Parameters:
site- site to usepaths- list of items to calculate dependencies for- Returns:
- dependencies paths
- Throws:
ServiceLayerException- general service error
-
getStudioConfiguration
-
setStudioConfiguration
-
getContentService
-
setContentService
-
setContentRepository
-
setServicesConfig
-
setDependencyMapper
-
setDependencyService
-
setItemDao
-
setRetryingDatabaseOperationFacade
public void setRetryingDatabaseOperationFacade(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade)
-