@Test public void testDescribeGlobal() throws IOException { DescribeGlobalResult actual = conn.describeGlobal(); assertEquals(readResource("/apiResponses/describeGlobal.xml"), TestFixtureUtils.dumpFixture(actual)); }
@Override @Nonnull public DescribeGlobalResult describeGlobal() throws IOException { Timer.Context context = describeGlobalTimer.time(); String describeGlobalJson; try { describeGlobalJson = this.getHttpApiClient().describeGlobal(); } finally { context.stop(); } ObjectNode objectNode = this.objectReader.withType(ObjectNode.class).readValue(describeGlobalJson); String encoding = objectNode.get("encoding").textValue(); int maxBatchSize = objectNode.get("maxBatchSize").intValue(); ArrayNode descriptionsNode = this.objectReader.withType(ArrayNode.class).readValue(objectNode.get("sobjects")); Iterator<JsonNode> elements = descriptionsNode.elements(); List<GlobalSObjectDescription> descriptions = Lists.newArrayList(); while (elements.hasNext()) { JsonNode node = elements.next(); descriptions.add(this.objectReader.readValue(node.traverse(), BasicSObjectMetadata.class)); } return new DescribeGlobalResult(encoding, maxBatchSize, descriptions); }
RestConnectionImpl implements RestConnection { @Override @Nonnull public DescribeGlobalResult describeGlobal() throws IOException { Timer.Context context = describeGlobalTimer.time(); String describeGlobalJson; try { describeGlobalJson = this.getHttpApiClient().describeGlobal(); } finally { context.stop(); } ObjectNode objectNode = this.objectReader.withType(ObjectNode.class).readValue(describeGlobalJson); String encoding = objectNode.get("encoding").textValue(); int maxBatchSize = objectNode.get("maxBatchSize").intValue(); ArrayNode descriptionsNode = this.objectReader.withType(ArrayNode.class).readValue(objectNode.get("sobjects")); Iterator<JsonNode> elements = descriptionsNode.elements(); List<GlobalSObjectDescription> descriptions = Lists.newArrayList(); while (elements.hasNext()) { JsonNode node = elements.next(); descriptions.add(this.objectReader.readValue(node.traverse(), BasicSObjectMetadata.class)); } return new DescribeGlobalResult(encoding, maxBatchSize, descriptions); } }
RestConnectionImpl implements RestConnection { @Override @Nonnull public DescribeGlobalResult describeGlobal() throws IOException { Timer.Context context = describeGlobalTimer.time(); String describeGlobalJson; try { describeGlobalJson = this.getHttpApiClient().describeGlobal(); } finally { context.stop(); } ObjectNode objectNode = this.objectReader.withType(ObjectNode.class).readValue(describeGlobalJson); String encoding = objectNode.get("encoding").textValue(); int maxBatchSize = objectNode.get("maxBatchSize").intValue(); ArrayNode descriptionsNode = this.objectReader.withType(ArrayNode.class).readValue(objectNode.get("sobjects")); Iterator<JsonNode> elements = descriptionsNode.elements(); List<GlobalSObjectDescription> descriptions = Lists.newArrayList(); while (elements.hasNext()) { JsonNode node = elements.next(); descriptions.add(this.objectReader.readValue(node.traverse(), BasicSObjectMetadata.class)); } return new DescribeGlobalResult(encoding, maxBatchSize, descriptions); } RestConnectionImpl(ObjectReader objectReader, HttpApiClientProvider httpApiClientProvider,
            MetricRegistry metricRegistry); }
RestConnectionImpl implements RestConnection { @Override @Nonnull public DescribeGlobalResult describeGlobal() throws IOException { Timer.Context context = describeGlobalTimer.time(); String describeGlobalJson; try { describeGlobalJson = this.getHttpApiClient().describeGlobal(); } finally { context.stop(); } ObjectNode objectNode = this.objectReader.withType(ObjectNode.class).readValue(describeGlobalJson); String encoding = objectNode.get("encoding").textValue(); int maxBatchSize = objectNode.get("maxBatchSize").intValue(); ArrayNode descriptionsNode = this.objectReader.withType(ArrayNode.class).readValue(objectNode.get("sobjects")); Iterator<JsonNode> elements = descriptionsNode.elements(); List<GlobalSObjectDescription> descriptions = Lists.newArrayList(); while (elements.hasNext()) { JsonNode node = elements.next(); descriptions.add(this.objectReader.readValue(node.traverse(), BasicSObjectMetadata.class)); } return new DescribeGlobalResult(encoding, maxBatchSize, descriptions); } RestConnectionImpl(ObjectReader objectReader, HttpApiClientProvider httpApiClientProvider,
            MetricRegistry metricRegistry); @Override @Nonnull SaveResult create(SObject sObject); @Override void delete(String sObjectType, Id id); @Override @Nonnull DescribeGlobalResult describeGlobal(); @Override @Nonnull SObjectDescription describeSObject(String sObjectType); @Override @Nonnull BasicSObjectMetadataResult getBasicObjectInfo(String sObjectType); @Override @Nonnull RestQueryResult query(String soql); @Override @Nonnull RestQueryResult queryMore(RestQueryLocator queryLocator); @Override @Nonnull SObject retrieve(String sObjectType, Id id, List<String> fields); @Override @Nonnull List<SObject> search(String sosl); @Override void update(SObject sObject); @Override @Nonnull UpsertResult upsert(SObject sObject, String externalIdField); }
RestConnectionImpl implements RestConnection { @Override @Nonnull public DescribeGlobalResult describeGlobal() throws IOException { Timer.Context context = describeGlobalTimer.time(); String describeGlobalJson; try { describeGlobalJson = this.getHttpApiClient().describeGlobal(); } finally { context.stop(); } ObjectNode objectNode = this.objectReader.withType(ObjectNode.class).readValue(describeGlobalJson); String encoding = objectNode.get("encoding").textValue(); int maxBatchSize = objectNode.get("maxBatchSize").intValue(); ArrayNode descriptionsNode = this.objectReader.withType(ArrayNode.class).readValue(objectNode.get("sobjects")); Iterator<JsonNode> elements = descriptionsNode.elements(); List<GlobalSObjectDescription> descriptions = Lists.newArrayList(); while (elements.hasNext()) { JsonNode node = elements.next(); descriptions.add(this.objectReader.readValue(node.traverse(), BasicSObjectMetadata.class)); } return new DescribeGlobalResult(encoding, maxBatchSize, descriptions); } RestConnectionImpl(ObjectReader objectReader, HttpApiClientProvider httpApiClientProvider,
            MetricRegistry metricRegistry); @Override @Nonnull SaveResult create(SObject sObject); @Override void delete(String sObjectType, Id id); @Override @Nonnull DescribeGlobalResult describeGlobal(); @Override @Nonnull SObjectDescription describeSObject(String sObjectType); @Override @Nonnull BasicSObjectMetadataResult getBasicObjectInfo(String sObjectType); @Override @Nonnull RestQueryResult query(String soql); @Override @Nonnull RestQueryResult queryMore(RestQueryLocator queryLocator); @Override @Nonnull SObject retrieve(String sObjectType, Id id, List<String> fields); @Override @Nonnull List<SObject> search(String sosl); @Override void update(SObject sObject); @Override @Nonnull UpsertResult upsert(SObject sObject, String externalIdField);  }