KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > idaremedia > antx > parameters > PlatformConditional


1 /**
2  * $Id: PlatformConditional.java 180 2007-03-15 12:56:38Z ssmc $
3  * Copyright 2004 iDare Media, Inc. All rights reserved.
4  *
5  * Originally written by iDare Media, Inc. for release into the public domain. This
6  * library, source form and binary form, is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License (LGPL) as published
8  * by the Free Software Foundation; either version 2.1 of the License, or (at your option)
9  * any later version.<p>
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13  * See the GNU LGPL for more details.<p>
14  *
15  * You should have received a copy of the GNU Lesser General Public License along with this
16  * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite
17  * 330, Boston, MA 02111-1307 USA. The GNU LGPL can be found online at
18  * http://www.fsf.org/copyleft/lesser.html<p>
19  *
20  * This product has been influenced by several projects within the open-source community.
21  * The JWare developers wish to acknowledge the open-source community's support. For more
22  * information regarding the open-source products used within JWare, please visit the
23  * JWare website.
24  *----------------------------------------------------------------------------------------*
25  * WEBSITE- http://www.jware.info EMAIL- inquiries@jware.info
26  *----------------------------------------------------------------------------------------*
27  **/

28
29 package com.idaremedia.antx.parameters;
30
31 /**
32  * A component that is only valid if certain platform-dependent criteria are met.
33  *
34  * @since JWare/AntX 0.4
35  * @author ssmc, &copy;2004 <a HREF="http://www.jware.info">iDare&nbsp;Media,&nbsp;Inc.</a>
36  * @version 0.5
37  * @.safety n/a
38  * @.group api,infra
39  **/

40
41 public interface PlatformConditional
42 {
43     /**
44      * Adds an if-os-matches condition to this component.
45      * The supplied string can contain a comma-delimited
46      * selection list in the form: <i>family,name,arch,version</i>.
47      * To omit an field, put a "<span class="src">*</span>"
48      * in that location like: "<span class="src">*,Linux,i686,*</span>".
49      * If the field is at the end of the list, you can just
50      * omit the field altogether like:
51      * "<span class="src">unix,Linux</span>".
52      * @param choice os selection string (non-null)
53      **/

54     void setIfOS(String JavaDoc choice);
55
56
57     /**
58      * Adds an unless-os-matches condition to this component.
59      * See {@linkplain #setIfOS setIfOS(&#8230;)} for a
60      * description of the <span class="src">choice</span>
61      * string's format.
62      * @param choice os selection string (non-null)
63      **/

64     void setUnlessOS(String JavaDoc choice);
65
66
67     /**
68      * Adds an if-ant-version-matches condition to this
69      * component. The value returned by the Ant runtime's
70      * "<span class="src">ant.version</span>" property
71      * is what's tested.
72      * @param versionRE regular expression for version
73      **/

74     void setIfAntLike(String JavaDoc versionRE);
75
76
77     /**
78      * Adds an unless-ant-version-matches condition to this
79      * component. The value returned by the Ant runtime's
80      * "<span class="src">ant.version</span>" property is
81      * what's tested.
82      * @param versionRE regular expression for version
83      **/

84     void setUnlessAntLike(String JavaDoc versionRE);
85 }
86
87 /* end-of-PlatformConditional.java */
88
Popular Tags