T
- class of the implementation builderpublic abstract class AbstractArtifactFileBuilder<T extends AbstractArtifactFileBuilder<T>> extends Object implements TestArtifactDescriptor
Modifier and Type | Field and Description |
---|---|
protected boolean |
corrupted |
protected List<ZipUtils.ZipResource> |
resources |
Constructor and Description |
---|
AbstractArtifactFileBuilder(String id)
Creates a new builder
|
AbstractArtifactFileBuilder(String id,
T source)
Create a new builder from another instance and different ID.
|
AbstractArtifactFileBuilder(T source)
Creates a new builder from another instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkImmutable() |
T |
corrupted()
Indicates that the generated artifact file must be a corrupted ZIP.
|
protected void |
createPropertiesFile(File file,
Properties props) |
protected ZipUtils.ZipResource |
createPropertiesFile(Properties props,
String propertiesFileName) |
File |
getArtifactFile() |
protected abstract List<ZipUtils.ZipResource> |
getCustomResources() |
String |
getDeployedPath() |
String |
getId() |
protected String |
getTempFolder() |
protected abstract T |
getThis() |
String |
getZipPath() |
T |
usingLibrary(String jarFile)
Adds a jar file to the artifact lib folder.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfigFile
protected List<ZipUtils.ZipResource> resources
protected boolean corrupted
public AbstractArtifactFileBuilder(String id)
id
- artifact identifier. Non empty.public AbstractArtifactFileBuilder(T source)
source
- instance used as template to build the new one. Non null.public T usingLibrary(String jarFile)
jarFile
- jar file from a external file or test resource.public T corrupted()
protected abstract T getThis()
public String getId()
getId
in interface TestArtifactDescriptor
public String getZipPath()
getZipPath
in interface TestArtifactDescriptor
public String getDeployedPath()
getDeployedPath
in interface TestArtifactDescriptor
public File getArtifactFile() throws Exception
getArtifactFile
in interface TestArtifactDescriptor
Exception
- if fiel cannot be created.protected final void checkImmutable()
protected ZipUtils.ZipResource createPropertiesFile(Properties props, String propertiesFileName) throws IOException
IOException
protected void createPropertiesFile(File file, Properties props)
protected String getTempFolder()
protected abstract List<ZipUtils.ZipResource> getCustomResources() throws Exception
Exception
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.