AbstractAssetResource.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.sling.api.resource.AbstractResource
* org.apache.sling.api.resource.Resource
* org.apache.sling.api.resource.ResourceMetadata
* org.apache.sling.api.resource.ResourceResolver
* org.slf4j.Logger
* org.slf4j.LoggerFactory
*/
package com.adobe.granite.rest.assets.impl;
import org.apache.sling.api.resource.AbstractResource;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceMetadata;
import org.apache.sling.api.resource.ResourceResolver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class AbstractAssetResource
extends AbstractResource {
protected Logger logger;
protected ResourceMetadata resourceMetadata;
protected Resource resource;
protected String path;
protected AbstractAssetResource(Resource resource, String path) {
this.logger = LoggerFactory.getLogger(this.getClass());
this.resource = resource;
this.path = path;
this.resourceMetadata = new ResourceMetadata();
this.resourceMetadata.setResolutionPath(path);
}
public ResourceResolver getResourceResolver() {
return this.resource.getResourceResolver();
}
public String getPath() {
return this.path;
}
public ResourceMetadata getResourceMetadata() {
return this.resourceMetadata;
}
public String getResourceSuperType() {
return null;
}
String getWrappedResourcePath() {
return this.resource.getPath();
}
}