public class CodeSourceImpl extends PersistableDefObject implements ExprCodeSource
| Modifier and Type | Class and Description | 
|---|---|
class  | 
CodeSourceImpl.MethodSource  | 
PersistableDefObject.CustomizationType, PersistableDefObject.PersonalizationTypeExprCodeSource.TypemEditedProperties, mEditedPropertyExprsDEF_MDS_CLIENT_KEY, DEF_SCOPE_ALL, DEF_SCOPE_PERS, DEF_SCOPE_SESSION, DEF_SCOPE_SHARED, DEF_SCOPE_SITE, DEF_SCOPE_USER, mBaseDefObject, mExtendedDefObjects, mObjectResolved, PERSDEF_MDS_CLIENT_KEY, PROPERTY_EXPRMAPmFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX, RESID_SUFFIXDEFAULT_CODE_SOURCE_NAME, DYNAMIC_CODE_SOURCE_NAME, mLogger, PERSONALIZED_CODE_SOURCE_NAME, TMP_CODE_SOURCE_NAMEXML_STATEMENT| Modifier and Type | Method and Description | 
|---|---|
boolean | 
addExpression(ExprDef exprDef)  | 
void | 
applyDiffChildren(DifferDetails dif,
                 DiffResolver resolver)
Applies changes to children defs. 
 | 
CodeSourceImpl.MethodSource | 
createMethodSource(java.lang.String name,
                  java.util.List<java.lang.String> statements,
                  int lineNumber,
                  int lastLineNumber,
                  int columnNumber,
                  int lastColumnNumber)  | 
DifferDetails | 
diffChildren(DiffMergeable docDef,
            DiffMergeable orgDef,
            DifferDetails difDetails)
Performs diff of children defs. 
 | 
java.lang.Object | 
getCacheKey()
The key that should be used to cache the byte code that is generated
 for the code source. 
 | 
java.lang.String | 
getClassName()
The name of the class that will be generated by the compiler for
 the code source. 
 | 
java.lang.String | 
getContentType()  | 
java.lang.String | 
getDefXMLElementTag()  | 
java.lang.String | 
getDefXMLNameSpace()  | 
java.lang.String | 
getExpressionSource(ExprDef exprDef)  | 
java.io.Reader | 
getScriptReader()  | 
java.lang.String | 
getScriptText()  | 
ExprCodeSource.Type | 
getType()  | 
java.lang.String | 
getXMLElementTag()
Returns a piece of static info for the type of object this is invoked
 upon. 
 | 
boolean | 
hasExpression(ExprDef exprDef)
Return true if the CodeSource defines an expression for the specified
 expresmion. 
 | 
static CodeSourceImpl | 
loadFromXML(DefElement xmlElement)  | 
void | 
loadXMLContents(DefElement xmlElement,
               java.lang.String fullName)  | 
ExprDef | 
lookupExprDef(OwnerType type,
             java.lang.String path)  | 
boolean | 
removeExpression(ExprDef exprDef)  | 
void | 
setParent(NamedObjectImpl parent)
Sets this object's parent. 
 | 
void | 
writeChildren(DefWriter jos)
Writes the Object's children to the Persistent storage 
 | 
void | 
writeContents(DefWriter jos)
Objects should write their persistence output in this method 
 | 
addDefImport, addExtendedDefObject, addSavedDocName, adjustPropertyMapForWrite, allocatePropertyMap, allocatePropertyMapForEdits, applyDiffContents, beginDiffObjects, checkEditable, checkStructWithOld, close, createFromXML, deregisterDefObject, deregisterSessionObject, diffContents, diffObjects, ensureDifferDetails, findDefImport, finishedLoading, getBaseDir, getBasePackage, getDefImports, getDefManager, getDefTypeName, getDefWriter, getEditedPropertiesMap, getEditedPropertyExpressionsMap, getEditedPropertyMap, getEditObject, getEditVersionsAsString, getExtendedDefObjectsInternal, getFileName, getFullDirName, getFullFileName, getMajorVersion, getMergeableFullName, getMergeableName, getMinorVersion, getOrigObject, getPropertyMap, getSavedDocNames, getSessionSyncLock, getSubstitutedNames, getSyncLock, guaranteePath, hasExtendedDefObjects, includeCustomizationLayerInfo, isCustomizationEnabled, isCustomizationEnabled, isDirty, isEditable, isFromTip, isLoadBase, isMajorVersionChanged, isMinorVersionChanged, isNew, isPersonalizationEnabled, isPersonalizationEnabled, isPropertyExpression, loadDefImports, loadDefObject, loadXMLContentsNoResolve, lockDefinitionContext, mergeChanges, mergePropertyMap, objectRemoved, reapplyChanges, registerClass, registerDefObject, registerSessionDefObject, registerSiteDefObject, remove, removeAndDelete, removeDefImport, removeExtendedDefObject, removeProperty, saveXMLContents, setCustomizationEnabled, setCustomizationEnabled, setDefaultBaseDir, setDefMgr, setDirty, setEditable, setEditableFlag, setEditableObject, setFullName, setFullNameInternal, setLoadBase, setMajorVersionChanged, setNew, setOrigObject, setPersonalizationEnabled, setPersonalizationEnabled, setProperty, setPropertyExpression, setPropertyMap, setupDefWriterFromMO, staticUpdateChildrenList, unlockDefinitionContext, updateChildrenList, updateMdsKeyFromTip, verifyVersion, verifyVersionNullCheck, writeHeaderForNew, writeObject, writeVersion, writeXMLContentsaddPropertySetName, enableUpdateCheck, getAllExtendedDefObjects, getBaseDefObject, getContainerDef, getContainerName, getDefinitionState, getDefScope, getExtendedDefObjects, getMdsKey, getMdsReference, getPropertySetName, getPropertySetNames, getRootBaseDefObject, isBaseDefFor, isComponentDefinition, isDeprecated, isDynamicDefinitionObject, isObjectResolved, isSubtypeOf, isSuppressUpdateCheck, loadCustomProperties, loadProperties, loadPropertiesInMap, loadPropertySetNames, loadSchemaProperties, resolveReferences, setBaseDefObject, setBaseDefObject, setDefScope, setMdsKey, setMdsReference, setName, setObjectResolved, setPropertySetName, staticLoadCustomProperties, staticLoadSchemaProperties, suppressUpdateCheckgetAllProperties, getFullName, getName, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyExpressionDef, getPropertyExpressionsMap, getPropertyNamesSet, getRawPropertyValue, getResourcesFromBundle, getStringFromMessageBundle, refreshProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, resolvePropertyRaw, setPropertiesMap, setPropertiesMap2, setPropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getScriptTextgetFullNamepublic void setParent(NamedObjectImpl parent)
DefinitionObjectsetParent in class DefinitionObjectparent - the named object that is to be the parent of this object.public java.lang.String getClassName()
ExprCodeSourcegetClassName in interface ExprCodeSourcepublic java.lang.Object getCacheKey()
ExprCodeSourcegetCacheKey in interface ExprCodeSourcepublic ExprDef lookupExprDef(OwnerType type, java.lang.String path)
lookupExprDef in interface ExprCodeSourcepublic java.lang.String getExpressionSource(ExprDef exprDef)
getExpressionSource in interface ExprCodeSourcepublic boolean removeExpression(ExprDef exprDef)
removeExpression in interface ExprCodeSourcepublic boolean addExpression(ExprDef exprDef)
addExpression in interface ExprCodeSourcepublic boolean hasExpression(ExprDef exprDef)
ExprCodeSourcehasExpression in interface ExprCodeSourceexprDef - an expression def.  If null this will return true
    if the CodeSource defines any expression.public java.io.Reader getScriptReader()
getScriptReader in interface ExprCodeSourcepublic java.lang.String getScriptText()
getScriptText in interface ExprCodeSource@Concealed public java.lang.String getDefXMLElementTag()
getDefXMLElementTag in interface PersistentDefinitiongetDefXMLElementTag in class PersistableDefObject@Concealed public java.lang.String getXMLElementTag()
PersistentDefinitiongetXMLElementTag in interface PersistentDefinitiongetXMLElementTag in class PersistableDefObject@Concealed public java.lang.String getDefXMLNameSpace()
getDefXMLNameSpace in interface PersistentDefinitiongetDefXMLNameSpace in class PersistableDefObjectpublic void writeContents(DefWriter jos)
PersistentDefinitionwriteContents in interface PersistentDefinitionwriteContents in class PersistableDefObjectjos - the Output storage for persistencepublic void writeChildren(DefWriter jos)
PersistentDefinitionwriteChildren in interface PersistentDefinitionwriteChildren in class PersistableDefObjectjos - the Output storage for persistencepublic void loadXMLContents(DefElement xmlElement, java.lang.String fullName)
loadXMLContents in class PersistableDefObject@Concealed public static CodeSourceImpl loadFromXML(DefElement xmlElement)
public DifferDetails diffChildren(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeabledifDetails and
 return it at the end.
 For example, if this def has Child1 and Child2, its implementation should look something like:
    public DifferDetails diffChildren(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
    {
       difDetails = diffChildrenChild1(docDef, orgDef, difDetails);
       difDetails = diffChildrenChild1(docDef, orgDef, difDetails);
       return difDetails;
    }
 
 
 where diffChildrenChild1() uses DifferChildren's
 helper method diffChildrenList to diff the child defs.
 
diffChildren in interface DiffMergeablediffChildren in class PersistableDefObjectdocDef - the document-level definitionorgDef - the original definition.  It could be
   null if the definition did not exist originallydifDetails - the DifferDetails that accumulate
   the details of diff from the document-level (top-level) defDifferDetails that has all the details
   of diffpublic void applyDiffChildren(DifferDetails dif, DiffResolver resolver)
DiffMergeabledif contains the
 changes to be applied to the children.  For each child def, this method
 should first retrieve the diff details for the child, which is of type
 DifferChildren.  Then, it should call
 DifferChildren.applyDiffChanges(oracle.jbo.mom.DiffChildrenMerge, oracle.jbo.mom.DiffResolver) to perform
 the change operation.
 
 applyChanges() requires a
 DiffChildrenMerge object, which has the insert,
 update, and remove methods.  'this' def object must
 provide implmementation of these operations.
 
Here is a sample:
    public void applyDiffChildren(DifferDetails dif, DiffResolver resolver)
    {
       DifferChangeMap detailMap = dif.getDetailMap();
       if (detailMap != null)
       {
          DifferChildren difChild1 = (DifferChildren) detailMap.getValue();
          if (difVCs != null)
          {
             DiffChildrenMerge dm = new DiffChildrenMerge()
             {
                public void insertChild(Object id, Object value)
                {
                   .. perform insert op for Child1 ..
                }
                public void updateChild(Object id, Object value, Object oldValue)
                {
                   .. perform update op for Child1 ..
                }
                public void removeChild(Object id)
                {
                   .. perform remove op for Child1 ..
                }
             };
             difChild1.applyDiffChanges(dm, resolver);
          }
          // Similarly for Child2
       }
    }
  applyDiffChildren in interface DiffMergeableapplyDiffChildren in class PersistableDefObjectpublic ExprCodeSource.Type getType()
getType in interface ExprCodeSourcepublic java.lang.String getContentType()
getContentType in interface ExprCodeSource@Concealed public CodeSourceImpl.MethodSource createMethodSource(java.lang.String name, java.util.List<java.lang.String> statements, int lineNumber, int lastLineNumber, int columnNumber, int lastColumnNumber)