org.vfny.geoserver.global.dto
Class ServiceDTO

java.lang.Object
  extended byorg.vfny.geoserver.global.dto.ServiceDTO
All Implemented Interfaces:
java.lang.Cloneable, DataTransferObject

public final class ServiceDTO
extends java.lang.Object
implements DataTransferObject

Data Transfer Object representing GeoServer Service information.

ServiceConfig is intended to be extended to provide some basic data storage facilities. This class represents the basic properties of a web service.

Data Transfer object are used to communicate between the GeoServer application and its configuration and persistent layers. As such the class is final - to allow for its future use as an on-the-wire message.

It is very tempting to force Web Services to completely define their own DTO elements (rather than trying for reuse using subclassing or aggregation) - simply to force each service to document what it means by each of these peices of information.


Constructor Summary
ServiceDTO()
          ServiceConfig constructor.
ServiceDTO(ServiceDTO dto)
          ServiceConfig constructor.
 
Method Summary
 java.lang.Object clone()
          Implements clone.
 boolean equals(java.lang.Object other)
          Implement equals.
 java.lang.String getAbstract()
          getAbstract purpose.
 java.lang.String getAccessConstraints()
          The access constraints associated with the service.
 java.lang.String getFees()
          The fees associated with the service.
 java.lang.String[] getKeywords()
          Keywords associated with the service.
 java.lang.String getMaintainer()
          Name of the party who maintains the web service.
 java.lang.String getName()
          Name of Service.
 java.net.URL getOnlineResource()
          Online Reference URL for the web service.
 java.lang.String getTitle()
          The title of the service.
 int hashCode()
          Implement hashCode for ServiceDTO.
 boolean isEnabled()
          Represents when the Web Service is enabled/disabled.
 void setAbstract(java.lang.String serviceAbstract)
          Provides a short abstract about the service.
 void setAccessConstraints(java.lang.String constraints)
          Provide the access constraints associated with the service.
 void setEnabled(boolean b)
          setEnabled purpose.
 void setFees(java.lang.String string)
          Provide the fees associated with the service.
 void setKeywords(java.lang.String[] array)
          Provide keywords associated with the service.
 void setMaintainer(java.lang.String string)
          Provide the party that maintains the web service.
 void setName(java.lang.String string)
          setName purpose.
 void setOnlineResource(java.net.URL url)
          setOnlineResource purpose.
 void setTitle(java.lang.String string)
          Sets the title of the service.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceDTO

public ServiceDTO()
ServiceConfig constructor.

does nothing

See Also:
defaultSettings()

ServiceDTO

public ServiceDTO(ServiceDTO dto)
ServiceConfig constructor.

This is equivalent to calling the clone method. When a null value is passed in, the default values are used. All non-primary datatypes are cloned with the exception of Strings (which have a singleton hash table in memory representation).

Parameters:
dto - The ServiceConfig object to copy into the new ServiceConfig object.
Throws:
java.lang.NullPointerException - If dto is null
See Also:
defaultSettings(), clone()
Method Detail

clone

public java.lang.Object clone()
Implements clone.

Specified by:
clone in interface DataTransferObject
Returns:
An instance of a ServiceConfig object which represents a copy of the existing ServiceConfig Object.
See Also:
Object.clone()

equals

public boolean equals(java.lang.Object other)
Implement equals.

Specified by:
equals in interface DataTransferObject
Parameters:
other - The ServiceConfig object which will be tested.
Returns:
true when the classes are equal.
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Implement hashCode for ServiceDTO.

Specified by:
hashCode in interface DataTransferObject
Returns:
Hashcode in agreement with equals method
See Also:
Object.hashCode()

getName

public java.lang.String getName()
Name of Service.

Returns:

getOnlineResource

public java.net.URL getOnlineResource()
Online Reference URL for the web service.

A location to look for when additional assistance is required.

Example: new URL("http://www.openplans.org/")

Returns:
DOCUMENT ME!

getTitle

public java.lang.String getTitle()
The title of the service.

Example: The Open Planning Project Basemap Server

Returns:
DOCUMENT ME!

setName

public void setName(java.lang.String string)
setName purpose.

Parameters:
string -

setOnlineResource

public void setOnlineResource(java.net.URL url)
setOnlineResource purpose.

Parameters:
url -

setTitle

public void setTitle(java.lang.String string)
Sets the title of the service.

Example: The Open Planning Project Basemap Server

Parameters:
string - Title of the Service

getAbstract

public java.lang.String getAbstract()
getAbstract purpose.

Returns:

getAccessConstraints

public java.lang.String getAccessConstraints()
The access constraints associated with the service.

When there are not any, the value "NONE" is used.

Example: "NONE"

Returns:
DOCUMENT ME!

isEnabled

public boolean isEnabled()
Represents when the Web Service is enabled/disabled.

Returns:
true is service is enabled

getFees

public java.lang.String getFees()
The fees associated with the service.

When there are not any fees, the value "NONE" is used.

Example: NONE

Returns:
DOCUMENT ME!

getKeywords

public java.lang.String[] getKeywords()
Keywords associated with the service.

Example: new String[]{"WFS","New York"}

Returns:
DOCUMENT ME!

getMaintainer

public java.lang.String getMaintainer()
Name of the party who maintains the web service.

Should ideally be contact information such as a email address.

Example: "The Open Planning Project"

Returns:
The maintainer of this Service

setAbstract

public void setAbstract(java.lang.String serviceAbstract)
Provides a short abstract about the service.

Example:


 This is a test server.  It contains some basemap data from New York City.
 

Parameters:
serviceAbstract - Abstract describing service

setAccessConstraints

public void setAccessConstraints(java.lang.String constraints)
Provide the access constraints associated with the service.

When there are not any, use the value "NONE".

Example: "NONE"

Parameters:
constraints - DOCUMENT ME!

setEnabled

public void setEnabled(boolean b)
setEnabled purpose.

Parameters:
b -

setFees

public void setFees(java.lang.String string)
Provide the fees associated with the service.

When there are not any fees, use the value "NONE".

Example: NONE

Parameters:
string - DOCUMENT ME!

setKeywords

public void setKeywords(java.lang.String[] array)
Provide keywords associated with the service.

Example: new String[]{"WFS","New York"}

Parameters:
array - DOCUMENT ME!

setMaintainer

public void setMaintainer(java.lang.String string)
Provide the party that maintains the web service.

Should ideally be contact information such as a email address.

Example: "The Open Planning Project"

Parameters:
string - DOCUMENT ME!