MobileResourceLocatorFactory.java
1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.felix.scr.annotations.Component
* org.apache.felix.scr.annotations.Service
* org.apache.sling.api.resource.ResourceResolver
*/
package com.adobe.cq.mobile.platform.impl;
import com.adobe.cq.mobile.platform.impl.MobileResourceLocatorImpl;
import java.util.HashSet;
import java.util.Set;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.api.resource.ResourceResolver;
@Component(immediate=1, metatype=0)
@Service(value={MobileResourceLocatorFactory.class})
public class MobileResourceLocatorFactory {
private static Set<String> appContentPaths = new HashSet<String>();
private static Set<String> excludeNodeNames;
private static Set<String> containerTypes;
public MobileResourceLocatorImpl getMobileResourceLocator(ResourceResolver resolver) {
MobileResourceLocatorImpl locator = new MobileResourceLocatorImpl(resolver, excludeNodeNames, appContentPaths, containerTypes);
return locator;
}
static {
appContentPaths.add("/content/phonegap");
appContentPaths.add("/content/mobileapps");
excludeNodeNames = new HashSet<String>();
excludeNodeNames.add("jcr:content");
excludeNodeNames.add("rep:policy");
containerTypes = new HashSet<String>();
containerTypes.add("sling:OrderedFolder");
containerTypes.add("sling:Folder");
containerTypes.add("nt:folder");
}
}