Class DashboardServiceImpl
- java.lang.Object
-
- org.craftercms.studio.impl.v2.service.dashboard.DashboardServiceImpl
-
- All Implemented Interfaces:
DashboardService
public class DashboardServiceImpl extends Object implements DashboardService
-
-
Constructor Summary
Constructors Constructor Description DashboardServiceImpl(ActivityStreamServiceInternal activityStreamServiceInternal, PublishServiceInternal publishServiceInternal, ContentServiceInternal contentServiceInternal, SecurityService securityService, WorkflowServiceInternal workflowServiceInternal, ItemServiceInternal itemServiceInternal, SearchService searchService, StudioConfiguration studioConfiguration, SiteService siteService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Activity>
getActivitiesForUsers(String siteId, List<String> usernames, List<String> actions, ZonedDateTime dateFrom, ZonedDateTime dateTo, int offset, int limit)
Get activities for usersint
getActivitiesForUsersTotal(String siteId, List<String> usernames, List<String> actions, ZonedDateTime dateFrom, ZonedDateTime dateTo)
Get total number of result for activities of given usersExpiringContentResult
getContentExpired(String siteId, int offset, int limit)
Get content that expiredExpiringContentResult
getContentExpiring(String siteId, ZonedDateTime dateFrom, ZonedDateTime dateTo, int offset, int limit)
Get content that is expiringList<DetailedItem>
getContentPendingApproval(String siteId, int offset, int limit)
Get pending content for approvalList<SandboxItem>
getContentPendingApprovalDetail(String siteId, String publishingPackageId)
Get content pending approval package detailsint
getContentPendingApprovalTotal(String siteId)
Get total number of content packages pending approvalList<SandboxItem>
getContentUnpublished(String siteId, int offset, int limit)
Get unpublished content itemsint
getContentUnpublishedTotal(String siteId)
Get total number of unpublished contentList<Activity>
getMyActivities(String siteId, List<String> actions, ZonedDateTime dateFrom, ZonedDateTime dateTo, int offset, int limit)
Get my activitiesint
getMyActivitiesTotal(String siteId, List<String> actions, ZonedDateTime dateFrom, ZonedDateTime dateTo)
Get total number of result for my activitiesList<DashboardPublishingPackage>
getPublishingHistory(String siteId, String publishingTarget, String approver, ZonedDateTime dateFrom, ZonedDateTime dateTo, int offset, int limit)
Get publishing historyList<SandboxItem>
getPublishingHistoryDetail(String siteId, String publishingPackageId)
Get publishing package detailsint
getPublishingHistoryTotal(String siteId, String publishingTarget, String approver, ZonedDateTime dateFrom, ZonedDateTime dateTo)
Get total number of result for publishing history with given filtersList<DashboardPublishingPackage>
getPublishingScheduled(String siteId, String publishingTarget, ZonedDateTime dateFrom, ZonedDateTime dateTo, int offset, int limit)
Get publishing scheduledList<SandboxItem>
getPublishingScheduledDetail(String siteId, String publishingPackageId)
Get publishing package detailsint
getPublishingScheduledTotal(String siteId, String publishingTarget, ZonedDateTime dateFrom, ZonedDateTime dateTo)
Get total number of result for publishing scheduled with given filtersPublishingStats
getPublishingStats(String siteId, int days)
Get publishing stats for site for given time periodprotected void
prepareSearchParams(SearchParams searchParams, String query, String order, int offset, int limit)
protected ExpiringContentResult
processResults(SearchResult results)
-
-
-
Constructor Detail
-
DashboardServiceImpl
@ConstructorProperties({"activityStreamServiceInternal","publishServiceInternal","contentServiceInternal","securityService","workflowServiceInternal","itemServiceInternal","searchService","studioConfiguration","siteService"}) public DashboardServiceImpl(ActivityStreamServiceInternal activityStreamServiceInternal, PublishServiceInternal publishServiceInternal, ContentServiceInternal contentServiceInternal, SecurityService securityService, WorkflowServiceInternal workflowServiceInternal, ItemServiceInternal itemServiceInternal, SearchService searchService, StudioConfiguration studioConfiguration, SiteService siteService)
-
-
Method Detail
-
getActivitiesForUsersTotal
public int getActivitiesForUsersTotal(String siteId, List<String> usernames, List<String> actions, ZonedDateTime dateFrom, ZonedDateTime dateTo) throws SiteNotFoundException
Description copied from interface:DashboardService
Get total number of result for activities of given users- Specified by:
getActivitiesForUsersTotal
in interfaceDashboardService
- Parameters:
siteId
- site identifierusernames
- list of usernamesactions
- list of actions to filterdateFrom
- lower boundary to filter by date-time rangedateTo
- upper boundary to filter by date-time range- Returns:
- number of results
- Throws:
SiteNotFoundException
-
getActivitiesForUsers
public List<Activity> getActivitiesForUsers(String siteId, List<String> usernames, List<String> actions, ZonedDateTime dateFrom, ZonedDateTime dateTo, int offset, int limit) throws SiteNotFoundException
Description copied from interface:DashboardService
Get activities for users- Specified by:
getActivitiesForUsers
in interfaceDashboardService
- Parameters:
siteId
- site identifierusernames
- list of usernamesactions
- list of actions to filterdateFrom
- lower boundary to filter by date-time rangedateTo
- upper boundary to filter by date-time rangeoffset
- offset of the first result itemlimit
- number of results to return- Returns:
- the list of activities
- Throws:
SiteNotFoundException
-
getMyActivitiesTotal
public int getMyActivitiesTotal(String siteId, List<String> actions, ZonedDateTime dateFrom, ZonedDateTime dateTo) throws SiteNotFoundException
Description copied from interface:DashboardService
Get total number of result for my activities- Specified by:
getMyActivitiesTotal
in interfaceDashboardService
- Parameters:
siteId
- site identifieractions
- list of actions to filterdateFrom
- lower boundary to filter by date-time rangedateTo
- upper boundary to filter by date-time range- Returns:
- number of results
- Throws:
SiteNotFoundException
-
getMyActivities
public List<Activity> getMyActivities(String siteId, List<String> actions, ZonedDateTime dateFrom, ZonedDateTime dateTo, int offset, int limit) throws SiteNotFoundException
Description copied from interface:DashboardService
Get my activities- Specified by:
getMyActivities
in interfaceDashboardService
- Parameters:
siteId
- site identifieractions
- list of actions to filterdateFrom
- lower boundary to filter by date-time rangedateTo
- upper boundary to filter by date-time rangeoffset
- offset of the first result itemlimit
- number of results to return- Returns:
- the list of activities
- Throws:
SiteNotFoundException
-
getContentPendingApprovalTotal
public int getContentPendingApprovalTotal(String siteId) throws SiteNotFoundException
Description copied from interface:DashboardService
Get total number of content packages pending approval- Specified by:
getContentPendingApprovalTotal
in interfaceDashboardService
- Parameters:
siteId
- site identifier- Returns:
- number of results to return
- Throws:
SiteNotFoundException
-
getContentPendingApproval
public List<DetailedItem> getContentPendingApproval(String siteId, int offset, int limit) throws ServiceLayerException, UserNotFoundException
Description copied from interface:DashboardService
Get pending content for approval- Specified by:
getContentPendingApproval
in interfaceDashboardService
- Returns:
- list of DetailedItem waiting for approval
- Throws:
ServiceLayerException
UserNotFoundException
-
getContentPendingApprovalDetail
public List<SandboxItem> getContentPendingApprovalDetail(String siteId, String publishingPackageId) throws UserNotFoundException, ServiceLayerException
Description copied from interface:DashboardService
Get content pending approval package details- Specified by:
getContentPendingApprovalDetail
in interfaceDashboardService
- Parameters:
siteId
- site identifierpublishingPackageId
- publishing package identifier- Returns:
- list of sandbox items included in given package
- Throws:
UserNotFoundException
ServiceLayerException
-
getContentUnpublishedTotal
public int getContentUnpublishedTotal(String siteId) throws SiteNotFoundException
Description copied from interface:DashboardService
Get total number of unpublished content- Specified by:
getContentUnpublishedTotal
in interfaceDashboardService
- Parameters:
siteId
- site identifier- Returns:
- number of results to return
- Throws:
SiteNotFoundException
-
getContentUnpublished
public List<SandboxItem> getContentUnpublished(String siteId, int offset, int limit) throws UserNotFoundException, ServiceLayerException
Description copied from interface:DashboardService
Get unpublished content items- Specified by:
getContentUnpublished
in interfaceDashboardService
- Returns:
- Throws:
UserNotFoundException
ServiceLayerException
-
prepareSearchParams
protected void prepareSearchParams(SearchParams searchParams, String query, String order, int offset, int limit)
-
getContentExpiring
public ExpiringContentResult getContentExpiring(String siteId, ZonedDateTime dateFrom, ZonedDateTime dateTo, int offset, int limit) throws AuthenticationException, ServiceLayerException
Description copied from interface:DashboardService
Get content that is expiring- Specified by:
getContentExpiring
in interfaceDashboardService
- Parameters:
siteId
- site identifierdateFrom
- lower boundary to filter by date-time rangedateTo
- upper boundary to filter by date-time rangeoffset
- offset of the first result itemlimit
- number of results to return- Returns:
- list of content items that is expiring
- Throws:
AuthenticationException
ServiceLayerException
-
getContentExpired
public ExpiringContentResult getContentExpired(String siteId, int offset, int limit) throws AuthenticationException, ServiceLayerException
Description copied from interface:DashboardService
Get content that expired- Specified by:
getContentExpired
in interfaceDashboardService
- Parameters:
siteId
- site identifieroffset
- offset of the first result itemlimit
- number of results to return- Returns:
- list of content items that expired
- Throws:
AuthenticationException
ServiceLayerException
-
processResults
protected ExpiringContentResult processResults(SearchResult results)
-
getPublishingScheduledTotal
public int getPublishingScheduledTotal(String siteId, String publishingTarget, ZonedDateTime dateFrom, ZonedDateTime dateTo) throws SiteNotFoundException
Description copied from interface:DashboardService
Get total number of result for publishing scheduled with given filters- Specified by:
getPublishingScheduledTotal
in interfaceDashboardService
- Parameters:
siteId
- site identifierpublishingTarget
- publishing target to filter bydateFrom
- lower boundary to filter by date-time rangedateTo
- upper boundary to filter by date-time range- Returns:
- number of results
- Throws:
SiteNotFoundException
-
getPublishingScheduled
public List<DashboardPublishingPackage> getPublishingScheduled(String siteId, String publishingTarget, ZonedDateTime dateFrom, ZonedDateTime dateTo, int offset, int limit) throws SiteNotFoundException
Description copied from interface:DashboardService
Get publishing scheduled- Specified by:
getPublishingScheduled
in interfaceDashboardService
- Parameters:
siteId
- site identifierpublishingTarget
- publishing target to filter bydateFrom
- lower boundary to filter by date-time rangedateTo
- upper boundary to filter by date-time rangeoffset
- offset of the first result itemlimit
- number of results to return- Returns:
- Throws:
SiteNotFoundException
-
getPublishingScheduledDetail
public List<SandboxItem> getPublishingScheduledDetail(String siteId, String publishingPackageId) throws UserNotFoundException, ServiceLayerException
Description copied from interface:DashboardService
Get publishing package details- Specified by:
getPublishingScheduledDetail
in interfaceDashboardService
- Parameters:
siteId
- site identifierpublishingPackageId
- publishing package identifier- Returns:
- list of sandbox items included in given package
- Throws:
UserNotFoundException
ServiceLayerException
-
getPublishingHistoryTotal
public int getPublishingHistoryTotal(String siteId, String publishingTarget, String approver, ZonedDateTime dateFrom, ZonedDateTime dateTo) throws SiteNotFoundException
Description copied from interface:DashboardService
Get total number of result for publishing history with given filters- Specified by:
getPublishingHistoryTotal
in interfaceDashboardService
- Parameters:
siteId
- site identifierpublishingTarget
- publishing target to filter byapprover
- approver user to filter bydateFrom
- lower boundary to filter by date-time rangedateTo
- upper boundary to filter by date-time range- Returns:
- number of results
- Throws:
SiteNotFoundException
-
getPublishingHistory
public List<DashboardPublishingPackage> getPublishingHistory(String siteId, String publishingTarget, String approver, ZonedDateTime dateFrom, ZonedDateTime dateTo, int offset, int limit) throws SiteNotFoundException
Description copied from interface:DashboardService
Get publishing history- Specified by:
getPublishingHistory
in interfaceDashboardService
- Parameters:
siteId
- site identifierpublishingTarget
- publishing target to filter byapprover
- approver user to filter bydateFrom
- lower boundary to filter by date-time rangedateTo
- upper boundary to filter by date-time rangeoffset
- offset of the first result itemlimit
- number of results to return- Returns:
- Throws:
SiteNotFoundException
-
getPublishingHistoryDetail
public List<SandboxItem> getPublishingHistoryDetail(String siteId, String publishingPackageId) throws UserNotFoundException, ServiceLayerException
Description copied from interface:DashboardService
Get publishing package details- Specified by:
getPublishingHistoryDetail
in interfaceDashboardService
- Parameters:
siteId
- site identifierpublishingPackageId
- publishing package identifier- Returns:
- list of sandbox items included in given package
- Throws:
UserNotFoundException
ServiceLayerException
-
getPublishingStats
public PublishingStats getPublishingStats(String siteId, int days) throws SiteNotFoundException
Description copied from interface:DashboardService
Get publishing stats for site for given time period- Specified by:
getPublishingStats
in interfaceDashboardService
- Parameters:
siteId
- site identifierdays
- number of days- Returns:
- publishing stats
- Throws:
SiteNotFoundException
-
-