Class PublicationCriteria
- java.lang.Object
-
- org.silverpeas.core.contribution.publication.dao.PublicationCriteria
-
public class PublicationCriteria extends Object
Class that permits to set publication search criteria for publication services.- Author:
- silveryocha
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PublicationCriteria.QUERY_ORDER_BY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PublicationCriteria
excludingNodes(String... nodeIds)
Sets the criteria of component node ids.PublicationCriteria
excludingNodes(Collection<String> nodeIds)
Sets the criteria of component node ids.static PublicationCriteria
excludingTrashNodeOnComponentInstanceIds(String... componentInstanceIds)
Additionally filter on the trash node.static PublicationCriteria
excludingTrashNodeOnComponentInstanceIds(Collection<String> componentInstanceIds)
Additionally filter on the trash node.List<String>
getComponentInstanceIds()
PaginationPage
getPagination()
boolean
isAliasesTakenIntoAccount()
PublicationCriteria
lastUpdatedSince(OffsetDateTime lastUpdatedSince)
The local date from which the publication have been updated.PublicationCriteria
limitTo(int limit)
Limit to a given number of result.PublicationCriteria
mustHaveAtLeastOneNodeFather()
Indicates that the publication MUST be linked to a node.PublicationCriteria
nonVisibleAt(OffsetDateTime invisibilityDate)
The local date from which the publication are not visible.PublicationCriteria
ofStatus(String... statuses)
Sets the criteria of component node ids.static PublicationCriteria
onAllComponentInstances()
Initializes the criteria.static PublicationCriteria
onComponentInstanceIds(String... componentInstanceIds)
Initializes the criteria with component instance ids.static PublicationCriteria
onComponentInstanceIds(Collection<String> componentInstanceIds)
Initializes the criteria with component instance ids.PublicationCriteria
onNodes(String... nodeIds)
Sets the criteria of component node ids.PublicationCriteria
onNodes(Collection<String> nodeIds)
Sets the criteria of component node ids.PublicationCriteria
orderBy(PublicationCriteria.QUERY_ORDER_BY... orderBies)
Configures the order of the user notification list.PublicationCriteria
orderByDescendingBeginDate()
Configures the order by begin date.PublicationCriteria
orderByDescendingLastUpdateDate()
Configures the order by begin date.PublicationCriteria
paginateBy(PaginationPage pagination)
Sets the criteria of pagination.PublicationCriteria
takingAliasesIntoAccount()
Indicates that publications can be retrieved from the aliases data.String
toString()
PublicationCriteria
visibleAt(OffsetDateTime visibilityDate)
The local date from which the publication are visible.
-
-
-
Method Detail
-
onAllComponentInstances
public static PublicationCriteria onAllComponentInstances()
Initializes the criteria.Please be careful against performances...
- Returns:
- an instance of criteria.
-
onComponentInstanceIds
public static PublicationCriteria onComponentInstanceIds(String... componentInstanceIds)
Initializes the criteria with component instance ids.By security, if no ids are given, the service using the criteria will return directly an empty list instead of performing the sql query.
- Parameters:
componentInstanceIds
- identifiers of component instances.- Returns:
- an instance of criteria.
-
onComponentInstanceIds
public static PublicationCriteria onComponentInstanceIds(Collection<String> componentInstanceIds)
Initializes the criteria with component instance ids.By security, if no ids are given, the service using the criteria will return directly an empty list instead of performing the sql query.
- Parameters:
componentInstanceIds
- identifiers of component instances.- Returns:
- an instance of criteria.
-
excludingTrashNodeOnComponentInstanceIds
public static PublicationCriteria excludingTrashNodeOnComponentInstanceIds(String... componentInstanceIds)
Additionally filter on the trash node.
-
excludingTrashNodeOnComponentInstanceIds
public static PublicationCriteria excludingTrashNodeOnComponentInstanceIds(Collection<String> componentInstanceIds)
Additionally filter on the trash node.
-
ofStatus
public PublicationCriteria ofStatus(String... statuses)
Sets the criteria of component node ids.- Parameters:
statuses
- statuses of publications.- Returns:
- itself.
-
mustHaveAtLeastOneNodeFather
public PublicationCriteria mustHaveAtLeastOneNodeFather()
Indicates that the publication MUST be linked to a node.- Returns:
- itself.
-
takingAliasesIntoAccount
public PublicationCriteria takingAliasesIntoAccount()
Indicates that publications can be retrieved from the aliases data.- Returns:
- itself.
-
onNodes
public PublicationCriteria onNodes(String... nodeIds)
Sets the criteria of component node ids.- Parameters:
nodeIds
- identifiers of nodes.- Returns:
- itself.
-
onNodes
public PublicationCriteria onNodes(Collection<String> nodeIds)
Sets the criteria of component node ids.- Parameters:
nodeIds
- identifiers of nodes.- Returns:
- itself.
-
excludingNodes
public PublicationCriteria excludingNodes(String... nodeIds)
Sets the criteria of component node ids.- Parameters:
nodeIds
- identifiers of nodes.- Returns:
- itself.
-
excludingNodes
public PublicationCriteria excludingNodes(Collection<String> nodeIds)
Sets the criteria of component node ids.- Parameters:
nodeIds
- identifiers of nodes.- Returns:
- itself.
-
visibleAt
public PublicationCriteria visibleAt(OffsetDateTime visibilityDate)
The local date from which the publication are visible.- Parameters:
visibilityDate
- a local date.- Returns:
- itself.
-
nonVisibleAt
public PublicationCriteria nonVisibleAt(OffsetDateTime invisibilityDate)
The local date from which the publication are not visible.- Parameters:
invisibilityDate
- a local date.- Returns:
- itself.
-
lastUpdatedSince
public PublicationCriteria lastUpdatedSince(OffsetDateTime lastUpdatedSince)
The local date from which the publication have been updated.- Parameters:
lastUpdatedSince
- a local date.- Returns:
- itself.
-
limitTo
public PublicationCriteria limitTo(int limit)
Limit to a given number of result.- Parameters:
limit
- a number of result (<= 0 means no limit).- Returns:
- itself.
-
paginateBy
public PublicationCriteria paginateBy(PaginationPage pagination)
Sets the criteria of pagination.- Parameters:
pagination
- the pagination.- Returns:
- itself.
-
orderByDescendingBeginDate
public PublicationCriteria orderByDescendingBeginDate()
Configures the order by begin date.- Returns:
- itself.
-
orderByDescendingLastUpdateDate
public PublicationCriteria orderByDescendingLastUpdateDate()
Configures the order by begin date.- Returns:
- itself.
-
orderBy
public PublicationCriteria orderBy(PublicationCriteria.QUERY_ORDER_BY... orderBies)
Configures the order of the user notification list.- Parameters:
orderBies
- the list of order by directives.- Returns:
- itself.
-
isAliasesTakenIntoAccount
public boolean isAliasesTakenIntoAccount()
-
getPagination
public PaginationPage getPagination()
-
-