|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.onwbp.adaptation.ReadContext
com.onwbp.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.onwbp.adaptation.ReadContext |
KEY |
| Method Summary | |
ActivationStatus |
checkActivable()
Deprecated. This method has been replaced by getValidationReport(). |
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.onwbp.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. |
UserReference |
getLastUser()
Returns the last user who has modified the adaptation. |
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.onwbp.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 null if this instance has been deleted.
|
String |
getUrlResourceRelative(Path aPath)
Deprecated. |
ValidationReport |
getValidationReport()
Returns the validation status of this instance regarding its schema definition. |
ValidationReport |
getValidationReport(boolean ensureActivation)
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.
|
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()
Deprecated. Replaced by the method isDeleted(). |
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 ensureActivation)
Returns true if the validation of this instance is correct regarding
its schema definition.
|
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. |
String |
toXPathPredicateString()
For an occurrence, this method returns the XPath predicate that selects it in its table. |
| Methods inherited from class com.onwbp.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 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.onwbp.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 and
it must specify a terminal node.
If this adaptation is a table occurrence, path begins at the root of the occurrence.ReadContext.get(Path)public Profile getProvider()
getDistributor()public com.onwbp.core.org.OrganizationName getProviderName()
getProvider()public Adaptation getUpToDateInstance()
null if this instance has been deleted.
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.
This state impacts the validation:
getValidationReport(boolean)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()
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 EBX.Manager, for preview or test purpose.
public void toHtmlString(Writer aWriter)
ReadContext
toHtmlString in class ReadContextpublic String toString()
public String toPublicReference()
getAdaptationName()public SchemaNode getSchemaNode()
public Date getTimeOfCreation()
public Date getTimeOfLastModification()
Current limitation: if this adaptation is a schema instance, not an occurrence, the time returned does not take into account modifications done on contained table occurrences (instance time is updated only for local content's modifications).
getLastUser(),
isNewOrModifiedInCurrentBranch()public UserReference getLastUser()
Current limitation: if this adaptation is a schema instance, not an occurrence, the last user is the user that has modified instance content locally (if another user has made an update more recently inside a table, this is not taken into account).
getTimeOfLastModification()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 String toXPathPredicateString()
Example :
pkey1="A01" and pkey2="666"
If this adaptation is a schema instance, not an occurrence,
the method always returns null.
toXPathExpression()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 ensureActivation)
true if the validation of this instance is correct regarding
its schema definition.
Important note: After this method has been called for ensuring correctness, concurrent updates can occur. The rules for ensuring that Master Data remain valid are explained in section Consistency and validation.
ensureActivation - If true, validation also checks that this instance is
activated. If false, it is not
checked that instance is activated; this later value is normally
used for internal EBX.Platform instances used for factoring data
in an inheritance tree.
IllegalStateException - If this adaptation is a table occurrence.getValidationReport()public ValidationReport getValidationReport()
activated.
The validation is implicitly launched through this method so as to have an up-to-date report.
Important note: The report returned by this method is not mutable in the sense that it will not be affected by updates done after this method is called. The rules for ensuring that Master Data remain valid (regarding possible concurrent updates) are explained in section Consistency and validation.
This method is equivalent to:
Adaptation.getValidationReport(true);
IllegalStateException - If this adaptation is a table occurrence.isSchemaDefinitionCompliant(boolean)public ValidationReport getValidationReport(boolean ensureActivation)
The validation is implicitly launched through this method so as to have an up-to-date report.
Important note: The report returned by this method is not mutable in the sense that it will not be affected by updates done after this method is called. The rules for ensuring that Master Data remain valid (regarding possible concurrent updates) are explained in section Consistency and validation.
ensureActivation - If true, validation also checks that this instance is
activated. If false, it is not
checked that instance is activated; this later value is normally
used for internal EBX.Platform instances used for factoring data
in an inheritance tree.
IllegalStateException - If this adaptation is a table occurrence.isSchemaDefinitionCompliant(boolean),
AdaptationHome.getValidationReportsMap(Severity)public ActivationStatus checkActivable()
getValidationReport().
public AdaptationNode getAdaptationNode(Path aPath)
throws PathAccessException
getSchemaNode().
PathAccessException - if aPath does not refer to an adaptable node in the underlying
type tree structure.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
(report a bug)
EBX.Platform 4.5.0 [0598]
Copyright Orchestra Networks 2000-2008. All rights reserved.