|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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();
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 set Dslog 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 |
---|
java.lang.String[] getOwnerList() throws CasterException
String[]
) of schedule owners.
CasterException
- If a database access error occurs or there is
no permission to access this method.DsLog getLogByJobId(java.lang.String jobId) throws CasterException
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.
jobId
- unique identifier of the
Dslog
instance.
DsLog
object.
CasterException
- If a database access error occurs or
DsLog
with processId
doesn't exist or
there is no permission to access this method.DsLog getLastLogByScheduleId(java.lang.String scheduleId) throws CasterException
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.
scheduleId
- The identifier of a specific
Schedule
.
DsLog
object.
CasterException
- If a database access error occurs or
DsLog
with scheduleId
doesn't exist or
there is no permission to access this method.DsLog[] getLogInfoListByScheduleId(java.lang.String scheduleId) throws CasterException
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.
scheduleId
- The unique identifier of a
Schedule
.
DsLog[]
).
CasterException
- If a database access error occurs or
A log with scheduleId
doesn't exist or
there is no permission to access this method.DsLog[] getLogListByScheduleId(java.lang.String scheduleId) throws CasterException
CasterException
DsLog[] getLogInfoListByOwner(java.lang.String owner) throws CasterException
Dslog
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.
owner
- ReportCaster username of schedule owner.
DsLog[]
).
CasterException
- If a database access error occurs or
the owner doesn't or there is no permission to access this method.DsLog[] getLogInfoListByOwnerByCalendar(java.lang.String owner, java.util.Calendar startTime, java.util.Calendar endTime) throws CasterException
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.
owner
- ReportCaster username of schedule owner.startTime
- Start position of time interval.endTime
- End position of time interval.
DsLog[]
) objects.
CasterException
- If a database access error occur, the owner
doesn't exist or there is no permission to access this method.void deleteLogListByScheduleId(java.lang.String scheduleId) throws CasterException
scheduleId
- The unique schedule identifier.
CasterException
- If a database access error occurs or
scheduleId doesn't exist or there is no permission to delete
this log.void deleteLogByJobId(java.lang.String jobId) throws CasterException
jobId
- The unique identifier for a log record.
CasterException
- If a database access error occurs or
the processId doesn't exist or there is no permission to delete
this log.int deleteLogList(java.util.Calendar startTime, java.util.Calendar endTime) throws CasterException
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.
startTime
- Start position of time interval.endTime
- End position of time interval.
CasterException
- If a database access error occurs or there is
no permission to delete this log.int deleteLogListByOwner(java.lang.String owner, java.util.Calendar startTime, java.util.Calendar endTime) throws CasterException
startTime
.
This method is only available to the administrator and the Log owner.
owner
- User ID of the owner of the schedules to be deleted.startTime
- Start position of time interval.endTime
- End position of time interval.
CasterException
- If a database access error occurs or there is
no permission to delete this log.void deleteLogListByScheduleIdByCalendar(java.lang.String scheduleId, java.util.Calendar startTime, java.util.Calendar endTime) throws CasterException
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.
startTime
- Start position of time interval.endTime
- End position of time interval.
CasterException
- If a database access error occurs or there is
no permission to delete this log.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |