KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > repository > helpers > RepositoryVersioningHelper


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.components.repository.helpers;
17
18 import java.util.List JavaDoc;
19
20 import org.apache.cocoon.ProcessingException;
21
22 /**
23  * A versioning helper interface intended to be used by flowscripts or corresponding wrapper components.
24  */

25 public interface RepositoryVersioningHelper {
26     
27     /**
28      * checkout a resource
29      *
30      * @param uri the uri of the resource.
31      * @return a boolean indicating success.
32      * @throws ProcessingException
33      */

34     boolean checkout(String JavaDoc uri) throws ProcessingException;
35
36     /**
37      * checkin a resource
38      *
39      * @param uri the uri of the resource.
40      * @return a boolean indicating success.
41      * @throws ProcessingException
42      */

43     boolean checkin(String JavaDoc uri) throws ProcessingException;
44
45     /**
46      * undo a previously done checkout
47      *
48      * @param uri the uri of the resource.
49      * @return a boolean indicating success.
50      * @throws ProcessingException
51      */

52     boolean uncheckout(String JavaDoc uri) throws ProcessingException;
53
54     /**
55      * check if a resource is under version control
56      *
57      * @param uri the uri of the resource.
58      * @return a boolean indicating if the resource is under version control.
59      * @throws ProcessingException
60      */

61     boolean isVersioned(String JavaDoc uri) throws ProcessingException;
62
63     /**
64      * set a resource under version control
65      *
66      * @param uri the uri of the resource.
67      * @param versioned if true the resource is set under version control.
68      * @return a boolean indicating success.
69      * @throws ProcessingException
70      */

71     boolean setVersioned(String JavaDoc uri, boolean versioned) throws ProcessingException;
72
73     /**
74      * get the version history of a resource
75      *
76      * @param uri the uri of the resource.
77      * @return a list containing the versions.
78      * @throws ProcessingException
79      */

80     List JavaDoc getVersions(String JavaDoc uri) throws ProcessingException;
81
82 }
Popular Tags