This project has retired. For details please refer to its
Attic page.
ArtifactContentEntry xref
1 package org.apache.archiva.rest.api.model;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import javax.xml.bind.annotation.XmlRootElement;
22 import java.io.Serializable;
23
24
25
26
27
28 @XmlRootElement( name = "artifactContentEntry" )
29 public class ArtifactContentEntry
30 implements Serializable
31 {
32 private String path;
33
34 private boolean file;
35
36 private int depth;
37
38 private String repositoryId;
39
40 public ArtifactContentEntry()
41 {
42
43 }
44
45
46 public ArtifactContentEntry( String path, boolean file, int depth, String repositoryId )
47 {
48
49 this.path = path;
50 this.file = file;
51 this.depth = depth;
52 this.repositoryId = repositoryId;
53 }
54
55 public String getPath()
56 {
57 return path;
58 }
59
60 public void setPath( String path )
61 {
62 this.path = path;
63 }
64
65 public boolean isFile()
66 {
67 return file;
68 }
69
70 public void setFile( boolean file )
71 {
72 this.file = file;
73 }
74
75 public int getDepth()
76 {
77 return depth;
78 }
79
80 public void setDepth( int depth )
81 {
82 this.depth = depth;
83 }
84
85 public String getRepositoryId()
86 {
87 return repositoryId;
88 }
89
90 public void setRepositoryId( String repositoryId )
91 {
92 this.repositoryId = repositoryId;
93 }
94
95
96 @Override
97 public boolean equals( Object o )
98 {
99 if ( this == o )
100 {
101 return true;
102 }
103 if ( !( o instanceof ArtifactContentEntry ) )
104 {
105 return false;
106 }
107
108 ArtifactContentEntry that = (ArtifactContentEntry) o;
109
110 if ( depth != that.depth )
111 {
112 return false;
113 }
114 if ( file != that.file )
115 {
116 return false;
117 }
118 if ( !path.equals( that.path ) )
119 {
120 return false;
121 }
122 if ( !repositoryId.equals( that.repositoryId ) )
123 {
124 return false;
125 }
126
127 return true;
128 }
129
130 @Override
131 public int hashCode()
132 {
133 int result = path.hashCode();
134 result = 31 * result + ( file ? 1 : 0 );
135 result = 31 * result + depth;
136 result = 31 * result + repositoryId.hashCode();
137 return result;
138 }
139
140
141 @Override
142 public String toString()
143 {
144 final StringBuilder sb = new StringBuilder();
145 sb.append( "ArtifactContentEntry" );
146 sb.append( "{path='" ).append( path ).append( '\'' );
147 sb.append( ", file=" ).append( file );
148 sb.append( ", depth=" ).append( depth );
149 sb.append( ", repositoryId='" ).append( repositoryId ).append( '\'' );
150 sb.append( '}' );
151 return sb.toString();
152 }
153 }