ibi.broker.api.cci
Interface LogManager

All Known Implementing Classes:
LogManagerClientSF

public interface LogManager

 This interface provides a way of managing log functionality within 
 ReportCaster. When a scheduled job is distributed by the ReportCaster 
 Distribution Server, a log of all activity relating to this process is 
 stored in the ReportCaster Repository. The LogManager interface enables 
 a ReportCaster administrator to directly access logs and delete recorded 
 information based primarily upon schedule owner, ProcessId, and ScheduleId.
 The following code shows the instantiation of a LogManager object.
 
 Note: If you are using the ReportCaster API with a FOCUS repository, and you 
 attempt to purge log files using LogManager methods without specifying start 
 or end times (null), you will receive an error message. You must specify start 
 and end time values to successfully purge log files.  

 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      
 +  Copyright (c) 2004 Information Builders, Inc. All  Rights Reserved.     +      
 +                                                                          +      
 +  Information Builders offers sample API programs as a heuristic device.  +      
 +  They are not intended, as is, for production use. Licensed users are    +      
 +  welcome to alter and extend these samples and deploy them in other      +      
 +  environments, or alternate configurations, as they see fit.             +      
 +  Information Builders will support the documented functionality of       +      
 +  its API classes and methods. However, Information Builders is not       +      
 +  responsible for functionality or behavior of products built with        +      
 +  its API unless the documented behavior of its discrete classes and      +      
 +  methods is different than the actual results.                           +      
 +                                                                          +      
 +  Redistributions of IBI source code and documentation must be within     +      
 +  the scope of the Information Builders Software License Agreement.       +      
 +                                                                          +      
 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      


 CasterManagedConnectionFactory managedConnectionFactory = new CasterManagedConnectionFactory();
 managedConnectionFactory.setServerName(host);//the name of the server running the distribution server
 managedConnectionFactory.setPortNumber(port);//the port the distribution server is listening
 CasterConnectionFactory connectionFactory = (CasterConnectionFactory)managedConnectionFactory.createConnectionFactory();
 ConnectionSpec credential = new PasswordCredential(user, password.toCharArray());
    //This can be any of the credential objects. It is assumed here the user String has been assigned earlier
   // and that password, also assigned earlier, is a String that needs to be converted to a character Array.
 CasterConnection connectionObject = ((CasterConnection)connectionFactory.getConnection(credential));
 LogManager manager = connectionObject.getLogManager();
        

Version:
5.3

Method Summary
 void deleteLogByJobId(java.lang.String jobId)
          Deletes a specific log record as identified by its unique job ID from the underlying repository.
 int deleteLogList(java.util.Calendar startTime, java.util.Calendar endTime)
          Deletes the log records from the underlying repository pertaining to all schedules which were run between a specified time interval delineated by startTime and endTime.
 int deleteLogListByOwner(java.lang.String owner, java.util.Calendar startTime, java.util.Calendar endTime)
          Deletes the log records from the underlying repository pertaining to all schedules owned by the specified user, and which were run between a specified time interval delineated by startTime and endTime.
 void deleteLogListByScheduleId(java.lang.String scheduleId)
          Deletes log records from the underlying ReportCaster repository associated with a specified schedule as identified by the passed scheduleId.
 void deleteLogListByScheduleIdByCalendar(java.lang.String scheduleId, java.util.Calendar startTime, java.util.Calendar endTime)
          Deletes the log records from the underlying repository pertaining to a specific scheduleID and to only those log jobs which were run between a specified time interval, delineated by startTime and endTime.
 DsLog getLastLogByScheduleId(java.lang.String scheduleId)
          Retrieves a DsLog object, the components of which are taken from the ReportCaster repository as identified by the specified scheduleId (see Schedule.getId()).
 DsLog getLogByJobId(java.lang.String jobId)
          Retrieves a DsLog object, the components of which are taken from the underlying ReportCaster repository as identified by the specified jobId.
 DsLog[] getLogInfoListByOwner(java.lang.String owner)
          Retrieves an Array of partially setDslog objects for a specified owner (ie, logs of all schedule runs for a designated owner).
 DsLog[] getLogInfoListByOwnerByCalendar(java.lang.String owner, java.util.Calendar startTime, java.util.Calendar endTime)
          Retrieves an Array of partially set Dslog objects with a specified owner (ie, logs of all schedule runs for a designated owner), where the jobs were run during a specified time interval (delineated by startTime and endTime).
 DsLog[] getLogInfoListByScheduleId(java.lang.String scheduleId)
          Retrieves an Array of partially set Dslog objects for a specified scheduleId (ie, logs for all the runs of a designated schedule).
 DsLog[] getLogListByScheduleId(java.lang.String scheduleId)
           
 java.lang.String[] getOwnerList()
          Retrieves a String Array representing the schedule owner list from the ReportCaster repository.
 

Method Detail

getOwnerList

java.lang.String[] getOwnerList()
                                throws CasterException
Retrieves a String Array representing the schedule owner list from the ReportCaster repository. The owner list contains the usernames of individuals who have created schedules or have the right to create schedules in ReportCaster. This method is only available to the administrator.

Returns:
String array (String[] ) of schedule owners.
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

getLogByJobId

DsLog getLogByJobId(java.lang.String jobId)
                    throws CasterException
Retrieves a DsLog object, the components of which are taken from the underlying ReportCaster repository as identified by the specified jobId. The jobId uniquely identifies a log record for a scheduled distribution in the repository. This method is only available to the administrator and the Log owner.

Parameters:
jobId - unique identifier of the Dslog instance.
Returns:
A DsLog object.
Throws:
CasterException - If a database access error occurs or DsLog with processId doesn't exist or there is no permission to access this method.

getLastLogByScheduleId

DsLog getLastLogByScheduleId(java.lang.String scheduleId)
                             throws CasterException
Retrieves a DsLog object, the components of which are taken from the ReportCaster repository as identified by the specified scheduleId (see Schedule.getId()). This method returns only that instance of Dslog that has the most recent timestamp as represented by the startTime (see Dslog.getStartTime() of the schedule. This method is only available to the administrator and the Log owner.

Parameters:
scheduleId - The identifier of a specific Schedule.
Returns:
A DsLog object.
Throws:
CasterException - If a database access error occurs or DsLog with scheduleId doesn't exist or there is no permission to access this method.

getLogInfoListByScheduleId

DsLog[] getLogInfoListByScheduleId(java.lang.String scheduleId)
                                   throws CasterException
Retrieves an Array of partially set Dslog objects for a specified scheduleId (ie, logs for all the runs of a designated schedule). Although each DsLog parent object potentially has many associated DsLogElement children, for the purposes of performance the values of the DsLogElements associated with Dslog are set to NULL within this method. This method is only available to the administrator and the Log owner.

Parameters:
scheduleId - The unique identifier of a Schedule.
Returns:
Array of partial DsLog objects (DsLog[]).
Throws:
CasterException - If a database access error occurs or A log with scheduleId doesn't exist or there is no permission to access this method.

getLogListByScheduleId

DsLog[] getLogListByScheduleId(java.lang.String scheduleId)
                               throws CasterException
Throws:
CasterException

getLogInfoListByOwner

DsLog[] getLogInfoListByOwner(java.lang.String owner)
                              throws CasterException
Retrieves an Array of partially setDslog objects for a specified owner (ie, logs of all schedule runs for a designated owner). Although each DsLog parent object potentially has many associated DsLogElement children, for the purposes of performance the values of the DsLogElements associated with Dslog are set to NULL within this method. This method is only available to the administrator and the Log owner.

Parameters:
owner - ReportCaster username of schedule owner.
Returns:
Array of partial DsLog objects (DsLog[]).
Throws:
CasterException - If a database access error occurs or the owner doesn't or there is no permission to access this method.

getLogInfoListByOwnerByCalendar

DsLog[] getLogInfoListByOwnerByCalendar(java.lang.String owner,
                                        java.util.Calendar startTime,
                                        java.util.Calendar endTime)
                                        throws CasterException
Retrieves an Array of partially set Dslog objects with a specified owner (ie, logs of all schedule runs for a designated owner), where the jobs were run during a specified time interval (delineated by startTime and endTime). Although each DsLog parent object potentially has many associated DsLogElement children, for the purposes of performance the values of the DsLogElements associated with Dslog are set to NULL within this method. If startTime = NULL this retrieves all log records before endTime. If endTime = NULL this retrieves all log records after startTime. This method is only available to the administrator and the Log owner.

Parameters:
owner - ReportCaster username of schedule owner.
startTime - Start position of time interval.
endTime - End position of time interval.
Returns:
Array of (DsLog[]) objects.
Throws:
CasterException - If a database access error occur, the owner doesn't exist or there is no permission to access this method.

deleteLogListByScheduleId

void deleteLogListByScheduleId(java.lang.String scheduleId)
                               throws CasterException
Deletes log records from the underlying ReportCaster repository associated with a specified schedule as identified by the passed scheduleId. This method is only available to the administrator and the Log owner.

Parameters:
scheduleId - The unique schedule identifier.
Throws:
CasterException - If a database access error occurs or scheduleId doesn't exist or there is no permission to delete this log.

deleteLogByJobId

void deleteLogByJobId(java.lang.String jobId)
                      throws CasterException
Deletes a specific log record as identified by its unique job ID from the underlying repository. This method is only available to the administrator and the Log owner.

Parameters:
jobId - The unique identifier for a log record.
Throws:
CasterException - If a database access error occurs or the processId doesn't exist or there is no permission to delete this log.

deleteLogList

int deleteLogList(java.util.Calendar startTime,
                  java.util.Calendar endTime)
                  throws CasterException
Deletes the log records from the underlying repository pertaining to all schedules which were run between a specified time interval delineated by startTime and endTime. If startTime = NULL all log records are deleted before endTime. If endTime = NULL all log records are deleted after startTime. This method is only available to the administrator.

Parameters:
startTime - Start position of time interval.
endTime - End position of time interval.
Throws:
CasterException - If a database access error occurs or there is no permission to delete this log.

deleteLogListByOwner

int deleteLogListByOwner(java.lang.String owner,
                         java.util.Calendar startTime,
                         java.util.Calendar endTime)
                         throws CasterException
Deletes the log records from the underlying repository pertaining to all schedules owned by the specified user, and which were run between a specified time interval delineated by startTime and endTime. If startTime = NULL all log records are deleted before endTime. If endTime = NULL all log records are deleted after startTime. This method is only available to the administrator and the Log owner.

Parameters:
owner - User ID of the owner of the schedules to be deleted.
startTime - Start position of time interval.
endTime - End position of time interval.
Throws:
CasterException - If a database access error occurs or there is no permission to delete this log.

deleteLogListByScheduleIdByCalendar

void deleteLogListByScheduleIdByCalendar(java.lang.String scheduleId,
                                         java.util.Calendar startTime,
                                         java.util.Calendar endTime)
                                         throws CasterException
Deletes the log records from the underlying repository pertaining to a specific scheduleID and to only those log jobs which were run between a specified time interval, delineated by startTime and endTime. If startTime = NULL all log records are deleted before endTime. If endTime = NULL all log records are deleted after startTime. This method is only available to the administrator and the Log owner.

Parameters:
startTime - Start position of time interval.
endTime - End position of time interval.
Throws:
CasterException - If a database access error occurs or there is no permission to delete this log.


Copyright © 2006 Information Builders, Incorporated.