com.ptc.netmarkets.rule
Interface NmRuleService

All Known Implementing Classes:
NmRuleServiceFwd, StandardNmRuleService

public interface NmRuleService



Supported API: false

Extendable: false


Method Summary
 NmChangeModel[] create(NmCommandBean cb, Hashtable params)
          Create a rule using the data in the request.
 NmChangeModel[] disable(NmCommandBean cb)
          

Supported API: false
 NmChangeModel[] enable(NmCommandBean cb)
          

Supported API: false
 Enumeration findTypes(Class objType, WTContainerRef container, boolean enabled)
          Find TypeBasedRules that are of type RuleType.TYPE and whose object type attribute equals objType.
 NmRule getNmRule(NmCommandBean cb, Hashtable params)
          Get the rule from the specified container for the specified rule type and object type.
 NmRule getNmRule(Rule rule)
          Gets a NmRule for the specified rule.
 NmRule getNmRule(Rule rule, boolean includeSpec)
          

Supported API: false
 Rule getRule(String name, RuleType ruleType, WTContainerRef container)
          Get the Rule that has the specified name and ruleType in the specified container.
 String getRuleObjectTypeFromPersistId(String ObjType)
          

Supported API: false
 NmRule getRuleProperties(NmCommandBean cb, boolean includeSpec)
          

Supported API: false
 ArrayList list(NmCommandBean cb)
          

Supported API: false
 ArrayList listRulesForType(String className, NmOid projectOid)
          

Supported API: false
 NmChangeModel[] update(NmCommandBean cb, Hashtable params)
          Update a rule using the data in the request.
 

Method Detail

list

public ArrayList list(NmCommandBean cb)
               throws WTException


Supported API: false

Parameters:
cb -
Returns:
ArrayList
Throws:
WTException

listRulesForType

public ArrayList listRulesForType(String className,
                                  NmOid projectOid)
                           throws WTException


Supported API: false

Parameters:
className -
projectOid -
Returns:
ArrayList
Throws:
WTException

getRule

public Rule getRule(String name,
                    RuleType ruleType,
                    WTContainerRef container)
             throws WTException
Get the Rule that has the specified name and ruleType in the specified container. If no rule is found in the specified container, then its parent container is searched. This repeats until a rule is found or the top of the hierarchy is reached. If no such rule exists, return null.

Parameters:
name - the rule name (cannot be null)
ruleType - the rule type (cannot be null)
container -
Returns:
Rule
Throws:
WTException

create

public NmChangeModel[] create(NmCommandBean cb,
                              Hashtable params)
                       throws WTException
Create a rule using the data in the request.

Supported API: false

Parameters:
cb -
params - the request parameters
Returns:
NmChangeModel[]
Throws:
WTException

update

public NmChangeModel[] update(NmCommandBean cb,
                              Hashtable params)
                       throws WTException
Update a rule using the data in the request.

Supported API: false

Parameters:
cb -
params -
Returns:
NmChangeModel[]
Throws:
WTException

enable

public NmChangeModel[] enable(NmCommandBean cb)
                       throws WTException


Supported API: false

Parameters:
cb -
Returns:
NmChangeModel[]
Throws:
WTException

disable

public NmChangeModel[] disable(NmCommandBean cb)
                        throws WTException


Supported API: false

Parameters:
cb -
Returns:
NmChangeModel[]
Throws:
WTException

getNmRule

public NmRule getNmRule(NmCommandBean cb,
                        Hashtable params)
                 throws WTException
Get the rule from the specified container for the specified rule type and object type.

Supported API: false

Parameters:
cb -
params - the request parameters
Returns:
NmRule
Throws:
WTException

findTypes

public Enumeration findTypes(Class objType,
                             WTContainerRef container,
                             boolean enabled)
                      throws WTException
Find TypeBasedRules that are of type RuleType.TYPE and whose object type attribute equals objType.

If enabled is true then only return those rules that are enabled. If enabled is false then all matching rules are returned.

Supported API: false

Parameters:
objType - find rules that reference this object type
container - The container in which to search for types
enabled -
Returns:
Enumeration
Throws:
WTException

getNmRule

public NmRule getNmRule(Rule rule)
                 throws WTException
Gets a NmRule for the specified rule. Do not include the XML contents in the returned NmRule.

Supported API: false

Parameters:
rule -
Returns:
NmRule
Throws:
WTException

getNmRule

public NmRule getNmRule(Rule rule,
                        boolean includeSpec)
                 throws WTException


Supported API: false

Parameters:
rule -
includeSpec - if true include the XML specification in the returned
Returns:
NmRule
Throws:
WTException

getRuleProperties

public NmRule getRuleProperties(NmCommandBean cb,
                                boolean includeSpec)
                         throws WTException


Supported API: false

Parameters:
cb -
includeSpec - if true, include the XML specification in the returned NmRule
Returns:
NmRule
Throws:
WTException

getRuleObjectTypeFromPersistId

public String getRuleObjectTypeFromPersistId(String ObjType)
                                      throws WTException


Supported API: false

Parameters:
ObjType -
Returns:
String
Throws:
WTException