
com.groupbyinc.flux.rest.action.support.RestTable.class Maven / Gradle / Ivy
???? 3? 1com/groupbyinc/flux/rest/action/support/RestTable java/lang/Object RestTable.java ?com/groupbyinc/flux/rest/action/support/RestTable$DisplayHeader
DisplayHeader %com/groupbyinc/flux/common/Table$Cell com/groupbyinc/flux/common/Table Cell ()V
this 3Lcom/groupbyinc/flux/rest/action/support/RestTable;
buildResponse q(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestChannel;)Lcom/groupbyinc/flux/rest/RestResponse; java/lang/Exception $com/groupbyinc/flux/rest/RestChannel request (()Lcom/groupbyinc/flux/rest/RestRequest;
format Content-Type $com/groupbyinc/flux/rest/RestRequest " header &(Ljava/lang/String;)Ljava/lang/String; $ %
# & param 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; ( )
# * 0com/groupbyinc/flux/common/xcontent/XContentType , fromRestContentType F(Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentType; . /
- 0 buildXContentBuilder 2
3 buildTextPlainResponse 5
6 table "Lcom/groupbyinc/flux/common/Table; channel &Lcom/groupbyinc/flux/rest/RestChannel; &Lcom/groupbyinc/flux/rest/RestRequest; xContentType 2Lcom/groupbyinc/flux/common/xcontent/XContentType;
newBuilder 7()Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? @
A buildDisplayHeaders Z(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/List; C D
E 3com/groupbyinc/flux/common/xcontent/XContentBuilder G
startArray I @
H J java/util/List L getRows ()Ljava/util/List; N O
P size ()I R S M T startObject V @
H W iterator ()Ljava/util/Iterator; Y Z M [ java/util/Iterator ] hasNext ()Z _ ` ^ a next ()Ljava/lang/Object; c d ^ e display Ljava/lang/String; g h i getAsMap ()Ljava/util/Map; k l
m name o h p
java/util/Map r get &(Ljava/lang/Object;)Ljava/lang/Object; t u s v (I)Ljava/lang/Object; t x M y value Ljava/lang/Object; { |
} renderValue L(Lcom/groupbyinc/flux/rest/RestRequest;Ljava/lang/Object;)Ljava/lang/String; ?
? field [(Ljava/lang/String;Ljava/lang/String;)Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; ? ?
H ? endObject ? @
H ? endArray ? @
H ? *com/groupbyinc/flux/rest/BytesRestResponse ? #com/groupbyinc/flux/rest/RestStatus ? OK %Lcom/groupbyinc/flux/rest/RestStatus; ? ? ? ? ](Lcom/groupbyinc/flux/rest/RestStatus;Lcom/groupbyinc/flux/common/xcontent/XContentBuilder;)V ?
? ? ALcom/groupbyinc/flux/rest/action/support/RestTable$DisplayHeader; row I builder 5Lcom/groupbyinc/flux/common/xcontent/XContentBuilder; displayHeaders SLjava/util/List; Ljava/util/List; java/io/IOException ? v ? paramAsBoolean (Ljava/lang/String;Z)Z ? ?
# ? buildWidths ](Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;ZLjava/util/List;)[I ? ?
? bytesOutput :()Lcom/groupbyinc/flux/common/io/stream/BytesStreamOutput; ? ?
? .com/groupbyinc/flux/common/io/UTF8StreamWriter ?
? setOutput H(Ljava/io/OutputStream;)Lcom/groupbyinc/flux/common/io/UTF8StreamWriter; ? ?
? ? [I ? 6com/groupbyinc/flux/common/io/stream/BytesStreamOutput ? findHeaderByName ;(Ljava/lang/String;)Lcom/groupbyinc/flux/common/Table$Cell; ? ?
? <(Ljava/lang/Object;Lcom/groupbyinc/flux/common/Table$Cell;)V ?
? pad ?(Lcom/groupbyinc/flux/common/Table$Cell;ILcom/groupbyinc/flux/rest/RestRequest;Lcom/groupbyinc/flux/common/io/UTF8StreamWriter;)V ? ?
? ? append *(Ljava/lang/CharSequence;)Ljava/io/Writer; ? ?
? ?
? close ?
? ? text/plain; charset=UTF-8 ? bytes 3()Lcom/groupbyinc/flux/common/bytes/BytesReference; ? ?
? ? k(Lcom/groupbyinc/flux/rest/RestStatus;Ljava/lang/String;Lcom/groupbyinc/flux/common/bytes/BytesReference;)V ?
? ? col verbose Z headers width bytesOut 8Lcom/groupbyinc/flux/common/io/stream/BytesStreamOutput; out 0Lcom/groupbyinc/flux/common/io/UTF8StreamWriter; java/util/ArrayList ?
? h ? hasParam (Ljava/lang/String;)Z ? ?
# ? expandHeadersFromRequest Y(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/Set; ? ?
?
java/util/Set ? ? [ java/lang/String ? containsKey (Ljava/lang/Object;)Z ? ? s ? '(Ljava/lang/String;Ljava/lang/String;)V ?
?
getHeaders ? O
? attr Ljava/util/Map; ?
alias "com/groupbyinc/flux/common/Strings splitStringByCommaToArray '(Ljava/lang/String;)[Ljava/lang/String;
[Ljava/lang/String; equals
?
? toString ()Ljava/lang/String;
add ? M getHeaderMap l
sibling java/lang/StringBuilder
-(Ljava/lang/String;)Ljava/lang/StringBuilder; ?
."
default% #com/groupbyinc/flux/common/Booleans' parseBoolean) ?
(* aliases
headerCell 'Lcom/groupbyinc/flux/common/Table$Cell; c hcell siblingFlag
dispHeader possibility #Ljava/util/Set; Ljava/util/Set; d cell java/util/LinkedHashSet8 (I)V :
9; ( %
#= &com/groupbyinc/flux/common/regex/Regex? isSimpleMatchPatternA ?
@B simpleMatch '(Ljava/lang/String;Ljava/lang/String;)ZDE
@F ? configuredHeader tableHeaderCell buildHelpWidths L(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)[I lengthM S
?N P descR
not availableT vWidth hdr i
text-alignY left[ right] B sValue leftOver textAlign -com/groupbyinc/flux/common/unit/ByteSizeValuec ? bf ()J ?h
di java/lang/Longk (J)Ljava/lang/String;m
ln kp kbrh
ds mu mbwh
dx gz gb|h
d} t tb?h
d? p? pb?h
d?
d )com/groupbyinc/flux/common/unit/SizeValue? R singles?h
?? kilo?h
?? mega?h
?? giga?h
?? tera?h
?? peta?h
??
? )com/groupbyinc/flux/common/unit/TimeValue? time? ms? millis?h
?? s? seconds?h
?? minutes?h
?? hours?h
??
? /Lcom/groupbyinc/flux/common/unit/ByteSizeValue;
resolution +Lcom/groupbyinc/flux/common/unit/SizeValue; +Lcom/groupbyinc/flux/common/unit/TimeValue; Code LocalVariableTable LineNumberTable
StackMapTable
Exceptions LocalVariableTypeTable Signature ?(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/List; m(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;)Ljava/util/Set; ?(Lcom/groupbyinc/flux/common/Table;Lcom/groupbyinc/flux/rest/RestRequest;ZLjava/util/List;)[I
SourceFile InnerClasses !
? / *? ? ? ? ( ? ? %+? M,,!? '? +? 1N-? *+? 4?*+? 7? ? * % 8 9 % : ; <