View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      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.commons.vfs.operations;
18  
19  import org.apache.commons.vfs.FileSystemException;
20  
21  /***
22   * <p>
23   * A FileOperation is an object that brings an extra functions to a FileObject.
24   * The VFS provides the basic functionality to deal with FileObject's. Tha is
25   * create, delete, rename, copy, etc functions. However, if you are working with
26   * FileSystem and its files are, for example, under Version Control System (VCS)
27   * you might want to get an access to the versioning framework and to be able to
28   * manage your files regarding VCS (e.g. commit them, undate, get logs, etc.).
29   * Such type of extended functionality is provided by FileOperation.
30   * </p>
31   * <p>
32   * The FileOperation interface is a genetic interface that should not be
33   * implemented directly. It rather should be extended by other interfaces that
34   * provide some concrete functions.
35   * </p>
36   * <p>
37   * FileOperation is provided by
38   * 
39   * @see FileOperationProvider Especially the FileOperationProvider is responsible
40   *      for looking up and instantiating any concrete FileOperation.
41   *      </p>
42   * 
43   * @author Siarhei Baidun
44   * @since 0.1
45   */
46  public interface FileOperation
47  {
48  
49  	/***
50  	 * Performs necessary actions that are related to the concrete
51  	 * implementation of a FileOperation.
52  	 * 
53  	 * @throws FileSystemException
54  	 */
55  	void process() throws FileSystemException;
56  }