01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.cocoon.components.repository.helpers;
18:
19: import java.util.List;
20:
21: import org.apache.cocoon.ProcessingException;
22:
23: /**
24: * A versioning helper interface intended to be used by flowscripts or corresponding wrapper components.
25: */
26: public interface RepositoryVersioningHelper {
27:
28: /**
29: * checkout a resource
30: *
31: * @param uri the uri of the resource.
32: * @return a boolean indicating success.
33: * @throws ProcessingException
34: */
35: boolean checkout(String uri) throws ProcessingException;
36:
37: /**
38: * checkin a resource
39: *
40: * @param uri the uri of the resource.
41: * @return a boolean indicating success.
42: * @throws ProcessingException
43: */
44: boolean checkin(String uri) throws ProcessingException;
45:
46: /**
47: * undo a previously done checkout
48: *
49: * @param uri the uri of the resource.
50: * @return a boolean indicating success.
51: * @throws ProcessingException
52: */
53: boolean uncheckout(String uri) throws ProcessingException;
54:
55: /**
56: * check if a resource is under version control
57: *
58: * @param uri the uri of the resource.
59: * @return a boolean indicating if the resource is under version control.
60: * @throws ProcessingException
61: */
62: boolean isVersioned(String uri) throws ProcessingException;
63:
64: /**
65: * set a resource under version control
66: *
67: * @param uri the uri of the resource.
68: * @param versioned if true the resource is set under version control.
69: * @return a boolean indicating success.
70: * @throws ProcessingException
71: */
72: boolean setVersioned(String uri, boolean versioned)
73: throws ProcessingException;
74:
75: /**
76: * get the version history of a resource
77: *
78: * @param uri the uri of the resource.
79: * @return a list containing the versions.
80: * @throws ProcessingException
81: */
82: List getVersions(String uri) throws ProcessingException;
83:
84: }
|