MobileResourceLocatorFactory.java 1.51 KB
/*
 * 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");
    }
}