|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| package com.agical.rdoc.core.resourcemanager.impl; |
|
5 |
| |
|
6 |
| import com.agical.rdoc.core.resourcemanager.ResourceProvider; |
|
7 |
| import com.agical.rmock.core.configuration.RMockServiceFactory; |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| public class ResourceProviderFactory implements RMockServiceFactory { |
|
14 |
| |
|
15 |
2
| public Object createService() {
|
|
16 |
2
| SystemPropertiesBasedirProvider systemPropertiesBasedirProvider = new SystemPropertiesBasedirProvider();
|
|
17 |
2
| PropertiesResourceProvider provider = new PropertiesResourceProvider("resourceroots.properties", systemPropertiesBasedirProvider);
|
|
18 |
2
| return provider;
|
|
19 |
| } |
|
20 |
| |
|
21 |
2
| public boolean canCreateService() {
|
|
22 |
2
| return true;
|
|
23 |
| } |
|
24 |
| |
|
25 |
3
| public Class getServiceType() {
|
|
26 |
3
| return ResourceProvider.class;
|
|
27 |
| } |
|
28 |
| |
|
29 |
| } |