Interface MdOMIUtil
- All Superinterfaces:
Remote
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
FieldsModifier and TypeFieldDescriptionstatic final StringThe class ID for a FTP server: CBA26437-1577-4FF8-93F6-9B68B4DD8D2Estatic final StringThe Class ID for a HTTP server: DAC0D7F0-10DA-11D6-8816- AA0004006D06static final StringThe class ID for a JMS Message Queue Manager: "MessageQueue.JMS"static final StringThe class ID for a Message Queue: "MessageQueue.MSMQ"static final StringThe class ID for a Message Queue: "MessageQueue.Websphere"static final StringThe class ID for a Pooled Workspace Server: 620963ee-32bf-4128-bf5f-4b0df8ff90ebstatic final StringThe class id of the classic SAS server: 440196d4-90f0-11d0-9f41-00a024bb830cstatic final StringThe class id of the generic server: 9c186a64-83e4-11d2-b956-00c04f81993cstatic final StringThe class id of OLAP V9: f3f46472-1e31-11d5-87c2-00c04f38f9f6static final Stringthe class id of the message queue server: 8d9ef489-8d1e-11d2-b94f-00c04f8198c0static final StringThe class id of the OMR server: 2887e7d7-4780-11d4-879f-00c04f38f0dbstatic final StringThe class id of SAS/Intrnet V9: 15931e31-667f-11d5-8804-00c04f35ac8cstatic final StringThe user's application data folderstatic final StringThe user's home folderstatic final StringThe 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 descendantsstatic final int(8) specifies that the method get all of the attributes of the requested object.static final intDeprecated.As of 9.2, no longer supported by the metadata serverstatic final intDeprecated.As of 9.2, no longer supported by the metadata serverstatic 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 dependencystatic final intDeprecated.no longer supported by the metadata serverstatic 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 intDeprecated.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 intDeprecated.As of 9.2, no longer supported by the metadata serverstatic final int(512) Specifies to perform a case-sensitive search of the criteria specified in theoption. static final int(1073741824)static final int(67108864) Do not format time values returned from the server.static final intDeprecated.As of 9.2, no longer supported by the metadata serverstatic 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 completedstatic 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 TypeMethodDescriptionintaddMetadata(String inXML, String reposID, StringHolder outXML, int iFlags) Performs an add operation against the metadata server.DocumentApplyXML(String inXML, String reposID) This routine is used by metadata importers to filter their XML to handle XML updates.StringcleanStringForXML(String s) Note: As of 9.4, callers can now use the static methodXMLUtil.normalize(String)instead.StringcreateGetXMLString(String strType, String strFQID, List<String> simpleAttr, List<String> complexAttr) Creates and returns the XML string to retrieve simple and/or complex attributes.StringcreateGetXMLString(Map<String, String> objectMap) Creates and returns the XML string used for a GetMetadata request.StringcreateObjectAttributeString(Map<String, String> attributes) Creates a string of an object's attributes as key/value pairsStringcreateRefreshXML(CMetadata meta, boolean refreshAssocsSetByServerOnly, boolean refreshAll) Creates an XML string used for refreshing an object.StringcreateUpdateXMLSimple(String strType, String strFQID, List<String> attributes, List<String> values) Creates and returns the XML string of the passed in attributesStringcreateXMLSubString(List<String> attributes, List<String> values) Creates and returns the XML string of the passed in attributesList<String> deleteMetadataObject(CMetadata inObject) 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 dependenciesList<String> deleteMetadataObject(String objectType, String objectID, String template) Deletes a metadata object and all of its dependenciesList<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.intdoesObjectExist(String reposID, String objectType, String xmlSelect) Returns whether an object exists on the metadata server.DocumentDoRequest(String inXML) Performs a DoRequestDocumentDoRequest(String inXML, boolean fUpdateIds) Performs a DoRequestvoidDoRequestNoReturn(String inXML, boolean fUpdateIds) Performs a DoRequestCalls 'set' methods for given object for nodes in given NodeMapStringformatXML(String original) Note: As of 9.4, callers can now use the static methodXMLUtil.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.StringgetAttribute(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.List<FastMetadata> getFastMetadata(Map<String, String> objects, String options, int flags) Returns lightweight descriptions of metadata objects.List<FastMetadata> getFastMetadataObjects(String strType, String strReposId, String strOptions, int iFlags) Returns lightweight descriptions of metadata objects retrieved by a server GetMetadataObjects request.StringReturns the ID of the Foundation repositoryReturns the foundation repository for the connected metadata server.getFullObject(MdObjectStore store, CMetadata meta) 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.ListgetFullObjects(MdObjectStore store, Map<String, String> objectMap) Performs a GetMetadata request on a set of existing public objecst.getIdentity(MdObjectStore store) This routine is used to retrieve the identity object of the current user.ListgetMetadata(MdStore store, Map objectMap, String template, int flags) Performs a GetMetadata request for a group of objects.ListgetMetadata(MdStore store, Map objectMap, String template, int flags, boolean doNotOverrideAssocs, boolean doNotOverrideAttrs) Performs a GetMetadata request for a group of objects.DocumentgetMetadata(String inXML, int iFlags) Sends input XML string to metadata server, and parses the output XML into a DOM document.DocumentgetMetadata(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.MapgetMetadataNoCache(String strType, String strFQID, String strOptions, int iFlags) Deprecated.This method has been replaced bygetFastMetadata(Map, String, int).ListgetMetadataNoCache(Map objectMap, String strOptions, int iFlags) Deprecated.This method has been replaced bygetFastMetadata(Map, String, int).ListgetMetadataObjects(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.ListgetMetadataObjects(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.ListgetMetadataObjects(String strReposID, String strType) Gets the list of metatdata objects in the repository for the requested type.ListgetMetadataObjects(String strReposID, String strType, int iFlags) Gets the list of metatdata objects in the repository for the requested type.ListgetMetadataObjects(String strReposID, String strType, int flags, String strOptions) Gets the list of metatdata objects in the repository for the requested type.ListgetMetadataObjectsNoCache(String strType, String strReposId, String strOptions, int iFlags) Deprecated.This method has been replaced bygetFastMetadataObjects(String, String, String, int).ListgetMetadataObjectsSubset(MdStore inStore, String strReposID, String strType, int flags, String options) Gets the list of metatdata objects in the repository for the requested type.ListgetMetadataObjectsSubset(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.ListgetMetadataObjectsSubsetList(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.StringgetMetadataSimple(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 requestedStringReturns the current namespace used for OMI interactionsStringgetObjectPath(MdObjectStore store, PrimaryType meta, boolean includeType) Returns the path of the specified public object.StringReturns 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.voidgetTypeProperties(String objectType, Map<String, Map<String, String>> attributeMap, Map<String, Map<String, String>> associationMap) Gets the properties for a specific metadata object type.voidgetTypes(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.StringgetUserHomeFolderName(String userName, String folderName) Returns the localized name of a user's home folder.DocumentparseXML(String strXML) routine to parse a passed in xml string and return a dom documentDocumentparseXML(URL xmlDocument) routine to parse a passed in xml URL and return a dom documentDocumentparseXML(URL xmlDocument, Map<String, Boolean> features) routine to parse a passed in xml URL and return a dom documentpopulateObject(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.ListpopulateObjects(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.voidpopulateStoreFromInputStream(MdStore inStore, InputStream stream, int state, boolean useReposForNewObjects) Build objects from an input stream and set states to desired state.voidpopulateStoreFromString(MdStore inStore, String inXML, int state, boolean useReposForNewObjects) Build objects from source XML and set states to desired state.voidpopulateStoreFromString(MdStore inStore, Document doc, int state, boolean useReposForNewObjects) Build objects from source XML and set states to desired state.voidprocessDeletedObjects(Document outDoc) This deletes objects on the client that have been deleted from the server and are returned from a DeltedObjects array.voidsetNamespace(String newNamespace) Sets the current namespace used for OMI interactionsvoidsetObjectAssociations(CMetadata metaObject, List outComplexNames, List[] outComplexObjects, boolean doNotOverrideAssns) Call given object's 'set...s' methods for the given complex attributesvoidupdateMetadata(String inXML) intupdateMetadata(String inXML, StringHolder outXML, int iFlags) Performs an update operation against the metadata server.voidupdateMetadataSimple(String inXML) voidupdateMetadataSimple(String strType, String strFQID, List<String> attributes, List<String> values) Updates the values of the simple attributes given.voidupdateObjectId(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_HOMEThe user's home folder- See Also:
-
FOLDERTYPE_MYFOLDER
static final String FOLDERTYPE_MYFOLDERThe user's "my folder"- See Also:
-
FOLDERTYPE_APPDATA
static final String FOLDERTYPE_APPDATAThe 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_EXPANDDeprecated.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 aelement 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_ALLDeprecated.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 theoption. 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 theoption. 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_TEMPLATEDeprecated.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 aelement 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_NODELETEDeprecated.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_PURGEDeprecated.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_IDDeprecated.(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 theoption. - See Also:
-
OMI_MULT_REQUEST
static final int OMI_MULT_REQUEST(1073741824)- See Also:
-
CLSID_SAS_WORKSPACE
static final String CLSID_SAS_WORKSPACEThe class id of the classic SAS server: 440196d4-90f0-11d0-9f41-00a024bb830c- See Also:
-
CLSID_SASSTP_STOREDPROCESSSERVER
static final String CLSID_SASSTP_STOREDPROCESSSERVERThe class id of SAS/Intrnet V9: 15931e31-667f-11d5-8804-00c04f35ac8c- See Also:
-
CLSID_SASOMI_OMI
static final String CLSID_SASOMI_OMIThe class id of the OMR server: 2887e7d7-4780-11d4-879f-00c04f38f0db- See Also:
-
CLSID_SASMDX_SERVER
static final String CLSID_SASMDX_SERVERThe class id of OLAP V9: f3f46472-1e31-11d5-87c2-00c04f38f9f6- See Also:
-
CLSID_SASGMS_GMS
static final String CLSID_SASGMS_GMSThe class id of the generic server: 9c186a64-83e4-11d2-b956-00c04f81993c- See Also:
-
CLSID_SASMQX_MQX
static final String CLSID_SASMQX_MQXthe class id of the message queue server: 8d9ef489-8d1e-11d2-b94f-00c04f8198c0- See Also:
-
CLASSID_HTTP
static final String CLASSID_HTTPThe Class ID for a HTTP server: DAC0D7F0-10DA-11D6-8816- AA0004006D06- See Also:
-
CLASSID_FTP
static final String CLASSID_FTPThe class ID for a FTP server: CBA26437-1577-4FF8-93F6-9B68B4DD8D2E- See Also:
-
CLASSID_MESSAGEQUEUE_MS
static final String CLASSID_MESSAGEQUEUE_MSThe class ID for a Message Queue: "MessageQueue.MSMQ"- See Also:
-
CLASSID_MESSAGEQUEUE_WEBSPHERE
static final String CLASSID_MESSAGEQUEUE_WEBSPHEREThe class ID for a Message Queue: "MessageQueue.Websphere"- See Also:
-
CLSID_SAS_POOLED_WORKSPACE
static final String CLSID_SAS_POOLED_WORKSPACEThe class ID for a Pooled Workspace Server: 620963ee-32bf-4128-bf5f-4b0df8ff90eb- See Also:
-
CLASSID_MESSAGEQUEUE_JMS
static final String CLASSID_MESSAGEQUEUE_JMSThe class ID for a JMS Message Queue Manager: "MessageQueue.JMS"- See Also:
-
-
Method Details
-
getNamespace
String getNamespace() throws RemoteExceptionReturns 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
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
Returns the foundation repository for the connected metadata server. ACMetadataobject is returned. If a foundation repository cannot be found, a null is returned.- Returns:
- the foundation repository as a CMetadata object
- Throws:
MdExceptionRemoteException
-
getRepositories
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 errorsRemoteException
-
getFullObject
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, andOMI_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) inmeta- the metadata object to query- Returns:
- the metadata object
- Throws:
MdExceptionRemoteException
-
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, andOMI_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) inobjectType- the metadata type of the objectobjectID- the object id- Returns:
- the metadata object
- Throws:
MdExceptionRemoteException
-
getFullObjects
List getFullObjects(MdObjectStore store, Map<String, String> objectMap) throws MdException, RemoteExceptionPerforms 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, andOMI_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) inobjectMap- 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:
MdExceptionRemoteException
-
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 forstrFQID- Unique ID of the metadata object we are fetching the data forattributeName- 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 errorsRemoteException
-
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 forattributes- - 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 errorsRemoteException
-
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 forinSimpleAttr- - 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 objectiOptions- - 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 errorsRemoteException
-
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 forinSimpleAttr- - 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 objectiOptions- - 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 errorsRemoteException
-
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 forinSimpleAttr- - 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 objectiOptions- - 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 errorsRemoteException
-
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 forinSimpleAttr- - 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 objectiOptions- - 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 errorsRemoteException
-
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 indoc- the xml document containing the metadata to createstate- 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 ininXML- the xml containing the metadata to createstate- 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 instream- The input stream containing the xml to be parsedstate- 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- CMetadatasimpleNodeMap- org.w3c.dom.NamedNodeMapcomplexNodeList- org.w3c.dom.NodeList- Returns:
- CMetadata object that is populated
- Throws:
MdException- in the case of any server errorsRemoteException
-
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- CMetadatasimpleNodeMap- org.w3c.dom.NamedNodeMapcomplexNodeList- org.w3c.dom.NodeList- Returns:
- CMetadata object that is populated
- Throws:
MdException- in the case of any server errorsRemoteException
-
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- CMetadatasimpleNodeMap- org.w3c.dom.NamedNodeMapcomplexNodeList- org.w3c.dom.NodeList- Returns:
- CMetadata object that is populated
- Throws:
MdException- in the case of any server errorsRemoteException
-
doSimple
CMetadata doSimple(CMetadata thisObject, NamedNodeMap thisNodeMap) throws MdException, RemoteException Calls 'set' methods for given object for nodes in given NodeMap- Parameters:
thisObject- CMetadatathisNodeMap- org.w3c.dom.NamedNodeMap- Returns:
- CMetadata object that is populated with attributes
- Throws:
MdException- in the case of any errors in reflection setting valuesRemoteException
-
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- CMetadataoutComplexNames- ListoutComplexObjects- 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 euserfolderName- 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 inuserName- the name of the userfolderName- the type of folder to return. Valid values are:template- the template to apply to this folderflags-- Returns:
- returns a Tree metadata object representing a user's home folder.
- Throws:
MdExceptionRemoteException
-
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 inuserName- the name of the userfolderName- the type of folder to return. Valid values are:template- the template to apply to this folderflags-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:
MdExceptionRemoteException
-
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 inincludeType- 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:
MdExceptionRemoteException
-
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 inidentityName- the name of the user. A value ofnullwill 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:
MdExceptionIllegalArgumentException- if responsibility is not providedRemoteException
-
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 inidentityName- the name of the user. A value ofnullwill 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:
MdExceptionIllegalArgumentException- if responsibility is not providedRemoteException
-
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 idobjectType- the metadata object typexmlSelect- 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:
MdExceptionRemoteException
-
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 errorsRemoteException
-
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 errorsRemoteException
-
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 errorsRemoteException
-
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 errorsRemoteException
-
getMetadataObjects
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 errorsRemoteException
-
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 errorsRemoteException
-
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 inobjectMap- 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 objectsflags- 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:
MdExceptionRemoteException
-
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 inobjectMap- 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 objectsflags- 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 overriddendoNotOverrideAttrs- if true, already set attributes will not be overridden- Returns:
- a List of CMetadata objects
- Throws:
MdExceptionRemoteException
-
getMetadata
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 serverRemoteException
-
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 errorsRemoteException
-
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 errorsRemoteException
-
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 errorsRemoteException
-
getMetadataNoCache
@Deprecated Map getMetadataNoCache(String strType, String strFQID, String strOptions, int iFlags) throws MdException, RemoteException Deprecated.This method has been replaced bygetFastMetadata(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 objectstrFQID- the metadata object idstrOptions- the xml options (including any templates or search statements)iFlags- OMI server GetMetadata flags- Returns:
- a map of the object
- Throws:
MdExceptionRemoteException
-
getMetadataNoCache
@Deprecated List getMetadataNoCache(Map objectMap, String strOptions, int iFlags) throws MdException, RemoteException Deprecated.This method has been replaced bygetFastMetadata(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:
MdExceptionRemoteException
-
getMetadataObjectsNoCache
@Deprecated List getMetadataObjectsNoCache(String strType, String strReposId, String strOptions, int iFlags) throws MdException, RemoteException Deprecated.This method has been replaced bygetFastMetadataObjects(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 objectstrReposId- the repository idstrOptions- the xml options (including any templates or search statements)iFlags- OMI server GetMetadata flags- Returns:
- a list containing map objects
- Throws:
MdExceptionRemoteException
-
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 returnedFastMetadataobject. 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 objectfqid- the metadata object idoptions- GetMetadata options; typically used to specify a templateflags- GetMetadata flags- Returns:
- a lightweight metadata object descriptor
- Throws:
MdExceptionRemoteException
-
getFastMetadata
List<FastMetadata> getFastMetadata(Map<String, String> objects, String options, int flags) throws MdException, RemoteExceptionReturns lightweight descriptions of metadata objects. Attributes and associations of the metadata objects are available from the returnedFastMetadataobjects. 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 aMapusing object fqid as keys and metadata object types as values.options- GetMetadata options; typically used to specify a templateflags- GetMetadata flags- Returns:
- a list of lightweight metadata object descriptors
- Throws:
MdExceptionRemoteException
-
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 returnedFastMetadataobjects. 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 objectreposId- the repository idoptions- GetMetadataObjects options; typically used to specify XMLSelect search criteria and templatesflags- GetMetadataObjects flags- Returns:
- a list of lightweight metadata object descriptors
- Throws:
MdExceptionRemoteException
-
DoRequest
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 errorsRemoteException
-
DoRequest
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 errorsRemoteException
-
DoRequestNoReturn
Performs a DoRequest- Parameters:
inXML- String input for DoRequest Call- Throws:
MdException- in the case of any server errorsRemoteException
-
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
Updates the object ids on the local server stores to reflect the new id on the server.- Parameters:
inDoc- org.w3c.dom.DocumentoutDoc- 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 RemoteExceptionCreates 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 RemoteExceptionCreates 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_factoryvalues- - 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 refreshrefreshAssocsSetByServerOnly- refresh associations that have been set by the server onlyrefreshAll- 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 methodXMLUtil.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 updatingattributes- - List of Strings containing the names of the attributes to fetch NOTE: CASE SENSITIVE! USE THE STATIC VARS in m_factoryvalues- - 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 updatingattributes- - List of Strings containing the names of the attributes to fetch NOTE: CASE SENSITIVE! USE THE STATIC VARS in m_factoryvalues- - List of String objects containing the attribute values to be sent to the server- Throws:
MdException- in the case of any server errorsRemoteException
-
updateMetadataSimple
- Throws:
MdExceptionRemoteException
-
updateMetadata
- Throws:
MdExceptionRemoteException
-
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 errorsRemoteException
-
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 errorsRemoteException
-
getTypes
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 errorsRemoteException
-
getTypeProperties
void getTypeProperties(String objectType, Map<String, Map<String, throws MdException, RemoteExceptionString>> attributeMap, Map<String, Map<String, String>> associationMap) 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 typeattributeMap- map of attributes to be returnedassociationMap- map of associations to be returnedconnectionHandle- The IOMI interface to use to process methods.- Throws:
MdExceptionRemoteException
-
getSubTypes
List<String> getSubTypes(String objectType, boolean includeDescendants) throws MdException, RemoteException Gets the subtypes specific metadata object type.- Parameters:
objectType- the metadata object typeincludeDescendants- if true, thye method eturns all subtypes along with all of their descendants.- Throws:
MdExceptionRemoteException
-
getAssociatedObject
CMetadata getAssociatedObject(CMetadata object, String strAssociation, String strTemplate) throws MdException, RemoteException Get the single metatdata object from the given associtation.- Parameters:
object- CMetadatastrAssociation- 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 errorsRemoteException
-
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- CMetadatastrAssociation- 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 errorsRemoteException
-
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 assocaitionstrAssociation- 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 errorsRemoteException
-
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 assocaitionstrAssociation- 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 errorsRemoteException
-
getAttribute
String getAttribute(String strAttribute, NamedNodeMap childNodeMap) throws RemoteException Retrieve the requested attribute from the XML dom object.- Parameters:
strAttribute- StringchildNodeMap- org.w3c.dom.NamedNodeMap- Returns:
- Null if no value defined, or the String value of the attribute.
- Throws:
RemoteException
-
parseXML
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 exceptionsRemoteException
-
parseXML
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 errorsRemoteException
-
parseXML
Document parseXML(URL xmlDocument, Map<String, Boolean> features) throws MdException, RemoteExceptionroutine to parse a passed in xml URL and return a dom document- Parameters:
xmlDocument- URL is the string input to pass to the parserfeatures- - 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 errorsRemoteException
-
formatXML
String formatXML(String original) throws RemoteException Note: As of 9.4, callers can now use the static methodXMLUtil.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 deletetemplate- the template to process when deleting the public object- Returns:
- list of object ids (Strings) that were deleted
- Throws:
MdExceptionRemoteException
-
deleteMetadataObject
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 errorsRemoteException
-
deleteMetadataObject
List<String> deleteMetadataObject(String objectType, String objectID) throws MdException, RemoteException Deletes a metadata object and all of its dependencies- Parameters:
objectType- the metadata typeobjectID- the metadata object id- Returns:
- list of object ids that were deleted
- Throws:
MdExceptionRemoteException
-
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 typeobjectID- the metadata object idtemplate- the template to process when deleting the public object- Returns:
- list of object ids that were deleted
- Throws:
MdExceptionRemoteException
-
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 errorsRemoteException
-
deleteMetadataObjects
List<String> deleteMetadataObjects(Map<String, String> inObjects) throws MdException, RemoteExceptionDelete 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 errorsRemoteException
-
ApplyXML
This routine is used by metadata importers to filter their XML to handle XML updates.- Parameters:
inXML- String containing the XML inside of thetags 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 errorsRemoteException
-
getIdentity
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:
MdExceptionRemoteException
-
getFoundationReposID
Returns the ID of the Foundation repository- Returns:
- a string containing the ID
- Throws:
MdExceptionRemoteException
-