public class MartiniMethods extends Object
Constructor and Description |
---|
MartiniMethods(io.toro.martini.ipackage.EndpointStateAttacher endpointStateAttacher,
PackageManager packageManager,
io.toro.martini.ipackage.MartiniPackageSerializer martiniPackageSerializer,
io.toro.martini.ipackage.MartiniPackageDependencyResolver martiniPackageDependencyResolver,
io.toro.martini.ipackage.MartiniPackageImportExportService martiniPackageImportExportService,
io.toro.martini.ipackage.PackageInfoService packageInfoService,
com.google.common.base.Converter<io.toro.martini.ipackage.PackageDescriptor,io.toro.gloop.object.property.GloopModel> packageDescriptorGloopModelConverter,
com.google.common.base.Converter<io.toro.martini.ipackage.PackageConfig,io.toro.gloop.object.property.GloopModel> packageConfigGloopModelConverter) |
Modifier and Type | Method and Description |
---|---|
static io.toro.gloop.object.property.GloopModel |
addPackage(io.toro.gloop.object.property.GloopModel martiniPackage,
String stateOnCreate,
boolean resolveParent)
Returns the package with the given name, if it exists
|
static io.toro.gloop.object.property.GloopModel |
addPackage(String packageName,
String id,
String version,
String stateOnCreate,
boolean resolveParent)
Deprecated.
|
static void |
deleteEndpoint(String packageName,
String endpointName)
Deletes the endpoint
|
static void |
deletePackage(String packageName)
Deletes the package with the given name
|
static void |
disableEndpoint(String packageName,
String endpointName)
Disables the endpoint
|
static void |
enableEndpoint(String packageName,
String endpointName)
Enables the endpoint
|
static io.toro.gloop.object.property.GloopModel |
getChildPackages(String packageName)
Gets the child packages of the package with the given name
|
static io.toro.gloop.object.property.GloopModel |
getPackage(String packageName)
Returns the package with the given name, if it exists
|
static io.toro.gloop.object.property.GloopModel |
getPackages()
Returns all the packages currently installed on this instance of Martini
|
static String |
getPackageXml(String packageName)
Gets the xml as a string of the package with the given name
|
static io.toro.gloop.object.property.GloopModel |
getParentPackages(String packageName)
Gets the parent packages of the package with the given name
|
static io.toro.gloop.object.property.GloopModel |
importPackage(InputStream inputStream,
String stateOnCreate,
boolean resolveParent,
boolean replaceExisting)
Imports the package that the input stream is pointing to
|
static io.toro.gloop.object.property.GloopModel |
importPackage(Path path,
String stateOnCreate,
boolean resolveParent,
boolean replaceExisting)
Imports the package that the path points to
|
static void |
loadPackage(String packageName,
boolean resolveParent)
Loads the package with the given name
|
static io.toro.gloop.object.property.GloopModel |
packageConfigToGloopModel(MartiniPackage martiniPackage) |
static io.toro.gloop.object.property.GloopModel |
packageConfigToGloopModel(io.toro.martini.ipackage.PackageConfig packageConfig) |
static void |
saveEndpoint(String packageName,
io.toro.gloop.object.property.GloopModel endpoint)
Saves the endpoint to the package with the given name
|
static void |
savePackage(io.toro.gloop.object.property.GloopModel martiniPackage)
Saves the package
|
static void |
startEndpoint(String packageName,
String endpointName)
Starts the endpoint
|
static void |
startPackage(String packageName)
Starts the package with the given name
|
static void |
stopEndpoint(String packageName,
String endpointName)
Stops the endpoint
|
static void |
stopPackage(String packageName)
Stops the package with the given name
|
static void |
unloadPackage(String packageName,
boolean resolveChild)
Unloads the package with the given name
|
static void |
validateEndpoint(String packageName,
io.toro.gloop.object.property.GloopModel endpoint)
Validates the endpoint, throwing an exception if the endpoint is invalid
|
@Autowired public MartiniMethods(io.toro.martini.ipackage.EndpointStateAttacher endpointStateAttacher, PackageManager packageManager, io.toro.martini.ipackage.MartiniPackageSerializer martiniPackageSerializer, io.toro.martini.ipackage.MartiniPackageDependencyResolver martiniPackageDependencyResolver, io.toro.martini.ipackage.MartiniPackageImportExportService martiniPackageImportExportService, io.toro.martini.ipackage.PackageInfoService packageInfoService, @Qualifier(value="packageDescriptorConverter") com.google.common.base.Converter<io.toro.martini.ipackage.PackageDescriptor,io.toro.gloop.object.property.GloopModel> packageDescriptorGloopModelConverter, @Qualifier(value="packageConfigConverter") com.google.common.base.Converter<io.toro.martini.ipackage.PackageConfig,io.toro.gloop.object.property.GloopModel> packageConfigGloopModelConverter)
@GloopComment(value="Returns all the packages currently installed on this instance of Martini") @GloopObjectParameter(value="martiniPackages{\n martiniPackages#io.toro.martini.package.Package[]{\n }\n}") public static io.toro.gloop.object.property.GloopModel getPackages()
Martini packages
@GloopComment(value="Returns the package with the given name, if it exists") @GloopObjectParameter(value="martiniPackage{\n martiniPackage#io.toro.martini.package.Package{\n }\n}") public static io.toro.gloop.object.property.GloopModel getPackage(@GloopParameter(allowNull=false) String packageName)
packageName
- name of Martini packagepackage
public static void loadPackage(@GloopParameter(allowNull=false) String packageName, @GloopParameter(defaultValue="true") boolean resolveParent) throws io.toro.martini.ipackage.exception.PackageLifeCycleException
packageName
- name of Martini packageresolveParent
- whether to also load the dependencies of the package name
io.toro.martini.ipackage.exception.PackageLifeCycleException
public static void unloadPackage(@GloopParameter(allowNull=false) String packageName, @GloopParameter(defaultValue="true") boolean resolveChild) throws io.toro.martini.ipackage.exception.PackageLifeCycleException
packageName
- name of Martini packageresolveChild
- whether to also unload the packages that depends on the package name
io.toro.martini.ipackage.exception.PackageLifeCycleException
@Deprecated @GloopComment(value="Returns the package with the given name, if it exists") @GloopObjectParameter(value="martiniPackage{\n martiniPackage#io.toro.martini.package.Package{\n }\n}") public static io.toro.gloop.object.property.GloopModel addPackage(@GloopParameter(allowNull=false) String packageName, @GloopParameter(allowNull=false) String id, @GloopParameter(allowNull=false) String version, @GloopParameter(choices={"STARTED","LOADED","UNLOADED"},allowNull=false) String stateOnCreate, @GloopParameter(defaultValue="true") boolean resolveParent) throws io.toro.martini.ipackage.exception.PackageLifeCycleException
addPackage(GloopModel, String, boolean)
packageName
- name of Martini packageid
- marketplace ID of Martini packageversion
- version of Martini packagepackage
that has been addedio.toro.martini.ipackage.exception.PackageLifeCycleException
@GloopComment(value="Returns the package with the given name, if it exists") @GloopObjectParameter(value="martiniPackage{\n martiniPackage#io.toro.martini.package.Package{\n }\n}") public static io.toro.gloop.object.property.GloopModel addPackage(@GloopObjectParameter(value="martiniPackage#io.toro.martini.package.PackageDescriptor::false{\n}") io.toro.gloop.object.property.GloopModel martiniPackage, @GloopParameter(choices={"STARTED","LOADED","UNLOADED"},allowNull=false) String stateOnCreate, @GloopParameter(defaultValue="true") boolean resolveParent) throws io.toro.martini.ipackage.exception.PackageLifeCycleException
@GloopComment(value="Saves the package") public static void savePackage(@GloopObjectParameter(value="martiniPackage#io.toro.martini.package.Package::false{\n}") io.toro.gloop.object.property.GloopModel martiniPackage)
@GloopComment(value="Deletes the package with the given name") public static void deletePackage(@GloopParameter(allowNull=false) String packageName)
packageName
- name of Martini package@GloopComment(value="Starts the package with the given name") public static void startPackage(@GloopParameter(allowNull=false) String packageName) throws io.toro.martini.ipackage.exception.PackageLifeCycleException
packageName
- name of Martini packageio.toro.martini.ipackage.exception.PackageLifeCycleException
@GloopComment(value="Stops the package with the given name") public static void stopPackage(@GloopParameter(allowNull=false) String packageName) throws io.toro.martini.ipackage.exception.PackageLifeCycleException
packageName
- name of Martini packageio.toro.martini.ipackage.exception.PackageLifeCycleException
@GloopObjectParameter(value="martiniPackages{\n martiniPackages#io.toro.martini.package.PackageDescriptor[]{\n }\n}") @GloopComment(value="Gets the child packages of the package with the given name") public static io.toro.gloop.object.property.GloopModel getChildPackages(@GloopParameter(allowNull=false) String packageName)
packageName
- name of Martini packagepackage
child@GloopComment(value="Gets the xml as a string of the package with the given name") public static String getPackageXml(@GloopParameter(allowNull=false) String packageName)
packageName
- name of Martini package@GloopObjectParameter(value="martiniPackages{\n martiniPackages#io.toro.martini.package.PackageDescriptor[]{\n }\n}") @GloopComment(value="Gets the parent packages of the package with the given name") public static io.toro.gloop.object.property.GloopModel getParentPackages(@GloopParameter(allowNull=false) String packageName)
packageName
- name of Martini packagepackage
parent@GloopObjectParameter(value="martiniPackages{\n martiniPackages#io.toro.martini.package.Package[]{\n }\n}") @GloopComment(value="Imports the package that the path points to") public static io.toro.gloop.object.property.GloopModel importPackage(@GloopParameter(allowNull=false) Path path, @GloopParameter(choices={"STARTED","LOADED","UNLOADED"}) String stateOnCreate, @GloopParameter(defaultValue="true") boolean resolveParent, @GloopParameter(allowNull=false,defaultValue="false") boolean replaceExisting) throws IOException
path
- Martini package pathstateOnCreate
- the state package will be on when import is successfulreplaceExisting
- replace existing packagepackage
IOException
@GloopObjectParameter(value="martiniPackages{\n martiniPackages#io.toro.martini.package.Package[]{\n }\n}") @GloopComment(value="Imports the package that the input stream is pointing to") public static io.toro.gloop.object.property.GloopModel importPackage(@GloopParameter(allowNull=false) InputStream inputStream, @GloopParameter(choices={"STARTED","LOADED","UNLOADED"}) String stateOnCreate, @GloopParameter(defaultValue="true") boolean resolveParent, @GloopParameter(allowNull=false,defaultValue="false") boolean replaceExisting) throws IOException
inputStream
- Martini package InputStreamstateOnCreate
- the state package will be on when import is successfulreplaceExisting
- replace existing packagepackage
IOException
@GloopComment(value="Validates the endpoint, throwing an exception if the endpoint is invalid") public static void validateEndpoint(@GloopParameter(allowNull=false) String packageName, @GloopObjectParameter(value="endpoint#io.toro.martini.package.Endpoint::false{\n}") io.toro.gloop.object.property.GloopModel endpoint)
packageName
- name of Martini packageendpoint
- name of endpoint@GloopComment(value="Saves the endpoint to the package with the given name") public static void saveEndpoint(@GloopParameter(allowNull=false) String packageName, @GloopObjectParameter(value="endpoint#io.toro.martini.package.Endpoint::false{\n}") io.toro.gloop.object.property.GloopModel endpoint)
packageName
- name of Martini packageendpoint
- name of endpoint@GloopComment(value="Starts the endpoint") public static void startEndpoint(@GloopParameter(allowNull=false) String packageName, @GloopParameter(allowNull=false) String endpointName)
packageName
- name of Martini packageendpointName
- name of endpoint@GloopComment(value="Enables the endpoint") public static void enableEndpoint(@GloopParameter(allowNull=false) String packageName, @GloopParameter(allowNull=false) String endpointName)
packageName
- name of Martini packageendpointName
- name of endpoint@GloopComment(value="Disables the endpoint") public static void disableEndpoint(@GloopParameter(allowNull=false) String packageName, @GloopParameter(allowNull=false) String endpointName)
packageName
- name of Martini packageendpointName
- name of endpoint@GloopComment(value="Stops the endpoint") public static void stopEndpoint(@GloopParameter(allowNull=false) String packageName, @GloopParameter(allowNull=false) String endpointName)
packageName
- name of Martini packageendpointName
- name of endpoint@GloopComment(value="Deletes the endpoint") public static void deleteEndpoint(@GloopParameter(allowNull=false) String packageName, @GloopParameter(allowNull=false) String endpointName)
packageName
- name of Martini packageendpointName
- name of endpointpublic static io.toro.gloop.object.property.GloopModel packageConfigToGloopModel(MartiniPackage martiniPackage)
public static io.toro.gloop.object.property.GloopModel packageConfigToGloopModel(io.toro.martini.ipackage.PackageConfig packageConfig)
Copyright © 2019. All rights reserved.