|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
com.ptc.netmarkets.rule.StandardNmRuleService
Use the newStandardNmRuleService
static factory method(s),
not the StandardNmRuleService
constructor, to construct
instances of this class. Instances must be constructed using the static
factory(s), in order to ensure proper initialization of the instance.
Supported API: false
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
private static String |
RESOURCE
|
private static String |
RULE_ROW_ACTION_MODEL
|
private static String |
WT_RESOURCE
|
Fields inherited from class wt.services.StandardManager |
|
Fields inherited from interface wt.services.Manager |
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE |
Constructor Summary | |
StandardNmRuleService()
|
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 TypeBasedRule s that are of type RuleType.TYPE
and whose object type attribute equals objType . |
private NmChangeModel |
getChangeModel(NmRule nmRule,
int changeType)
Get a change model that represents the modification of or addition of the specified rule. |
String |
getConceptualClassname()
Deprecated. |
private String |
getContents(File xmlFile,
String encoding)
|
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 |
private PersistentRule |
getRule(NmCommandBean cb)
Return the PersistentRule that is referenced by
the command bean. |
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 |
private ArrayList |
getRuleRowData(NmRule nmRule)
|
ArrayList |
list(NmCommandBean cb)
Supported API: false |
ArrayList |
listRulesForType(String className,
NmOid projectOid)
Supported API: false |
static StandardNmRuleService |
newStandardNmRuleService()
Default factory for the class. |
NmChangeModel[] |
update(NmCommandBean cb,
Hashtable params)
Update a rule using the data in the request. |
private void |
updateRule(Rule rule,
Hashtable params)
Update the specified rule using the parameter values contained in the spcified Hashtable . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static final String WT_RESOURCE
private static final String RULE_ROW_ACTION_MODEL
Constructor Detail |
public StandardNmRuleService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
public static StandardNmRuleService newStandardNmRuleService() throws WTException
WTException
public ArrayList list(NmCommandBean cb) throws WTException
list
in interface NmRuleService
cb
-
WTException
public ArrayList listRulesForType(String className, NmOid projectOid) throws WTException
listRulesForType
in interface NmRuleService
className
- projectOid
-
WTException
public Rule getRule(String name, RuleType ruleType, WTContainerRef container) throws WTException
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
.
getRule
in interface NmRuleService
name
- the rule name (cannot be null)ruleType
- the rule type (cannot be null)container
-
WTException
public NmChangeModel[] create(NmCommandBean cb, Hashtable params) throws WTException
create
in interface NmRuleService
cb
- params
- the request parameters
WTException
public NmChangeModel[] update(NmCommandBean cb, Hashtable params) throws WTException
update
in interface NmRuleService
cb
- params
-
WTException
public NmChangeModel[] enable(NmCommandBean cb) throws WTException
enable
in interface NmRuleService
cb
-
WTException
public NmChangeModel[] disable(NmCommandBean cb) throws WTException
disable
in interface NmRuleService
cb
-
WTException
public NmRule getNmRule(NmCommandBean cb, Hashtable params) throws WTException
getNmRule
in interface NmRuleService
cb
- params
- the request parameters
WTException
public Enumeration findTypes(Class objType, WTContainerRef container, boolean enabled) throws WTException
TypeBasedRule
s 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
findTypes
in interface NmRuleService
objType
- find rules that reference this object typecontainer
- The container in which to search for typesenabled
-
WTException
public NmRule getNmRule(Rule rule) throws WTException
NmRule
for the specified rule. Do not include
the XML contents in the returned NmRule
.
getNmRule
in interface NmRuleService
rule
-
WTException
public NmRule getNmRule(Rule rule, boolean includeSpec) throws WTException
getNmRule
in interface NmRuleService
rule
- includeSpec
- if true include the XML specification in the returned
WTException
public NmRule getRuleProperties(NmCommandBean cb, boolean includeSpec) throws WTException
getRuleProperties
in interface NmRuleService
cb
- includeSpec
- if true, include the XML specification in the returned NmRule
WTException
public String getRuleObjectTypeFromPersistId(String ObjType) throws WTException
getRuleObjectTypeFromPersistId
in interface NmRuleService
ObjType
-
WTException
private PersistentRule getRule(NmCommandBean cb) throws WTException
PersistentRule
that is referenced by
the command bean.
WTException
private ArrayList getRuleRowData(NmRule nmRule) throws WTException
WTException
private void updateRule(Rule rule, Hashtable params) throws NmException
Hashtable
. The changes are NOT persisted.
NmException
private String getContents(File xmlFile, String encoding) throws IOException, WTException
IOException
WTException
private NmChangeModel getChangeModel(NmRule nmRule, int changeType) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |