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
b4a9f8e6
Commit
b4a9f8e6
authored
Jul 22, 2014
by
Dele Olajide
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/igniterealtime/Openfire
parents
1b6d3b74
9ed45603
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1877 additions
and
13614 deletions
+1877
-13614
openfire_i18n_en.properties
src/i18n/openfire_i18n_en.properties
+1
-1
ServerDialback.java
...java/org/jivesoftware/openfire/server/ServerDialback.java
+2
-1
changelog.html
src/plugins/mucservice/changelog.html
+6
-0
logo_small.gif
src/plugins/mucservice/logo_small.gif
+0
-0
plugin.xml
src/plugins/mucservice/plugin.xml
+2
-2
readme.html
src/plugins/mucservice/readme.html
+1510
-13561
MUCRoomEntity.java
.../java/org/jivesoftware/openfire/entity/MUCRoomEntity.java
+55
-6
ParticipantEntities.java
...org/jivesoftware/openfire/entity/ParticipantEntities.java
+27
-0
ParticipantEntity.java
...a/org/jivesoftware/openfire/entity/ParticipantEntity.java
+43
-0
MUCRoomController.java
...a/org/jivesoftware/openfire/plugin/MUCRoomController.java
+160
-28
MUCRoomService.java
...ava/org/jivesoftware/openfire/service/MUCRoomService.java
+16
-12
MUCRoomUtils.java
...rc/java/org/jivesoftware/openfire/utils/MUCRoomUtils.java
+52
-0
registration-props-form.jsp
src/plugins/registration/src/web/registration-props-form.jsp
+2
-2
user-lockout.jsp
src/web/user-lockout.jsp
+1
-1
No files found.
src/i18n/openfire_i18n_en.properties
View file @
b4a9f8e6
...
@@ -1891,7 +1891,7 @@ setup.datasource.settings.jndi_info=Use a datasource defined by your application
...
@@ -1891,7 +1891,7 @@ setup.datasource.settings.jndi_info=Use a datasource defined by your application
setup.datasource.settings.embedded
=
Embedded Database
setup.datasource.settings.embedded
=
Embedded Database
setup.datasource.settings.embedded_info
=
Use an embedded database, powered by HSQLDB. This option
\
setup.datasource.settings.embedded_info
=
Use an embedded database, powered by HSQLDB. This option
\
requires
no
external
database
configuration
and
is
an
easy
way
to
get
up
and
running
quickly.
\
requires
no
external
database
configuration
and
is
an
easy
way
to
get
up
and
running
quickly.
\
However,
i
s
does
not
offer
the
same
level
of
performance
as
an
external
database.
However,
i
t
does
not
offer
the
same
level
of
performance
as
an
external
database.
# Setup datasource standard Page
# Setup datasource standard Page
...
...
src/java/org/jivesoftware/openfire/server/ServerDialback.java
View file @
b4a9f8e6
...
@@ -674,7 +674,8 @@ public class ServerDialback {
...
@@ -674,7 +674,8 @@ public class ServerDialback {
for
(
int
eventType
=
xpp
.
getEventType
();
eventType
!=
XmlPullParser
.
START_TAG
;)
{
for
(
int
eventType
=
xpp
.
getEventType
();
eventType
!=
XmlPullParser
.
START_TAG
;)
{
eventType
=
xpp
.
next
();
eventType
=
xpp
.
next
();
}
}
if
(
xpp
.
getAttributeValue
(
""
,
"version"
).
equals
(
"1.0"
))
{
if
((
xpp
.
getAttributeValue
(
""
,
"version"
)
!=
null
)
&&
(
xpp
.
getAttributeValue
(
""
,
"version"
).
equals
(
"1.0"
)))
{
Document
doc
;
Document
doc
;
try
{
try
{
doc
=
reader
.
parseDocument
();
doc
=
reader
.
parseDocument
();
...
...
src/plugins/mucservice/changelog.html
View file @
b4a9f8e6
...
@@ -44,6 +44,12 @@
...
@@ -44,6 +44,12 @@
MUC Service Plugin Changelog
MUC Service Plugin Changelog
</h1>
</h1>
<p><b>
0.2.0
</b>
-- 07.07.2014
</p>
<ul>
<li>
Extended the service with /participants endpoint to get all room participants
</li>
<li>
Extended the muc service to manage chat room roles (owners, admins, members, outcasts)
</li>
</ul>
<p><b>
0.1.0
</b>
-- 23.06.2014
</p>
<p><b>
0.1.0
</b>
-- 23.06.2014
</p>
<ul>
<ul>
<li>
Initial setup of MUC Service Plugin
</li>
<li>
Initial setup of MUC Service Plugin
</li>
...
...
src/plugins/mucservice/logo_small.gif
0 → 100644
View file @
b4a9f8e6
983 Bytes
src/plugins/mucservice/plugin.xml
View file @
b4a9f8e6
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<name>
MUC Service
</name>
<name>
MUC Service
</name>
<description>
MUC administration over REST Interface
</description>
<description>
MUC administration over REST Interface
</description>
<author>
Roman Soldatow
</author>
<author>
Roman Soldatow
</author>
<version>
0.
1
.0
</version>
<version>
0.
2
.0
</version>
<date>
23.06
.2014
</date>
<date>
07.07
.2014
</date>
<minServerVersion>
3.9.1
</minServerVersion>
<minServerVersion>
3.9.1
</minServerVersion>
</plugin>
</plugin>
src/plugins/mucservice/readme.html
View file @
b4a9f8e6
This diff is collapsed.
Click to expand it.
src/plugins/mucservice/src/java/org/jivesoftware/openfire/entity/MUCRoomEntity.java
View file @
b4a9f8e6
...
@@ -35,6 +35,14 @@ public class MUCRoomEntity {
...
@@ -35,6 +35,14 @@ public class MUCRoomEntity {
private
List
<
String
>
broadcastPresenceRoles
;
private
List
<
String
>
broadcastPresenceRoles
;
private
List
<
String
>
owners
;
private
List
<
String
>
admins
;
private
List
<
String
>
members
;
private
List
<
String
>
outcasts
;
public
MUCRoomEntity
()
{
public
MUCRoomEntity
()
{
}
}
...
@@ -170,12 +178,6 @@ public class MUCRoomEntity {
...
@@ -170,12 +178,6 @@ public class MUCRoomEntity {
this
.
canOccupantsInvite
=
canOccupantsInvite
;
this
.
canOccupantsInvite
=
canOccupantsInvite
;
}
}
@XmlElement
(
name
=
"broadcastPresenceRole"
)
@XmlElementWrapper
(
name
=
"broadcastPresenceRoles"
)
public
List
<
String
>
getBroadcastPresenceRoles
()
{
return
broadcastPresenceRoles
;
}
public
void
setBroadcastPresenceRoles
(
List
<
String
>
broadcastPresenceRoles
)
{
public
void
setBroadcastPresenceRoles
(
List
<
String
>
broadcastPresenceRoles
)
{
this
.
broadcastPresenceRoles
=
broadcastPresenceRoles
;
this
.
broadcastPresenceRoles
=
broadcastPresenceRoles
;
}
}
...
@@ -224,4 +226,51 @@ public class MUCRoomEntity {
...
@@ -224,4 +226,51 @@ public class MUCRoomEntity {
public
void
setModerated
(
boolean
moderated
)
{
public
void
setModerated
(
boolean
moderated
)
{
this
.
moderated
=
moderated
;
this
.
moderated
=
moderated
;
}
}
@XmlElement
(
name
=
"broadcastPresenceRole"
)
@XmlElementWrapper
(
name
=
"broadcastPresenceRoles"
)
public
List
<
String
>
getBroadcastPresenceRoles
()
{
return
broadcastPresenceRoles
;
}
@XmlElementWrapper
(
name
=
"owners"
)
@XmlElement
(
name
=
"owner"
)
public
List
<
String
>
getOwners
()
{
return
owners
;
}
public
void
setOwners
(
List
<
String
>
owners
)
{
this
.
owners
=
owners
;
}
@XmlElementWrapper
(
name
=
"members"
)
@XmlElement
(
name
=
"member"
)
public
List
<
String
>
getMembers
()
{
return
members
;
}
public
void
setMembers
(
List
<
String
>
members
)
{
this
.
members
=
members
;
}
@XmlElementWrapper
(
name
=
"outcasts"
)
@XmlElement
(
name
=
"outcast"
)
public
List
<
String
>
getOutcasts
()
{
return
outcasts
;
}
public
void
setOutcasts
(
List
<
String
>
outcasts
)
{
this
.
outcasts
=
outcasts
;
}
@XmlElementWrapper
(
name
=
"admins"
)
@XmlElement
(
name
=
"admin"
)
public
List
<
String
>
getAdmins
()
{
return
admins
;
}
public
void
setAdmins
(
List
<
String
>
admins
)
{
this
.
admins
=
admins
;
}
}
}
\ No newline at end of file
src/plugins/mucservice/src/java/org/jivesoftware/openfire/entity/ParticipantEntities.java
0 → 100644
View file @
b4a9f8e6
package
org
.
jivesoftware
.
openfire
.
entity
;
import
java.util.List
;
import
javax.xml.bind.annotation.XmlElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
@XmlRootElement
(
name
=
"participants"
)
public
class
ParticipantEntities
{
List
<
ParticipantEntity
>
participants
;
public
ParticipantEntities
()
{
}
public
ParticipantEntities
(
List
<
ParticipantEntity
>
participants
)
{
this
.
participants
=
participants
;
}
@XmlElement
(
name
=
"participant"
)
public
List
<
ParticipantEntity
>
getParticipants
()
{
return
participants
;
}
public
void
setParticipants
(
List
<
ParticipantEntity
>
participants
)
{
this
.
participants
=
participants
;
}
}
src/plugins/mucservice/src/java/org/jivesoftware/openfire/entity/ParticipantEntity.java
0 → 100644
View file @
b4a9f8e6
package
org
.
jivesoftware
.
openfire
.
entity
;
import
javax.xml.bind.annotation.XmlElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
@XmlRootElement
(
name
=
"participant"
)
public
class
ParticipantEntity
{
private
String
jid
;
private
String
role
;
private
String
affiliation
;
public
ParticipantEntity
()
{
}
@XmlElement
public
String
getJid
()
{
return
jid
;
}
public
void
setJid
(
String
jid
)
{
this
.
jid
=
jid
;
}
@XmlElement
public
String
getRole
()
{
return
role
;
}
public
void
setRole
(
String
role
)
{
this
.
role
=
role
;
}
@XmlElement
public
String
getAffiliation
()
{
return
affiliation
;
}
public
void
setAffiliation
(
String
affiliation
)
{
this
.
affiliation
=
affiliation
;
}
}
\ No newline at end of file
src/plugins/mucservice/src/java/org/jivesoftware/openfire/plugin/MUCRoomController.java
View file @
b4a9f8e6
This diff is collapsed.
Click to expand it.
src/plugins/mucservice/src/java/org/jivesoftware/openfire/service/MUCRoomService.java
View file @
b4a9f8e6
...
@@ -14,14 +14,14 @@ import javax.ws.rs.core.MediaType;
...
@@ -14,14 +14,14 @@ import javax.ws.rs.core.MediaType;
import
org.jivesoftware.openfire.entity.MUCChannelType
;
import
org.jivesoftware.openfire.entity.MUCChannelType
;
import
org.jivesoftware.openfire.entity.MUCRoomEntities
;
import
org.jivesoftware.openfire.entity.MUCRoomEntities
;
import
org.jivesoftware.openfire.entity.MUCRoomEntity
;
import
org.jivesoftware.openfire.entity.MUCRoomEntity
;
import
org.jivesoftware.openfire.entity.ParticipantEntities
;
import
org.jivesoftware.openfire.exception.MUCServiceException
;
import
org.jivesoftware.openfire.exception.MUCServiceException
;
import
org.jivesoftware.openfire.plugin.MUCRoomController
;
import
org.jivesoftware.openfire.plugin.MUCRoomController
;
@Path
(
"mucservice"
)
@Path
(
"mucservice
/chatrooms
"
)
public
class
MUCRoomService
{
public
class
MUCRoomService
{
@GET
@GET
@Path
(
"/chatrooms"
)
@Produces
(
MediaType
.
APPLICATION_XML
)
@Produces
(
MediaType
.
APPLICATION_XML
)
public
MUCRoomEntities
getMUCRooms
(
@DefaultValue
(
"conference"
)
@QueryParam
(
"servicename"
)
String
serviceName
,
public
MUCRoomEntities
getMUCRooms
(
@DefaultValue
(
"conference"
)
@QueryParam
(
"servicename"
)
String
serviceName
,
@DefaultValue
(
MUCChannelType
.
PUBLIC
)
@QueryParam
(
"type"
)
String
channelType
,
@DefaultValue
(
MUCChannelType
.
PUBLIC
)
@QueryParam
(
"type"
)
String
channelType
,
...
@@ -30,7 +30,7 @@ public class MUCRoomService {
...
@@ -30,7 +30,7 @@ public class MUCRoomService {
}
}
@GET
@GET
@Path
(
"/
chatrooms/
{roomName}"
)
@Path
(
"/{roomName}"
)
@Produces
(
MediaType
.
APPLICATION_XML
)
@Produces
(
MediaType
.
APPLICATION_XML
)
public
MUCRoomEntity
getMUCRoom
(
@PathParam
(
"roomName"
)
String
roomName
,
public
MUCRoomEntity
getMUCRoom
(
@PathParam
(
"roomName"
)
String
roomName
,
@DefaultValue
(
"conference"
)
@QueryParam
(
"servicename"
)
String
serviceName
)
throws
MUCServiceException
{
@DefaultValue
(
"conference"
)
@QueryParam
(
"servicename"
)
String
serviceName
)
throws
MUCServiceException
{
...
@@ -38,27 +38,31 @@ public class MUCRoomService {
...
@@ -38,27 +38,31 @@ public class MUCRoomService {
}
}
@DELETE
@DELETE
@Path
(
"/
chatrooms/
{roomName}"
)
@Path
(
"/{roomName}"
)
public
void
deleteMUCRoom
(
@PathParam
(
"roomName"
)
String
roomName
,
public
void
deleteMUCRoom
(
@PathParam
(
"roomName"
)
String
roomName
,
@DefaultValue
(
"conference"
)
@QueryParam
(
"servicename"
)
String
serviceName
)
throws
MUCServiceException
{
@DefaultValue
(
"conference"
)
@QueryParam
(
"servicename"
)
String
serviceName
)
throws
MUCServiceException
{
MUCRoomController
.
getInstance
().
deleteChatRoom
(
roomName
,
serviceName
);
MUCRoomController
.
getInstance
().
deleteChatRoom
(
roomName
,
serviceName
);
}
}
@POST
@POST
@Path
(
"/chatrooms"
)
public
void
createMUCRoom
(
@DefaultValue
(
"conference"
)
@QueryParam
(
"servicename"
)
String
serviceName
,
public
void
createMUCRoom
(
@DefaultValue
(
"conference"
)
@QueryParam
(
"servicename"
)
String
serviceName
,
@DefaultValue
(
"admin"
)
@QueryParam
(
"owner"
)
String
owner
,
MUCRoomEntity
mucRoomEntity
)
MUCRoomEntity
mucRoomEntity
)
throws
MUCServiceException
{
throws
MUCServiceException
{
MUCRoomController
.
getInstance
().
createChatRoom
(
serviceName
,
mucRoomEntity
);
MUCRoomController
.
getInstance
().
createChatRoom
(
serviceName
,
owner
,
mucRoomEntity
);
}
}
@PUT
@PUT
@Path
(
"/
chatrooms/
{roomName}"
)
@Path
(
"/{roomName}"
)
public
void
udpateMUCRoom
(
@PathParam
(
"roomName"
)
String
roomName
,
public
void
udpateMUCRoom
(
@PathParam
(
"roomName"
)
String
roomName
,
@DefaultValue
(
"conference"
)
@QueryParam
(
"servicename"
)
String
serviceName
,
@DefaultValue
(
"conference"
)
@QueryParam
(
"servicename"
)
String
serviceName
,
MUCRoomEntity
mucRoomEntity
)
@DefaultValue
(
"admin"
)
@QueryParam
(
"owner"
)
String
owner
,
MUCRoomEntity
mucRoomEntity
)
throws
MUCServiceException
{
throws
MUCServiceException
{
MUCRoomController
.
getInstance
().
updateChatRoom
(
roomName
,
serviceName
,
owner
,
mucRoomEntity
);
MUCRoomController
.
getInstance
().
updateChatRoom
(
roomName
,
serviceName
,
mucRoomEntity
);
}
}
@GET
@Path
(
"/{roomName}/participants"
)
@Produces
(
MediaType
.
APPLICATION_XML
)
public
ParticipantEntities
getMUCRoomParticipants
(
@PathParam
(
"roomName"
)
String
roomName
,
@DefaultValue
(
"conference"
)
@QueryParam
(
"servicename"
)
String
serviceName
)
throws
MUCServiceException
{
return
MUCRoomController
.
getInstance
().
getRoomParticipants
(
roomName
,
serviceName
);
}
}
}
src/plugins/mucservice/src/java/org/jivesoftware/openfire/utils/MUCRoomUtils.java
0 → 100644
View file @
b4a9f8e6
package
org
.
jivesoftware
.
openfire
.
utils
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.List
;
import
org.xmpp.packet.JID
;
/**
* The Class MUCRoomUtils.
*/
public
class
MUCRoomUtils
{
/**
* Instantiates a new MUC room utils.
*/
private
MUCRoomUtils
()
{
throw
new
AssertionError
();
}
/**
* Convert jids to string list.
*
* @param jids
* the jids
* @return the array list< string>
*/
public
static
ArrayList
<
String
>
convertJIDsToStringList
(
Collection
<
JID
>
jids
)
{
ArrayList
<
String
>
result
=
new
ArrayList
<
String
>();
for
(
JID
jid
:
jids
)
{
result
.
add
(
jid
.
toBareJID
());
}
return
result
;
}
/**
* Convert strings to jids.
*
* @param jids
* the jids
* @return the list<jid>
*/
public
static
List
<
JID
>
convertStringsToJIDs
(
List
<
String
>
jids
)
{
List
<
JID
>
result
=
new
ArrayList
<
JID
>();
for
(
String
jidString
:
jids
)
{
result
.
add
(
new
JID
(
jidString
));
}
return
result
;
}
}
src/plugins/registration/src/web/registration-props-form.jsp
View file @
b4a9f8e6
...
@@ -282,7 +282,7 @@ function addEmailContact() {
...
@@ -282,7 +282,7 @@ function addEmailContact() {
</tr>
</tr>
<tr>
<tr>
<td
width=
"1%"
align=
"center"
nowrap
><input
type=
"checkbox"
name=
"groupenabled"
<%=
(
groupEnabled
)
?
"checked"
:
""
%>></td>
<td
width=
"1%"
align=
"center"
nowrap
><input
type=
"checkbox"
name=
"groupenabled"
<%=
(
groupEnabled
)
?
"checked"
:
""
%>></td>
<td
width=
"99%"
align=
"left"
colspan=
"2"
><fmt:message
key=
"registration.props.form.enable_add_user_to_group"
/></td
<td
width=
"99%"
align=
"left"
colspan=
"2"
><fmt:message
key=
"registration.props.form.enable_add_user_to_group"
/></td
>
</tr>
</tr>
<tr>
<tr>
<td
width=
"1%"
align=
"center"
nowrap
><input
type=
"checkbox"
name=
"webenabled"
<%=
(
webEnabled
)
?
"checked"
:
""
%>></td>
<td
width=
"1%"
align=
"center"
nowrap
><input
type=
"checkbox"
name=
"webenabled"
<%=
(
webEnabled
)
?
"checked"
:
""
%>></td>
...
...
src/web/user-lockout.jsp
View file @
b4a9f8e6
...
@@ -172,7 +172,7 @@
...
@@ -172,7 +172,7 @@
<input
type=
"radio"
name=
"startdelay"
value=
"60"
/>
<fmt:message
key=
"user.lockout.time.in"
/>
<fmt:message
key=
"user.lockout.time.1hour"
/><br
/>
<input
type=
"radio"
name=
"startdelay"
value=
"60"
/>
<fmt:message
key=
"user.lockout.time.in"
/>
<fmt:message
key=
"user.lockout.time.1hour"
/><br
/>
<input
type=
"radio"
name=
"startdelay"
value=
"1440"
/>
<fmt:message
key=
"user.lockout.time.in"
/>
<fmt:message
key=
"user.lockout.time.1day"
/><br
/>
<input
type=
"radio"
name=
"startdelay"
value=
"1440"
/>
<fmt:message
key=
"user.lockout.time.in"
/>
<fmt:message
key=
"user.lockout.time.1day"
/><br
/>
<input
type=
"radio"
name=
"startdelay"
value=
"10080"
/>
<fmt:message
key=
"user.lockout.time.in"
/>
<fmt:message
key=
"user.lockout.time.1week"
/><br
/>
<input
type=
"radio"
name=
"startdelay"
value=
"10080"
/>
<fmt:message
key=
"user.lockout.time.in"
/>
<fmt:message
key=
"user.lockout.time.1week"
/><br
/>
<input
type=
"radio"
name=
"startdelay"
value=
"-2"
/>
<fmt:message
key=
"user.lockout.time.in"
/>
<input
type=
"text"
size=
"5"
maxlength=
"10"
name=
"star
y
delay_custom"
/>
<fmt:message
key=
"user.lockout.time.minutes"
/><br
/>
<input
type=
"radio"
name=
"startdelay"
value=
"-2"
/>
<fmt:message
key=
"user.lockout.time.in"
/>
<input
type=
"text"
size=
"5"
maxlength=
"10"
name=
"star
t
delay_custom"
/>
<fmt:message
key=
"user.lockout.time.minutes"
/><br
/>
<br
/>
<br
/>
<%
}
%>
<%
}
%>
<%
if
(
LockOutManager
.
getLockOutProvider
().
isTimeoutSupported
())
{
%>
<%
if
(
LockOutManager
.
getLockOutProvider
().
isTimeoutSupported
())
{
%>
...
...
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