Search in sources :

Example 51 with RecordTemplate

use of com.linkedin.data.template.RecordTemplate in project rest.li by linkedin.

the class TestScatterGather method testRequest.

@SuppressWarnings({ "unchecked", "rawtypes" })
private static void testRequest(BatchRequest<?> request, Set<String> expectedParams, Set<PathSpec> expectedFields, Map<Long, Greeting> expectedInput, Set<Set<String>> requestIdSets, Set<Long> requestIds) {
    Assert.assertEquals(request.getQueryParamsObjects().keySet(), expectedParams);
    if (expectedFields != null) {
        Collection<PathSpec> actualFields = (Collection<PathSpec>) request.getQueryParamsObjects().get(RestConstants.FIELDS_PARAM);
        for (PathSpec field : actualFields) {
            Assert.assertTrue(expectedFields.contains(field));
        }
    }
    Set<String> uriIds = new HashSet<String>();
    for (Long id : (Collection<Long>) request.getQueryParamsObjects().get(RestConstants.QUERY_BATCH_IDS_PARAM)) {
        uriIds.add(id.toString());
    }
    if (expectedInput != null) {
        RecordTemplate inputRecordTemplate;
        if (request instanceof BatchUpdateRequest) {
            ResourceProperties resourceProperties = request.getResourceProperties();
            CollectionRequest inputRecord = (CollectionRequest) request.getInputRecord();
            inputRecordTemplate = CollectionRequestUtil.convertToBatchRequest(inputRecord, resourceProperties.getKeyType(), resourceProperties.getComplexKeyType(), resourceProperties.getKeyParts(), resourceProperties.getValueType());
        } else {
            inputRecordTemplate = request.getInputRecord();
        }
        checkInput(inputRecordTemplate.data().getDataMap(com.linkedin.restli.common.BatchRequest.ENTITIES), expectedInput, uriIds);
    }
    Set<Object> idObjects = request.getObjectIds();
    Set<String> theseIds = new HashSet<String>(idObjects.size());
    for (Object o : idObjects) {
        theseIds.add(o.toString());
    }
    Assert.assertEquals(uriIds, theseIds);
    //no duplicate requests
    Assert.assertFalse(requestIdSets.contains(theseIds));
    for (String id : theseIds) {
        //no duplicate ids
        Assert.assertFalse(requestIds.contains(Long.parseLong(id)));
        requestIds.add(Long.parseLong(id));
    }
    requestIdSets.add(theseIds);
}
Also used : CollectionRequest(com.linkedin.restli.common.CollectionRequest) ResourceProperties(com.linkedin.restli.common.ResourceProperties) PathSpec(com.linkedin.data.schema.PathSpec) RecordTemplate(com.linkedin.data.template.RecordTemplate) Collection(java.util.Collection) HashSet(java.util.HashSet)

Example 52 with RecordTemplate

use of com.linkedin.data.template.RecordTemplate in project rest.li by linkedin.

the class TestScatterGather method testGetEntityRequest.

@SuppressWarnings({ "unchecked", "rawtypes" })
private static void testGetEntityRequest(BatchRequest<BatchKVResponse<Long, EntityResponse<Greeting>>> request, Set<String> expectedParams, Set<PathSpec> expectedFields, Map<Long, Greeting> expectedInput, Set<Set<String>> requestIdSets, Set<Long> requestIds) {
    Assert.assertEquals(request.getQueryParamsObjects().keySet(), expectedParams);
    if (expectedFields != null) {
        Collection<PathSpec> actualFields = (Collection<PathSpec>) request.getQueryParamsObjects().get(RestConstants.FIELDS_PARAM);
        for (PathSpec field : actualFields) {
            Assert.assertTrue(expectedFields.contains(field));
        }
    }
    Set<String> uriIds = new HashSet<String>();
    for (Long id : (Collection<Long>) request.getQueryParamsObjects().get(RestConstants.QUERY_BATCH_IDS_PARAM)) {
        uriIds.add(id.toString());
    }
    if (expectedInput != null) {
        RecordTemplate inputRecordTemplate;
        if (request instanceof BatchUpdateRequest) {
            ResourceProperties resourceProperties = request.getResourceProperties();
            CollectionRequest inputRecord = (CollectionRequest) request.getInputRecord();
            inputRecordTemplate = CollectionRequestUtil.convertToBatchRequest(inputRecord, resourceProperties.getKeyType(), resourceProperties.getComplexKeyType(), resourceProperties.getKeyParts(), resourceProperties.getValueType());
        } else {
            inputRecordTemplate = request.getInputRecord();
        }
        checkInput(inputRecordTemplate.data().getDataMap(com.linkedin.restli.common.BatchRequest.ENTITIES), expectedInput, uriIds);
    }
    Set<Object> idObjects = request.getObjectIds();
    Set<String> theseIds = new HashSet<String>(idObjects.size());
    for (Object o : idObjects) {
        theseIds.add(o.toString());
    }
    Assert.assertEquals(uriIds, theseIds);
    //no duplicate requests
    Assert.assertFalse(requestIdSets.contains(theseIds));
    for (String id : theseIds) {
        //no duplicate ids
        Assert.assertFalse(requestIds.contains(Long.parseLong(id)));
        requestIds.add(Long.parseLong(id));
    }
    requestIdSets.add(theseIds);
}
Also used : CollectionRequest(com.linkedin.restli.common.CollectionRequest) ResourceProperties(com.linkedin.restli.common.ResourceProperties) PathSpec(com.linkedin.data.schema.PathSpec) RecordTemplate(com.linkedin.data.template.RecordTemplate) Collection(java.util.Collection) HashSet(java.util.HashSet)

Example 53 with RecordTemplate

use of com.linkedin.data.template.RecordTemplate in project rest.li by linkedin.

the class RestLiHTMLDocumentationRenderer method renderResource.

@Override
public void renderResource(String resourceName, OutputStream out) {
    final ResourceSchema resourceSchema = _resourceSchemas.getResource(resourceName);
    final List<ResourceSchema> parentResources = _resourceSchemas.getParentResources(resourceSchema);
    ExampleRequestResponseGenerator generator = new ExampleRequestResponseGenerator(parentResources, resourceSchema, _schemaResolver);
    if (resourceSchema == null) {
        throw new RoutingException(String.format("Resource \"%s\" does not exist", resourceName), HttpStatus.S_404_NOT_FOUND.getCode());
    }
    final Map<String, Object> pageModel = createPageModel();
    pageModel.put("resource", resourceSchema);
    pageModel.put("resourceName", resourceName);
    pageModel.put("resourceFullName", ResourceSchemaUtil.getFullName(resourceSchema));
    pageModel.put("resourceType", getResourceType(resourceSchema));
    pageModel.put("subResources", _resourceSchemas.getSubResources(resourceSchema));
    final List<ResourceMethodDocView> restMethods = new ArrayList<ResourceMethodDocView>();
    final List<ResourceMethodDocView> finders = new ArrayList<ResourceMethodDocView>();
    final List<ResourceMethodDocView> actions = new ArrayList<ResourceMethodDocView>();
    final MethodGatheringResourceSchemaVisitor visitor = new MethodGatheringResourceSchemaVisitor(resourceName);
    ResourceSchemaCollection.visitResources(_resourceSchemas.getResources().values(), visitor);
    for (RecordTemplate methodSchema : visitor.getAllMethods()) {
        final ExampleRequestResponse capture;
        if (methodSchema instanceof RestMethodSchema) {
            RestMethodSchema restMethodSchema = (RestMethodSchema) methodSchema;
            capture = generator.method(ResourceMethod.valueOf(restMethodSchema.getMethod().toUpperCase()));
        } else if (methodSchema instanceof FinderSchema) {
            FinderSchema finderMethodSchema = (FinderSchema) methodSchema;
            capture = generator.finder(finderMethodSchema.getName());
        } else if (methodSchema instanceof ActionSchema) {
            ActionSchema actionMethodSchema = (ActionSchema) methodSchema;
            final ResourceLevel resourceLevel = (visitor.getCollectionActions().contains(methodSchema) ? ResourceLevel.COLLECTION : ResourceLevel.ENTITY);
            capture = generator.action(actionMethodSchema.getName(), resourceLevel);
        } else {
            capture = null;
        }
        String requestEntity = null;
        String responseEntity = null;
        if (capture != null) {
            try {
                DataMap entityMap;
                if (capture.getRequest().getEntity().length() > 0) {
                    entityMap = DataMapUtils.readMap(capture.getRequest());
                    requestEntity = new String(_codec.mapToBytes(entityMap));
                }
                if (capture.getResponse() != null && capture.getResponse().getEntity() != null && capture.getResponse().getEntity().length() > 0) {
                    entityMap = DataMapUtils.readMap(capture.getResponse());
                    responseEntity = new String(_codec.mapToBytes(entityMap));
                }
            } catch (IOException e) {
                throw new RestLiInternalException(e);
            }
        }
        final ResourceMethodDocView docView = new ResourceMethodDocView(methodSchema, capture, getDoc(methodSchema, resourceSchema.hasSimple()), requestEntity, responseEntity);
        if (methodSchema instanceof RestMethodSchema) {
            restMethods.add(docView);
        } else if (methodSchema instanceof FinderSchema) {
            finders.add(docView);
        } else if (methodSchema instanceof ActionSchema) {
            actions.add(docView);
        }
    }
    pageModel.put("restMethods", restMethods);
    pageModel.put("finders", finders);
    pageModel.put("actions", actions);
    addRelated(resourceSchema, pageModel);
    _templatingEngine.render("resource.vm", pageModel, out);
}
Also used : RoutingException(com.linkedin.restli.server.RoutingException) ResourceSchema(com.linkedin.restli.restspec.ResourceSchema) ExampleRequestResponse(com.linkedin.restli.docgen.examplegen.ExampleRequestResponse) ResourceLevel(com.linkedin.restli.server.ResourceLevel) ArrayList(java.util.ArrayList) RestMethodSchema(com.linkedin.restli.restspec.RestMethodSchema) FinderSchema(com.linkedin.restli.restspec.FinderSchema) IOException(java.io.IOException) ActionSchema(com.linkedin.restli.restspec.ActionSchema) DataMap(com.linkedin.data.DataMap) ExampleRequestResponseGenerator(com.linkedin.restli.docgen.examplegen.ExampleRequestResponseGenerator) RecordTemplate(com.linkedin.data.template.RecordTemplate) RestLiInternalException(com.linkedin.restli.internal.server.RestLiInternalException)

Example 54 with RecordTemplate

use of com.linkedin.data.template.RecordTemplate in project rest.li by linkedin.

the class RestLiResourceRelationship method findDataModels.

private void findDataModels() {
    final ResourceSchemaVisitior visitor = new BaseResourceSchemaVisitor() {

        @Override
        public void visitResourceSchema(VisitContext visitContext, ResourceSchema resourceSchema) {
            final String schema = resourceSchema.getSchema();
            // ActionSet resources do not have a schema
            if (schema != null) {
                final NamedDataSchema schemaSchema = extractSchema(schema);
                if (schemaSchema != null) {
                    connectSchemaToResource(visitContext, schemaSchema);
                }
            }
        }

        @Override
        public void visitCollectionResource(VisitContext visitContext, CollectionSchema collectionSchema) {
            final IdentifierSchema id = collectionSchema.getIdentifier();
            final NamedDataSchema typeSchema = extractSchema(id.getType());
            if (typeSchema != null) {
                connectSchemaToResource(visitContext, typeSchema);
            }
            final String params = id.getParams();
            if (params != null) {
                final NamedDataSchema paramsSchema = extractSchema(params);
                if (paramsSchema != null) {
                    connectSchemaToResource(visitContext, paramsSchema);
                }
            }
        }

        @Override
        public void visitAssociationResource(VisitContext visitContext, AssociationSchema associationSchema) {
            for (AssocKeySchema key : associationSchema.getAssocKeys()) {
                final NamedDataSchema keyTypeSchema = extractSchema(key.getType());
                if (keyTypeSchema != null) {
                    connectSchemaToResource(visitContext, keyTypeSchema);
                }
            }
        }

        @Override
        public void visitParameter(VisitContext visitContext, RecordTemplate parentResource, Object parentMethodSchema, ParameterSchema parameterSchema) {
            String parameterTypeString = parameterSchema.getType();
            if (// the parameter type field contains a inline schema, so we traverse into it
            isInlineSchema(parameterTypeString)) {
                visitInlineSchema(visitContext, parameterTypeString);
            } else {
                final NamedDataSchema schema;
                // grab the schema name from it
                if (parameterSchema.hasItems()) {
                    schema = extractSchema(parameterSchema.getItems());
                } else // the only remaining possibility is that the type field contains the name of a data schema
                {
                    schema = extractSchema(parameterTypeString);
                }
                if (schema != null) {
                    connectSchemaToResource(visitContext, schema);
                }
            }
        }

        @Override
        public void visitFinder(VisitContext visitContext, RecordTemplate parentResource, FinderSchema finderSchema) {
            final MetadataSchema metadata = finderSchema.getMetadata();
            if (metadata != null) {
                final NamedDataSchema metadataTypeSchema = extractSchema(metadata.getType());
                if (metadataTypeSchema != null) {
                    connectSchemaToResource(visitContext, metadataTypeSchema);
                }
            }
        }

        @Override
        public void visitAction(VisitContext visitContext, RecordTemplate parentResource, ResourceLevel resourceLevel, ActionSchema actionSchema) {
            final String returns = actionSchema.getReturns();
            if (returns != null) {
                if (// the parameter type field contains a inline schema, so we traverse into it
                isInlineSchema(returns)) {
                    visitInlineSchema(visitContext, returns);
                } else // otherwise the type field contains the name of a data schema
                {
                    final NamedDataSchema returnsSchema = extractSchema(returns);
                    if (returnsSchema != null) {
                        connectSchemaToResource(visitContext, returnsSchema);
                    }
                }
            }
            final StringArray throwsArray = actionSchema.getThrows();
            if (throwsArray != null) {
                for (String errorName : throwsArray) {
                    final NamedDataSchema errorSchema = extractSchema(errorName);
                    if (errorSchema != null) {
                        connectSchemaToResource(visitContext, errorSchema);
                    }
                }
            }
        }

        private boolean isInlineSchema(String schemaString) {
            return schemaString.startsWith("{");
        }

        private void visitInlineSchema(VisitContext visitContext, String schemaString) {
            DataSchema schema = DataTemplateUtil.parseSchema(schemaString, _schemaResolver);
            if (schema instanceof ArrayDataSchema) {
                DataSchema itemSchema = ((ArrayDataSchema) schema).getItems();
                if (itemSchema instanceof NamedDataSchema) {
                    connectSchemaToResource(visitContext, (NamedDataSchema) itemSchema);
                }
            }
            if (schema instanceof MapDataSchema) {
                DataSchema valueSchema = ((MapDataSchema) schema).getValues();
                if (valueSchema instanceof NamedDataSchema) {
                    connectSchemaToResource(visitContext, (NamedDataSchema) valueSchema);
                }
            }
        }

        private void connectSchemaToResource(VisitContext visitContext, final NamedDataSchema schema) {
            final Node<NamedDataSchema> schemaNode = _relationships.get(schema);
            _dataModels.put(schema.getFullName(), schema);
            final DataSchemaTraverse traveler = new DataSchemaTraverse();
            traveler.traverse(schema, new DataSchemaTraverse.Callback() {

                @Override
                public void callback(List<String> path, DataSchema nestedSchema) {
                    if (nestedSchema instanceof RecordDataSchema && nestedSchema != schema) {
                        final RecordDataSchema nestedRecordSchema = (RecordDataSchema) nestedSchema;
                        _dataModels.put(nestedRecordSchema.getFullName(), nestedRecordSchema);
                        final Node<RecordDataSchema> node = _relationships.get(nestedRecordSchema);
                        schemaNode.addAdjacentNode(node);
                    }
                }
            });
            final Node<ResourceSchema> resourceNode = _relationships.get(visitContext.getParentSchema());
            resourceNode.addAdjacentNode(schemaNode);
            schemaNode.addAdjacentNode(resourceNode);
        }
    };
    ResourceSchemaCollection.visitResources(_resourceSchemas.getResources().values(), visitor);
}
Also used : ResourceSchema(com.linkedin.restli.restspec.ResourceSchema) ResourceLevel(com.linkedin.restli.server.ResourceLevel) MapDataSchema(com.linkedin.data.schema.MapDataSchema) ParameterSchema(com.linkedin.restli.restspec.ParameterSchema) FinderSchema(com.linkedin.restli.restspec.FinderSchema) StringArray(com.linkedin.data.template.StringArray) IdentifierSchema(com.linkedin.restli.restspec.IdentifierSchema) RecordTemplate(com.linkedin.data.template.RecordTemplate) AssociationSchema(com.linkedin.restli.restspec.AssociationSchema) CollectionSchema(com.linkedin.restli.restspec.CollectionSchema) MetadataSchema(com.linkedin.restli.restspec.MetadataSchema) ActionSchema(com.linkedin.restli.restspec.ActionSchema) AssocKeySchema(com.linkedin.restli.restspec.AssocKeySchema) NamedDataSchema(com.linkedin.data.schema.NamedDataSchema) DataSchema(com.linkedin.data.schema.DataSchema) MapDataSchema(com.linkedin.data.schema.MapDataSchema) RecordDataSchema(com.linkedin.data.schema.RecordDataSchema) NamedDataSchema(com.linkedin.data.schema.NamedDataSchema) ArrayDataSchema(com.linkedin.data.schema.ArrayDataSchema) ArrayDataSchema(com.linkedin.data.schema.ArrayDataSchema) RecordDataSchema(com.linkedin.data.schema.RecordDataSchema) DataSchemaTraverse(com.linkedin.data.schema.DataSchemaTraverse)

Example 55 with RecordTemplate

use of com.linkedin.data.template.RecordTemplate in project rest.li by linkedin.

the class TestRestLiResponseEnvelope method testSetNewEnvelopeData.

@Test(dataProvider = "envelopeResourceMethodDataProvider")
public void testSetNewEnvelopeData(RestLiResponseEnvelope responseEnvelope, ResourceMethod resourceMethod) {
    ResponseType responseType = ResponseType.fromMethodType(resourceMethod);
    switch(responseType) {
        case SINGLE_ENTITY:
            RecordResponseEnvelope recordResponseEnvelope = (RecordResponseEnvelope) responseEnvelope;
            RecordTemplate oldRecord = recordResponseEnvelope.getRecord();
            RecordTemplate newRecord = new AnyRecord(new DataMap());
            newRecord.data().put("test", "testing");
            recordResponseEnvelope.setRecord(newRecord, HttpStatus.S_200_OK);
            Assert.assertNotEquals(recordResponseEnvelope.getRecord(), oldRecord);
            break;
        case GET_COLLECTION:
            CollectionResponseEnvelope collectionResponseEnvelope = (CollectionResponseEnvelope) responseEnvelope;
            List<? extends RecordTemplate> oldResponses = collectionResponseEnvelope.getCollectionResponse();
            RecordTemplate oldResponseMetadata = collectionResponseEnvelope.getCollectionResponseCustomMetadata();
            CollectionMetadata oldPagingMetadata = collectionResponseEnvelope.getCollectionResponsePaging();
            RecordTemplate newResponseMetadata = new AnyRecord(new DataMap());
            newResponseMetadata.data().put("test", "testing");
            CollectionMetadata newResponsesPaging = new CollectionMetadata();
            List<? extends RecordTemplate> newResponses = Arrays.asList(new AnyRecord(new DataMap()));
            collectionResponseEnvelope.setCollectionResponse(newResponses, newResponsesPaging, newResponseMetadata, HttpStatus.S_200_OK);
            Assert.assertNotEquals(collectionResponseEnvelope.getCollectionResponse(), oldResponses);
            Assert.assertNotEquals(collectionResponseEnvelope.getCollectionResponseCustomMetadata(), oldResponseMetadata);
            Assert.assertNotEquals(collectionResponseEnvelope.getCollectionResponsePaging(), oldPagingMetadata);
            Assert.assertEquals(collectionResponseEnvelope.getCollectionResponse(), newResponses);
            Assert.assertEquals(collectionResponseEnvelope.getCollectionResponseCustomMetadata(), newResponseMetadata);
            Assert.assertEquals(collectionResponseEnvelope.getCollectionResponsePaging(), newResponsesPaging);
            break;
        case CREATE_COLLECTION:
            BatchCreateResponseEnvelope batchCreateResponseEnvelope = (BatchCreateResponseEnvelope) responseEnvelope;
            List<BatchCreateResponseEnvelope.CollectionCreateResponseItem> oldCreateResponses = batchCreateResponseEnvelope.getCreateResponses();
            CreateIdStatus<String> newCreateIdStatus = new CreateIdStatus<String>(new DataMap(), "key");
            RestLiServiceException newException = new RestLiServiceException(HttpStatus.S_500_INTERNAL_SERVER_ERROR);
            BatchCreateResponseEnvelope.CollectionCreateResponseItem successCreateItem = new BatchCreateResponseEnvelope.CollectionCreateResponseItem(newCreateIdStatus);
            BatchCreateResponseEnvelope.CollectionCreateResponseItem exceptionCreateItem = new BatchCreateResponseEnvelope.CollectionCreateResponseItem(newException, "id2");
            List<BatchCreateResponseEnvelope.CollectionCreateResponseItem> newCreateResponses = Arrays.asList(successCreateItem, exceptionCreateItem);
            batchCreateResponseEnvelope.setCreateResponse(newCreateResponses, HttpStatus.S_200_OK);
            Assert.assertNotEquals(batchCreateResponseEnvelope.getCreateResponses(), oldCreateResponses);
            Assert.assertEquals(batchCreateResponseEnvelope.getCreateResponses(), newCreateResponses);
            BatchCreateResponseEnvelope.CollectionCreateResponseItem firstItem = batchCreateResponseEnvelope.getCreateResponses().get(0);
            Assert.assertNull(firstItem.getId());
            Assert.assertEquals(firstItem.getRecord(), newCreateIdStatus);
            Assert.assertFalse(firstItem.isErrorResponse());
            Assert.assertNull(firstItem.getException());
            BatchCreateResponseEnvelope.CollectionCreateResponseItem secondItem = batchCreateResponseEnvelope.getCreateResponses().get(1);
            Assert.assertEquals(secondItem.getId(), "id2");
            Assert.assertNull(secondItem.getRecord());
            Assert.assertTrue(secondItem.isErrorResponse());
            Assert.assertEquals(secondItem.getException(), newException);
            break;
        case BATCH_ENTITIES:
            BatchResponseEnvelope batchResponseEnvelope = (BatchResponseEnvelope) responseEnvelope;
            Map<?, BatchResponseEnvelope.BatchResponseEntry> oldBatchResponses = batchResponseEnvelope.getBatchResponseMap();
            RecordTemplate newResponseRecord = new EmptyRecord();
            RestLiServiceException newResponseException = new RestLiServiceException(HttpStatus.S_500_INTERNAL_SERVER_ERROR);
            Map<String, BatchResponseEnvelope.BatchResponseEntry> newBatchResponses = new HashMap<String, BatchResponseEnvelope.BatchResponseEntry>();
            newBatchResponses.put("id1", new BatchResponseEnvelope.BatchResponseEntry(HttpStatus.S_200_OK, newResponseRecord));
            newBatchResponses.put("id2", new BatchResponseEnvelope.BatchResponseEntry(HttpStatus.S_500_INTERNAL_SERVER_ERROR, newResponseException));
            batchResponseEnvelope.setBatchResponseMap(newBatchResponses, HttpStatus.S_200_OK);
            Map<?, BatchResponseEnvelope.BatchResponseEntry> envelopeMap = batchResponseEnvelope.getBatchResponseMap();
            Assert.assertNotEquals(envelopeMap, oldBatchResponses);
            Assert.assertEquals(envelopeMap, newBatchResponses);
            BatchResponseEnvelope.BatchResponseEntry id1Entry = envelopeMap.get("id1");
            Assert.assertEquals(id1Entry.getStatus(), HttpStatus.S_200_OK);
            Assert.assertEquals(id1Entry.getRecord(), newResponseRecord);
            Assert.assertFalse(id1Entry.hasException());
            Assert.assertNull(id1Entry.getException());
            BatchResponseEnvelope.BatchResponseEntry id2Entry = envelopeMap.get("id2");
            Assert.assertEquals(id2Entry.getStatus(), HttpStatus.S_500_INTERNAL_SERVER_ERROR);
            Assert.assertNull(id2Entry.getRecord());
            Assert.assertTrue(id2Entry.hasException());
            Assert.assertEquals(id2Entry.getException(), newResponseException);
            break;
        case STATUS_ONLY:
            // status only envelopes are blank by default since they have no data fields
            break;
        default:
            throw new IllegalStateException();
    }
}
Also used : EmptyRecord(com.linkedin.restli.common.EmptyRecord) CollectionMetadata(com.linkedin.restli.common.CollectionMetadata) AnyRecord(com.linkedin.restli.internal.server.methods.AnyRecord) HashMap(java.util.HashMap) CreateIdStatus(com.linkedin.restli.common.CreateIdStatus) ResponseType(com.linkedin.restli.internal.server.ResponseType) DataMap(com.linkedin.data.DataMap) RestLiServiceException(com.linkedin.restli.server.RestLiServiceException) RecordTemplate(com.linkedin.data.template.RecordTemplate) Test(org.testng.annotations.Test)

Aggregations

RecordTemplate (com.linkedin.data.template.RecordTemplate)59 DataMap (com.linkedin.data.DataMap)23 Test (org.testng.annotations.Test)23 RestLiServiceException (com.linkedin.restli.server.RestLiServiceException)10 ComplexResourceKey (com.linkedin.restli.common.ComplexResourceKey)9 DataList (com.linkedin.data.DataList)8 DynamicRecordTemplate (com.linkedin.data.template.DynamicRecordTemplate)8 ArrayList (java.util.ArrayList)8 PathSpec (com.linkedin.data.schema.PathSpec)7 TestRecord (com.linkedin.restli.client.test.TestRecord)7 AnyRecord (com.linkedin.restli.internal.server.methods.AnyRecord)7 FilterResponseContext (com.linkedin.restli.server.filter.FilterResponseContext)7 BeforeTest (org.testng.annotations.BeforeTest)7 ByteString (com.linkedin.data.ByteString)6 RestResponseBuilder (com.linkedin.r2.message.rest.RestResponseBuilder)6 EmptyRecord (com.linkedin.restli.common.EmptyRecord)6 RequestExecutionReport (com.linkedin.restli.server.RequestExecutionReport)6 RequestExecutionReportBuilder (com.linkedin.restli.server.RequestExecutionReportBuilder)6 RestLiResponseAttachments (com.linkedin.restli.server.RestLiResponseAttachments)6 RoutingException (com.linkedin.restli.server.RoutingException)6