Tutorial 1 - Hello World
Tutorial 1 - Hello World
Introduction
In this tutorial, you will learn how to run an extension resource and use REST to interact with the resource. We will also take a closer look at the different components that make up a resource to see how the resource works to output "Hello World".
Make sure your development environment has been properly set up as described in Setting up your Developer Environment.
Source files
The files created in this tutorial are found in the tutorials zip under /Rest-Tutorials/rest-resource-helloworld directory.
Both the resource created in this tutorial and rest-resource-helloworld have the following directory structure:
permission.properties
permission.properties defines the resource's default role permissions. For more information on roles and permissions, see Cortex API Authorization: Roles and Permissions
HelloWorldMutator.java
HelloWorldMutator.java is the resource's mutator. It sets values to the resource's representation.
HelloWorldResourceOperatorImpl.java
HelloWorldResourceOperatorImpl.java is the resource's operator implementation. The operator is what processes requests to this resource.
HelloWorldRepresentation.java
HelloWorldRepresentation.java is the resource's representation. The representation is what the resource outputs to the kernel.
springCtx-import.xml
springCtx-import.xml imports the applicationContext-resource-server.xml file into Spring.