com.pega.pegarules.pub.dictionary
Interface ClassInfo


public interface ClassInfo

Provides cached access to Class information. This includes information about the class' relationship with other classes and validation of the contents of the page against the definition in the dictionary. The static method ClassInfo.getClassInfo() is where you start.

Version:
$Revision: 703 $ $Date: 2009-10-28 10:45:00 -0400 (Wed, 28 Oct 2009) $
Author:
clinb

Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String VERSION
           
 
Method Summary
 void checkPropertyDefinition(ClipboardPage aPropDef)
          Edits the contents of the Rule-Obj-Property instance passed to it.
 void checkPropertyKeys(ClipboardPage aPropDef)
          Validates the contents of the Rule-Obj-Property instance passed to it.
 java.lang.String fromDefinition(java.lang.String aReference)
          Fetch the value of the named property from the Rule-Obj-Class instance for the class that this instance contains.
 java.lang.String fromDefinition(java.lang.String aPropertyName, java.lang.String aReference)
          Fetch the value of the named property from the named Rule-Obj-Property instance for the property that this instance contains.
 java.lang.String getClassName()
          Return the name of the class represented by this instance of ClassInfo.
 ImmutablePropertyAliasInfo getImmutablePropertyAliasInfo(java.lang.String aAliasName)
          Factory method for ImmutablePropertyAliasInfo Objects that describe the property aliases defined for this class.
 ImmutablePropertyInfo getImmutablePropertyInfo(java.lang.String aName)
          Factory method for ImmutablePropertyInfo Objects that describe the properties defined for this class.
 ImmutablePropertyInfo getImmutableTerminalPropertyInfo(java.lang.String aRelativeReference)
          Factory method for ImmutablePropertyInfo Objects that describe the properties defined for this class.
 ImmutablePropertyInfo getImmutableTerminalPropertyInfo(java.lang.String aRelativeReference, boolean aReferenceMayContainWildCards)
          Factory method for ImmutablePropertyInfo Objects that describe the properties defined for this class.
 java.lang.String getJavaWrapperClass()
          Get the name of the Java class used to back up this class's Java Properties.
 java.lang.String getParentClassName()
          Return the name of the parent of the class represented by this instance of ClassInfo.
 PropertyInfo getPropertyInfo(java.lang.String aName)
          Deprecated.  
 java.lang.String getRuleSet()
           
 boolean isAncestorOf(ClipboardPage aPage)
          Test to see if this is an ancestor of the class of aPage.
 boolean isAncestorOf(java.lang.String aClassName)
          Test to see if this is an ancestor of a class named aClassName.
 boolean isChildOf(ClipboardPage aPage)
          Test to see if this represents a child of a class of aPage.
 boolean isChildOf(java.lang.String aClassName)
          Test to see if this represents a child of a class named aClassName.
 boolean isClassless()
          Is the page this ClassInfo was built for a classless page?
 boolean isConcrete()
           
 boolean isDefinitionOf(ClipboardPage aPage)
          Test the class of the aPage parameter to see if it matches this objects' class,
 boolean isDefinitionOf(java.lang.String aClassName)
          Test the aClassName parameter to see if it matches this objects' class.
 boolean isFinal()
           
 boolean isParentOf(ClipboardPage aPage)
          Test to see if this represents the parent of the class of aPage.
 boolean isParentOf(java.lang.String aClassName)
          Test to see if this represents the parent of a class named aClassName.
 boolean isUndefined()
          Is the page this ClassInfo was built for representing an undefined class?
 boolean validate(ClipboardPage aPage, boolean aForceExpand)
          Examine an instance of a ClipboardPage and validate the contents against the definition of the class (indicated in the pxObjClass on aPage).
 boolean validate(ClipboardProperty aProperty, boolean aForceExpand)
          Exactly like validate, but works with properties.
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

VERSION

static final java.lang.String VERSION
See Also:
Constant Field Values
Method Detail

isUndefined

boolean isUndefined()
Is the page this ClassInfo was built for representing an undefined class?

Returns:
true if the page had a pxObjClass property with an unknown class name as its' value. false otherwise.

isClassless

boolean isClassless()
Is the page this ClassInfo was built for a classless page?

Returns:
true if the had an empty or no pxObjClass property. false otherwise.

fromDefinition

java.lang.String fromDefinition(java.lang.String aReference)
Fetch the value of the named property from the Rule-Obj-Class instance for the class that this instance contains.

Parameters:
aReference - a reference to a property on the Rule-Obj-Class page.
Returns:
value of that property.

fromDefinition

java.lang.String fromDefinition(java.lang.String aPropertyName,
                                java.lang.String aReference)
Fetch the value of the named property from the named Rule-Obj-Property instance for the property that this instance contains.

Parameters:
aPropertyName -
aReference - a reference to a property on the Rule-Obj-Class page.
Returns:
value of that property.

getJavaWrapperClass

java.lang.String getJavaWrapperClass()
Get the name of the Java class used to back up this class's Java Properties.

Returns:
Java class name

isDefinitionOf

boolean isDefinitionOf(java.lang.String aClassName)
Test the aClassName parameter to see if it matches this objects' class.

Parameters:
aClassName - Name of the class to test for equality,
Returns:
true if this class represents the class named in the parameter aClassName, false otherwise

isDefinitionOf

boolean isDefinitionOf(ClipboardPage aPage)
Test the class of the aPage parameter to see if it matches this objects' class,

Parameters:
aPage - Instance of a ClipboardPage containing the class to test for equality,
Returns:
true if this class represents the same class as aPage, false otherwise

isAncestorOf

boolean isAncestorOf(java.lang.String aClassName)
Test to see if this is an ancestor of a class named aClassName. Ancestor is defined to include parents, grands & greats.

Parameters:
aClassName - Name of the class to test for equality
Returns:
true if the class named aClassName is defined, and if this class is an ancestor of aClassName; false otherwise

isAncestorOf

boolean isAncestorOf(ClipboardPage aPage)
Test to see if this is an ancestor of the class of aPage. Ancestor is defined to include parents, grands & greats.

Parameters:
aPage - Instance of a ClipboardPage containing the class to test for equality,
Returns:
true if this is an ancestor of this aPage instance, false otherwise

isChildOf

boolean isChildOf(java.lang.String aClassName)
Test to see if this represents a child of a class named aClassName.

Parameters:
aClassName - Name of the class to test for equality
Returns:
true if this is a child class of the class named in aClassName, false otherwise

isChildOf

boolean isChildOf(ClipboardPage aPage)
Test to see if this represents a child of a class of aPage.

Parameters:
aPage - Instance of a ClipboardPage containing the class to test for equality,
Returns:
true if this is a child class of this aPage instance, false otherwise

isParentOf

boolean isParentOf(java.lang.String aClassName)
Test to see if this represents the parent of a class named aClassName.

Parameters:
aClassName - Name of the class to test for equality
Returns:
true if this is the parent class of the class named aClassName, false otherwise

isParentOf

boolean isParentOf(ClipboardPage aPage)
Test to see if this represents the parent of the class of aPage.

Parameters:
aPage - Instance of a ClipboardPage containing the class to test for equality,
Returns:
true if this is the parent class of this aPage instance, false otherwise

isFinal

boolean isFinal()
Returns:
true if this class has children, false otherwise

isConcrete

boolean isConcrete()
Returns:
true if this class can have instances, false otherwise

getClassName

java.lang.String getClassName()
Return the name of the class represented by this instance of ClassInfo.

Returns:
a String containing the name of this class. Returns "" if this represents an undefined class.

getParentClassName

java.lang.String getParentClassName()
Return the name of the parent of the class represented by this instance of ClassInfo. Use this in conjunction with @see #get(String) to build up a collection of ClassInfo structures for related classes.

Returns:
a String containing the name of this class's parent class.

getPropertyInfo

PropertyInfo getPropertyInfo(java.lang.String aName)
Deprecated. 

Obsolete factory method for PropertyInfo Objects that describe the properties defined for this class. Use {#getImmutablePropertyInfo} instead. If you just need the entryCode string, @see #getEntryCode()

Parameters:
aName - a Property name that is defined on this page.
Returns:
The return value is a valid PropertyInfo Object describing the property.

getImmutableTerminalPropertyInfo

ImmutablePropertyInfo getImmutableTerminalPropertyInfo(java.lang.String aRelativeReference)
Factory method for ImmutablePropertyInfo Objects that describe the properties defined for this class. This allows a complex references (nested pages).

Parameters:
aRelativeReference - a complex relative reference name that is defined on this page.
Returns:
The return value is a valid ImmutablePropertyInfo Object describing the referenced property.

getImmutableTerminalPropertyInfo

ImmutablePropertyInfo getImmutableTerminalPropertyInfo(java.lang.String aRelativeReference,
                                                       boolean aReferenceMayContainWildCards)
Factory method for ImmutablePropertyInfo Objects that describe the properties defined for this class. This allows a complex references (nested pages).

Parameters:
aRelativeReference - a complex relative reference name that is defined on this page.
aReferenceMayContainWildCards - should aRelativeReference be allowed to contain wildcards?
Returns:
The return value is a valid ImmutablePropertyInfo Object describing the referenced property.

getImmutablePropertyInfo

ImmutablePropertyInfo getImmutablePropertyInfo(java.lang.String aName)
Factory method for ImmutablePropertyInfo Objects that describe the properties defined for this class. If you just need the entryCode string, @see #getEntryCode()

Parameters:
aName - a Property name that is defined on this page.
Returns:
The return value is a valid ImmutablePropertyInfo Object describing the property.

getImmutablePropertyAliasInfo

ImmutablePropertyAliasInfo getImmutablePropertyAliasInfo(java.lang.String aAliasName)
Factory method for ImmutablePropertyAliasInfo Objects that describe the property aliases defined for this class.

Parameters:
aAliasName - a Property Alias name that is defined on this page.
Returns:
The return value is a valid ImmutablePropertyAliasInfo Object describing the property.

validate

boolean validate(ClipboardPage aPage,
                 boolean aForceExpand)
Examine an instance of a ClipboardPage and validate the contents against the definition of the class (indicated in the pxObjClass on aPage). This includes validating the list of properties found AND the values for those properties which have defined constraints. This cannot be called on a read only page since messages are added to the page describing the errors found and the page status @see #mPageStatus is updated. If a read only page is used the exception @see #ReadOnlyException is thrown by @see #ClipboardPage#addMessage(String). Content of pages which is still embedded in a stream can be considered valid since it came from the database. This can be selected using the @see #aForceExpand parameter.

Parameters:
aPage - - containing a page
aForceExpand - - should embedded pages be expanded from their streams? (lazy page evaluation)
Returns:
true if the page is well-formed with values that are within constraints, false otherwise. This also implies that error messages have been added to ClipboardPage 'aPage' indicating the specifics of the errors.

validate

boolean validate(ClipboardProperty aProperty,
                 boolean aForceExpand)
Exactly like validate, but works with properties. The validation is exactly the same as the validation of a whole page, but is restricted to the one property and its' embedded pages.

Parameters:
aProperty - Reference to a property on a page that needs to be validated individually. The class used for context is the class of the page that contains this property.
aForceExpand - - should embedded pages be expanded from their streams? (lazy page evaluation)
Returns:
true if the page is well-formed with values that are within constraints, false otherwise. This also implies that error messages have been added to aProperty. If the enclosing page is valid a message is added indicating the specifics of the errors. If there is alread a message on the page and @link #isValid is already false no additional messages are added to the enclosing page.

checkPropertyDefinition

void checkPropertyDefinition(ClipboardPage aPropDef)
Edits the contents of the Rule-Obj-Property instance passed to it. Errors are reported directly on the page and in the properties in the form of ClipboardPage messages.

Parameters:
aPropDef - the instances of the Rule-Obj-Property to validate.

checkPropertyKeys

void checkPropertyKeys(ClipboardPage aPropDef)
Validates the contents of the Rule-Obj-Property instance passed to it. Errors are reported directly on the page and in the properties in the form of ClipboardPage messages. This method only validates fields in the instance that can be specified from the New or Save-As dialog boxes, such as the class name, the property name, reserved names, etc.

Parameters:
aPropDef - the instances of the Rule-Obj-Property to validate.

getRuleSet

java.lang.String getRuleSet()


Copyright © 2012 Pegasystems Inc. All Rights Reserved.