|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This container class mainly provides operations for modifying adaptations' content or state.
Procedure
Method Summary | |
Adaptation |
doCopy(Adaptation anAdaptation)
Copies the adaptation instance specified. |
Adaptation |
doCreateChild(AdaptationName aParentName,
AdaptationReference requestedNameOrNull)
Creates a new schema instance that is the child of the parent specified by aParentName . |
Adaptation |
doCreateDeriving(PrimaryKey parentKey,
com.softwareag.mdm.adaptation.uifacade.HrNode aNode,
AdaptationTable aTable)
Deprecated. Replaced by doCreateDeriving(ValueContext, ValueContext, AdaptationTable) . |
Adaptation |
doCreateDeriving(ValueContext parentKey,
ValueContext aContent,
AdaptationTable aTable)
Creates a deriving occurrence in the table specified. |
Adaptation |
doCreateOcculting(PrimaryKey parentKey,
AdaptationTable aTable)
Deprecated. Replaced by doCreateOcculting(ValueContext, AdaptationTable) . |
Adaptation |
doCreateOcculting(ValueContext aKey,
AdaptationTable aTable)
Creates an occulting occurrence in the table specified. |
Adaptation |
doCreateOverwriting(PrimaryKey parentKey,
com.softwareag.mdm.adaptation.uifacade.HrNode aNode,
AdaptationTable aTable)
Deprecated. Replaced by doCreateOverwriting(ValueContext, AdaptationTable) . |
Adaptation |
doCreateOverwriting(ValueContext aContent,
AdaptationTable aTable)
Creates an overwriting occurrence in the table specified. |
Adaptation |
doCreateRoot(SchemaLocation aSchemaLocation,
AdaptationReference requestedNameOrNull,
com.softwareag.mdm.core.org.OrganizationName owner)
Deprecated. Replaced by doCreateRoot(SchemaLocation, AdaptationReference, Profile) . |
Adaptation |
doCreateRoot(SchemaLocation aSchemaLocation,
AdaptationReference requestedNameOrNull,
Profile owner)
Creates a new root adaptation instance. |
Adaptation |
doCreateRoot(ValueContext aContent,
AdaptationTable aTable)
Creates a root occurrence in the table specified. |
Adaptation |
doCreateRootChild(com.softwareag.mdm.adaptation.uifacade.HrNode rootNode,
AdaptationTable aContainer)
Deprecated. Replaced by doCreateRoot(ValueContext, AdaptationTable) . |
void |
doDelete(AdaptationName aName,
boolean isDeletingChildren)
Deletes the adaptation specified. |
Adaptation |
doEditionDiscard(AdaptationName aName)
Deprecated. Since version 4.0, the notion of local edition is replaced by the more general concept of branch. This method does nothing, it just returns the adaptation specified. |
Adaptation |
doEditionRelease(AdaptationName aName)
Deprecated. Since version 4.0, the notion of local edition is replaced by the more general concept of branch. This method does nothing, it just returns the adaptation specified. |
void |
doExport(ExportSpec spec)
Exports the content of an adaptation to a XML document, as specified by the ExportSpec argument. |
void |
doExportArchive(Archive anArchive)
Exports the current home to the archive specified. |
void |
doExportArchive(ArchiveExportSpec exportSpec)
Exports the archive specified. |
void |
doImport(ImportSpec spec)
Imports an XML content into an adaptation, as specified by the ImportSpec argument.
|
void |
doImportArchive(Archive anArchive)
Imports the archive specified into the current home. |
void |
doImportArchive(ArchiveImportSpec importSpec)
Imports the archive specified into the current home. |
void |
doMergeToParent(AdaptationHome source)
Merges source branch to current branch. |
Adaptation |
doModifyContent(Adaptation aTarget,
com.softwareag.mdm.adaptation.uifacade.HrNode aRootNode)
Deprecated. Replaced by doModifyContent(Adaptation, ValueContext) . |
Adaptation |
doModifyContent(Adaptation aTarget,
ValueContext aContent)
Modifies the adaptation content as specified. |
Adaptation |
doOccult(Adaptation anOccurrence)
Occults the adaptation occurrence specified. |
void |
doOptimizeByRefactoring(AdaptationName aName,
boolean includeDescendantsWithoutDelegated,
boolean includeAllDescendants)
Execute tree optimization. |
void |
doOptimizeByRemovingDuplicates(AdaptationName aName,
boolean includeDescendantsWithoutDelegated,
boolean includeAllDescendants)
Executes tree optimization. |
AdaptationHome |
getAdaptationHome()
Returns the current home. |
int |
getCommitThreshold()
|
ValueContextForUpdate |
getContext(AdaptationName aName)
Provides an interface for reading and/or updating a persisted content. |
ValueContextForUpdate |
getContextForNewOccurrence(Adaptation occurrenceToCopy,
AdaptationTable aTable)
Provides an interface for copying a context from an existing occurrence. |
ValueContextForUpdate |
getContextForNewOccurrence(AdaptationTable aTable)
Provides an interface for setting values on a context that conforms to any occurrence of the table specified. |
String |
getExecutionInformation()
|
Date |
getExecutionTimestamp()
Returns the timestamp of the current procedure execution. |
String |
getExecutionUUIDString()
Returns a universally unique identifier (UUID) of the current procedure execution. |
com.softwareag.mdm.adaptation.uifacade.HrNode |
getNodeForCreatingOccurrence(AdaptationTable aTable)
Deprecated. Replaced by getContextForNewOccurrence(AdaptationTable) . |
com.softwareag.mdm.adaptation.uifacade.HrNode |
getNodeForUpdatingContent(AdaptationName aName)
Deprecated. Replaced by getContext(AdaptationName) . |
Session |
getSession()
Returns the current session context. |
boolean |
hasEdition(Adaptation target)
Deprecated. Since version 4.0, the notion of local edition is replaced by the more general concept of branch. |
boolean |
isAllPrivileges()
Default value is false . |
boolean |
isHistoryActivation()
|
boolean |
isPrivilegeToModifyReferenceBranch()
Default value is true . |
boolean |
isTriggerActivation()
|
void |
makeOccultationsInChildTable(Adaptation target,
Path tablePath)
Any parent occurrence that is not overwritten will be occulted. |
void |
setAllPrivileges(boolean allPrivileges)
If true , disables all the permission checks for future operations
performed by the current run. |
void |
setCommitThreshold(int commitThreshold)
Sets the maximum size of the transaction so that intermediate commits are done during the execution of the procedure. |
void |
setExecutionInformation(String aString)
Specifies some additional information about the current execution. |
void |
setHistoryActivation(boolean isActivated)
Enables or disables the detailed description of updates made by the current run. |
void |
setPrivilegeToModifyReferenceBranch(boolean enable)
If true , disables the fact that Reference Branch is
normally not modified directly. |
void |
setTriggerActivation(boolean isActivated)
Enables or disables triggers. |
Method Detail |
public Adaptation doCreateRoot(SchemaLocation aSchemaLocation, AdaptationReference requestedNameOrNull, Profile owner) throws OperationException
aSchemaLocation
- Specifies the schema of the instance to create. It must refer to an existing and
correct XML schema .requestedNameOrNull
- Specifies the public and persistant reference of the instance to
create. If null
, the reference is allocated randomly.owner
- Specifies the profile that will own the newly created instance (required).
IllegalArgumentException
- if identifier does not conform to AdaptationReference.MAX_LENGTH
and AdaptationReference.REFERENCE_PATTERN
.
OperationException
doCreateChild(AdaptationName, AdaptationReference)
public Adaptation doCreateChild(AdaptationName aParentName, AdaptationReference requestedNameOrNull) throws OperationException
aParentName
.
aParentName
- Specifies the parent of the instance to create. It must refer to existing instance
in the current home.requestedNameOrNull
- Specifies the public and persistant reference of the instance to
create. If null
, this reference is allocated randomly.
IllegalArgumentException
- if identifier does not conform to AdaptationReference.MAX_LENGTH
and AdaptationReference.REFERENCE_PATTERN
.
OperationException
doCreateRoot(SchemaLocation, AdaptationReference, Profile)
public Adaptation doCreateRoot(ValueContext aContent, AdaptationTable aTable) throws OperationException
aContent
- Specifies the content of the occurrence to create. At least, it must define its
primary key. An object of this type is obtained by calling a method
getContext...(...)
, for example
getContextForNewOccurrence(AdaptationTable)
.aTable
- Specifies in which table the occurrence is defined.
OperationException
public Adaptation doCreateOverwriting(ValueContext aContent, AdaptationTable aTable) throws OperationException
aContent
- Specifies the content of the occurrence to create. At least, it must define its
primary key. An object of this type is obtained by calling a method
getContext...(...)
, for example
getContextForNewOccurrence(AdaptationTable)
.aTable
- Specifies in which table the new occurrence will be defined.
OperationException
public Adaptation doCreateOcculting(ValueContext aKey, AdaptationTable aTable) throws OperationException
aKey
- Specifies the key of the parent occurrence to occult.
An object of this type is obtained by calling the method
getContext(AdaptationName)
(the parent reference must be
used as argument), or
getContextForNewOccurrence(AdaptationTable)
.aTable
- Specifies in which table the occultation is made.
OperationException
getContextForNewOccurrence(AdaptationTable)
public Adaptation doOccult(Adaptation anOccurrence) throws OperationException
Depending on the occurrence specified, this method performs the following operations:
anOccurrence
- the adaptation occurrence that must be occulted.
OperationException
- if adaptation specified is not a child occurrence.public Adaptation doCreateDeriving(ValueContext parentKey, ValueContext aContent, AdaptationTable aTable) throws OperationException
parentKey
- Specifies the parent of the occurrence to create. Usually it is
obtained by calling getContext(AdaptationName)
or getContextForNewOccurrence(AdaptationTable)
.aContent
- Specifies the content of the occurrence to create. At least it must define its
primary key.
An object of this type is obtained by calling a method
getContext...(...)
, for example
getContextForNewOccurrence(AdaptationTable)
.aTable
- Specifies in which table the occurrence is defined.
OperationException
getContext(AdaptationName)
,
getContextForNewOccurrence(AdaptationTable)
public Adaptation doModifyContent(Adaptation aTarget, ValueContext aContent) throws OperationException
definition modes
are handled as follows:
aTarget
- Specifies the adaptation to modify.aContent
- Specifies the modifications to apply.
An object of this type is typically obtained by calling the method
getContext(AdaptationName)
(with the adaptation to modify
passed as parameter).
OperationException
getContext(AdaptationName)
public void doDelete(AdaptationName aName, boolean isDeletingChildren) throws OperationException
aName
- reference to the adaptation that must be deleted.isDeletingChildren
- if set to true
, any children will be also deleted recursively.
OperationException
public Adaptation doCopy(Adaptation anAdaptation) throws OperationException
OperationException
- if adaptation specified is not an instance.public AdaptationHome getAdaptationHome()
public void doImport(ImportSpec spec) throws OperationException
ImportSpec
argument.
This operation is tolerant regarding implicit schema of the XML source. That is, if some elements do not exist in target's schema, they are simply ignored.
The resulting adaptation may have validation errors, however for some integrity constraints violations, an exception is thrown (for example, if a primary key is not unique).
spec
- definition of the import.
OperationException
- if an error occurs during the operation (for example an integrity constraint
is violated in the source content).doExport(ExportSpec)
public void doExport(ExportSpec spec) throws OperationException
ExportSpec
argument.
spec
- definition of the export.
OperationException
- if an error occurs during the operation.doImport(ImportSpec)
public void doExportArchive(Archive anArchive) throws OperationException
OperationException
doExportArchive(ArchiveExportSpec)
public void doExportArchive(ArchiveExportSpec exportSpec) throws OperationException
OperationException
doImportArchive(ArchiveImportSpec)
public void doImportArchive(Archive anArchive) throws OperationException
The behaviour of this method depends on the content of the archive. For each instance in the archive:
This method disables all permission checks (as it is done by setAllPrivileges(boolean)
).
Therefore, it is important before calling this method, to guarantee that the current session
is actually able to execute the import.
For more information, see ServicePermission
and Session.isUserInRole(Profile)
.
OperationException
doImportArchive(ArchiveImportSpec)
public void doImportArchive(ArchiveImportSpec importSpec) throws OperationException
Only the instances selected by the ArchiveImportSpec
are imported.
Then, for each instance in the import selection, the behaviour of this method depends
on the content of the archive:
This method disables all permission checks (as it is done by setAllPrivileges(boolean)
).
Therefore, it is important before calling this method, to guarantee that the current session
is actually able to execute the import.
For more information, see ServicePermission
and Session.isUserInRole(Profile)
.
OperationException
doExportArchive(ArchiveExportSpec)
public void doMergeToParent(AdaptationHome source) throws OperationException
source
- AdaptationHome
source branch to merge to current branch
IllegalArgumentException
- when source is :
null
OperationException
- when the merge failspublic void doOptimizeByRemovingDuplicates(AdaptationName aName, boolean includeDescendantsWithoutDelegated, boolean includeAllDescendants) throws OperationException
The optimization is made by comparing the adaptation specified by aName
(say
A) and each descendant specified (say B). For all A and B pairs, each node pair is compared:
if the value of a B node is defined and is equals to the corresponding value of A node, then
value in B is set to "inherited".
OperationException
public void doOptimizeByRefactoring(AdaptationName aName, boolean includeDescendantsWithoutDelegated, boolean includeAllDescendants) throws OperationException
OperationException
public void makeOccultationsInChildTable(Adaptation target, Path tablePath) throws OperationException
OperationException
public int getCommitThreshold()
setCommitThreshold(int)
public void setCommitThreshold(int commitThreshold)
If commitThreshold > 0
, a commit will be done every times the amout of current
changes is equal to commitThreshold.
If commitThreshold = 0
, only one commit is done (after the procedure
execution returns).
If not specified, the commit threshold is 0.
Internally, table records are gathered by blocks and a change relates to one block. It means that if several records are updated (created, modified or deleted) in the same block, this will be counted as only one change. Since a block groups up to 100 records, the number of records actually updated in a single commit is consequently obtained by the following formula:
commitThreshold <= Nrecords <= 100 * commitThreshold
For example, for an initial import, if the commit threshold is set to 50, a commit will occur periodically for at most 5000 record creations.
Concerning relational database transaction size, the number of SQL queries will be:
Nqueries = commitThreshold * i
, where i belongs to [2;5]
Here i
depends on the average size of the serialized representation of a record.
IllegalArgumentException
- if commitThreshold < 0
.public boolean isHistoryActivation()
setHistoryActivation(boolean)
public void setHistoryActivation(boolean isActivated)
If not specified, the detailed description of updates is disabled. For mass-updates a detailed description can imply an expensive memory cost.
public boolean isTriggerActivation()
setTriggerActivation(boolean)
public void setTriggerActivation(boolean isActivated)
If not specified, the triggers are enabled.
public String getExecutionInformation()
setExecutionInformation(String)
public void setExecutionInformation(String aString)
If specified, the information is displayed in the history log. If not specified, only the procedure class name is displayed.
The execution information plays a similar role as session tracking info, but in a more local way (in the context of a single execution).
Session.getTrackingInfo()
public boolean isAllPrivileges()
false
.
setAllPrivileges(boolean)
public void setAllPrivileges(boolean allPrivileges)
true
, disables all the permission checks for future operations
performed by the current run. If false
, sets the default mode
that enables usual permission checks.
When a procedure disables all permission checks, it is important, before running it or during its execution, to guarantee that the session is actually able to execute the procedure.
Setting all privileges to true
does not set privilege to modify Reference Branch.
ServicePermission
,
Session.isUserInRole(Profile)
,
setPrivilegeToModifyReferenceBranch(boolean)
public boolean isPrivilegeToModifyReferenceBranch()
true
.
setPrivilegeToModifyReferenceBranch(boolean)
public void setPrivilegeToModifyReferenceBranch(boolean enable)
true
, disables the fact that Reference Branch is
normally not modified directly. If false
, sets the default mode
that forbids any direct modification onto Reference Branch content.
setAllPrivileges(boolean)
public ValueContextForUpdate getContextForNewOccurrence(AdaptationTable aTable)
doCreateRoot(ValueContext, AdaptationTable)
,
doCreateOverwriting(ValueContext, AdaptationTable)
public ValueContextForUpdate getContextForNewOccurrence(Adaptation occurrenceToCopy, AdaptationTable aTable)
doCreateRoot(ValueContext, AdaptationTable)
,
doCreateOverwriting(ValueContext, AdaptationTable)
public ValueContextForUpdate getContext(AdaptationName aName)
doModifyContent(Adaptation, ValueContext)
,
doCreateOcculting(ValueContext, AdaptationTable)
public Date getExecutionTimestamp()
public String getExecutionUUIDString()
The UUID format used is the hexadecimal representation of UUID Leach-Salz variant, version 1 (time-based).
For more information, see the Internet-Draft UUIDs and GUIDs or the standards body definition at ISO/IEC 11578:1996 .
public Session getSession()
public Adaptation doCreateRoot(SchemaLocation aSchemaLocation, AdaptationReference requestedNameOrNull, com.softwareag.mdm.core.org.OrganizationName owner) throws OperationException
doCreateRoot(SchemaLocation, AdaptationReference, Profile)
.
aSchemaLocation
- Specifies the schema of the instance to create. It must refer to an existing and
correct XML schema .requestedNameOrNull
- Specifies the public and persistant reference of the instance to
create. If null
, the reference is allocated randomly.owner
- Specifies the name of the organization that will own the newly created instance.
If null
, the default provider organization is taken.
IllegalArgumentException
- if identifier does not conform to AdaptationReference.MAX_LENGTH
and AdaptationReference.REFERENCE_PATTERN
.
OperationException
doCreateChild(AdaptationName, AdaptationReference)
public boolean hasEdition(Adaptation target)
false
.
public Adaptation doEditionRelease(AdaptationName aName) throws OperationException
null
if it does not exist in the current home.
OperationException
Repository
public Adaptation doEditionDiscard(AdaptationName aName) throws OperationException
null
if it does not exist in the current home.
OperationException
Repository
public Adaptation doModifyContent(Adaptation aTarget, com.softwareag.mdm.adaptation.uifacade.HrNode aRootNode) throws OperationException
doModifyContent(Adaptation, ValueContext)
.
OperationException
public com.softwareag.mdm.adaptation.uifacade.HrNode getNodeForUpdatingContent(AdaptationName aName)
getContext(AdaptationName)
.
public com.softwareag.mdm.adaptation.uifacade.HrNode getNodeForCreatingOccurrence(AdaptationTable aTable)
getContextForNewOccurrence(AdaptationTable)
.
public Adaptation doCreateDeriving(PrimaryKey parentKey, com.softwareag.mdm.adaptation.uifacade.HrNode aNode, AdaptationTable aTable) throws OperationException
doCreateDeriving(ValueContext, ValueContext, AdaptationTable)
.
OperationException
public Adaptation doCreateOcculting(PrimaryKey parentKey, AdaptationTable aTable) throws OperationException
doCreateOcculting(ValueContext, AdaptationTable)
.
OperationException
public Adaptation doCreateOverwriting(PrimaryKey parentKey, com.softwareag.mdm.adaptation.uifacade.HrNode aNode, AdaptationTable aTable) throws OperationException
doCreateOverwriting(ValueContext, AdaptationTable)
.
OperationException
public Adaptation doCreateRootChild(com.softwareag.mdm.adaptation.uifacade.HrNode rootNode, AdaptationTable aContainer) throws OperationException
doCreateRoot(ValueContext, AdaptationTable)
.
OperationException
|
|||||||||||
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.