Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.webengine.sites.utils
Class SiteQueriesCollection

java.lang.Object
  extended by org.nuxeo.webengine.sites.utils.SiteQueriesCollection

public class SiteQueriesCollection
extends Object

Collection of the queries used in the sites module. It gathers all in one place to ease the reading of the code.

Author:
rux

Method Summary
static boolean checkUnrestrictedSiteExistenceByUrlAndDocType(CoreSession session, String url, String documentType)
          Queries sites unrestricted by URL and document type.
static DocumentModelList queryAllSites(CoreSession session, String documentType)
          Queries all sites of the given document type.
static DocumentModelList queryLastComments(CoreSession session, String parent, int numberLimit, boolean isModerated)
          Queries the added comments within a limit.
static DocumentModelList queryLastModifiedPages(CoreSession session, String parent, String documentType, int numberLimit)
          Queries the modified pages within a limit.
static DocumentModelList querySearchPages(CoreSession session, String query, String parent, String documentType, String dateAfter, String dateBefore)
          Queries the pages based on a search string.
static DocumentModelList querySitesByUrlAndDocType(CoreSession session, String url, String documentType)
          Queries sites by URL and document type.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

querySitesByUrlAndDocType

public static DocumentModelList querySitesByUrlAndDocType(CoreSession session,
                                                          String url,
                                                          String documentType)
                                                   throws ClientException
Queries sites by URL and document type. It should be exactly one returned.

Throws:
ClientException

checkUnrestrictedSiteExistenceByUrlAndDocType

public static boolean checkUnrestrictedSiteExistenceByUrlAndDocType(CoreSession session,
                                                                    String url,
                                                                    String documentType)
                                                             throws ClientException
Queries sites unrestricted by URL and document type. It should be exactly one returned.

Throws:
ClientException

queryAllSites

public static DocumentModelList queryAllSites(CoreSession session,
                                              String documentType)
                                       throws ClientException
Queries all sites of the given document type.

Throws:
ClientException

queryLastModifiedPages

public static DocumentModelList queryLastModifiedPages(CoreSession session,
                                                       String parent,
                                                       String documentType,
                                                       int numberLimit)
                                                throws ClientException
Queries the modified pages within a limit.

Throws:
ClientException

queryLastComments

public static DocumentModelList queryLastComments(CoreSession session,
                                                  String parent,
                                                  int numberLimit,
                                                  boolean isModerated)
                                           throws ClientException
Queries the added comments within a limit. Query differs if moderated or not.

Throws:
ClientException

querySearchPages

public static DocumentModelList querySearchPages(CoreSession session,
                                                 String query,
                                                 String parent,
                                                 String documentType,
                                                 String dateAfter,
                                                 String dateBefore)
                                          throws ClientException
Queries the pages based on a search string.

Throws:
ClientException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.