Class RemoteFunctionPackageClientImpl

    • Constructor Detail

      • RemoteFunctionPackageClientImpl

        public RemoteFunctionPackageClientImpl()
      • RemoteFunctionPackageClientImpl

        public RemoteFunctionPackageClientImpl​(ControllerCredentials credentials)
    • Method Detail

      • newKeywordPackage

        public FunctionPackage newKeywordPackage​(java.io.File packageLibraryFile,
                                                 java.io.File packageFile,
                                                 java.util.Map<java.lang.String,​java.lang.String> packageAttributes)
                                          throws java.io.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)
        Returns:
        the newly created FunctionPackage
        Throws:
        java.io.IOException - in case of any error
      • updateKeywordPackageById

        public FunctionPackage updateKeywordPackageById​(FunctionPackage previousPackage,
                                                        java.io.File packageLibraryFile,
                                                        java.io.File packageFile,
                                                        java.util.Map<java.lang.String,​java.lang.String> packageAttributes)
                                                 throws java.io.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
        Returns:
        the updated FunctionPackage
        Throws:
        java.io.IOException - in case of any error
      • updateResourceBasedKeywordPackage

        public FunctionPackage updateResourceBasedKeywordPackage​(java.io.File packageLibraryFile,
                                                                 java.io.File packageFile,
                                                                 java.util.Map<java.lang.String,​java.lang.String> packageAttributes)
                                                          throws java.io.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:
        java.io.IOException - in case of any error
      • lookupPackageByResourceName

        public FunctionPackage lookupPackageByResourceName​(java.lang.String resourceName)
                                                    throws java.io.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:
        java.io.IOException - in case of any error
      • upload

        protected Resource upload​(java.io.File file)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • close

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