@@ -55,6 +55,13 @@ value class InsightAttributeId(@field:NotNull val raw: Int)
5555
5656// endregion ID wrapper
5757
58+ data class AttributeValueResponse (
59+ @field:NotNull val page : Int ,
60+ @field:NotNull val pages : Int ,
61+ @field:NotNull val pageSize : Int ,
62+ @field:NotNull val results : List <String >
63+ )
64+
5865data class InsightObjectPage <T >(
5966 @field:NotNull val totalFilterCount : Int = -1 ,
6067 @field:NotNull val objects : List <T > = emptyList(),
@@ -121,14 +128,17 @@ sealed class InsightAttribute(
121128 @get:JvmName("getAttributeId")
122129 @Transient @field:NotNull open val attributeId : InsightAttributeId ,
123130 @Transient open val schema : ObjectTypeSchemaAttribute ? ,
124- @field:NotNull val type : AttributeTypeEnum
131+ @field:NotNull val type : AttributeTypeEnum ,
132+ val isMulti : Boolean ,
133+ @Transient open val displayValue : String? = null ,
134+ @Transient open val displayValues : List <String >? = null
125135) {
126136 data class Text (
127137 @get:JvmName("getAttributeId")
128138 @field:NotNull override val attributeId : InsightAttributeId ,
129139 val value : String? ,
130140 override val schema : ObjectTypeSchemaAttribute ?
131- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Text ) {
141+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Text , false , value, null ) {
132142 override fun toString () = value ? : " "
133143 }
134144
@@ -137,7 +147,7 @@ sealed class InsightAttribute(
137147 @field:NotNull override val attributeId : InsightAttributeId ,
138148 val value : Int? ,
139149 override val schema : ObjectTypeSchemaAttribute ?
140- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Integer ) {
150+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Integer , false , value?.toString(), null ) {
141151 override fun toString () = value?.toString() ? : " "
142152 }
143153
@@ -146,7 +156,7 @@ sealed class InsightAttribute(
146156 @field:NotNull override val attributeId : InsightAttributeId ,
147157 val value : Boolean? ,
148158 override val schema : ObjectTypeSchemaAttribute ?
149- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Bool ) {
159+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Bool , false , value?.toString(), null ) {
150160 override fun toString () = value?.toString() ? : " "
151161 }
152162
@@ -155,17 +165,17 @@ sealed class InsightAttribute(
155165 @field:NotNull override val attributeId : InsightAttributeId ,
156166 val value : Double? ,
157167 override val schema : ObjectTypeSchemaAttribute ?
158- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .DoubleNumber ){
168+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .DoubleNumber , false , value?.toString(), null ){
159169 override fun toString () = value?.toString() ? : " "
160170 }
161171
162172 data class Date (
163173 @get:JvmName("getAttributeId")
164174 @field:NotNull override val attributeId : InsightAttributeId ,
165175 val value : LocalDate ? ,
166- val displayValue : String? ,
176+ override val displayValue : String? ,
167177 override val schema : ObjectTypeSchemaAttribute ?
168- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Date ){
178+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Date , false , displayValue, null ){
169179 override fun toString () = value?.toString() ? : " "
170180 }
171181
@@ -176,19 +186,19 @@ sealed class InsightAttribute(
176186 @get:JvmName("getAttributeId")
177187 @field:NotNull override val attributeId : InsightAttributeId ,
178188 val value : LocalTime ? ,
179- val displayValue : String ? ,
180- override val schema : ObjectTypeSchemaAttribute ?
181- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Time ){
189+ override val schema : ObjectTypeSchemaAttribute ? ,
190+ override val displayValue : String? = null
191+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Time , false , displayValue, null ){
182192 override fun toString () = value?.toString() ? : " "
183193 }
184194
185195 data class DateTime (
186196 @get:JvmName("getAttributeId")
187197 @field:NotNull override val attributeId : InsightAttributeId ,
188198 val value : ZonedDateTime ? ,
189- val displayValue : String ? ,
190- override val schema : ObjectTypeSchemaAttribute ?
191- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .DateTime ){
199+ override val schema : ObjectTypeSchemaAttribute ? ,
200+ override val displayValue : String? = null
201+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .DateTime , false , displayValue, null ){
192202 override fun toString () = value?.toString() ? : " "
193203 }
194204
@@ -197,7 +207,7 @@ sealed class InsightAttribute(
197207 @field:NotNull override val attributeId : InsightAttributeId ,
198208 val value : String? ,
199209 override val schema : ObjectTypeSchemaAttribute ?
200- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Email ){
210+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Email , false , value, null ){
201211 override fun toString () = value ? : " "
202212 }
203213
@@ -206,7 +216,7 @@ sealed class InsightAttribute(
206216 @field:NotNull override val attributeId : InsightAttributeId ,
207217 val value : String? ,
208218 override val schema : ObjectTypeSchemaAttribute ?
209- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Textarea ){
219+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Textarea , false , value, null ){
210220 override fun toString () = value ? : " "
211221 }
212222
@@ -215,7 +225,7 @@ sealed class InsightAttribute(
215225 @field:NotNull override val attributeId : InsightAttributeId ,
216226 val value : String? ,
217227 override val schema : ObjectTypeSchemaAttribute ?
218- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Ipaddress ){
228+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Ipaddress , false , value, null ){
219229 override fun toString () = value ? : " "
220230 }
221231
@@ -225,7 +235,7 @@ sealed class InsightAttribute(
225235 @field:NotNull override val attributeId : InsightAttributeId ,
226236 val values : List <String >,
227237 override val schema : ObjectTypeSchemaAttribute ?
228- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Url ){
238+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Url , true , values.joinToString(","), values ){
229239 override fun toString () = values.joinToString(" ," )
230240 }
231241
@@ -234,7 +244,7 @@ sealed class InsightAttribute(
234244 @field:NotNull override val attributeId : InsightAttributeId ,
235245 val values : List <String >,
236246 override val schema : ObjectTypeSchemaAttribute ?
237- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Select ){
247+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Select , true , values.joinToString(","), values ){
238248 override fun toString () = values.joinToString(" ," )
239249 }
240250
@@ -244,7 +254,7 @@ sealed class InsightAttribute(
244254 @field:NotNull override val attributeId : InsightAttributeId ,
245255 @field:NotNull val referencedObjects : List <ReferencedObject >,
246256 override val schema : ObjectTypeSchemaAttribute ?
247- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Reference ) {
257+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .Reference , true , referencedObjects.map { it.label }.joinToString(","), referencedObjects.map { it.label } ) {
248258 override fun toString () = referencedObjects.joinToString(" ," ) { it.objectKey }
249259 }
250260
@@ -253,7 +263,7 @@ sealed class InsightAttribute(
253263 @field:NotNull override val attributeId : InsightAttributeId ,
254264 @field:NotNull val users : List <JiraUser >,
255265 override val schema : ObjectTypeSchemaAttribute ?
256- ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .User ){
266+ ) : InsightAttribute(attributeId, schema, AttributeTypeEnum .User , true , users.map { it.displayName }.joinToString(","), users.map { it.displayName } ){
257267 override fun toString () = users.joinToString(" ," ) { it.key }
258268 }
259269
@@ -268,7 +278,10 @@ sealed class InsightAttribute(
268278 ) : InsightAttribute(
269279 attributeId,
270280 schema,
271- AttributeTypeEnum .Confluence
281+ AttributeTypeEnum .Confluence ,
282+ true ,
283+ pages.map { it.title }.joinToString(","),
284+ pages.map { it.title }
272285 ) {
273286 override fun toString () = " Confluence attributeId=$attributeId "
274287 }
@@ -284,7 +297,10 @@ sealed class InsightAttribute(
284297 ) : InsightAttribute(
285298 attributeId,
286299 schema,
287- AttributeTypeEnum .Group
300+ AttributeTypeEnum .Group ,
301+ true ,
302+ groups.map { it.name }.joinToString(","),
303+ groups.map { it.name }
288304 ) {
289305 override fun toString () = " Group attributeId=$attributeId "
290306 }
@@ -298,7 +314,7 @@ sealed class InsightAttribute(
298314 @field:NotNull val versions : List <ProjectVersion >,
299315 override val schema : ObjectTypeSchemaAttribute ?
300316 ) :
301- InsightAttribute (attributeId, schema, AttributeTypeEnum .Version ) {
317+ InsightAttribute (attributeId, schema, AttributeTypeEnum .Version , true , versions.map { it.name }.joinToString( " , " ), versions.map { it.name } ) {
302318 override fun toString () = " Version attributeId=$attributeId "
303319 }
304320
@@ -310,7 +326,7 @@ sealed class InsightAttribute(
310326 @field:NotNull override val attributeId : InsightAttributeId ,
311327 @field:NotNull val projects : List <JiraProject >,
312328 override val schema : ObjectTypeSchemaAttribute ? ) :
313- InsightAttribute (attributeId, schema, AttributeTypeEnum .Project ) {
329+ InsightAttribute (attributeId, schema, AttributeTypeEnum .Project , true , projects.map { it.name }.joinToString( " , " ), projects.map { it.name }) {
314330 override fun toString () = " Project attributeId=$attributeId "
315331 }
316332
@@ -326,7 +342,10 @@ sealed class InsightAttribute(
326342 ) : InsightAttribute(
327343 attributeId,
328344 schema,
329- AttributeTypeEnum .Status
345+ AttributeTypeEnum .Status ,
346+ false ,
347+ status?.name,
348+ null
330349 ) {
331350 override fun toString () = " Status attributeId=$attributeId "
332351 }
@@ -335,7 +354,7 @@ sealed class InsightAttribute(
335354 @get:JvmName("getAttributeId")
336355 @field:NotNull override val attributeId : InsightAttributeId ,
337356 override val schema : ObjectTypeSchemaAttribute ? ) :
338- InsightAttribute (attributeId, schema, AttributeTypeEnum .Unknown ){
357+ InsightAttribute (attributeId, schema, AttributeTypeEnum .Unknown , false , null , null ){
339358 override fun toString () = " "
340359 }
341360
0 commit comments