org.ow2.weblab.services.iterator
Class FolderResourceQM

java.lang.Object
  extended by org.ow2.weblab.services.iterator.FolderResourceQM
All Implemented Interfaces:
org.ow2.weblab.core.services.QueueManager

public class FolderResourceQM
extends java.lang.Object
implements org.ow2.weblab.core.services.QueueManager

This class is a the QueueManager part of the FolderResource service. It enable to crawl a folder (given through the configure method of the Configurable interface) or through the default path of the configuration. Some filters are applied to the folder while crawling. They are created using the configuration in ConfigurationBean set in the constructor method. Each of the file MUST be valid WebLab XML resources that will be returned each time the nextResourceArgs is called. When every files have been crawled, an EmptyQueue exception is thrown.

Author:
ymombrun
See Also:
ConfigurationBean
Date:
2011-08-17

Constructor Summary
FolderResourceQM(ConfigurationBean configuration)
          The constructor for the realisation of the QueueManager interface for a FolderResource service.
 
Method Summary
 org.ow2.weblab.core.services.queuemanager.NextResourceReturn nextResource(org.ow2.weblab.core.services.queuemanager.NextResourceArgs args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FolderResourceQM

public FolderResourceQM(ConfigurationBean configuration)
                 throws org.ow2.weblab.core.services.UnexpectedException,
                        org.ow2.weblab.core.services.AccessDeniedException
The constructor for the realisation of the QueueManager interface for a FolderResource service.

Parameters:
configuration - A holder for the configuration of this service.
Throws:
org.ow2.weblab.core.services.UnexpectedException - Cannot be launched here (the method called inside throw it only if default path is null. But this method is not called if default path is null.)
org.ow2.weblab.core.services.AccessDeniedException - If the path represented by default path does not exists, is not a folder or is not readable.
Method Detail

nextResource

public org.ow2.weblab.core.services.queuemanager.NextResourceReturn nextResource(org.ow2.weblab.core.services.queuemanager.NextResourceArgs args)
                                                                          throws org.ow2.weblab.core.services.EmptyQueueException,
                                                                                 org.ow2.weblab.core.services.UnexpectedException,
                                                                                 org.ow2.weblab.core.services.InvalidParameterException,
                                                                                 org.ow2.weblab.core.services.ServiceNotConfiguredException,
                                                                                 org.ow2.weblab.core.services.AccessDeniedException
Specified by:
nextResource in interface org.ow2.weblab.core.services.QueueManager
Throws:
org.ow2.weblab.core.services.EmptyQueueException
org.ow2.weblab.core.services.UnexpectedException
org.ow2.weblab.core.services.InvalidParameterException
org.ow2.weblab.core.services.ServiceNotConfiguredException
org.ow2.weblab.core.services.AccessDeniedException


Copyright © 2004-2011. All Rights Reserved.