ucar.unidata.idv.publish
Class ServerPublisher

java.lang.Object
  extended by ucar.unidata.idv.publish.IdvPublisher
      extended by ucar.unidata.idv.publish.ServerPublisher
Direct Known Subclasses:
InfoceteraBlogger

public abstract class ServerPublisher
extends IdvPublisher

Note: This is very much in flux.

Class ServerPublisher is used for publishers that talk to some server.

Author:
IDV development team

Field Summary
static String ATTR_PASSWORD
          Key to look up the password
static String ATTR_PORT
          Key to look up the port
static String ATTR_SERVER
          Key to look up the server
static String ATTR_USER
          Key to look up the user
static String NULL_STRING
          More clear than doing (String) null
 
Fields inherited from class ucar.unidata.idv.publish.IdvPublisher
ATTR_CLASS, GU, TAG_PUBLISHER
 
Constructor Summary
protected ServerPublisher(IntegratedDataViewer idv, Element element)
          Create the object
 
Method Summary
 String clean(String s)
          Trim the string
 boolean defined(String s)
          Is string defined, i.e., is it non-null and non zero length
 void doPublish(String title, String filePath, String properties)
          Publish
protected  HTTPConnection getConnection()
          Make the connection
 String getPassword()
          Get the password value
 int getPort()
          Get the port value
 String getServer()
          Get the server value
 String getUser()
          Get the user value
protected  void init()
          Initialize
 boolean isConfigured()
          Is this publisher configured
protected  void savePreferences()
          Write out the preferences
 void setPassword(String value)
          Set the password value
 void setPort(String value)
          Set the port value
 void setServer(String value)
          Set the server value
 void setUser(String value)
          Set the user value
 
Methods inherited from class ucar.unidata.idv.publish.IdvPublisher
configure, getName, getPropertyPrefix, getPublishers, publishFile, publishMessage, publishMessageAndFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_STRING

public static final String NULL_STRING
More clear than doing (String) null


ATTR_SERVER

public static final String ATTR_SERVER
Key to look up the server

See Also:
Constant Field Values

ATTR_PORT

public static final String ATTR_PORT
Key to look up the port

See Also:
Constant Field Values

ATTR_USER

public static final String ATTR_USER
Key to look up the user

See Also:
Constant Field Values

ATTR_PASSWORD

public static final String ATTR_PASSWORD
Key to look up the password

See Also:
Constant Field Values
Constructor Detail

ServerPublisher

protected ServerPublisher(IntegratedDataViewer idv,
                          Element element)
Create the object

Parameters:
idv - The idv
element - The xml element that defined us
Method Detail

init

protected void init()
Initialize

Overrides:
init in class IdvPublisher

savePreferences

protected void savePreferences()
Write out the preferences

Overrides:
savePreferences in class IdvPublisher

getConnection

protected HTTPConnection getConnection()
Make the connection

Returns:
The connection

doPublish

public void doPublish(String title,
                      String filePath,
                      String properties)
Publish

Specified by:
doPublish in class IdvPublisher
Parameters:
title - The title
filePath - The filepath
properties - The properties

defined

public boolean defined(String s)
Is string defined, i.e., is it non-null and non zero length

Parameters:
s - The string
Returns:
Is defined

clean

public String clean(String s)
Trim the string

Parameters:
s - The string
Returns:
The trimmed string

isConfigured

public boolean isConfigured()
Is this publisher configured

Overrides:
isConfigured in class IdvPublisher
Returns:
Is this publisher configured

setServer

public void setServer(String value)
Set the server value

Parameters:
value - The value

getServer

public String getServer()
Get the server value

Returns:
The server

setPort

public void setPort(String value)
Set the port value

Parameters:
value - The new port value

getPort

public int getPort()
Get the port value

Returns:
The port value

setUser

public void setUser(String value)
Set the user value

Parameters:
value - The user

getUser

public String getUser()
Get the user value

Returns:
The user

setPassword

public void setPassword(String value)
Set the password value

Parameters:
value - The password

getPassword

public String getPassword()
Get the password value

Returns:
The password