Class RemoteBundle

All Implemented Interfaces:
Asset, Bundle

public class RemoteBundle
extends ARemoteAsset
implements Bundle
Class representing an Bundle Asset managed via a remote agent.
  • Constructor Details

  • Method Details

    • create

      public static RemoteBundle create​(RemoteAgent agent, String meta)
      Creates a RemoteAsset with the given metadata on the specified remote agent
      Parameters:
      agent - RemoteAgent on which to create the RemoteAsset
      meta - Asset metadata which must be a valid JSON string
      Returns:
      RemoteAsset
    • add

      public Bundle add​(String name, Asset asset)
      Description copied from interface: Bundle
      API to add a new sub-asset in existing bundle. It will add the sub-asset passed in the argument and return a new Bundle asset
      Specified by:
      add in interface Bundle
      Parameters:
      name - Name of the sub-asset
      asset - Asset the need to be added in existing bundle
      Returns:
      An new bundle including the sub asset passed
    • addAll

      public Bundle addAll​(Map<String,​Asset> assetMapp)
      Description copied from interface: Bundle
      API to create a new bundle adding all named sub-assets passed as parameters
      Specified by:
      addAll in interface Bundle
      Parameters:
      assetMapp - sub Asset map that need to be bundled
      Returns:
      An new bundle including the all thee given sub-assets passed as argument
    • get

      public <R extends Asset> R get​(String name)
      Description copied from interface: Bundle
      API to get an specific asset from an asset Bundle by asset name
      Specified by:
      get in interface Bundle
      Parameters:
      name - The name of the sub-asset
      Returns:
      The sub-asset referenced by the given name, or null if not present
    • getAll

      public Map<String,​Asset> getAll()
      Description copied from interface: Bundle
      API to get an immutable all named sub Asset belong to asset Bundle
      Specified by:
      getAll in interface Bundle
      Returns:
      A map of all sub-assets within this bundle