|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibi.broker.api.data.dslog.DsLogElement
public class DsLogElement
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 theDsLog
andDsLogElement
classes, and stored in the ReportCaster Repository. TheDsLogElement
class holds the specific information pertaining to each log record of a job that is run on the Distribution Server. For eachDsLog
object, which contains general information about a log record, there can be any number of correspondingDsLogElement
objects containing the specific detailed logged messages corresponding to each step of the job execution process; hence the relationship betweenDsLog
andDsLogElement
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 theDsLogElement
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()); } }
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 |
---|
public DsLogElement()
Method Detail |
---|
public void setExecId(java.lang.String execId)
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.
execId
- The execution ID as a StringgetExecId()
public java.lang.String getExecId()
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.
setExecId(String)
public void setTaskDescription(java.lang.String taskDescription)
taskDescription
- The description associated with the
associated task.getTaskDescription()
public java.lang.String getTaskDescription()
Task.getDescription
. If no Task is associated with this instance
of DsLogElement
the description is NULL.
Task
as a StringsetTaskDescription(String)
public void setMessageCode(java.lang.String messageCode)
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.
messageCode
- The message code as a Stringpublic java.lang.String getMessageCode()
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.
setMessageCode(String)
public void setMessage(java.lang.String message)
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.
message
- The log message text as a StringgetMessage()
public java.lang.String getMessage()
DsSLogElement
. Typical
messages contain text such as Start Task X and Connecting to Server Y.
The maximum String lenght is 150 characters.
public void setError(boolean isError)
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.
isError
- The boolean signifying whether or not log message is an error
message.isError()
public boolean isError()
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.
isError
as a boolean.setError(boolean)
public void validate(java.lang.String parentName) throws CasterException
parentName
- Represents parent of this object.
CasterException
public boolean isWarning()
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.
isWarning
as a boolean.setWarning(boolean)
public void setWarning(boolean warning)
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.
warning
- The boolean signifying whether or not log message is an warning
message.isWarning()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |