public abstract class DCExecutableBindingDef extends DCDefBase implements DCIExecutableDef
PersistableDefObject.CustomizationType, PersistableDefObject.PersonalizationType| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PNAME_attrHintsSuffix |
static java.lang.String |
PNAME_option |
static java.lang.String |
PNAME_option_ALWAYS |
static java.lang.String |
PNAME_option_DEFAULT |
static java.lang.String |
PNAME_option_DEFER |
static java.lang.String |
PNAME_option_IF_NEEDED |
static java.lang.String |
PNAME_option_NEVER |
static java.lang.String |
PNAME_option_PREPARE |
static java.lang.String |
PNAME_option_PREPARE_OPT |
static java.lang.String |
PNAME_option_REFRESH |
static java.lang.String |
PNAME_option_REFRESH_OPT |
static java.lang.String |
PNAME_option_RENDER |
static java.lang.String |
PNAME_option_RENDER_OPT |
static java.lang.String |
PNAME_optionExpr |
static java.lang.String |
PNAME_refreshAfter |
static int |
RC_ALWAYS |
static int |
RC_DEFAULT |
static int |
RC_DEFER |
static int |
RC_NEVER |
static int |
RC_PREPARE |
static int |
RC_PREPARE_OPT |
static int |
RC_REFRESH |
static int |
RC_REFRESH_OPT |
static int |
RC_RENDER |
static int |
RC_RENDER_OPT |
static int |
RC_UNINIT |
DEF_XMLNS, DEF_XMLNS_BASE, EMPTY_STR, PNAME_AccessorIterator, PNAME_Action, PNAME_Boolean, PNAME_Button, PNAME_ButtonGroup, PNAME_Calendar, PNAME_ComboBox, PNAME_ComboBoxLovEdit, PNAME_DataControlAction, PNAME_DefaultControl, PNAME_DynamicTable, PNAME_EnumList, PNAME_EventBinding, PNAME_EventEnabled, PNAME_EventEnabled_NONE, PNAME_EventEnabled_PPR, PNAME_EventEnabled_PUSH, PNAME_FormattedTextField, PNAME_Graph, PNAME_HGrid, PNAME_Iterator, PNAME_Label, PNAME_ListSingleSel, PNAME_LovButton, PNAME_LOVList, PNAME_MethodAction, PNAME_MethodIterator, PNAME_NavigationBar, PNAME_NavigationList, PNAME_Panel, PNAME_Parameter, PNAME_Permission, PNAME_ProgressBar, PNAME_ProgressBarAttr, PNAME_Query, PNAME_Range, PNAME_ScrollBar, PNAME_ScrollBarAttr, PNAME_Search, PNAME_Shuttle, PNAME_Slider, PNAME_SliderAttr, PNAME_Spinner, PNAME_Table, PNAME_TextField, PNAME_ToplinkIterator, PNAME_Tree, PNAME_TreeTablemEditedProperties, 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_SUFFIXEXECUTABLE_ACTION, EXECUTABLE_ITERATORBINDING, EXECUTABLE_REGIONXML_STATEMENT| Constructor and Description |
|---|
DCExecutableBindingDef() |
DCExecutableBindingDef(java.lang.String name)
Internal: Applications should not use this method.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyDiffChildren(DifferDetails dif,
DiffResolver resolver)
Applies changes to children defs.
|
void |
applyDiffContents(DifferDetails dif,
DiffResolver resolver)
When diff/merge operation is requested, we have the following
three def objects:
|
abstract java.lang.Object |
createExecutableBinding(BindingContext ctx,
DCBindingContainer ctr)
Create an executable binding instance based on this definition in the given
BindingContainer.
|
DifferDetails |
diffContents(DiffMergeable docDef,
DiffMergeable orgDef,
DifferDetails difDetails)
Performs diff of scalar values.
|
protected java.lang.String[] |
getDependencyNames() |
abstract int |
getExecutableType()
Return EXECUTABLE_REGION, EXECUTABLE_ITERATORBINDING or EXECUTABLE_ACTION
based on what kind of binding this definition creates.
|
protected java.lang.String |
getHintsSuffix() |
protected java.lang.String |
getPermissionClassName()
Internal: Applications should not use this method.
|
protected java.lang.String |
getPermissionTargetName()
Internal: Applications should not use this method.
|
java.lang.String |
getRefreshExpression() |
int |
getRefreshOption() |
protected int |
getRefreshOptionValue()
Internal: Applications should not use this method.
|
java.lang.String |
getXMLElementTag()
Returns a piece of static info for the type of object this is invoked
upon.
|
void |
init(java.util.HashMap initValues)
Internal: Applications should not use this method.
|
void |
initializeExecutableBinding(BindingContext ctx,
DCBindingContainer bindingContainer,
java.lang.Object binding)
Internal: Applications should not use this method.
|
static int |
internalGetRefreshOptionFromString(java.lang.String str)
*** For internal framework use only ***
|
protected boolean |
internalHasPermission(DCBindingContainer ctr)
Internal: Applications should not use this method.
|
boolean |
isRefreshable(DCBindingContainer ctr,
DCIExecutable exec,
int refreshFlag)
Internal: Applications should not use this method.
|
protected boolean |
isRefreshable(DCBindingContainer ctr,
DCIExecutable exec,
int refreshFlag,
boolean refreshDeferredOnCondition) |
protected void |
retrieveFromXML(DefElement xmlElement,
java.util.HashMap valueTab)
Internal: Applications should not use this method.
|
convertToBoolean, convertToDataChangePolicy, convertToInt, convertToIntArray, convertToLong, createAndLoadFromXML, getDefClassName, getDefTypeId, getDefXMLNameSpace, getOrigObject, getPermissionDef, getPersonalizer, getPersonalizerClass, getSubType, initSubType, isDirty, isNew, loadChildrenFromXML, loadFromXML, loadPermissionDef, loadXMLContents, readXMLBoolean, readXMLInt, readXMLLong, readXMLString, readXMLStringArray, readXMLStringArrayList, readXMLStringArrayList, saveXMLContents, setDefClassName, setDirty, setNew, setOrigObject, setPermissionDef, setSubType, setupDefWriterFromMO, writeXMLContentsaddDefImport, addExtendedDefObject, addSavedDocName, adjustPropertyMapForWrite, allocatePropertyMap, allocatePropertyMapForEdits, beginDiffObjects, checkEditable, checkStructWithOld, close, createFromXML, deregisterDefObject, deregisterSessionObject, diffChildren, diffObjects, ensureDifferDetails, findDefImport, finishedLoading, getBaseDir, getBasePackage, getDefImports, getDefManager, getDefTypeName, getDefWriter, getDefXMLElementTag, getEditedPropertiesMap, getEditedPropertyExpressionsMap, getEditedPropertyMap, getEditObject, getEditVersionsAsString, getExtendedDefObjectsInternal, getFileName, getFullDirName, getFullFileName, getMajorVersion, getMergeableFullName, getMergeableName, getMinorVersion, getPropertyMap, getSavedDocNames, getSessionSyncLock, getSubstitutedNames, getSyncLock, guaranteePath, hasExtendedDefObjects, includeCustomizationLayerInfo, isCustomizationEnabled, isCustomizationEnabled, isEditable, isFromTip, isLoadBase, isMajorVersionChanged, isMinorVersionChanged, isPersonalizationEnabled, isPersonalizationEnabled, isPropertyExpression, loadDefImports, loadDefObject, loadXMLContentsNoResolve, lockDefinitionContext, mergeChanges, mergePropertyMap, objectRemoved, reapplyChanges, registerClass, registerDefObject, registerSessionDefObject, registerSiteDefObject, remove, removeAndDelete, removeDefImport, removeExtendedDefObject, removeProperty, setCustomizationEnabled, setCustomizationEnabled, setDefaultBaseDir, setDefMgr, setEditable, setEditableFlag, setEditableObject, setFullName, setFullNameInternal, setLoadBase, setMajorVersionChanged, setPersonalizationEnabled, setPersonalizationEnabled, setProperty, setPropertyExpression, setPropertyMap, staticUpdateChildrenList, unlockDefinitionContext, updateChildrenList, updateMdsKeyFromTip, verifyVersion, verifyVersionNullCheck, writeChildren, writeContents, writeHeaderForNew, writeObject, writeVersionaddPropertySetName, 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, setParent, 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, waitgetNamegetFullNamepublic static final java.lang.String PNAME_option
public static final java.lang.String PNAME_optionExpr
public static final java.lang.String PNAME_option_DEFAULT
public static final java.lang.String PNAME_option_IF_NEEDED
public static final java.lang.String PNAME_option_PREPARE
public static final java.lang.String PNAME_option_RENDER
public static final java.lang.String PNAME_option_PREPARE_OPT
public static final java.lang.String PNAME_option_RENDER_OPT
public static final java.lang.String PNAME_option_ALWAYS
public static final java.lang.String PNAME_option_DEFER
public static final java.lang.String PNAME_option_NEVER
public static final java.lang.String PNAME_refreshAfter
public static final java.lang.String PNAME_attrHintsSuffix
public static final java.lang.String PNAME_option_REFRESH_OPT
public static final java.lang.String PNAME_option_REFRESH
public static final int RC_UNINIT
public static final int RC_DEFAULT
public static final int RC_PREPARE
public static final int RC_PREPARE_OPT
public static final int RC_RENDER
public static final int RC_RENDER_OPT
public static final int RC_ALWAYS
public static final int RC_NEVER
public static final int RC_DEFER
public static final int RC_REFRESH
public static final int RC_REFRESH_OPT
public DCExecutableBindingDef()
public DCExecutableBindingDef(java.lang.String name)
public void init(java.util.HashMap initValues)
protected int getRefreshOptionValue()
public final int getRefreshOption()
getRefreshOption in interface DCIExecutableDefpublic final java.lang.String getRefreshExpression()
getRefreshExpression in interface DCIExecutableDefpublic static int internalGetRefreshOptionFromString(java.lang.String str)
public java.lang.String getXMLElementTag()
PersistentDefinitiongetXMLElementTag in interface PersistentDefinitiongetXMLElementTag in class DCDefBaseprotected void retrieveFromXML(DefElement xmlElement, java.util.HashMap valueTab)
retrieveFromXML in class DCDefBaseprotected java.lang.String[] getDependencyNames()
public abstract int getExecutableType()
DCIExecutableDefgetExecutableType in interface DCIExecutableDefpublic abstract java.lang.Object createExecutableBinding(BindingContext ctx, DCBindingContainer ctr)
DCIExecutableDefcreateExecutableBinding in interface DCIExecutableDefpublic void initializeExecutableBinding(BindingContext ctx, DCBindingContainer bindingContainer, java.lang.Object binding)
initializeExecutableBinding in interface DCIExecutableDefpublic boolean isRefreshable(DCBindingContainer ctr, DCIExecutable exec, int refreshFlag)
isRefreshable in interface DCIExecutableDefprotected boolean isRefreshable(DCBindingContainer ctr, DCIExecutable exec, int refreshFlag, boolean refreshDeferredOnCondition)
protected boolean internalHasPermission(DCBindingContainer ctr)
protected java.lang.String getPermissionTargetName()
protected java.lang.String getPermissionClassName()
protected java.lang.String getHintsSuffix()
public DifferDetails diffContents(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeableorgDef. Then, help
methods on DifferBase can be used to diff the attr values
and accumulate the details of diff in difDetails.
Here is example code snippet:
private static final String DIFF_STRING_ELEMS[] =
{
"MyStringVal1",
"MyStringVal2"
};
private static final String DIFF_INT_ELEMS[] =
{
"MyIntVal",
}
public DifferDetails diffContents(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
{
orgDefImpl = () orgDef;
final String editStringValues[] =
{
this.getMyStringVal1(),
this.getMyStringVal2()
};
String orgStringValues[] = null;
if (orgDef != null)
{
String orgV[] =
{
orgDefImpl.getMyStringVal1(),
orgDefImpl.getMyStringVal2()
};
orgStringValues = orgV;
}
final int editIntValues[] =
{
this.getMyIntVal(),
};
int orgIntValues[] = null;
if (orgDef != null)
{
int orgV[] =
{
orgDefImpl.getMyIntVal()
};
orgIntValues = orgV;
}
difDetails = DifferBase.diffStringArray(this, DIFF_STRING_ELEMS, editStringValues, orgStringValues, difDetails);
difDetails = DifferBase.diffIntArray(this, DIFF_INT_ELEMS, editIntValues, orgIntValues, difDetails);
return difDetails;
}
diffContents in interface DiffMergeablediffContents 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 applyDiffContents(DifferDetails dif, DiffResolver resolver)
DiffMergeable
orgDef - original def object (from the branch point)
editDef - def object into which changes are to be merge
toMergeDef - def object to be merged (source of changes)
For sandbox refresh operation, orgDef comes from the branch
point, editDef from the sandbox, toMergeDef from the
mainline of the repos. With these three defs, we first diff editDef
against orgDef, producing editDifDetails.
Similarly, toMergeDef is diffed against orgDef,
producing toMergeDifDetails. The diff engine then
walks through these two sets of diffs and identifies conflicts.
After the conflicts are all resolved, we apply appropriate
changes to editDef.
applyDiffContents is called to apply changes to
scalar values. dif contains the changed values to
be applied to 'this' object. Use sample code like
the following:
public void applyDiffContents(DifferDetails dif, DiffResolver resolver)
{
DifferChangeMap detailMap = dif.getDetailMap();
Object[] updValues;
// DIFF_STRING_ELEMS from the above example code
for (int j = 0; j < DIFF_STRING_ELEMS.length; j++)
{
if ((updValues = (Object[]) detailMap.getValue(DIFF_STRING_ELEMS[j])) != null)
{
switch(j)
{
case 0:
setMyStringVal1((String) updValues[0]);
break;
case 1:
setMyStringVal2((String) updValues[0]);
break;
}
}
}
for (int j = 0; j < DIFF_INT_ELEMS.length; j++)
{
if ((updValues = (Object[]) detailMap.getValue(DIFF_INT_ELEMS[j])) != null)
{
switch(j)
{
case 0:
setMyIntVal((Integer) updValues[0]);
break;
}
}
}
}
Notice that the index specified in the case
statement is the array index of the attr in the String, int,
or boolean array.
applyDiffContents in interface DiffMergeableapplyDiffContents in class PersistableDefObjectdif - changes to be applied to 'this' defresolver - the diff resolver used in diff/merge operationpublic 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 PersistableDefObject