ibi.broker.api.data.dslog
Class DsLog

java.lang.Object
  extended by ibi.broker.api.data.dslog.DsLog
All Implemented Interfaces:
java.io.Serializable

public class DsLog
extends java.lang.Object
implements java.io.Serializable

 When a scheduled report distribution job is run on the Distribution Server, the 
 log of all activity relating to this process is encapsulated by way of the  
 DsLog and DsLogElement classes. The DsLog class holds the 
 general information pertaining to the log record of a job that is run by the Distribution Server. 
 For each job, there is a corresponding DsLog object. 
 But for each DsLog object there
 can be any number of corresponding DsLogElement objects.
 Please not that DsLog should be used only to retrieve data, because 
 manually setting any log elements may interfere with the workings of the
 Distribution Server.
 The code snippet below shows the use of the  DsLog  class. 
 It is taken from the samples packaged with the product.

 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +  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.       +
 +                                                                          +
 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  

        .  
  .
  // Retrieve log
  LogManager manager = casterConnection.getLogManager();
  DsLog log = manager.getLogByJobId(jobId);
        
        // Print result
        System.out.println("JobId = " + log.getJobId());
        System.out.println("ScheduleDescription = " + log.getScheduleDescription());
        System.out.println("ScheduleId = " + log.getScheduleId());
        System.out.println("Owner = " + log.getOwner());
        System.out.println("StartTime = " + log.getStartTime().getTime().toLocaleString());
        System.out.println("EndTime = " + log.getEndTime().getTime().toLocaleString());
        System.out.println("ErrorType = " + log.getErrorType());
        
        DsLogElement[] elementList = log.getLogElementList();
        for(int i = 0; i < elementList.length; i++)
        {
                System.out.println("ExecId = " + elementList[i].getExecId() + 
                                                        "  Message = " + elementList[i].getMessage() + 
                                                        "  MessageCode = " + elementList[i].getMessageCode() + 
                                                        "  TaskDescription = " + elementList[i].getTaskDescription());
        }
}

 

Version:
5.3
See Also:
Serialized Form

Field Summary
static java.lang.String ERROR_FATAL
          One of the three types of errors (errorType) produced during the process of logging a scheduled report distribution run.
static java.lang.String ERROR_NO
          One of the three types of errors (errorType) produced during the process of logging a scheduled report distribution run.
static java.lang.String ERROR_WARNING
          One of the three types of errors (errorType) produced during the process of logging a scheduled report distribution run.
 
Constructor Summary
DsLog()
           
 
Method Summary
 java.util.Calendar getEndTime()
          Obtains the Calendar time when the schedule job run ends.
 java.lang.String getErrorType()
          Obtains a String constant indicating the type of error that may have occurred during the scheduled report distribution job run.
 java.lang.String getJobId()
          Obtains a unique identifier to the log or record of the Distribution Server job.
 DsLogElement[] getLogElementList()
          Obtains the Array of(DsLogElement[]) objects that are associated with this instance of the DsLog class.
 java.lang.String getOwner()
          Obtains the username of the schedule owner.
 java.lang.String getScheduleDescription()
          Obtains the text describing the Schedule that is being run and logged on the Distribution Server.
 java.lang.String getScheduleId()
          Obtains the unique identifier to the Schedule that is being run and logged on the Distribution Server.
 java.util.Calendar getStartTime()
          Obtains the Calendar time when the schedule job run begins.
 void setEndTime(java.util.Calendar endTime)
          Assigns the Calendar time when the schedule job run ends.
 void setErrorType(java.lang.String error)
          Assigns a String constant specifies the type of error that may have occurred during the scheduled report distribution job run.
 void setJobId(java.lang.String jobId)
          The Distribution Server uses this method to assign a unique identifier to the log or record of a ReportCaster job.
 void setLogElementList(DsLogElement[] logElementList)
          Assigns the Array of(DsLogElement[]) objects that are associated with this instance of the DsLog class.
 void setOwner(java.lang.String owner)
          Assigns the username of the schedule owner.
 void setScheduleDescription(java.lang.String scheduleDescription)
          Assigns the text describing the Schedule that is being run and logged on the Distribution Server.
 void setScheduleId(java.lang.String scheduleId)
          Assigns the unique identifier to the schedule that is being run and logged on the Distribution Server.
 void setStartTime(java.util.Calendar startTime)
          Assigns the Calendar time when the schedule job run begins.
 void validate(java.lang.String parentName)
          This method is used by the Distribution Server to validate certain field values before saving them to the repository, and should not be called under any circumstances by a ReportCaster API user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_WARNING

public static final java.lang.String ERROR_WARNING
One of the three types of errors (errorType) produced during the process of logging a scheduled report distribution run. This error type is used to represent a warning error.

See Also:
Constant Field Values

ERROR_FATAL

public static final java.lang.String ERROR_FATAL
One of the three types of errors (errorType) produced during the process of logging a scheduled report distribution run. This error type is used to represent a fatal error.

See Also:
Constant Field Values

ERROR_NO

public static final java.lang.String ERROR_NO
One of the three types of errors (errorType) produced during the process of logging a scheduled report distribution run. This error type is used to represent that no error occurred.

See Also:
Constant Field Values
Constructor Detail

DsLog

public DsLog()
Method Detail

setJobId

public void setJobId(java.lang.String jobId)
The Distribution Server uses this method to assign a unique identifier to the log or record of a ReportCaster job. ThisIDis the same as that used to uniquely identify the job itself (see Job.getId()). As with all set methods in this class, it's use should be reserved to the Distribution Server.

Parameters:
jobId - The unique identifier to the job.
See Also:
getJobId()

getJobId

public java.lang.String getJobId()
Obtains a unique identifier to the log or record of the Distribution Server job. ThisIDis the same as that used to identify the job itself, and can also be obtained by calling Job.getId().

Returns:
The job Id as a String.
See Also:
setJobId(java.lang.String)

setScheduleDescription

public void setScheduleDescription(java.lang.String scheduleDescription)
Assigns the text describing the Schedule that is being run and logged on the Distribution Server. This is the same descriptive String text that is obtained by calling the Schedule.getDescription() method. As with all set methods in this class, it's use should be reserved to the Distribution Server.

Parameters:
scheduleDescription - The description of the schedule as a String.
See Also:
getScheduleDescription()

getScheduleDescription

public java.lang.String getScheduleDescription()
Obtains the text describing the Schedule that is being run and logged on the Distribution Server. This is the same descriptive String text that is returned by calling the Schedule.getDescription() method.

Returns:
The schedule description as a String.
See Also:
setScheduleDescription(java.lang.String)

setScheduleId

public void setScheduleId(java.lang.String scheduleId)
Assigns the unique identifier to the schedule that is being run and logged on the Distribution Server. This identifier is the same as that returned by calling the Schedule.getId() method. As with all set methods in this class, it's use should be reserved to the Distribution Server.

Parameters:
scheduleId - The unique schedule identifier.
See Also:
getScheduleId()

getScheduleId

public java.lang.String getScheduleId()
Obtains the unique identifier to the Schedule that is being run and logged on the Distribution Server. This identifier is the same as that returned by calling the Schedule.getId() method.

Returns:
The unique schedule Id as a String.
See Also:
setScheduleId(java.lang.String)

setOwner

public void setOwner(java.lang.String owner)
Assigns the username of the schedule owner. As with all set methods in this class, it's use should be reserved to the Distribution Server.

Parameters:
owner - The username of schedule owner.
See Also:
getOwner()

getOwner

public java.lang.String getOwner()
Obtains the username of the schedule owner. If caller is an administrator, can obtain any user. An end user can only obtain his own username.

Returns:
The username of the schedule owner as a String.
See Also:
setOwner(java.lang.String)

setStartTime

public void setStartTime(java.util.Calendar startTime)
Assigns the Calendar time when the schedule job run begins. The actual Java Calendar class that's instantiated is GregorianCalander. As with all set methods in this class, it's use should be reserved to the Distribution Server.

Parameters:
startTime - The time the job run for the schedule begins.
See Also:
getStartTime()

getStartTime

public java.util.Calendar getStartTime()
Obtains the Calendar time when the schedule job run begins. The actual Java Calendar class that's instantiated is GregorianCalander.

Returns:
The start time for the schedule job run as a Calendar object.

setEndTime

public void setEndTime(java.util.Calendar endTime)
Assigns the Calendar time when the schedule job run ends. The actual Java Calendar class that's instantiated is GregorianCalander.

Parameters:
endTime - The time the job run for the schedule ends.
See Also:
getEndTime()

getEndTime

public java.util.Calendar getEndTime()
Obtains the Calendar time when the schedule job run ends. The actual Java Calendar class that's instantiated is GregorianCalander.

Returns:
The end time for the schedule job run as a Calendar

setErrorType

public void setErrorType(java.lang.String error)
Assigns a String constant specifies the type of error that may have occurred during the scheduled report distribution job run. The acceptable values are ERROR_NO and ERROR_FATAL. As with all set methods in this class, it's used should be reserved for the Distribution Server.

Parameters:
error - String constant error type.
See Also:
getErrorType()

getErrorType

public java.lang.String getErrorType()
Obtains a String constant indicating the type of error that may have occurred during the scheduled report distribution job run. The returned values are either ERROR_NO and ERROR_FATAL.

Returns:
The errorType as a String constant.
See Also:
setErrorType(java.lang.String)

setLogElementList

public void setLogElementList(DsLogElement[] logElementList)
Assigns the Array of(DsLogElement[]) objects that are associated with this instance of the DsLog class. As with all set methods in this class, it's used should be reserved for the Distribution Server.

Parameters:
logElementList - A reference to the log element array.
See Also:
getLogElementList()

getLogElementList

public DsLogElement[] getLogElementList()
Obtains the Array of(DsLogElement[]) objects that are associated with this instance of the DsLog class.

Returns:
An Array of DsLogElement
See Also:
setLogElementList(ibi.broker.api.data.dslog.DsLogElement[])

validate

public void validate(java.lang.String parentName)
              throws CasterException
This method is used by the Distribution Server to validate certain field values before saving them to the repository, and should not be called under any circumstances by a ReportCaster API user.

Parameters:
parentName - represented parent of this object.
Throws:
CasterException


Copyright © 2006 Information Builders, Incorporated.