KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > version > VersionServicePolicies


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.repo.version;
18
19 import java.io.Serializable JavaDoc;
20 import java.util.Map JavaDoc;
21
22 import org.alfresco.repo.policy.ClassPolicy;
23 import org.alfresco.repo.policy.PolicyScope;
24 import org.alfresco.service.cmr.repository.NodeRef;
25 import org.alfresco.service.cmr.version.Version;
26 import org.alfresco.service.namespace.QName;
27
28 /**
29  * Version service policy interfaces
30  *
31  * @author Roy Wetherall
32  */

33 public interface VersionServicePolicies
34 {
35     /**
36      * Before create version policy interface.
37      */

38     public interface BeforeCreateVersionPolicy extends ClassPolicy
39     {
40         /**
41          * Called before a new version is created for a version
42          *
43          * @param versionableNode reference to the node about to be versioned
44          */

45         public void beforeCreateVersion(NodeRef versionableNode);
46     
47     }
48     
49     /**
50      * On create version policy interface
51      */

52     public interface OnCreateVersionPolicy extends ClassPolicy
53     {
54         public void onCreateVersion(
55                 QName classRef,
56                 NodeRef versionableNode,
57                 Map JavaDoc<String JavaDoc, Serializable JavaDoc> versionProperties,
58                 PolicyScope nodeDetails);
59     }
60     
61     /**
62      * Calculate version lable policy interface
63      */

64     public interface CalculateVersionLabelPolicy extends ClassPolicy
65     {
66         public String JavaDoc calculateVersionLabel(
67                 QName classRef,
68                 Version preceedingVersion,
69                 int versionNumber,
70                 Map JavaDoc<String JavaDoc, Serializable JavaDoc>verisonProperties);
71     }
72 }
73
Popular Tags