public class FolderResourceConf
extends java.lang.Object
implements org.ow2.weblab.core.services.Configurable
InterfacesMappingSingleton| Modifier and Type | Field and Description |
|---|---|
protected ConfigurationBean |
configuration
The bean that contains the configuration of the service.
|
protected org.apache.commons.logging.Log |
logger
The logger used inside.
|
protected InterfacesMappingSingleton |
mapping
The class that maps Configurable with QueueManager.
|
| Constructor and Description |
|---|
FolderResourceConf(ConfigurationBean configuration)
The constructor that takes as parameter the same bean than the queue manager to be associated with.
|
| Modifier and Type | Method and Description |
|---|---|
static java.io.File |
checkFolder(java.lang.String path,
java.lang.String usageContext)
Checks that the given path denotes an existing readable folder.
|
org.ow2.weblab.core.services.configurable.ConfigureReturn |
configure(org.ow2.weblab.core.services.configurable.ConfigureArgs args) |
java.lang.String |
readConfigPoK(java.lang.String usageContext,
org.ow2.weblab.core.model.PieceOfKnowledge conf)
Reads the PieceOfKnowledge in parameter to retrieve path to the folder to be crawled.
|
org.ow2.weblab.core.services.configurable.ResetConfigurationReturn |
resetConfiguration(org.ow2.weblab.core.services.configurable.ResetConfigurationArgs args) |
protected final ConfigurationBean configuration
protected final org.apache.commons.logging.Log logger
protected final InterfacesMappingSingleton mapping
public FolderResourceConf(ConfigurationBean configuration)
configuration - The configuration used here.public org.ow2.weblab.core.services.configurable.ConfigureReturn configure(org.ow2.weblab.core.services.configurable.ConfigureArgs args)
throws org.ow2.weblab.core.services.InvalidParameterException,
org.ow2.weblab.core.services.AccessDeniedException,
org.ow2.weblab.core.services.UnexpectedException
configure in interface org.ow2.weblab.core.services.Configurableorg.ow2.weblab.core.services.InvalidParameterExceptionorg.ow2.weblab.core.services.AccessDeniedExceptionorg.ow2.weblab.core.services.UnexpectedExceptionpublic org.ow2.weblab.core.services.configurable.ResetConfigurationReturn resetConfiguration(org.ow2.weblab.core.services.configurable.ResetConfigurationArgs args)
throws org.ow2.weblab.core.services.InvalidParameterException,
org.ow2.weblab.core.services.UnexpectedException
resetConfiguration in interface org.ow2.weblab.core.services.Configurableorg.ow2.weblab.core.services.InvalidParameterExceptionorg.ow2.weblab.core.services.UnexpectedExceptionpublic java.lang.String readConfigPoK(java.lang.String usageContext,
org.ow2.weblab.core.model.PieceOfKnowledge conf)
throws org.ow2.weblab.core.services.InvalidParameterException
usageContext - The usageContext send as parameter of the configuration.conf - The PoK that should contain the configuration.org.ow2.weblab.core.services.InvalidParameterException - If no configuration has been found (linked with the service Uri) or if no folder to crawl is provided in this configuration.public static java.io.File checkFolder(java.lang.String path,
java.lang.String usageContext)
throws org.ow2.weblab.core.services.AccessDeniedException
path - The path to check validityusageContext - The usageContext, used only for logging purpose.org.ow2.weblab.core.services.AccessDeniedException - If the path does not exist, or is not readable or is not a directory.Copyright © 2004-2012. All Rights Reserved.