Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.gateway
Class GatewayManagerProxy

java.lang.Object
  extended by com.jivesoftware.forum.gateway.GatewayManagerProxy
All Implemented Interfaces:
GatewayManager

public class GatewayManagerProxy
extends java.lang.Object
implements GatewayManager


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.jivesoftware.forum.gateway.GatewayManager
GatewayManager.Type
 
Field Summary
 
Fields inherited from interface com.jivesoftware.forum.gateway.GatewayManager
GATEWAY_EXPORT_RETRY
 
Constructor Summary
GatewayManagerProxy(GatewayManager gatewayManager, AuthToken auth, Permissions permissions)
           
 
Method Summary
 void create(Gateway gateway)
          Allows you to add a new gateway to the system
 Gateway createGatewayInstance(Forum forum, java.lang.String type)
          Used to create and return an instance of a gateway based off the gateway settings, this gateway won't be installed as a new persistent gateway.
 void executeOnce(Gateway gateway, java.util.Date afterDate)
          Used to execute a import/export on a gateway immediately, the gateway does not need to be a persistent gateway.
 Gateway getGateway(long gatewayID)
          Returns a gateway by its id.
 java.util.Collection getGateways()
          Returns all the gateways, this collection is unmodifiable.
 java.util.Collection getGateways(Forum forum)
          Returns all the gateways for a forum.
 GlobalGatewaySettings getGlobalGatewaySettings()
          Returns the global settings for gateways.
protected  boolean permCheck()
           
 void remove(Forum forum)
          Deletes all gateways for this context by removing their properties and stopping them from running.
 void remove(Gateway gateway)
          Delete a specific gateway
 void update(Gateway gateway)
          This method must be called if gateway settings changes are to be persisted.
 void update(GlobalGatewaySettings globalGatewaySettings)
          Updates the global gateway setting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GatewayManagerProxy

public GatewayManagerProxy(GatewayManager gatewayManager,
                           AuthToken auth,
                           Permissions permissions)
Method Detail

create

public void create(Gateway gateway)
            throws UnauthorizedException
Description copied from interface: GatewayManager
Allows you to add a new gateway to the system

Specified by:
create in interface GatewayManager
Parameters:
gateway - The gatway to add
Throws:
UnauthorizedException

update

public void update(Gateway gateway)
            throws UnauthorizedException
Description copied from interface: GatewayManager
This method must be called if gateway settings changes are to be persisted.

Specified by:
update in interface GatewayManager
Parameters:
gateway - gateway who settings to persist
Throws:
UnauthorizedException

remove

public void remove(Forum forum)
            throws UnauthorizedException
Description copied from interface: GatewayManager
Deletes all gateways for this context by removing their properties and stopping them from running.

Specified by:
remove in interface GatewayManager
Throws:
UnauthorizedException

getGateways

public java.util.Collection getGateways(Forum forum)
                                 throws UnauthorizedException
Description copied from interface: GatewayManager
Returns all the gateways for a forum. You cannot add/ gateways using this mechanism, you must use the create/remove/update methods.

Specified by:
getGateways in interface GatewayManager
Parameters:
forum - forum to grab gateways for
Returns:
all the gateways for the forum or an empty collecion if there are none.
Throws:
UnauthorizedException

getGateways

public java.util.Collection getGateways()
                                 throws UnauthorizedException
Description copied from interface: GatewayManager
Returns all the gateways, this collection is unmodifiable. You cannot add/ gateways using this mechanism, you must use the create/remove/update methods.

Specified by:
getGateways in interface GatewayManager
Returns:
all the gateways or an empty collection if there are none.
Throws:
UnauthorizedException

update

public void update(GlobalGatewaySettings globalGatewaySettings)
Description copied from interface: GatewayManager
Updates the global gateway setting.

Specified by:
update in interface GatewayManager
Parameters:
globalGatewaySettings - globals settings to update

getGlobalGatewaySettings

public GlobalGatewaySettings getGlobalGatewaySettings()
Description copied from interface: GatewayManager
Returns the global settings for gateways.

Specified by:
getGlobalGatewaySettings in interface GatewayManager
Returns:
global settings for gateways.

executeOnce

public void executeOnce(Gateway gateway,
                        java.util.Date afterDate)
                 throws UnauthorizedException
Description copied from interface: GatewayManager
Used to execute a import/export on a gateway immediately, the gateway does not need to be a persistent gateway.

Usually the gateway passed in will have either have import enabled or export enabled, but probably not both.

Specified by:
executeOnce in interface GatewayManager
Parameters:
gateway - gateway to execute
afterDate - acquire messages after this date
Throws:
UnauthorizedException

getGateway

public Gateway getGateway(long gatewayID)
                   throws UnauthorizedException
Description copied from interface: GatewayManager
Returns a gateway by its id. If no gateway exists for this id null will be returned.

Specified by:
getGateway in interface GatewayManager
Parameters:
gatewayID - unique id of the gateway
Returns:
the gateway object that matches the id, if none then null.
Throws:
UnauthorizedException - Thrown if the user does not have access rights for acquiring a gateway object.

createGatewayInstance

public Gateway createGatewayInstance(Forum forum,
                                     java.lang.String type)
                              throws UnauthorizedException
Description copied from interface: GatewayManager
Used to create and return an instance of a gateway based off the gateway settings, this gateway won't be installed as a new persistent gateway. If you wish to do that you must call the create(Gateway) method

Specified by:
createGatewayInstance in interface GatewayManager
Parameters:
forum - forum to create this gateway for
type - type of gateway to create
Returns:
an instance of the gateway
Throws:
UnauthorizedException

remove

public void remove(Gateway gateway)
            throws UnauthorizedException
Description copied from interface: GatewayManager
Delete a specific gateway

Specified by:
remove in interface GatewayManager
Throws:
UnauthorizedException

permCheck

protected boolean permCheck()

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.