BEA Systems, Inc.

com.beasys.commerce.axiom.reasoning.rules
Class RuleManagerBean

java.lang.Object
  |
  +--com.beasys.commerce.axiom.reasoning.rules.RuleManagerBean

public class RuleManagerBean
extends java.lang.Object
implements javax.ejb.SessionBean, RuleConstants, RuleTagConstants

See Also:
Serialized Form

Fields inherited from interface com.beasys.commerce.axiom.reasoning.rules.RuleConstants
BIND_CONTENT, BIND_REQUEST, BIND_SESSION, BIND_SUCCESSOR, BIND_TIMESTAMP, BIND_UNKNOWN, BIND_USER, CLASS_CLASSIFIER, CLASS_CONFIGURABLE_ENTITY, CLASS_CONTENT, CLASS_CONTENT_SELECTOR, CLASS_REQUEST, CLASS_SESSION, CLASS_SUCCESSOR, CLASS_TIMESTAMP, CLASS_USER, GET_PROPERTY, PHRASE_AND_WHEN, PHRASE_CLASSIFICATION, PHRASE_IF_ATTR, PHRASE_IF_USER, PHRASE_THEN_CHOOSE, RULE_TYPE_CLASSIFIER, RULE_TYPE_CONTENT_SELECTOR, RULES_DTD, SCHEMA_CLASSES, SCHEMA_GROUPS, SDF, TEMPLATE_ATTR_COMP_CONSTANT, THEN_PHRASE_CONST, THEN_PHRASE_DATE, THEN_PHRASE_PROPERTY
 
Fields inherited from interface com.beasys.commerce.axiom.reasoning.rules.RuleTagConstants
ATTRIBUTE_NAME_BINDING_CLASS, ATTRIBUTE_NAME_TAG_NAME, CLASS_NAME_XML_DEFAULT, FIELD_PREFIX, TAG_ARGUMENTS, TAG_ASSERT, TAG_BINARY_OP, TAG_CAST, TAG_COMMENT, TAG_CONSTANT, TAG_DESCRIPTION, TAG_DISPLAY_ITEM, TAG_METHOD, TAG_NAME_BINDING, TAG_NAME_WILDCARD, TAG_NARY_OP, TAG_NEW, TAG_RULE, TAG_RULESHEET, TAG_SIMPLE_CONDITION, TAG_THEN, TAG_UNARY_OP, TAG_VARIABLE, TAG_WHEN
 
Constructor Summary
RuleManagerBean()
           
 
Method Summary
 RuleSheet create()
          Create a rule sheet.
 RuleSheet create(java.lang.String aName)
          Create a rule sheet.
 void delete(RuleSheet aRuleSheet)
          Delete a rule sheet.
 void delete(java.lang.String aName)
          Delete a rule sheet by name.
 void ejbActivate()
          This method is required by the EJB Specification, but is not used by this example.
 void ejbCreate()
          Called by the container when a new instance is created.
 void ejbPassivate()
          This method is required by the EJB Specification, but is not used by this example.
 void ejbRemove()
          This method is required by the EJB Specification, but is not used by this example.
 java.util.Map getAllProperties()
          Get all properties available from all property sets
 java.lang.String[] getAvailablePropertySets()
          Get available property sets.
 java.lang.String[] getContentPropertySets()
          Get content property sets.
 java.util.Map getPropertiesForPropertySet(java.lang.String aPropertySet)
          Get properties for property set.
 java.lang.String[] getRuleSheetNames()
          Get rule sheet names.
 RuleSheet load(java.lang.String aName)
          Load a rule sheet wit the given file name.
 void save(RuleSheet aRuleSheet)
          Save a rule sheet.
 void setSessionContext(javax.ejb.SessionContext ctx)
          Sets the session context.
 void validate(RuleSheet aRuleSheet)
          Validate the rulesheet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleManagerBean

public RuleManagerBean()
Method Detail

ejbActivate

public void ejbActivate()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
Sets the session context.
Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
ctx - SessionContext Context for session

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Called by the container when a new instance is created.
Throws:
javax.ejb.CreateException - if there is a communications or systems failure

load

public RuleSheet load(java.lang.String aName)
               throws java.io.IOException,
                      javax.ejb.EJBException
Load a rule sheet wit the given file name.
Parameters:
aName - the name of the rule sheet.
Returns:
RuleSheet
Throws:
IOException -  
EJBException -  

create

public RuleSheet create()
                 throws java.io.IOException,
                        javax.ejb.EJBException
Create a rule sheet.
Returns:
RuleSheet
Throws:
IOException -  
EJBException -  

create

public RuleSheet create(java.lang.String aName)
                 throws java.io.IOException,
                        javax.ejb.EJBException
Create a rule sheet. This is an empty rulesheet with the name set.
Parameters:
aName -  
Returns:
RuleSheet
Throws:
IOException -  
EJBException -  

save

public void save(RuleSheet aRuleSheet)
          throws java.io.IOException,
                 javax.ejb.EJBException
Save a rule sheet.
Parameters:
aRuleSheet -  
Throws:
IOException -  
EJBException -  

delete

public void delete(RuleSheet aRuleSheet)
            throws javax.ejb.EJBException
Delete a rule sheet.
Parameters:
aRuleSheet -  
Throws:
IOException -  
EJBException -  

delete

public void delete(java.lang.String aName)
            throws javax.ejb.EJBException
Delete a rule sheet by name.
Parameters:
aName - the name of the rule sheet.
Throws:
EJBException -  

validate

public void validate(RuleSheet aRuleSheet)
              throws javax.ejb.EJBException,
                     java.io.IOException
Validate the rulesheet. Runs the item through the parser to validate.
Parameters:
aRuleSheet -  
Throws:
EJBException - if not valid. You must look at the description.
IOException -  

getRuleSheetNames

public java.lang.String[] getRuleSheetNames()
                                     throws javax.ejb.EJBException
Get rule sheet names.
Returns:
String[]
Throws:
EJBException -  

getAvailablePropertySets

public java.lang.String[] getAvailablePropertySets()
                                            throws javax.ejb.EJBException
Get available property sets.
Returns:
String[]
Throws:
EJBException -  

getContentPropertySets

public java.lang.String[] getContentPropertySets()
                                          throws javax.ejb.EJBException
Get content property sets.
Returns:
String[]
Throws:
EJBException -  

getAllProperties

public java.util.Map getAllProperties()
                               throws javax.ejb.EJBException
Get all properties available from all property sets
Returns:
Map
Throws:
EJBException -  

getPropertiesForPropertySet

public java.util.Map getPropertiesForPropertySet(java.lang.String aPropertySet)
                                          throws javax.ejb.EJBException
Get properties for property set. This returns a map where the key is the property name, e.g.USER.age and the key is a PropertyMetaData.
Parameters:
aPropertySet -  
Returns:
Map
Throws:
EJBException -  

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved