public class ServiceSourceFactory extends AbstractLogEnabled implements SourceFactory, Serviceable, Contextualizable
Modifier and Type | Class and Description |
---|---|
class |
ServiceSourceFactory.ServiceSource
A wrapping source to know real location
|
static class |
ServiceSourceFactory.SourceType
The enum of existing types of servicesources
|
Modifier and Type | Field and Description |
---|---|
private static Pattern |
__SOURCE_PATTERN |
private Context |
_context |
private ServiceManager |
_manager |
private SourceResolver |
_resolver |
private ServiceExtensionPoint |
_sep |
ROLE
Constructor and Description |
---|
ServiceSourceFactory() |
Modifier and Type | Method and Description |
---|---|
private ServiceParameter |
_findParameter(Service service,
String parameterName,
String location) |
void |
contextualize(Context context) |
protected Map<ServiceSourceFactory.SourceType,String> |
getLocations(String pluginName,
String uri)
Returns the ordered list of URIs to be tested to find the service stylesheet.
|
Source |
getSource(String location,
Map parameters) |
void |
release(Source source) |
void |
service(ServiceManager manager) |
getLogger, setLogger
private static final Pattern __SOURCE_PATTERN
private SourceResolver _resolver
private ServiceExtensionPoint _sep
private ServiceManager _manager
public ServiceSourceFactory()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public Source getSource(String location, Map parameters) throws IOException, MalformedURLException
getSource
in interface SourceFactory
IOException
MalformedURLException
private ServiceParameter _findParameter(Service service, String parameterName, String location) throws MalformedURLException
MalformedURLException
protected Map<ServiceSourceFactory.SourceType,String> getLocations(String pluginName, String uri)
pluginName
- the service plugin name.uri
- the service stylesheet.public void release(Source source)
release
in interface SourceFactory