Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
e413abb7
Commit
e413abb7
authored
Apr 25, 2018
by
Roman Soldatow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
REST API Plugin update to 1.3.2
* Adding GZIP functionality
parent
e5eebf4c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
7 deletions
+19
-7
changelog.html
src/plugins/restAPI/changelog.html
+5
-0
plugin.xml
src/plugins/restAPI/plugin.xml
+2
-2
pom.xml
src/plugins/restAPI/pom.xml
+1
-1
readme.html
src/plugins/restAPI/readme.html
+4
-2
JerseyWrapper.java
...esoftware/openfire/plugin/rest/service/JerseyWrapper.java
+7
-2
No files found.
src/plugins/restAPI/changelog.html
View file @
e413abb7
...
@@ -44,6 +44,11 @@
...
@@ -44,6 +44,11 @@
REST API Plugin Changelog
REST API Plugin Changelog
</h1>
</h1>
<p><b>
1.3.2
</b>
-- April 25th, 2018
</p>
<ul>
<li>
Added: GZIP compression
</li>
</ul>
<p><b>
1.3.1
</b>
-- April 20th, 2018
</p>
<p><b>
1.3.1
</b>
-- April 20th, 2018
</p>
<ul>
<ul>
<li>
Fixed: That created rooms were not propagated to other nodes
<a
href=
"https://issues.igniterealtime.org/browse/OF-1535"
>
OF-1535
</a></li>
<li>
Fixed: That created rooms were not propagated to other nodes
<a
href=
"https://issues.igniterealtime.org/browse/OF-1535"
>
OF-1535
</a></li>
...
...
src/plugins/restAPI/plugin.xml
View file @
e413abb7
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
<name>
REST API
</name>
<name>
REST API
</name>
<description>
Allows administration over a RESTful API.
</description>
<description>
Allows administration over a RESTful API.
</description>
<author>
Roman Soldatow
</author>
<author>
Roman Soldatow
</author>
<version>
1.3.
1
</version>
<version>
1.3.
2
</version>
<date>
04/2
0
/2018
</date>
<date>
04/2
5
/2018
</date>
<minServerVersion>
4.1.0
</minServerVersion>
<minServerVersion>
4.1.0
</minServerVersion>
<adminconsole>
<adminconsole>
<tab
id=
"tab-server"
>
<tab
id=
"tab-server"
>
...
...
src/plugins/restAPI/pom.xml
View file @
e413abb7
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
</parent>
</parent>
<groupId>
org.igniterealtime.openfire.plugins
</groupId>
<groupId>
org.igniterealtime.openfire.plugins
</groupId>
<artifactId>
restAPI
</artifactId>
<artifactId>
restAPI
</artifactId>
<version>
1.3.
1
</version>
<version>
1.3.
2
</version>
<name>
Rest API Plugin
</name>
<name>
Rest API Plugin
</name>
<description>
Allows administration over a RESTful API.
</description>
<description>
Allows administration over a RESTful API.
</description>
...
...
src/plugins/restAPI/readme.html
View file @
e413abb7
...
@@ -1998,8 +1998,10 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
...
@@ -1998,8 +1998,10 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
</blockquote>
</blockquote>
<h1
id=
"data-format"
>
Data format
</h1>
<h1
id=
"data-format"
>
Data format
</h1>
<p>
Openfire REST API provides XML and JSON as data format. The default data format is XML.
<br>
<p>
Openfire REST API provides XML and JSON as data format. The default data format is XML.
<br>
To get a JSON result, please add “
<strong>
Accept application/json
</strong>
” to the request header.
<br>
To get a JSON result, please add “
<strong>
Accept: application/json
</strong>
” to the request header.
<br>
If you want to create a resource with JSON data format, please add “
<strong>
Content-Type: application/json
</strong>
”.
</p>
If you want to create a resource with JSON data format, please add “
<strong>
Content-Type: application/json
</strong>
”.
<br>
Since version RESP API 1.3.2 you can also use GZIP to compress the payload of the request or and the response.
<br>
“
<strong>
Content-Encoding: gzip
</strong>
” for the request. “
<strong>
Accept-Encoding: gzip
</strong>
” for the response.
</p>
<h2
id=
"data-types"
>
Data types
</h2>
<h2
id=
"data-types"
>
Data types
</h2>
<h3
id=
"user"
>
User
</h3>
<h3
id=
"user"
>
User
</h3>
...
...
src/plugins/restAPI/src/java/org/jivesoftware/openfire/plugin/rest/service/JerseyWrapper.java
View file @
e413abb7
...
@@ -38,6 +38,9 @@ public class JerseyWrapper extends ServletContainer {
...
@@ -38,6 +38,9 @@ public class JerseyWrapper extends ServletContainer {
/** The Constant CONTAINER_RESPONSE_FILTERS. */
/** The Constant CONTAINER_RESPONSE_FILTERS. */
private
static
final
String
CONTAINER_RESPONSE_FILTERS
=
"com.sun.jersey.spi.container.ContainerResponseFilters"
;
private
static
final
String
CONTAINER_RESPONSE_FILTERS
=
"com.sun.jersey.spi.container.ContainerResponseFilters"
;
/** The Constant GZIP_FILTER. */
private
static
final
String
GZIP_FILTER
=
"com.sun.jersey.api.container.filter.GZIPContentEncodingFilter"
;
/** The Constant RESOURCE_CONFIG_CLASS_KEY. */
/** The Constant RESOURCE_CONFIG_CLASS_KEY. */
private
static
final
String
RESOURCE_CONFIG_CLASS_KEY
=
"com.sun.jersey.config.property.resourceConfigClass"
;
private
static
final
String
RESOURCE_CONFIG_CLASS_KEY
=
"com.sun.jersey.config.property.resourceConfigClass"
;
...
@@ -73,6 +76,7 @@ public class JerseyWrapper extends ServletContainer {
...
@@ -73,6 +76,7 @@ public class JerseyWrapper extends ServletContainer {
prc
=
new
PackagesResourceConfig
(
SCAN_PACKAGE_DEFAULT
);
prc
=
new
PackagesResourceConfig
(
SCAN_PACKAGE_DEFAULT
);
prc
.
setPropertiesAndFeatures
(
config
);
prc
.
setPropertiesAndFeatures
(
config
);
prc
.
getProperties
().
put
(
CONTAINER_RESPONSE_FILTERS
,
CORSFILTER
);
prc
.
getProperties
().
put
(
CONTAINER_RESPONSE_FILTERS
,
CORSFILTER
);
prc
.
getProperties
().
put
(
CONTAINER_RESPONSE_FILTERS
,
GZIP_FILTER
);
loadAuthenticationFilter
();
loadAuthenticationFilter
();
prc
.
getClasses
().
add
(
RestAPIService
.
class
);
prc
.
getClasses
().
add
(
RestAPIService
.
class
);
...
@@ -133,6 +137,7 @@ public class JerseyWrapper extends ServletContainer {
...
@@ -133,6 +137,7 @@ public class JerseyWrapper extends ServletContainer {
}
}
prc
.
getProperties
().
put
(
CONTAINER_REQUEST_FILTERS
,
pickedAuthFilter
);
prc
.
getProperties
().
put
(
CONTAINER_REQUEST_FILTERS
,
pickedAuthFilter
);
prc
.
getProperties
().
put
(
CONTAINER_REQUEST_FILTERS
,
GZIP_FILTER
);
return
loadingStatusMessage
;
return
loadingStatusMessage
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment