Examples of object()


Examples of net.tomp2p.storage.Data.object()

    Assert.assertTrue(futureIntialPut.isSuccess());

    // verify put
    Data retData = p1.get(lKey).setDomainKey(dKey).setContentKey(cKey).setVersionKey(vKey).start()
        .awaitUninterruptibly().getData();
    Assert.assertEquals("data1", (String) retData.object());
    Assert.assertEquals(keyPair1.getPublic(), retData.publicKey());
    // verify data signature
    Assert.assertTrue(retData.verify(keyPair1.getPublic(), factory));

    // change data signature to keys 2 using same data, sign with new key 2
View Full Code Here

Examples of org.amplafi.json.JSONStringer.object()

        try {
            j = XML.toJSONObject("<![CDATA[This is a collection of test patterns and examples for org.amplafi.json.]]>");
            System.out.println(j.toString());

            jj = new JSONStringer();
            s = jj.object()
                .key("foo")
                .value("bar")
                .key("baz")
                .array()
                    .object()
View Full Code Here

Examples of org.amplafi.json.JSONWriter.object()

    @Test
    public void testSimpleFlowState() {
        FlowStateImpl flowState = newFlowState();
        flowState.clearLookupKey();
        JSONWriter jsonWriter = getJsonWriter();
        jsonWriter.object().key("flowState").value(flowState).endObject();
        assertEquals(jsonWriter.toString(), "{\"flowState\":{\""+FlowStateJsonRenderer.FS_COMPLETE+"\":true,\"" +
                FlowStateJsonRenderer.FS_PARAMETERS+"\":{}" +
            "}}");

    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.util.JavaDataModel.object()

  @Override
  public int getAggregationBufferFixedSize() {
    JavaDataModel model = JavaDataModel.get();
    return JavaDataModel.alignUp(
      model.object() +
      model.primitive2() * 2,
      model.memoryAlign());
  }

  @Override
View Full Code Here

Examples of org.apache.isis.viewer.json.applib.domainobjects.DomainObjectResource.object()

    }

    private DomainObjectRepresentation givenDomainObjectRepresentationFor(final String oidStr) throws JsonParseException, JsonMappingException, IOException {
        final DomainObjectResource domainObjectResource = client.getDomainObjectResource();

        final Response domainObjectResp = domainObjectResource.object(oidStr);
        final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
        assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));

        final DomainObjectRepresentation domainObjectRepr = domainObjectJsonResp.getEntity();
        return domainObjectRepr;
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource.object()


    private DomainObjectRepresentation givenDomainObjectRepresentationFor(final String domainType, String instanceId) throws JsonParseException, JsonMappingException, IOException {
        final DomainObjectResource domainObjectResource = client.getDomainObjectResource();

        final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
        final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
        assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));

        final DomainObjectRepresentation domainObjectRepr = domainObjectJsonResp.getEntity();
        return domainObjectRepr;
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource.object()


    private DomainObjectRepresentation givenDomainObjectRepresentationFor(final String domainType, String instanceId) throws JsonParseException, JsonMappingException, IOException {
        final DomainObjectResource domainObjectResource = client.getDomainObjectResource();

        final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
        final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
        assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));

        return domainObjectJsonResp.getEntity();
    }
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource.object()


    private DomainObjectRepresentation givenDomainObjectRepresentationFor(final String domainType, String instanceId) throws JsonParseException, JsonMappingException, IOException {
        final DomainObjectResource domainObjectResource = client.getDomainObjectResource();

        final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
        final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
        assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Response.Status.Family.SUCCESSFUL));

        return domainObjectJsonResp.getEntity();
    }
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource.object()

    public void usingResourceProxy() throws Exception {

        // when
        final DomainObjectResource objectResource = client.getDomainObjectResource();

        final Response response = objectResource.object("PRMV", "nonExistent");
        RestfulResponse<JsonRepresentation> restfulResp = RestfulResponse.of(response);

        then(restfulResp);
       
    }
View Full Code Here

Examples of org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource.object()

    public void usingResourceProxy() throws Exception {

        // when
        final DomainObjectResource objectResource = client.getDomainObjectResource();

        final Response response = objectResource.object("PRMV", "nonExistent");
        RestfulResponse<JsonRepresentation> restfulResp = RestfulResponse.of(response);

        then(restfulResp);
       
    }
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.