org.apache.tools.ant.taskdefs.condition
Class IsSigned
java.lang.Object
   org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.ProjectComponent
       org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.DataType
           org.apache.tools.ant.taskdefs.condition.IsSigned
org.apache.tools.ant.taskdefs.condition.IsSigned
- All Implemented Interfaces: 
- java.lang.Cloneable, Condition
- public class IsSigned 
- extends DataType- implements Condition
Checks whether a jarfile is signed: if the name of the
 signature is passed, the file is checked for presence of that
 particular signature; otherwise the file is checked for the
 existence of any signature.
 
 
 
 
| Method Summary | 
|  boolean | eval()Returns
 trueif the file exists and is signed with
 the signature specified, or, ifnamewasn't
 specified, if the file contains a signature. | 
| static boolean | isSigned(java.io.File zipFile,
         java.lang.String name)Returns
 trueif the file exists and is signed with
 the signature specified, or, ifnamewasn't
 specified, if the file contains a signature. | 
|  void | setFile(java.io.File file)The jarfile that is to be tested for the presence
 of a signature.
 | 
|  void | setName(java.lang.String name)The signature name to check jarfile for.
 | 
 
| 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 | 
 
 
| Methods inherited from class java.lang.Object | 
| equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
IsSigned
public IsSigned()
setFile
public void setFile(java.io.File file)
- The jarfile that is to be tested for the presence
 of a signature.
 
- 
 
- 
- Parameters:
- file- jarfile to be tested.
 
setName
public void setName(java.lang.String name)
- The signature name to check jarfile for.
 
- 
 
- 
- Parameters:
- name- signature to look for.
 
isSigned
public static boolean isSigned(java.io.File zipFile,
                               java.lang.String name)
                        throws java.io.IOException
- Returns trueif the file exists and is signed with
 the signature specified, or, ifnamewasn't
 specified, if the file contains a signature.
 
- 
 
- 
- Parameters:
- zipFile- the zipfile to check
- name- the signature to check (may be killed)
- Returns:
- true if the file is signed.
- Throws:
- java.io.IOException- on error
 
eval
public boolean eval()
- Returns trueif the file exists and is signed with
 the signature specified, or, ifnamewasn't
 specified, if the file contains a signature.
 
- 
- Specified by:
- evalin interface- Condition
 
- 
- Returns:
- true if the file is signed.