8 Using the COM API for Integration

This chapter describes Microsoft Component Object Model (COM) integration. Oracle Content Server utilizes a COM-based API, which provides the capability to call functionality from within a COM environment.

This chapter includes the following sections:

8.1 Introduction to COM Integration

You can use a COM interface to integrate Content Management with Microsoft environments and applications. An ActiveX control and an OCX component are provided as interface options to gain access to the content and content management functions within Oracle Content Server. Additionally, you can communicate with ODMA-aware applications through a COM interface.

Performance Tip:

Calling services from a command line on the local server using the IdcCommandUX ActiveX Command Utility provides faster execution of commands than calling services remotely using the IntradocClient OCX component.

8.2 ActiveX Interface

The IdcCommandUX ActiveX Command Utility is an ActiveX control that enables a program to execute Oracle Content Server services and retrieve file-path information. The control serves as a COM wrapper for the standard IdcCommand services used by Oracle Content Server. IdcCommandUX works with multibyte languages.

Note:

A Visual Basic or Visual C++ development environment is required for using IdcCommandUX.

When executing services using the IdcCommandUX ActiveX Command Utility, keep these items in mind:

  • IdcCommandUX must be initialized with a valid user and the intradoc.cfg directory.

    Outside of the init and connection managing methods, all methods use the serialized HDA format for communication.

  • IdcCommandUX attempts to establish a connection to a running server.

    If a connection is not made, IdcCommandUX fails.

  • The returned serialized HDA format string contains information about the success or failure of the command.

    The StatusCode value will be negative if a failure occurs, and the StatusMessage value will indicate the error.

The following subsections describe how to configure and use IdcCommandUX:

8.2.1 Setting Up IdcCommandUX

To set up IdcCommandUX, run the IdcCommandUX setup file, which is stored in extras/IdcCommandUX/setup.exe in the media.

8.2.2 Calling IdcCommandUX from a Visual Basic Environment

To call IdcCommandUX from a Visual Basic environment:

  1. Add IdcCommandUX as a control to the Visual Basic project.

  2. Create the control as follows:

    Set idcCmd=CreateObject("Idc.CommandUX")
    
  3. Define and initialize the connection by calling the init (deprecated) function and defining the UserName and DomainDir parameters:

    Dim idcCmd
    idcCmd.init("UserName", "DomainDir")
    
    • The UserName parameter specifies a user that has permission to execute the services being called by IdcCommandUX.

    • The DomainDir parameter specifies the complete path to the Oracle Content Server directory that contains the intradoc.cfg configuration file.

    Example:

    Dim idcCmd
    idcCmd.initRemote("sysadmin", "c:\domain\bin")
    

8.2.3 Calling IdcCommandUX from a Visual C++ Environment

To call IdcCommandUX from a Visual C++ environment:

  1. Add the IdcCommandUX control to the project.

  2. Call the desired IdcCommandUX class.

8.2.4 Executing Services

When executing services using IdcCommandUX, keep these points in mind:

  • IdcCommandUX must be initialized with a valid user name and the location of the intradoc.cfg file.

  • Functions that must use HDA format for communication include computeWebFilePath, computeNativeFilePath, and computeURL. For more information about HDA formats, see Chapter 3, "Working with Standard, Server, and Custom Components."

  • executeCommand can take HDA format or SOAP commands. To use SOAP, you must use the initRemote function instead of the init (deprecated) function.

  • IdcCommandUX attempts to establish a connection to a running Oracle Content Server instance. If a connection is not made, it fails.

  • The returned HDA-format string contains information about the success or failure of the command, using the StatusCode and StatusMessage variables.

    • If the command is successful, StatusCode is zero (0), and StatusMessage is a login message ("You are logged in as sysadmin").

    • If the command fails, StatusCode is negative (-1), and StatusMessage is an error message.

    For more information, see the Oracle Fusion Middleware Idoc Script Reference Guide.

    For information about using the Launcher (a native C++ application that allows a Java program to start as a Windows service), see Section 7.6, "Using the Launcher."

8.2.5 Calling IdcCommandUX from an Active Server Page (ASP)

Calling IdcCommandUX from an Active Server Page (ASP) consists of these steps:

  1. Creating the COM Object

  2. Initializing the Connection

  3. Defining Services and Parameters

  4. Referencing Custom Resources

  5. Executing the Service

  6. Retrieving Results

The following examples show how to do these steps.

Example 8-1 SOAP Example

In this SOAP sample:

  • The GET_SEARCH_RESULTS service is called.

  • The parameters for the service are defined using field/value pairs:

    • The ResultCount parameter sets the number of returned results to 5.

    • The SortField parameter sorts the returned results by release date.

    • The SortOrder parameter orders the returned results in descending order.

    • The QueryText parameter defines the query expression as "Content Type matches research."

The initRemote function must be used and isSOAP must be set to TRUE for a SOAP-formatted request, which is shown in the following example.

' Create COM object
Set idcCmd = CreateObject("Idc.CommandUX")
' Initialize the connection to the server
x = idcCmd.initRemote("/domain/ ", "sysadmin",
"socket:localhost:4444", true)
' Create the SOAP envelope
cmd = cmd & "<?xml version='1.0' ecoding='UTF-8'?>" + Chr(10)
cmd = cmd & "<SOAP-ENV:Envelope xmlns:SOAP-ENV=""http://
schemas.xmlsoap.org/soap/envelope/"">" + Chr(10)
cmd = cmd & "<SOAP-ENV:Body>" + Chr(10)
' Define the service
cmd = cmd & "<idc:service xmlns:idc=""http://www.oracle.com/
IdcService/"/"" + Chr(10)
cmd = cmd & "IdcService=""GET_SEARCH_RESULTS"">" + Chr(10)
' Define the service parameters
cmd = cmd & "<idc:document>" + Chr(10)
cmd = cmd & "<idc:field name=""NoHttpHeaders"">1</idc:field>" +
Chr(10)
cmd = cmd & "<idc:field name=""ClientEncoding"">UTF8</idc:field>"
+ Chr(10)
cmd = cmd & "<idc:field name=""QueryText"">dDocType
&lt;matches&gt; research</idc:field>" + Chr(10)
cmd = cmd & "<idc:field name=""ResultCount"">5</idc:field>" +
Chr(10)
cmd = cmd & "<idc:field name=""SortOrder"">Desc</idc:field>" +
Chr(10)
cmd = cmd & "<idc:field name=""SortField"">dInDate</idc:field>" +
Chr(10)
cmd = cmd & "</idc:document>" + Chr(10)
cmd = cmd & "</idc:service>" + Chr(10)
cmd = cmd & "</SOAP-ENV:Body>" + Chr(10)
cmd = cmd & "</SOAP-ENV:Envelope>" + Chr(10)
' End SOAP envelope and execute the command
results= idcCmd.executeCommand(cmd)
' Retrieve results
Response.Write(results)

Example 8-2 HDA Sample

' Create COM object
Set idcCmd = CreateObject("Idc.CommandUX")
' Initialize the connection to the server
x = idcCmd.initRemote("/domain/", "socket:localhost:4444", "sysadmin", true)
' Define the service
cmd = "@Properties LocalData" + Chr(10)
cmd = cmd + "IdcService=GET_SEARCH_RESULTS" + Chr(10)
' Define the service parameters
cmd = cmd + "ResultCount=5" + Chr(10)
cmd = cmd + "SortField=dInDate" + Chr(10)
cmd = cmd + "SortOrder=Desc" + Chr(10)
cmd = cmd + "QueryText=dDocType=research" + Chr(10)
' Reference a custom component
cmd = cmd + "MergeInclude=ASP_SearchResults" + Chr(10)
cmd = cmd + "ClassStyle=home-spotlight" + Chr(10)
cmd = cmd + "@end" + Chr(10)
' Execute the command
results = idcCmd.executeCommand(cmd)
' Retrieve results
Response.Write(results)

' Create COM object
Set idcCmd = CreateObject("Idc.CommandUX")

Example 8-3 Creating the COM Object

The first line of code creates the COM object:

' Create COM object
Set idcCmd = CreateObject("Idc.CommandUX")

Example 8-4 Initializing the Connection

To initialize the connection to Oracle Content Server, call the initRemote function:

' Initialize the connection to the server
x = idcCmd.initRemote("/domain/", "socket:localhost:4444", "sysadmin", false)

This example uses these parameters:

  • The HttpWebRoot parameter specifies a value for the web root as defined in the config/config.cfg file.

  • The idcReference parameter specifies a string containing information about connection to the Oracle Content Server instance. This is specified as "socket" followed by the IntradocServerHostName value and the IntradocServer Port address.

  • The value of theidcUser parameter, "sysadmin", specifies the user who is connecting to Oracle Content Server.

  • The isSoap parameter is a Boolean value indicating if the request is in SOAP XML format or HDA format. In this case, it is false because it is in HDA format.

For information about all the parameters, see Section 8.3.11, "initRemote."

Example 8-5 Defining Services and Parameters

To define the service and parameters, build an HDA-formatted string that contains with the following lines:

@Properties LocalData
service
parameters
@end

The required and optional parameters vary depending on the service being called. For more information, see the Oracle Fusion Middleware Services Reference Guide for Universal Content Management.

In this example, the @end string is created after the optional custom component reference. For more information, see Section 8.2.6, "Formatting with a Resource Include."

Example 8-6 Referencing Custom Resources

You can reference custom resources and pass parameters to a resource include from your ASP as follows:

  • To reference a custom resource include, set the MergeInclude parameter to the name of the include.

    In this example, the ASP_SearchResults include is used to format the output as HTML rather than a ResultSet. For more information, see Section 8.2.6, "Formatting with a Resource Include."

  • To pass a parameter to a resource include, set the variable as name/value pair.

    In this example, the ClassStyle variable with a value of home-spotlight is available to the ASP_SearchResults include.

    Note:

    The @end code is required to close the @Properties LocalData section in an HDA-formatted string. For more information, see Section 8.2.5, "Defining Services and Parameters."
    ' Reference a custom component
    cmd = cmd + "MergeInclude=ASP_SearchResults" + Chr(10)
    cmd = cmd + "ClassStyle=home-spotlight" + Chr(10)
    cmd = cmd + "@end" + Chr(10)
    

Example 8-7 Executing the Service

To execute the service, call the executeCommand method.

After executing the service, you could use the closeServerConnection method to make sure that the connection is closed.

' Execute the service
results = idcCmd.executeCommand(cmd)

Example 8-8 Retrieving Results

The results can either be formatted HTML or a ResultSet.

In this example, the result of the service call is formatted HTML.

' Retrieve results
Response.Write(results)

8.2.6 Formatting with a Resource Include

This section provides an example of a custom resource include that is used to format the output of a service executed by IdcCommandUX.

In the example described in Section 8.2.5, "Calling IdcCommandUX from an Active Server Page (ASP),", the ASP_SearchResults resource include is used to format the output of a search function and return HTML rather than a ResultSet:

<@dynamichtml ASP_SearchResults@>
<table border=0>
    <$loop SearchResults$>
    <tr class="site-default">
    <td class="<$ClassStyle$>">
    <a href="<$URL$>" target=new><$dDocTitle$></a><br>
    <$xAbstract$>
    </td>
    </tr>
    <$endloop$>
</table>
<@end@>
  • The <@dynamichtml ASP_SearchResults@> entry defines the name of the resource include. The <@end@> entry ends the resource definition.

  • The code defined between the <$loop SearchResults$> and <$endloop$> entries is executed for each content item in the SearchResults ResultSet, which includes all documents that matched the query defined for the GET_SEARCH_RESULTS service.

  • The <td class="<$ClassStyle$>"> entry displays the value of the <$ClassStyle$> Idoc Script variable. In this example, the ClassStyle value was passed in on the API call.

  • The <a href="<$URL$>" target=new><$dDocTitle$></a> entry displays the Title of the current content item as a link to the file.

  • The <$xAbstract$> entry displays the Abstract value for the current content item.

The HTML generated and returned to the Active Server Page from this resource include would have this format:

<table border=0>
<tr class="site-default">
<td class="home-spotlight">
<a href="/domain/dir/dir/xyz.htm"  target=new>Article 1</a><br>
This is the abstract for Article 1
</td>
<td class="home-spotlight">
<a href="/domain/dir/dir/xyz.htm"  target=new>Article 2</a><br>
This is the abstract for Article 2
</td>
<td class="home-spotlight">
<a href="/domain/dir/dir/xyz.htm"  target=new>Article 3</a><br>
This is the abstract for Article 3
</td>
<td class="home-spotlight">
<a href="/domain/dir/dir/xyz.htm"  target=new>Article 4</a><br>
This is the abstract for Article 4
</td>
<td class="home-spotlight">
<a href="/domain/dir/dir/xyz.htm"  target=new>Article 5</a><br>
This is the abstract for Article 5
</td>
</tr>
</table>

Displaying this HTML page in a browser would look like the following example.

A depiction of the page in a browser.

8.2.7 Connecting to Oracle Content Server from a Remote System

This section describes how to establish a connection to an Oracle Content Server instance from a remote system using IdcCommandUX from an Active Server Page. These steps are required:

  1. Creating Variables

  2. Creating a COM Object

  3. Initializing the Connection

  4. Returning the Connection Status

  5. Defining the Service and Parameters

  6. Executing the Service

  7. Retrieving Results

The following examples show how to do these steps.

Example 8-9 Coding the ASP Page

This example calls the CHECKIN_UNIVERSAL service to provide a check-in function from a remote system. This code does not check for an error condition.

' Create variables
Dim idccommand, sConnect, str
' Create COM object
Set idccommand = Server.CreateObject("idc.CommandUX")
' Initialize the connection to the server
x = idccommand.initRemote ("/domain/ ", "sysadmin", "socket:localhost:4444", false)
' Return connection status (optional)
sConnect = idccommand.connectToServer
if sConnect then
Response.Write "Connected"
else
Response.Write "Not Connected" 
end if  
str = "@Properties LocalData" & vbcrlf
' Define the service
str = str + "IdcService=" & "CHECKIN_UNIVERSAL" & vbcrlf
' Define the service parameters
str = str + "doFileCopy=1" & vbcrlf
str = str + "dDocName=RemoteTestCheckin23" & vbcrlf
str = str + "dDocTitle=Test1" & vbcrlf
str = str + "dDocType=ADACCT" & vbcrlf
str = str + "dSecurityGroup=Public" & vbcrlf
str = str + "dDocAuthor=sysadmin" & vbcrlf
str = str + "dDocAccount=" & vbcrlf
str = str + "primaryFile:path=C:/inetpub/Scripts/query2.asp" & vbcrlf
str = str + "@end" & vbcrlf
' Execute the command
res=idccommand.executeCommand(str)
' Return connection status
sClosed = idcCmd.closeServerConnection
if sClosed then
Response.Write "Server connection closed"
else
Response.Write "Failed to close server connection"
end if
' Retrieve results
Response.Write(res)

Example 8-10 Creating Variables

The following variables must be created:

  • idccommand: The name of the COM object.

  • sConnect: The status of the connection to the Oracle Content Server instance.

  • str: The HDA-formatted string that defines the service and its parameters.

    ' Create variables
    Dim idccommand, sConnect, str
    

Example 8-11 Creating a COM Object

The following variables must be created:

  • idccommand: The name of the COM object.

  • sConnect: The status of the connection to the Oracle Content Server instance.

  • str: The HDA-formatted string that defines the service and its parameters.

    ' Create variables
    Dim idccommand, sConnect, str
    

Example 8-12 Initializing the Connection

Initialize the connection to the Oracle Content Server instance.

' Initialize the connection to the server
x = idccommand.initRemote ("/domain/ ", "sysadmin", "socket:localhost:4444", false)

Example 8-13 Returning the Connection Status

In this example, the connectToServer and closeServerConnection methods are used to return connection status information before and after the service is executed.

' Return connection status
sConnect = idccommand.connectToServer
if sConnect then
Response.Write "Connected"
else
Response.Write "Not Connected"
end if
...
' Return connection status
sClosed = idcCmd.closeServerConnection
if sClosed then
Response.Write "Server connection closed"
else
Response.Write "Failed to close server connection"
end if

Example 8-14 Defining the Service and Parameters

To define the service and parameters, build an HDA-formatted string that contains the following lines:

@Properties LocalData
service
parameters
@end

The required and optional parameters vary depending on the service being called. For more information, see the Oracle Fusion Middleware Services Reference Guide for Universal Content Management.

In this example:

  • The CHECKIN_UNIVERSAL service is called.

  • The parameters for the service are defined using field/value pairs:

    • The doFileCopy parameter is set to TRUE (1), so the file will not be deleted from hard drive after successful check in.

    • The dDocName parameter defines the Content ID.

    • The dDocTitle parameter defines the Title.

    • The dDocType parameter defines the Type.

    • The dSecurityGroup parameter defines the Security Group.

    • The dDocAuthor parameter defines the Author.

    • The dDocAccount parameter defines the security account. (If accounts are enabled, this parameter is required.)

    • The primaryFile parameter defines original name for the file and the absolute path to the location of the file as seen from the server.

      Important:

      The required parameters vary depending on the service called. For more information, see the Oracle Fusion Middleware Services Reference Guide for Universal Content Management.
      str = "@Properties LocalData" & vbcrlf
      ' Define the service
      str = str + "IdcService=" & "CHECKIN_UNIVERSAL" & vbcrlf
      ' Define the service parameters
      str = str + "doFileCopy=1" & vbcrlf
      str = str + "dDocName=RemoteTestCheckin23" & vbcrlf
      str = str + "dDocTitle=Test1" & vbcrlf
      str = str + "dDocType=ADACCT" & vbcrlf
      str = str + "dSecurityGroup=Public" & vbcrlf
      str = str + "dDocAuthor=sysadmin" & vbcrlf
      str = str + "dDocAccount=" & vbcrlf
      str = str + "primaryFile:path=C:/inetpub/Scripts/query2.asp" & vbcrlf
      str = str + "@end" & vbcrlf
      

Example 8-15 Executing the Service

To execute the service, call the executeCommand method.

' Execute the service
res=idccommand.executeCommand(str)

Example 8-16 Retrieving Results

In this example, the result of the CHECKIN_UNIVERSAL service call is formatted HTML.

' Retrieve results
Response.Write(res)

8.3 IdcCommandUX Methods

The following subsections describe the IdcCommandUX methods:

8.3.1 addExtraheadersForCommand

This command adds extra HTTP-like headers to a command.

  • For security reasons, some parameters can only be passed in the headers.

  • The most common use for this command is to set the values for EXTERNAL_ROLES and EXTERNAL_ACCOUNTS in a request.

  • Values must be all on one string and separated by a carriage return and a line feed.

Example

The following is an ASP example:

extraHeaders = "EXTERNAL_ROLES=contributor" _
    + vbcrlf _
    + "EXTERNAL_ACCOUNTS=my_account"
idcCmd.addExtraHeadersForCommand(extraHeaders)

8.3.2 closeServerConnection

Public Sub closeServerConnection()

Description

Closes the server connection.

  • This method does not have to be called, because the executeCommand method automatically closes a connection after executing a service. It is provided only as a convenience for managing the state of the connection.

Parameters

None

Output

  • Returns TRUE if the connection is closed.

  • Returns FALSE if the connection failed to close.

Example

This ASP example passes the result of the closeServerConnection method to a variable and uses an if/else statement to return a connection status message:

sClosed = idcCmd.closeServerConnection
if sClosed then
Response.Write "Server connection closed"
else
Response.Write "Failed to close server connection"
end if

8.3.3 computeNativeFilePath

Public Function computeNativeFilePath(Data As String) As String

Description

HDA-only function.

Returns the URL of a native file as a string.

  • This function is generally used for processing native files to perform actions such as bulk file loading or retrieval.

  • To determine the values for the required parameters (such as dDocType and dID), you can reference the ResultSet returned from a DOC_INFO or SEARCH_RESULTS service call.

    • The DOC_INFO service can be used to specify previous revisions (DOC_INFO returns a list of previous revision labels).

    • The SEARCH_RESULTS service returns only enough data to specify the most recent revision of a content item.

Parameters

  • Data: An HDA-formatted string that defines the content item:

    • dDocType: The content item Type, such as ADACCT or FILES.

    • dID: The generated content item revision ID.

    • dExtension: The file extension, such as HCSF, DOC, or TXT.

    • dDocAccount: The account for the content item. If accounts are enabled, this parameter must be defined.

    Note:

    Do not confuse the Content ID (dDocName) with the internal content item revision identifier (dID). The dID value is a generated reference to a specific revision of a content item.

Output

  • Returns a string that defines NativeFilePath as the value of the string passed in as a parameter. For example:

    NativeFilePath=c:\domain\vault\adacct\1.doc
    
  • Returns an HDA string containing StatusCode and StatusMessage.

    • If the command is successful, StatusCode is zero (0), and StatusMessage is a login message ("You are logged in as sysadmin").

    • If the command fails, StatusCode is negative (-1), and StatusMessage is an error message.

    • Returns FALSE if there is a connection failure.

Example

This is an example of an HDA-formatted string:

String str = "@Properties LocalData\n"+
"dDocType=ADACCT\n"+
"dID=67\n"+
"dExtension=DOC\n"+
"dDocAccount=mainaccount\n"+
"@end\n";

8.3.4 computeURL

Public Function computeURL(Data As String, IsAbsolute As Boolean) As String

Description

HDA-only function.

Returns the URL of a content item as a string.

  • A relative or absolute URL can be supplied to Oracle Content Server.

    • When a relative URL is defined, the function evaluates the URL as a location valid on the local server.

    • For example:

      /domain/groups/Public/documents/FILE/doc.txt
      
    • When an absolute URL is defined, the function returns the absolute URL path.

    • For example:

    http://server/domain/groups/Public/documents/FILE/doc.txt
    
  • To determine the values for the Oracle Content Server parameters (HttpRelativeWebRoot and HttpServerAddress), you can reference the properties data returned from a GET_DOC_CONFIG_INFO service call.

  • To determine the values for the required content item parameters (such as dSecurityGroup and dDocType), you can reference the ResultSet returned from a DOC_INFO or SEARCH_RESULTS service call.

    • The DOC_INFO service can be used to specify previous revisions (DOC_INFO returns a list of previous revision labels).

    • The SEARCH_RESULTS service returns only enough data to specify the most recent revision of a content item.

  • To return the URL for a specific revision and rendition, use the content item revision label (dRevLabel) and the file extension (dWebExtension) entries. For example:

    dDocName=test10
    dRevLabel=2
    dWebExtension=pdf
    
  • To return the URL for the most recent revision, the content item revision label (dRevLabel) entry can be omitted. For example, defining just the Content ID (dDocName) and the file extension (dWebExtension) returns the most recent revision:

    dDocName=test11
    dWebExtension=html
    

Parameters

  • Data: An HDA-formatted string that defines the content item:

    • HttpRelativeWebRoot: The web root directory as a relative path, such as /stellent/. This entry is required for a relative URL, and is optional for an absolute URL.

    • HttpServerAddress: The domain name of the Oracle Content Server instance, such as testserver17 or example.com. (The server address is specified as a partial URL, such as example.com, rather than a full address, such as http://www.example.com/). This entry is required for an absolute URL, and it is optional for a relative URL.

    • dSecurityGroup: The security group, such as Public or Secure.

    • dDocType: The Type, such as ADACCT or FILES.

    • dDocName: The Content ID, such as test10 or hr_0005467.

    • dWebExtension: The file extension of the web-viewable file, such as xml, html, or txt.

    • dDocAccount: The account for the content item. If accounts are enabled, this parameter must be defined.

    • dRevLabel (optional): The revision label for the content item. If defined, the specific revision will be referenced.

  • IsAbsolute: Set to TRUE (1) to define an absolute URL address.

    Note:

    Do not confuse the Content ID (dDocName) with the internal content item revision identifier (dID). The dID value is a generated reference to a specific revision of a content item.

Output

  • Returns a string that defines URL as the value of the string passed in as a parameter. For example:

    URL=http://server/domain/groups/public/documents/FILE/doc.txt
    
  • Returns an HDA string containing StatusCode and StatusMessage.

    • If the command is successful, StatusCode is zero (0), and StatusMessage is a login message ("You are logged in as sysadmin").

    • If the command fails, StatusCode is negative (-1), and StatusMessage is an error message.

    • Returns FALSE if there is a connection failure.

Example

This is an example of an HDA-formatted string:

String str = "@Properties LocalData\n"+
"HttpServerAddress=testserver17\n"+
"HttpRelativeWebRoot=/domain/\n"+
"dDocAccount=mainaccount\n"+
"dSecurityGroup=Public\n"+
"dDocType=ADACCT\n"+
"dDocName=test11\n"+
"dWebExtension=html\n"+
"@end\n";

8.3.5 computeWebFilePath

Public Function computeWebFilePath(Data As String) As String

Description

HDA-only function.

Returns the path of a web-viewable file as a string.

  • This function is generally used for processing web-viewable text files (such as XML) to perform actions such as bulk file loading or retrieval.

  • Using computeWebFilePath instead of computeNativeFilePath provides the advantage of needing only the Content ID (dDocName) rather than the specific revision ID (dID) to return the most recent revision.

  • To determine the values for the required parameters (such as dSecurityGroup and dDocType), you can reference the ResultSet returned from a DOC_INFO or SEARCH_RESULTS service call.

    • The DOC_INFO service can be used to specify previous revisions (DOC_INFO returns a list of previous revision labels).

    • The SEARCH_RESULTS service returns only enough data to specify the most recent revision of a content item.

Parameters

  • Data: An HDA-formatted string that defines the content item:

    • dSecurityGroup: The security group, such as Public or Secure.

    • dDocType: The content item Type, such as ADACCT or FILES.

    • dDocName: The Content ID, such as test10 or hr_0005467.

    • dWebExtension: The file extension of the web-viewable file, such as xml, html, or txt.

    • dDocAccount: The account for the content item. If accounts are enabled, this parameter must be defined.

      Note:

      Do not confuse the Content ID (dDocName) with the internal content item revision identifier (dID). The dID value is a generated reference to a specific revision of a content item.

Output

  • Returns a string that defines WebFilePath as the value of the string passed in as a parameter. For example:

WebFilePath=http:\\testserver17.example.com\domain\groups\main\documents\test.xml
  • Returns an HDA string containing StatusCode and StatusMessage.

    • If the command is successful, StatusCode is zero (0), and StatusMessage is a login message ("You are logged in as sysadmin").

    • If the command fails, StatusCode is negative (-1), and StatusMessage is an error message.

    • Returns FALSE if there is a connection failure.

Example

This is an example of an HDA-formatted string:

String str = "@Properties LocalData\n"+
"dDocAccount=mainaccount\n"+
"dSecurityGroup=Public\n"+
"dDocType=ADACCT\n"+
"dDocName=test11\n"+
"dWebExtension=xml\n"+
"@end\n";

8.3.6 connectToServer

Public Function connectToServer() As Boolean

Description

Establishes a connection to the server.

  • The connection is held open until a command is executed. After a command is executed, the connection is closed automatically.

  • This method does not have to be called, because the executeCommand method automatically opens a connection to execute a service. It is provided only as a convenience for managing the state of the connection.

Parameters

None

Output

  • Returns TRUE if the connection is opened.

  • Returns FALSE if there is a connection failure.

Example

This ASP example passes the result of the connectToServer method to a variable and uses an if/else statement to return a connection status message:

sConnect = idcCmd.connectToServer
if sConnect then
Response.Write "Connected"
else
Response.Write "Not Connected"
end if

8.3.7 executeCommand

Public Sub executeCommand(Data As String)

Description

Executes an Oracle Content Server service.

  • This method evaluates whether a connection has already been established with a connectToServer call. If a connection exists, it will use the open connection. If a connection does not exist, it will establish a connection.

  • On completion of the command, the connection will be closed.

Parameters

  • Data: An HDA-formatted string that defines the IdcService command and any service parameters. For example:

    @Properties LocalData
    IdcService=GET_SEARCH_RESULTS
    ResultCount=5
    SortField=dInDate
    SortOrder=Desc
    QueryText=dDocType=research
    @end@
    

    This can also be a SOAP-formatted message, as shown in Example 8-1. For more information, see Section 8.3.11, "initRemote."

Output

  • Returns a string representing an HDA file that holds the original request and the results.

  • Returns an HDA string containing StatusCode and StatusMessage.

    • If the command is successful, StatusCode is zero (0), and StatusMessage is a login message ("You are logged in as sysadmin").

    • If the command fails, StatusCode is negative (-1), and StatusMessage is an error message.

    • Returns FALSE if there is a connection failure.

  • The return string is SOAP-formatted XML if a SOAP request was sent.

Example

This ASP example executes the command specified in the data string defined by the cmd variable:

results = idcCmd.executeCommand(cmd)

8.3.8 executeFileCommand

executeFileCommand (requestString)

Description

This function is used to execute a service request, then pipe the raw response to the client. This command is identical to executeCommand but can only be called on an Active Server Page (ASP).

  • The response from Oracle Content Server is redirected back to the client's browser (this is different from the response through executeCommand, in which the response is given as a string which can then be manipulated on the ASP).

  • This is useful for GET_FILE and similar services in which you need to transfer binary files from Oracle Content Server to a client browser through an ASP.

  • This function returns extra headers unless the request parameters are passed as environment variables.

  • requestString is the name of the service request.

  • For more information, see Section 8.3.7, "executeCommand."

Parameters

None

8.3.9 forwardRequest

forwardRequest()

Description

This function is used to forward a multipart form post to Oracle Content Server. This is useful for executing check-ins.

Parameters

None

8.3.10 getLastErrorMessage

getLastErrorMessage()

Description

This method retrieves the specific error details for a communication or configuration error. For example, if you do not put in the correct hostname for making a connection, this method returns the connection error. It does not return a value if the error is returned by Oracle Content Server as part of the return value for a request.

Parameters

None

Example

This example creates an object and initializes a connection to the server.

Set idcCmd = Server.CreateObject("Idc.CommandUX")

x = idcCmd.init("sysadmin", "c:\domain\bin")
If x = false Then
y = idcCmd.getLastErrorMessage()
Response.Write(y)
End If

8.3.11 initRemote

initRemote(HttpWebRoot, idcReference, idcUser, isSoap)

Description

This function initializes the module to connect to an Oracle Content Server instance. Note that you must first declare idcCmd.

Required Parameters

  • HttpWebRoot: The Idoc Script value for HttpWebRoot.

  • idcReference: A string containing information about how to connect to the Oracle Content Server instance, in the form socket:hostname:port. This is typically socket:localhost:4444. The hostname should be identical to IntradocServerHostName and port identical to IntradocServerPort.

  • idcUser: The user you are connecting as.

  • isSoap: A Boolean value indicating if the request is in SOAP XML format or HDA format. If this is set to TRUE, it indicates the SOAP XML format.

Example

Dim idcCmd
idcCmd.initRemote("domain", "socket:test204:4444", "sysadmin", "false")

8.4 OCX Interface

The IntradocClient OCX component is used within a Windows Visual Basic development environment to gain access to the content and content management functions within Oracle Content Server. The OCX integration is designed to call services in a visual development environment, or to connect to a remote Oracle Content Server instance.

The IntradocClient OCX component provides functionality that you can access with a method call. Methods perform actions and often return results. Information is passed to methods using parameters. Some functions do not take parameters; some functions take one parameter; some take several.

The IntradocClient OCX component requires a username and password to execute the commands. The user must have the appropriate permissions to execute the commands. Some commands will require an administrative access level, other commands may require only write permission.

Outside of the init and connection managing methods, all methods use the serialized HDA format for communication. The returned serialized HDA format string contains information about the success or failure of the command. The StatusCode will be negative if a failure occurs, and StatusMessage indicates the error.

For more information, see the Oracle Fusion Middleware Services Reference Guide for Universal Content Management. This guide also contains information about the IntradocClient OCX API specifications listing the properties, methods, and events.

8.5 IdcClientOCX Component

An Object Linking and Embedding Control Extension (OCX) control is provided for connecting to a remote Oracle Content Server instance and executing Oracle Content Server services. The IdcClient OCX control is used within a Windows Visual Basic development environment to gain access to the content and content management functions within Oracle Content Server.

This section provides a description of the IdcClient OCX control, setup instructions, and lists the events, methods, and properties. The IdcClient.ocx control is used to connect to a remote Oracle Content Server instance and perform typical server functions.

The following subsections describe the IdcClientOCX component and how to set it up:

8.5.1 IdcClient OCX Description

This section provides a general description of the IdcClient OCX control and basic information about events, methods, and properties. The IdcClient OCX interface is also discussed.

8.5.1.1 General Description

IdcClient is an ActiveX control that allows a program to perform actions such as executing a service and retrieving file path information. The IdcClient control is also a wrapper for the Microsoft Internet Explorer browser.

The IdcClient OCX control is designed to use the Unicode standard and in most cases exchanges data with Oracle Content Server in UTF-8 format. Unicode uses two bytes (16 bits) of storage per character and can represent characters used in a wide range of languages (for example, English, Japanese, Arabic). Since English language ASCII (American Standard Code for Information Interchange) characters only require one byte (8 bits), when an ASCII character is represented the upper byte of each Unicode character is zero.

See the Unicode Consortium on the Web for additional information about the Unicode standard at http://www.unicode.org/.

Important:

IdcClient OCX is built atop the Microsoft Layer for Unicode, which allows Unicode applications to run on Win9x platforms. When distributing the IdcClient OCX Control on 9x platforms, the "unicows.dll" must also be distributed. This companion DLL cannot be distributed on Windows-based systems.

In most cases, the methods use the serialized HDA format for communication. A serialized HDA format is a Java method used for communication. The returned serialized HDA format string contains information about the success or failure of the command.

The IdcClient OCX control provides functionality that can be performed with a method call. Methods perform actions and often return results. Information is passed to methods using parameters. Some functions do not take parameters; some functions take one parameter; some take several. For example, a function with two parameters passed as strings would use this format:

Function(Parameter As String, Parameter As String) As String

  • IdcClient OCX enables users to write client applications to execute services. The OCX control takes name/value pairs containing commands and parameters and calls the specified services. Execution results are passed back to the calling program.

  • IdcClient OCX requires a username and password to execute the commands. The user must have the appropriate permissions to execute the commands. Some commands will require an administrative access level, other commands may require only write permission.

For more information, see Oracle Fusion Middleware Services Reference Guide for Universal Content Management.

8.5.1.2 Events, Methods, and Properties

The IdcClient OCX control is used to connect to a remote Oracle Content Server instance and perform server functions. This section provides a basic overview on Visual Basic events, methods, and properties.

OCX Events

Events are executed when the user or server performs an action.

For example:

  • The IntradocBrowserPost event executes every time a user submits a form from within a browser.

  • The IntradocServerResponse event executes after the server completes a requested action.

    For more information, see Section 8.5.1.2, "Events, Methods, and Properties."

Example 8-17 OCX Methods


The Visual Basic Standard Controls provide methods that are common to every Visual Basic development environment. In addition, the IdcClient OCX control provides methods that are private and unique to this specific control. These methods are used to perform or initiate an action rather than setting a characteristic.

For example:

  • The AboutBox() method launches the About box containing product version information.

  • The GoCheckinPage method checks in a new content item or a content item revision.

For more information, see Section 8.5.1.2, "Events, Methods, and Properties."

Example 8-18 OCX Properties


Properties describe or format an object and can be modified with code or by using the property window in the Visual Basic development environment. Properties describe the basic characteristic of an object.

For example:

  • The UserName property provides the assigned user name.

  • The WorkingDir property specifies the location where downloaded files are placed.

For more information, see Section 8.5.1.2, "Events, Methods, and Properties."

8.5.1.3 IdcClient OCX Interface

The IdcClient OCX control is used within a Windows Visual Basic development environment to gain access to the content and content management functions within Oracle Content Server. The OCX integration is designed to call services in a visual development environment, or to connect to a remote Oracle Content Server instance.

In most cases, methods use the serialized HDA format for communication. The returned serialized HDA format string contains information about the success or failure of the command. The StatusCode will be negative if a failure occurs, and StatusMessage will indicate the error. If the returned HDA does not contain a StatusCode parameter, the service call succeeded.

8.5.2 IdcClient OCX Control Setup

This section provides a the steps required to setup the IdcClient OCX component and also provides information about creating a visual interface in the Microsoft Visual Basic development environment.

8.5.2.1 Setting Up the IdcClient OCX Component

Follow these steps to set up the IdcClient OCX component in the Microsoft Visual Basic development environment:

  1. Create a new project.

  2. Select Project, and then choose Components.

  3. Browse to the IdcClient.ocx file on your system, and click Open.

    The IdcClient module is added to the Component Controls list.

  4. Ensure that the checkbox for the IdcClient ActiveX Control module is enabled, and click OK.

    The IdcClient OCX control is placed in the list of controls.

  5. (Optional) You can use the Visual Basic development environment to build your own visual interface or follow the steps provided in Section 8.5.2.2, "Creating a Visual Interface," to build a basic visual interface.

8.5.2.2 Creating a Visual Interface

The following procedure for creating a visual interface is based on the assumption that a Visual Basic project has been created and the IdcClient OCX control has been placed in the list of controls. For more information, see Section 8.5.2.1, "Setting Up the IdcClient OCX Component."

Follow these steps to build a basic visual interface:

  1. Select the control, and draw it on the Visual Basic form, as Figure 8-1 shows.

    Figure 8-1 OCX Control Drawn on a Visual Basic Form

    Surrounding text describes Figure 8-1 .
  2. From the drop-down list of the Properties window, choose IdcClient OCX.

    If the Properties window is not currently displayed, select View, and then choose Properties Window from the main menu.

  3. Rename the IdcClient OCX control IdcClientCtrl.

  4. Define HostCgiUrl to reference the iss_idc_cgi.dll for your particular instance.

    For example:

    http://testserver/intradoc-cgi/iss_idc_cgi.dll
    

    Figure 8-2 Edited IdcClient Properties

    Surrounding text describes Figure 8-2 .
  5. On the form, draw a text box, and name it CgiUrl.

  6. For the text field, enter the HostCgiUrl value as the text to be displayed.

    For example:

    http://testserver/intradoc-cgi/iss_idc_cgi.dll
    

    Figure 8-3 Edited CgiUrl TextBox Properties

    Surrounding text describes Figure 8-3 .
  7. On the form, draw a text box, and name it Command.

  8. Clear the entry for the text field (leave blank), and set MultiLine to True.

    Figure 8-4 Edited Command TextBox Properties

    Surrounding text describes Figure 8-4 .
  9. On the form, draw a text box, and name it Response.

  10. Clear the entry for the text field (leave blank).

    Figure 8-5 Edited Response TextBox Properties

    Surrounding text describes Figure 8-5 .
  11. On the form, draw a button, and name it SendPostCommand.

  12. For the Caption field, enter "Send Post Command" as the text to be displayed.

    Figure 8-6 Edited SendPostCommand CommandButton Properties

    Surrounding text describes Figure 8-6 .
  13. On the form, select View, and then choose Code.

  14. Select SendPostCommand, and then click the drop-down lists and modify the code to perform these actions:

    • Set the Host Cgi URL value.

    • Issue the command.

    • (Optional) Replace LF with CRLF to make the presentation in the edit control more readable.

    • Display the response.

    For example:

    Dim R As String
    IdcClientCtrl.HostCgiUrl = CgiUrl.Text
    R = IdcClientCtrl.1.SendPostCommand(Command.Text)
    R = Replace(R, vbLf, vbCrLf
    Response.Text = R
    

    Figure 8-7 Edited SendPostCommand_Click Code

    Surrounding text describes Figure 8-7 .
  15. Choose Form and then Load from the drop-down lists, and add the following lines to set the login prompt for the Oracle Content Server instance:

    IdcClientCtrl.UseBrowserLoginPrompt = True
    IdcClientCtrl.UseProgressDialog = True
    

    Figure 8-8 Edited Form_Load Code

    Surrounding text describes Figure 8-8 .
  16. (Optional) Add appropriate descriptive labels, such as Cgi Url, Command, and Response.

    Figure 8-9 Visual Interface with a Descriptive Label

    Surrounding text describes Figure 8-9 .
  17. Select Run, and then choose Start to test the visual interface.

    Figure 8-10 Completed Visual Interface

    Surrounding text describes Figure 8-10 .
  18. Enter a formatted command in the Command field.

    For example, this command adds a user:

    @Properties LocalData
    IdcService=ADD_USER
    dName=user99
    dUserAuthType=Local
    @end
    

    For more information about the ADD_USER service, see the Oracle Fusion Middleware Services References Guide.

    Figure 8-11 Visual Interface with Defined Command

    Surrounding text describes Figure 8-11 .
  19. Click the Send Post Command button to execute the command. The returned results are displayed in the Response field.

    Figure 8-12 Visual Interface with Returned Results

    Surrounding text describes Figure 8-12 .

Verify the Command

  1. In a web browser, log in to Oracle Content Server as an administrator.

  2. In the Administration tray, select Admin Applets.

  3. Click User Admin. The applet launches and displays the added user (for example, user99).

8.6 IdcClient Events

Events are executed when the user or server performs an action. The following subsections describe the IdcClient OCX events:

8.6.1 IntradocBeforeDownload

Executes before a file is downloaded.

  • Initiates the server actions and updates required before a download.

Parameters

The event passes these parameters:

  • ByVal params As String

  • cancelDownload As Boolean

8.6.2 IntradocBrowserPost

Executes every time a form is submitted from within a browser.

Parameters

The event passes these parameters:

  • ByVal url As String

  • ByVal params As String

  • cancelPost As Boolean

8.6.3 IntradocBrowserStateChange

Executes whenever the browser state changes.

Parameters

The event passes these parameters:

  • ByVal browserStateItem As String

  • ByVal enabled As Boolean

8.6.4 IntradocRequestProgress

Executes a request for a progress report to be sent from the server. This event occurs only after a method has been called.

Parameters

The event passes these parameters:

  • ByVal statusData As String

  • ByVal isDone As Boolean

8.6.5 IntradocServerResponse

Executes after the server completes a requested action. For example, after a file has been downloaded. This event handles HDA encoded data that is a response from the server. This event only occurs when an action is performed in the browser.

Parameters

The event passes one parameter:

  • ByVal response As String

8.7 IdcClient OCX Methods

The following IdcClient OCX methods are available:

Methods marked with an asterisk (*) are ones which are not related to browser activity and which return a value.

Important:

All parameters are required unless otherwise indicated.

8.7.1 AboutBox

Sub AboutBox()

Description

Launches the About box containing product version information.

  • This method displays the product About box.

  • The method returns FALSE if the call cannot be executed.

Parameters

None

8.7.2 Back

Sub Back()

Description

Displays the previous HTML page.

  • Returns the user to the previous screen.

  • The method retrieves the previous HTML page from cached information for display to the user.

Parameters

None

8.7.3 CancelRequest

Function CancelRequest() As Boolean

Description

This method cancels the currently active request. Returns FALSE if the function is unable to cancel the request or if there is no request currently active.

Parameters

None

Output

Returns a Boolean value:

  • Returns TRUE if request is canceled.

  • Returns FALSE if the cancel request is not performed.

8.7.4 DoCheckoutLatestRev

Sub DoCheckoutLatestRev(docName As String, curID As String)

Description

Checks out or locks the latest content item revision.

  • Given a content item name and the version label, the method checks out the latest content item revision.

  • Executes the IntradocServerResponse event. The event is executed before the method occurs. For details, see Section 8.6, "IdcClient Events."

    Note:

    The curID value is the content item version label, not the generated content item revision ID.

This function returns the following values:

  • Serialized HDA containing dID and dDocName.

  • FALSE if the latest revision cannot be checked out or cannot be found in the system.

  • The data that was passed in as parameters.

Parameters

  • docName: The user-assigned content item name.

  • curID: The unique identifier for the latest revision. Optional.

8.7.5 DownloadFile

Function DownloadFile(command As String, filename As String) As String

Description

Downloads the defined file.

  • Given a currently associated command and the file type, this method performs a file download of the postconversion file (compare DownloadNativeFile).

  • Executes the IntradocBeforeDownload event. The event is executed before the method occurs. For details, see Section 8.6, "IdcClient Events."

This function returns the following:

  • Serialized HDA containing the status code and status method.

  • The data that was passed in as parameters.

  • FALSE if it is unable to download the specified file.

Parameters

  • command: The currently associated command.

  • filename: The file format. This is the file type such as PDF, HTM, or other supported format.

8.7.6 DownloadNativeFile

Function DownloadNativeFile(id As String, docName As String, filename As String) As String

Description

Downloads the defined native file.

  • Given a content item revision ID, a content item name, and a file type, this method performs a file download of the native file (compare DownloadFile).

  • Executes the IntradocBeforeDownload event. The event is executed before the method occurs. For details, see Section 8.6, "IdcClient Events."

    Note:

    The id value is the generated content item revision ID, not the content item version label.

This function returns the following:

  • Serialized HDA containing dID and dDocName.

  • The data that was passed in as parameters.

  • FALSE if it is unable to download the specified file.

Parameters

  • id: The unique identifier for the latest revision.

  • docName: The user-assigned content item name.

  • filename: The file format. This is the file type such as DOC, RTF, or any other supported format.

8.7.7 Drag

Sub Drag([nAction])

Description

Begins, ends, or cancels a drag operation.

  • The Drag method is handled the same as a Standard Control implementation.

  • Refer to a Visual Basic API reference for additional information.

Parameters

  • nAction: Indicates the action to perform. If you omit nAction, nAction is set to 1.

The settings for the Drag method are:

  • 0: Cancel drag operation; restore original position of control.

  • 1: (Default) Begin dragging the control.

  • 2: End dragging, that is, drop the control.

8.7.8 EditDocInfoLatestRev

Sub EditDocInfoLatestRev(docName As String, curID As String, activateAction As String)

Description

Edits the content item information for the latest revision.

  • ODMA related.

  • Given a content item name, the version label, and the currently active requested action, the method edits the content item information for the latest revision.

  • The function returns FALSE if the content item information for the latest revision cannot be edited or cannot be found in the system.

    Note:

    The curID value is the content item version label, not the generated content item revision ID.

Parameters

  • curID: The unique identifier for the latest revision.

  • activateAction: Passed to ODMActivate. This can be used as Idoc Script. Optional.

  • docName: The user-assigned content item name. Optional.

8.7.9 Forward

Sub Forward()

Description

Displays the next HTML page.

  • Moves the user to the next screen.

  • This method retrieves cached information for the next HTML page for display to the user.

Parameters

None

8.7.10 GoCheckinPage

Sub GoCheckinPage(id As String, docName As String, isNew As Boolean, params As String)

Description

Checks in a new content item or a content item revision.

  • Given the content item revision ID and the content item name, the function checks in a new content item or a content item revision.

  • This method opens the content item check-in page and enters the unique content item identifier, user-assigned content item name, and any assigned content item parameters into the associated text fields. It is also specified whether this is a new content item or a revision.

    Note:

    The id value is the generated content item revision ID, not the content item version label.

Output

This function returns the following:

  • FALSE if it is unable to check in the specified file.

  • Serialized HDA containing dID and dDocName.

  • The data that was passed in as parameters.

Parameters (All Optional)

  • id: The unique identifier for the latest revision.

  • docName: The user-assigned content item name.

  • IsNew: Defines whether the content item to be checked in is a new content item or a revision.

    • If TRUE, a new unique content item version label is assigned.

    • Default is TRUE.

  • params: The parameters that prefill the Check In page.

8.7.11 Home

Sub Home()

Description

Returns the user to the defined home page.

  • Moves the user to the home screen.

  • Executes an HTML page request and displays the defined home page to the user.

Parameters

None

8.7.12 InitiateFileDownload

Function InitiateFileDownload(command As String, filename As String) As String

Description

Initiates a file download.

  • Given the currently associated command and the file type, the function initiates a file download. This method initiates a file download of a specific rendition of a content item, the latest revision, or the latest released revision.

  • Executes the IntradocServerResponse event. The event is executed before the method occurs. For details, see Section 8.6, "IdcClient Events."

Parameters

  • command: The currently associated command.

  • filename: The file format. This is the file type, such as PDF, HTM, or another supported format.

Output

  • Returns serialized HDA containing the requested information.

  • Returns the data that was passed in as parameters.

8.7.13 InitiatePostCommand

Function InitiatePostCommand(postData As String) As String

Description

Initiates a post command.

  • Initiates a service call. Given assigned post data, this method initiates a post command.

  • Executes the IntradocServerResponse event. The event is executed before the method occurs. For details, see Section 8.6, "IdcClient Events."

Parameters

  • postData: The serialized HDA containing the service command and any necessary service parameters.

Output

  • Returns serialized HDA containing the requested information.

  • Returns StatusCode and StatusMessage.

    • The StatusCode will be negative if a failure occurs, and StatusMessage will indicate the error.

    • If the returned HDA does not contain a StatusCode parameter, the service call succeeded.

8.7.14 Move

Sub Move(Left As Single, [Top], [Width], [Height])

Description

Moves an object.

  • The Move method is handled the same as a Standard Control implementation.

  • Refer to a Visual Basic API reference for additional information.

Parameters

  • nLeft: Specifies the horizontal coordinate for the left edge of the object. This is a single-precision value.

  • nTop: Specifies the vertical coordinate for the top edge of the object. This is a single-precision value.

  • nWidth: Specifies the new width of the object. This is a single-precision value.

  • nHeight: Specifies the new height of the object. This is a single-precision value.

8.7.15 Navigate

Sub Navigate(url As String

Description

Computes the URL path.

  • Given a complete URL, this method computes the URL from the serialized HDA and returns the value as a string.

This function returns the following:

  • Serialized HDA containing the requested information.

  • The data that was passed in as parameters.

Parameters

  • url: The complete URL path.

8.7.16 NavigateCgiPage

Sub NavigateCgiPage(params As String)

Description

Computes the CGI path.

  • Given defined content item parameters, this method computes the CGI path from the serialized HDA and returns the value as a string.

Parameters

  • params: The assigned content item parameters.

8.7.17 Refresh Browser

Description

Refreshes the browser.

  • This method refreshes the web browser and updates dynamic information.

Parameters

None

8.7.18 SendCommand

Function SendCommand(params As String) As String

Description

Issues a service request to Oracle Content Server.

  • Given defined content item parameters, the function executes a service from Oracle Content Server related to content item handling.

Parameters

  • params: The CGI URL encoded parameters.

Output

  • Returns serialized HDA containing the requested information.

  • Returns the data that was passed in as parameters.

8.7.19 SendPostCommand

Function SendPostCommand(postData As String) As String

Description

Sends a post command.

  • Executes a service call.

  • Executes the IntradocBrowserPost event. The event is executed before the method occurs. For details, see Section 8.6, "IdcClient Events."

Parameters

  • postData: The serialized HDA containing the service command and any necessary service parameters.

Output

  • Returns serialized HDA containing the requested information.

  • Returns StatusCode and StatusMessage.

    • The StatusCode will be negative if a failure occurs, and StatusMessage will indicate the error.

    • If the returned HDA does not contain a StatusCode parameter, the service call succeeded.

8.7.20 SetFocus

Sub SetFocus()

Description

Assigns the focus to a control.

  • The SetFocus method is handled the same as a Standard Control implementation.

  • Refer to a Visual Basic API reference for additional information.

Parameters

None

8.7.21 ShowDMS

Sub ShowDMS()

Description

Opens the HTML page associated with the Content Manager.

  • ODMA related.

  • Displays the Content Manager access page in a browser.

Parameters

None

8.7.22 ShowDocInfoLatestRev

Sub ShowDocInfoLatestRev(docName As String, curID As String, activateAction As String)

Description

Displays the content item information for the latest revision.

Note:

The curID value is the content item version label, not the generated content item revision ID.

Parameters

  • docName: The user-assigned content item name.

  • curID: The unique identifier for the latest revision. Optional.

  • activateAction: The currently active requested action. Optional.

8.7.23 ShowWhatsThis

Sub ShowWhatsThis()

Description

Displays the What's This Help topic specified for an object with the WhatsThisHelpID property.

  • The ShowWhatsThis method is handled the same as a Standard Control implementation.

  • Refer to a Visual Basic API reference for additional information.

Parameters

  • Object: Specifies the object for which the What's This Help topic is displayed.

8.7.24 StartSearch

Sub StartSearch()

Description

Displays the query page in the browser control.

  • Preforms browser manipulation.

Parameters

None

8.7.25 Stop

Sub Stop()

Description

Stops the browser.

  • This method stops or cancels the loading of information in the browser.

Parameters

None

8.7.26 UndoCheckout

Sub UndoCheckout(docName As String, curID As String)

Description

This service reverses a content item checkout.

  • Given a content item name and a version label, this service attempts to locate the content item in the system and undo the check out. The service fails if the content item does not exist in the system, if the content item is not checked out or the user does not have sufficient privilege to undo the checkout.

  • Executes the IntradocServerResponse event. The event is executed before the method occurs. For details, see Section 8.6, "IdcClient Events."

Note:

The curID value is the content item version label, not the generated content item revision ID.

Parameters

  • curID: The unique identifier for the latest revision.

  • docName: The user-assigned content item name. Optional.

8.7.27 ViewDocInfo

Sub ViewDocInfo(id As String)

Description

Navigates to the content item information page and displays content item information in a browser.

  • Performs browser manipulation.

  • Given a content item revision ID, the method displays content item information in a browser.

    Note:

    The id value is the generated content item revision ID, not the content item version label.

Parameters

  • id: The unique identifier for the latest revision.

8.7.28 ViewDocInfoLatestRev

Sub ViewDocInfoLatestRev(docName As String, curID As String)

Description

Navigates to the content item information page and displays content item information for the latest revision.

  • Given a content item name and a version label, the method displays the content item information for the latest revision.

    Note:

    The curID value is the content item version label, not the generated content item revision ID.

This function returns the following:

  • Serialized HDA containing dID and dDocName.

  • The data that was passed in as parameters.

Parameters

  • docName: The user assigned content item name.

  • curID: The unique identifier for the latest revision.

8.7.29 ZOrder

Sub ZOrder([Position])

Description

Places a specified form or control at the front or back of the z-order within its graphical level.

  • The ZOrder method is handled the same as a Standard Control implementation.

  • Refer to a Visual Basic API reference for additional information.

Parameters

  • nOrder: Specifies an integer indicating the position of the object relative to other objects. If you omit nOrder, the setting is 0.

The settings for the ZOrder method are:

  • 0: (Default) The object is positioned at the front of the z-order.

  • 1: The object is positioned at the back of the z-order.

8.8 IdcClient Properties

Each data item or attribute is implemented as a property in Visual Basic. Properties are exposed through the Public Interface of an object within the Visual Basic development environment. These attributes can be used to further describe elements.

These are the IdcClient OCX Properties:

8.8.1 ClientControlledContextValue

Provides the user-supplied context value. This value becomes available to Idoc Script as the variable ClientControlled in any web page delivered by Oracle Content Server.

  • Returns the value as a string.

  • Takes no parameters.

8.8.2 HostCgiUrl

Provides the complete URL path of the host CGI bin.

  • Returns the value as a string.

  • Takes no parameters.

8.8.3 Password

Provides the assigned user password.

  • Returns the value as a string.

  • Takes no parameters.

8.8.4 UseBrowserLoginPrompt

Allows the use of a browser login prompt. Defines whether a dialog box for user authentication will display.

  • If set to TRUE, control will open a dialog box for user authentication.

  • The default value is TRUE.

Returns a Boolean value:

  • TRUE if the login was successful

  • FALSE if the login was denied

8.8.5 UseProgressDialog

Enables the use of a user progress dialog. Defines whether a dialog box for user authentication will display.

  • If set to TRUE, control will open a dialog box for user progress.

  • Default is TRUE.

Returns a Boolean value:

  • Returns TRUE if the action was completed.

  • Returns FALSE if the action failed.

8.8.6 UserName

Provides the assigned user name.

Returns the value as a string.

Takes no parameters.

8.8.7 Working Directory

Specifies the working directory as a full path. This is the location where downloaded files are placed.

  • Returns the value as a string.

  • Takes no parameters.

8.9 ODMA Integration

The Open Document Management Application (ODMA) is a standard API used to interface between desktop applications and file management software. The ODMA integration for Oracle Content Server is available with Desktop, a separate product. Use the ODMA-integration products to gain access to the content and content management functions within Oracle Content Server (for ODMA-compliant desktop applications).

You can publish files to your web repository directly from any ODMA-compliant application, such as Microsoft Word, Corel WordPerfect, and Adobe FrameMaker. With the web-centric adoption of ODMA, you can check in and publish information directly to the Web. This is a significant advancement over traditional ODMA client/server implementations, where information is published first to a server and is not immediately available on the Web for consumption.

For more information, refer to the ODMA or ODMA/FrameMaker online help.

8.9.1 ODMA Client

The ODMA Client is a separate product and does not ship with the core product. It is used to check in and publish information directly to the Web from your desktop applications. ODMA Client surpasses traditional ODMA client–server models, which publish information to a server and not immediately to the Web for consumption. You can use ODMA Client from within your desktop application to perform many tasks which interact with Oracle Content Server, for example:

  • Save a file and immediately check it in to Oracle Content Server.

  • Save a file to check in later.

  • Check out a file from Oracle Content Server.

  • Update a file's metadata (content information).

  • Save the file to your local file system and bypass the ODMA Client system.

8.9.2 ODMA Interfaces

These ODMA interfaces are available:

  • ODMA Client Interface: The Select Document screen with the Recent Files option selected displays a list of files that you recently used through ODMA. This screen is displayed instead of the typical Open dialog box. If a file does not display on this screen, you can search for it in Oracle Content Server or on the local file system.

  • ODMA Desktop Shell Interface: The Client Desktop Shell provides a drag-and-drop check-in functionality, and access to the ODMA Client - Select Document screen from outside of your desktop application. Through the Desktop Shell, you can:

    • Select a file from your desktop or a Windows Explorer window and drag it to the Desktop Shell to check it into Oracle Content Server.

    • Select and open a file from the Recent Files list or from Oracle Content Server.

  • Oracle Content Server Interface with ODMA: You can open and check out an ODMA file directly from the Oracle Content Server Content Information page. When you open a file from Oracle Content Server, it opens in its native application so you can edit it and quickly check the file back into Oracle Content Server.

    Note:

    You can also open and check out a file from within an ODMA-compliant application, and you can open a copy of a file instead of checking it out. For more information, see the ODMA Online Help.