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 step.client.AbstractRemoteClient implements FunctionPackageClient
-
-
Constructor Summary
Constructors Constructor Description RemoteFunctionPackageClientImpl()RemoteFunctionPackageClientImpl(step.client.credentials.ControllerCredentials credentials)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voiddeleteKeywordPackage(String packlageId)Delete an existing Keyword packageFunctionPackagelookupPackageByResourceName(String resourceName)Retrieve aFunctionPackageobject based on the resourceName associated with it.FunctionPackagenewKeywordPackage(File packageLibraryFile, File packageFile, Map<String,String> packageAttributes)Creates a new Keyword packageFunctionPackageupdateKeywordPackageById(FunctionPackage previousPackage, File packageLibraryFile, File packageFile, Map<String,String> packageAttributes)Update an existing Keyword package identified by its ObjectIdFunctionPackageupdateResourceBasedKeywordPackage(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 step.resources.Resourceupload(File file)
-
-
-
Method Detail
-
newKeywordPackage
public FunctionPackage newKeywordPackage(File packageLibraryFile, File packageFile, Map<String,String> packageAttributes) throws IOException
Description copied from interface:FunctionPackageClientCreates a new Keyword package- Specified by:
newKeywordPackagein 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)- 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) throws IOException
Description copied from interface:FunctionPackageClientUpdate an existing Keyword package identified by its ObjectId- Specified by:
updateKeywordPackageByIdin interfaceFunctionPackageClient- Parameters:
previousPackage- the older version of theFunctionPackageobtained 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 used- Returns:
- the updated
FunctionPackage - Throws:
IOException- in case of any error
-
deleteKeywordPackage
public void deleteKeywordPackage(String packlageId)
Description copied from interface:FunctionPackageClientDelete an existing Keyword package- Specified by:
deleteKeywordPackagein interfaceFunctionPackageClient
-
updateResourceBasedKeywordPackage
public FunctionPackage updateResourceBasedKeywordPackage(File packageLibraryFile, File packageFile, Map<String,String> packageAttributes) throws IOException
Description copied from interface:FunctionPackageClientUpdate 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:
updateResourceBasedKeywordPackagein 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
public FunctionPackage lookupPackageByResourceName(String resourceName) throws IOException
Description copied from interface:FunctionPackageClientRetrieve aFunctionPackageobject 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:
lookupPackageByResourceNamein interfaceFunctionPackageClient- Parameters:
resourceName- the name of the Resource that the searchedFunctionPackagerelies on- Returns:
- the corresponding
FunctionPackage, if any match occurred - Throws:
IOException- in case of any error
-
upload
protected step.resources.Resource upload(File file) throws IOException
- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classstep.client.AbstractRemoteClient- Throws:
IOException
-
-