Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


oracle.wsm.mds
Class MDSAccessor

java.lang.Object
  extended by oracle.wsm.mds.MDSAccessor


public class MDSAccessor
extends Object

Nested Class Summary
static class MDSAccessor.UpdateType
           

 

Field Summary
static String ASSERTION_TEMPLATE_TYPE
           
static String ATTACHMENT_TYPE
           
static String CONFIG_TYPE
           
static String POLICY_TYPE
           
static String UNKNOWN_TYPE
           

 

Constructor Summary
MDSAccessor(boolean isReadOnly, MDSConfig config)
          Constructor This constructor is used when MDS configuration information is to be supplied programmatically

 

Method Summary
 boolean areTransactionsSupported()
          If the back end data store is file based, then MDS does not guarantee transactionality.
 void deleteResource(String qualifiedName, boolean updateTimestamp)
          Delete a MDS resource (Policy/Assertion/Attachment)
 void deleteResources(String prefixFilter, boolean updateTimestamp)
          Delete all MOs residing under a particular prefix.
 void deleteResourcesList(List<String> resourceNameList, boolean updateTimestamp)
          Delete a bunch of MOs from datastore
 void deleteVersions(String qualifiedName, long fromVersion, long toVersion, boolean updateTimestamp)
          Delete a range of versions for a particular MO
 String getCreator()
           
 MDSArtifact getDocument(String name)
          Fetch DOM document from data store
 MDSArtifact getDocumentVersion(String name, long version)
           
 List<MDSArtifact> getDocumentVersions(String docName)
           
 oracle.mds.core.MetadataObject getMetadataObjectAsMO(String name)
          Given a MO name, fetch the corresponding MO object from the data store
 oracle.mds.core.MOReference getMORefForName(String qualifiedName)
          Given a MOName, create a MOReference object for the name
 Date getStoreLastUpdatedDate()
           
 Date getStoreTimestamp()
           
 IVersionInfo getVersionInfo(oracle.mds.core.MetadataObject mo)
           
 List<MDSArtifact> searchDocuments(oracle.mds.query.Condition searchCondition)
           
 void setCreator(String creator)
           
 MDSArtifact updateDocument(MDSArtifact mdsArtifact, boolean isUpdate, boolean updateTimestamp)
          Adds/updates a new MDS object to the MDS store.
 List<MDSArtifact> updateDocuments(List<MDSArtifact> pmArtifacts, boolean isUpdate, boolean updateTimestamp)
          Update a bunch of policies into the datastore.Before updating policy this method will check validity of policy.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

ASSERTION_TEMPLATE_TYPE

public static final String ASSERTION_TEMPLATE_TYPE
See Also:
Constant Field Values

ATTACHMENT_TYPE

public static final String ATTACHMENT_TYPE
See Also:
Constant Field Values

CONFIG_TYPE

public static final String CONFIG_TYPE
See Also:
Constant Field Values

POLICY_TYPE

public static final String POLICY_TYPE
See Also:
Constant Field Values

UNKNOWN_TYPE

public static final String UNKNOWN_TYPE
See Also:
Constant Field Values

Constructor Detail

MDSAccessor

public MDSAccessor(boolean isReadOnly,
                   MDSConfig config)
            throws MDSAccessException
Constructor This constructor is used when MDS configuration information is to be supplied programmatically
Parameters:
isReadOnly - Whether this accessor is read-only
config - The MDS config information
Throws:
MDSAccessException

Method Detail

updateDocument

public MDSArtifact updateDocument(MDSArtifact mdsArtifact,
                                  boolean isUpdate,
                                  boolean updateTimestamp)
                           throws MDSAccessException
Adds/updates a new MDS object to the MDS store. The object is added under the prefix specified
Parameters:
name - Name of the object to add
doc - The object to be added in form of a XML Document
update - The type of update operation to be carried out possible values are MDSAccessor.updateType.ADD (Add) & MDSAccessor.updateType.UPDATE (update)
updateTimestamp - true if store timestamp should be updated to now
Throws:
MDSAccessException

deleteResource

public void deleteResource(String qualifiedName,
                           boolean updateTimestamp)
                    throws MDSAccessException
Delete a MDS resource (Policy/Assertion/Attachment)
Parameters:
name - Name of the policy to be deleted
updateTimestamp - true if store timestamp should be updated to now
Throws:
MDSAccessException

getMetadataObjectAsMO

public oracle.mds.core.MetadataObject getMetadataObjectAsMO(String name)
                                                     throws MDSAccessException
Given a MO name, fetch the corresponding MO object from the data store
Parameters:
name -
Returns:
Throws:
MDSAccessException

searchDocuments

public List<MDSArtifact> searchDocuments(oracle.mds.query.Condition searchCondition)
                                  throws MDSAccessException
Throws:
MDSAccessException

getMORefForName

public oracle.mds.core.MOReference getMORefForName(String qualifiedName)
                                            throws MDSAccessException
Given a MOName, create a MOReference object for the name
Parameters:
qualifiedName -
Returns:
Throws:
MDSAccessException

getVersionInfo

public IVersionInfo getVersionInfo(oracle.mds.core.MetadataObject mo)
                            throws MDSAccessException
Throws:
MDSAccessException

deleteVersions

public void deleteVersions(String qualifiedName,
                           long fromVersion,
                           long toVersion,
                           boolean updateTimestamp)
                    throws MDSAccessException
Delete a range of versions for a particular MO
Parameters:
qualifiedName - FQN of the object whose version(s) is to be deleted
fromVersion - The starting index for version deletions
toVersion - Ending index for version to be deleted if the toVersion is set to -1, a single version will be delete The single version will be the fromVersion
updateTimestamp - true if store timestamp should be updated to now
Throws:
MDSAccessException

deleteResources

public void deleteResources(String prefixFilter,
                            boolean updateTimestamp)
                     throws MDSAccessException
Delete all MOs residing under a particular prefix. This method should be used with caution since the method does a wild card delete of all articates under given data store path
Parameters:
prefixFilter - MDS datastore path that needs to be cleaned
updateTimestamp - true if store timestamp should be updated to now
Throws:
MDSAccessException

deleteResourcesList

public void deleteResourcesList(List<String> resourceNameList,
                                boolean updateTimestamp)
                         throws MDSAccessException
Delete a bunch of MOs from datastore
Parameters:
resourceNameList - List of MO names to be purged
updateTimestamp - true if store timestamp should be updated to now
Throws:
MDSAccessException

getCreator

public String getCreator()

setCreator

public void setCreator(String creator)

updateDocuments

public List<MDSArtifact> updateDocuments(List<MDSArtifact> pmArtifacts,
                                         boolean isUpdate,
                                         boolean updateTimestamp)
                                  throws MDSAccessException
Update a bunch of policies into the datastore.Before updating policy this method will check validity of policy. For policy that will fail the validation, the policy will be *disabled* and then *saved* to the data store.
Parameters:
updateType - TODO
policies -
updateTimestamp - true if store timestamp should be updated to now
Throws:
MDSAccessException

areTransactionsSupported

public boolean areTransactionsSupported()
If the back end data store is file based, then MDS does not guarantee transactionality. The methods checks if transactions (bulk update operations) are supported by the back-end data store.
Returns:
Whether transactions are supported by the repository

getDocument

public MDSArtifact getDocument(String name)
                        throws MDSAccessException
Fetch DOM document from data store
Parameters:
name - Name of the document to be fetched
Returns:
Throws:
MDSAccessException - If no document with the given name exist in the store

getDocumentVersion

public MDSArtifact getDocumentVersion(String name,
                                      long version)
                               throws MDSAccessException
Throws:
MDSAccessException

getDocumentVersions

public List<MDSArtifact> getDocumentVersions(String docName)
                                      throws MDSAccessException
Throws:
MDSAccessException

getStoreLastUpdatedDate

public Date getStoreLastUpdatedDate()

getStoreTimestamp

public Date getStoreTimestamp()
                       throws MDSAccessException
Throws:
MDSAccessException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


Copyright © 2007, 2009, Oracle and/or its affiliates. All rights reserved.