Class ObjectsResource


  • public final class ObjectsResource
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      BulkOperation bulkDeleteInCollection​(java.lang.String collection, java.util.List<java.lang.String> object_ids)
      Bulk deletes up to 100 objects at a time within a collection, returning an asynchronous BulkOperation that can be used to monitor the progress of the operation.
      BulkOperation bulkSetInCollection​(java.lang.String collection, java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> objects)
      Bulk sets up to 100 objects at a time within a collection, returning an asynchronous BulkOperation that can be used to monitor the progress of the operation.
      void delete​(java.lang.String collection, java.lang.String objectId)
      Delete properties for a specific collection of a KnockObject
      boolean equals​(java.lang.Object o)  
      KnockObject get​(java.lang.String collection, java.lang.String objectId)
      Retrieve a KnockObject
      ChannelData getChannelData​(java.lang.String collection, java.lang.String objectId, java.lang.String channelId)
      Retrieve the ChannelData for a specific KnockObject Collection, and Channel.
      KnockHttp getKnockHttp()  
      CursorResult<KnockMessage> getMessages​(java.lang.String collection, java.lang.String objectId, MessagesResource.QueryParams queryParams)
      Retrieve a CursorResult of KnockMessages for a specific KnockObject Collection.
      java.util.List<PreferenceSet> getPreferences​(java.lang.String collection, java.lang.String objectId)
      Retrieve a list of PreferenceSets for a specific KnockObject Collection.
      PreferenceSet getPreferencesById​(java.lang.String collection, java.lang.String objectId, java.lang.String preferenceId)
      Retrieve a specific PreferenceSet for a KnockObject Collection
      int hashCode()  
      KnockObject set​(java.lang.String collection, java.lang.String objectId, java.util.Map<java.lang.String,​java.lang.Object> properties)
      Set a map of properties for a specific Collection of a KnockObject.
      ChannelData setChannelData​(java.lang.String collection, java.lang.String objectId, java.lang.String channelId, java.util.Map<java.lang.String,​java.lang.Object> data)
      Set a map of data for a specific KnockObject Collection, and Channel.
      PreferenceSet setPreferences​(java.lang.String collection, java.lang.String objectId, java.lang.String preferenceId, PreferenceSetRequest preferenceSetRequest)
      Set preferences for a specific PreferenceSet on a KnockObject Collection.
      java.lang.String toString()  
      void unsetChannelData​(java.lang.String collection, java.lang.String objectId, java.lang.String channelId)
      Delete any data for a specific KnockObject Collection, and Channel.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ObjectsResource

        public ObjectsResource​(KnockHttp knockHttp)
    • Method Detail

      • get

        public KnockObject get​(java.lang.String collection,
                               java.lang.String objectId)
        Retrieve a KnockObject
        Parameters:
        collection -
        objectId -
        Returns:
        KnockObject
        Throws:
        KnockClientResourceException - Unable able to retrieve KnockObject from the resource
      • set

        public KnockObject set​(java.lang.String collection,
                               java.lang.String objectId,
                               java.util.Map<java.lang.String,​java.lang.Object> properties)
        Set a map of properties for a specific Collection of a KnockObject.
        Parameters:
        collection -
        objectId -
        properties -
        Returns:
      • delete

        public void delete​(java.lang.String collection,
                           java.lang.String objectId)
        Delete properties for a specific collection of a KnockObject
        Parameters:
        collection -
        objectId -
      • getChannelData

        public ChannelData getChannelData​(java.lang.String collection,
                                          java.lang.String objectId,
                                          java.lang.String channelId)
        Retrieve the ChannelData for a specific KnockObject Collection, and Channel.
        Parameters:
        collection -
        objectId -
        channelId -
        Returns:
      • setChannelData

        public ChannelData setChannelData​(java.lang.String collection,
                                          java.lang.String objectId,
                                          java.lang.String channelId,
                                          java.util.Map<java.lang.String,​java.lang.Object> data)
        Set a map of data for a specific KnockObject Collection, and Channel.
        Parameters:
        collection -
        objectId -
        channelId -
        data -
        Returns:
      • unsetChannelData

        public void unsetChannelData​(java.lang.String collection,
                                     java.lang.String objectId,
                                     java.lang.String channelId)
        Delete any data for a specific KnockObject Collection, and Channel.
        Parameters:
        collection -
        objectId -
        channelId -
      • getMessages

        public CursorResult<KnockMessage> getMessages​(java.lang.String collection,
                                                      java.lang.String objectId,
                                                      MessagesResource.QueryParams queryParams)
        Retrieve a CursorResult of KnockMessages for a specific KnockObject Collection.
        Parameters:
        collection -
        objectId -
        Returns:
      • getPreferences

        public java.util.List<PreferenceSet> getPreferences​(java.lang.String collection,
                                                            java.lang.String objectId)
        Retrieve a list of PreferenceSets for a specific KnockObject Collection.
        Parameters:
        collection -
        objectId -
        Returns:
      • getPreferencesById

        public PreferenceSet getPreferencesById​(java.lang.String collection,
                                                java.lang.String objectId,
                                                java.lang.String preferenceId)
        Retrieve a specific PreferenceSet for a KnockObject Collection
        Parameters:
        collection -
        objectId -
        preferenceId -
        Returns:
      • setPreferences

        public PreferenceSet setPreferences​(java.lang.String collection,
                                            java.lang.String objectId,
                                            java.lang.String preferenceId,
                                            PreferenceSetRequest preferenceSetRequest)
        Set preferences for a specific PreferenceSet on a KnockObject Collection.
        Parameters:
        collection -
        objectId -
        preferenceId -
        preferenceSetRequest -
        Returns:
      • bulkSetInCollection

        public BulkOperation bulkSetInCollection​(java.lang.String collection,
                                                 java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> objects)
        Bulk sets up to 100 objects at a time within a collection, returning an asynchronous BulkOperation that can be used to monitor the progress of the operation.

        Each object map in the objects list must have a key of 'id' that has a non-null string value.

        Parameters:
        collection -
        objects -
        Returns:
        a bulk operation
      • bulkDeleteInCollection

        public BulkOperation bulkDeleteInCollection​(java.lang.String collection,
                                                    java.util.List<java.lang.String> object_ids)
        Bulk deletes up to 100 objects at a time within a collection, returning an asynchronous BulkOperation that can be used to monitor the progress of the operation.
        Parameters:
        collection -
        object_ids -
        Returns:
        a bulk operation
      • getKnockHttp

        public KnockHttp getKnockHttp()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object