@Service
public class ContentService
extends java.lang.Object
ContentSubmissionService
should be used to modify content in most cases;Constructor and Description |
---|
ContentService() |
Modifier and Type | Method and Description |
---|---|
long |
count(org.springframework.data.mongodb.core.query.Query query) |
long |
countAssigned(org.springframework.data.mongodb.core.query.Query query) |
long |
countOwned(org.springframework.data.mongodb.core.query.Query query)
Gets the count of content matching the given query which are owned by the current user
|
org.springframework.data.domain.Page<Content> |
find(org.springframework.data.mongodb.core.query.Query query,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Page<Content> |
findAssigned(org.springframework.data.mongodb.core.query.Query query,
org.springframework.data.domain.Pageable pageable) |
java.util.Optional<Content> |
findById(java.lang.String s) |
org.springframework.data.domain.Page<Content> |
findMine(org.springframework.data.mongodb.core.query.Query query,
org.springframework.data.domain.Pageable pageable) |
Content |
getHistoricalVersion(java.lang.String id,
int version)
Gets a historical version
|
org.springframework.data.domain.Page<Content> |
getHistory(java.lang.String id,
org.springframework.data.domain.Pageable pageable)
Gets a page of history for a certain item.
|
Content |
revertToHistoricalVersion(java.lang.String id,
int version) |
public org.springframework.data.domain.Page<Content> getHistory(java.lang.String id, org.springframework.data.domain.Pageable pageable)
id
- - id of contentpageable
- - pagination informationpublic Content getHistoricalVersion(java.lang.String id, int version)
id
- - id of contentversion
- - version of content@Transactional public Content revertToHistoricalVersion(java.lang.String id, int version)
public java.util.Optional<Content> findById(java.lang.String s)
public org.springframework.data.domain.Page<Content> find(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.domain.Pageable pageable)
public org.springframework.data.domain.Page<Content> findAssigned(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.domain.Pageable pageable)
public org.springframework.data.domain.Page<Content> findMine(org.springframework.data.mongodb.core.query.Query query, org.springframework.data.domain.Pageable pageable)
public long count(org.springframework.data.mongodb.core.query.Query query)
public long countAssigned(org.springframework.data.mongodb.core.query.Query query)
public long countOwned(org.springframework.data.mongodb.core.query.Query query)
query
- a content quert