donaldp 02/03/22 21:36:57
Added: proposal/myrmidon/src/java/org/apache/antlib/nativelib
OsCondition.java
Removed: proposal/myrmidon/src/java/org/apache/antlib/core
OsCondition.java
Log:
Move OsCondition to nativelib package
Revision Changes Path
1.1
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/nativelib/OsCondition.java
Index: OsCondition.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.antlib.nativelib;
import org.apache.aut.nativelib.Os;
import org.apache.myrmidon.api.TaskContext;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.conditions.Condition;
/**
* Condition to check the current OS.</p>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stefan Bodewig</a>
* @version $Revision: 1.1 $
*
* @ant.type type="condition" name="os"
*/
public class OsCondition
implements Condition
{
private String m_family;
private String m_name;
private String m_version;
private String m_arch;
/**
* Sets the desired OS family type
*
* @param family The OS family type desired.
*/
public void setFamily( final String family )
{
m_family = family;
}
/**
* Sets the desired OS name
*
* @param name The OS name
*/
public void setName( final String name )
{
m_name = name;
}
/**
* Sets the desired OS architecture
*
* @param arch The OS architecture
*/
public void setArch( final String arch )
{
m_arch = arch;
}
/**
* Sets the desired OS version
*
* @param version The OS version
*/
public void setVersion( final String version )
{
m_version = version;
}
/**
* Evaluates this condition.
*/
public boolean evaluate( final TaskContext context )
throws TaskException
{
return Os.isOs( m_family, m_name, m_arch, m_version );
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>