Class DependencyServiceImpl
java.lang.Object
org.craftercms.studio.impl.v1.service.dependency.DependencyServiceImpl
- All Implemented Interfaces:
DependencyService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentRepository
protected ContentService
protected DependencyMapper
protected DependencyServiceInternal
protected ItemDAO
protected RetryingDatabaseOperationFacade
protected ServicesConfig
protected 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 publishingvoid
deleteSiteDependencies
(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.void
setContentRepository
(ContentRepository contentRepository) void
setContentService
(ContentService contentService) void
setDependencyMapper
(DependencyMapper dependencyMapper) void
setDependencyService
(DependencyServiceInternal dependencyService) void
setItemDao
(ItemDAO itemDao) void
setRetryingDatabaseOperationFacade
(RetryingDatabaseOperationFacade retryingDatabaseOperationFacade) void
setServicesConfig
(ServicesConfig servicesConfig) void
setStudioConfiguration
(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:DependencyService
Get 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:
getPublishingDependencies
in 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:DependencyService
Get 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:
getPublishingDependencies
in 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:DependencyService
Get 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:
getItemSpecificDependencies
in 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:DependencyService
Get all item dependencies of an item.- Specified by:
getItemDependencies
in 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:DependencyService
Get all items that depend on this item.- Specified by:
getItemsDependingOn
in 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:DependencyService
Delete all dependencies from the database for a given site.- Specified by:
deleteSiteDependencies
in interfaceDependencyService
- Parameters:
site
- Site to operate on- Throws:
ServiceLayerException
- Internal error, see exception details
-
getDeleteDependencies
- Specified by:
getDeleteDependencies
in 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:
getDeleteDependencies
in 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:DependencyService
Calculate dependencies for publishing- Specified by:
calculateDependencies
in 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:DependencyService
Calculate dependencies paths for publishing- Specified by:
calculateDependenciesPaths
in 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)
-