Examples of withId()


Examples of com.google.code.stackexchange.client.provider.url.ApiUrlBuilder.withId()

   * @see com.google.code.stackexchange.client.StackOverflowApiClient#getRevisionForPost(long, java.lang.String)
   */
  @Override
  public Revision getRevisionForPost(long postId, String revisionGuid) {
    ApiUrlBuilder builder = createStackOverflowApiUrlBuilder(StackExchangeApiMethods.GET_REVISIONS_FOR_POST);
        String                apiUrl  = builder.withId(postId).withField("revisionguid", revisionGuid).buildUrl();

        PagedList<Revision> list = unmarshallList(Revision.class, callApiMethod(apiUrl));
        return (list.isEmpty())? null : list.get(0);
  }

View Full Code Here

Examples of com.xebialabs.overthere.cifs.winrm.soap.HeaderBuilder.withId()

    private void addHeaders(SoapMessageBuilder.EnvelopeBuilder envelope, Action action, ResourceURI resourceURI, OptionSet optionSet)
            throws URISyntaxException {
        HeaderBuilder header = envelope.header();
        header.to(targetURL.toURI()).replyTo(new URI("http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"));
        header.maxEnvelopeSize(winRmEnvelopSize);
        header.withId(getUUID());
        header.withLocale(winRmLocale);
        header.withTimeout(winRmTimeout);
        header.withAction(action.getUri());
        if (shellId != null) {
            header.withShellId(shellId);
View Full Code Here

Examples of io.druid.query.Query.withId()

      try {
        inputQuery = objectMapper.readValue(request.getInputStream(), Query.class);
        if (inputQuery != null) {
          host = hostFinder.getHost(inputQuery);
          if (inputQuery.getId() == null) {
            inputQuery = inputQuery.withId(UUID.randomUUID().toString());
          }
        }
      }
      catch (IOException e) {
        log.warn(e, "Exception parsing query");
View Full Code Here

Examples of io.druid.query.Query.withId()

      requestQuery = ByteStreams.toByteArray(req.getInputStream());
      query = objectMapper.readValue(requestQuery, Query.class);
      queryId = query.getId();
      if (queryId == null) {
        queryId = UUID.randomUUID().toString();
        query = query.withId(queryId);
      }
      if (query.getContextValue("timeout") == null) {
        query = query.withOverriddenContext(
            ImmutableMap.of(
                "timeout",
View Full Code Here

Examples of net.pterodactylus.sone.database.PostBuilder.withId()

          return null;
        }
        try {
          PostBuilder postBuilder = core.postBuilder();
          /* TODO - parse time correctly. */
          postBuilder.withId(postId).from(sone.getId()).withTime(Long.parseLong(postTime)).withText(postText);
          if ((postRecipientId != null) && (postRecipientId.length() == 43)) {
            postBuilder.to(postRecipientId);
          }
          posts.add(postBuilder.build());
        } catch (NumberFormatException nfe1) {
View Full Code Here

Examples of net.pterodactylus.sone.database.PostReplyBuilder.withId()

          return null;
        }
        try {
          PostReplyBuilder postReplyBuilder = core.postReplyBuilder();
          /* TODO - parse time correctly. */
          postReplyBuilder.withId(replyId).from(sone.getId()).to(replyPostId).withTime(Long.parseLong(replyTime)).withText(replyText);
          replies.add(postReplyBuilder.build());
        } catch (NumberFormatException nfe1) {
          /* TODO - mark Sone as bad. */
          logger.log(Level.WARNING, String.format("Downloaded reply for Sone %s with invalid time: %s", sone, replyTime));
          return null;
View Full Code Here

Examples of org.apache.commons.cli2.builder.DefaultOptionBuilder.withId()

   
    final String longName = option1.getLongOpt();
    if(longName!=null){
      obuilder.withLongName(longName);
    }
    obuilder.withId(option1.getId());
   
    final String description = option1.getDescription();
    if(description!=null){
      obuilder.withDescription(description);
    }
View Full Code Here

Examples of org.apache.isis.viewer.json.viewer.representations.LinkBuilder.withId()

    private JsonRepresentation linkToNewTransientInstance() {
        final String url = "domainTypes/" + objectSpecification.getFullIdentifier() + "/typeactions/newTransientInstance/invoke";

        final LinkBuilder linkBuilder = LinkBuilder.newBuilder(getResourceContext(), Rel.TYPE_ACTION, RepresentationType.TYPE_ACTION_RESULT, url);
        final JsonRepresentation link = linkBuilder.withId("newTransientInstance").build();
        return link;
    }

    public static JsonRepresentation argumentsTo(final ResourceContext resourceContext, final String paramName, final ObjectSpecification objectSpec) {
        final JsonRepresentation arguments = JsonRepresentation.newMap();
View Full Code Here

Examples of org.modeshape.jcr.cache.NodeKey.withId()

        if (federationNodeRef == null) {
            // there isn't a federation node present, so we need to add it
            try {
                Property primaryType = propertyFactory.create(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.FEDERATION);
                systemNode.createChild(systemSession, systemNodeKey.withId("mode:federation"), ModeShapeLexicon.FEDERATION,
                                       primaryType);
                systemSession.save();
                federationNodeRef = systemNode.getChildReferences(systemSession).getChild(ModeShapeLexicon.FEDERATION);
            } catch (Exception e) {
                throw new RuntimeException(e);
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey.withId()

    InstanceBuilder vm = InstanceBuilder.build(model.dnsName, this, model.getTags());

    // TODO: Do we need a DnsCluster concept?
    // For now, we fake it
    PlatformLayerKey key = model.getKey();
    String groupId = key.withId(new ManagedItemId("primary")).getUrl();
    groupId = groupId.replace("/dnsServer/", "/dnsCluster/");
    vm.hostPolicy.configureSpread(groupId);

    vm.addTagToManaged = true;
    vm.publicPorts.add(53);
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.