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.vfs2.operations;
18  
19  import org.apache.commons.vfs2.FileSystemException;
20  
21  /**
22   * <p>
23   * A FileOperation is an object that brings an extra function to a FileObject. The VFS provides the basic functionality
24   * to deal with FileObject's. That is create, delete, rename, copy, and so on functions. However, if you are working
25   * with FileSystem and its files are, for example, under Version Control System (VCS) you might want to get an access to
26   * the versioning framework and to be able to manage your files regarding VCS (e.g. commit them, update, get logs,
27   * etc.). Such type of extended functionality is provided by FileOperation.
28   * </p>
29   * <p>
30   * The FileOperation interface is a genetic interface that should not be implemented directly. It rather should be
31   * extended by other interfaces that provide some concrete functions.
32   * </p>
33   * <p>
34   * FileOperation is provided by
35   * </p>
36   *
37   * @see FileOperationProvider Especially the FileOperationProvider is responsible for looking up and instantiating any
38   *      concrete FileOperation.
39   *
40   * @since 0.1
41   */
42  public interface FileOperation {
43  
44      /**
45       * Performs necessary actions that are related to the concrete implementation of a FileOperation.
46       *
47       * @throws FileSystemException if an error occurs
48       */
49      void process() throws FileSystemException;
50  }