View Javadoc

1   /*
2    * jGuild Project: jRPM
3    * Released under the Apache License ( http://www.apache.org/LICENSE )
4    */
5   package com.jguild.jrpm.io.constant;
6   
7   
8   /***
9    * File attributes. (e.g. RPMHeaderTag.FILEFLAGS)
10   *
11   * @author kuss
12   */
13  public class RPMFileAttr implements FlagIf {
14      public static final int _NONE = 0;
15      public static final RPMFileAttr NONE = new RPMFileAttr(_NONE);
16  
17      /*** from %%config */
18      public static final int _CONFIG = (1 << 0);
19      public static final RPMFileAttr CONFIG = new RPMFileAttr(_CONFIG);
20  
21      /*** from %%doc */
22      public static final int _DOC = (1 << 1);
23      public static final RPMFileAttr DOC = new RPMFileAttr(_DOC);
24  
25      /*** from %%donotuse. */
26      public static final int _ICON = (1 << 2);
27      public static final RPMFileAttr ICON = new RPMFileAttr(_ICON);
28  
29      /*** from %%config(missingok) */
30      public static final int _MISSINGOK = (1 << 3);
31      public static final RPMFileAttr MISSINGOK = new RPMFileAttr(_MISSINGOK);
32  
33      /*** from %%config(noreplace) */
34      public static final int _NOREPLACE = (1 << 4);
35      public static final RPMFileAttr NOREPLACE = new RPMFileAttr(_NOREPLACE);
36  
37      /*** @todo (unnecessary) marks 1st file in srpm. */
38      public static final int _SPECFILE = (1 << 5);
39      public static final RPMFileAttr SPECFILE = new RPMFileAttr(_SPECFILE);
40  
41      /*** from %%ghost */
42      public static final int _GHOST = (1 << 6);
43      public static final RPMFileAttr GHOST = new RPMFileAttr(_GHOST);
44  
45      /*** from %%license */
46      public static final int _LICENSE = (1 << 7);
47      public static final RPMFileAttr LICENSE = new RPMFileAttr(_LICENSE);
48  
49      /*** from %%readme */
50      public static final int _README = (1 << 8);
51      public static final RPMFileAttr README = new RPMFileAttr(_README);
52  
53      /*** from %%exclude */
54      public static final int _EXCLUDE = (1 << 9);
55      public static final RPMFileAttr EXCLUDE = new RPMFileAttr(_EXCLUDE);
56  
57      /*** placeholder (SuSE) */
58      public static final int _UNPATCHED = (1 << 10);
59      public static final RPMFileAttr UNPATCHED = new RPMFileAttr(_UNPATCHED);
60  
61      /*** from %%pubkey */
62      public static final int _PUBKEY = (1 << 11);
63      public static final RPMFileAttr PUBKEY = new RPMFileAttr(_PUBKEY);
64      public static final int _ALL = ~(_NONE);
65      public static final RPMFileAttr ALL = new RPMFileAttr(_ALL);
66      private final int flag;
67  
68      private RPMFileAttr(int flag) {
69          this.flag = flag;
70      }
71  
72      /*
73       * @see com.jguild.jrpm.io.constant.FlagIf#value()
74       */
75      public int value() {
76          return flag;
77      }
78  }