LogMX:
The universal log file viewer
www.logmx.com

com.lightysoft.logmx.business
Class LogURLParameter

java.lang.Object
  extended by com.lightysoft.logmx.business.LogURLParameter

public class LogURLParameter
extends Object

Defines a parameter that will be sent to a LogFileManager in order to locate the resource to open.
A LogURLParameter defines a part of a LogURL.

For example, an LogURLParameter could be a login: its name will be "login" and its value (set by the LogMX user via the GUI) could be "john".

Since:
LogMX v1.2.2
Author:
LightySoft
See Also:
LogURL, LogURLParameterType

Constructor Summary
LogURLParameter(String pName, LogURLParameterType pType)
          Construct a mandatory LogURLParameter with its name and type and no default value
LogURLParameter(String pName, LogURLParameterType pType, Object pDefaultValue)
          Construct a mandatory LogURLParameter with its name, type, and default value
LogURLParameter(String pName, LogURLParameterType pType, Object pDefaultValue, boolean pOptional)
          Construct an optional or mandatory LogURLParameter with its name, type, and default value
 
Method Summary
 Object clone()
          Clone this Parameter (called by LogMX to clone LogURL returned by the Manager)
 Object getDefaultValue()
          Getter for attribute defaultValue
 String getName()
          Getter for attribute name
 LogURLParameterType getType()
          Getter for attribute type
 Object getValue()
          Getter for attribute value
 boolean isOptional()
          Getter for attribute optional
 void setDefaultValue(Object pDefaultValue)
          Setter for attribute defaultValue
 void setOptional(boolean pOptional)
          Setter for attribute optional
 void setValue(Object pValue)
          Setter for attribute value
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogURLParameter

public LogURLParameter(String pName,
                       LogURLParameterType pType)
Construct a mandatory LogURLParameter with its name and type and no default value

Parameters:
pName - Parameter name (e.g. "login")
pType - Parameter type (e.g. LogURLParameterType.STRING)
Since:
LogMX v1.2.2

LogURLParameter

public LogURLParameter(String pName,
                       LogURLParameterType pType,
                       Object pDefaultValue)
Construct a mandatory LogURLParameter with its name, type, and default value

Parameters:
pName - Parameter name (e.g. "login")
pType - Parameter type (e.g. LogURLParameterType.STRING)
pDefaultValue - Parameter default value (e.g. "admin", System.getProperty("user.name"), or null if no default value)
Throws:
IllegalArgumentException - If pDefaultValue is not consistent with pType
Since:
LogMX v1.2.2

LogURLParameter

public LogURLParameter(String pName,
                       LogURLParameterType pType,
                       Object pDefaultValue,
                       boolean pOptional)
Construct an optional or mandatory LogURLParameter with its name, type, and default value

Parameters:
pName - Parameter name (e.g. "login")
pType - Parameter type (e.g. LogURLParameterType.STRING)
pDefaultValue - Parameter default value (e.g. "admin", System.getProperty("user.name"), or null if no default value)
pOptional - Indicates whether this parameter is optional
Throws:
IllegalArgumentException - If pDefaultValue is not consistent with pType
Since:
LogMX v1.2.2
Method Detail

clone

public Object clone()
Clone this Parameter (called by LogMX to clone LogURL returned by the Manager)

Overrides:
clone in class Object
Since:
LogMX v1.2.2
See Also:
Object.clone()

getName

public String getName()
Getter for attribute name

Returns:
Value of attribute name
Since:
LogMX v1.2.2

getValue

public Object getValue()
Getter for attribute value

Returns:
Value of attribute value
Since:
LogMX v1.2.2

setValue

public void setValue(Object pValue)
Setter for attribute value

Parameters:
pValue - New value for attribute value
Throws:
IllegalArgumentException - If pValue is not consistent with this parameter type
Since:
LogMX v1.2.2

getDefaultValue

public Object getDefaultValue()
Getter for attribute defaultValue

Returns:
Value of attribute defaultValue
Since:
LogMX v1.2.2

setDefaultValue

public void setDefaultValue(Object pDefaultValue)
Setter for attribute defaultValue

Parameters:
pDefaultValue - New value for attribute defaultValue
Throws:
IllegalArgumentException - If pDefaultValue is not consistent with this parameter type
Since:
LogMX v1.2.2

getType

public LogURLParameterType getType()
Getter for attribute type

Returns:
Value of attribute type
Since:
LogMX v1.2.2

isOptional

public boolean isOptional()
Getter for attribute optional

Returns:
Value of attribute optional
Since:
LogMX v1.2.2

setOptional

public void setOptional(boolean pOptional)
Setter for attribute optional

Parameters:
pOptional - New value for attribute optional
Since:
LogMX v1.2.2

LogMX:
The universal log file viewer
www.logmx.com

Copyright © 2011 LightySoft. All rights reserved. [LogMX v3.0.2 (Nov. 16th, 2011)]