-
public interface DeploymentManagerAllows deployment operations to be executed on a running server. This will work with both standalone servers and managed domain servers.The server result for each deployment operation will be the result of a composite operation.
If the server is a managed domain server groups are required. If the server is a standalone server no server groups are allowed to be define. A failed
DeploymentResultwill be returned if the server groups are empty for a managed domain or populated for a standalone server.- Author:
- James R. Perkins
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classDeploymentManager.FactoryA factory to create a new deployment manager
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DeploymentResultdeploy(Set<Deployment> deployments)Deploys the content of each deployment to the server.DeploymentResultdeploy(Deployment deployment)Deploys the content to the server.DeploymentResultdeployToRuntime(Set<DeploymentDescription> deployments)Deploys existing deployment content to the runtime for each deployment description.DeploymentResultdeployToRuntime(DeploymentDescription deployment)Deploys existing deployment content to the runtime.DeploymentResultforceDeploy(Set<Deployment> deployments)Deploys the content to the server if it does not already exist on the server.DeploymentResultforceDeploy(Deployment deployment)Deploys the content to the server if it does not already exist on the server.Set<String>getDeploymentNames()Returns the names of deployed content.Set<DeploymentDescription>getDeployments()Returns the available deployments.Set<DeploymentDescription>getDeployments(String serverGroup)Returns all the deployments on the specified server-group.booleanhasDeployment(String name)Checks if the deployment content is on the server.booleanhasDeployment(String name, String serverGroup)Checks if the deployment content is on the server.booleanisEnabled(String name)Checks if the deployment has been deployed to the runtime.booleanisEnabled(String name, String serverGroup)Checks if the deployment has been deployed to the runtime.DeploymentResultredeploy(Set<Deployment> deployments)Redeploys the content to the server.DeploymentResultredeploy(Deployment deployment)Redeploys the content to the server.DeploymentResultredeployToRuntime(Set<DeploymentDescription> deployments)Redeploys existing deployment content to the runtime for each deployment description.DeploymentResultredeployToRuntime(DeploymentDescription deployment)Redeploys existing deployment content to the runtime.DeploymentResultundeploy(Set<UndeployDescription> undeployDescriptions)Undeploys the deployment from the server.DeploymentResultundeploy(UndeployDescription undeployDescription)Undeploys the deployment from the server.
-
-
-
Method Detail
-
deploy
DeploymentResult deploy(Deployment deployment) throws IOException
Deploys the content to the server.If the deployment is not enabled a
deployoperation will need to be invoked. This can also be achieved by invoking thedeployToRuntime(DeploymentDescription)method.- Parameters:
deployment- the deployment to deploy- Returns:
- the result of the deployment
- Throws:
IOException- if a failure occurs communicating with the server- See Also:
deployToRuntime(DeploymentDescription)
-
deploy
DeploymentResult deploy(Set<Deployment> deployments) throws IOException
Deploys the content of each deployment to the server.If the deployment is not enabled a
deployoperation will need to be invoked. This can also be achieved by invoking thedeployToRuntime(Set)method.Also note that it is safe to trigger a
deployoperation on already deployed deployments.- Parameters:
deployments- a set of deployments to deploy- Returns:
- the result of the deployment
- Throws:
IOException- if a failure occurs communicating with the server- See Also:
deployToRuntime(Set)
-
forceDeploy
DeploymentResult forceDeploy(Deployment deployment) throws IOException
Deploys the content to the server if it does not already exist on the server. If the deployment already exist the deployment is replaced.If the deployment is not enabled a
deployoperation will need to be invoked. This can also be achieved by invoking thedeployToRuntime(DeploymentDescription)method.- Parameters:
deployment- the deployment to deploy- Returns:
- the result of the deployment
- Throws:
IOException- if a failure occurs communicating with the server- See Also:
deployToRuntime(DeploymentDescription)
-
forceDeploy
DeploymentResult forceDeploy(Set<Deployment> deployments) throws IOException
Deploys the content to the server if it does not already exist on the server. If the deployment already exist the deployment is replaced.If the deployment is not enabled a
deployoperation will need to be invoked. This can also be achieved by invoking thedeployToRuntime(Set)method.Also note that it is safe to trigger a
deployoperation on already deployed deployments.- Parameters:
deployments- a set of deployments to deploy- Returns:
- the result of the deployment
- Throws:
IOException- if a failure occurs communicating with the server- See Also:
deployToRuntime(Set)
-
deployToRuntime
DeploymentResult deployToRuntime(DeploymentDescription deployment) throws IOException
Deploys existing deployment content to the runtime.- Parameters:
deployment- the deployment description to deploy- Returns:
- the result of the deployment
- Throws:
IOException- if a failure occurs communicating with the server
-
deployToRuntime
DeploymentResult deployToRuntime(Set<DeploymentDescription> deployments) throws IOException
Deploys existing deployment content to the runtime for each deployment description.- Parameters:
deployments- the deployment descriptions to deploy- Returns:
- the result of the deployment
- Throws:
IOException- if a failure occurs communicating with the server
-
redeploy
DeploymentResult redeploy(Deployment deployment) throws IOException
Redeploys the content to the server. Uses afull-replace-deploymentoperation to upload the new content, undeploy the old content, deploy the new content and then remove the old content.If the deployment is not enabled a
deployorredeployoperation will need to be invoked. This can also be achieved by invoking thedeployToRuntime(DeploymentDescription)method or theredeployToRuntime(DeploymentDescription)method.- Parameters:
deployment- the deployment to redeploy- Returns:
- the result of the deployment
- Throws:
IOException- if a failure occurs communicating with the server- See Also:
redeployToRuntime(DeploymentDescription)
-
redeploy
DeploymentResult redeploy(Set<Deployment> deployments) throws IOException
Redeploys the content to the server. Uses afull-replace-deploymentoperation to upload the new content, undeploy the old content, deploy the new content and then remove the old content.If the deployment is not enabled a
deployorredeployoperation will need to be invoked. This can also be achieved by invoking thedeployToRuntime(Set)method or theredeployToRuntime(Set)method.Also note that it is safe to trigger a
deployor operation on already deployed deployments.- Parameters:
deployments- a set of deployments to redeploy- Returns:
- the result of the deployment
- Throws:
IOException- if a failure occurs communicating with the server- See Also:
redeployToRuntime(Set)
-
redeployToRuntime
DeploymentResult redeployToRuntime(DeploymentDescription deployment) throws IOException
Redeploys existing deployment content to the runtime.- Parameters:
deployment- the deployment description to redeploy- Returns:
- the result of the deployment
- Throws:
IOException- if a failure occurs communicating with the server
-
redeployToRuntime
DeploymentResult redeployToRuntime(Set<DeploymentDescription> deployments) throws IOException
Redeploys existing deployment content to the runtime for each deployment description.- Parameters:
deployments- the deployment descriptions to redeploy- Returns:
- the result of the deployment
- Throws:
IOException- if a failure occurs communicating with the server
-
undeploy
DeploymentResult undeploy(UndeployDescription undeployDescription) throws IOException
Undeploys the deployment from the server.- Parameters:
undeployDescription- the description for undeploying the content- Returns:
- the result of the deployment
- Throws:
IOException- if a failure occurs communicating with the server
-
undeploy
DeploymentResult undeploy(Set<UndeployDescription> undeployDescriptions) throws IOException
Undeploys the deployment from the server.- Parameters:
undeployDescriptions- the descriptions for undeploying the content- Returns:
- the result of the deployment
- Throws:
IOException- if a failure occurs communicating with the server
-
getDeployments
Set<DeploymentDescription> getDeployments() throws IOException
Returns the available deployments.- Returns:
- the deployments
- Throws:
IOException- if a failure occurs communicating with the server
-
getDeployments
Set<DeploymentDescription> getDeployments(String serverGroup) throws IOException
Returns all the deployments on the specified server-group. These deployments may also belong to other server groups.- Parameters:
serverGroup- the server group to get the deployments for- Returns:
- the deployments
- Throws:
IOException- if a failure occurs communicating with the serverIllegalStateException- if the running server is not a managed domain
-
getDeploymentNames
Set<String> getDeploymentNames() throws IOException
Returns the names of deployed content.- Returns:
- the names of deployed content
- Throws:
IOException- if a failure occurs communicating with the server
-
hasDeployment
boolean hasDeployment(String name) throws IOException
Checks if the deployment content is on the server.- Parameters:
name- the name of the deployment- Returns:
trueif the deployment content exists otherwisefalse- Throws:
IOException- if a failure occurs communicating with the server
-
hasDeployment
boolean hasDeployment(String name, String serverGroup) throws IOException
Checks if the deployment content is on the server.- Parameters:
name- the name of the deploymentserverGroup- the server group to check for the deployment on- Returns:
trueif the deployment content exists otherwisefalse- Throws:
IOException
-
isEnabled
boolean isEnabled(String name) throws IOException
Checks if the deployment has been deployed to the runtime. The deployment must already exist on the server.If a deployment is enabled it has been deployed to the runtime. Otherwise the deployment has not been deployed to the runtime.
- Parameters:
name- the name of the deployment- Returns:
trueif the deployment content exists and is enabled otherwisefalse- Throws:
IOException- if a failure occurs communicating with the server- See Also:
for managed domain deployments
-
isEnabled
boolean isEnabled(String name, String serverGroup) throws IOException
Checks if the deployment has been deployed to the runtime. The deployment must already exist on the server.If a deployment is enabled it has been deployed to the runtime. Otherwise the deployment has not been deployed to the runtime.
- Parameters:
name- the name of the deploymentserverGroup- the server group to check for the deployment on- Returns:
trueif the deployment content exists and is enabled otherwisefalse- Throws:
IOException- See Also:
for standalone deployments
-
-