Interface MorpheusAccountInventoryService
-
public interface MorpheusAccountInventoryService
Provides operation methods for interacting withAccountInventory
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 defaultio.reactivex.Observable<AccountInventory>
listById(java.util.Collection<java.lang.Long> ids)
Lists allAccountInventory
objects by a list of Identifiers.io.reactivex.Observable<AccountInventoryIdentityProjection>
listIdentityProjections(AccountIntegration accountIntegration)
Lists all inventory projection objects for a specified integration id.io.reactivex.Single<java.lang.Boolean>
remove(java.util.List<AccountInventoryIdentityProjection> removeList)
Removes Missing AccountInventories on the Morpheus side.io.reactivex.Single<AccountInventory>
save(AccountInventory accountInventoryToSave)
Saves aAccountInventory
object.io.reactivex.Single<java.lang.Boolean>
save(java.util.List<AccountInventory> accountInventoriesToSave)
Saves a list ofAccountInventory
objects.
-
-
-
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 fullAccountInventory
object for sync matching.- Parameters:
accountIntegration
- theAccountIntegration
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 allAccountInventory
objects by a list of Identifiers. This is commonly used in sync / caching logic.- Parameters:
ids
- list of ids to grabAccountInventory
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 occurExample:
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 newAccountInventory
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 ofAccountInventory
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 aAccountInventory
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
-
-