java.lang.Object | |
↳ | com.atlassian.confluence.search.v2.QuerySerializer |
Note: Query serialization and deserialization does not work for all possible permutations of query parts
at the moment. For instance, BooleanQuery
will not work. You should not use the QuerySerializer in
it's current guise.
Responsible for converting SearchQueries to and from their String form.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct a new query serializer
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Convert a SearchQuery into a string form that can be transported over the wire, saved, and
so on
| |||||||||||
Convert a string-form query back into object form.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Escape any double-quote in a string with a backslash, and any backslash with a second
backslash.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object |
Construct a new query serializer
queryFactory | the factory to convert SearchQuery string keys back into query objects |
---|
Convert a SearchQuery into a string form that can be transported over the wire, saved, and so on
query | the query to convert |
---|
Convert a string-form query back into object form. If the string is not a valid query an exception will be thrown. This will always be caused by one of two things: the string was generated incorrectly manually (i.e. not by the serializer), or some SearchQuery plugin that was used during query generation is no longer available.
All clients of the serializer must be able to recover from both of the above circumstances safely.
s | the string to convert |
---|
InvalidQueryException | if the string could not be converted successfully |
---|
Escape any double-quote in a string with a backslash, and any backslash with a second backslash.
s | the string to quote |
---|