Style Intelligence v12.0

inetsoft.sree.soap
Class SoapRepository

java.lang.Object
  extended by inetsoft.sree.soap.SoapRepository
All Implemented Interfaces:
SoapRepositoryService

public class SoapRepository
extends Object
implements SoapRepositoryService

Soap Service for the RepletRepository.


Field Summary
static String AUTHENTICATION_FAILURE
           
static String LOGIN_FAILURE
           
 
Constructor Summary
SoapRepository()
          Default Constructor.
 
Method Summary
 boolean deleteReplet(String ticket, RepositoryEntryStruct entryst)
          Delete a replet.
 boolean deleteRepletByName(String ticket, String name)
          Delete a replet.
 void destroyReplet(String ticket, String repletId)
          Destroy a replet instance.
 String executeReplet(String ticket, String name, RepletType type, RepletRequestStruct requestStruct)
          Execute a replet and store it in a server side cache.
 String export(String ticket, String repletId, FormatType format)
          Export a replet to the specified format.
 inetsoft.sree.soap.store.ArchiveOptionType getArchiveOption(String ticket)
          Get the type of archive that is supported.
 String getArchiveReport(String ticket, String path, String ver)
          Get the a archive report with the name.
 RepositoryEntryStruct[] getFolders(String ticket, String permission)
          Get the list of all folders.
 int getPageCount(String ticket, String repletId)
          Get the number of pages in a report.
 String[] getPrinters(String ticket)
          Get the names of all printers available to the server.
 String[] getPrototypes(String ticket)
          Get the names of all prototypes.
 RepletParametersStruct getRepletParameters(String ticket, String repletName)
          Get the parameters of a replet.
 RepositoryEntryStruct[] getReplets(String ticket, String permission)
          Get the list of all replets.
 RepositoryEntryStruct[] getRepositoryEntries(String ticket, String folder, String permission, EntryType selector)
          Get available repository entries.
 long getResourceLength(String ticket, String resourceID)
          Get the size, in bytes, of the specified resource.
 inetsoft.sree.soap.schedule.ScheduleTaskStruct getScheduledTask(String ticket, String name)
          Get the scheduled task with a specific name.
 String[] getScheduleTasks(String ticket)
          Get a list of schedule tasks available to the specified user.
 String login(String username, String password, String locale)
          Login returns a ticket for client use in subsequent communications with the server.
 void logout(String ticket)
          Log off a user.
 boolean mailTo(String ticket, String repletId, String recipients, String from, String subject, String msg, FormatType fmt)
          Send a replet via email.
 byte[] nextBlock(String ticket, String resourceID)
          Get the next block of data in a specified resource.
 void print(String ticket, String repletId, String printer, int[] pageList)
          Print a range of pages of a replet to the specified server printer.
 void removeScheduleTask(String ticket, String name)
          Remove a scheduled task.
 void saveInArchive(String ticket, String repletId, String path, FormatType format, inetsoft.sree.soap.security.PermissionStruct permissionStruct, inetsoft.sree.soap.store.ArchiveRuleStruct ruleStruct, String comment)
          Save a replet instance in the report archive.
 void setScheduleTask(String ticket, String name, inetsoft.sree.soap.schedule.ScheduleTaskStruct taskStruct)
          Save a schedule task.
 void updateScheduledTask(String ticket, String name, inetsoft.sree.soap.schedule.ScheduleTaskStruct taskStruct)
          Update a schedule task (overwrite it)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGIN_FAILURE

public static final String LOGIN_FAILURE
See Also:
Constant Field Values

AUTHENTICATION_FAILURE

public static final String AUTHENTICATION_FAILURE
See Also:
Constant Field Values
Constructor Detail

SoapRepository

public SoapRepository()
Default Constructor.

Method Detail

login

public String login(String username,
                    String password,
                    String locale)
Login returns a ticket for client use in subsequent communications with the server. This ticket is used to refer to a Principal object stored in the server. Every other web method will require the client to have previously logged in

Specified by:
login in interface SoapRepositoryService
Parameters:
username - A registered username. If security is turned off, this can be any value except null.
password - Corresponding password for the username. If security is turned off, this can be any value except null.
locale - the locale of the user.
Returns:
session ticket. This ticket is required when calling any other web methods defined in this service.

logout

public void logout(String ticket)
Log off a user. Invalidates the session ticket passed as a parameter

Specified by:
logout in interface SoapRepositoryService
Parameters:
ticket - This ticket will be permanently invalidated and removed from the system.

executeReplet

public String executeReplet(String ticket,
                            String name,
                            RepletType type,
                            RepletRequestStruct requestStruct)
Execute a replet and store it in a server side cache.

Specified by:
executeReplet in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
name - the name of the replet to create.
type - the type of replet being created.
requestStruct - a RepletRequest object containing the report parameters.
Returns:
RepletID for use in subsequent transactions

destroyReplet

public void destroyReplet(String ticket,
                          String repletId)
Destroy a replet instance. If the specified replet is in the process of generating pages, it is interrupted.

Specified by:
destroyReplet in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
repletId - the replet instance ID.

getPageCount

public int getPageCount(String ticket,
                        String repletId)
Get the number of pages in a report.

Specified by:
getPageCount in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
repletId - the replet instance ID.
Returns:
the number of pages in the report.

mailTo

public boolean mailTo(String ticket,
                      String repletId,
                      String recipients,
                      String from,
                      String subject,
                      String msg,
                      FormatType fmt)
Send a replet via email.

Specified by:
mailTo in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
repletId - the instance ID of the replet to send.
recipients - the email address(es) of the recipients of the email message.
from - the from text of the email header.
subject - the subject line of the email message.
msg - the body text of the email message.
fmt - the file format in which to send the report. Allowed values are the file format constants defined in FormatEnum.

export

public String export(String ticket,
                     String repletId,
                     FormatType format)
Export a replet to the specified format. The exported file is cached internally. The cached file can be retrieved by calling the nextBlock method with the returned resource ID.

Specified by:
export in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
repletId - the instance ID of the replet to export.
format - the file format in which to export the replet. This must be one of the file format constants defined in FormatEnum.
Returns:
the resource ID of the exported file.

getResourceLength

public long getResourceLength(String ticket,
                              String resourceID)
Get the size, in bytes, of the specified resource.

Specified by:
getResourceLength in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
resourceID - the ID of the resource, as returned by the export method.
Returns:
the size of the resource.

nextBlock

public byte[] nextBlock(String ticket,
                        String resourceID)
Get the next block of data in a specified resource.

Specified by:
nextBlock in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
resourceID - the ID of the resource, as returned by the export method.
Returns:
the next block of bytes, or null if no more data is available.

getPrinters

public String[] getPrinters(String ticket)
Get the names of all printers available to the server.

Specified by:
getPrinters in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
Returns:
the list of all available printers.

print

public void print(String ticket,
                  String repletId,
                  String printer,
                  int[] pageList)
Print a range of pages of a replet to the specified server printer.

Specified by:
print in interface SoapRepositoryService
Parameters:
repletId - the instance ID of the replet to print.
printer - the name of the printer on which to print the replet.
pageList - the indexes of the pages to print. If this parameter is null, all pages will be printed.
Throws:
RepletException - if the replet could not be printed.
RemoteException - if an unspecified error occurs.

getArchiveOption

public inetsoft.sree.soap.store.ArchiveOptionType getArchiveOption(String ticket)
Get the type of archive that is supported.

Specified by:
getArchiveOption in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
Returns:
NO_ARCHIVE, DEFAULT_ARCHIVE, or VERSIONED_ARCHIVE.

saveInArchive

public void saveInArchive(String ticket,
                          String repletId,
                          String path,
                          FormatType format,
                          inetsoft.sree.soap.security.PermissionStruct permissionStruct,
                          inetsoft.sree.soap.store.ArchiveRuleStruct ruleStruct,
                          String comment)
Save a replet instance in the report archive.

Specified by:
saveInArchive in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
repletId - the replet instance ID.
path - the archive path to which to save the report.
format - the file format in which to save the report. This must be one of the file formats defined in FormatEnum.
permissionStruct - the permission to be granted on the saved report.
ruleStruct - the archive rule for the saved report.
comment - a description of the saved report.

getScheduledTask

public inetsoft.sree.soap.schedule.ScheduleTaskStruct getScheduledTask(String ticket,
                                                                       String name)
Get the scheduled task with a specific name.

Specified by:
getScheduledTask in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
name - The name if the task.
Returns:
a ScheduleTaskStruct

getArchiveReport

public String getArchiveReport(String ticket,
                               String path,
                               String ver)
Get the a archive report with the name.

Specified by:
getArchiveReport in interface SoapRepositoryService
Parameters:
ticket - authentication ticket.
path - archived report path.
ver - archived report version, will be ignored if not using versioned archive. Pass null that case.
Returns:
string id representing archived report.

getScheduleTasks

public String[] getScheduleTasks(String ticket)
Get a list of schedule tasks available to the specified user.

Specified by:
getScheduleTasks in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
Returns:
a list of task names.

setScheduleTask

public void setScheduleTask(String ticket,
                            String name,
                            inetsoft.sree.soap.schedule.ScheduleTaskStruct taskStruct)
Save a schedule task.

Specified by:
setScheduleTask in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
name - the name of the saved task.
taskStruct - the ScheduleTask object to save.

updateScheduledTask

public void updateScheduledTask(String ticket,
                                String name,
                                inetsoft.sree.soap.schedule.ScheduleTaskStruct taskStruct)
Update a schedule task (overwrite it)

Specified by:
updateScheduledTask in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
name - the name of the saved task.
taskStruct - the ScheduleTask object to save.

removeScheduleTask

public void removeScheduleTask(String ticket,
                               String name)
Remove a scheduled task.

Specified by:
removeScheduleTask in interface SoapRepositoryService
Parameters:
ticket - A valid ticket obtained upon successful login.
name - the name of the task to remove.

getFolders

public RepositoryEntryStruct[] getFolders(String ticket,
                                          String permission)
Get the list of all folders.

Specified by:
getFolders in interface SoapRepositoryService
Parameters:
ticket - the valid ticket obtained upon successful login.
permission - the permissions the user must have on a folder in order for it to be returned. Should be a combination of 'r', 'w', and 'd', which stand for read, write, and delete respectively. If this parameter is null, all folders that the user has any permission on are returned.
Returns:
a list of RepositoryEntry objects that represent the folders that are registered.
Throws:
RemoteException - if an error occurs while getting the folder list.

getReplets

public RepositoryEntryStruct[] getReplets(String ticket,
                                          String permission)
Get the list of all replets.

Specified by:
getReplets in interface SoapRepositoryService
Parameters:
ticket - the valid ticket obtained upon successful login.
permission - the permissions the user must have on a replet in order for it to be returned. Should be a combination of 'r', 'w', and 'd', which stand for read, write, and delete respectively. If this parameter is null, all replets that the user has any permission on are returned.
Returns:
a list of RepositoryEntry objects that represent the replets that are registered.
Throws:
RemoteException - if an error occurs while getting the replet list.

getRepositoryEntries

public RepositoryEntryStruct[] getRepositoryEntries(String ticket,
                                                    String folder,
                                                    String permission,
                                                    EntryType selector)
Get available repository entries.

Specified by:
getRepositoryEntries in interface SoapRepositoryService
Parameters:
ticket - the valid ticket obtained upon successful login.
folder - the specified parent folder.
permission - the permissions the user must have on an entry in order for it to be returned. Should be a combination of 'r', 'w', and 'd', which stand for read, write, and delete respectively. If this parameter is null, all entries that the user has any permission on are returned.
selector - the specified selector, should be one of the repository entry types predefined in RepositoryEntry like FOLDER. The selector may be an OR combination of the types as well.

deleteRepletByName

public boolean deleteRepletByName(String ticket,
                                  String name)
Delete a replet.

Specified by:
deleteRepletByName in interface SoapRepositoryService
Parameters:
ticket - the valid ticket obtained upon successful login.
name - the path of the replet.

deleteReplet

public boolean deleteReplet(String ticket,
                            RepositoryEntryStruct entryst)
Delete a replet.

Specified by:
deleteReplet in interface SoapRepositoryService
Parameters:
ticket - the valid ticket obtained upon successful login.
entryst - the repository entry struct.

getRepletParameters

public RepletParametersStruct getRepletParameters(String ticket,
                                                  String repletName)
Get the parameters of a replet.

Specified by:
getRepletParameters in interface SoapRepositoryService
Parameters:
ticket - the valid ticket obtained upon successful login.
repletName - the replet name.

getPrototypes

public String[] getPrototypes(String ticket)
Get the names of all prototypes.

Specified by:
getPrototypes in interface SoapRepositoryService
Parameters:
ticket - the valid ticket obtained upon successful login.

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.