1 /*
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"); you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 =================== DO NOT EDIT THIS FILE ====================
19 Generated by Modello 2.5.1,
20 any modifications will be overwritten.
21 ==============================================================
22 */
23
24 package org.apache.maven.buildcache.xml.config;
25
26 /**
27 * Section relative to outputs which are not artifacts but need to
28 * be saved/restored.
29 *
30 * @version $Revision$ $Date$
31 */
32 @SuppressWarnings( "all" )
33 public class AttachedOutputs
34 implements java.io.Serializable
35 {
36
37 //--------------------------/
38 //- Class/Member Variables -/
39 //--------------------------/
40
41 /**
42 * Preserve Unix file permissions when saving/restoring
43 * attached outputs. When enabled, permissions are stored in
44 * ZIP entry headers and become part of the cache key, ensuring
45 * cache invalidation when permissions change. This is similar
46 * to how Git includes file mode in tree hashes. Disabling this
47 * may improve portability across different systems but will
48 * not preserve executable bits.
49 */
50 private boolean preservePermissions = true;
51
52 /**
53 * Field dirNames.
54 */
55 private java.util.List<DirName> dirNames;
56
57
58 //-----------/
59 //- Methods -/
60 //-----------/
61
62 /**
63 * Method addDirName.
64 *
65 * @param dirName a dirName object.
66 */
67 public void addDirName( DirName dirName )
68 {
69 getDirNames().add( dirName );
70 } //-- void addDirName( DirName )
71
72 /**
73 * Method getDirNames.
74 *
75 * @return List
76 */
77 public java.util.List<DirName> getDirNames()
78 {
79 if ( this.dirNames == null )
80 {
81 this.dirNames = new java.util.ArrayList<DirName>();
82 }
83
84 return this.dirNames;
85 } //-- java.util.List<DirName> getDirNames()
86
87 /**
88 * Get preserve Unix file permissions when saving/restoring
89 * attached outputs. When enabled, permissions are stored in
90 * ZIP entry headers and become part of the cache key, ensuring
91 * cache invalidation when permissions change. This is similar
92 * to how Git includes file mode in tree hashes. Disabling this
93 * may improve portability across different systems but will
94 * not preserve executable bits.
95 *
96 * @return boolean
97 */
98 public boolean isPreservePermissions()
99 {
100 return this.preservePermissions;
101 } //-- boolean isPreservePermissions()
102
103 /**
104 * Method removeDirName.
105 *
106 * @param dirName a dirName object.
107 */
108 public void removeDirName( DirName dirName )
109 {
110 getDirNames().remove( dirName );
111 } //-- void removeDirName( DirName )
112
113 /**
114 * Set path to a directory containing files which needs to be
115 * saved/restored (relative to the build directory).
116 *
117 * @param dirNames a dirNames object.
118 */
119 public void setDirNames( java.util.List<DirName> dirNames )
120 {
121 this.dirNames = dirNames;
122 } //-- void setDirNames( java.util.List )
123
124 /**
125 * Set preserve Unix file permissions when saving/restoring
126 * attached outputs. When enabled, permissions are stored in
127 * ZIP entry headers and become part of the cache key, ensuring
128 * cache invalidation when permissions change. This is similar
129 * to how Git includes file mode in tree hashes. Disabling this
130 * may improve portability across different systems but will
131 * not preserve executable bits.
132 *
133 * @param preservePermissions a preservePermissions object.
134 */
135 public void setPreservePermissions( boolean preservePermissions )
136 {
137 this.preservePermissions = preservePermissions;
138 } //-- void setPreservePermissions( boolean )
139
140 }