com.ibm.commerce.registry

Class BusinessPolicyRegistry

  • java.lang.Object
    • com.ibm.commerce.registry.BusinessPolicyRegistry
  • All Implemented Interfaces:
    Registry


    public class BusinessPolicyRegistry
    extends java.lang.Object
    implements Registry
    BusinessPolicyRegistry is where the business policies are cached.
    • Method Detail

      • findPolicy

        public BusinessPolicyAccessBean findPolicy(java.lang.String policyId)
                                            throws ECException
        Gets the BusinessPolicyAccessBean with the given policyId
        Parameters:
        policyId - policy ID
        Returns:
        BusinessPolicyAccessBean
        Throws:
        ECException
      • getCommandClassNameFromInterface

        public static java.lang.String getCommandClassNameFromInterface(java.lang.String commandInterfaceName)
        Gets the default implementation of an interface. The default implementation class name is defined by the field "defaultCommandClassName".

        Parameters:
        commandInterfaceName - command interface name
        Returns:
        default implementation class name if defined
      • getPolicyRegistryEntry

        public BusinessPolicyRegistryEntry getPolicyRegistryEntry(java.lang.String policyId)
                                                           throws ECException
        Returns the BusinessPolicyRegistryEntry associated with a policy ID
        Parameters:
        policyId - policy ID of the business policy
        Returns:
        the BusinessPolicyRegistryEntry
        Throws:
        ECException
      • getPoliciesByTypeAndStore

        public BusinessPolicyAccessBean[] getPoliciesByTypeAndStore(java.lang.String astrType,
                                                                    java.lang.Integer anStoreId)
                                                             throws ECException
        Gets Business Policy beans by type and store path and store group.
        Parameters:
        astrType - business type
        anStoreId - store ID
        Returns:
        array of BusinessPolicyAccessBean
        Throws:
        ECException
      • getPolicyRegistryEntryByTypeAndStore

        public BusinessPolicyRegistryEntry[] getPolicyRegistryEntryByTypeAndStore(java.lang.String astrType,
                                                                                  java.lang.Integer anStoreId)
                                                                           throws ECException
        Gets the BusinessPolicyRegistryEntry by type and store path and store group.
        Parameters:
        astrType - business type
        anStoreId - store ID
        Returns:
        array of BusinessPolicyRegistryEntry
        Throws:
        ECException
      • initialize

        public void initialize()
                        throws java.lang.Exception
        Initializes the BusinessPolicyRegistry. This will include the initialization of the WcsApp with this instance of the registry.

        Specified by:
        initialize in interface Registry
        Throws:
        java.lang.Exception
      • refresh

        public void refresh()
                     throws java.lang.Exception
        Refreshes the Business Policy registry from the database.
        Specified by:
        refresh in interface Registry
        Throws:
        java.lang.Exception
      • refresh

        public void refresh(java.lang.String policyId)
                     throws java.lang.Exception
        Refreshes the registry entry for a particular policy ID.

        Parameters:
        policyId - policy ID of business policy
        Throws:
        java.lang.Exception
      • removeAllElements

        public void removeAllElements()
        Removes all Elements in this cache.
      • removeElement

        public boolean removeElement(BusinessPolicyRegistryEntry ta)
        Removes a BusinessPolicyRegistryEntry from the cache.
        Parameters:
        ta - business policy registry entry to be removed from cache
        Returns:
        true if the BusinessPolicyRegistryEntry was removed or false otherwise
      • singleton

        public static BusinessPolicyRegistry singleton()
        Returns a singleton BusinessPolicyRegistry object

        Returns:
        BusinessPolicyRegistry object