Interface MorpheusAccountInventoryService


  • public interface MorpheusAccountInventoryService
    Provides operation methods for interacting with AccountInventory objects. These are mostly related to Ansible tower and ansible in general and is not yet that extensible but could be in the future.
    Since:
    5.3.1
    • Method Detail

      • listIdentityProjections

        io.reactivex.Observable<AccountInventoryIdentityProjection> listIdentityProjections​(AccountIntegration accountIntegration)
        Lists all inventory projection objects for a specified integration id. The projection is a subset of the properties on a full AccountInventory object for sync matching.
        Parameters:
        accountIntegration - the AccountIntegration identifier associated to the inventories to be listed.
        Returns:
        an RxJava Observable stream of result projection objects.
      • listById

        io.reactivex.Observable<AccountInventory> listById​(java.util.Collection<java.lang.Long> ids)
        Lists all AccountInventory objects by a list of Identifiers. This is commonly used in sync / caching logic.
        Parameters:
        ids - list of ids to grab AccountInventory objects from.
        Returns:
        an RxJava Observable stream of AccountInventory to be subscribed to.
      • remove

        io.reactivex.Single<java.lang.Boolean> remove​(java.util.List<AccountInventoryIdentityProjection> removeList)
        Removes Missing AccountInventories on the Morpheus side. This accepts the Projection Object instead of the main Object. It is important to note this is a Observer pattern and must be subscribed to in order for the action to occur

        Example:

        
         morpheusContext.getIntegration().getAccountInventory().remove(removeItems).blockingGet()
         
        Parameters:
        removeList - a list of AccountInventory projections to be removed
        Returns:
        a Single Observable returning the success status of the operation.
      • create

        io.reactivex.Single<java.lang.Boolean> create​(java.util.List<AccountInventory> addList)
        Creates new AccountInventory Domains from cache / sync implementations This ensures the refType and refId match the poolServer as well as the owner default
        Parameters:
        addList - List of new AccountInventory objects to be inserted into the database
        Returns:
        notification of completion if someone really cares about it
      • save

        io.reactivex.Single<java.lang.Boolean> save​(java.util.List<AccountInventory> accountInventoriesToSave)
        Saves a list of AccountInventory objects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.
        Parameters:
        accountInventoriesToSave - a List of AccountInventory objects that need to be updated in the database.
        Returns:
        the Single Observable stating the success state of the save attempt
      • save

        io.reactivex.Single<AccountInventory> save​(AccountInventory accountInventoryToSave)
        Saves a AccountInventory object. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.
        Parameters:
        accountInventoryToSave - a AccountInventory Object that need to be updated in the database.
        Returns:
        the Single Observable stating the resultant AccountInventory Object