ibi.broker.api.data.dslog
Class DsLogElement

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

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

 When a scheduled report distribution job is run on the Distribution Server, the 
 record or log of all activity relating to this process is represented by way of the  
 DsLog and DsLogElement classes, and stored in the 
 ReportCaster Repository. The DsLogElement class holds the specific 
 information pertaining to each log record of a job that is run on the Distribution Server. 
 For each DsLog object, which contains general information about a log
 record, there can be any number of corresponding DsLogElement 
 objects containing the specific detailed logged messages corresponding to each step of 
 the job execution process; hence the relationship between DsLog and  
 DsLogElement is one-to- many. 
 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 DsLogElement 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

Constructor Summary
DsLogElement()
           
 
Method Summary
 java.lang.String getExecId()
          Obtains the execution ID associated with this instance of DslogElement.
 java.lang.String getMessage()
          Obtains the log text describing exactly what takes place in the job execution process during this instance of DsSLogElement.
 java.lang.String getMessageCode()
          Obtains the message code as a String constant corresponding to this instance of DsLogElement.
 java.lang.String getTaskDescription()
          Obtains the String description of the task associated with the DsLogElement.
 boolean isError()
          Obtains a boolean flag specifying whether the message associated with this instance of DsLogELement is an error message.
 boolean isWarning()
          Obtains a boolean flag specifying whether the message associated with this instance of DsLogELement is an warning message.
 void setError(boolean isError)
          Assigns a boolean flag specifying whether or not the message associated with this instance of DsLogELement is an error message.
 void setExecId(java.lang.String execId)
          Assigns the execution ID to this instance of DslogElement.
 void setMessage(java.lang.String message)
          Assigns the log text describing exactly what takes place in the job execution process during this instance of DsSLogElement.
 void setMessageCode(java.lang.String messageCode)
          Assigns the message code corresponding as a String constant to this instance of DsLogElement.
 void setTaskDescription(java.lang.String taskDescription)
          Assigns the String description of the task associated with the DsLogElement.
 void setWarning(boolean warning)
          Assigns a boolean flag specifying whether or not the message associated with this instance of DsLogELement is an warning message.
 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
 

Constructor Detail

DsLogElement

public DsLogElement()
Method Detail

setExecId

public void setExecId(java.lang.String execId)
Assigns the execution ID to this instance of DslogElement. The execution ID is the user ID used by the distribution server to authenticate with the Reporting Server. This ID is meaningful only when the task associated with this DSLogElement object needs to authenticate with the Reporting Server. The only task types for which this is true are: WF Server Procedures, Standard Reports, URLs, and MyReports. For all other task types and for all other steps in the job execution process this ID is NULL. As with all sets in this class, this should only be used by the distribution server.

Parameters:
execId - The execution ID as a String
See Also:
getExecId()

getExecId

public java.lang.String getExecId()
Obtains the execution ID associated with this instance of DslogElement. The execution ID is the user ID used by the distribution server to authenticate with the Reporting Server. This ID is meaningful only when the task associated with this DSLogElement object needs to authenticate with the Reporting Server. The only task types for which this is true are: WEBFOCUS Server Procedures, Standard Reports, URLs, and MyReports. For all other task types and for all other steps in the job execution process this ID is NULL.

Returns:
The execution ID as String
See Also:
setExecId(String)

setTaskDescription

public void setTaskDescription(java.lang.String taskDescription)
Assigns the String description of the task associated with the DsLogElement. As with all sets in this method, this is reserved for use by the distribution server.

Parameters:
taskDescription - The description associated with the associated task.
See Also:
getTaskDescription()

getTaskDescription

public java.lang.String getTaskDescription()
Obtains the String description of the task associated with the DsLogElement. For a given Task, this description string is exactly that obtained with a method invocation such as the following: Task.getDescription. If no Task is associated with this instance of DsLogElement the description is NULL.

Returns:
The text describing the Task as a String
See Also:
setTaskDescription(String)

setMessageCode

public void setMessageCode(java.lang.String messageCode)
Assigns the message code corresponding as a String constant to this instance of DsLogElement. The message code is used to group logging messages related to each step in the process of executing a job on the Distribution Server. There are only two groups: SCHEDULE_MESSAGE_CODE and TASK_MESSAGE_CODE which correspond to messages specifically associated with a schedule and messages specifically associated with a task respectively. Currently SCHEDULE_MESSAGE_CODE is set to the String BTP1010 and TASK_MESSAGE_CODE is set the String BTP1020.

Parameters:
messageCode - The message code as a String

getMessageCode

public java.lang.String getMessageCode()
Obtains the message code as a String constant corresponding to this instance of DsLogElement. The message code is used to group logging messages related to each step in the process of executing a Job on the Distribution Server. There are only two groups: SCHEDULE_MESSAGE_CODE and TASK_MESSAGE_CODE which correspond to messages specifically associated with a schedule and messages specifically associated with a task respectively. Currently SCHEDULE_MESSAGE_CODE is set to the String BTP1010 and TASK_MESSAGE_CODE is set the String BTP1020.

Returns:
A String constant representing a message code.
See Also:
setMessageCode(String)

setMessage

public void setMessage(java.lang.String message)
Assigns the log text describing exactly what takes place in the job execution process during this instance of DsSLogElement. Typical messages contain text such as Start Task X and Connecting to Server Y. As with other sets in this class, this is reserved for the distribution server.

Parameters:
message - The log message text as a String
See Also:
getMessage()

getMessage

public java.lang.String getMessage()
Obtains the log text describing exactly what takes place in the job execution process during this instance of DsSLogElement. Typical messages contain text such as Start Task X and Connecting to Server Y. The maximum String lenght is 150 characters.

Returns:
the value of the message

setError

public void setError(boolean isError)
Assigns a boolean flag specifying whether or not the message associated with this instance of DsLogELement is an error message. If log message is an error message, the isError parameter is TRUE. If log message is not an error message, the parameter is FALSE.

Parameters:
isError - The boolean signifying whether or not log message is an error message.
See Also:
isError()

isError

public boolean isError()
Obtains a boolean flag specifying whether the message associated with this instance of DsLogELement is an error message. If log message is an error message, the isError parameter is TRUE. If log message is not an error message, the parameter is FALSE.

Returns:
The value of isError as a boolean.
See Also:
setError(boolean)

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 - Represents parent of this object.
Throws:
CasterException

isWarning

public boolean isWarning()
Obtains a boolean flag specifying whether the message associated with this instance of DsLogELement is an warning message. If log message is an warning message, the isWarning parameter is TRUE. If log message is not an warning message, the parameter is FALSE.

Returns:
The value of isWarning as a boolean.
See Also:
setWarning(boolean)

setWarning

public void setWarning(boolean warning)
Assigns a boolean flag specifying whether or not the message associated with this instance of DsLogELement is an warning message. If log message is an warning message, the isWarning parameter is TRUE. If log message is not an warning message, the parameter is FALSE.

Parameters:
warning - The boolean signifying whether or not log message is an warning message.
See Also:
isWarning()


Copyright © 2006 Information Builders, Incorporated.