Interface MdOMIUtil

All Superinterfaces:
Remote

@SASScope("ALL") public interface MdOMIUtil extends Remote
Used to perform operations against the metadata server, such as querying and deleting objects. This interface wraps the methods available in the IOMI interface.

To retrieve the instance of this interface, see: MdFactory.getOMIUtil()

This class depends on objects being contained in an object store. A connection to the metadata server must be established first before using any of the methods on this interface. To create a connection, use MdOMRConnection.

Since:
9.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The class ID for a FTP server: CBA26437-1577-4FF8-93F6-9B68B4DD8D2E
    static final String
    The Class ID for a HTTP server: DAC0D7F0-10DA-11D6-8816- AA0004006D06
    static final String
    The class ID for a JMS Message Queue Manager: "MessageQueue.JMS"
    static final String
    The class ID for a Message Queue: "MessageQueue.MSMQ"
    static final String
    The class ID for a Message Queue: "MessageQueue.Websphere"
    static final String
    The class ID for a Pooled Workspace Server: 620963ee-32bf-4128-bf5f-4b0df8ff90eb
    static final String
    The class id of the classic SAS server: 440196d4-90f0-11d0-9f41-00a024bb830c
    static final String
    The class id of the generic server: 9c186a64-83e4-11d2-b956-00c04f81993c
    static final String
    The class id of OLAP V9: f3f46472-1e31-11d5-87c2-00c04f38f9f6
    static final String
    the class id of the message queue server: 8d9ef489-8d1e-11d2-b94f-00c04f8198c0
    static final String
    The class id of the OMR server: 2887e7d7-4780-11d4-879f-00c04f38f0db
    static final String
    The class id of SAS/Intrnet V9: 15931e31-667f-11d5-8804-00c04f35ac8c
    static final String
    The user's application data folder
    static final String
    The user's home folder
    static final String
    The user's "my folder"
    static final int
    (1) specifies that the method get all of the properties of the requested object.
    static final int
    (64) Returns all subtypes along with all of their descendants
    static final int
    (8) specifies that the method get all of the attributes of the requested object.
    static final int
    Deprecated.
    As of 9.2, no longer supported by the metadata server
    static final int
    Deprecated.
    As of 9.2, no longer supported by the metadata server
    static final int
    (8388608) Client is supplying repository ID on AddMetadata of REPOS.
    static final int
    (32) Deletes the files in a repository in addition to the repository registration.
    static final int
    (16384) In GetMetadata, specifies to look for cross-repository references in repositories that use the current repository.
    static final int
    (8192) Specifies to retrieve objects of the passed type from all repositories that have a DependencyUses dependency
    static final int
    Deprecated.
    no longer supported by the metadata server
    static final int
    (2) Instructs the SAS Metadata Server to use a public object type definition from the Object Type Dictionary to expand the specified object's logical metadata definition.
    static final int
    Deprecated. 
    static final int
    (256) Specifies to execute a GetMetadata call for each object that is returned by the GetMetadataObjects request.
    static final int
    (4096)
    static final int
    (134217728) This flag is for DeleteMetadata to tell it to ignore objects not found so that it will not return on error.
    static final int
    (16) Specifies to retrieve metadata objects that are subtypes of the passed metadata type in addition to objects of the passed type.
    static final int
    (32768) Locks the specified object and any associated objects selected by GetMetadata flags and options from update by other users.
    static final int
    Deprecated.
    As of 9.2, no longer supported by the metadata server
    static final int
    (512) Specifies to perform a case-sensitive search of the criteria specified in the option.
    static final int
    (1073741824)
    static final int
    (67108864) Do not format time values returned from the server.
    static final int
    Deprecated.
    As of 9.2, no longer supported by the metadata server
    static final int
    (2097152) Deletes the contents of a repository but does not remove the repository's registration from the repository manager.
    static final int
    (1024) Returns a list of deleted object IDs, as well as any cascading object IDs that were deleted.
    static final int
    (2048) specifies to omit properties that do not contain values or that contain null values.
    static final int
    (4) checks the Options parameter for one or more user-defined templates that specify the properties to return for a given metadata type.
    static final int
    (4194304) Deletes all metadata objects but does not remove the metadata object containers from a repository or change the repository's registration.
    static final int
    (268435456)Determines if the client can call this method.
    static final int
    (131072) Unlocks the specified object and any associated objects that were locked when the update is completed
    static final int
    (262144) Unlocks any locks held by another user so that a metadata object can be updated.
    static final int
    (128) Checks the Options parameter for criteria to qualify the objects that are returned by the server.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    addMetadata(String inXML, String reposID, StringHolder outXML, int iFlags)
    Performs an add operation against the metadata server.
    Document
    ApplyXML(String inXML, String reposID)
    This routine is used by metadata importers to filter their XML to handle XML updates.
    String
    Note: As of 9.4, callers can now use the static method XMLUtil.normalize(String) instead.
    String
    createGetXMLString(String strType, String strFQID, List<String> simpleAttr, List<String> complexAttr)
    Creates and returns the XML string to retrieve simple and/or complex attributes.
    String
    createGetXMLString(Map<String,String> objectMap)
    Creates and returns the XML string used for a GetMetadata request.
    String
    createObjectAttributeString(Map<String,String> attributes)
    Creates a string of an object's attributes as key/value pairs
    String
    createRefreshXML(CMetadata meta, boolean refreshAssocsSetByServerOnly, boolean refreshAll)
    Creates an XML string used for refreshing an object.
    String
    createUpdateXMLSimple(String strType, String strFQID, List<String> attributes, List<String> values)
    Creates and returns the XML string of the passed in attributes
    String
    createXMLSubString(List<String> attributes, List<String> values)
    Creates and returns the XML string of the passed in attributes
    List<String>
    Delete a CMetadata object and all it's dependancies.
    List<String>
    deleteMetadataObject(CMetadata metadataObject, String template)
    Deletes an object from the server using the specified delete template.
    List<String>
    deleteMetadataObject(String objectType, String objectID)
    Deletes a metadata object and all of its dependencies
    List<String>
    deleteMetadataObject(String objectType, String objectID, String template)
    Deletes a metadata object and all of its dependencies
    List<String>
    deleteMetadataObjects(List<? extends CMetadata> inObjects)
    Delete a CMetadata object and all it's dependancies.
    List<String>
    deleteMetadataObjects(Map<String,String> inObjects)
    Delete multiple objects from the server and all their dependencies.
    int
    doesObjectExist(String reposID, String objectType, String xmlSelect)
    Returns whether an object exists on the metadata server.
    Document
    DoRequest(String inXML)
    Performs a DoRequest
    Document
    DoRequest(String inXML, boolean fUpdateIds)
    Performs a DoRequest
    void
    DoRequestNoReturn(String inXML, boolean fUpdateIds)
    Performs a DoRequest
    doSimple(CMetadata thisObject, NamedNodeMap thisNodeMap)
    Calls 'set' methods for given object for nodes in given NodeMap
    String
    formatXML(String original)
    Note: As of 9.4, callers can now use the static method XMLUtil.formatXML(String) instead.
    getAssociatedObject(CMetadata object, String strAssociation, String strTemplate)
    Get the single metatdata object from the given associtation.
    getAssociatedObject(CMetadata object, String strAssociation, String strTemplate, boolean doNotOverrideAssocs)
    Get the single metatdata object from the given associtation.
    getAssociatedObjects(CMetadata object, String strAssociation, String strTemplate)
    Gets the list of metatdata objects for the given association.
    getAssociatedObjects(CMetadata object, String strAssociation, String strTemplate, boolean doNotOverrideAssocs)
    Gets the list of metatdata objects for the given association.
    String
    getAttribute(String strAttribute, NamedNodeMap childNodeMap)
    Retrieve the requested attribute from the XML dom object.
    getFastMetadata(String metadataType, String fqid, String options, int flags)
    Returns a lightweight description of a metadata object.
    getFastMetadata(Map<String,String> objects, String options, int flags)
    Returns lightweight descriptions of metadata objects.
    getFastMetadataObjects(String strType, String strReposId, String strOptions, int iFlags)
    Returns lightweight descriptions of metadata objects retrieved by a server GetMetadataObjects request.
    String
    Returns the ID of the Foundation repository
    Returns the foundation repository for the connected metadata server.
    Performs a GetMetadata request on an existing public object.
    getFullObject(MdObjectStore store, String objectType, String objectID)
    Performs a GetMetadata request on an existing public object.
    List
    getFullObjects(MdObjectStore store, Map<String,String> objectMap)
    Performs a GetMetadata request on a set of existing public objecst.
    This routine is used to retrieve the identity object of the current user.
    List
    getMetadata(MdStore store, Map objectMap, String template, int flags)
    Performs a GetMetadata request for a group of objects.
    List
    getMetadata(MdStore store, Map objectMap, String template, int flags, boolean doNotOverrideAssocs, boolean doNotOverrideAttrs)
    Performs a GetMetadata request for a group of objects.
    Document
    getMetadata(String inXML, int iFlags)
    Sends input XML string to metadata server, and parses the output XML into a DOM document.
    Document
    getMetadata(String inXML, String strTemplate, int iFlags)
    Sends input and template XML strings to metadata server, and parses the output XML into a DOM document.
    getMetadataAllDepths(CMetadata object, List<String> inSimpleAttr, List<String> inComplexObject, String strTemplate, int iOptions)
    This method constructs CMetadata objects and sets both simple and complex attributes.
    getMetadataAllDepths(CMetadata object, List<String> inSimpleAttr, List<String> inComplexObject, String strTemplate, int iOptions, boolean doNotOverrideAssocs)
    This method constructs CMetadata objects and sets both simple and complex attributes.
    getMetadataAllDepths(MdStore inStore, String strType, String strFQID, List<String> inSimpleAttr, List<String> inComplexObject, String strTemplate, int iOptions)
    This method constructs CMetadata objects and sets both simple and complex attributes.
    getMetadataAllDepths(MdStore inStore, String strType, String strFQID, List<String> inSimpleAttr, List<String> inComplexObject, String strTemplate, int iOptions, boolean doNotOverrideAssocs)
    This method constructs CMetadata objects and sets both simple and complex attributes.
    Map
    getMetadataNoCache(String strType, String strFQID, String strOptions, int iFlags)
    Deprecated.
    This method has been replaced by getFastMetadata(Map, String, int).
    List
    getMetadataNoCache(Map objectMap, String strOptions, int iFlags)
    Deprecated.
    This method has been replaced by getFastMetadata(Map, String, int).
    List
    getMetadataObjects(MdStore inStore, String inXML, String strTemplate, int iFlags)
    Sends input and template XML strings to metadata server, and parses the output XML into a List of objects contained in the inStore.
    List
    getMetadataObjects(MdStore inStore, String inXML, String strTemplate, int iFlags, boolean doNotOverrideAssocs)
    Sends input and template XML strings to metadata server, and parses the output XML into a List of objects contained in the inStore.
    List
    getMetadataObjects(String strReposID, String strType)
    Gets the list of metatdata objects in the repository for the requested type.
    List
    getMetadataObjects(String strReposID, String strType, int iFlags)
    Gets the list of metatdata objects in the repository for the requested type.
    List
    getMetadataObjects(String strReposID, String strType, int flags, String strOptions)
    Gets the list of metatdata objects in the repository for the requested type.
    List
    getMetadataObjectsNoCache(String strType, String strReposId, String strOptions, int iFlags)
    Deprecated.
    This method has been replaced by getFastMetadataObjects(String, String, String, int).
    List
    getMetadataObjectsSubset(MdStore inStore, String strReposID, String strType, int flags, String options)
    Gets the list of metatdata objects in the repository for the requested type.
    List
    getMetadataObjectsSubset(MdStore inStore, String strReposID, String strType, int flags, String options, boolean doOverrideAssocs)
    Gets the list of metatdata objects in the repository for the requested type.
    List
    getMetadataObjectsSubsetList(MdStore inStore, String strReposID, String strType, int flags, String options, boolean doOverrideAssocs)
    Gets the list of metatdata objects in the repository for the requested type.
    String
    getMetadataSimple(String strType, String strFQID, String attributeName)
    Returns a single attribute value from the server.
    List<String>
    getMetadataSimple(String strType, String strFQID, List<String> attributes)
    Returns a List of the simple attributes requested; these objects have been parsed and are returned as Strings in the order they were requested
    String
    Returns the current namespace used for OMI interactions
    String
    getObjectPath(MdObjectStore store, PrimaryType meta, boolean includeType)
    Returns the path of the specified public object.
    String
    Returns the fully qualified repository id for a given metadata object (A0000001.XXXXXXXX).
    List<CMetadata>
    Reads all repositories registered in the Common Metadata Repository Manager.
    getResponsibleParty(MdObjectStore store, String identityName, String responsibility)
    Returns a responsible party object for a given identity and responsibility.
    getResponsibleParty(MdObjectStore store, String identityName, String responsibility, String template, int flags)
    Returns a responsible party object for a given identity and responsibility.
    List<String>
    getSubTypes(String objectType, boolean includeDescendants)
    Gets the subtypes specific metadata object type.
    void
    getTypeProperties(String objectType, Map<String,Map<String,String>> attributeMap, Map<String,Map<String,String>> associationMap)
    Gets the properties for a specific metadata object type.
    void
    getTypes(List<String> nameList, List<String> descList)
    Gets the types that are available in the repository.
    getUserHomeFolder(MdObjectStore store, String userName, String folderName, String template, int flags)
    Returns a home folder for a given user.
    getUserHomeFolder(MdObjectStore store, String userName, String folderName, String template, int flags, boolean createIfNecessary)
    Returns a home folder for a given user.
    String
    getUserHomeFolderName(String userName, String folderName)
    Returns the localized name of a user's home folder.
    Document
    parseXML(String strXML)
    routine to parse a passed in xml string and return a dom document
    Document
    parseXML(URL xmlDocument)
    routine to parse a passed in xml URL and return a dom document
    Document
    parseXML(URL xmlDocument, Map<String,Boolean> features)
    routine to parse a passed in xml URL and return a dom document
    populateObject(CMetadata metaObject, NamedNodeMap simpleNodeMap, NodeList complexNodeList)
    Populates an objects simple and complex attributes, by what is in the simpleNodeMap and the complexNodeList.
    populateObject(CMetadata metaObject, NamedNodeMap simpleNodeMap, NodeList complexNodeList, boolean doNotOverrideAssocs)
    Populates an objects simple and complex attributes, by what is in the simpleNodeMap and the complexNodeList.
    List
    populateObjects(CMetadata metaObject, NamedNodeMap simpleNodeMap, NodeList complexNodeList, boolean doNotOverrideAssocs, List objects)
    Populates an objects simple and complex attributes, by what is in the simpleNodeMap and the complexNodeList.
    void
    populateStoreFromInputStream(MdStore inStore, InputStream stream, int state, boolean useReposForNewObjects)
    Build objects from an input stream and set states to desired state.
    void
    populateStoreFromString(MdStore inStore, String inXML, int state, boolean useReposForNewObjects)
    Build objects from source XML and set states to desired state.
    void
    populateStoreFromString(MdStore inStore, Document doc, int state, boolean useReposForNewObjects)
    Build objects from source XML and set states to desired state.
    void
    processDeletedObjects(Document outDoc)
    This deletes objects on the client that have been deleted from the server and are returned from a DeltedObjects array.
    void
    setNamespace(String newNamespace)
    Sets the current namespace used for OMI interactions
    void
    setObjectAssociations(CMetadata metaObject, List outComplexNames, List[] outComplexObjects, boolean doNotOverrideAssns)
    Call given object's 'set...s' methods for the given complex attributes
    void
    updateMetadata(String inXML)
     
    int
    updateMetadata(String inXML, StringHolder outXML, int iFlags)
    Performs an update operation against the metadata server.
    void
    updateMetadataSimple(String inXML)
     
    void
    updateMetadataSimple(String strType, String strFQID, List<String> attributes, List<String> values)
    Updates the values of the simple attributes given.
    void
    updateObjectId(Document inDoc, Document outDoc)
    Updates the object ids on the local server stores to reflect the new id on the server.
  • Field Details

    • FOLDERTYPE_HOME

      static final String FOLDERTYPE_HOME
      The user's home folder
      See Also:
    • FOLDERTYPE_MYFOLDER

      static final String FOLDERTYPE_MYFOLDER
      The user's "my folder"
      See Also:
    • FOLDERTYPE_APPDATA

      static final String FOLDERTYPE_APPDATA
      The user's application data folder
      See Also:
    • OMI_ALL

      static final int OMI_ALL
      (1) specifies that the method get all of the properties of the requested object. If the XML stream returns a reference to any associated objects, then the method will return only general, identifying information for the associated objects.
      See Also:
    • OMI_EXPAND

      static final int OMI_EXPAND
      Deprecated.
      no longer supported by the metadata server
      (2) specifies that references to associated objects be expanded to return all of the properties of each associated object. This flag is typically used with the OMI_ALL flag to return all of the properties of associated objects in addition to those of the requested object. Refer to the SAS Namespace Types documentation to determine which associations can be expanded.
      See Also:
    • OMI_FULL_OBJECT

      static final int OMI_FULL_OBJECT
      (2) Instructs the SAS Metadata Server to use a public object type definition from the Object Type Dictionary to expand the specified object's logical metadata definition.
      See Also:
    • OMI_TEMPLATE

      static final int OMI_TEMPLATE
      (4) checks the Options parameter for one or more user-defined templates that specify the properties to return for a given metadata type. The templates are passed in a element in the Options parameter.
      See Also:
    • OMI_ALL_SIMPLE

      static final int OMI_ALL_SIMPLE
      (8) specifies that the method get all of the attributes of the requested object.
      See Also:
    • OMI_INCLUDE_SUBTYPES

      static final int OMI_INCLUDE_SUBTYPES
      (16) Specifies to retrieve metadata objects that are subtypes of the passed metadata type in addition to objects of the passed type. If OMI_XMLSELECT is also specified, it will affect the metadata and subtypes that are retrieved.
      See Also:
    • OMI_DELETE

      static final int OMI_DELETE
      (32) Deletes the files in a repository in addition to the repository registration. This flag is reserved for the Repository Administrator and works only in the REPOS namespace on the RepositoryBase type
      See Also:
    • OMI_CI_DELETE_ALL

      static final int OMI_CI_DELETE_ALL
      Deprecated.
      As of 9.2, no longer supported by the metadata server
      (33) Deletes fetched as well as checked and new metadata objects from a project repository upon check in to a primary repository
      See Also:
    • OMI_ALL_DESCENDANTS

      static final int OMI_ALL_DESCENDANTS
      (64) Returns all subtypes along with all of their descendants
      See Also:
    • OMI_XMLSELECT

      static final int OMI_XMLSELECT
      (128) Checks the Options parameter for criteria to qualify the objects that are returned by the server. The criteria are specified in a search string that is passed in the option. See Using the OMI_XMLSelect Option for more information.
      See Also:
    • OMI_GET_METADATA

      static final int OMI_GET_METADATA
      (256) Specifies to execute a GetMetadata call for each object that is returned by the GetMetadataObjects request. See Using the OMI_GET_METADATA Flag for more information.
      See Also:
    • OMI_MATCH_CASE

      static final int OMI_MATCH_CASE
      (512) Specifies to perform a case-sensitive search of the criteria specified in the option. The OMI_MATCH_CASE flag cannot be used without the OMI_XMLSELECT flag.
      See Also:
    • OMI_RETURN_LIST

      static final int OMI_RETURN_LIST
      (1024) Returns a list of deleted object IDs, as well as any cascading object IDs that were deleted.
      See Also:
    • OMI_SUCCINCT

      static final int OMI_SUCCINCT
      (2048) specifies to omit properties that do not contain values or that contain null values.
      See Also:
    • OMI_GET_OBJREF

      static final int OMI_GET_OBJREF
      (4096)
      See Also:
    • OMI_DEPENDENCY_USES

      static final int OMI_DEPENDENCY_USES
      (8192) Specifies to retrieve objects of the passed type from all repositories that have a DependencyUses dependency
      See Also:
    • OMI_DEPENDENCY_USEDBY

      static final int OMI_DEPENDENCY_USEDBY
      (16384) In GetMetadata, specifies to look for cross-repository references in repositories that use the current repository. In GetMetadataObjects, specifies to retrieve objects of the passed type from all repositories that have a DependencyUsedBy dependency.
      See Also:
    • OMI_LOCK

      static final int OMI_LOCK
      (32768) Locks the specified object and any associated objects selected by GetMetadata flags and options from update by other users.
      See Also:
    • OMI_LOCK_TEMPLATE

      static final int OMI_LOCK_TEMPLATE
      Deprecated.
      As of 9.2, no longer supported by the metadata server
      (65536) In GetMetadata, specifies to lock the associated objects specified in a user-defined lock template instead of associated objects requested by the method. In the other methods, overrides the default OMA lock template with a user-supplied template. In all cases, the user-defined lock template is submitted in a element in the Options parameter.
      See Also:
    • OMI_UNLOCK

      static final int OMI_UNLOCK
      (131072) Unlocks the specified object and any associated objects that were locked when the update is completed
      See Also:
    • OMI_UNLOCK_FORCE

      static final int OMI_UNLOCK_FORCE
      (262144) Unlocks any locks held by another user so that a metadata object can be updated.
      See Also:
    • OMI_CI_NODELETE

      static final int OMI_CI_NODELETE
      Deprecated.
      As of 9.2, no longer supported by the metadata server
      (524288) Keeps copies of checked, fetched, and new metadata objects in a project repository after check in to a primary repository.
      See Also:
    • OMI_PURGE

      static final int OMI_PURGE
      Deprecated.
      As of 9.2, no longer supported by the metadata server
      (1048576) Removes previously deleted metadata from a repository without disturbing the current metadata objects.
      See Also:
    • OMI_REINIT

      static final int OMI_REINIT
      (2097152) Deletes the contents of a repository but does not remove the repository's registration from the repository manager.
      See Also:
    • OMI_TRUNCATE

      static final int OMI_TRUNCATE
      (4194304) Deletes all metadata objects but does not remove the metadata object containers from a repository or change the repository's registration.
      See Also:
    • OMI_CLIENT_ID

      static final int OMI_CLIENT_ID
      (8388608) Client is supplying repository ID on AddMetadata of REPOS.
      See Also:
    • OMI_NOFORMAT

      static final int OMI_NOFORMAT
      (67108864) Do not format time values returned from the server.
      See Also:
    • OMI_IGNORE_NOTFOUND

      static final int OMI_IGNORE_NOTFOUND
      (134217728) This flag is for DeleteMetadata to tell it to ignore objects not found so that it will not return on error.
      See Also:
    • OMI_TRUSTED_CLIENT

      static final int OMI_TRUSTED_CLIENT
      (268435456)Determines if the client can call this method. This flag is currently required.
      See Also:
    • OMI_GET_ID

      static final int OMI_GET_ID
      Deprecated.
      (536870912) This flag is reserved for SAS usage only. It requests a list of new object Ids from the server to be used by the client. The OMI_GET_ID flag cannot be used without the OMI_TRUSTED_CLIENT flag. The number of requested Ids is specified in the option.
      See Also:
    • OMI_MULT_REQUEST

      static final int OMI_MULT_REQUEST
      (1073741824)
      See Also:
    • CLSID_SAS_WORKSPACE

      static final String CLSID_SAS_WORKSPACE
      The class id of the classic SAS server: 440196d4-90f0-11d0-9f41-00a024bb830c
      See Also:
    • CLSID_SASSTP_STOREDPROCESSSERVER

      static final String CLSID_SASSTP_STOREDPROCESSSERVER
      The class id of SAS/Intrnet V9: 15931e31-667f-11d5-8804-00c04f35ac8c
      See Also:
    • CLSID_SASOMI_OMI

      static final String CLSID_SASOMI_OMI
      The class id of the OMR server: 2887e7d7-4780-11d4-879f-00c04f38f0db
      See Also:
    • CLSID_SASMDX_SERVER

      static final String CLSID_SASMDX_SERVER
      The class id of OLAP V9: f3f46472-1e31-11d5-87c2-00c04f38f9f6
      See Also:
    • CLSID_SASGMS_GMS

      static final String CLSID_SASGMS_GMS
      The class id of the generic server: 9c186a64-83e4-11d2-b956-00c04f81993c
      See Also:
    • CLSID_SASMQX_MQX

      static final String CLSID_SASMQX_MQX
      the class id of the message queue server: 8d9ef489-8d1e-11d2-b94f-00c04f8198c0
      See Also:
    • CLASSID_HTTP

      static final String CLASSID_HTTP
      The Class ID for a HTTP server: DAC0D7F0-10DA-11D6-8816- AA0004006D06
      See Also:
    • CLASSID_FTP

      static final String CLASSID_FTP
      The class ID for a FTP server: CBA26437-1577-4FF8-93F6-9B68B4DD8D2E
      See Also:
    • CLASSID_MESSAGEQUEUE_MS

      static final String CLASSID_MESSAGEQUEUE_MS
      The class ID for a Message Queue: "MessageQueue.MSMQ"
      See Also:
    • CLASSID_MESSAGEQUEUE_WEBSPHERE

      static final String CLASSID_MESSAGEQUEUE_WEBSPHERE
      The class ID for a Message Queue: "MessageQueue.Websphere"
      See Also:
    • CLSID_SAS_POOLED_WORKSPACE

      static final String CLSID_SAS_POOLED_WORKSPACE
      The class ID for a Pooled Workspace Server: 620963ee-32bf-4128-bf5f-4b0df8ff90eb
      See Also:
    • CLASSID_MESSAGEQUEUE_JMS

      static final String CLASSID_MESSAGEQUEUE_JMS
      The class ID for a JMS Message Queue Manager: "MessageQueue.JMS"
      See Also:
  • Method Details

    • getNamespace

      String getNamespace() throws RemoteException
      Returns the current namespace used for OMI interactions
      Returns:
      The name space currently used for OMI calls
      Throws:
      RemoteException
    • setNamespace

      void setNamespace(String newNamespace) throws RemoteException
      Sets the current namespace used for OMI interactions
      Parameters:
      newNamespace - String
      Throws:
      RemoteException
    • getReposIdFromMetadataObject

      String getReposIdFromMetadataObject(CMetadata meta) throws RemoteException
      Returns the fully qualified repository id for a given metadata object (A0000001.XXXXXXXX). An empty string is returned if the object does not exist.
      Parameters:
      meta - the metadata object
      Returns:
      the repository id for this object
      Throws:
      RemoteException
    • getFoundationRepository

      CMetadata getFoundationRepository() throws MdException, RemoteException
      Returns the foundation repository for the connected metadata server. A CMetadata object is returned. If a foundation repository cannot be found, a null is returned.
      Returns:
      the foundation repository as a CMetadata object
      Throws:
      MdException
      RemoteException
    • getRepositories

      List<CMetadata> getRepositories() throws MdException, RemoteException
      Reads all repositories registered in the Common Metadata Repository Manager.
      Returns:
      List of CMetadata objects representing the repositories.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getFullObject

      CMetadata getFullObject(MdObjectStore store, CMetadata meta) throws MdException, RemoteException
      Performs a GetMetadata request on an existing public object. A public object is defined as an object that has its PublicType attribute set with a matching entry in the type dictionary.

      This method is mainly a convenience method for retrieving the full metadata representation of a public object, without requiring you to know which associations need to be passed in via a template. All information for the public object, including all of its attributes as well as all of its subordinate objects will be retrieved. The method does not require any flags or templates to be passed in as they (OMI_FULL_OBJECT, OMI_ALL_SIMPLE, and OMI_SUCCINCT) are automatically passed to the server for you.

      Note: this method will always overwrite any attributes and associations that may already be set on the object.

      Parameters:
      store - the store to create the object(s) in
      meta - the metadata object to query
      Returns:
      the metadata object
      Throws:
      MdException
      RemoteException
    • getFullObject

      CMetadata getFullObject(MdObjectStore store, String objectType, String objectID) throws MdException, RemoteException
      Performs a GetMetadata request on an existing public object. A public object is defined as an object that has its PublicType attribute set with a matching entry in the type dictionary.

      This method is mainly a convenience method for retrieving the full metadata representation of a public object, without requiring you to know which associations need to be passed in via a template. All information for the public object, including all of its attributes as well as all of its subordinate objects will be retrieved. The method does not require any flags or templates to be passed in as they (OMI_FULL_OBJECT, OMI_ALL_SIMPLE, and OMI_SUCCINCT) are automatically passed to the server for you.

      Note: if the object exists within the object store prior to calling this method, all of its attributes and associations will be overwritten.

      Parameters:
      store - the store to create the object(s) in
      objectType - the metadata type of the object
      objectID - the object id
      Returns:
      the metadata object
      Throws:
      MdException
      RemoteException
    • getFullObjects

      List getFullObjects(MdObjectStore store, Map<String,String> objectMap) throws MdException, RemoteException
      Performs a GetMetadata request on a set of existing public objecst. A public object is defined as an object that has its PublicType attribute set with a matching entry in the type dictionary.

      This method is mainly a convenience method for retrieving the full metadata representation of the public objects, without requiring you to know which associations need to be passed in via a template. All information for the public objects, including all of its attributes as well as all of its subordinate objects will be retrieved. The method does not require any flags or templates to be passed in as they (OMI_FULL_OBJECT, OMI_ALL_SIMPLE, and OMI_SUCCINCT) are automatically passed to the server for you.

      Note: if an object exists within the object store prior to calling this method, all of its attributes and associations will be overwritten.

      Parameters:
      store - the store to create the object(s) in
      objectMap - map of the objects to retrieve from the server. Keys for the map must be the metadata object ids, and the values must be the metadata object types.
      Returns:
      list of metadata (CMetadata) objects
      Throws:
      MdException
      RemoteException
    • getMetadataSimple

      String getMetadataSimple(String strType, String strFQID, String attributeName) throws MdException, RemoteException
      Returns a single attribute value from the server. The attribute is returned as a String. If the attribute cannot be found on the server, an empty string is returned.
      Parameters:
      strType - Type of Metadata object we are fetching the data for
      strFQID - Unique ID of the metadata object we are fetching the data for
      attributeName - the name of the attribute to retrieve (ex. MdFactory.NAME or MdFactory.DESC)
      Returns:
      the attribute value
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataSimple

      List<String> getMetadataSimple(String strType, String strFQID, List<String> attributes) throws MdException, RemoteException
      Returns a List of the simple attributes requested; these objects have been parsed and are returned as Strings in the order they were requested
      Parameters:
      strType - - Type of Metadata object we are fetching the data for (WTABLE, WCOLUMN, etc.) NOTE: CASE SENSITIVE!!!!
      strFQID - - Unique ID of the metadata object we are fetching the data for
      attributes - - List of Strings containing the names of the attributes to fetch NOTE: CASE SENSITIVE! USE THE STATIC VARS in m_factory
      Returns:
      - List of String objects containing the attribute values returned from the server
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataAllDepths

      CMetadata getMetadataAllDepths(CMetadata object, List<String> inSimpleAttr, List<String> inComplexObject, String strTemplate, int iOptions) throws MdException, RemoteException
      This method constructs CMetadata objects and sets both simple and complex attributes. The call to the metadata server can return any depth of XML. This method will recursively define each object and return the outermost object.
      Parameters:
      object - - Metadata object to get data for
      inSimpleAttr - - list of the simple attributes to fetch for this object you dont need any if you dont want any; Also, if you pass in an empty List, and set the iOptions field to OMI_ALL | OMI_ALL_SIMPLE (9) you can get back all the simple attributes for this metadata object. inSimpleAttr will be filled in with the attribute name, and outSimpleAttr will contain the attribute value.
      inComplexObject - - list of the complex objects to get for this object (WCOLUMN, JOB, etc.)
      strTemplate - - the template you want to apply to this object
      iOptions - - Options to pass in with this call to the server. Valid values are defined as:
      • OMI_ALL - returns all associations for the objects
      • OMI_ALL_SIMPLE - returns all simple attributes for the objects
      • OMI_TEMPLATE - required if a template is passed in
      • OMI_XMLSELECT - required if an xml select string is passed in
      • OMI_SUCCINCT - used to omit attributes that do not contain values or that contain null values
      • OMI_GET_METADATA - performs a get metadata request on each object
      Returns:
      CMetadata object with both simple and complex attributes set.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataAllDepths

      CMetadata getMetadataAllDepths(CMetadata object, List<String> inSimpleAttr, List<String> inComplexObject, String strTemplate, int iOptions, boolean doNotOverrideAssocs) throws MdException, RemoteException
      This method constructs CMetadata objects and sets both simple and complex attributes. The call to the metadata server can return any depth of XML. This method will recursively define each object and return the outermost object.
      Parameters:
      object - - Metadata object to get data for
      inSimpleAttr - - list of the simple attributes to fetch for this object you dont need any if you dont want any; Also, if you pass in an empty List, and set the iOptions field to OMI_ALL | OMI_ALL_SIMPLE (9) you can get back all the simple attributes for this metadata object. inSimpleAttr will be filled in with the attribute name, and outSimpleAttr will contain the attribute value.
      inComplexObject - - list of the complex objects to get for this object (WCOLUMN, JOB, etc.)
      strTemplate - - the template you want to apply to this object
      iOptions - - Options to pass in with this call to the server. Valid values are defined as:
      • OMI_ALL - returns all associations for the objects
      • OMI_ALL_SIMPLE - returns all simple attributes for the objects
      • OMI_TEMPLATE - required if a template is passed in
      • OMI_XMLSELECT - required if an xml select string is passed in
      • OMI_SUCCINCT - used to omit attributes that do not contain values or that contain null values
      • OMI_GET_METADATA - performs a get metadata request on each object
      Returns:
      CMetadata object with both simple and complex attributes set.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataAllDepths

      CMetadata getMetadataAllDepths(MdStore inStore, String strType, String strFQID, List<String> inSimpleAttr, List<String> inComplexObject, String strTemplate, int iOptions) throws MdException, RemoteException
      This method constructs CMetadata objects and sets both simple and complex attributes. The call to the metadata server can return any depth of XML. This method will recursively define each object and return the outermost object.
      Parameters:
      inStore - MdStore the store to create new objects into.
      strType - - Type of Metadata object we are fetching the data for (WTABLE, WCOLUMN, etc.) NOTE: CASE SENSITIVE!!!!
      strFQID - - Unique ID of the metadata object we are fetching the data for
      inSimpleAttr - - list of the simple attributes to fetch for this object you dont need any if you dont want any; Also, if you pass in an empty List, and set the iOptions field to OMI_ALL | OMI_ALL_SIMPLE (9) you can get back all the simple attributes for this metadata object. inSimpleAttr will be filled in with the attribute name, and outSimpleAttr will contain the attribute value.
      inComplexObject - - list of the complex objects to get for this object (WCOLUMN, JOB, etc.)
      strTemplate - - the template you want to apply to this object
      iOptions - - Options to pass in with this call to the server. Valid values are defined as:
      • OMI_ALL - returns all associations for the objects
      • OMI_ALL_SIMPLE - returns all simple attributes for the objects
      • OMI_TEMPLATE - required if a template is passed in
      • OMI_XMLSELECT - required if an xml select string is passed in
      • OMI_SUCCINCT - used to omit attributes that do not contain values or that contain null values
      • OMI_GET_METADATA - performs a get metadata request on each object
      Returns:
      CMetadata object with both simple and complex attributes set.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataAllDepths

      CMetadata getMetadataAllDepths(MdStore inStore, String strType, String strFQID, List<String> inSimpleAttr, List<String> inComplexObject, String strTemplate, int iOptions, boolean doNotOverrideAssocs) throws MdException, RemoteException
      This method constructs CMetadata objects and sets both simple and complex attributes. The call to the metadata server can return any depth of XML. This method will recursively define each object and return the outermost object.
      Parameters:
      inStore - MdStore the store to create new objects into.
      strType - - Type of Metadata object we are fetching the data for (WTABLE, WCOLUMN, etc.) NOTE: CASE SENSITIVE!!!!
      strFQID - - Unique ID of the metadata object we are fetching the data for
      inSimpleAttr - - list of the simple attributes to fetch for this object you dont need any if you dont want any; Also, if you pass in an empty List, and set the iOptions field to OMI_ALL | OMI_ALL_SIMPLE (9) you can get back all the simple attributes for this metadata object. inSimpleAttr will be filled in with the attribute name, and outSimpleAttr will contain the attribute value.
      inComplexObject - - list of the complex objects to get for this object (WCOLUMN, JOB, etc.)
      strTemplate - - the template you want to apply to this object
      iOptions - - Options to pass in with this call to the server. Valid values are defined as:
      • OMI_ALL - returns all associations for the objects
      • OMI_ALL_SIMPLE - returns all simple attributes for the objects
      • OMI_TEMPLATE - required if a template is passed in
      • OMI_XMLSELECT - required if an xml select string is passed in
      • OMI_SUCCINCT - used to omit attributes that do not contain values or that contain null values
      • OMI_GET_METADATA - performs a get metadata request on each object
      Returns:
      CMetadata object with both simple and complex attributes set.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • populateStoreFromString

      void populateStoreFromString(MdStore inStore, Document doc, int state, boolean useReposForNewObjects) throws MdException, RemoteException
      Build objects from source XML and set states to desired state.
      Parameters:
      inStore - the store to create the objects in
      doc - the xml document containing the metadata to create
      state - Valid states are MetadataState.LOCAL & MetadataState.SERVER
      Throws:
      MdException - If error getting/setting data on object.
      RemoteException
    • populateStoreFromString

      void populateStoreFromString(MdStore inStore, String inXML, int state, boolean useReposForNewObjects) throws MdException, RemoteException
      Build objects from source XML and set states to desired state.
      Parameters:
      inStore - the store to create the objects in
      inXML - the xml containing the metadata to create
      state - Valid states are MetadataState.LOCAL & MetadataState.SERVER
      Throws:
      MdException - If error getting/setting data on object.
      RemoteException
    • populateStoreFromInputStream

      void populateStoreFromInputStream(MdStore inStore, InputStream stream, int state, boolean useReposForNewObjects) throws MdException, RemoteException
      Build objects from an input stream and set states to desired state.
      Parameters:
      inStore - the store to create the objects in
      stream - The input stream containing the xml to be parsed
      state - Valid states are MetadataState.LOCAL & MetadataState.SERVER
      Throws:
      MdException - If error getting/setting data on object.
      RemoteException
    • populateObject

      CMetadata populateObject(CMetadata metaObject, NamedNodeMap simpleNodeMap, NodeList complexNodeList) throws MdException, RemoteException
      Populates an objects simple and complex attributes, by what is in the simpleNodeMap and the complexNodeList.
      Parameters:
      metaObject - CMetadata
      simpleNodeMap - org.w3c.dom.NamedNodeMap
      complexNodeList - org.w3c.dom.NodeList
      Returns:
      CMetadata object that is populated
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • populateObject

      CMetadata populateObject(CMetadata metaObject, NamedNodeMap simpleNodeMap, NodeList complexNodeList, boolean doNotOverrideAssocs) throws MdException, RemoteException
      Populates an objects simple and complex attributes, by what is in the simpleNodeMap and the complexNodeList.
      Parameters:
      metaObject - CMetadata
      simpleNodeMap - org.w3c.dom.NamedNodeMap
      complexNodeList - org.w3c.dom.NodeList
      Returns:
      CMetadata object that is populated
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • populateObjects

      List populateObjects(CMetadata metaObject, NamedNodeMap simpleNodeMap, NodeList complexNodeList, boolean doNotOverrideAssocs, List objects) throws MdException, RemoteException
      Populates an objects simple and complex attributes, by what is in the simpleNodeMap and the complexNodeList.
      Parameters:
      metaObject - CMetadata
      simpleNodeMap - org.w3c.dom.NamedNodeMap
      complexNodeList - org.w3c.dom.NodeList
      Returns:
      CMetadata object that is populated
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • doSimple

      CMetadata doSimple(CMetadata thisObject, NamedNodeMap thisNodeMap) throws MdException, RemoteException
      Calls 'set' methods for given object for nodes in given NodeMap
      Parameters:
      thisObject - CMetadata
      thisNodeMap - org.w3c.dom.NamedNodeMap
      Returns:
      CMetadata object that is populated with attributes
      Throws:
      MdException - in the case of any errors in reflection setting values
      RemoteException
    • setObjectAssociations

      void setObjectAssociations(CMetadata metaObject, List outComplexNames, List[] outComplexObjects, boolean doNotOverrideAssns) throws MdException, RemoteException
      Call given object's 'set...s' methods for the given complex attributes
      Parameters:
      metaObject - CMetadata
      outComplexNames - List
      outComplexObjects - List[]
      Throws:
      MdException - if error in reflection.
      RemoteException
    • getUserHomeFolderName

      String getUserHomeFolderName(String userName, String folderName) throws RemoteException
      Returns the localized name of a user's home folder. If the user's home folder does not yet exist, this method will not attempt to create it. Instead, it will just return the localized name of the folder if it did happen to exist.

      This method is guaranteed to at least return the original folder name if the localized version can't be found.

      Parameters:
      userName - the name of th euser
      folderName - the type of folder to return. Valid values are:
      Returns:
      the localized name of the user's home folder
      Throws:
      RemoteException
    • getUserHomeFolder

      Tree getUserHomeFolder(MdObjectStore store, String userName, String folderName, String template, int flags) throws MdException, RemoteException
      Returns a home folder for a given user. An exception will be thrown if the home folder does not yet exist for the user.
      Parameters:
      store - the object store to create the folder in
      userName - the name of the user
      folderName - the type of folder to return. Valid values are:
      template - the template to apply to this folder
      flags -
      Returns:
      returns a Tree metadata object representing a user's home folder.
      Throws:
      MdException
      RemoteException
    • getUserHomeFolder

      Tree getUserHomeFolder(MdObjectStore store, String userName, String folderName, String template, int flags, boolean createIfNecessary) throws MdException, RemoteException
      Returns a home folder for a given user.
      Parameters:
      store - the object store to create the folder in
      userName - the name of the user
      folderName - the type of folder to return. Valid values are:
      template - the template to apply to this folder
      flags -
      createIfNecessary - if true, the folder will be created if it doesn't yet exist. Otherwise, if false, the folder will not be created.
      Returns:
      returns a Tree metadata object representing a user's home folder.
      Throws:
      MdException
      RemoteException
    • getObjectPath

      String getObjectPath(MdObjectStore store, PrimaryType meta, boolean includeType) throws MdException, RemoteException
      Returns the path of the specified public object. This method should only be used on objects that have a public type definition and that reside in the SAS folders tree.

      Examples of the returned path:
      Library (with the type included): "/Shared Data/Libraries/Oracle Library(Library)"
      Stored Process (without the type included): "/BIP Tree/Report Studio/Samples/Hello World"

      Parameters:
      store - the object store to create the objects in
      includeType - If true, the public type will be included in the returned path. Otherwise, the type will be ignored.
      publicObject - the public object
      Returns:
      the path of the public object.
      Throws:
      MdException
      RemoteException
    • getResponsibleParty

      ResponsibleParty getResponsibleParty(MdObjectStore store, String identityName, String responsibility) throws MdException, RemoteException
      Returns a responsible party object for a given identity and responsibility. If the requested responsible party does not exist, it will be created in the same repository where the Identity exists.
      Parameters:
      store - the object store to create the responsible party in
      identityName - the name of the user. A value of null will imply the connected user. If the connected user is PUBLIC, an error will be returned.
      responsibility - the responsibility to search on (such as Owner or Administrator)
      Returns:
      returns a ResponsibleParty metadata object for a given Identity
      Throws:
      MdException
      IllegalArgumentException - if responsibility is not provided
      RemoteException
    • getResponsibleParty

      ResponsibleParty getResponsibleParty(MdObjectStore store, String identityName, String responsibility, String template, int flags) throws MdException, RemoteException
      Returns a responsible party object for a given identity and responsibility. If the request responsible party does not exist, it will be created in the same repository where the Identity exists.
      Parameters:
      store - the object store to create the responsible party in
      identityName - the name of the user. A value of null will imply the connected user. If the connected user is PUBLIC, an error will be returned.
      responsibility - the responsibility to search on (such as Owner or Administrator)
      template - the template to apply to this responsible party (optional)
      flags - additional flags to be used when searching for the responsible party
      Returns:
      returns a ResponsibleParty metadata object for a given Identity
      Throws:
      MdException
      IllegalArgumentException - if responsibility is not provided
      RemoteException
    • doesObjectExist

      int doesObjectExist(String reposID, String objectType, String xmlSelect) throws MdException, RemoteException
      Returns whether an object exists on the metadata server. This method should be used to determine if objects that match a certain criteria exist, and if so, how many exist. This method does not create CMetadata objects.
      Parameters:
      reposID - the repository id
      objectType - the metadata object type
      xmlSelect - an xml select statement to search with
      Returns:
      count of the number of objects found on the server. If no objects are found, 0 is returned.
      Throws:
      MdException
      RemoteException
    • getMetadataObjectsSubset

      List getMetadataObjectsSubset(MdStore inStore, String strReposID, String strType, int flags, String options) throws MdException, RemoteException
      Gets the list of metatdata objects in the repository for the requested type.
      Parameters:
      inStore - MdStore The store to put the returned objects into.
      strReposID - String Repository ID.
      strType - String Type of Metadata object we are wanting to list.
      flags - int GetMetadataObjects flags.
      options - String Template or XMLSelect string to selectively get the objects.
      Returns:
      List of CMetadata objects.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataObjectsSubset

      List getMetadataObjectsSubset(MdStore inStore, String strReposID, String strType, int flags, String options, boolean doOverrideAssocs) throws MdException, RemoteException
      Gets the list of metatdata objects in the repository for the requested type.
      Parameters:
      inStore - MdStore The store to put the returned objects into.
      strReposID - String Repository ID.
      strType - String Type of Metadata object we are wanting to list.
      flags - int GetMetadataObjects flags.
      options - String Template or XMLSelect string to selectively get the objects.
      Returns:
      List of CMetadata objects.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataObjectsSubsetList

      List getMetadataObjectsSubsetList(MdStore inStore, String strReposID, String strType, int flags, String options, boolean doOverrideAssocs) throws MdException, RemoteException
      Gets the list of metatdata objects in the repository for the requested type.
      Parameters:
      inStore - MdStore The store to put the returned objects into.
      strReposID - String Repository ID.
      strType - String Type of Metadata object we are wanting to list.
      flags - int GetMetadataObjects flags.
      options - String Template or XMLSelect string to selectively get the objects.
      Returns:
      List of CMetadata objects.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataObjects

      List getMetadataObjects(String strReposID, String strType, int iFlags) throws MdException, RemoteException
      Gets the list of metatdata objects in the repository for the requested type.
      Parameters:
      strReposID - Repository ID.
      strType - Type of Metadata object we are wanting to list.
      iFlags - int flags for OMI call
      Returns:
      List of CMetadata objects. Name & ID populated only...
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataObjects

      List getMetadataObjects(String strReposID, String strType) throws MdException, RemoteException
      Gets the list of metatdata objects in the repository for the requested type.
      Parameters:
      strReposID - Repository ID.
      strType - Type of Metadata object we are wanting to list.
      Returns:
      List of CMetadata objects. Name & ID populated only...
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataObjects

      List getMetadataObjects(String strReposID, String strType, int flags, String strOptions) throws MdException, RemoteException
      Gets the list of metatdata objects in the repository for the requested type.
      Parameters:
      strReposID - Repository ID.
      strType - Type of Metadata object we are wanting to list.
      flags - int GetMetadataObjects flags.
      strOptions - String Template or XMLSelect string to selectively get the objects.
      Returns:
      List of CMetadata objects. Name & ID populated only...
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadata

      List getMetadata(MdStore store, Map objectMap, String template, int flags) throws MdException, RemoteException
      Performs a GetMetadata request for a group of objects. The request sent to the server may contain a single object or a list of objects. This method does not allow you to specify which attributes or associations you want returned for each object. A template must be used instead.
      Parameters:
      store - the store to create the objects in
      objectMap - a map of the objects to retrieve from the server. Keys for the map must be the metadata object ids, and the values must be the metadata object types.
      template - the template you want to apply to these objects
      flags - Options to pass in with this call to the server. Valid values are defined as:
      • OMI_ALL - returns all associations for the objects
      • OMI_ALL_SIMPLE - returns all simple attributes for the objects
      • OMI_TEMPLATE - required if a template is passed in
      • OMI_XMLSELECT - required if an xml select string is passed in
      • OMI_SUCCINCT - used to omit attributes that do not contain values or that contain null values
      • OMI_GET_METADATA - performs a get metadata request on each object
      Returns:
      a List of CMetadata objects
      Throws:
      MdException
      RemoteException
    • getMetadata

      List getMetadata(MdStore store, Map objectMap, String template, int flags, boolean doNotOverrideAssocs, boolean doNotOverrideAttrs) throws MdException, RemoteException
      Performs a GetMetadata request for a group of objects. The request sent to the server may contain a single object or a list of objects. This method does not allow you to specify which attributes or associations you want returned for each object. A template must be used instead.
      Parameters:
      store - the store to create the objects in
      objectMap - a map of the objects to retrieve from the server. Keys for the map must be the metadata object ids, and the values must be the metadata object types.
      template - the template you want to apply to these objects
      flags - Options to pass in with this call to the server. Valid values are defined as:
      • OMI_ALL - returns all associations for the objects
      • OMI_ALL_SIMPLE - returns all simple attributes for the objects
      • OMI_TEMPLATE - required if a template is passed in
      • OMI_XMLSELECT - required if an xml select string is passed in
      • OMI_SUCCINCT - used to omit attributes that do not contain values or that contain null values
      • OMI_GET_METADATA - performs a get metadata request on each object
      doNotOverrideAssocs - if true, already set associations will not be overridden
      doNotOverrideAttrs - if true, already set attributes will not be overridden
      Returns:
      a List of CMetadata objects
      Throws:
      MdException
      RemoteException
    • getMetadata

      Document getMetadata(String inXML, int iFlags) throws MdException, RemoteException
      Sends input XML string to metadata server, and parses the output XML into a DOM document.
      Parameters:
      inXML - - Input XML string.
      iFlags - - OMI server GetMetadata flags.
      Returns:
      DOM Document.
      Throws:
      MdException - in the case of any from server
      RemoteException
    • getMetadata

      Document getMetadata(String inXML, String strTemplate, int iFlags) throws MdException, RemoteException
      Sends input and template XML strings to metadata server, and parses the output XML into a DOM document.
      Parameters:
      inXML - - Input XML string.
      strTemplate - - Template XML string.
      iFlags - - OMI server GetMetadata flags.
      Returns:
      DOM Document.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataObjects

      List getMetadataObjects(MdStore inStore, String inXML, String strTemplate, int iFlags) throws MdException, RemoteException
      Sends input and template XML strings to metadata server, and parses the output XML into a List of objects contained in the inStore.
      Parameters:
      inStore - MdStore The store to put created objects into.
      inXML - String the XML for the objects requested.
      strTemplate - - Template XML string.
      iFlags - - OMI server GetMetadata flags.
      Returns:
      DOM Document.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataObjects

      List getMetadataObjects(MdStore inStore, String inXML, String strTemplate, int iFlags, boolean doNotOverrideAssocs) throws MdException, RemoteException
      Sends input and template XML strings to metadata server, and parses the output XML into a List of objects contained in the inStore.
      Parameters:
      inStore - MdStore The store to put created objects into.
      inXML - String the XML for the objects requested.
      strTemplate - - Template XML string.
      iFlags - - OMI server GetMetadata flags.
      Returns:
      DOM Document.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getMetadataNoCache

      @Deprecated Map getMetadataNoCache(String strType, String strFQID, String strOptions, int iFlags) throws MdException, RemoteException
      Deprecated.
      This method has been replaced by getFastMetadata(Map, String, int).
      Performs a GetMetadata request against the server. The xml returned from the server is parsed and stored in a map. This map will contain all of the object's attributes and associations returned from the server.

      In the case of the attributes, the attribute name will be the key and the attribute value will be the map's value. For the associations, the association name will be the key and the value will be a list of the associated objects. Each item in the list will be a separate map object.

      Note: This method will not create complex objects out of the items returned from the server and nothing will be cached in an object store. This method should only be used when the user wishes to have only basic information for an object. The information returned can be restricted by the use of a template.

      Parameters:
      strType - the type of metadata object
      strFQID - the metadata object id
      strOptions - the xml options (including any templates or search statements)
      iFlags - OMI server GetMetadata flags
      Returns:
      a map of the object
      Throws:
      MdException
      RemoteException
    • getMetadataNoCache

      @Deprecated List getMetadataNoCache(Map objectMap, String strOptions, int iFlags) throws MdException, RemoteException
      Deprecated.
      This method has been replaced by getFastMetadata(Map, String, int).
      Performs a GetMetadata request against the server. This method allows you to perform a GetMetadata on multiple objects. The xml returned from the server is parsed and stored in a map. This map will contain all of the object's attributes and associations returned from the server.

      In the case of the attributes, the attribute name will be the key and the attribute value will be the map's value. For the associations, the association name will be the key and the value will be a list of the associated objects. Each item in the list will be a separate map object.

      Note: This method will not create complex objects out of the items returned from the server and nothing will be cached in an object store.

      Parameters:
      objectMap - a map of id/type values to search for. The maps keys must be an object's metadata id, and the values must be the metadata object types.
      strOptions - the xml options (including any templates or search statements)
      iFlags - OMI server GetMetadata flags
      Returns:
      a list containing map objects
      Throws:
      MdException
      RemoteException
    • getMetadataObjectsNoCache

      @Deprecated List getMetadataObjectsNoCache(String strType, String strReposId, String strOptions, int iFlags) throws MdException, RemoteException
      Deprecated.
      This method has been replaced by getFastMetadataObjects(String, String, String, int).
      Performs a GetMetadataObjects request against the server. Each object returned from the server is parsed and stored in a map. This map will contain all of the object's attributes and associations returned from the server. A list is then created containing all of the map objects created.

      In the case of the attributes, the attribute name will be the key and the attribute value will be the map's value. For the associations, the association name will be the key and the value will be a list of the associated objects. Each item in the list will be a separate map object.

      Note: This method will not create complex objects out of the items returned from the server and nothing will be cached in an object store. This method should only be used when the user wishes to have only basic information for an object. The information returned can be restricted by the use of a template.

      Parameters:
      strType - the type of metadata object
      strReposId - the repository id
      strOptions - the xml options (including any templates or search statements)
      iFlags - OMI server GetMetadata flags
      Returns:
      a list containing map objects
      Throws:
      MdException
      RemoteException
    • getFastMetadata

      FastMetadata getFastMetadata(String metadataType, String fqid, String options, int flags) throws MdException, RemoteException
      Returns a lightweight description of a metadata object. Attributes and associations of the metadata object are available from the returned FastMetadata object. The returned attributes and associations are controlled by the GetMetadata option and flag parameters.

      Note: This method bypasses normal metadata object processing and object stores. The returned object is a static object containing only a copy of the attributes and associations retrieved when this method is called.

      Parameters:
      metadataType - the type of metadata object
      fqid - the metadata object id
      options - GetMetadata options; typically used to specify a template
      flags - GetMetadata flags
      Returns:
      a lightweight metadata object descriptor
      Throws:
      MdException
      RemoteException
    • getFastMetadata

      List<FastMetadata> getFastMetadata(Map<String,String> objects, String options, int flags) throws MdException, RemoteException
      Returns lightweight descriptions of metadata objects. Attributes and associations of the metadata objects are available from the returned FastMetadata objects. The returned attributes and associations are controlled by the GetMetadata option and flag parameters.

      Note: This method bypasses normal metadata object processing and object stores. The returned object is a static object containing only a copy of the attributes and associations retrieved when this method is called.

      Parameters:
      objects - collection of objects to be retrieved. The objects are described by a Map using object fqid as keys and metadata object types as values.
      options - GetMetadata options; typically used to specify a template
      flags - GetMetadata flags
      Returns:
      a list of lightweight metadata object descriptors
      Throws:
      MdException
      RemoteException
    • getFastMetadataObjects

      List<FastMetadata> getFastMetadataObjects(String strType, String strReposId, String strOptions, int iFlags) throws MdException, RemoteException
      Returns lightweight descriptions of metadata objects retrieved by a server GetMetadataObjects request. Attributes and associations of the metadata objects are available from the returned FastMetadata objects. The returned objects, attributes, and associations are controlled by the GetMetadataObjects option and flag parameters.

      Note: This method bypasses normal metadata object processing and object stores. The returned object is a static object containing only a copy of the attributes and associations retrieved when this method is called.

      Parameters:
      metadataType - the type of metadata object
      reposId - the repository id
      options - GetMetadataObjects options; typically used to specify XMLSelect search criteria and templates
      flags - GetMetadataObjects flags
      Returns:
      a list of lightweight metadata object descriptors
      Throws:
      MdException
      RemoteException
    • DoRequest

      Document DoRequest(String inXML) throws MdException, RemoteException
      Performs a DoRequest
      Parameters:
      inXML - String input for DoRequest Call
      Returns:
      org.w3c.dom.Document that is the parsed xml output from DoRequest call to server
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • DoRequest

      Document DoRequest(String inXML, boolean fUpdateIds) throws MdException, RemoteException
      Performs a DoRequest
      Parameters:
      inXML - String input for DoRequest Call
      Returns:
      org.w3c.dom.Document that is the parsed xml output from DoRequest call to server
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • DoRequestNoReturn

      void DoRequestNoReturn(String inXML, boolean fUpdateIds) throws MdException, RemoteException
      Performs a DoRequest
      Parameters:
      inXML - String input for DoRequest Call
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • processDeletedObjects

      void processDeletedObjects(Document outDoc) throws RemoteException
      This deletes objects on the client that have been deleted from the server and are returned from a DeltedObjects array.
      Parameters:
      outDoc -
      Throws:
      RemoteException
    • updateObjectId

      void updateObjectId(Document inDoc, Document outDoc) throws MdException, RemoteException
      Updates the object ids on the local server stores to reflect the new id on the server.
      Parameters:
      inDoc - org.w3c.dom.Document
      outDoc - org.w3c.dom.Document
      Throws:
      MdException - in the case of any errors from the factory changing the hashkey.
      RemoteException
    • createGetXMLString

      String createGetXMLString(String strType, String strFQID, List<String> simpleAttr, List<String> complexAttr) throws RemoteException
      Creates and returns the XML string to retrieve simple and/or complex attributes.
      Parameters:
      strType - - XML is generated for this type of metadata object.
      strFQID - - Metadata-id, if get is for specific object. May be null or empty.
      simpleAttr - - List of simple attributes requested. May be null or empty.
      complexAttr - - List of complex attributes requested. May be null or empty.
      Returns:
      - String object with generated XML.
      Throws:
      RemoteException
    • createGetXMLString

      String createGetXMLString(Map<String,String> objectMap) throws RemoteException
      Creates and returns the XML string used for a GetMetadata request. This string does not include simple attributes or associations.
      Parameters:
      objectMap - a map of the objects to retrieve. Keys for the map must be the metadata object ids and the values must be the metadata object type.
      Returns:
      String object with generated XML.
      Throws:
      RemoteException
    • createObjectAttributeString

      String createObjectAttributeString(Map<String,String> attributes) throws RemoteException
      Creates a string of an object's attributes as key/value pairs
      Parameters:
      attributes - a map of the object's attributes
      Returns:
      a String that is the attribues and values formated for XML
      Throws:
      RemoteException
    • createXMLSubString

      String createXMLSubString(List<String> attributes, List<String> values) throws RemoteException
      Creates and returns the XML string of the passed in attributes
      Parameters:
      attributes - - List of Strings containing the names of the attributes to fetch NOTE: CASE SENSITIVE! USE THE STATIC VARS in m_factory
      values - - List of String objects containing the attribute values
      Returns:
      String that is the attribues and values formated for XML
      Throws:
      RemoteException
    • createRefreshXML

      String createRefreshXML(CMetadata meta, boolean refreshAssocsSetByServerOnly, boolean refreshAll) throws RemoteException
      Creates an XML string used for refreshing an object.
      Parameters:
      meta - the object to refresh
      refreshAssocsSetByServerOnly - refresh associations that have been set by the server only
      refreshAll - refreshes all associations of the object
      Returns:
      refresh xml string
      Throws:
      RemoteException
    • cleanStringForXML

      String cleanStringForXML(String s) throws RemoteException
      Note: As of 9.4, callers can now use the static method XMLUtil.normalize(String) instead.

      cleanStringForXML takes a String and converts "bad" characters, like \n and others, into acceptable &#xxx entities.

      Parameters:
      s - String
      Returns:
      String that is free from special chars
      Throws:
      RemoteException
    • createUpdateXMLSimple

      String createUpdateXMLSimple(String strType, String strFQID, List<String> attributes, List<String> values) throws RemoteException
      Creates and returns the XML string of the passed in attributes
      Parameters:
      strType - - Type of Metadata object we are fetching the data for (WTABLE, WCOLUMN, etc.) NOTE: CASE SENSITIVE!!!!
      strFQID - - Unique ID of the metadata object we are updating
      attributes - - List of Strings containing the names of the attributes to fetch NOTE: CASE SENSITIVE! USE THE STATIC VARS in m_factory
      values - - List of String objects containing the attribute values to be sent to the server
      Returns:
      String that is the update xml for the simple attributes specified
      Throws:
      RemoteException
    • updateMetadataSimple

      void updateMetadataSimple(String strType, String strFQID, List<String> attributes, List<String> values) throws MdException, RemoteException
      Updates the values of the simple attributes given.
      Parameters:
      strType - - Type of Metadata object we are fetching the data for (WTABLE, WCOLUMN, etc.) NOTE: CASE SENSITIVE!!!!
      strFQID - - Unique ID of the metadata object we are updating
      attributes - - List of Strings containing the names of the attributes to fetch NOTE: CASE SENSITIVE! USE THE STATIC VARS in m_factory
      values - - List of String objects containing the attribute values to be sent to the server
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • updateMetadataSimple

      void updateMetadataSimple(String inXML) throws MdException, RemoteException
      Throws:
      MdException
      RemoteException
    • updateMetadata

      void updateMetadata(String inXML) throws MdException, RemoteException
      Throws:
      MdException
      RemoteException
    • updateMetadata

      int updateMetadata(String inXML, StringHolder outXML, int iFlags) throws MdException, RemoteException
      Performs an update operation against the metadata server.
      Parameters:
      inXML - Input XML string that will be wrapped with the update tag and other session tags. ie.
      outXML - StringHodler object containing the XML returned from the server. This may contain new object IDs if new objects were created.
      iFlags - int Set to zero.
      Returns:
      int return code from updateMetadata
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • addMetadata

      int addMetadata(String inXML, String reposID, StringHolder outXML, int iFlags) throws MdException, RemoteException
      Performs an add operation against the metadata server.
      Parameters:
      inXML - Input XML string that will be wrapped with the add tag and other session tags. ie.
      reposID - String representation of an ID in the repository to create the object in. You can pass in any existing object's ID.
      outXML - StringHodler object containing the XML returned from the server. This may contain new object IDs if new objects were created.
      iFlags - int Flags Set to zero.
      Returns:
      int return code from addMetadata
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getTypes

      void getTypes(List<String> nameList, List<String> descList) throws MdException, RemoteException
      Gets the types that are available in the repository. Usage:
      List nameList = new List();
      List descList = new List();
      MdOMIUtil.getTypes( nameList, descList )
      Parameters:
      nameList - List of string type names being returned.
      descList - List of string descriptions being returned.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getTypeProperties

      void getTypeProperties(String objectType, Map<String,Map<String,String>> attributeMap, Map<String,Map<String,String>> associationMap) throws MdException, RemoteException
      Gets the properties for a specific metadata object type. This will call the GetTypeProperties method on the server and retrieve a map of an object's attributes and associations.

      Usage:

       Map<String,Map<String,String>> attributeMap = new HashMap<String,Map<String,String>>();
       Map<String,Map<String,String>> associationMap = new HashMap<String,Map<String,String>>();
       MdOMIUtil.getTypeProperties(MdFactory.COLUMN, attributeMap, associationMap);
       

      Parameters:
      objectType - the metadata object type
      attributeMap - map of attributes to be returned
      associationMap - map of associations to be returned
      connectionHandle - The IOMI interface to use to process methods.
      Throws:
      MdException
      RemoteException
    • getSubTypes

      List<String> getSubTypes(String objectType, boolean includeDescendants) throws MdException, RemoteException
      Gets the subtypes specific metadata object type.
      Parameters:
      objectType - the metadata object type
      includeDescendants - if true, thye method eturns all subtypes along with all of their descendants.
      Throws:
      MdException
      RemoteException
    • getAssociatedObject

      CMetadata getAssociatedObject(CMetadata object, String strAssociation, String strTemplate) throws MdException, RemoteException
      Get the single metatdata object from the given associtation.
      Parameters:
      object - CMetadata
      strAssociation - name to follow and retrieve objects.
      strTemplate - - the template you want to apply to the associated object, an empty string can be used is no template is needed.
      Returns:
      CMetadata object associated or null if none found.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getAssociatedObject

      CMetadata getAssociatedObject(CMetadata object, String strAssociation, String strTemplate, boolean doNotOverrideAssocs) throws MdException, RemoteException
      Get the single metatdata object from the given associtation.
      Parameters:
      object - CMetadata
      strAssociation - name to follow and retrieve objects.
      strTemplate - - the template you want to apply to the associated object, an empty string can be used is no template is needed.
      Returns:
      CMetadata object associated or null if none found.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getAssociatedObjects

      AssociationList getAssociatedObjects(CMetadata object, String strAssociation, String strTemplate) throws MdException, RemoteException
      Gets the list of metatdata objects for the given association.
      Parameters:
      object - CMetadata object used to get assocaition
      strAssociation - name to follow and retrieve objects.
      strTemplate - - the template you want to apply to the associated objects, an empty string can be used is no template is needed.
      Returns:
      List of CMetadata objects associated to the given object.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getAssociatedObjects

      AssociationList getAssociatedObjects(CMetadata object, String strAssociation, String strTemplate, boolean doNotOverrideAssocs) throws MdException, RemoteException
      Gets the list of metatdata objects for the given association.
      Parameters:
      object - CMetadata object used to get assocaition
      strAssociation - name to follow and retrieve objects.
      strTemplate - - the template you want to apply to the associated objects, an empty string can be used is no template is needed.
      Returns:
      List of CMetadata objects associated to the given object.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getAttribute

      String getAttribute(String strAttribute, NamedNodeMap childNodeMap) throws RemoteException
      Retrieve the requested attribute from the XML dom object.
      Parameters:
      strAttribute - String
      childNodeMap - org.w3c.dom.NamedNodeMap
      Returns:
      Null if no value defined, or the String value of the attribute.
      Throws:
      RemoteException
    • parseXML

      Document parseXML(String strXML) throws MdException, RemoteException
      routine to parse a passed in xml string and return a dom document
      Parameters:
      strXML - String is the string input to pass to the parser
      Returns:
      a dom document that can be traversed for the various xml pieces
      Throws:
      MdException - in the case of any parsing exceptions
      RemoteException
    • parseXML

      Document parseXML(URL xmlDocument) throws MdException, RemoteException
      routine to parse a passed in xml URL and return a dom document
      Parameters:
      xmlDocument - URL is the string input to pass to the parser
      Returns:
      a dom document that can be traversed for the various xml pieces
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • parseXML

      Document parseXML(URL xmlDocument, Map<String,Boolean> features) throws MdException, RemoteException
      routine to parse a passed in xml URL and return a dom document
      Parameters:
      xmlDocument - URL is the string input to pass to the parser
      features - - map of features to control the validation rules for the input being parsed
      Returns:
      a dom document that can be traversed for the various xml pieces
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • formatXML

      String formatXML(String original) throws RemoteException
      Note: As of 9.4, callers can now use the static method XMLUtil.formatXML(String) instead.

      Format the XML so that we can read it easier.

      Parameters:
      original - String
      Returns:
      String formated original
      Throws:
      RemoteException
    • deleteMetadataObject

      List<String> deleteMetadataObject(CMetadata metadataObject, String template) throws MdException, RemoteException
      Deletes an object from the server using the specified delete template.
      Parameters:
      metadataObject - the object to delete
      template - the template to process when deleting the public object
      Returns:
      list of object ids (Strings) that were deleted
      Throws:
      MdException
      RemoteException
    • deleteMetadataObject

      List<String> deleteMetadataObject(CMetadata inObject) throws MdException, RemoteException
      Delete a CMetadata object and all it's dependancies.
      Parameters:
      inObject - CMetadata
      Returns:
      List of FQID Strings that were deleted.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • deleteMetadataObject

      List<String> deleteMetadataObject(String objectType, String objectID) throws MdException, RemoteException
      Deletes a metadata object and all of its dependencies
      Parameters:
      objectType - the metadata type
      objectID - the metadata object id
      Returns:
      list of object ids that were deleted
      Throws:
      MdException
      RemoteException
    • deleteMetadataObject

      List<String> deleteMetadataObject(String objectType, String objectID, String template) throws MdException, RemoteException
      Deletes a metadata object and all of its dependencies
      Parameters:
      objectType - the metadata type
      objectID - the metadata object id
      template - the template to process when deleting the public object
      Returns:
      list of object ids that were deleted
      Throws:
      MdException
      RemoteException
    • deleteMetadataObjects

      List<String> deleteMetadataObjects(List<? extends CMetadata> inObjects) throws MdException, RemoteException
      Delete a CMetadata object and all it's dependancies.
      Parameters:
      inObjects - List
      Returns:
      List of FQID Strings that were deleted.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • deleteMetadataObjects

      List<String> deleteMetadataObjects(Map<String,String> inObjects) throws MdException, RemoteException
      Delete multiple objects from the server and all their dependencies.
      Parameters:
      inObjects - Map of the items to be deleted. The keys of the map consist of the object ids and the values are the object types.
      Returns:
      List of FQID Strings that were deleted.
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • ApplyXML

      Document ApplyXML(String inXML, String reposID) throws MdException, RemoteException
      This routine is used by metadata importers to filter their XML to handle XML updates.
      Parameters:
      inXML - String containing the XML inside of the tags
      reposID - ID of the repository to apply this change to
      Returns:
      org.w3c.dom.Document a document that contains the added XML returned from the server
      Throws:
      MdException - in the case of any server errors
      RemoteException
    • getIdentity

      Identity getIdentity(MdObjectStore store) throws MdException, RemoteException
      This routine is used to retrieve the identity object of the current user.
      Parameters:
      store - Object Store associated with the metadata server for the current user.
      Returns:
      com.sas.metadata.remote.Identity that represents the current user
      Throws:
      MdException
      RemoteException
    • getFoundationReposID

      String getFoundationReposID() throws MdException, RemoteException
      Returns the ID of the Foundation repository
      Returns:
      a string containing the ID
      Throws:
      MdException
      RemoteException