com.topcoder.shared.problem
Class WebService

java.lang.Object
  |
  +--com.topcoder.shared.problem.BaseElement
        |
        +--com.topcoder.shared.problem.WebService
All Implemented Interfaces:
java.lang.Cloneable, com.topcoder.shared.netCommon.CustomSerializable, Element, java.io.Serializable

public class WebService
extends com.topcoder.shared.problem.BaseElement
implements Element

An element to hold information about a Web Service.

Author:
mitalub
See Also:
Serialized Form

Constructor Summary
WebService()
          Empty constructor required by custom serialization.
 
Method Summary
 void customReadObject(com.topcoder.shared.netCommon.CSReader reader)
          Custom serialization
 void customWriteObject(com.topcoder.shared.netCommon.CSWriter writer)
          Custom serialization
static java.lang.String encodeHTML(java.lang.String text)
          Utility function for encoding HTML entities in text.
 java.lang.String getJavaDocAddress()
          Returns the javadoc address.
 java.lang.String getName()
          Returns the name of the web service.
 int getProblemId()
          Returns the problem identifier related to the web service.
 ElementRenderer getRenderer()
          Returns this elements renderer.
 int getWebServiceId()
          Returns the unique identifier of the web service.
 void setJavaDocAddress(java.lang.String javaDocAddress)
          Sets the javadoc address.
 void setName(java.lang.String name)
          Sets the name of the web service.
 void setProblemId(int problemId)
          Sets the identifier of the problem related to the web service.
 void setRenderer(ElementRenderer renderer)
          Sets the renderer for this element.
 void setWebServiceId(int webServiceId)
          Sets the unique identifier for the web service.
 java.lang.String toXML()
          Returns an XML representation of the web service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.topcoder.shared.problem.Element
getRenderer, setRenderer
 

Constructor Detail

WebService

public WebService()
Empty constructor required by custom serialization.

Method Detail

setName

public void setName(java.lang.String name)
Sets the name of the web service.

Parameters:
name - the name of the web service.

getName

public java.lang.String getName()
Returns the name of the web service.

Returns:
the name of the web service.

setJavaDocAddress

public void setJavaDocAddress(java.lang.String javaDocAddress)
Sets the javadoc address.

Parameters:
javaDocAddress - the java doc address.

getJavaDocAddress

public java.lang.String getJavaDocAddress()
Returns the javadoc address.

Returns:
the javadoc address.

setWebServiceId

public void setWebServiceId(int webServiceId)
Sets the unique identifier for the web service.

Parameters:
webServiceId - the unique identifier of the web service.

getWebServiceId

public int getWebServiceId()
Returns the unique identifier of the web service.

Returns:
the unique identifier of the web service.

setProblemId

public void setProblemId(int problemId)
Sets the identifier of the problem related to the web service.

Parameters:
problemId - the problem identifier related to the web service.

getProblemId

public int getProblemId()
Returns the problem identifier related to the web service.

Returns:
the problem identifier related to the web service.

customWriteObject

public void customWriteObject(com.topcoder.shared.netCommon.CSWriter writer)
                       throws java.io.IOException
Custom serialization

Specified by:
customWriteObject in interface Element
Parameters:
writer - the writer to write to.
Throws:
java.io.IOException - if an I/O error has occurred in the stream that backs the writer.

customReadObject

public void customReadObject(com.topcoder.shared.netCommon.CSReader reader)
                      throws java.io.IOException
Custom serialization

Specified by:
customReadObject in interface Element
Parameters:
reader - the reader to read from.
Throws:
java.io.IOException - if an I/O error has occurred in the stream that backs the reader.

toXML

public java.lang.String toXML()
Returns an XML representation of the web service. Formatted like <web-service><name>the name</name></webservice>.

Specified by:
toXML in interface Element
Returns:
the XML representation of the web service.

setRenderer

public void setRenderer(ElementRenderer renderer)
Sets the renderer for this element.

Specified by:
setRenderer in interface Element
Parameters:
renderer - the element renderer.
See Also:
ElementRenderer

getRenderer

public ElementRenderer getRenderer()
Returns this elements renderer.

Specified by:
getRenderer in interface Element
Returns:
this elements renderer.
See Also:
ElementRenderer

encodeHTML

public static java.lang.String encodeHTML(java.lang.String text)
Utility function for encoding HTML entities in text. All occurrences of the <, >, and & characters are converted to &lt;, &gt;, and &amp;, respectively.

Parameters:
text - the text to encode.
Returns:
the encoded text.