| java.lang.Object org.restlet.util.Variable
Variable | final public class Variable (Code) | | Variable descriptor for reference templates.
See Also: Template author: Jerome Louvel (contact@noelios.com) |
Field Summary | |
final public static int | TYPE_ALL Matches all characters. | final public static int | TYPE_ALPHA Matches all alphabetical characters. | final public static int | TYPE_ALPHA_DIGIT Matches all alphabetical and digital characters. | final public static int | TYPE_DIGIT Matches all digital characters. | final public static int | TYPE_URI_ALL Matches all URI characters. | final public static int | TYPE_URI_FRAGMENT Matches URI fragment characters. | final public static int | TYPE_URI_QUERY Matches URI query characters. | final public static int | TYPE_URI_SCHEME Matches URI scheme characters. | final public static int | TYPE_URI_SEGMENT Matches URI segment characters. | final public static int | TYPE_URI_UNRESERVED Matches unreserved URI characters. | final public static int | TYPE_WORD Matches all alphabetical and digital characters plus the underscore. |
Constructor Summary | |
public | Variable() Default constructor. | public | Variable(int type) Constructor. | public | Variable(int type, String defaultValue, boolean required, boolean fixed) Constructor.
Parameters: type - The type of variable. |
Method Summary | |
public String | getDefaultValue() Returns the default value to use if the key couldn't be found in the
model. | public int | getType() Returns the type of variable. | public boolean | isFixed() Returns true if the value is fixed, in which case the "defaultValue"
property is always used. | public boolean | isRequired() Returns true if the variable is required or optional. |
TYPE_ALL | final public static int TYPE_ALL(Code) | | Matches all characters.
|
TYPE_ALPHA | final public static int TYPE_ALPHA(Code) | | Matches all alphabetical characters.
|
TYPE_ALPHA_DIGIT | final public static int TYPE_ALPHA_DIGIT(Code) | | Matches all alphabetical and digital characters.
|
TYPE_DIGIT | final public static int TYPE_DIGIT(Code) | | Matches all digital characters.
|
TYPE_URI_ALL | final public static int TYPE_URI_ALL(Code) | | Matches all URI characters.
|
TYPE_URI_FRAGMENT | final public static int TYPE_URI_FRAGMENT(Code) | | Matches URI fragment characters.
|
TYPE_URI_QUERY | final public static int TYPE_URI_QUERY(Code) | | Matches URI query characters.
|
TYPE_URI_SCHEME | final public static int TYPE_URI_SCHEME(Code) | | Matches URI scheme characters.
|
TYPE_URI_SEGMENT | final public static int TYPE_URI_SEGMENT(Code) | | Matches URI segment characters.
|
TYPE_URI_UNRESERVED | final public static int TYPE_URI_UNRESERVED(Code) | | Matches unreserved URI characters.
|
TYPE_WORD | final public static int TYPE_WORD(Code) | | Matches all alphabetical and digital characters plus the underscore.
|
Variable | public Variable()(Code) | | Default constructor. Type is TYPE_ALL, default value is "", required is
true and fixed is false.
|
Variable | public Variable(int type)(Code) | | Constructor. Default value is "", required is true and fixed is false.
Parameters: type - The type of variable. See TYPE_* constants. |
Variable | public Variable(int type, String defaultValue, boolean required, boolean fixed)(Code) | | Constructor.
Parameters: type - The type of variable. See TYPE_* constants. Parameters: defaultValue - The default value to use if the key couldn't be found in themodel. Parameters: required - Indicates if the variable is required or optional. Parameters: fixed - Indicates if the value is fixed, in which case the"defaultValue" property is always used. |
getDefaultValue | public String getDefaultValue()(Code) | | Returns the default value to use if the key couldn't be found in the
model.
The default value to use if the key couldn't be found in themodel. |
getType | public int getType()(Code) | | Returns the type of variable. See TYPE_* constants.
The type of variable. See TYPE_* constants. |
isFixed | public boolean isFixed()(Code) | | Returns true if the value is fixed, in which case the "defaultValue"
property is always used.
True if the value is fixed, in which case the "defaultValue"property is always used. |
isRequired | public boolean isRequired()(Code) | | Returns true if the variable is required or optional.
True if the variable is required or optional. |
|
|