Examples of withVersion()


Examples of ch.entwine.weblounge.common.impl.content.SearchQueryImpl.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.impl.content.SearchQueryImpl.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.impl.content.SearchQueryImpl.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.impl.content.SearchQueryImpl.withVersion()

      @QueryParam("details") @DefaultValue("false") boolean details) {

    // Create search query
    Site site = getSite(request);
    SearchQuery q = new SearchQueryImpl(site);
    q.withVersion(Resource.WORK);

    // Only take resources that have not been modified
    q.withoutPublication();

    // Type
View Full Code Here

Examples of ch.entwine.weblounge.common.impl.content.SearchQueryImpl.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.impl.content.SearchQueryImpl.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.impl.content.SearchQueryImpl.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.impl.content.SearchQueryImpl.withVersion()

    Site site = getSite(request);
    SearchQuery q = new SearchQueryImpl(site);

    q.withTypes(Page.TYPE);
    if (version != -1)
      q.withVersion(version);

    if (preferredVersion != -1)
      q.withPreferredVersion(preferredVersion);

    // Path
View Full Code Here

Examples of ch.entwine.weblounge.common.impl.content.SearchQueryImpl.withVersion()

    // Filter query
    if (StringUtils.isNotBlank(filter)) {
      if ("/".equals(filter)) {
        q.withPath("/");
      } else if (filter.contains("state:work")) {
        q.withVersion(Resource.WORK);
        q.withPreferredVersion(-1);
      } else if (filter.contains("state:live")) {
        q.withVersion(Resource.LIVE);
        q.withPreferredVersion(-1);
      } else if (filter.contains("state:locked")) {
View Full Code Here

Examples of ch.entwine.weblounge.common.impl.content.SearchQueryImpl.withVersion()

        q.withPath("/");
      } else if (filter.contains("state:work")) {
        q.withVersion(Resource.WORK);
        q.withPreferredVersion(-1);
      } else if (filter.contains("state:live")) {
        q.withVersion(Resource.LIVE);
        q.withPreferredVersion(-1);
      } else if (filter.contains("state:locked")) {
        q.withLockOwner();
      }
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.