View Javadoc
1   /*
2    * Copyright  2000-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   */
17  package org.codehaus.plexus.archiver.tar;
18  
19  /**
20   * Set of options for long file handling in the task.
21   */
22  public enum TarLongFileMode
23  {
24  
25      warn,
26      fail,
27      truncate,
28      gnu,
29      omit,
30      posix,
31      posix_warn;
32  
33      /**
34       * @return true if value is "truncate".
35       */
36      public boolean isTruncateMode()
37      {
38          return truncate.equals( this );
39      }
40  
41      /**
42       * @return true if value is "warn".
43       */
44      public boolean isWarnMode()
45      {
46          return warn.equals( this );
47      }
48  
49      /**
50       * @return true if value is "gnu".
51       */
52      public boolean isGnuMode()
53      {
54          return gnu.equals( this );
55      }
56  
57      /**
58       * @return true if value is "fail".
59       */
60      public boolean isFailMode()
61      {
62          return fail.equals( this );
63      }
64  
65      /**
66       * @return true if value is "omit".
67       */
68      public boolean isOmitMode()
69      {
70          return omit.equals( this );
71      }
72  
73      /**
74       * @return true if value is "posix".
75       */
76      public boolean isPosixMode()
77      {
78          return posix.equals( this );
79      }
80  
81      /**
82       * @return true if value is "posix_warn".
83       */
84      public boolean isPosixWarnMode()
85      {
86          return posix_warn.equals( this );
87      }
88  
89  }