|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.andromda.core.cartridge.Resource
public class Resource
This class implements the
<resource> tag in a cartridge descriptor file and represents the base
cartridge resource element.
| Constructor Summary | |
|---|---|
Resource()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Resource()
| Method Detail |
|---|
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 String getPath()
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||