org.jumpmind.symmetric.service.impl
Class RegistrationService

java.lang.Object
  extended by org.jumpmind.symmetric.service.impl.RegistrationService
All Implemented Interfaces:
IRegistrationService

public class RegistrationService
extends java.lang.Object
implements IRegistrationService


Field Summary
protected  org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
           
protected static org.apache.commons.logging.Log logger
           
protected  IParameterService parameterService
           
 
Constructor Summary
RegistrationService()
           
 
Method Summary
protected  org.springframework.jdbc.core.simple.SimpleJdbcTemplate getSimpleTemplate()
           
 java.lang.String getSql(java.lang.String key)
           
 boolean isAutoRegistration()
           
 boolean isRegisteredWithServer()
           
 void openRegistration(java.lang.String nodeGroup, java.lang.String externalId)
          Open registration for a single new node given a node group (f.e., "STORE") and external ID (f.e., "00001").
 boolean registerNode(Node node, java.io.OutputStream out, boolean isRequestedRegistration)
          Register a node for the given domain name and domain ID if the registration is open.
 void registerWithServer()
           
 void reOpenRegistration(java.lang.String nodeId)
          Re-open registration for a single node that already exists in the database.
 void setClusterService(IClusterService clusterService)
           
 void setConfigurationService(IConfigurationService configurationService)
           
 void setDataExtractorService(IDataExtractorService dataExtractorService)
           
 void setDataLoaderService(IDataLoaderService dataLoaderService)
           
 void setDataService(IDataService dataService)
           
 void setDbDialect(IDbDialect dbDialect)
           
 void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbc)
           
 void setNodeService(INodeService nodeService)
           
 void setParameterService(IParameterService parameterService)
           
 void setSql(java.util.Map<java.lang.String,java.lang.String> sql)
           
 void setTransportManager(ITransportManager transportManager)
           
protected  java.sql.SQLException unwrapSqlException(java.lang.Throwable e)
           
protected  boolean writeConfiguration(Node node, java.io.OutputStream out)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.commons.logging.Log logger

parameterService

protected IParameterService parameterService

jdbcTemplate

protected org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
Constructor Detail

RegistrationService

public RegistrationService()
Method Detail

registerNode

public boolean registerNode(Node node,
                            java.io.OutputStream out,
                            boolean isRequestedRegistration)
                     throws java.io.IOException
Register a node for the given domain name and domain ID if the registration is open.

Specified by:
registerNode in interface IRegistrationService
Parameters:
isRequestedRegistration - An indicator that registration has been requested by the remote client
Throws:
java.io.IOException

isRegisteredWithServer

public boolean isRegisteredWithServer()
Specified by:
isRegisteredWithServer in interface IRegistrationService

registerWithServer

public void registerWithServer()
Specified by:
registerWithServer in interface IRegistrationService

writeConfiguration

@Deprecated
protected boolean writeConfiguration(Node node,
                                                java.io.OutputStream out)
                              throws java.io.IOException
Deprecated. 

Synchronize node configuration.

Throws:
java.io.IOException

reOpenRegistration

public void reOpenRegistration(java.lang.String nodeId)
Re-open registration for a single node that already exists in the database. A new password is generated and the registration_enabled flag is turned on. The next node to try registering for this node group and external ID will be given this information.

Specified by:
reOpenRegistration in interface IRegistrationService

openRegistration

public void openRegistration(java.lang.String nodeGroup,
                             java.lang.String externalId)
Open registration for a single new node given a node group (f.e., "STORE") and external ID (f.e., "00001"). The unique node ID and password are generated and stored in the node and node_security tables with the registration_enabled flag turned on. The next node to try registering for this node group and external ID will be given this information.

Specified by:
openRegistration in interface IRegistrationService

setNodeService

public void setNodeService(INodeService nodeService)

setDataExtractorService

public void setDataExtractorService(IDataExtractorService dataExtractorService)

setConfigurationService

public void setConfigurationService(IConfigurationService configurationService)

setClusterService

public void setClusterService(IClusterService clusterService)

setDataService

public void setDataService(IDataService dataService)

isAutoRegistration

public boolean isAutoRegistration()
Specified by:
isAutoRegistration in interface IRegistrationService

setDataLoaderService

public void setDataLoaderService(IDataLoaderService dataLoaderService)

setTransportManager

public void setTransportManager(ITransportManager transportManager)

setDbDialect

public void setDbDialect(IDbDialect dbDialect)

setJdbcTemplate

public void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbc)

getSimpleTemplate

protected org.springframework.jdbc.core.simple.SimpleJdbcTemplate getSimpleTemplate()

unwrapSqlException

protected java.sql.SQLException unwrapSqlException(java.lang.Throwable e)

setSql

public void setSql(java.util.Map<java.lang.String,java.lang.String> sql)

getSql

public java.lang.String getSql(java.lang.String key)

setParameterService

public void setParameterService(IParameterService parameterService)


Copyright © 2007-2008. All Rights Reserved.