Class ServerData

java.lang.Object
org.gvsig.utils.swing.jcomboServer.ServerData
All Implemented Interfaces:
org.gvsig.tools.persistence.Persistent

public class ServerData extends Object implements org.gvsig.tools.persistence.Persistent
This class represents a data server, that can be a WMS, WFS, Catalog or any kind of server. It contains the server URL and has a couple of attributes that describe the server type (serverType and serverSubType). It contains the date when the server was created and the date when the server was accessed last time. *
Author:
Jorge Piera Llodra (piera_jor@gva.es)
  • Field Details

  • Constructor Details

    • ServerData

      public ServerData(String serverAddress, Date added, Date lastAccess, String serviceType, String serviceSubType)
      Parameters:
      serverAddress - Server address
      added - When the server was added
      lastAccess - When the server was used last time
      serviceType - Service type
      serviceSubType - Service subtype
    • ServerData

      public ServerData()
    • ServerData

      public ServerData(String serverAddress, Date added, Date lastAccess, String serviceType, String serviceSubType, String database)
      Parameters:
      serverAddress - Server address
      added - When the server was added
      lastAccess - When the server was used last time
      serviceType - Service type
      serviceSubType - Service subtype
      database - Database name
    • ServerData

      public ServerData(String serverAddress, String serviceType, String serviceSubType)
      Constructor for a new Server
      Parameters:
      serverAddress - Server Address
      serviceType - Server Type
      serviceSubType - Server Subtype
    • ServerData

      public ServerData(String serverAddress, String serviceType, String serviceSubType, String database)
      Constructor for a new Server
      Parameters:
      serverAddress - Server Address
      serviceType - Server Type
      serviceSubType - Server Subtype
    • ServerData

      public ServerData(String serverAddress, String serviceType)
      Constructor for a new Server
      Parameters:
      serverAddress - Server Address
      serviceType - Server Type
  • Method Details

    • updateLastAccess

      public void updateLastAccess()
      This method updates the last access attribute. New value is the current time.
    • toString

      public String toString()
      The server address field have to be showed in the combo
      Overrides:
      toString in class Object
      Returns:
      String
    • getAdded

      public Date getAdded()
      Returns:
      Returns the added.
    • setAdded

      public void setAdded(Date added)
      Parameters:
      added - The added to set.
    • getLastAccess

      public Date getLastAccess()
      Returns:
      Returns the lastAccess.
    • setLastAccess

      public void setLastAccess(Date lastAccess)
      Parameters:
      lastAccess - The lastAccess to set.
    • getServerAddress

      public String getServerAddress()
      Returns:
      Returns the serverAddress.
    • setServerAddress

      public void setServerAddress(String serverAddress)
      Parameters:
      serverAddress - The serverAddress to set.
    • getServiceSubType

      public String getServiceSubType()
      Returns:
      Returns the serviceSubType.
    • setServiceSubType

      public void setServiceSubType(String serviceSubType)
      Parameters:
      serviceSubType - The serviceSubType to set.
    • getServiceType

      public String getServiceType()
      Returns:
      Returns the serviceType.
    • setServiceType

      public void setServiceType(String serviceType)
      Parameters:
      serviceType - The serviceType to set.
    • getDatabase

      public String getDatabase()
    • setDatabase

      public void setDatabase(String database)
    • getProperies

      public Properties getProperies()
      Returns:
      Returns the properies.
    • setProperies

      public void setProperies(Properties properies)
      Parameters:
      properies - The properies to set.
    • getProperty

      public String getProperty(String propertyName)
      Parameters:
      propertyName -
      Returns:
    • saveToState

      public void saveToState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException
      Specified by:
      saveToState in interface org.gvsig.tools.persistence.Persistent
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException
    • loadFromState

      public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException
      Specified by:
      loadFromState in interface org.gvsig.tools.persistence.Persistent
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException
    • registerPersistence

      public static void registerPersistence()