Examples of withVersion()


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

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

      @QueryParam("offset") @DefaultValue("0") int offset) {

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

    // Type
    q.withoutTypes(Page.TYPE);
    if (StringUtils.isNotBlank(type))
      q.withTypes(type);
View Full Code Here

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

      @QueryParam("offset") @DefaultValue("0") int offset) {

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

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

    // Type
View Full Code Here

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

    if (resourceId == null)
      return Response.status(Status.BAD_REQUEST).build();

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

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

Examples of com.google.code.bing.search.client.BingSearchClient.SearchRequestBuilder.withVersion()

        {
    SearchRequestBuilder builder = client.newSearchRequestBuilder();
    builder.withAppId(applicationId);
    builder.withQuery(query);
    builder.withSourceType(SourceType.WEB);
    builder.withVersion("2.0");
    builder.withMarket("en-us");
    builder.withAdultOption(AdultOption.STRICT);
    builder.withSearchOption(SearchOption.ENABLE_HIGHLIGHTING);

    builder.withWebRequestCount(50L);
View Full Code Here

Examples of com.opengamma.id.UniqueId.withVersion()

    }
    document.setVersionFromInstant(now);
    document.setVersionToInstant(null);
    document.setCorrectionFromInstant(now);
    document.setCorrectionToInstant(null);
    document.setUniqueId(uniqueId.withVersion(""));
    if (_store.replace(uniqueId.getObjectId(), storedDocument, document) == false) {
      throw new IllegalArgumentException("Concurrent modification");
    }
    _changeManager.entityChanged(ChangeType.CHANGED, document.getObjectId(), storedDocument.getVersionFromInstant(), document.getVersionToInstant(), now);
    return document;
View Full Code Here

Examples of com.opengamma.id.UniqueId.withVersion()

    }
    document.setVersionFromInstant(now);
    document.setVersionToInstant(null);
    document.setCorrectionFromInstant(now);
    document.setCorrectionToInstant(null);
    document.setUniqueId(uniqueId.withVersion(""));
    if (_store.replace(uniqueId.getObjectId(), storedDocument, document) == false) {
      throw new IllegalArgumentException("Concurrent modification");
    }
    _changeManager.entityChanged(ChangeType.CHANGED, document.getObjectId(), storedDocument.getVersionFromInstant(), document.getVersionToInstant(), now);
    return document;
View Full Code Here

Examples of com.opengamma.id.UniqueId.withVersion()

    }
    document.setVersionFromInstant(now);
    document.setVersionToInstant(null);
    document.setCorrectionFromInstant(now);
    document.setCorrectionToInstant(null);
    uniqueId = uniqueId.withVersion(Long.toString(_versions.incrementAndGet()));
    document.setUniqueId(uniqueId);
    IdUtils.setInto(document.getConfig().getValue(), uniqueId);
    if (_store.replace(uniqueId.getObjectId(), storedDocument, document) == false) {
      throw new IllegalArgumentException("Concurrent modification");
    }
View Full Code Here

Examples of io.druid.indexing.overlord.setup.GalaxyEC2UserData.withVersion()

    final String json = "{\"env\":\"druid\",\"version\":null,\"type\":\"typical\"}";
    final GalaxyEC2UserData userData = (GalaxyEC2UserData) TestUtils.MAPPER.readValue(json, EC2UserData.class);
    Assert.assertEquals("druid", userData.getEnv());
    Assert.assertEquals("typical", userData.getType());
    Assert.assertNull(userData.getVersion());
    Assert.assertEquals("1234", userData.withVersion("1234").getVersion());
  }

  @Test
  public void testStringEC2UserDataSerde() throws IOException
  {
View Full Code Here

Examples of io.druid.indexing.overlord.setup.StringEC2UserData.withVersion()

        Base64.encodeBase64String("hey 1234".getBytes(Charsets.UTF_8)),
        userData.getUserDataBase64()
    );
    Assert.assertEquals(
        Base64.encodeBase64String("hey xyz".getBytes(Charsets.UTF_8)),
        userData.withVersion("xyz").getUserDataBase64()
    );
  }
}
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.