public class ServerDataPersistence extends Object implements Persistent, Comparable<ServerDataPersistence>
es.gva.cit.catalogClient.utils.comboserver.ServerData
Modifier and Type | Field and Description |
---|---|
static String |
PERSISTENT_DESCRIPTION |
static String |
PERSISTENT_NAME |
Constructor and Description |
---|
ServerDataPersistence() |
ServerDataPersistence(String serviceType)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(ServerData server) |
void |
add(String server,
String protocol) |
void |
addServerData(ServerData server)
This method adds a ServerData using the Andami persistence model.
|
int |
compareTo(ServerDataPersistence a) |
boolean |
contains(String serverAddress) |
boolean |
existsServer(String address)
Returns true if exists a server in this list
|
ServerData[] |
getArrayOfServerData()
This method returns an array of ServerData objects that have been saved
using the gvsig tools persistence model.
|
List<ServerData> |
getServerData() |
String |
getServiceType() |
boolean |
isEmpty() |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
static void |
registerPersistence() |
void |
remove(String serverAddress) |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setArrayOfServerData(ServerData[] servers) |
void |
setServiceType(String serviceType) |
public static final String PERSISTENT_NAME
public static final String PERSISTENT_DESCRIPTION
public ServerDataPersistence(String serviceType)
sevice
- Type Service type to loadpublic ServerDataPersistence()
public void addServerData(ServerData server)
server
- ServerDatapublic boolean existsServer(String address)
address
- public ServerData[] getArrayOfServerData()
public List<ServerData> getServerData()
public void setArrayOfServerData(ServerData[] servers)
public String getServiceType()
public void setServiceType(String serviceType)
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public static void registerPersistence()
public int compareTo(ServerDataPersistence a)
compareTo
in interface Comparable<ServerDataPersistence>
public boolean isEmpty()
public void remove(String serverAddress)
public void add(ServerData server)
public boolean contains(String serverAddress)