1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.portals.graffito.jcr.version;
17
18 import java.util.Calendar;
19
20 import javax.jcr.RepositoryException;
21
22 import org.apache.portals.graffito.jcr.exception.VersionException;
23
24 /***
25 *
26 *
27 * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
28 *
29 */
30 public class Version
31 {
32
33 private javax.jcr.version.Version version;
34
35 public Version(javax.jcr.version.Version version)
36 {
37 this.version = version;
38 }
39
40 public Calendar getCreated()
41 {
42 try
43 {
44 return version.getCreated();
45 }
46 catch (RepositoryException e)
47 {
48
49 throw new VersionException("Error while retrieving the version creation date", e);
50 }
51 }
52
53 public String getUuid()
54 {
55 try
56 {
57 return version.getUUID();
58 }
59 catch (RepositoryException e)
60 {
61
62 throw new VersionException("Error while retrieving the version UUID", e);
63 }
64 }
65
66 public String getPath()
67 {
68 try
69 {
70 return version.getPath();
71 }
72 catch (RepositoryException e)
73 {
74
75 throw new VersionException("Error while retrieving the version path", e);
76 }
77 }
78
79 public String getName()
80 {
81 try
82 {
83 return version.getName();
84
85 }
86 catch (RepositoryException e)
87 {
88
89 throw new VersionException("Error while retrieving the version path", e);
90 }
91 }
92
93 }