Package step.functions.packages.client
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
-
Field Summary
Fields inherited from class step.client.AbstractRemoteClient
client, cookies, credentials
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
deleteKeywordPackage
(String packlageId) Delete an existing Keyword packagelookupPackageByResourceName
(String resourceName) Retrieve aFunctionPackage
object based on the resourceName associated with it.newKeywordPackage
(File packageLibraryFile, File packageFile, Map<String, String> packageAttributes, String trackingField) Creates a new Keyword packagenewKeywordPackageWithLibReference
(LibFileReference packageLib, File packageFile, Map<String, String> packageAttributes, String trackingField) Creates a new Keyword packageupdateKeywordPackageById
(FunctionPackage previousPackage, File packageLibraryFile, File packageFile, Map<String, String> packageAttributes, String trackingField) Update an existing Keyword package identified by its ObjectIdupdateKeywordPackageWithLibReference
(FunctionPackage previousPackage, LibFileReference packageLib, File packageFile, Map<String, String> packageAttributes, String trackingField) Update an existing Keyword package identified by its ObjectIdupdateResourceBasedKeywordPackage
(File packageLibraryFile, File packageFile, Map<String, String> packageAttributes) 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.protected Resource
Methods inherited from class step.client.AbstractRemoteClient
executeRequest, notImplemented, requestBuilder, requestBuilder
-
Constructor Details
-
RemoteFunctionPackageClientImpl
public RemoteFunctionPackageClientImpl() -
RemoteFunctionPackageClientImpl
-
-
Method Details
-
newKeywordPackage
public FunctionPackage newKeywordPackage(File packageLibraryFile, File packageFile, Map<String, String> packageAttributes, String trackingField) throws IOExceptionDescription copied from interface:FunctionPackageClient
Creates a new Keyword package- Specified by:
newKeywordPackage
in interfaceFunctionPackageClient
- Parameters:
packageLibraryFile
- a ZippackageFile
- the Jar/DLL file containing the Keyword definitions. The file will be uploaded to the ControllerpackageAttributes
- 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 IOExceptionDescription copied from interface:FunctionPackageClient
Update an existing Keyword package identified by its ObjectId- Specified by:
updateKeywordPackageById
in interfaceFunctionPackageClient
- Parameters:
previousPackage
- the older version of theFunctionPackage
obtained at creation time (i.e returned by newKeywordPackage)packageLibraryFile
- a ZippackageFile
- the Jar/DLL file containing the Keyword definitions. The file will be uploaded to the ControllerpackageAttributes
- (optional) the attributes the keyword package can be identified with, by default the resource name will be usedtrackingField
- (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 IOExceptionDescription copied from interface:FunctionPackageClient
Creates a new Keyword package- Specified by:
newKeywordPackageWithLibReference
in interfaceFunctionPackageClient
- 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 ControllerpackageAttributes
- 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 IOExceptionDescription copied from interface:FunctionPackageClient
Update an existing Keyword package identified by its ObjectId- Specified by:
updateKeywordPackageWithLibReference
in interfaceFunctionPackageClient
- Parameters:
previousPackage
- the older version of theFunctionPackage
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 ControllerpackageAttributes
- (optional) the attributes the keyword package can be identified with, by default the resource name will be usedtrackingField
- (optional) the attribute to determine the uniqueness of the function package- Returns:
- the updated
FunctionPackage
- Throws:
IOException
- in case of any error
-
deleteKeywordPackage
Description copied from interface:FunctionPackageClient
Delete an existing Keyword package- Specified by:
deleteKeywordPackage
in interfaceFunctionPackageClient
- Parameters:
packlageId
- the ID of the package
-
updateResourceBasedKeywordPackage
public FunctionPackage updateResourceBasedKeywordPackage(File packageLibraryFile, File packageFile, Map<String, String> packageAttributes) throws IOExceptionDescription 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 interfaceFunctionPackageClient
- Parameters:
packageLibraryFile
- a ZippackageFile
- the Jar/DLL file containing the Keyword definitions. The file will be uploaded to the ControllerpackageAttributes
- (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
Description copied from interface:FunctionPackageClient
Retrieve aFunctionPackage
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 interfaceFunctionPackageClient
- Parameters:
resourceName
- the name of the Resource that the searchedFunctionPackage
relies on- Returns:
- the corresponding
FunctionPackage
, if any match occurred - Throws:
IOException
- in case of any error
-
upload
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classAbstractRemoteClient
- Throws:
IOException
-