Class PublishServiceImpl
- java.lang.Object
-
- org.craftercms.studio.impl.v2.service.publish.PublishServiceImpl
-
- All Implemented Interfaces:
PublishService
public class PublishServiceImpl extends Object implements PublishService
-
-
Constructor Summary
Constructors Constructor Description PublishServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelPublishingPackages(String siteId, List<String> packageIds)
Cancel publishing packagesAuditServiceInternal
getAuditServiceInternal()
List<PublishingTarget>
getAvailablePublishingTargets(String siteId)
Get available publishing targets for given siteList<DeploymentHistoryGroup>
getDeploymentHistory(String siteId, int daysFromToday, int numberOfItems, String filterType)
Get deployment historyItemServiceInternal
getItemServiceInternal()
List<PublishingDashboardItem>
getPublishingHistory(String siteId, String environment, String path, String publisher, ZonedDateTime dateFrom, ZonedDateTime dateTo, String contentType, long state, String sortBy, String order, int offset, int limit)
Get deployment history items for given search parametersint
getPublishingHistoryTotal(String siteId, String environment, String path, String publisher, ZonedDateTime dateFrom, ZonedDateTime dateTo, String contentType, long state)
Get total number of publishing history items for given search parametersPublishingPackageDetails
getPublishingPackageDetails(String siteId, String packageId)
Get publishing package detailsList<PublishingPackage>
getPublishingPackages(String siteId, String environment, String path, List<String> states, int offset, int limit)
Get publishing packages for given search parametersint
getPublishingPackagesTotal(String siteId, String environment, String path, List<String> states)
Get total number of publishing packages for given search parametersPublishServiceInternal
getPublishServiceInternal()
SecurityService
getSecurityService()
ServicesConfig
getServicesConfig()
SiteService
getSiteService()
StudioUtils
getStudioUtils()
boolean
isSitePublished(String siteId)
Check if site has ever been published.void
setAuditServiceInternal(AuditServiceInternal auditServiceInternal)
void
setItemServiceInternal(ItemServiceInternal itemServiceInternal)
void
setPublishServiceInternal(PublishServiceInternal publishServiceInternal)
void
setSecurityService(SecurityService securityService)
void
setServicesConfig(ServicesConfig servicesConfig)
void
setSiteService(SiteService siteService)
void
setStudioUtils(StudioUtils studioUtils)
-
-
-
Method Detail
-
getPublishingPackagesTotal
public int getPublishingPackagesTotal(String siteId, String environment, String path, List<String> states) throws SiteNotFoundException
Description copied from interface:PublishService
Get total number of publishing packages for given search parameters- Specified by:
getPublishingPackagesTotal
in interfacePublishService
- Parameters:
siteId
- site identifierenvironment
- publishing environmentpath
- regular expression for pathsstates
- publishing package states- Returns:
- total number of publishing packages
- Throws:
SiteNotFoundException
- site not found
-
getPublishingPackages
public List<PublishingPackage> getPublishingPackages(String siteId, String environment, String path, List<String> states, int offset, int limit) throws SiteNotFoundException
Description copied from interface:PublishService
Get publishing packages for given search parameters- Specified by:
getPublishingPackages
in interfacePublishService
- Parameters:
siteId
- site identifierenvironment
- publishing environmentpath
- regular expression for pathsstates
- publishing package statesoffset
- offset for paginationlimit
- limit for pagination- Returns:
- list of publishing packages
- Throws:
SiteNotFoundException
- site not found
-
getPublishingPackageDetails
public PublishingPackageDetails getPublishingPackageDetails(String siteId, String packageId) throws SiteNotFoundException
Description copied from interface:PublishService
Get publishing package details- Specified by:
getPublishingPackageDetails
in interfacePublishService
- Parameters:
siteId
- site identifierpackageId
- package identifier- Returns:
- publishing package details
- Throws:
SiteNotFoundException
- site not found
-
cancelPublishingPackages
public void cancelPublishingPackages(String siteId, List<String> packageIds) throws SiteNotFoundException
Description copied from interface:PublishService
Cancel publishing packages- Specified by:
cancelPublishingPackages
in interfacePublishService
- Parameters:
siteId
- site identifierpackageIds
- list of package identifiers- Throws:
SiteNotFoundException
- site not found
-
getPublishingHistoryTotal
public int getPublishingHistoryTotal(String siteId, String environment, String path, String publisher, ZonedDateTime dateFrom, ZonedDateTime dateTo, String contentType, long state)
Description copied from interface:PublishService
Get total number of publishing history items for given search parameters- Specified by:
getPublishingHistoryTotal
in interfacePublishService
- Parameters:
siteId
- site identifierenvironment
- environment to get publishing historypath
- regular expression to filter pathspublisher
- filter publishing history for specified userdateFrom
- lower boundary for date rangedateTo
- upper boundary for date rangecontentType
- publishing history for specified content typestate
- filter items by their state- Returns:
- total number of deployment history items
-
getPublishingHistory
public List<PublishingDashboardItem> getPublishingHistory(String siteId, String environment, String path, String publisher, ZonedDateTime dateFrom, ZonedDateTime dateTo, String contentType, long state, String sortBy, String order, int offset, int limit)
Description copied from interface:PublishService
Get deployment history items for given search parameters- Specified by:
getPublishingHistory
in interfacePublishService
- Parameters:
siteId
- site identifierenvironment
- environment to get publishing historypath
- regular expression to filter pathspublisher
- filter publishing history for specified userdateFrom
- lower boundary for date rangedateTo
- upper boundary for date rangecontentType
- publishing history for specified content typestate
- filter items by their statesortBy
- sort publishing historyorder
- apply order to publishing historyoffset
- offset of the first item in the result setlimit
- number of items to return- Returns:
- total number of publishing packages
-
getDeploymentHistory
public List<DeploymentHistoryGroup> getDeploymentHistory(String siteId, int daysFromToday, int numberOfItems, String filterType)
Description copied from interface:PublishService
Get deployment history- Specified by:
getDeploymentHistory
in interfacePublishService
- Parameters:
siteId
- site identifierdaysFromToday
- number of days for historynumberOfItems
- number of items to displayfilterType
- filter results by filter type- Returns:
-
getAvailablePublishingTargets
public List<PublishingTarget> getAvailablePublishingTargets(String siteId)
Description copied from interface:PublishService
Get available publishing targets for given site- Specified by:
getAvailablePublishingTargets
in interfacePublishService
- Parameters:
siteId
- site identifier- Returns:
- list of available publishing targets
-
isSitePublished
public boolean isSitePublished(String siteId)
Description copied from interface:PublishService
Check if site has ever been published.- Specified by:
isSitePublished
in interfacePublishService
- Parameters:
siteId
- site identifier- Returns:
- true if site has been published at least once, otherwise false
-
getPublishServiceInternal
public PublishServiceInternal getPublishServiceInternal()
-
setPublishServiceInternal
public void setPublishServiceInternal(PublishServiceInternal publishServiceInternal)
-
getSiteService
public SiteService getSiteService()
-
setSiteService
public void setSiteService(SiteService siteService)
-
getAuditServiceInternal
public AuditServiceInternal getAuditServiceInternal()
-
setAuditServiceInternal
public void setAuditServiceInternal(AuditServiceInternal auditServiceInternal)
-
getSecurityService
public SecurityService getSecurityService()
-
setSecurityService
public void setSecurityService(SecurityService securityService)
-
getItemServiceInternal
public ItemServiceInternal getItemServiceInternal()
-
setItemServiceInternal
public void setItemServiceInternal(ItemServiceInternal itemServiceInternal)
-
getStudioUtils
public StudioUtils getStudioUtils()
-
setStudioUtils
public void setStudioUtils(StudioUtils studioUtils)
-
getServicesConfig
public ServicesConfig getServicesConfig()
-
setServicesConfig
public void setServicesConfig(ServicesConfig servicesConfig)
-
-