|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.gallery.model.MediaCriteria
public class MediaCriteria
Class that permits to set media search criteria for media application.
Nested Class Summary | |
---|---|
static class |
MediaCriteria.QUERY_ORDER_BY
|
static class |
MediaCriteria.VISIBILITY
|
Method Summary | |
---|---|
MediaCriteria |
albumIdentifierIsOneOf(String... albumIds)
Sets the list of media album identifiers criterion to find media which are attached to one of the given ones. |
MediaCriteria |
createdBy(com.stratelia.webactiv.beans.admin.UserDetail user)
Sets the creator criterion to find media created by the given user. |
static MediaCriteria |
fromComponentInstanceId(String componentInstanceId)
Initializes media search criteria axed on the given media component instance id. |
static MediaCriteria |
fromMediaId(String mediaId)
Initializes media search criteria axed on the given media identifier. |
static MediaCriteria |
fromNbDaysBeforeThatMediaIsNotVisible(Integer nbDaysBeforeThatMediaIsNotVisible)
Initializes media search criteria axed on the given nb of days before that a media is not visible. |
String |
getComponentInstanceId()
Gets the indetifier of media instance. |
Integer |
getNbDaysBeforeThatMediaIsNotVisible()
Gets the criterion of the nb of days before that a media is not visible. |
int |
getResultLimit()
Gets the maximum number of media in a result list. |
MediaCriteria |
identifierIsOneOf(String... identifiers)
Sets the identifiers criterion to find the medias with an identifier equals to one of the specified ones. |
MediaCriteria |
limitResultTo(int nbMedia)
Limit the number of results. |
MediaCriteria |
mediaTypeIsOneOf(MediaType... mediaTypes)
Sets the list of media type criterion to find media which have their type equals to one of the given ones. |
MediaCriteria |
onComponentInstanceId(String componentInstanceId)
Sets the criterion of the identifier of the component instance the media must be attached. |
MediaCriteria |
orderedBy(MediaCriteria.QUERY_ORDER_BY... orderBies)
Configures the order of the media list. |
void |
processWith(MediaCriteriaProcessor processor)
Processes this criteria with the specified processor. |
MediaCriteria |
referenceDateOf(Date referenceDate)
Sets the reference date criterion (the date of the day by default). |
MediaCriteria |
setRequester(com.stratelia.webactiv.beans.admin.UserDetail requester)
Sets the requester. |
MediaCriteria |
withVisibility(MediaCriteria.VISIBILITY visibility)
Sets the visibility criterion to find the medias according to their period of visibility. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static MediaCriteria fromComponentInstanceId(String componentInstanceId)
componentInstanceId
- the identifier of the media instance.
public static MediaCriteria fromMediaId(String mediaId)
mediaId
- the identifier of the media instance.
public static MediaCriteria fromNbDaysBeforeThatMediaIsNotVisible(Integer nbDaysBeforeThatMediaIsNotVisible)
nbDaysBeforeThatMediaIsNotVisible
- the nb of days before that a media is not visible.
public MediaCriteria onComponentInstanceId(String componentInstanceId)
componentInstanceId
- the identifier of the component instance.
public MediaCriteria setRequester(com.stratelia.webactiv.beans.admin.UserDetail requester)
UserDetail.getCurrentRequester()
is used.
requester
- the requester.
public MediaCriteria createdBy(com.stratelia.webactiv.beans.admin.UserDetail user)
user
- the user that must be the creator of the media(s).
public MediaCriteria albumIdentifierIsOneOf(String... albumIds)
albumIds
- the media album identifier list that the media must be attached.
public MediaCriteria mediaTypeIsOneOf(MediaType... mediaTypes)
mediaTypes
- the media type list that the media type must verify.
public MediaCriteria orderedBy(MediaCriteria.QUERY_ORDER_BY... orderBies)
orderBies
- the list of order by directives.
public MediaCriteria identifierIsOneOf(String... identifiers)
identifiers
- a list of identifiers the medias to find should have.
public MediaCriteria withVisibility(MediaCriteria.VISIBILITY visibility)
MediaCriteria.VISIBILITY.BY_DEFAULT
, then the requester is verified to get VISIBLE (all
user roles) or VISIBLE + HIDDEN (lowest user role must be the publisher one).
visibility
- the visibility requested.
public MediaCriteria referenceDateOf(Date referenceDate)
referenceDate
- the reference date specified.
public MediaCriteria limitResultTo(int nbMedia)
nbMedia
- the maximum media in a result.
public int getResultLimit()
public String getComponentInstanceId()
fromComponentInstanceId(String)
public Integer getNbDaysBeforeThatMediaIsNotVisible()
public void processWith(MediaCriteriaProcessor processor)
processor
- the processor to use for processing each criterion in this criteria.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |