Package io.cumul.sdk

Class Cumulio

java.lang.Object
io.cumul.sdk.Cumulio

public class Cumulio extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    Cumulio​(String key, String token)
     
    Cumulio​(String key, String token, String api_host)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.json.JSONObject
    associate​(String resource, String id, String associationRole, String associationId)
     
    org.json.JSONObject
    associate​(String resource, String id, String associationRole, String associationId, com.google.common.collect.ImmutableMap properties)
     
    org.json.JSONObject
    associate​(String resource, String id, String associationRole, String associationId, org.json.JSONObject properties)
     
    org.json.JSONObject
    create​(String resource, com.google.common.collect.ImmutableMap properties)
     
    org.json.JSONObject
    create​(String resource, com.google.common.collect.ImmutableMap properties, com.google.common.collect.ImmutableList associations)
     
    org.json.JSONObject
    create​(String resource, org.json.JSONObject properties)
     
    org.json.JSONObject
    create​(String resource, org.json.JSONObject properties, org.json.JSONArray associations)
     
    org.json.JSONObject
    delete​(String resource, String id)
     
    org.json.JSONObject
    delete​(String resource, String id, com.google.common.collect.ImmutableMap properties)
     
    org.json.JSONObject
    delete​(String resource, String id, org.json.JSONObject properties)
     
    org.json.JSONObject
    dissociate​(String resource, String id, String associationRole, String associationId)
     
    org.json.JSONObject
    get​(String resource, com.google.common.collect.ImmutableMap filter)
     
    org.json.JSONObject
    get​(String resource, org.json.JSONObject filter)
     
    org.json.JSONObject
    query​(com.google.common.collect.ImmutableMap filter)
     
    org.json.JSONObject
    query​(org.json.JSONObject filter)
     
    org.json.JSONObject
    update​(String resource, String id, com.google.common.collect.ImmutableMap properties)
     
    org.json.JSONObject
    update​(String resource, String id, org.json.JSONObject properties)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Cumulio

      public Cumulio(String key, String token)
      Parameters:
      key - String, your Cumul.io API Key
      token - String, your Cumul.io API Token
    • Cumulio

      public Cumulio(String key, String token, String api_host)
      Parameters:
      key - String, your Cumul.io API Key
      token - String, your Cumul.io API Token
      api_host - String, Cumul.io API endpoint
  • Method Details

    • create

      public org.json.JSONObject create(String resource, org.json.JSONObject properties) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      properties - JSONObject of resource properties
      Returns:
      JSONObject response if successful
      Throws:
      IOException - In case the 'create' call could not be succesfully completed
    • create

      public org.json.JSONObject create(String resource, com.google.common.collect.ImmutableMap properties) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      properties - JSONObject of resource properties
      Returns:
      JSONObject response if successful
      Throws:
      IOException - In case the 'create' call could not be succesfully completed
    • create

      public org.json.JSONObject create(String resource, com.google.common.collect.ImmutableMap properties, com.google.common.collect.ImmutableList associations) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      properties - ImmutableMap of resource properties
      associations - ImmutableList of associations
      Returns:
      JSONObject response if successful
      Throws:
      IOException - In case the 'create' call could not be succesfully completed
    • create

      public org.json.JSONObject create(String resource, org.json.JSONObject properties, org.json.JSONArray associations) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      properties - JSONObject of resource properties
      associations - JSONArray of associations
      Returns:
      JSONObject response if successful
      Throws:
      IOException - In case the 'create' call could not be succesfully completed
    • get

      public org.json.JSONObject get(String resource, com.google.common.collect.ImmutableMap filter) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      filter - ImmutableMap of filters
      Returns:
      JSONObject response if successful
      Throws:
      IOException - In case the 'get' call could not be succesfully completed
    • get

      public org.json.JSONObject get(String resource, org.json.JSONObject filter) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      filter - JSONObject of filters
      Returns:
      JSONObject response if successful
      Throws:
      IOException - In case the 'get' call could not be succesfully completed
    • delete

      public org.json.JSONObject delete(String resource, String id) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      id - String id of resouce to be deleted
      Returns:
      Empty Response
      Throws:
      IOException - In case the 'delete' call could not be succesfully completed
    • delete

      public org.json.JSONObject delete(String resource, String id, com.google.common.collect.ImmutableMap properties) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      id - String id of resource to be deleted
      properties - ImmutableMap properties of resource to be deleted
      Returns:
      Empty response
      Throws:
      IOException - In case the 'delete' call could not be succesfully completed
    • delete

      public org.json.JSONObject delete(String resource, String id, org.json.JSONObject properties) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      id - String id of resource to be deleted
      properties - JSONObject properties of resource to be deleted
      Returns:
      Empty response
      Throws:
      IOException - In case the 'delete' call could not be succesfully completed
    • update

      public org.json.JSONObject update(String resource, String id, com.google.common.collect.ImmutableMap properties) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      id - String id of resource to be updated
      properties - ImmutableMap properties of resource to be updated
      Returns:
      JSONObject response
      Throws:
      IOException - In case the 'update' call could not be succesfully completed
    • update

      public org.json.JSONObject update(String resource, String id, org.json.JSONObject properties) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      id - String id of resource to be updated
      properties - JSONObject properties of resource to be updated
      Returns:
      JSONObject response
      Throws:
      IOException - In case the 'update' call could not be succesfully completed
    • associate

      public org.json.JSONObject associate(String resource, String id, String associationRole, String associationId) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      id - String, id of resource
      associationRole - String
      associationId - String
      Returns:
      JSONObject
      Throws:
      IOException - In case the 'associate' call could not be succesfully completed
    • associate

      public org.json.JSONObject associate(String resource, String id, String associationRole, String associationId, com.google.common.collect.ImmutableMap properties) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      id - String, id of resource
      associationRole - String
      associationId - String
      properties - ImmutableMap of properties
      Returns:
      JSONObject
      Throws:
      IOException - In case the 'associate' call could not be succesfully completed
    • associate

      public org.json.JSONObject associate(String resource, String id, String associationRole, String associationId, org.json.JSONObject properties) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      id - String, id of resource
      associationRole - String
      associationId - String
      properties - JSONObject of properties
      Returns:
      JSONObject
      Throws:
      IOException - In case the 'associate' call could not be succesfully completed
    • dissociate

      public org.json.JSONObject dissociate(String resource, String id, String associationRole, String associationId) throws IOException
      Parameters:
      resource - String, the resource type E.g.'securable'
      id - String, id of resource
      associationRole - String
      associationId - String
      Returns:
      JSONObject
      Throws:
      IOException - In case the 'dissociate' call could not be succesfully completed
    • query

      public org.json.JSONObject query(org.json.JSONObject filter) throws IOException
      Parameters:
      filter -
      Returns:
      Throws:
      IOException - In case the 'query' call could not be succesfully completed
    • query

      public org.json.JSONObject query(com.google.common.collect.ImmutableMap filter) throws IOException
      Parameters:
      filter -
      Returns:
      Throws:
      IOException - In case the 'query' call could not be succesfully completed