org.vfny.geoserver.global.dto
Class DataStoreInfoDTO

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

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

Data Transfer Object for GeoServer DataStore information.

Used to describe a datastore, typically one specified in the catalog.xml config file.

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.

Example: DataStoreInfoDTO dsiDto = new DataStoreInfoDTO(); dsiDto.setIde("myDataStore"); dsiDto.setEnabled(true); dsiDto.setTile("My Data Store"); Map m = new HashMap(); m.put("key","param"); dsiDto.setConnectionParams(m);


Constructor Summary
DataStoreInfoDTO()
          DataStoreInfo constructor.
DataStoreInfoDTO(DataStoreInfoDTO dto)
          DataStoreInfo constructor.
 
Method Summary
 java.lang.Object clone()
          Implement clone.
 boolean equals(java.lang.Object obj)
          Implement equals.
 java.lang.String getAbstract()
          Short description of DataStore
 java.util.Map getConnectionParams()
          Map of param:value both of which are represented as text.
 java.lang.String getId()
          Unique identifier representing this DataStore.
 java.lang.String getNameSpaceId()
          Namespace prefix for this DataStore.
 java.lang.String getTitle()
          Title for DataStore, used in error messages & configuration.
 int hashCode()
          Implement hashCode.
 boolean isEnabled()
          Value is true if the DataStore should be enabled.
 void setAbstract(java.lang.String description)
          Updates the DataStore abstract.
 void setConnectionParams(java.util.Map map)
          Provide DataStore connectin parameters.
 void setEnabled(boolean b)
          setEnabled purpose.
 void setId(java.lang.String identifier)
          Sets the unique identifier for this DataStoreInfoDTO.
 void setNameSpaceId(java.lang.String prefix)
          Sets the Namespace prefix for the DataStore.
 void setTitle(java.lang.String dataStoreTitle)
          Set title used to identify this DataStore to the user.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataStoreInfoDTO

public DataStoreInfoDTO()
DataStoreInfo constructor.

does nothing


DataStoreInfoDTO

public DataStoreInfoDTO(DataStoreInfoDTO dto)
DataStoreInfo constructor.

Creates a copy of the DataStoreInfo provided. If the DataStoreInfo provided is null then default values are used. All the datastructures are cloned.

Parameters:
dto - The datastore to copy.
Throws:
java.lang.NullPointerException - DOCUMENT ME!
Method Detail

clone

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

creates a clone of this object

Specified by:
clone in interface DataTransferObject
Returns:
A copy of this DataStoreInfo
See Also:
Object.clone()

equals

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

recursively tests to determine if the object passed in is a copy of this object.

Specified by:
equals in interface DataTransferObject
Parameters:
obj - The DataStoreInfo object to test.
Returns:
true when the object passed is the same as this object.
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Implement hashCode.

Specified by:
hashCode in interface DataTransferObject
Returns:
Service hashcode or 0
See Also:
Object.hashCode()

getAbstract

public java.lang.String getAbstract()
Short description of DataStore

Returns:
Short description

getConnectionParams

public java.util.Map getConnectionParams()
Map of param:value both of which are represented as text.

The map is based on String Keys, and String values.

Returns:
Map of Params for DataStoreFactoryAPI use

isEnabled

public boolean isEnabled()
Value is true if the DataStore should be enabled.

Returns:
ture if DataStore shoudl be enabled

getId

public java.lang.String getId()
Unique identifier representing this DataStore.

This value is used to refer to this DataStore by FeatureTypeInfoDTO.

Returns:
an identifier, non null

getNameSpaceId

public java.lang.String getNameSpaceId()
Namespace prefix for this DataStore.

Returns:
prefix used for GML encoding

getTitle

public java.lang.String getTitle()
Title for DataStore, used in error messages & configuration.

Returns:
Title dor the DataStore

setAbstract

public void setAbstract(java.lang.String description)
Updates the DataStore abstract.

Parameters:
description -

setConnectionParams

public void setConnectionParams(java.util.Map map)
Provide DataStore connectin parameters.

Map is limited to text based keys and values

Parameters:
map -

setEnabled

public void setEnabled(boolean b)
setEnabled purpose.

Description ...

Parameters:
b -

setId

public void setId(java.lang.String identifier)
Sets the unique identifier for this DataStoreInfoDTO.

Parameters:
identifier - nonnull identifier for DataStore

setNameSpaceId

public void setNameSpaceId(java.lang.String prefix)
Sets the Namespace prefix for the DataStore.

Parameters:
prefix - Namespace prefix used by DataStore

setTitle

public void setTitle(java.lang.String dataStoreTitle)
Set title used to identify this DataStore to the user.

Parameters:
dataStoreTitle - Title used to identify DataStore to user