Library Content Service Functions

In this section:

 

This topic describes Library Content Service functions and provides examples for each.


Top of page

x
Deleting the Content Description

Function Name: deleteContent

Purpose: Deletes the content description and all associated report versions from the underlying Report Library database. For the Report Library, content is a descriptive that contains versions of a particular report. By default, the content description is determined at schedule time, and uses the schedule name designated by the scheduler. This deletion operation accepts the content ID, which is the primary key field used to identify content information in the Report Library database. The authenticated user must have access to this content or a CasterException is thrown. The deleteContent function can be used by the administrator and the owner only.

Input

Description

Type

Authentication information.

Authenticate

The unique identifier of the content in the repository.

String

Output

Description

There is no output for this function. If it fails, it will throw an exception.



Example: Deleting the Content Description in Visual Basic .NET

In the following example, all versions of the output for a report are deleted. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retCat() As LCManager.Category
  Dim retContentArray() As LCManager.Content
  Dim retContent As LCManager.Content
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retCat = LC.getCategoryInfoList(LCAuthenticate)
  retContentArray = LC.getContentInfoList(LCAuthenticate, retCat(0))
  LC.deleteContent(LCAuthenticate, retContentArray(0).id)
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Deleting the Content Description in Java

In the following example, all versions of the output for a report are deleted. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoList(Authobj);
  Content retcontArray[] = LC.getContentInfoList(Authobj,retcat[0]);
  LC.deleteContent(Authobj,retcontArray[0].getId());
  }
  catch (Throwable t)
  {
         System.err.println(t);
         t.printStackTrace();
         System.exit(1);
  }

Top of page

x
Deleting a Report Version

Function Name: deleteVersion

Purpose: Deletes the version of this report from the underlying Report Library database. For the Report Library, a version is a specific instance of a report that is grouped within content. This deletion operation takes the versioning, which is the primary key field used to identify report versions in the Report Library database. However, the authenticated user must have access to this report version or a CasterException is thrown. The delete version function can be used by the administrator and the owner only.

Input

Description

Type

Authentication information.

Authenticate

The unique identifier of the report version in the repository.

String

Output

Description

There is no output for this function. If it fails, it will throw an exception.



Example: Deleting a Report Version in Visual Basic .NET

In the following example, the output for a specific version of a report is deleted. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category. The getContent function is run to retrieve a list of versions for a specific report.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retCat() As LCManager.Category
  Dim retContentArray() As LCManager.Content
  Dim retContent As LCManager.Content
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retCat = LC.getCategoryInfoList(LCAuthenticate)
  retContentArray = LC.getContentInfoList(LCAuthenticate, retCat(0))
  retContent = LC.getContent(LCAuthenticate, retContentArray(0).id)
  LC.deleteVersion(LCAuthenticate, _
                   retContent.versionList(0).id)
Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Deleting a Report Version in Java

In the following example, the output for a specific version of a report is deleted. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category. The getContent function is run to retrieve a list of versions for a specific report.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoList(Authobj);
  Content retcontArray[] = LC.getContentInfoList(Authobj,retcat[0]);
  Content retcont = LC.getContent(Authobj,retcontArray[0].getId());
  LC.deleteVersion(Authobj,retcont.getVersionList()[0].getId());
  }
  catch (Throwable t)
  {
         System.err.println(t);
         t.printStackTrace();
         System.exit(1);
  }

Top of page

x
Retrieving a List of Category Information Accessible to the Authenticated User

Function Name: getAccessibleCategoryInfoListByCaller

Purpose: Retrieves a list of category information that is accessible to the authenticated user. Because only information about this report category is needed, the actual reports are not retrieved. This function is accessible only to the authenticated user.

Input

Description

Type

Authentication information.

Authenticate

Output

Description

Type

A list of category information that does not have access to the actual reports.

Category



Example: Retrieving a List of Category Information Accessible to an Authenticated User in VIsual Basic .NET

In the following example, a list of categories that user ID "admin" has access to is retrieved. The category ID and category name are written to the RCcategoryInfoByCaller.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retCat() As LCManager.Category
  Dim tempfile As String
  Dim newOutput As String
  Dim i As Integer
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retCat = LC.getAccessibleCategoryInfoListByCaller(LCAuthenticate)
  tempfile = "d:\RCtemp\RCcategoryInfoByCaller.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  For i = 0 To retCat.Length - 1
        newOutput = retCat(i).id + " " + _
                    retCat(i).name 
        PrintLine(1, newOutput)
  Next i
  FileClose(1) 
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving a List of Category Information Accessible to an Authenticated User in Java

In the following example, a list of categories that user ID "admin" has access to is retrieved. The category ID and category name are written to the RCcategoryInfoByCaller.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getAccessibleCategoryInfoListByCaller(Authobj);
  File tempfile = new File("d:\\RCtemp\\RCcategoryInfoByCaller.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
  for ( int i=0; i<retcat.length; i++ )
  {
        String newOutput = retcat[i].getId() + " " +
                           retcat[i].getName();
        out.println(newOutput);
}
out.close();
}
catch (Throwable t)
{
       System.err.println(t);
       t.printStackTrace();
       System.exit(1);
}

Top of page

x
Retrieving Content Information Accessible to the Authenticated User

Function Name: getAccessibleContentInfo

Purpose: Retrieves content information as identified by the content ID. As each content ID is unique, this function obtains only designated content from the Report Library database. However, the authenticated user must have access to this report version, otherwise there will be a Caster Exception thrown. Because only information about this report content is needed, the actual report is not accessible via the information returned by this function. This function is accessible only to the authenticated user.

Input

Description

Type

Authentication information.

Authenticate

Content ID is the unique identifier for the content.

String

Output

Description

Type

Content information without access to the actual reports.

Content



Example: Retrieving Content Information Accessible to the Authenticated User in Visual Basic.NET

In the following example, information about the output for a specific report accessible by user ID "admin" is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category. The content ID, content description, content access type, and number of versions are written to the RCacontentInfo.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retcat() As LCManager.Category
  Dim retContentArray() As LCManager.Content
  Dim retContent As LCManager.Content
  Dim newOutput As String
  Dim tempfile As String
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retcat = LC.getCategoryInfoList(LCAuthenticate)
  retContentArray = LC.getContentInfoList(LCAuthenticate, retcat(0))
  retContent = LC.getAccessibleContentInfo(LCAuthenticate, _
                                           retContentArray(0).id)
            tempfile = "d:\RCtemp\RCacontentInfo.txt"
            FileOpen(1, tempfile, OpenMode.Output)
            newOutput = retContent.id + " " + _
                        retContent.description + " " + _
                        retContent.accessType + " " + _
                        Str(retContent.versionList.Length)
            PrintLine(1, newOutput)            
            FileClose(1)  
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving Content Information Accessible to the Authenticated User in Java

In the following example, information about the output for a specific report accessible by user ID "admin" is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category. The content ID, content description, content access type, and number of versions are written to the RCacontentInfo.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoList(Authobj);
  Content retcontArray[] = LC.getContentInfoList(Authobj,retcat[0]);
  Content retcont = LC.getAccessibleContentInfo(Authobj,
                                                retcontArray[0].getId());
  File tempfile = new File("d:\\RCtemp\\RCacontentInfo.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
  String newOutput = retcont.getId() + " " +
                     retcont.getDescription() + " " +
                     retcont.getAccessType() + " " +
                     retcont.getVersionList().length;
  out.println(newOutput);
  out.close();
  }
  catch (Throwable t)
  {
         System.err.println(t);
         t.printStackTrace();
         System.exit(1);
  }

Top of page

x
Retrieving a List of Content Information Accessible to the Authenticated User

Function Name: getAccessibleContentInfoListByCaller

Purpose: Retrieves a list of content information accessible by the authenticated user for a specific category. Because only information about this report content is designated via this function, the actual report is not accessible via the information returned by this function. This function is accessible only to the authenticated user.

Input

Description

Type

Authentication information.

Authenticate

Reference to the category information.

Category

Output

Description

Type

List of content information.

Content



Example: Retrieving a List of Content Information Accessible to the Authenticated User in Visual Basic.NET

In the following example, a list of contents for a specific category which is accessible by user ID "admin" is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The content ID, content description, and access type are written to the RCacontentByCaller.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retcat() As LCManager.Category
  Dim retContent() As LCManager.Content
  Dim newOutput As String
  Dim tempfile As String
  Dim i As Integer
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retcat = LC.getCategoryInfoList(LCAuthenticate)
  retContent = LC.getContentInfoListByCaller(LCAuthenticate, retcat(0))
  tempfile = "d:\RCtemp\RCcontentByCaller.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  For i = 0 To retContent.Length - 1
        newOutput = retContent(i).id + " " + _
                    retContent(i).description + " " + _
                    retContent(i).accessType
        PrintLine(1, newOutput)
  Next i
  FileClose(1) 
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving a List of Content Information Accessible to the Authenticated User in Java

In the following example, a list of contents for a specific category which is accessible by user ID "admin" is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The content ID, content description, and access type are written to the RCacontentByCaller.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoList(Authobj);
  Content retContent[] = LC.getAccessibleContentInfoListByCaller(Authobj,retcat[0]);
  File tempfile = new File("d:\\RCtemp\\RCacontentByCaller.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
  for ( int i=0; i<retContent.length; i++ )
  {
        String newOutput = retContent[i].getId() + " " +
                           retContent[i].getDescription() + " " +
                           retContent[i].getAccessType();
        out.println(newOutput);
  }
  out.close();
  }  
  catch (Throwable t)
  {
        System.err.println(t);
        t.printStackTrace();
        System.exit(1);
  }

Top of page

x
Retrieving a Report Identified by the Version ID

Function Name: getAccessibleVersion

Purpose: Returns an input stream containing the report identified by the version ID. However, the authenticated user must have access to this report version, otherwise there will be a CasterException thrown. This function is accessible only to the authenticated user.

Input

Description

Type

Authentication information.

Authenticate

Version ID. Unique identifier for the version.

String

Output

Description

Type

Report output.

Byte



Example: Retrieving a Report Identified by the Version ID in Visual Basic .NET

In the following example, the output for a specific version of a report is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category. The getContent function is run to retrieve a list of versions for a specific report. The report is written to the Report.htm file.

'The following line must be included before the Form Class
Imports System.IO
Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retCat() As LCManager.Category
  Dim retContentArray() As LCManager.Content
  Dim retContent As LCManager.Content
  Dim retOutput() As Byte
  Dim newOutput As String
  Dim tempfile As String
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retCat = LC.getCategoryInfoList(LCAuthenticate)
  retContentArray = LC.getContentInfoList(LCAuthenticate, retCat(0))
  retContent = LC.getContent(LCAuthenticate, retContentArray(0).id)
  retOutput = LC.getAccessibleVersion(LCAuthenticate, _
                                      retContent.versionList(0).id)
  tempfile = "d:\RCtemp\Report.htm"
  Dim fs As FileStream = New FileStream(tempfile, FileMode.OpenOrCreate)
  Dim w As BinaryWriter = New BinaryWriter(fs)
  w.Write(retOutput, 0, retOutput.Length)
  fs.Close()
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving a Report Identified by the Version ID in Java

In the following example, the output for a specific version of a report is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category. The getContent function is run to retrieve a list of versions for a specific report. The report is written to the Report.htm file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoList(Authobj);
  Content retcontArray[] = LC.getContentInfoList(Authobj,retcat[0]);
  Content retcont = LC.getContent(Authobj,retcontArray[0].getId());
  byte[] retOutput = LC.getAccessibleVersion(Authobj,
                                             retcont.getVersionList()[0].getId());
  File outfile = new File("d:\\RCtemp\\Report.htm");
  FileOutputStream fs = new FileOutputStream(outfile);
  fs.write(retOutput);
  fs.close();
  }
  catch (Throwable t)
  {
         System.err.println(t);
         t.printStackTrace();
         System.exit(1);
}

Top of page

x
Retrieving Version Information as Identified by the Version ID

Function Name: getAccessibleVersionInfo

Purpose: Retrieves version information as identified by the version ID. As each version ID is unique, this function obtains only the designated version of content from the Report Library database. However, the authenticated user must have access to this report version, otherwise there will be a CasterException thrown. Because only information about this report version is needed, the actual report is not accessible via the information returned by this function. This function is accessible only to the authenticated user.

Input

Description

Type

Authentication information.

Authenticate

Version ID is the unique identifier for the version.

String

Output

Description

Type

Version information without access to the actual report.

Version



Example: Retrieving Version Information as Identified by the Version ID in Visual Basic .NET

In the following example, information about the output for a specific version of a report that user ID "admin" has access to is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category. The getContent function is run to retrieve a list of versions for a specific report. The version ID, version output format, version create date, and version expiration date are written to RCversionInfo.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retCat() As LCManager.Category
  Dim retContentArray() As LCManager.Content
  Dim retContent As LCManager.Content
  Dim retVersion As LCManager.Version
  Dim newOutput As String
  Dim tempfile As String
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retCat = LC.getCategoryInfoList(LCAuthenticate)
  retContentArray = LC.getContentInfoList(LCAuthenticate, retCat(0))
  retContent = LC.getContent(LCAuthenticate, retContentArray(0).id)
  retVersion = LC.getAccessibleVersionInfo(LCAuthenticate, _
                                           retContent.versionList(0).id)
  tempfile = "d:\RCtemp\RCversionInfo.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  newOutput = retVersion.id + " " + _
              retVersion.format + " " + _
              retVersion.createDate + " " + _
              retVersion.expireDate
  PrintLine(1, newOutput)
  FileClose(1) 
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving Version Information as Identified by the Version ID in Java

In the following example, information about the output for a specific version of a report that user ID "admin" has access to is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category. The getContent function is run to retrieve a list of versions for a specific report. The version ID, version output format, version create date, and version expiration date are written to RCversionInfo.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoList(Authobj);
  Content retcontArray[] = LC.getContentInfoList(Authobj,retcat[0]);
  Content retcont = LC.getContent(Authobj,retcontArray[0].getId());
  Version retver = LC.getAccessibleVersionInfo(Authobj,
                                               retcont.getVersionList()[0].getId());
  File tempfile = new File("d:\\RCtemp\\RCversionInfo.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
  SimpleDateFormat sdf = new SimpleDateFormat();
  String newOutput = retver.getId() + " " +
                     retver.getFormat() + " " +
                     sdf.format(retver.getCreateDate().getTime()) + " " +
                     sdf.format(retver.getExpireDate().getTime());
  out.println(newOutput);
  out.close();
  }
  catch (Throwable t)
  {
        System.err.println(t);
        t.printStackTrace();
        System.exit(1);
}

Top of page

x
Retrieving a List of Category Information

Function Name: getCategoryInfoList

Purpose: Retrieves a list of category information. Because only information about this report category is needed, the actual reports associated with the Categories are not retrieved. This function can be used by the administrator and the owner only.

Input

Description

Type

Authentication information.

Authenticate

Output

Description

Type

List of category information.

Category



Example: Retrieving a List of Category Information in Visual Basic .NET

In the following example, a list of categories is retrieved. The category ID and category name are written to the RCcategoryInfo.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retCat() As LCManager.Category
  Dim tempfile As String
  Dim newOutput As String
  Dim i As Integer
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retCat = LC.getCategoryInfoList(LCAuthenticate)
  tempfile = "d:\RCtemp\RCcategoryInfo.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  For i = 0 To retCat.Length - 1
          newOutput = retCat(i).id + " " + _
                      retCat(i).name
          PrintLine(1, newOutput)
  Next i
  FileClose(1)
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving a List of Category Information in Java

In the following example, a list of categories is retrieved. The category ID and category name are written to the RCcategoryInfo.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoList(Authobj);
  File tempfile = new File("d:\\RCtemp\\RCcategoryInfo.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
  for ( int i=0; i<retcat.length; i++ )
  {
        String newOutput = retcat[i].getId() + " " +
                           retcat[i].getName();
        out.println(newOutput);
  }
  out.close();
  }
  catch (Throwable t)
  {
         System.err.println(t);
         t.printStackTrace();
         System.exit(1);
  }

Top of page

x
Retrieving a List of Category Information for a Specific Owner

Function Name: getCategoryInfoListByOwner

Purpose: Retrieves a list of category information associated with a given ReportCaster user. Only those categories owned by the designated user are listed. Because only information about this report category is needed, the actual reports associated with the categories are not retrieved. This method can be used by the administrator and the owner only.

Input

Description

Type

Authentication information.

Authenticate

Report owner.

String

Output

Description

Type

List of category informations.

Category



Example: Retrieving a List of Category Information for a Specific Owner in Visual Basic .NET

In the following example, a list of categories for owner "admin" is retrieved. The category ID and category name are written to the RCcategoryInfoByOwner.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retCat() As LCManager.Category
  Dim tempfile As String
  Dim newOutput As String
  Dim i As Integer
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retCat = LC.getCategoryInfoListByOwner(LCAuthenticate, "admin")
  tempfile = "d:\RCtemp\RCcategoryInfoByOwner.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  For i = 0 To retCat.Length - 1
        newOutput = retCat(i).id + " " + _
                    retCat(i).name 
        PrintLine(1, newOutput)
  Next i
  FileClose(1)
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving a List of Category Information for a Specific Owner in Java

In the following example, a list of categories for owner "admin" is retrieved. The category ID and category name are written to the RCcategoryInfoByOwner.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoListByOwner(Authobj,"admin");
  File tempfile = new File("d:\\RCtemp\\RCcategoryInfoByOwner.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
  for ( int i=0; i<retcat.length; i++ )
  {
        String newOutput = retcat[i].getId() + " " +
                           retcat[i].getName();
        out.println(newOutput);
  }
  out.close();
  }
  catch (Throwable t)
  {
         System.err.println(t);
         t.printStackTrace();
         System.exit(1);
  }

Top of page

x
Retrieving the Content Information

Function Name: getContent

Purpose: Retrieves the content information as identified by the content ID. Because only information about this content is needed, the actual report associated with this content is not retrieved. However, the authenticated user must have access to this content, otherwise there will be a CasterException thrown. This function can be used by the administrator and the owner only.

Input

Description

Type

Authentication information.

Authenticate

The unique identifier of the content.

String

Output

Description

Type

Content information.

Content



Example: Retrieving Content Information in Visual Basic .NET

In the following example, information about the output for a specific report is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category. The content ID, content description, content access type, and number of versions are written to the RCcontent.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retCat() As LCManager.Category
  Dim retContentArray() As LCManager.Content
  Dim retContent As LCManager.Content
  Dim newOutput As String
  Dim tempfile As String
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retCat = LC.getCategoryInfoList(LCAuthenticate)
  retContentArray = LC.getContentInfoList(LCAuthenticate, retCat(0))
  retContent = LC.getContent(LCAuthenticate, retContentArray(0).id)
  tempfile = "d:\RCtemp\RCcontent.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  newOutput = retContent.id + " " + _
              retContent.description + " " + _
              retContent.accessType + " " + _
              Str(retContent.versionList.Length)
  PrintLine(1, newOutput)
  FileClose(1)
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving Content Information in Java

In the following example, information about the output for a specific report is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category. The content ID, content description, content access type, and number of versions are written to the RCcontent.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoList(Authobj);
  Content retcontArray[] = LC.getContentInfoList(Authobj,retcat[0]);
  Content retcont = LC.getContent(Authobj,retcontArray[0].getId());
  File tempfile = new File("d:\\RCtemp\\RCcontent.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
String newOutput = retcont.getId() + " " +
                   retcont.getDescription() + " " +
                   retcont.getAccessType() + " " +
                   retcont.getVersionList().length;
out.println(newOutput);
out.close();
}
catch (Throwable t)
{
       System.err.println(t);
       t.printStackTrace();
       System.exit(1);
}

Top of page

x
Retrieving the Content Identifier for a Specific Content Description

Function Name: getContentId

Purpose: Obtains the content identifier associated with a designated owner and a given content description string. The content ID serves as the primary key ReportCaster uses to store content information in the Report Library tables. The maximum size of the content description string is 90 characters. There are no permissions restrictions on this function.

Input

Description

Type

ReportCaster user name of the content owner.

String

Description of the content.

String

Output

Description

Type

Content ID.

String



Example: Retrieving the Content Identifier in Visual Basic .NET

In the following example, the content ID for a content description of "Conversion Rate-11/9/2004 2:19:57 PM" is retrieved and written to the RCcontentId.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retId As String
  Dim newOutput As String
  Dim tempfile As String
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retId = LC.getContentId(LCAuthenticate, "admin", _
                          "Conversion Rate-11/9/2004 2:19:57 PM")
  tempfile = "d:\RCtemp\RCcontentId.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  newOutput = retId 
  PrintLine(1, newOutput)
  FileClose(1)
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving the Content Identifier in Java

In the following example, the content ID for a content description of "Conversion Rate-11/9/2004 2:19:57 PM" is retrieved and written to the RCcontentId.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  String retId = LC.getContentId(Authobj,"admin",
                                 "Conversion Rate-11/9/2004 2:19:57 PM");
  File tempfile = new File("d:\\RCtemp\\RCcontentId.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
  String newOutput = retId;
  out.println(newOutput);
  out.close();
  }
  catch (Throwable t)
  {
        System.err.println(t);
        t.printStackTrace();
        System.exit(1);
  }

Top of page

x
Retrieving a List of Content Information Associated With the Given Category

Function Name: getContentInfoList

Purpose: Retrieves a list of content information associated with the given category. Because only information about this content is needed, the actual report associated with this content is not retrieved. This function can be used by the administrator and the owner only.

Input

Description

Type

Authentication information.

Authenticate

Reference to the category information.

Category

Output

Description

Type

List of content information.

Content



Example: Retrieving a List of Content Information in Visual Basic .NET

In the following example, a list of contents for a specific category is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The content ID, content description, and access type are written to the RCcontent.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retcat() As LCManager.Category
  Dim retContent() As LCManager.Content
  Dim newOutput As String
  Dim tempfile As String
  Dim i As Integer
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retcat = LC.getCategoryInfoList(LCAuthenticate)
  retContent = LC.getContentInfoList(LCAuthenticate, retcat(0))
  tempfile = "d:\RCtemp\RCcontent.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  For i = 0 To retContent.Length - 1
       newOutput = retContent(i).id + " " + _
                   retContent(i).description + " " + _
                   retContent(i).accessType
       PrintLine(1, newOutput)
  Next i
  FileClose(1)
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving a List of Content Information in Java

In the following example, a list of contents for a specific category is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The content ID, content description, and access type are written to the RCcontent.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoList(Authobj);
  Content retContent[] = LC.getContentInfoList(Authobj,
                                               retcat[0]);
  File tempfile = new File("d:\\RCtemp\\RCcontent.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
  for ( int i=0; i<retContent.length; i++ )
  {
        String newOutput = retContent[i].getId() + " " +
                           retContent[i].getDescription() + " " +
                           retContent[i].getAccessType();
        out.println(newOutput);
  }
out.close();
}
  catch (Throwable t)
  {
        System.err.println(t);
        t.printStackTrace();
        System.exit(1);
}

Top of page

x
Retrieving a List of Content Information Owned by the Authenticated User

Function Name: getContentInfoListByCaller

Purpose: Retrieves a list of content information identified with the given category and owned by the current authenticated user. Because only information about this content is needed, the actual report associated with this content is not retrieved. This function can be used by the administrator and the owner only.

Input

Description

Type

Authentication information.

Authenticate

Reference to category information.

Category

Output

Description

Type

List of content information.

Content



Example: Retrieving Content Information for the Authenticated User in Visual Basic .NET

In the following example, a list of contents for a specific category which is owned by user ID "admin" is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The content ID, content description, and access type are written to the RCcontentByCaller.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retcat() As LCManager.Category
  Dim retContent() As LCManager.Content
  Dim newOutput As String
  Dim tempfile As String
  Dim i As Integer
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retcat = LC.getCategoryInfoList(LCAuthenticate)
  retContent = LC.getContentInfoListByCaller(LCAuthenticate, retcat(0))
  tempfile = "d:\RCtemp\RCcontentByCaller.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  For i = 0 To retContent.Length - 1
        newOutput = retContent(i).id + " " + _
                    retContent(i).description + " " + _
                    retContent(i).accessType
        PrintLine(1, newOutput)
  Next i
  FileClose(1)   
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving Content Information for the Authenticated User in Java

In the following example, a list of contents for a specific category which is owned by user ID "admin" is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The content ID, content description, and access type are written to the RCcontentByCaller.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoList(Authobj);
  Content retContent[] = LC.getContentInfoListByCaller(Authobj,retcat[0]);
  File tempfile = new File("d:\\RCtemp\\RCcontentByCaller.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
  for ( int i=0; i<retContent.length; i++ )
  {
        String newOutput = retContent[i].getId() + " " +
                           retContent[i].getDescription() + " " +
                           retContent[i].getAccessType();
        out.println(newOutput);
  }
  out.close();
  }
  catch (Throwable t)
  {
         System.err.println(t);
         t.printStackTrace();
         System.exit(1);
  }

Top of page

x
Retrieving a List of Content Information Owned by the Specified ReportCasterUser ID

Function Name: getContentInfoListByOwner

Purpose: Retrieves a list of content information owned by the specified ReportCaster user ID within the specified category. Because only information about this content is needed, the actual report associated with this content is not retrieved. This function can be used by the administrator and the owner only.

Input

Description

Type

Authentication information.

Authenticate

Report owner.

String

Category information that is parent to the returned content.

Category

Output

Description

Type

List of content information.

Content



Example: Retrieving Content Information for a Specific ReportCaster User ID in Visual Basic .NET

In the following example, a list of contents for a specific category which is owned by user ID "admin" is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The content ID, content description, and access type are written to the RCcontentByOwner.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retcat() As LCManager.Category
  Dim retContent() As LCManager.Content
  Dim newOutput As String
  Dim tempfile As String
  Dim i As Integer
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retcat = LC.getCategoryInfoList(LCAuthenticate)
  retContent = LC.getContentInfoListByOwner(LCAuthenticate, "admin", _
                                            retcat(0))
  tempfile = "d:\RCtemp\RCcontentByOwner.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  For i = 0 To retContent.Length - 1
         newOutput = retContent(i).id + " " + _
                     retContent(i).description + " " + _
                     retContent(i).accessType
  PrintLine(1, newOutput)
  Next i
  FileClose(1) 
 
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving Content Information for a Specific ReportCaster User ID in Java

In the following example, a list of contents for a specific category which is owned by user ID "admin" is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The content ID, content description, and access type are written to the RCcontentByOwner.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoList(Authobj);
  Content retContent[] = LC.getContentInfoListByOwner(Authobj,"admin",
                                                      retcat[0]);
  File tempfile = new File("d:\\RCtemp\\RCcontentByOwner.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
  for ( int i=0; i<retContent.length; i++ )
  {
        String newOutput = retContent[i].getId() + " " +
                           retContent[i].getDescription() + " " +
                           retContent[i].getAccessType();
        out.println(newOutput);
  } 
  out.close();
  }
  catch (Throwable t)
  {
         System.err.println(t);
         t.printStackTrace();
         System.exit(1);
  }

Top of page

x
Retrieving a List of Content Information for a Managed Reporting Procedure

Function Name: getAccessibleContentInfoList

Purpose: Retrieves a list of content information accessible by the authenticated ReportCaster user ID for a specific WebFOCUS procedure within a Managed Reporting Domain. The content list will only include data for schedules that exist in the ReportCaster repository. The actual report associated with this content is not retrieved.

Input

Description

Type

Authentication information.

Authenticate

Domain HREF

The internal value for a domain assigned by Managed Reporting at the time the domain is created.

String

Procedure Name

The internal value for a WebFOCUS procedure assigned by Managed Reporting at the time the procedure is created. For example, app/ranking.

String

Output

Description

Type

A list of content information.

Content



Example: Retrieving Content Information for a Managed Reporting Procedure in Visual Basic .NET

In the following example, a list of content information for a specific WebFOCUS procedure within Managed Reporting accessible by the authenticated user is retrieved. The content ID, content description, and schedule ID are written to the RCaccessibleContentInfoList.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retContent() As LCManager.Content
  Dim newOutput As String
  Dim tempfile As String
  Dim i As Integer
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retContent = LC.getAccessibleContentInfoList(LCAuthenticate, _
                     "webservi/webservi.htm", "app/ranking")
  tempfile = "c:\RCtemp\RCaccessibleContentInfoList.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  For i = 0 To retContent.Length - 1
        newOutput = retContent(i).id + " " + _
        retContent(i).description + " " + _
        retContent(i).scheduleId
        PrintLine(1, newOutput)
  Next i
  FileClose(1)
  Catch x As Exception
           MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try


Example: Retrieving Content Information for a Managed Reporting Procedure in Java

In the following example, a list of content information for a specific WebFOCUS procedure within Managed Reporting accessible by the authenticated user is retrieved. The content ID, content description, and schedule ID are written to the RCaccessibleContentInfoList.txt file.

try
{
LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
LogonManagerWS RCLogon = LogonService.getLogonService();
LibraryContentManagerWSService LCService = new 
LibraryContentManagerWSServiceLocator();
LibraryContentManagerWS LC = LCService.getLibraryContentService();
String sectoken = RCLogon.logon("admin","");
Authenticate Authobj = new Authenticate();
Authobj.setSecurityToken(sectoken);
Content retContent[] = LC.getAccessibleContentInfoList(Authobj,
                                             "webservi/webservi.htm",
                                             "app/ranking");
File tempfile = new File("c:\\RCtemp\\RCaccessibleContentInfoList.txt");
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
for ( int i=0; i<retContent.length; i++ )
{
      String newOutput = retContent[i].getId() + " " +
      retContent[i].getDescription() + " " +
      retContent[i].getScheduleId();
      out.println(newOutput);
}
out.close();
}
catch (Throwable t)
{
      System.err.println(t);
      t.printStackTrace();
      System.exit(1);
}

Top of page

x
Retrieving the Latest Content Information for a WebFOCUS Procedure

Function Name: getLatestAccessibleContent

Purpose: Retrieves the latest content information accessible by the authenticated ReportCaster user ID for a specific WebFOCUS procedure. For a WebFOCUS Server Procedure, all Library schedules are searched to match the Server Name, Procedure Name, and the Name/Value pairs of the parameters. For a Managed Reporting Procedure, all Library schedules are searched to match the Domain, Folder, Procedure Name, and the Name/Value pairs of the parameters. The Content information created by the last run schedule which met the match criteria is returned. The content will only include data if the schedule exists in the ReportCaster repository. The actual report associated with this content is not retrieved.

Input

Description

Type

Authentication information.

Authenticate

Task information defining the Reporting Server, Application, Procedure Name and Parameters for a WebFOCUS Server Procedure

or

Task information defining the Managed Reporting internal value for a Domain, Folder, and Procedure Name together with the procedure parameters

Schedule

Output

Description

Type

Content information.

Content



Example: Retrieving the Latest Content Information for a WebFOCUS Procedure in Visual Basic .NET

In the following example, the latest content information for a specific WebFOCUS procedure accessible by the authenticated user is retrieved. The content ID, content description, and schedule ID are written to the RClatestAccessibleContent.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retContent As LCManager.Content
  Dim mySchedule As New LCManager.Schedule
  Dim task1 As New LCManager.TaskStandardReport
  Dim myTasks As Array = _
       Array.CreateInstance(GetType(LCManager.TaskStandardReport), 1)
  Dim newOutput As String
  Dim tempfile As String
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  Dim params As Array = _
       Array.CreateInstance(GetType(LCManager.Parameter), 3)
  Dim param1 As New LCManager.Parameter
  param1.name = "OUTPUT"
  param1.value = "HTML"
  params(0) = param1
  Dim param2 As New LCManager.Parameter
  param2.name = "PLANT"
  param2.value = "All"
  params(1) = param2
  Dim param3 As New LCManager.Parameter
  param3.name = "DIMENSION"
  param3.value = "PLANT"
  params(2) = param3
  task1.domainHREF = "webservi/webservi.htm"
  task1.folderHREF = "#wsdemoreport"
  task1.procedureName = "app/ranking"
  task1.parameterList = params
  myTasks(0) = task1
  mySchedule.taskList = myTasks
  retContent = LC.getLatestAccessibleContent(LCAuthenticate, mySchedule)
  tempfile = "c:\RCtemp\RClatestAccessibleContent.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  newOutput = retContent.id + " " + _
              retContent.description + " " + _
              retContent.scheduleId
  PrintLine(1, newOutput)
  FileClose(1)
  Catch x As Exception
           MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving the Latest Content Information for a WebFOCUS Procedure in Java

In the following example, a list of contents for a specific Managed Reporting WebFOCUS procedure accessible by the authenticated user is retrieved. The content ID, content description, and schedule ID are written to the RClatestAccessibleContent.txt file.

try
{
LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
LogonManagerWS RCLogon = LogonService.getLogonService();
LibraryContentManagerWSService LCService = new 
LibraryContentManagerWSServiceLocator();
LibraryContentManagerWS LC = LCService.getLibraryContentService();
String sectoken = RCLogon.logon("admin","");
Authenticate Authobj = new Authenticate();
Authobj.setSecurityToken(sectoken);
Parameter[] params;
params = new Parameter[3];
Parameter param1 = new Parameter();
param1.setName("OUTPUT");
param1.setValue("HTML");
params[0]=param1;
Parameter param2 = new Parameter();
param2.setName("PLANT");
param2.setValue("All");
params[1]=param2;
Parameter param3 = new Parameter();
param3.setName("DIMENSION");
param3.setValue("PLANT");
params[2]=param3;
TaskStandardReport[] myTasks;
myTasks = new TaskStandardReport[1];
TaskStandardReport task1 = new TaskStandardReport();
task1.setDomainHREF("webservi/webservi.htm");
task1.setFolderHREF("#wsdemoreport");
task1.setParameterList(params);
task1.setProcedureName("app/ranking");
myTasks[0] = task1;
Schedule mySchedule = new Schedule();
mySchedule.setTaskList(myTasks);
Content retContent = LC.getLatestAccessibleContent(Authobj, mySchedule);
File tempfile = new File("c:\\RCtemp\\ RClatestAccessibleContent.txt");
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
String newOutput = retContent.getId() + " " +
                   retContent.getDescription() + " " +
                   retContent.getScheduleId();
out.println(newOutput);
out.close(); 
}
catch (Throwable t)
{
      System.err.println(t);
      t.printStackTrace();
      System.exit(1);
} 

Top of page

x
Retrieving a List of Managed Reporting Procedures

Function Name: getAccessibleReportList

Purpose: Retrieves a list of Managed Reporting procedures for a specific Domain and Folder accessible by the authenticated ReportCaster user ID. All library schedules are searched to retrieve the Report list.

Input

Description

Type

Authentication information.

Authenticate

Domain HREF

The internal value for a domain assigned by Managed Reporting at the time the domain is created.

String

Folder HREF

The internal value for a folder assigned by Managed Reporting at the time the folder is created.

String

Output

Description

Type

Report list

Each entry contains the internal value for the WebFOCUS procedure assigned by Managed Reporting at the time the procedure is created. For example, app/ranking.

String



Example: Retrieving a List of Managed Reporting Procedures in Visual Basic .NET

In the following example, a Report list for a specific Domain and Folder accessible by the authenticated user is retrieved. The list is written to the RCaccessibleReportList.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retList() As String
  Dim newOutput As String
  Dim tempfile As String
  Dim i As Integer
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retList = LC.getAccessibleReportList(LCAuthenticate, _
                                       "webservi/webservi.htm", _
                                       "#wsdemoreport")
  tempfile = "c:\RCtemp\RCaccessibleReportList.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  For i = 0 To retList.Length - 1
          newOutput = retList(i)
          PrintLine(1, newOutput)
  Next i
  FileClose(1)
  Catch x As Exception
           MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving a List of Managed Reporting Procedures in Java

In the following example, a Report list for a specific Domain and Folder accessible by the authenticated user is retrieved. The list is written to the RCaccessibleReportList.txt file.

try
{
LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
LogonManagerWS RCLogon = LogonService.getLogonService();
LibraryContentManagerWSService LCService = new
LibraryContentManagerWSServiceLocator();
LibraryContentManagerWS LC = LCService.getLibraryContentService();
String sectoken = RCLogon.logon("admin","");
Authenticate Authobj = new Authenticate();
Authobj.setSecurityToken(sectoken);
String[] retList = LC.getAccessibleReportList(Authobj,
                                              "webservi/webservi.htm",
                                              "#wsdemoreport");
File tempfile = new File("c:\\RCtemp\\RCaccessibleReportList.txt");
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
for ( int i=0; i<retList.length; i++ )
{
      String newOutput = retList[i];
      out.println(newOutput);
}
out.close();
}
catch (Throwable t)
{
      System.err.println(t);
      t.printStackTrace();
      System.exit(1);
} 

Top of page

x
Retrieving a List of Users Who Have Owner Access to Report Library Content

Function Name: getOwnerList

Purpose: Retrieves a list of all users who have owner access to Report Library content on the Distribution Server. This function can be used by the administrator and the owner only.

Input

Description

Type

Authentication information.

Authenticate

Output

Description

Type

A list of owners.

String



Example: Retrieving a List of Users Who Have Owner Access to Report Library Content in Visual Basic .NET

In the following example, a list of output owners is retrieved and written to the RCowners.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retOwners() As String
  Dim newOutput As String
  Dim tempfile As String
  Dim i As Integer
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retOwners = LC.getOwnerList(LCAuthenticate)
  tempfile = "d:\RCtemp\RCowners.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  For i = 0 To retOwners.Length - 1
        newOutput = retOwners(i)
        PrintLine(1, newOutput)
  Next i
  FileClose(1) 
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving a List of Users Who Have Owner Access to Report Library Content in Java

In the following example, a list of output owners is retrieved and written to the RCowners.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  String retOwners[] = LC.getOwnerList(Authobj);
  File tempfile = new File("d:\\RCtemp\\RCowners.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
  for ( int i=0; i<retOwners.length; i++ )
  {
        String newOutput = retOwners[i];
        out.println(newOutput);
  }
  out.close();
  }
  catch (Throwable t)
  {
         System.err.println(t);
         t.printStackTrace();
         System.exit(1);
  }

Top of page

x
Retrieving the Version Information As Identified by the Version ID

Function Name: getVersion

Purpose: Retrieves the version information as identified by the version ID. Because only information about this version is needed, the actual report associated with this version is not retrieved. However, the authenticated user must have access to this report version otherwise there will be a CasterException thrown. The getVersion function can be used by the administrator and the owner only.

Input

Description

Type

Authentication information.

Authenticate

The unique identifier of this version.

String

Output

Description

Type

Version information.

Version



Example: Retrieving Version Information in Visual Basic .NET

In the following example, information about the output for a specific version of a report is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category. The getContent function is run to retrieve a list of versions for a specific report. The Version ID, version output format, version create date, and version expiration date are written to the RCversion.txt file.

Try
  Dim RCLogon As New LogonManager.LogonManagerWSService
  Dim LC As New LCManager.LibraryContentManagerWSService
  Dim SecToken As String
  Dim LCAuthenticate As New LCManager.Authenticate
  Dim retCat() As LCManager.Category
  Dim retContentArray() As LCManager.Content
  Dim retContent As LCManager.Content
  Dim retVersion As LCManager.Version
  Dim newOutput As String
  Dim tempfile As String
  SecToken = RCLogon.logon("admin", "")
  LCAuthenticate.securityToken = SecToken
  retCat = LC.getCategoryInfoList(LCAuthenticate)
  retContentArray = LC.getContentInfoList(LCAuthenticate, retCat(0))
  retContent = LC.getContent(LCAuthenticate, retContentArray(0).id)
  retVersion = LC.getVersion(LCAuthenticate, retContent.versionList(0).id)
  tempfile = "d:\RCtemp\RCversion.txt"
  FileOpen(1, tempfile, OpenMode.Output)
  newOutput = retVersion.id + " " + _
              retVersion.format + " " + _
              retVersion.createDate + " " + _
              retVersion.expireDate
  PrintLine(1, newOutput)
  FileClose(1)
  
  Catch x As Exception
       MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try 


Example: Retrieving Version Information in Java

In the following example, information about the output for a specific version of a report is retrieved. The getCategoryInfoList function is run first to retrieve a list of categories. The getContentInfoList function is run to retrieve a list of contents for a specific category. The getContent function is run to retrieve a list of versions for a specific report. The Version ID, version output format, version create date, and version expiration date are written to the RCversion.txt file.

try
  {
  LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
  LogonManagerWS RCLogon = LogonService.getLogonService();
  LibraryContentManagerWSService LCService = new LibraryContentManagerWSServiceLocator();
  LibraryContentManagerWS LC = LCService.getLibraryContentService();
  String sectoken = RCLogon.logon("admin","");
  Authenticate Authobj = new Authenticate();
  Authobj.setSecurityToken(sectoken);
  Category retcat[] = LC.getCategoryInfoList(Authobj);
  Content retcontArray[] = LC.getContentInfoList(Authobj,retcat[0]);
  Content retcont = LC.getContent(Authobj,retcontArray[0].getId());
  Version retver = LC.getVersion(Authobj,retcont.getVersionList()[0].getId());
  File tempfile = new File("d:\\RCtemp\\RCversion.txt");
  FileOutputStream fos = new FileOutputStream(tempfile);
  PrintWriter out=new PrintWriter(fos);
  SimpleDateFormat sdf = new SimpleDateFormat();
  String newOutput = retver.getId() + " " +
                     retver.getFormat() + " " +
                     sdf.format(retver.getCreateDate().getTime()) + " " +
                     sdf.format(retver.getExpireDate().getTime());
  out.println(newOutput);
  out.close();
  }
  catch (Throwable t)
  {
        System.err.println(t);
        t.printStackTrace();
        System.exit(1);
}

WebFOCUS