1 /*
2 * $Id$
3 */
4
5 package org.apache.maven.model;
6
7 //---------------------------------/
8 //- Imported classes and packages -/
9 //---------------------------------/
10
11 import java.util.Date;
12
13 /**
14 * A repository contains the information needed for establishing
15 * connections with
16 * remote repository.
17 *
18 * @version $Revision$ $Date$
19 */
20 public class Repository extends RepositoryBase
21 implements java.io.Serializable
22 {
23
24
25 //--------------------------/
26 //- Class/Member Variables -/
27 //--------------------------/
28
29 /**
30 * How to handle downloading of releases from this repository.
31 */
32 private RepositoryPolicy releases;
33
34 /**
35 * How to handle downloading of snapshots from this repository.
36 */
37 private RepositoryPolicy snapshots;
38
39
40 //-----------/
41 //- Methods -/
42 //-----------/
43
44 /**
45 * Get how to handle downloading of releases from this
46 * repository.
47 *
48 * @return RepositoryPolicy
49 */
50 public RepositoryPolicy getReleases()
51 {
52 return this.releases;
53 } //-- RepositoryPolicy getReleases()
54
55 /**
56 * Get how to handle downloading of snapshots from this
57 * repository.
58 *
59 * @return RepositoryPolicy
60 */
61 public RepositoryPolicy getSnapshots()
62 {
63 return this.snapshots;
64 } //-- RepositoryPolicy getSnapshots()
65
66 /**
67 * Set how to handle downloading of releases from this
68 * repository.
69 *
70 * @param releases
71 */
72 public void setReleases( RepositoryPolicy releases )
73 {
74 this.releases = releases;
75 } //-- void setReleases( RepositoryPolicy )
76
77 /**
78 * Set how to handle downloading of snapshots from this
79 * repository.
80 *
81 * @param snapshots
82 */
83 public void setSnapshots( RepositoryPolicy snapshots )
84 {
85 this.snapshots = snapshots;
86 } //-- void setSnapshots( RepositoryPolicy )
87
88
89
90 /**
91 * @see java.lang.Object#equals(java.lang.Object)
92 */
93 public boolean equals( Object obj )
94 {
95 return super.equals( obj );
96 }
97
98
99 private String modelEncoding = "UTF-8";
100
101 /**
102 * Set an encoding used for reading/writing the model.
103 *
104 * @param modelEncoding the encoding used when reading/writing the model.
105 */
106 public void setModelEncoding( String modelEncoding )
107 {
108 this.modelEncoding = modelEncoding;
109 }
110
111 /**
112 * @return the current encoding used when reading/writing this model.
113 */
114 public String getModelEncoding()
115 {
116 return modelEncoding;
117 }
118 }