1
2
3
4
5
6
7
8 package org.codehaus.plexus.security.authorization.rbac.jdo.v0_9_0;
9
10
11
12
13
14
15
16
17
18 public class JdoResource
19 implements org.codehaus.plexus.security.rbac.Resource, java.io.Serializable
20 {
21
22
23
24
25
26
27
28
29
30
31 private String identifier;
32
33
34
35
36
37
38
39
40 private boolean pattern = false;
41
42
43
44
45
46
47 private boolean permanent = false;
48
49
50
51
52
53
54
55
56
57
58
59
60 public boolean equals( Object other )
61 {
62 if ( this == other )
63 {
64 return true;
65 }
66
67 if ( !( other instanceof JdoResource ) )
68 {
69 return false;
70 }
71
72 JdoResource that = (JdoResource) other;
73 boolean result = true;
74
75 result = result && ( getIdentifier() == null ? that.getIdentifier() == null : getIdentifier().equals( that.getIdentifier() ) );
76
77 return result;
78 }
79
80
81
82
83
84
85 public String getIdentifier()
86 {
87 return this.identifier;
88 }
89
90
91
92
93
94
95 public int hashCode()
96 {
97 int result = 17;
98
99 result = 37 * result + ( identifier != null ? identifier.hashCode() : 0 );
100
101 return result;
102 }
103
104
105
106
107
108
109
110
111 public boolean isPattern()
112 {
113 return this.pattern;
114 }
115
116
117
118
119
120
121 public boolean isPermanent()
122 {
123 return this.permanent;
124 }
125
126
127
128
129
130
131 public void setIdentifier( String identifier )
132 {
133 this.identifier = identifier;
134 }
135
136
137
138
139
140
141
142
143 public void setPattern( boolean pattern )
144 {
145 this.pattern = pattern;
146 }
147
148
149
150
151
152
153 public void setPermanent( boolean permanent )
154 {
155 this.permanent = permanent;
156 }
157
158
159
160
161
162
163 public java.lang.String toString()
164 {
165 StringBuffer buf = new StringBuffer( 128 );
166
167 buf.append( "identifier = '" );
168 buf.append( getIdentifier() );
169 buf.append( "'" );
170
171 return buf.toString();
172 }
173
174 }