* @see org.apache.felix.webconsole.ConfigurationPrinter#printConfiguration(java.io.PrintWriter)
*/
public void printConfiguration(PrintWriter pw) {
pw.println(HEADLINE);
pw.println();
final Scheduler s = this.scheduler.getScheduler();
if ( s != null ) {
pw.println("Status : active");
try {
pw.print ("Name : ");
pw.println(s.getSchedulerName());
pw.print ("Id : ");
pw.println(s.getSchedulerInstanceId());
final List<String> groups = s.getJobGroupNames();
for(final String group : groups) {
final Set<JobKey> keys = s.getJobKeys(GroupMatcher.jobGroupEquals(group));
for(final JobKey key : keys) {
final JobDetail detail = s.getJobDetail(key);
final String jobName = (String) detail.getJobDataMap().get(QuartzScheduler.DATA_MAP_NAME);
final Object job = detail.getJobDataMap().get(QuartzScheduler.DATA_MAP_OBJECT);
// only print jobs started through the sling scheduler
if ( jobName != null && job != null ) {
pw.print("Job : ");
pw.print(detail.getJobDataMap().get(QuartzScheduler.DATA_MAP_NAME));
if ( detail.getDescription() != null && detail.getDescription().length() > 0 ) {
pw.print(" (");
pw.print(detail.getDescription());
pw.print(")");
}
pw.print(", class: ");
pw.print(job.getClass().getName());
pw.print(", concurrent: ");
pw.print(!detail.isConcurrentExectionDisallowed());
final String[] runOn = (String[])detail.getJobDataMap().get(QuartzScheduler.DATA_MAP_RUN_ON);
if ( runOn != null ) {
pw.print(", runOn: ");
pw.print(Arrays.toString(runOn));
}
final Long bundleId = (Long)detail.getJobDataMap().get(QuartzScheduler.DATA_MAP_BUNDLE_ID);
if ( bundleId != null ) {
pw.print(", bundleId: ");
pw.print(String.valueOf(bundleId));
}
pw.println();
for(final Trigger trigger : s.getTriggersOfJob(key)) {
pw.print("Trigger : ");
pw.print(trigger);
pw.println();
}
pw.println();