AppCacheFactory.java
1.56 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:
* com.adobe.cq.mobile.ui.AppCacheDataSource
* org.apache.felix.scr.annotations.Component
* org.apache.felix.scr.annotations.Reference
* org.apache.felix.scr.annotations.Service
* org.apache.sling.api.resource.Resource
*/
package com.adobe.cq.mobile.ui.impl;
import com.adobe.cq.mobile.appcache.impl.AppCacheManagerAdapterFactory;
import com.adobe.cq.mobile.ui.AppCacheDataSource;
import com.adobe.cq.mobile.ui.impl.AppCacheDataSourceImpl;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.api.resource.Resource;
@Component(immediate=1, metatype=0)
@Service(value={AppCacheFactory.class})
public class AppCacheFactory {
@Reference
private AppCacheManagerAdapterFactory appCacheManagerAdapterFactory;
public AppCacheDataSource getAppCache(Resource resource) {
AppCacheDataSourceImpl ds = new AppCacheDataSourceImpl(resource, this.appCacheManagerAdapterFactory);
return ds;
}
protected void bindAppCacheManagerAdapterFactory(AppCacheManagerAdapterFactory appCacheManagerAdapterFactory) {
this.appCacheManagerAdapterFactory = appCacheManagerAdapterFactory;
}
protected void unbindAppCacheManagerAdapterFactory(AppCacheManagerAdapterFactory appCacheManagerAdapterFactory) {
if (this.appCacheManagerAdapterFactory == appCacheManagerAdapterFactory) {
this.appCacheManagerAdapterFactory = null;
}
}
}