Package net.sf.antcontrib.cpptasks
Class DistributerMap
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.types.DataType
-
- net.sf.antcontrib.cpptasks.DistributerMap
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class DistributerMap extends org.apache.tools.ant.types.DataTypeLocal to remote filename mapping (Experimental).
-
-
Constructor Summary
Constructors Constructor Description DistributerMap()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Required by documentation generator.java.io.FilegetLocal()Gets local directory.java.lang.StringgetRemote()Gets remote name for directory.booleanisActive()Returns true if the if and unless conditions (if any) are satisfied.voidsetHosts(java.lang.String value)Sets hosts for which this mapping is valid.voidsetIf(java.lang.String propName)Sets the property name for the 'if' condition.voidsetLocal(java.io.File value)Sets local directory for base of mapping.voidsetRemote(java.lang.String value)Sets remote name for directory.voidsetRemoteSeparator(java.lang.String value)Sets the separator character (/ or \) for the remote system.voidsetUnless(java.lang.String propName)Set the property name for the 'unless' condition.java.lang.StringtoRemote(java.lang.String host, java.io.File localFile)Converts the local file name to the remote name for the same file.-
Methods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributes, toString
-
-
-
-
Method Detail
-
execute
public void execute()
Required by documentation generator.
-
isActive
public boolean isActive()
Returns true if the if and unless conditions (if any) are satisfied.- Returns:
- true if this object is active.
-
setIf
public void setIf(java.lang.String propName)
Sets the property name for the 'if' condition. This object will be ignored unless the property is defined. The value of the property is insignificant, but values that would imply misinterpretation ("false", "no") will throw an exception when evaluated.- Parameters:
propName- property name
-
setUnless
public void setUnless(java.lang.String propName)
Set the property name for the 'unless' condition. If named property is set, the define will be ignored. The value of the property is insignificant, but values that would imply misinterpretation ("false", "no") of the behavior will throw an exception when evaluated.- Parameters:
propName- name of property
-
getLocal
public java.io.File getLocal()
Gets local directory.- Returns:
- local directory, may be null.
-
getRemote
public java.lang.String getRemote()
Gets remote name for directory.- Returns:
- remote name, may be null.
-
toRemote
public java.lang.String toRemote(java.lang.String host, java.io.File localFile)Converts the local file name to the remote name for the same file.- Parameters:
host- hostlocalFile- local file- Returns:
- remote name for local file, null if unknown.
-
setLocal
public void setLocal(java.io.File value)
Sets local directory for base of mapping.- Parameters:
value- value
-
setRemote
public void setRemote(java.lang.String value)
Sets remote name for directory.- Parameters:
value- remote name for directory
-
setRemoteSeparator
public void setRemoteSeparator(java.lang.String value)
Sets the separator character (/ or \) for the remote system.- Parameters:
value- separator character
-
setHosts
public void setHosts(java.lang.String value)
Sets hosts for which this mapping is valid.- Parameters:
value- hosts
-
-