|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softwareag.mdm.adaptation.ReadContext com.softwareag.mdm.adaptation.Adaptation
Provides a read-only access facade to Master Data values.
An adaptation represents either a XML Schema instance or a table occurrence (see Table definition).
An adaptation has a parent adaptation (unless it is a root) and it can have children. Moreover common Master Data values can be factorized, this is the inheritance mechanism.
An adaptations inherits the values it does not define itself from its parent adaptation.
This process is recursive, possibly up to the node's default value, that can be specified
in associated XML Schema. If schema node itself does not define a default value, null
is then
returned.
Values in an adaptation are organized in a tree structure conforming to the underlying
Adaptation Model (XML Schema document). Each value is accessed by means of a path
.
For reliability and performance, it is advised to use path generated as Java constants (see schema bindings).
Only terminal adaptation nodes hold actually values.
The interface ValueContext
provides equivalent access functionalities. However
an absolute path is not interpreted the same way by both type:
ValueContext
, an absolute path always begins at the root of the schema instance
(even if it is a table occurrence).Adaptation
, an absolute path always begins at the root node of the adaptation,
that is, if the adaptation is a table occurrence, it begins at the occurrence root,
not at the root of the schema instance.
ValueContext
Field Summary |
Fields inherited from class com.softwareag.mdm.adaptation.ReadContext |
KEY |
Method Summary | |
ActivationStatus |
checkActivable()
Returns a status telling whether this adaptation can be used externally (mainly it is activated and it has no validation errors). |
AdaptationName |
getAdaptationName()
Returns the name that uniquely identifies this adaptation in the repository. |
AdaptationNode |
getAdaptationNode(Path aPath)
Deprecated. Replaced by getSchemaNode() . |
Adaptation |
getContainer()
If this adaptation is a table occurrence, returns the instance that contains it; returns null if this adaptation is an instance. |
AdaptationTable |
getContainerTable()
If this is an occurrence, returns the table that contains it; returns null if this is an instance. |
String |
getDescription(Locale aLocale)
Returns the descption corresponding to the given locale. |
Profile |
getDistributor()
Returns the distributor of this adaptation, null if it is not an
agreement or under an agreement.
|
com.softwareag.mdm.core.org.OrganizationName |
getDistributorName()
Deprecated. |
AdaptationHome |
getHome()
Returns the home which contains this instance. |
String |
getLabel(Locale aLocale)
Returns the instance label corresponding to the given locale. |
String |
getLabelOrName(Locale aLocale)
Returns the instance label corresponding to the given locale. |
String |
getModuleName()
Returns the name of the module that holds the schema document. |
DefinitionMode |
getOccurrenceDefinitionMode()
Returns the definition mode of this occurrence. |
PrimaryKey |
getOccurrencePrimaryKey()
Returns the primary key of this occurrence. |
Profile |
getProvider()
Returns the owner of this adaptation. |
com.softwareag.mdm.core.org.OrganizationName |
getProviderName()
Deprecated. |
SchemaLocation |
getSchemaLocation()
Returns the location of the schema document. |
SchemaNode |
getSchemaNode()
Returns the root schema node of this adaptation. |
Date |
getTimeOfCreation()
Returns the time of the creation of this adaptation. |
Date |
getTimeOfLastModification()
Returns the time of the last modification of this adaptation. |
AdaptationReference |
getTreeReference()
Returns the name that uniquely identifies the tree of this adaptation in the repository. |
Adaptation |
getUpToDateInstance()
Returns an up-to-date instance. |
String |
getUrlResourceRelative(Path aPath)
Deprecated. |
ValidationReport |
getValidationReport()
Returns the validation status of this instance regarding its schema definition. |
Object |
getValueWithoutResolution(Path aPath)
Returns the own value hold by the node specified. |
boolean |
isActivated()
Returns true if this adaptation is activated, however its
activation status is valid. |
boolean |
isAgreement()
Returns true if this adaptation is an agreement between the provider and a
distributor, false otherwise. |
boolean |
isAgreementDescendant()
Returns true if this adaptation has an agreement in its ancestors,
false otherwise. |
boolean |
isDeleted()
Returns true if this adaptation has been deleted. |
boolean |
isEditionOfRelease()
Deprecated. Replaced by the method isNewOrModifiedInCurrentBranch() . |
boolean |
isNewOrModifiedInCurrentBranch()
Returns true if we are in a branch and, regarding the initial version of this branch,
this adaptation is newly created or it has been updated. |
boolean |
isObsolete()
This instance is obsolete if a new call to getUpToDateInstance()
returns a more recent content or null (that is, adaptation has been deleted). |
boolean |
isOccurrenceHidden()
Returns true if this adaptation is a table occurrence that is
in occulting mode or in edition-delete state.
|
boolean |
isOccurrenceInheriting()
Returns true if this adaptation is a table ocurrence in inherit mode.
|
boolean |
isOccurrenceOcculting()
Returns true if this adaptation is a table ocurrence in occulting mode.
|
boolean |
isRelease()
Deprecated. Replaced by the opposite result of method isNewOrModifiedInCurrentBranch() . |
boolean |
isRootAdaptation()
Returns true if this adaptation is root (it has no parent adaptation).
|
boolean |
isSchemaDefinitionCompliant(boolean strictValidation)
Returns true if this adaptation instance has no errors
(and no warnings if strictValidation is true ). |
boolean |
isSchemaInstance()
Returns true if this adaptation is a schema instance, not a table occurrence.
|
boolean |
isTableOccurrence()
Returns true if this adaptation is a table occurrence, not a schema instance.
|
boolean |
isTemporaryActivation()
Tests if this adaptation comes from a temporary activation. |
void |
toHtmlString(Writer aWriter)
For debugging purpose, adds an HTML representation to the writer specified. |
String |
toPublicReference()
Returns a string that identifies this object from the user's point of view. |
String |
toString()
|
String |
toXPathExpression()
For an occurrence, this method returns the XPath expression that selects it in the instance. |
Methods inherited from class com.softwareag.mdm.adaptation.ReadContext |
formatValue, formatValue, formatValues, get_boolean, get_int, get, getDate, getDescription, getLabel, getList, getLocale, getNomenclatureItemLabel, getResourcePathInModule, getResourcePathWithModule, getString, getTable, isEndUserDebug |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public ActivationStatus checkActivable()
When this adaptation is a temporary activation
,
the number of times this method is called on same instance
is meaningful (in case of a temporary activation, the first call will return OK
but next calls will say that a temporary activation is activable only once (see
ActivationStatus.isTemporaryAlreadyActivated()
).
public AdaptationNode getAdaptationNode(Path aPath) throws PathAccessException
getSchemaNode()
.
PathAccessException
- if aPath
does not refer to an adaptable node in the underlying
type tree structure.public AdaptationTable getContainerTable()
null
if this is an instance.
public Adaptation getContainer()
null
if this adaptation is an instance.
public AdaptationName getAdaptationName()
public AdaptationReference getTreeReference()
If this adaptatiion is an occurrence, then the returned reference is the one of its container instance tree.
public AdaptationHome getHome()
public String getLabel(Locale aLocale)
Returns the instance label corresponding to the given locale.
Returns null
if no label exists for the locale.
public String getLabelOrName(Locale aLocale)
Returns the instance label corresponding to the given locale.
Returns the instance reference if no label exists for the locale.
public String getDescription(Locale aLocale)
Returns the descption corresponding to the given locale.
Returns null
if no description exists for the locale.
public Profile getDistributor()
null
if it is not an
agreement or under an agreement.
The distributor profile is defined only in the context of an agreement.
getProvider()
public com.softwareag.mdm.core.org.OrganizationName getDistributorName()
getDistributor()
public String getModuleName()
getSchemaLocation()
,
SchemaLocation.getModuleName()
public SchemaLocation getSchemaLocation()
public Object getValueWithoutResolution(Path aPath)
AdaptationValue.INHERIT_VALUE
.
null
, it returns the object defined
(it must be an instance of the node's type).null
(not inherited), it returns
null
.AdaptationValue.INHERIT_VALUE
.
aPath
- location of the node, only an absolute path is supported (if this adaptation is a table occurrence,
path begins at the root of the occurrence).ReadContext.get(Path)
public Profile getProvider()
getDistributor()
public com.softwareag.mdm.core.org.OrganizationName getProviderName()
getProvider()
public Adaptation getUpToDateInstance()
This method has the same result as
ada.getHome().findAdaptationOrNull(ada.getAdaptationName())
.
public String getUrlResourceRelative(Path aPath)
getResourcePathWithModule()
.
public boolean isActivated()
true
if this adaptation is activated, however its
activation status is valid.
checkActivable()
public boolean isAgreement()
true
if this adaptation is an agreement between the provider and a
distributor, false
otherwise.
public boolean isAgreementDescendant()
true
if this adaptation has an agreement in its ancestors,
false
otherwise. An agreement itself returns false
public boolean isDeleted()
true
if this adaptation has been deleted. In this case it is also
considered as obsolete.
isObsolete()
public boolean isObsolete()
getUpToDateInstance()
returns a more recent content or null
(that is, adaptation has been deleted).
isDeleted()
public boolean isSchemaInstance()
true
if this adaptation is a schema instance, not a table occurrence.
This is the opposite of isTableOccurrence()
.
public boolean isTableOccurrence()
true
if this adaptation is a table occurrence, not a schema instance.
This is the opposite of isSchemaInstance()
.
public boolean isNewOrModifiedInCurrentBranch()
true
if we are in a branch and, regarding the initial version of this branch,
this adaptation is newly created or it has been updated. It returns false
if either the
current home is a version or if this instance has not been modified since the initial version of the branch.
Note: the modification criterium does not include the modification on inherited values, inherited occurrences and inherited structure. For a schema instance, it does not include modifications on its tables.
getTimeOfLastModification()
public boolean isEditionOfRelease()
isNewOrModifiedInCurrentBranch()
.
public boolean isRelease()
isNewOrModifiedInCurrentBranch()
.
public boolean isRootAdaptation()
true
if this adaptation is root (it has no parent adaptation).
If this adaptation is a table occurrence,
the method always returns false
.
public boolean isTemporaryActivation()
A temporary activation is created by webMethods Master Data Manager, for preview or test purpose.
public void toHtmlString(Writer aWriter)
ReadContext
toHtmlString
in class ReadContext
public String toString()
public String toPublicReference()
getAdaptationName()
public SchemaNode getSchemaNode()
public Date getTimeOfCreation()
public Date getTimeOfLastModification()
If this adaptation is a schema instance, not an occurrence, the time returned does not take into account modifications done on contained table occurrences. It is updated only for local modifications.
isNewOrModifiedInCurrentBranch()
public PrimaryKey getOccurrencePrimaryKey()
If this adaptation is a schema instance, not an occurrence,
the method returns null
.
public DefinitionMode getOccurrenceDefinitionMode()
If this adaptation is a schema instance, not an occurrence,
the method returns null
.
public String toXPathExpression()
Example :
/root/categoryX/tableY[pkey1="A01" and pkey2="666"]
If this adaptation is a schema instance, not an occurrence,
the method always returns "/
" (root path).
AdaptationTable.createRequestResult(String)
public boolean isOccurrenceInheriting()
true
if this adaptation is a table ocurrence in inherit mode.
If this adaptation is a schema instance, not an occurrence,
the method always returns false
.
public boolean isOccurrenceOcculting()
true
if this adaptation is a table ocurrence in occulting mode.
If this adaptation is a schema instance, not an occurrence,
the method always returns false
.
public boolean isOccurrenceHidden()
true
if this adaptation is a table occurrence that is
in occulting mode or in edition-delete state.
If this adaptation is a schema instance, not an occurrence,
the method always returns false
.
public boolean isSchemaDefinitionCompliant(boolean strictValidation)
true
if this adaptation instance has no errors
(and no warnings if strictValidation
is true
).
strictValidation
- specifies whether warnings are taken into account for compliance.
IllegalStateException
- If this adaptation is a table occurrence.getValidationReport()
public ValidationReport getValidationReport()
Note: the report returned by this method is not mutable in the sense that it will not be affected by udpates done after this method is called.
IllegalStateException
- If this adaptation is a table occurrence.isSchemaDefinitionCompliant(boolean)
,
AdaptationHome.getValidationReportsMap(Severity)
,
Consistency and validation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.