Constructor and Description |
---|
Resource() |
Modifier and Type | Method and Description |
---|---|
Cartridge |
getCartridge()
The cartridge that owns this resource.
|
String |
getOutlet()
Gets the logical location to which output from this resource will be written.
|
String |
getOutputCondition()
Gets the outputCondition that must evaluate to true in order for the template to be written.
|
File |
getOutputLocation(Object[] arguments,
File directory,
String outputPattern)
Returns the fully qualified name of the resource output to be written, this means: the output pattern
has been translated the output directory name has been prepended
|
String |
getOutputPattern()
Gets the pattern that is used to build the name of the output file.
|
String |
getPath()
Gets the path to the cartridge resource.
|
boolean |
isLastModifiedCheck()
Whether or not a last modified check should be performed before writing the resource.
|
boolean |
isOverwrite()
Tells us whether output files produced by this resource should be overwritten if they already exist.
|
void |
setCartridge(Cartridge cartridge)
Sets the Cartridge parent to which this Resource belongs.
|
void |
setLastModifiedCheck(boolean lastModifiedCheck)
Sets whether or not a last modified check should be performed before writing the resource.
|
void |
setOutlet(String outlet)
Sets the logical location to which output from this resource will be written.
|
void |
setOutputCondition(String outputCondition)
Sets the outputCondition that must evaluate to true in order for the template to be written.
|
void |
setOutputPattern(String outputPattern)
Sets the pattern that is used to build the name of the output file.
|
void |
setOverwrite(boolean overwrite)
Sets whether output files produced by this resource should be overwritten if they already exist.
|
void |
setPath(String path)
Sets the path to the cartridge resource.
|
String |
toString() |
public Resource()
public String getOutlet()
public void setOutlet(String outlet)
outlet
- The outlet to set.public void setOutputCondition(String outputCondition)
outputCondition
- the template engine outputCondition.public String getOutputCondition()
public File getOutputLocation(Object[] arguments, File directory, String outputPattern)
arguments
- any arguments to be inserted into the MessageFormat style messages.directory
- the directory to which output will be written.outputPattern
- if undefined, the value of getOutputPattern()
will be used.public boolean isOverwrite()
overwrite
property in a namespace.
This is useful for cartridge developers when they always want produced resources to be overwritten at first.public void setOverwrite(boolean overwrite)
overwrite
- The overwrite to set.public void setLastModifiedCheck(boolean lastModifiedCheck)
lastModifiedCheck
- true/falsepublic boolean isLastModifiedCheck()
public void setPath(String path)
path
- The path to set.public Cartridge getCartridge()
public void setCartridge(Cartridge cartridge)
cartridge
- the parent Cartridge to set.public void setOutputPattern(String outputPattern)
outputPattern
- the pattern in java.text.MessageFormat syntaxpublic String getOutputPattern()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2003–2014 AndroMDA.org. All rights reserved.