|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.fc.WTObject
wt.fc.Item
wt.rule.PersistentRule
A Rule
provides a holder for business logic that describes
actions to be performed under certain conditions. This business logic
is specified using XML.
A Rule
is uniquely identified by its name
and
ruleType
.
Supported API: false
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
static String |
CONTAINER
Label for the attribute. |
private WTContainerRef |
containerReference
|
private boolean |
defaultRule
|
private String |
description
|
private static long |
ENABLED
The value of the enabledFlag attribute when a rule is enabled. |
static String |
ENABLED_FLAG
Label for the attribute; A flag used to indicate whether or not the rule is enabled. |
private long |
enabledFlag
|
static long |
EXTERNALIZATION_VERSION_UID
|
private String |
name
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
RESOURCE
|
private RuleType |
ruleType
|
(package private) static long |
serialVersionUID
|
private XMLLob |
specification
|
static String |
SPECIFICATION
Label for the attribute; The specification of the business rule logic. |
Fields inherited from class wt.fc.Item |
VERSION_40_UID, VERSION_51_UID |
Fields inherited from class wt.fc.WTObject |
CREATE_TIMESTAMP, MODIFY_TIMESTAMP |
Fields inherited from interface wt.inf.container.WTContained |
CONTAINER_ID, CONTAINER_NAME, CONTAINER_REFERENCE |
Fields inherited from interface wt.fc.Persistable |
IDENTITY, PERSIST_INFO, TYPE |
Fields inherited from interface wt.rule.Rule |
DEFAULT_RULE, DESCRIPTION, NAME, RULE_TYPE |
Fields inherited from interface wt.admin.DomainAdministered |
DOMAIN_REF, INHERITED_DOMAIN |
Fields inherited from interface wt.identity.DisplayIdentification |
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE |
Constructor Summary | |
PersistentRule()
|
Method Summary | |
private void |
containerReferenceValidate(WTContainerRef a_ContainerReference)
|
private void |
descriptionValidate(String a_Description)
|
boolean |
equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifier s. |
WTContainer |
getContainer()
Gets the object for the association that plays role: CONTAINER. |
String |
getContainerName()
Gets the value of the attribute: CONTAINER_NAME. |
WTContainerRef |
getContainerReference()
Gets the value of the attribute: CONTAINER_REFERENCE. |
String |
getContents()
Get the String content of the rule's specification. |
String |
getDescription()
Gets the value of the attribute: DESCRIPTION. |
static SearchCondition |
getDisabledSearchCondition()
Return a search condition that can be used to select disabled rules. |
long |
getEnabledFlag()
Gets the value of the attribute: ENABLED_FLAG. |
static SearchCondition |
getEnabledSearchCondition()
Return a search condition that can be used to select enabled rules. |
String |
getEncoding()
Get the character encoding of the rule's specification. |
InputSource |
getInputSource()
Get an InputSource on the contents of this rule's
XML specification. |
String |
getName()
Gets the value of the attribute: NAME. |
RuleType |
getRuleType()
Gets the value of the attribute: RULE_TYPE. |
XMLLob |
getSpecification()
Gets the value of the attribute: SPECIFICATION. |
int |
hashCode()
Returns a hash code for this object based upon its ObjectIdentifier . |
protected void |
initialize()
Initialize the rule. |
protected void |
initialize(String name,
RuleType ruleType)
Initialize the rule with the given name and
ruleType . |
protected void |
initialize(String name,
RuleType ruleType,
WTContainerRef container)
Initialize the rule with the given name and
ruleType . |
protected void |
initialize(WTContainerRef container)
Initialize the rule. |
boolean |
isDefaultRule()
Gets the value of the attribute: DEFAULT_RULE. |
boolean |
isEnabled()
Specifies whether or not this rule is enabled. |
private void |
nameValidate(String a_Name)
|
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
void |
readExternal(PersistentRetrieveIfc input)
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(PersistentRule thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
void |
setContainer(WTContainer a_Container)
Sets the object for the association that plays role: CONTAINER. |
void |
setContainerReference(WTContainerRef a_ContainerReference)
Sets the value of the attribute: CONTAINER_REFERENCE. |
void |
setContents(String xml)
Set the content of the rule's specification to the the specified String . |
void |
setDefaultRule(boolean a_DefaultRule)
Sets the value of the attribute: DEFAULT_RULE. |
void |
setDescription(String a_Description)
Sets the value of the attribute: DESCRIPTION. |
void |
setEnabledFlag(long a_EnabledFlag)
Sets the value of the attribute: ENABLED_FLAG. |
void |
setEncoding(String encoding)
Set the encoding of the rule's specification. |
void |
setName(String a_Name)
Sets the value of the attribute: NAME. |
void |
setRuleType(RuleType a_RuleType)
Sets the value of the attribute: RULE_TYPE. |
void |
setSpecification(XMLLob a_Specification)
Sets the value of the attribute: SPECIFICATION. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
void |
writeExternal(PersistentStoreIfc output)
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store. |
Methods inherited from class wt.fc.Item |
getDomainRef, isInheritedDomain, readVersion, setDomainRef, setInheritedDomain |
Methods inherited from class wt.fc.WTObject |
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo, toString |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wt.fc.Persistable |
checkAttributes, getIdentity, getPersistInfo, getType, setPersistInfo |
Methods inherited from interface wt.fc.NetFactor |
getClassInfo, getConceptualClassname |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final String SPECIFICATION
XML
. The semantics of
the specification depends on the rule's RuleType
.
private XMLLob specification
public static final String ENABLED_FLAG
Do not set this attribute directly. Instead use RuleService.enableRule(wt.rule.Rule)
or RuleService.disableRule(wt.rule.Rule)
.
The enabledFlag is combined with other attributes to form a uniqueness
constraint that allows only a single enabled rule but any number of disabled
rules that share the same values for the other attributes.
Supported API: false
private long enabledFlag
private static final long ENABLED
public static final String CONTAINER
private WTContainerRef containerReference
private String name
private RuleType ruleType
private boolean defaultRule
private String description
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
Constructor Detail |
public PersistentRule()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class Item
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class Item
input
-
IOException
ClassNotFoundException
protected boolean readVersion(PersistentRule thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public void writeExternal(PersistentStoreIfc output) throws SQLException, DatastoreException
(Not intended for general use.)
Supported API: false
writeExternal
in interface ObjectMappable
writeExternal
in class Item
output
-
SQLException
DatastoreException
public void readExternal(PersistentRetrieveIfc input) throws SQLException, DatastoreException
(Not intended for general
use.)
Supported API: false
readExternal
in interface ObjectMappable
readExternal
in class Item
input
-
SQLException
DatastoreException
public XMLLob getSpecification()
XML
. The semantics of the specification depends
on the rule's RuleType
.
public void setSpecification(XMLLob a_Specification) throws WTPropertyVetoException
XML
. The semantics of the specification depends
on the rule's RuleType
.
a_Specification
-
WTPropertyVetoException
public long getEnabledFlag()
Do not set this attribute directly. Instead use RuleService.enableRule(wt.rule.Rule)
or RuleService.disableRule(wt.rule.Rule)
.
The enabledFlag is combined with other attributes to form a uniqueness
constraint that allows only a single enabled rule but any number of
disabled rules that share the same values for the other attributes.
Supported API: false
public void setEnabledFlag(long a_EnabledFlag)
Do not set this attribute directly. Instead use RuleService.enableRule(wt.rule.Rule)
or RuleService.disableRule(wt.rule.Rule)
.
The enabledFlag is combined with other attributes to form a uniqueness
constraint that allows only a single enabled rule but any number of
disabled rules that share the same values for the other attributes.
Supported API: false
a_EnabledFlag
- public String getContents()
String
content of the rule's specification.
The specification is written in XML
. The semantics
of the specification depends on the rule's RuleType
.
getContents
in interface Rule
public void setContents(String xml) throws WTPropertyVetoException
String
. The specification is written in XML
.
The semantics of the specification depends on the rule's RuleType
.
setContents
in interface Rule
xml
-
WTPropertyVetoException
public String getEncoding()
XML
. The semantics of the specification
depends on the rule's RuleType
.
getEncoding
in interface Rule
public void setEncoding(String encoding) throws WTPropertyVetoException
XML
. The semantics of the specification depends
on the rule's RuleType
.
setEncoding
in interface Rule
encoding
-
WTPropertyVetoException
public InputSource getInputSource() throws UnsupportedEncodingException
InputSource
on the contents of this rule's
XML
specification.
This method returns null if the rule specification has no content.
Supported API: false
getInputSource
in interface Rule
UnsupportedEncodingException
public boolean isEnabled()
isEnabled
in interface Rule
public static SearchCondition getEnabledSearchCondition() throws QueryException
QueryException
public static SearchCondition getDisabledSearchCondition() throws QueryException
QueryException
public String getContainerName()
WTContainer
this object is assigned to.
getContainerName
in interface WTContained
public WTContainer getContainer()
getContainer
in interface WTContained
public void setContainer(WTContainer a_Container) throws WTPropertyVetoException, WTException
setContainer
in interface WTContained
a_Container
-
WTPropertyVetoException
WTException
public WTContainerRef getContainerReference()
getContainerReference
in interface WTContained
public void setContainerReference(WTContainerRef a_ContainerReference) throws WTPropertyVetoException
setContainerReference
in interface WTContained
a_ContainerReference
-
WTPropertyVetoException
private void containerReferenceValidate(WTContainerRef a_ContainerReference) throws WTPropertyVetoException
a_ContainerReference
-
WTPropertyVetoException
public String getName()
getName
in interface Rule
public void setName(String a_Name) throws WTPropertyVetoException
setName
in interface Rule
a_Name
-
WTPropertyVetoException
private void nameValidate(String a_Name) throws WTPropertyVetoException
a_Name
-
WTPropertyVetoException
public RuleType getRuleType()
getRuleType
in interface Rule
public void setRuleType(RuleType a_RuleType) throws WTPropertyVetoException
setRuleType
in interface Rule
a_RuleType
-
WTPropertyVetoException
public boolean isDefaultRule()
isDefaultRule
in interface Rule
public void setDefaultRule(boolean a_DefaultRule) throws WTPropertyVetoException
setDefaultRule
in interface Rule
a_DefaultRule
-
WTPropertyVetoException
public String getDescription()
getDescription
in interface Rule
public void setDescription(String a_Description) throws WTPropertyVetoException
setDescription
in interface Rule
a_Description
-
WTPropertyVetoException
private void descriptionValidate(String a_Description) throws WTPropertyVetoException
a_Description
-
WTPropertyVetoException
public boolean equals(Object obj)
ObjectIdentifier
s.
Changed or stale copies are still considered equal by this method.
Delegates to PersistenceHelper.equals(Persistable,Object)
.
Warning: Certain core Windchill operations may depend upon
equals
being ObjectIdentifier
-based. Changes
to the default implementation should be done with care, if at all.
Supported API: false
equals
in class Item
obj
-
public int hashCode()
ObjectIdentifier
.
Delegates to PersistenceHelper.hashCode(Persistable)
.
Warning: Certain core Windchill operations may depend upon
hashCode
being ObjectIdentifier-based
. Changes
to the default implementation should be done with care, if at all.
Supported API: false
hashCode
in class Item
protected void initialize() throws WTException
Also set the specification
to an empty
XMLLob
. The database doesn't seem to like
empty blobs.
Would be nice if the code generator generated constructors
and initialize methods for abstract
classes.
initialize
in class Item
WTException
protected void initialize(WTContainerRef container) throws WTException
Also set the specification
to an empty
XMLLob
. The database doesn't seem to like
empty blobs.
Would be nice if the code generator generated constructors
and initialize methods for abstract
classes.
WTException
protected void initialize(String name, RuleType ruleType, WTContainerRef container) throws WTException
name
and
ruleType
. The rule is created in the specified
container.
Also set the specification
to an empty
XMLLob
. The database doesn't seem to like
empty blobs.
Would be nice if the code generator generated constructors
and initialize methods for abstract
classes.
WTException
protected void initialize(String name, RuleType ruleType) throws WTException
name
and
ruleType
. The rule is created in the
Classic
container.
Also set the specification
to an empty
XMLLob
. The database doesn't seem to like
empty blobs.
Would be nice if the code generator generated constructors
and initialize methods for absrtact
classes.
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |