Examples of withVersion()


Examples of ch.entwine.weblounge.common.content.SearchQuery.withVersion()

        throw new ContentRepositoryUnavailableException();
      }

      // Specify which pages to load
      SearchQuery query = new SearchQueryImpl(site);
      query.withVersion(Resource.LIVE);

      // Add the keywords (or)
      for (String subject : subjects) {
        query.withSubject(subject);
      }
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withVersion()

      response.invalidate();
      return SKIP_BODY;
    }

    SearchQuery query = new SearchQueryImpl(site);
    query.withVersion(Resource.LIVE);
    query.withTypes(ImageResource.TYPE);
    for (int i = 0; i < imageSubjects.size(); i++)
      query.withSubject(imageSubjects.get(i));
    SearchResult result;
    try {
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withVersion()

    }

    // Create the search expression and the query
    SearchQuery q = new SearchQueryImpl(site);
    q.withText(true, queryString);
    q.withVersion(Resource.LIVE);
    q.withRececyPriority();
    q.withOffset(offset);
    q.withLimit(limit);
    q.withTypes(Page.TYPE);
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withVersion()

    feed.setPublishedDate(new Date());

    // TODO: Add more feed metadata, ask site

    SearchQuery query = new SearchQueryImpl(site);
    query.withVersion(Resource.LIVE);
    query.withTypes(Page.TYPE);
    query.withLimit(limit);
    query.sortByPublishingDate(Order.Descending);
    for (String subject : subjects) {
      query.withSubject(subject);
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withVersion()

      uri = new ImageResourceURIImpl(site, null, imageId);
    if (uri == null && StringUtils.isNotBlank(imagePath))
      uri = new ImageResourceURIImpl(site, imagePath, null);
    if (uri == null && imageSubjects != null && imageSubjects.size() > 0) {
      SearchQuery query = new SearchQueryImpl(site);
      query.withVersion(Resource.LIVE);
      query.withTypes(ImageResource.TYPE);
      query.withSubjects(SearchQuery.Quantifier.All, imageSubjects.toArray(new String[imageSubjects.size()]));
      SearchResult result;
      try {
        result = repository.find(query);
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withVersion()

    String text = StringUtils.join(args, " ");

    // Get hold of the content repository
    ContentRepository repository = site.getContentRepository();
    SearchQuery query = new SearchQueryImpl(site);
    query.withVersion(Resource.LIVE);
    query.withFulltext(text.toString());

    // Is it a page?
    Formatter formatter = null;
    try {
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withVersion()

    // Create the search expression and the query
    SearchQuery query = new SearchQueryImpl(site);
    try {
      query.withFulltext(true, URLDecoder.decode(terms, "utf-8"));
      query.withVersion(Resource.LIVE);
      query.withOffset(offset);
      query.withLimit(limit);
    } catch (UnsupportedEncodingException e) {
      throw new WebApplicationException(e);
    }
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withVersion()

      return Response.status(Status.NOT_FOUND).build();
    }

    Site site = getSite(request);
    SearchQuery q = new SearchQueryImpl(site);
    q.withVersion(Resource.LIVE);
    q.withTypes(Page.TYPE);
    q.withPathPrefix(page.getURI().getPath());

    ContentRepository repository = getContentRepository(site, false);
    SearchResult result = null;
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withVersion()

      return Response.status(Status.BAD_REQUEST).build();

    Site site = getSite(request);
    SearchQuery q = new SearchQueryImpl(site);
    q.withTypes(Page.TYPE);
    q.withVersion(Resource.LIVE);
    q.withProperty("resourceid", pageId);

    ContentRepository repository = getContentRepository(site, false);
    SearchResult result = null;
    try {
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withVersion()

    }

    // Make sure the resource is not being referenced elsewhere
    if (allRevisions || uri.getVersion() == Resource.LIVE) {
      SearchQuery searchByResource = new SearchQueryImpl(uri.getSite());
      searchByResource.withVersion(Resource.LIVE);
      searchByResource.withProperty("resourceid", uri.getIdentifier());
      if (searchIndex.getByQuery(searchByResource).getDocumentCount() > 0) {
        logger.debug("Resource '{}' is still being referenced", uri);
        throw new ReferentialIntegrityException(uri.getIdentifier());
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.