public class Deployment extends Object implements DeploymentDescription
Instances of this are not thread-safe.
| Constructor and Description |
|---|
Deployment(File content)
Creates a new deployment for the file.
|
Deployment(InputStream content,
String name)
Creates a new deployment for the input stream.
|
Deployment(Path content)
Creates a new deployment for the path.
|
| Modifier and Type | Method and Description |
|---|---|
Deployment |
addServerGroup(String serverGroup)
Adds a server group for the deployment.
|
Deployment |
addServerGroups(Collection<String> serverGroups)
Adds the server groups for the deployment.
|
Deployment |
addServerGroups(String... serverGroups)
Adds the server groups for the deployment.
|
int |
compareTo(DeploymentDescription o) |
boolean |
equals(Object obj) |
String |
getName()
Returns the name for this deployment.
|
String |
getRuntimeName()
Returns the runtime name set for the deployment which may be
null. |
Set<String> |
getServerGroups()
Returns the server groups for this deployment.
|
int |
hashCode() |
static Deployment |
of(File content)
Creates a new deployment for the file.
|
static Deployment |
of(InputStream content,
String name)
Creates a new deployment for the input stream.
|
static Deployment |
of(Path content)
Creates a new deployment for the path.
|
Deployment |
setName(String name)
Sets the name for the deployment.
|
Deployment |
setRuntimeName(String runtimeName)
Sets the runtime name for the deployment.
|
String |
toString() |
public Deployment(File content)
content - the file containing the contentpublic Deployment(Path content)
content - the path containing the contentpublic Deployment(InputStream content, String name)
null.
If setName(String) with a null argument is invoked when using this constructor an
IllegalArgumentException will be thrown.
The content will be copied, stored in-memory and then closed. Large content should be
written to a file and the Deployment(Path) or Deployment(File) constructor should be used.
content - the input stream representing the contentname - the name for the deploymentpublic static Deployment of(File content)
content - the file containing the contentpublic static Deployment of(Path content)
content - the path containing the contentpublic static Deployment of(InputStream content, String name)
null.
If setName(String) with a null argument is invoked when using this static factory an
IllegalArgumentException will be thrown.
The content will be copied, stored in-memory and then closed. Large content should be
written to a file and the of(Path) or of(File) static factory methods should be used.
content - the input stream representing the contentname - the name for the deploymentpublic Deployment addServerGroup(String serverGroup)
serverGroup - the server group to addpublic Deployment addServerGroups(String... serverGroups)
serverGroups - the server groups to addpublic Deployment addServerGroups(Collection<String> serverGroups)
serverGroups - the server groups to addpublic Set<String> getServerGroups()
DeploymentDescriptiongetServerGroups in interface DeploymentDescriptionpublic String getName()
DeploymentDescriptiongetName in interface DeploymentDescriptionpublic Deployment setName(String name)
null for a deployment created based on a file system path.
If the deployment was created using in input stream and the value is null an IllegalArgumentException
will be thrown.name - the name for the deploymentpublic String getRuntimeName()
null.null if one was not setpublic Deployment setRuntimeName(String runtimeName)
runtimeName - the runtime name, can be nullpublic int compareTo(DeploymentDescription o)
compareTo in interface Comparable<DeploymentDescription>Copyright © 2016 JBoss by Red Hat. All rights reserved.