Followers

Wednesday, January 8, 2014

delete composite application Metadata in SOA

deleteMetadata



Description

Deletes the selected documents from the application repository. When this command is run against repositories that support versioning (that is, database-based repositories), delete is logical and marks the tip version (the latest version) of the selected documents as "deleted" in the MDS repository partition.
You may want to delete metadata when the metadata is moved from one repository to another. In such a case, after you have exported the metadata, you can delete the metadata in the original repository.


Syntax

deleteMetadata(application, server, docs, [restrictCustTo], [excludeAllCust],
 [excludeBaseDocs], [excludeExtendedMetadata], [cancelOnException], [applicationVersion]
Argument Definition
application
The name of the application for which the metadata is to be deleted.
server
The target server on which this application is deployed.
docs
A list of comma-separated, fully qualified document names or document name patterns, or both. The patterns can have the following wildcard characters: * and **. The asterisk (*) represents all documents under the current namespace. The double asterisk (**) represents all documents under the current namespace and also recursively includes all documents in subnamespaces.
For example, "/oracle/*" will include all documents under "/oracle/" but not include documents under "/oracle/mds/".
As another example, "/oracle/**" will include all documents under "/oracle/" and also under "/oracle/mds/" and any other documents further in the namespace chain.
restrictCustTo
Optional. A list of comma-separated customization layer names used to restrict the delete operation so that it deletes only customization documents that match the specified customization layers. This argument will be ignored if the excludeAllCust argument is also specified.
excludeAllCust
Optional. A Boolean value (true or false) that specifies whether or not to delete all customization documents. This argument defaults to false. It overrides the restrictCustTo option.
excludeBaseDocs
Optional. A Boolean value (true or false) that specifies whether or not to delete base documents. This argument defaults to false.
excludeExtendedMetadata
Optional. A Boolean value (true or false) that specifies whether or not to delete the Extended Metadata documents. This argument defaults to false.
cancelOnException
Optional. A Boolean value (true or false) that specifies whether or not to abort the delete operation when an exception is encountered. On abort, the delete is rolled back if that is supported by the target store. This argument defaults to true.
applicationVersion
Optional. The application version, if multiple versions of the same application are deployed.


Examples

The following example deletes metadata files under the package mypackage from mdsApp deployed in the server srg:
wls:/weblogic/serverConfig> deleteMetadata(application='mdsapp',
           server='srg', docs='/mypackage/*')
Executing operation: deleteMetadata.
"deleteMetadata" operation completed. Summary of "deleteMetadata" operation is:
List of documents successfully deleted:
/mypackage/jobs.xml
/mypackage/mo.xml
/mypackage/mdssys/cust/site/site1/jobs.xml.xml
/mypackage/mdssys/cust/site/site1/mo.xml.xml
4 documents successfully deleted.
The following example deletes metadata files under the package mypackage from mdsApp deployed in the server srg and excludes extended metadata and all customizations:
wls:/weblogic/serverConfig> deleteMetadata(application='mdsapp',
        server='srg', docs='/mypackage/*', cancelOnException='false',
        excludeExtendedMetadata='true',
        excludeAllCust='true')
Executing operation: deleteMetadata.
"deleteMetadata" operation completed. Summary of "deleteMetadata" operation is:
List of documents successfully deleted:
/mypackage/jobs.xml
/mypackage/mo.xml
2 documents successfully deleted.
wls:/weblogic/serverConfig>

No comments:

Post a Comment