Teamcenter C++ API Reference  2312
Static Public Member Functions | List of all members
lis0lisfmwrk::LisfmwrkUtils Class Reference

#include <LisfmwrkUtils.hxx>

Static Public Member Functions

static int createHttpRequestInput (const std::string &url, const RequestMethod method, const std::string &postData, const tag_t userAuthentication, const ResponseFormat &format, HttpRequestInputS *requestInput)
 
static int findAllPrimaryObjForRemoteObj (const tag_t serviceProviderType, const std::string &remoteObjectType, std::vector< tag_t > &supportedPrimaryObjTypes)
 
static int findExactMatchOfPrimaryObjectList (const tag_t primaryObjType, const std::vector< tag_t > &supportedPrimaryObjTypes, std::vector< tag_t > &exactListOfprimaryObjTypes)
 
static int getAuthorizationURLFromRootServices (const std::string &responseString, std::string &accessTokenUrl, std::string &requestTokenUrl, std::string &userAuthorizaitonUrl, std::string &consumerKeyUrl)
 
static int getOAuthAuthorizationURL (const tag_t serviceProvider, char **userAuthorizationUrl)
 
static int getRelationTypes (const std::string &uidContextObj, const std::string &remoteObjType, const std::string &uidServiceProvider, std::vector< std::string > &relationNames)
 
static int getRelationTypesTags (const std::string &uidContextObj, const std::string &remoteObjType, const std::string &uidServiceProvider, std::vector< tag_t > &relationNames)
 
static int getSSOParamsFromRootsvc (const std::string &responseString, std::string &ssoAppId, std::string &ssoSvcUrl)
 
static int parseCatalogContent (const std::string &responseContent, std::vector< ServiceProviderInfo > &providerInfoList)
 
static int parseResourceContent (const std::string &responseContent, LIS_resource_info_t &resourceInfo)
 
static int parseRootServiceContent (const std::string &responseContent, LIS_rootservice_response_extend_t &responseInfo)
 
static int parseServiceContent (const std::string &responseContent, LIS_service_info_extend_t &serviceInfo)
 
static int queryAllRelationTypeRevise (const tag_t serviceProviderType, const tag_t primaryObjType, const std::string &remoteObjectType, std::vector< tag_t > &relationNames, bool &isRelTypeExist)
 
static int queryAllRelationTypeRevise2 (const tag_t serviceProviderType, const tag_t primaryObjType, const std::string &remoteObjectType, std::vector< tag_t > &relationNames)
 
static int requestHttps (const bool isRequestTokenUrl, const HttpRequestInputS &requestInput, std::string &responseString, long &responseCode, std::string &eTagString, int getResponseHeader=0)
 
static int requestHttps (const HttpRequestInputS &requestInput, std::string &responseString)
 
static int requestHttps (const HttpRequestInputS &requestInput, std::string &responseString, long &responseCode, std::string &eTagString, int getResponseHeader=0)
 
static int validateLicense (const char *licensePackage)
 

Detailed Description

Definition at line 151 of file LisfmwrkUtils.hxx.

Member Function Documentation

static int lis0lisfmwrk::LisfmwrkUtils::createHttpRequestInput ( const std::string &  url,
const RequestMethod  method,
const std::string &  postData,
const tag_t  userAuthentication,
const ResponseFormat format,
HttpRequestInputS requestInput 
)
static

Creates request input information from a given HTTP URL.

Returns
  • #ITK_ok on success
  • LIS0LISFMWRK_url_use_wrongformat if url provided URL is not properly formatted.
  • #LIS0LISFMWRK_input_request_body_empty if the request body in postData is invalid.
  • #CXPOM_invalid_tag if userAuthentication is not a valid User.
Parameters
url(I) The HTTP URL
method(I) The request method type
postData(I) The request body of POST request
userAuthentication(I) The User Authentication
format(I) The response format for a given URL
requestInput(O) The output request by a given HTTP URL
static int lis0lisfmwrk::LisfmwrkUtils::findAllPrimaryObjForRemoteObj ( const tag_t  serviceProviderType,
const std::string &  remoteObjectType,
std::vector< tag_t > &  supportedPrimaryObjTypes 
)
static

Retrieves the list of supported primary objects from a given service provider type and remote object type.

Returns
  • #ITK_ok on success
  • #CXPOM_invalid_tag if serviceProvider is invalid type.
  • #CXPOM_invalid_tag if remoteObject is invalid type.
Parameters
serviceProviderType(I) The service provider
remoteObjectType(I) The remote object
supportedPrimaryObjTypes(O) The list of supported primary object
static int lis0lisfmwrk::LisfmwrkUtils::findExactMatchOfPrimaryObjectList ( const tag_t  primaryObjType,
const std::vector< tag_t > &  supportedPrimaryObjTypes,
std::vector< tag_t > &  exactListOfprimaryObjTypes 
)
static

Retrieves the list of matched primary objects from a given primary type.

Returns
  • #ITK_ok on success
  • #CXPOM_invalid_tag if primaryObjType is invalid type.
  • #CXPOM_invalid_tag if supportedPrimaryObjTypes are invalid types.
Parameters
primaryObjType(I) The type tag of primary object
supportedPrimaryObjTypes(I) The list of supported primary object types
exactListOfprimaryObjTypes(O) The list of exact primary object types
static int lis0lisfmwrk::LisfmwrkUtils::getAuthorizationURLFromRootServices ( const std::string &  responseString,
std::string &  accessTokenUrl,
std::string &  requestTokenUrl,
std::string &  userAuthorizaitonUrl,
std::string &  consumerKeyUrl 
)
static

Retrieves Access,Request and Auhtorization Tokens Url parameters from the rootservice response.

Returns
  • #ITK_ok on success
  • #LIS0LISFMWRK_invalid_http_response if responseString has invalid structure.
(0) ConsumerKeyUrl
Parameters
responseString(I) Rootservice response string
accessTokenUrl(0) AccessTokenUrl
requestTokenUrl(0) RequestTokenUrl
userAuthorizaitonUrl(0) UserAuthorizationUrl
static int lis0lisfmwrk::LisfmwrkUtils::getOAuthAuthorizationURL ( const tag_t  serviceProvider,
char **  userAuthorizationUrl 
)
static

Retrieves the User Authorization URL from a given Service Provider.

Returns
  • #ITK_ok on success
  • #CXPOM_invalid_tag if serviceProvider is invalid type.
Parameters
serviceProvider(I) The service provider tag
userAuthorizationUrl(O) The user authorization URL
static int lis0lisfmwrk::LisfmwrkUtils::getRelationTypes ( const std::string &  uidContextObj,
const std::string &  remoteObjType,
const std::string &  uidServiceProvider,
std::vector< std::string > &  relationNames 
)
static

Retrieves the list of Relations from a given Context Object and Remote Object. – add one more

Returns
  • #ITK_ok on success
  • #CXPOM_invalid_tag if uidContextObject is invalid UID.
  • #CXPOM_invalid_tag if remoteObjectType is invalid type.
  • #CXPOM_invalid_tag if uidServiceProvider is invalid UID.
Parameters
uidContextObj(I) The UID of the context object
remoteObjType(I) The tag of the remote object
uidServiceProvider(I) The UID of the service provider
relationNames(O) The list of relation names
static int lis0lisfmwrk::LisfmwrkUtils::getRelationTypesTags ( const std::string &  uidContextObj,
const std::string &  remoteObjType,
const std::string &  uidServiceProvider,
std::vector< tag_t > &  relationNames 
)
static

Retrieves the list of Relation Types from a given context object UID, remote object and service provider UID.

Returns
  • #ITK_ok on success
  • #CXPOM_invalid_tag if uidContextObject is invalid UID.
  • #CXPOM_invalid_tag if remoteObjectType is invalid type.
  • #CXPOM_invalid_tag if uidServiceProvider is invalid UID.
Parameters
uidContextObj(I) The UID of the context object
remoteObjType(I) The remote object type
uidServiceProvider(I) The UID of the Service Provider
relationNames(O) The list of relation names
static int lis0lisfmwrk::LisfmwrkUtils::getSSOParamsFromRootsvc ( const std::string &  responseString,
std::string &  ssoAppId,
std::string &  ssoSvcUrl 
)
static

Retrieves SSO parameters from the rootservice response.

Returns
  • #ITK_ok on success
  • #LIS0LISFMWRK_invalid_http_response if responseString has invalid structure.
Parameters
responseString(I) Rootservice response string.
ssoAppId(O) AppID parameter.
ssoSvcUrl(O) Service URL parameter.
static int lis0lisfmwrk::LisfmwrkUtils::parseCatalogContent ( const std::string &  responseContent,
std::vector< ServiceProviderInfo > &  providerInfoList 
)
static

Parses and retrieves the information of catalog services from a given response content.

Returns
  • #ITK_ok on success
  • #LIS0LISFMWRK_invalid_http_response if responseContent is invalid HTTP response.
    Probably it is not a good OSLC provider.
Parameters
responseContent(I) The response content of catalog services
providerInfoList(O) The information of catalog services
static int lis0lisfmwrk::LisfmwrkUtils::parseResourceContent ( const std::string &  responseContent,
LIS_resource_info_t resourceInfo 
)
static

Parse and Retrives the information of Resource by a given Response Content.

Returns
  • #ITK_ok on success
  • #LIS0LISFMWRK_invalid_http_response if responseContent is invalid HTTP response.
    Probably it is not a good OSLC provider.
Parameters
responseContent(I) The response content of ResourceShape.
resourceInfo(O) The information of resource.
static int lis0lisfmwrk::LisfmwrkUtils::parseRootServiceContent ( const std::string &  responseContent,
LIS_rootservice_response_extend_t responseInfo 
)
static

Retrieves the list of service provider catalog and authentication information from a given response content.

Returns
  • #ITK_ok on success
  • #LIS0LISFMWRK_invalid_http_response if responseContent is invalid HTTP response.
    Probably it is not a good OSLC ( Open Services for Lifecycle Collabration ) provider.
Parameters
responseContent(I) The response content of root services
responseInfo(O) The list of service provider catalogs and authentication information
static int lis0lisfmwrk::LisfmwrkUtils::parseServiceContent ( const std::string &  responseContent,
LIS_service_info_extend_t serviceInfo 
)
static

Parses and retrieves the list of dialogs of services from a given response content.

Returns
  • #ITK_ok on success
  • #LIS0LISFMWRK_invalid_http_response if responseContent is invalid HTTP response.
    Probably it is not a good OSLC provider.
Parameters
responseContent(I) The response content of services
serviceInfo(O) The list of dialogs of a given services
static int lis0lisfmwrk::LisfmwrkUtils::queryAllRelationTypeRevise ( const tag_t  serviceProviderType,
const tag_t  primaryObjType,
const std::string &  remoteObjectType,
std::vector< tag_t > &  relationNames,
bool &  isRelTypeExist 
)
static

Checks that the relation names exist for a given service provider, primary and remote objects.
It also retrieves the list of Relation types.

Returns
  • #ITK_ok on success
  • #CXPOM_invalid_tag if serviceProviderType is invalid type.
  • #CXPOM_invalid_tag if primaryObjType is invalid type.
  • #CXPOM_invalid_tag if remoteObjectType is invalid type.
Parameters
serviceProviderType(I) The service provider type
primaryObjType(I) The primary object type
remoteObjectType(I) The remote object type
relationNames(O) The list of relation
isRelTypeExist(O) The relation type exist
static int lis0lisfmwrk::LisfmwrkUtils::queryAllRelationTypeRevise2 ( const tag_t  serviceProviderType,
const tag_t  primaryObjType,
const std::string &  remoteObjectType,
std::vector< tag_t > &  relationNames 
)
static

Retrieves the list of relations from a given service provider, primary and remote objects.

Returns
  • #ITK_ok on success
  • #CXPOM_invalid_tag if serviceProviderType is invalid type.
  • #CXPOM_invalid_tag if primaryObjType is invalid type.
  • #CXPOM_invalid_tag if remoteObjectType is invalid type.
Parameters
serviceProviderType(I) The service provider type
primaryObjType(I) The primary object type
remoteObjectType(I) The remote object type
relationNames(O) The list of relation names
static int lis0lisfmwrk::LisfmwrkUtils::requestHttps ( const bool  isRequestTokenUrl,
const HttpRequestInputS requestInput,
std::string &  responseString,
long &  responseCode,
std::string &  eTagString,
int  getResponseHeader = 0 
)
static

Retrieves the response and timestamp of authorization by a given HTTP connection URL.

Returns
  • #ITK_ok on success
  • #LIS0LISFMWRK_url_not_authorized if isRequestTokenUrl url cannot be accessed because of authorization issues.
  • #LIS0LISFMWRK_url_cannot_resolve_host if the host cannot be extracted from isRequestTokenUrl.
    Please check that the provided URL is correct
  • #LIS0LISFMWRK_url_use_wrongformat if isRequestTokenUrl is not properly formatted.
  • #LIS0LISFMWRK_input_request_body_empty if the request body in requestInput is invalid.
Parameters
isRequestTokenUrl(I) Specifies if this HTTP Request is authorizised.
requestInput(I) The input HTTP URL
responseString(O) The response of requested HTPP URL
responseCode(O) Status of request URL
eTagString(O) TimeStamp of authorization
getResponseHeader(I) Response header with etag
static int lis0lisfmwrk::LisfmwrkUtils::requestHttps ( const HttpRequestInputS requestInput,
std::string &  responseString 
)
static

Retrieves the response from a given HTTP Request Input .

Returns
  • #ITK_ok on success
  • #LIS0LISFMWRK_input_request_body_empty if the request body in requestInput is invalid.
Parameters
requestInput(I) The HTTP request.
responseString(O) The response of HTTP request.
static int lis0lisfmwrk::LisfmwrkUtils::requestHttps ( const HttpRequestInputS requestInput,
std::string &  responseString,
long &  responseCode,
std::string &  eTagString,
int  getResponseHeader = 0 
)
static

Requests an https connection and outputs the response code along with with its timestamp.

Returns
  • #ITK_ok on success
  • #LIS0LISFMWRK_input_request_body_empty if the request body in requestInput is invalid.
Parameters
requestInput(I) The HTTP Request
responseString(O) The response of requested HTTP
responseCode(O) The response Code of Requested HTTP
eTagString(O) TimeStamp of request
getResponseHeader(I) The response header with etag
static int lis0lisfmwrk::LisfmwrkUtils::validateLicense ( const char *  licensePackage)
static

Validates the License Feature Package

Returns
  • #ITK_ok on success
  • #LIS0LISFMWRK_validate_license_failed if licensePackage is not available.
    Please contact the system administrator.
Parameters
licensePackage(I) The License Feature Package

The documentation for this class was generated from the following file: