org.jboss.wise.lms.httpForward.valueObject
Class LogData

java.lang.Object
  extended by org.jboss.wise.lms.httpForward.valueObject.LogData
All Implemented Interfaces:
java.io.Serializable

@Name(value="newLog")
public class LogData
extends java.lang.Object
implements java.io.Serializable

A LogData collects all the communications for a given Lms mapping.

Author:
Stefano Maestri, stefano.maestri@javalinux.it, Alessio Soldano, alessio.soldano@javalinux.it
See Also:
Serialized Form

Constructor Summary
LogData()
           
LogData(java.lang.String name)
          Create a new mapping's LogData
LogData(java.lang.String name, java.lang.String url)
          Create a new mapping's LogData
 
Method Summary
 void addCommunication(Communication c)
          Records a given communication
 void cleanCommunications()
          Cleans up all the communication for this mapping
 boolean equals(java.lang.Object o)
           
 java.util.List<Communication> getCommunications()
          Returns all the recorded communications
 java.lang.String getName()
          Gets name of the mapping corresponding to these data
 java.lang.String getUrl()
          Gets the mapping's actual target address
 boolean isRecording()
          Returns true or false depending on the current mapping having the recording enabled or not.
 void setCommunications(java.util.List<Communication> communications)
          Sets (overwrites) the communications' list
 void setName(java.lang.String name)
          Sets name of the mapping corresponding to these data
 void setRecording(boolean recording)
          Enable/disable recording on the current mapping
 void setUrl(java.lang.String url)
          Sets the mapping's actual target address
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogData

public LogData()

LogData

public LogData(java.lang.String name,
               java.lang.String url)
        throws java.lang.IllegalArgumentException
Create a new mapping's LogData

Parameters:
name - The mapping name
url - The actual target url
Throws:
java.lang.IllegalArgumentException

LogData

public LogData(java.lang.String name)
Create a new mapping's LogData

Parameters:
name - The mapping name
Throws:
java.lang.IllegalArgumentException
Method Detail

cleanCommunications

public void cleanCommunications()
Cleans up all the communication for this mapping


addCommunication

public void addCommunication(Communication c)
Records a given communication

Parameters:
c - The communication to be recorded

getCommunications

public java.util.List<Communication> getCommunications()
Returns all the recorded communications

Returns:
The communications' list

setCommunications

public void setCommunications(java.util.List<Communication> communications)
Sets (overwrites) the communications' list

Parameters:
communications - The communications' list

isRecording

public boolean isRecording()
Returns true or false depending on the current mapping having the recording enabled or not.

Returns:
True or false depending on the current mapping having the recording enabled or not.

setRecording

public void setRecording(boolean recording)
Enable/disable recording on the current mapping

Parameters:
recording - True to enable recording, false to disable it.

getUrl

public java.lang.String getUrl()
Gets the mapping's actual target address

Returns:
The target address

setUrl

public void setUrl(java.lang.String url)
Sets the mapping's actual target address

Parameters:
url - The target address

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getName

public java.lang.String getName()
Gets name of the mapping corresponding to these data

Returns:
The mapping name

setName

public void setName(java.lang.String name)
Sets name of the mapping corresponding to these data

Parameters:
name - The mapping name

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object