BEA Systems, Inc.

com.beasys.commerce.foundation
Class BusinessPolicyHome

java.lang.Object
  |
  +--com.beasys.commerce.foundation.BusinessPolicyHome

public class BusinessPolicyHome
extends java.lang.Object
implements SmartHome

This is a BusinessPolicy home/bean factory.

See Also:
Helper.initFromTheoryProperties()

Field Summary
static java.lang.String CUSTOM_HOME_NAME
           
static java.lang.String DEFAULT_BUSINESS_POLICY_IMPL_SUFFIX
           
static java.lang.String DEFAULT_POLICY_BEAN_CLASS_NAME
           
 
Constructor Summary
BusinessPolicyHome()
           
 
Method Summary
static BusinessPolicy create(java.lang.String businessPolicyInterface)
          Given a bean interface, use the factory pattern to create an instance.
static SmartHome getCustomHome(java.lang.String businessPolicyInterface)
          Given a bean interface, use the factory pattern to get its custom home.
static void init(java.util.Properties properties)
          The init method must be called before any BusinessPolicys are created.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUSTOM_HOME_NAME

public static final java.lang.String CUSTOM_HOME_NAME

DEFAULT_POLICY_BEAN_CLASS_NAME

public static final java.lang.String DEFAULT_POLICY_BEAN_CLASS_NAME

DEFAULT_BUSINESS_POLICY_IMPL_SUFFIX

public static final java.lang.String DEFAULT_BUSINESS_POLICY_IMPL_SUFFIX
Constructor Detail

BusinessPolicyHome

public BusinessPolicyHome()
Method Detail

init

public static void init(java.util.Properties properties)
The init method must be called before any BusinessPolicys are created. This method is called from Helper.initFromTheoryProperties().
See Also:
Helper.initFromTheoryProperties()

getCustomHome

public static SmartHome getCustomHome(java.lang.String businessPolicyInterface)
Given a bean interface, use the factory pattern to get its custom home. If a bean's custom home is not defined in the theory.properties file, then this method returns null. This is an example of specifying a custom home name in the properties file.
 com.beasys.commerce.ebusiness.item.ItemPriceCalculationPolicy.CustomHomeName = com.acme.util.ExpertPricerHome
 com.beasys.commerce.ebusiness.item.ItemPriceCalculationPolicy.DefaultPolicyClassName = com.acme.util.ExpertPricer
 

create

public static BusinessPolicy create(java.lang.String businessPolicyInterface)
Given a bean interface, use the factory pattern to create an instance. The bean instance can be obtained from the theory.properties file. If it is not there, then we will use the default Impl where is the name of the bean interface. This is an example of specifying a different Impl class in the properties file.
 com.beasys.commerce.ebusiness.item.ItemPriceCalculationPolicy.CustomHomeName = com.acme.util.ExpertPricerHome
 com.beasys.commerce.ebusiness.item.ItemPriceCalculationPolicy.DefaultPolicyClassName = com.acme.util.ExpertPricer
 

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved