org.hibersap.configuration
Class Configuration

java.lang.Object
  extended by org.hibersap.configuration.Configuration
Direct Known Subclasses:
AnnotationConfiguration

public abstract class Configuration
extends Object

Abstract Superclass for different configuration strategies. Implements properties / settings handling. The concrete class' responsibility is to provide the BapiMappings, e.g. by analyzing annotated classes or XML mappings.

Author:
Carsten Erker

Constructor Summary
Configuration()
          Creates a Configuration for the first SessionManager specified in the hibersap.xml file.
Configuration(SessionManagerConfig sessionManagerConfig)
          Creates a Configuration for programmatic configuration of Hibersap.
Configuration(String sessionManagerName)
          Creates a Configuration for a concrete SessionManager.
 
Method Summary
 SessionManager buildSessionManager()
          Builds the session manager for this Configuration.
protected  SessionManagerConfig getSessionManagerConfig()
           
protected  void setBapiMappings(Map<Class<?>,BapiMapping> bapiMappings)
          Concrete subclasses should use this method to provide the BAPI mapping information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration(SessionManagerConfig sessionManagerConfig)
Creates a Configuration for programmatic configuration of Hibersap. You have to create a org.hibersap.configuration.xml.SessionManagerConfig first.

Parameters:
sessionManagerConfig - The session manager configuration

Configuration

public Configuration(String sessionManagerName)
Creates a Configuration for a concrete SessionManager. The SessionManager must be configured in the hibersap.xml file.

Parameters:
sessionManagerName - The SessionManager name as specified in the hibersap.xml file

Configuration

public Configuration()
Creates a Configuration for the first SessionManager specified in the hibersap.xml file. This method should only be used when there is exactly one SessionManager specified in hibersap.xml.

Method Detail

buildSessionManager

public SessionManager buildSessionManager()
Builds the session manager for this Configuration.

Returns:
The session manager

setBapiMappings

protected void setBapiMappings(Map<Class<?>,BapiMapping> bapiMappings)
Concrete subclasses should use this method to provide the BAPI mapping information.

Parameters:
bapiMappings - A Map with the BAPI class as key and the BapiMappings as value.

getSessionManagerConfig

protected SessionManagerConfig getSessionManagerConfig()


Copyright © 2011 akquinet tech@spree GmbH. All Rights Reserved.