Class RemoteFunctionPackageClientImpl

java.lang.Object
step.client.AbstractRemoteClient
step.functions.packages.client.RemoteFunctionPackageClientImpl
All Implemented Interfaces:
Closeable, AutoCloseable, FunctionPackageClient

public class RemoteFunctionPackageClientImpl extends AbstractRemoteClient implements FunctionPackageClient
  • Constructor Details

    • RemoteFunctionPackageClientImpl

      public RemoteFunctionPackageClientImpl()
    • RemoteFunctionPackageClientImpl

      public RemoteFunctionPackageClientImpl(ControllerCredentials credentials)
  • Method Details

    • newKeywordPackage

      public FunctionPackage newKeywordPackage(File packageLibraryFile, File packageFile, Map<String,String> packageAttributes, String trackingField) throws IOException
      Description copied from interface: FunctionPackageClient
      Creates a new Keyword package
      Specified by:
      newKeywordPackage in interface FunctionPackageClient
      Parameters:
      packageLibraryFile - a Zip
      packageFile - the Jar/DLL file containing the Keyword definitions. The file will be uploaded to the Controller
      packageAttributes - the attributes of the Keyword (ex: version, app, etc)
      trackingField - (optional) the attribute to determine the uniqueness of the function package
      Returns:
      the newly created FunctionPackage
      Throws:
      IOException - in case of any error
    • updateKeywordPackageById

      public FunctionPackage updateKeywordPackageById(FunctionPackage previousPackage, File packageLibraryFile, File packageFile, Map<String,String> packageAttributes, String trackingField) throws IOException
      Description copied from interface: FunctionPackageClient
      Update an existing Keyword package identified by its ObjectId
      Specified by:
      updateKeywordPackageById in interface FunctionPackageClient
      Parameters:
      previousPackage - the older version of the FunctionPackage obtained at creation time (i.e returned by newKeywordPackage)
      packageLibraryFile - a Zip
      packageFile - the Jar/DLL file containing the Keyword definitions. The file will be uploaded to the Controller
      packageAttributes - (optional) the attributes the keyword package can be identified with, by default the resource name will be used
      trackingField - (optional) the attribute to determine the uniqueness of the function package
      Returns:
      the updated FunctionPackage
      Throws:
      IOException - in case of any error
    • newKeywordPackageWithLibReference

      public FunctionPackage newKeywordPackageWithLibReference(LibFileReference packageLib, File packageFile, Map<String,String> packageAttributes, String trackingField) throws IOException
      Description copied from interface: FunctionPackageClient
      Creates a new Keyword package
      Specified by:
      newKeywordPackageWithLibReference in interface FunctionPackageClient
      Parameters:
      packageLib - the zip with additional libraries (the binary file to be loaded to the Controller or id of the already uploaded resource).
      packageFile - the Jar/DLL file containing the Keyword definitions. The file will be uploaded to the Controller
      packageAttributes - the attributes of the Keyword (ex: version, app, etc)
      trackingField - (optional) the attribute to determine the uniqueness of the function package
      Returns:
      the newly created FunctionPackage
      Throws:
      IOException - in case of any error
    • updateKeywordPackageWithLibReference

      public FunctionPackage updateKeywordPackageWithLibReference(FunctionPackage previousPackage, LibFileReference packageLib, File packageFile, Map<String,String> packageAttributes, String trackingField) throws IOException
      Description copied from interface: FunctionPackageClient
      Update an existing Keyword package identified by its ObjectId
      Specified by:
      updateKeywordPackageWithLibReference in interface FunctionPackageClient
      Parameters:
      previousPackage - the older version of the FunctionPackage obtained at creation time (i.e returned by newKeywordPackage)
      packageLib - the zip with additional libraries (the binary file to be loaded to the Controller or id of the already uploaded resource).
      packageFile - the Jar/DLL file containing the Keyword definitions. The file will be uploaded to the Controller
      packageAttributes - (optional) the attributes the keyword package can be identified with, by default the resource name will be used
      trackingField - (optional) the attribute to determine the uniqueness of the function package
      Returns:
      the updated FunctionPackage
      Throws:
      IOException - in case of any error
    • deleteKeywordPackage

      public void deleteKeywordPackage(String packlageId)
      Description copied from interface: FunctionPackageClient
      Delete an existing Keyword package
      Specified by:
      deleteKeywordPackage in interface FunctionPackageClient
      Parameters:
      packlageId - the ID of the package
    • updateResourceBasedKeywordPackage

      public FunctionPackage updateResourceBasedKeywordPackage(File packageLibraryFile, File packageFile, Map<String,String> packageAttributes) throws IOException
      Description copied from interface: FunctionPackageClient
      Update an existing Keyword package with a new version of the resource(s), the package is implicitly managed via resource name Warning: if multiple resources are created with the same name, or if multiple keyword packages reference the same resource, only the first match will be updated.
      Specified by:
      updateResourceBasedKeywordPackage in interface FunctionPackageClient
      Parameters:
      packageLibraryFile - a Zip
      packageFile - the Jar/DLL file containing the Keyword definitions. The file will be uploaded to the Controller
      packageAttributes - (optional) the attributes the keyword package can be identified with, by default the resource name will be used
      Returns:
      the updated FunctionPackage
      Throws:
      IOException - in case of any error
    • lookupPackageByResourceName

      public FunctionPackage lookupPackageByResourceName(String resourceName) throws IOException
      Description copied from interface: FunctionPackageClient
      Retrieve a FunctionPackage object based on the resourceName associated with it. Warning: if multiple resources are created with the same name, or if multiple keyword packages reference the same resource, only the first match will be updated.
      Specified by:
      lookupPackageByResourceName in interface FunctionPackageClient
      Parameters:
      resourceName - the name of the Resource that the searched FunctionPackage relies on
      Returns:
      the corresponding FunctionPackage, if any match occurred
      Throws:
      IOException - in case of any error
    • upload

      protected Resource upload(File file) throws IOException
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class AbstractRemoteClient
      Throws:
      IOException