Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • You can open this project in IntelliJ IDEA or Eclipse, or any other suitable editor like Visual Studio Code.
  • For Eclipse, use Import -> Maven -> Existing Maven Projects (by pointing to the pom.xml file) or Import -> General -> Existing projects into Workspace (by pointing to the .project file)
  • Before running this code, you need to make sure that the Syndeia Cloud API is running
  • You can run the tests in com.intercax.syndeia.services.CloudServiceTests to see how a particular Syndeia Cloud API endpoint is called
  • Alternatively, you can run the main method of the com.intercax.syndeia.CloudApiDemo project to see examples of invoking a few of the Syndeia Cloud API endpoints
  • Both the main method and the tests assume some values (like the IP address, port, username and password) for where the Syndeia Cloud API is running. So before running either the tests or the main method, please get the required credentials from Syndeia Cloud administrator and use the relevant values.

How to extend this code (for trying out other Syndeia Cloud API endpoints)

  • You need to figure out the URL of the particular Syndeia Cloud API endpoint, whether that endpoint is exposed over HTTP Get, Post, Put, Delete (verbs) methods, and if it accepts any parameters
  • Typically, the Post and Put methods expect some payload (data in JSON format) for the resource that has to be created / updated on the server
  • The Get methods might also need some values for parameters that are part of the URL
  • Most likely, there will be a method in the com.intercax.syndeia.services.CloudServiceUrlHelper class that will be returning a correct URL by accepting (a few) parameters - if such a method is missing, you may add one accordingly
  • Finally, you'll need to add a new method to the com.intercax.syndeia.services.CloudService class and use the URL returned by one of the methods in CloudServiceUrlHelper and then passing this URL and the type of response expected to one of the (get, getAll) methods in CoreCloudService class
  • Typically, the methods in the the com.intercax.syndeia.services.CloudServiceCloudService class return `Either<ErrorResponseEither<ErrorResponse, *Response<T>>Response<T>> where -
    • *Response is one of ObjResponse(for single values), SeqResponse (for a list of values) or CreatedResponse (if something got created on the server)
    • T is one of the domain objects from the com.intercax.syndeia.domain package

...