Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.gateway
Class BaseGateway

java.lang.Object
  extended by com.jivesoftware.forum.gateway.BaseGateway
All Implemented Interfaces:
Gateway, com.tangosol.io.ExternalizableLite, java.io.Serializable
Direct Known Subclasses:
ImapGateway, MboxGateway, NewsgroupGateway, POP3Gateway

public abstract class BaseGateway
extends java.lang.Object
implements Gateway, com.tangosol.io.ExternalizableLite

See Also:
Serialized Form

Constructor Summary
BaseGateway()
           
 
Method Summary
 GatewayExporter getExporter()
          Returns the exporter for this gateway if settings.isExportEnabled is true and there is a possible exporter for the gateway, else null will be returned.
 java.lang.String getExportProperty(java.lang.String key)
          Returns an extended property associated with the exporter.
 java.util.Set getExportPropertyKeys()
          Returns all extended exporter property keys
 Forum getForum()
          Returns forum object that this gateway is exporting/importing messages to/from.
protected  ForumFactory getForumFactory()
           
protected  GatewaySettings getGatewaySettings()
           
 long getID()
          The unique id of the gateway, this will only be a value greater than zero if the gateway is a persistent gateway.
 GatewayImporter getImporter()
          Returns the exporter for this gateway if settings.isImportEnabled is true and there is a possible importer for this gateway, else null will be returned.
 java.lang.String getImportProperty(java.lang.String key)
          Returns an extended property associated with the importer.
 java.util.Set getImportPropertyKeys()
          Returns all extended importer property keys
 java.lang.String getProperty(java.lang.String key)
          The value of a gateway extended property.
 java.util.Set getPropertyKeys()
          All extended property keys for this gateway
 java.lang.String getType()
          Returns the type of gateway (ie "POP").
 void init(GatewaySettings settings, ForumFactory forumFactory)
           
 boolean isDisableCutOffDate()
           
 boolean isExportEnabled()
          Returns true if exporting is enabled in this gateway.
 boolean isImportEnabled()
          Returns true if importing is enabled in this gateway.
 void readExternal(java.io.DataInput in)
           
 void setDisableCutOffDate(boolean disableCutOffDate)
           
 void setExportEnabled(boolean enabled)
          Sets whether this gateway should be exporting message into a forum or not.
protected  void setExporter(GatewayExporter exporter)
           
 void setExportProperty(java.lang.String key, java.lang.String value)
          Sets an extended property to be associated with the exporter.
 void setImportEnabled(boolean enabled)
          Sets whether this gateway should be importing message into a forum or not.
protected  void setImporter(GatewayImporter importer)
           
 void setImportProperty(java.lang.String key, java.lang.String value)
          Sets an extended property to be associated with the importer.
 void setProperty(java.lang.String key, java.lang.String value)
          Sets an extended property for this gateway.
protected abstract  void setup()
          Child classes must implement this method to create the importer and exporter instances.
 void writeExternal(java.io.DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseGateway

public BaseGateway()
Method Detail

init

public final void init(GatewaySettings settings,
                       ForumFactory forumFactory)
                throws GatewayException
Throws:
GatewayException

getExporter

public GatewayExporter getExporter()
Returns the exporter for this gateway if settings.isExportEnabled is true and there is a possible exporter for the gateway, else null will be returned.

Specified by:
getExporter in interface Gateway
Returns:
The exporter for this gateway if enabled and possible.

getImporter

public GatewayImporter getImporter()
Returns the exporter for this gateway if settings.isImportEnabled is true and there is a possible importer for this gateway, else null will be returned.

Specified by:
getImporter in interface Gateway
Returns:
The importer for this gateway if enabled and possible

getForum

public Forum getForum()
Description copied from interface: Gateway
Returns forum object that this gateway is exporting/importing messages to/from.

Specified by:
getForum in interface Gateway
Returns:
the forum object associated with this gateway

readExternal

public void readExternal(java.io.DataInput in)
                  throws java.io.IOException
Specified by:
readExternal in interface com.tangosol.io.ExternalizableLite
Throws:
java.io.IOException

writeExternal

public void writeExternal(java.io.DataOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface com.tangosol.io.ExternalizableLite
Throws:
java.io.IOException

setImportEnabled

public void setImportEnabled(boolean enabled)
Description copied from interface: Gateway
Sets whether this gateway should be importing message into a forum or not.

The default value for import enabled is true.

Specified by:
setImportEnabled in interface Gateway
Parameters:
enabled - true if we should be importing

setExportEnabled

public void setExportEnabled(boolean enabled)
Description copied from interface: Gateway
Sets whether this gateway should be exporting message into a forum or not.

The default value for export enabled is true.

Specified by:
setExportEnabled in interface Gateway
Parameters:
enabled - true if we should be exporting

getType

public java.lang.String getType()
Description copied from interface: Gateway
Returns the type of gateway (ie "POP"). A default list of types can be found in GatewayManager.Type.

Specified by:
getType in interface Gateway
Returns:
the type of gateway

getID

public long getID()
Description copied from interface: Gateway
The unique id of the gateway, this will only be a value greater than zero if the gateway is a persistent gateway. Gateways that are executed once will not have a value that is greater than zero.

Specified by:
getID in interface Gateway
Returns:
the unique id of this gateway.

setImportProperty

public void setImportProperty(java.lang.String key,
                              java.lang.String value)
Description copied from interface: Gateway
Sets an extended property to be associated with the importer.

Placing null for a value will delete the value for a key.

Specified by:
setImportProperty in interface Gateway
Parameters:
key - property key
value - property value

getImportProperty

public java.lang.String getImportProperty(java.lang.String key)
Description copied from interface: Gateway
Returns an extended property associated with the importer.

Specified by:
getImportProperty in interface Gateway
Parameters:
key - property key
Returns:
value of the property

getImportPropertyKeys

public java.util.Set getImportPropertyKeys()
Description copied from interface: Gateway
Returns all extended importer property keys

Specified by:
getImportPropertyKeys in interface Gateway
Returns:
extended importer property keys

setExportProperty

public void setExportProperty(java.lang.String key,
                              java.lang.String value)
Description copied from interface: Gateway
Sets an extended property to be associated with the exporter.

Placing null for a value will delete the value for a key.

Specified by:
setExportProperty in interface Gateway
Parameters:
key - property key
value - property value

getExportProperty

public java.lang.String getExportProperty(java.lang.String key)
Description copied from interface: Gateway
Returns an extended property associated with the exporter.

Specified by:
getExportProperty in interface Gateway
Parameters:
key - property key
Returns:
value of the property

getExportPropertyKeys

public java.util.Set getExportPropertyKeys()
Description copied from interface: Gateway
Returns all extended exporter property keys

Specified by:
getExportPropertyKeys in interface Gateway
Returns:
extended exporter property keys

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Description copied from interface: Gateway
Sets an extended property for this gateway.

Placing null for a value will delete the value for a key.

Specified by:
setProperty in interface Gateway
Parameters:
key - property key
value - property value

getProperty

public java.lang.String getProperty(java.lang.String key)
Description copied from interface: Gateway
The value of a gateway extended property.

Specified by:
getProperty in interface Gateway
Parameters:
key - key for the property
Returns:
property value

getPropertyKeys

public java.util.Set getPropertyKeys()
Description copied from interface: Gateway
All extended property keys for this gateway

Specified by:
getPropertyKeys in interface Gateway
Returns:
extended property keys for this gateway

isImportEnabled

public boolean isImportEnabled()
Description copied from interface: Gateway
Returns true if importing is enabled in this gateway.

Specified by:
isImportEnabled in interface Gateway
Returns:
true if importing is enabled in this gateway

isExportEnabled

public boolean isExportEnabled()
Description copied from interface: Gateway
Returns true if exporting is enabled in this gateway.

Specified by:
isExportEnabled in interface Gateway
Returns:
true if exporting is enabled in this gateway

isDisableCutOffDate

public boolean isDisableCutOffDate()
Specified by:
isDisableCutOffDate in interface Gateway

setDisableCutOffDate

public void setDisableCutOffDate(boolean disableCutOffDate)
Specified by:
setDisableCutOffDate in interface Gateway

setup

protected abstract void setup()
                       throws GatewayException
Child classes must implement this method to create the importer and exporter instances. Once the instances have been created the subclass can set them by calling setImporter and setExporter

Throws:
GatewayException - thrown if there are problem creating the importer and exporter

setImporter

protected void setImporter(GatewayImporter importer)

setExporter

protected void setExporter(GatewayExporter exporter)

getForumFactory

protected ForumFactory getForumFactory()

getGatewaySettings

protected GatewaySettings getGatewaySettings()

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.