KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > service > cmr > version > Version


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.service.cmr.version;
18
19 import java.io.Serializable JavaDoc;
20 import java.util.Date JavaDoc;
21 import java.util.Map JavaDoc;
22
23 import org.alfresco.service.cmr.repository.NodeRef;
24
25
26 /**
27  * Version interface.
28  *
29  * Allows access to version property values and frozen state node references.
30  * The version history tree can also be navigated.
31  *
32  * @author Roy Wetherall
33  */

34 public interface Version extends Serializable JavaDoc
35 {
36     /**
37      * Names of the system version properties
38      */

39     public static final String JavaDoc PROP_DESCRIPTION = "description";
40     
41     /**
42      * Helper method to get the created date from the version property data.
43      *
44      * @return the date the version was created
45      */

46     public Date JavaDoc getCreatedDate();
47     
48     /**
49      * Helper method to get the creator of the version.
50      *
51      * @return the creator of the version
52      */

53     public String JavaDoc getCreator();
54
55     /**
56      * Helper method to get the version label from the version property data.
57      *
58      * @return the version label
59      */

60     public String JavaDoc getVersionLabel();
61     
62     /**
63      * Helper method to get the version type.
64      *
65      * @return the value of the version type as an enum value
66      */

67     public VersionType getVersionType();
68     
69     /**
70      * Helper method to get the version description.
71      *
72      * @return the version description
73      */

74     public String JavaDoc getDescription();
75
76     /**
77      * Get the map containing the version property values
78      *
79      * @return the map containing the version properties
80      */

81     public Map JavaDoc<String JavaDoc, Serializable JavaDoc> getVersionProperties();
82     
83     /**
84      * Gets the value of a named version property.
85      *
86      * @param name the name of the property
87      * @return the value of the property
88      *
89      */

90     public Serializable JavaDoc getVersionProperty(String JavaDoc name);
91
92     /**
93      * Gets a reference to the node that this version was created from.
94      * <p>
95      * Note that this reference will be to the current state of the versioned
96      * node which may now correspond to a later version.
97      *
98      * @return a node reference
99      */

100     public NodeRef getVersionedNodeRef();
101     
102     /**
103      * Gets the reference to the node that contains the frozen state of the
104      * version.
105      *
106      * @return a node reference
107      */

108     public NodeRef getFrozenStateNodeRef();
109 }
110
Popular Tags