VersionDefImpl.java
1.46 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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.cq.dam.cfm.VersionDef
* com.day.cq.dam.api.Revision
* javax.jcr.RepositoryException
* javax.jcr.version.Version
*/
package com.adobe.cq.dam.cfm.impl;
import com.adobe.cq.dam.cfm.VersionDef;
import com.adobe.cq.dam.cfm.impl.VersioningException;
import com.day.cq.dam.api.Revision;
import javax.jcr.RepositoryException;
import javax.jcr.version.Version;
public class VersionDefImpl
implements VersionDef {
private final Revision assetRevision;
private final String identifier;
private final String description;
public VersionDefImpl(Revision assetRevision) throws VersioningException {
this.assetRevision = assetRevision;
Version version = assetRevision.getVersion();
try {
this.identifier = version.getIdentifier();
}
catch (RepositoryException re) {
throw new VersioningException("Could not determine identifier.", (Throwable)re);
}
String description = "";
try {
description = version.getName();
}
catch (RepositoryException re) {
// empty catch block
}
this.description = description;
}
public String getIdentifier() {
return this.identifier;
}
public String getDescription() {
return this.description;
}
public Revision getAssetRevision() {
return this.assetRevision;
}
}