1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 00:59:39 +02:00

Enable trailing whitespace checkstyle check

for all source code regions, including javadoc.
This commit is contained in:
Florian Schmaus 2018-05-09 23:06:12 +02:00
parent 9d61a6de7d
commit e8923b9d16
545 changed files with 3713 additions and 3715 deletions

View file

@ -69,7 +69,7 @@ public class QueueUser {
}
/**
* Get the estimated remaining time.
* Get the estimated remaining time.
* @return the estimated time remaining of the customer in the queue in seconds, or -1 if
* if the update which this instance embodies is only a position update instead
*/

View file

@ -68,10 +68,10 @@ public class Agent {
* Return the agents name.
*
* @return - the agents name.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public String getName() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
AgentInfo agentInfo = new AgentInfo();
@ -89,10 +89,10 @@ public class Agent {
* error code.
*
* @param newName the new name of the agent.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void setName(String newName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
AgentInfo agentInfo = new AgentInfo();

View file

@ -70,8 +70,8 @@ public class AgentRoster {
* Constructs a new AgentRoster.
*
* @param connection an XMPP connection.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
AgentRoster(XMPPConnection connection, EntityBareJid workgroupJID) throws NotConnectedException, InterruptedException {
this.connection = connection;
@ -93,8 +93,8 @@ public class AgentRoster {
* Reloads the entire roster from the server. This is an asynchronous operation,
* which means the method will return immediately, and the roster will be
* reloaded at a later point when the server responds to the reload request.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void reload() throws NotConnectedException, InterruptedException {
AgentStatusRequest request = new AgentStatusRequest();

View file

@ -209,8 +209,8 @@ public class AgentSession {
* Returns the agent roster for the workgroup, which contains.
*
* @return the AgentRoster
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public AgentRoster getAgentRoster() throws NotConnectedException, InterruptedException {
if (agentRoster == null) {
@ -269,8 +269,8 @@ public class AgentSession {
* @param key the meta data key
* @param val the non-null meta data value
* @throws XMPPException if an exception occurs.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
*/
public void setMetaData(String key, String val) throws XMPPException, SmackException, InterruptedException {
synchronized (this.metaData) {
@ -290,8 +290,8 @@ public class AgentSession {
*
* @param key the meta data key.
* @throws XMPPException if an exception occurs.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
*/
public void removeMetaData(String key) throws XMPPException, SmackException, InterruptedException {
synchronized (this.metaData) {
@ -323,7 +323,7 @@ public class AgentSession {
* @throws XMPPException if an error occurs setting the online status.
* @throws SmackException assertEquals(SmackException.Type.NO_RESPONSE_FROM_SERVER, e.getType());
return;
* @throws InterruptedException
* @throws InterruptedException
*/
public void setOnline(boolean online) throws XMPPException, SmackException, InterruptedException {
// If the online status hasn't changed, do nothing.
@ -382,8 +382,8 @@ public class AgentSession {
* @param presenceMode the presence mode of the agent.
* @param maxChats the maximum number of chats the agent is willing to accept.
* @throws XMPPException if an error occurs setting the agent status.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
* @throws IllegalStateException if the agent is not online with the workgroup.
*/
public void setStatus(Presence.Mode presenceMode, int maxChats) throws XMPPException, SmackException, InterruptedException {
@ -409,10 +409,10 @@ public class AgentSession {
* @param presenceMode the presence mode of the agent.
* @param maxChats the maximum number of chats the agent is willing to accept.
* @param status sets the status message of the presence update.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws IllegalStateException if the agent is not online with the workgroup.
*/
public void setStatus(Presence.Mode presenceMode, int maxChats, String status)
@ -462,10 +462,10 @@ public class AgentSession {
*
* @param presenceMode the presence mode of the agent.
* @param status sets the status message of the presence update.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws IllegalStateException if the agent is not online with the workgroup.
*/
public void setStatus(Presence.Mode presenceMode, String status) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
@ -501,8 +501,8 @@ public class AgentSession {
*
* @param userID the ID of the user to remove.
* @throws XMPPException if an exception occurs.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void dequeueUser(EntityJid userID) throws XMPPException, NotConnectedException, InterruptedException {
// todo: this method simply won't work right now.
@ -519,8 +519,8 @@ public class AgentSession {
* @param userID the id of the user to get his conversations.
* @return the transcripts of a given user.
* @throws XMPPException if an error occurs while getting the information.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
*/
public Transcripts getTranscripts(Jid userID) throws XMPPException, SmackException, InterruptedException {
return transcriptManager.getTranscripts(workgroupJID, userID);
@ -532,8 +532,8 @@ public class AgentSession {
* @param sessionID the id of the session to get the full transcript.
* @return the full conversation transcript of a given session.
* @throws XMPPException if an error occurs while getting the information.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
*/
public Transcript getTranscript(String sessionID) throws XMPPException, SmackException, InterruptedException {
return transcriptManager.getTranscript(workgroupJID, sessionID);
@ -546,8 +546,8 @@ public class AgentSession {
*
* @return the Form to use for searching transcripts.
* @throws XMPPException if an error occurs while sending the request to the server.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
*/
public Form getTranscriptSearchForm() throws XMPPException, SmackException, InterruptedException {
return transcriptSearchManager.getSearchForm(workgroupJID.asDomainBareJid());
@ -560,9 +560,9 @@ public class AgentSession {
*
* @param completedForm the filled out search form.
* @return the result of the transcript search.
* @throws SmackException
* @throws XMPPException
* @throws InterruptedException
* @throws SmackException
* @throws XMPPException
* @throws InterruptedException
*/
public ReportedData searchTranscripts(Form completedForm) throws XMPPException, SmackException, InterruptedException {
return transcriptSearchManager.submitSearch(workgroupJID.asDomainBareJid(),
@ -576,10 +576,10 @@ public class AgentSession {
*
* @param roomID the room to get information about its occupants.
* @return information about the occupants of the specified room.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public OccupantsInfo getOccupantsInfo(String roomID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
OccupantsInfo request = new OccupantsInfo(roomID);
@ -848,10 +848,10 @@ public class AgentSession {
*
* @param sessionID the session id of a Chat Session.
* @param note the chat note to add.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void setNote(String sessionID, String note) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
ChatNotes notes = new ChatNotes();
@ -869,8 +869,8 @@ public class AgentSession {
* @return the <code>ChatNote</code> associated with a given chat session.
* @throws XMPPErrorException if an error occurs while retrieving the ChatNote.
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public ChatNotes getNote(String sessionID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
ChatNotes request = new ChatNotes();
@ -890,8 +890,8 @@ public class AgentSession {
* @param startDate point in time from which on history should get retrieved.
* @return the chat history associated with a given jid.
* @throws XMPPException if an error occurs while retrieving the AgentChatHistory.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public AgentChatHistory getAgentHistory(EntityBareJid jid, int maxSessions, Date startDate) throws XMPPException, NotConnectedException, InterruptedException {
AgentChatHistory request;
@ -915,10 +915,10 @@ public class AgentSession {
* Asks the workgroup for it's Search Settings.
*
* @return SearchSettings the search settings for this workgroup.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public SearchSettings getSearchSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
SearchSettings request = new SearchSettings();
@ -935,9 +935,9 @@ public class AgentSession {
* @param global true to retrieve global macros, otherwise false for personal macros.
* @return MacroGroup the root macro group.
* @throws XMPPErrorException if an error occurs while getting information from the server.
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public MacroGroup getMacros(boolean global) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
Macros request = new Macros();
@ -952,11 +952,11 @@ public class AgentSession {
/**
* Persists the Personal Macro for an agent.
*
* @param group the macro group to save.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @param group the macro group to save.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void saveMacros(MacroGroup group) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
Macros request = new Macros();
@ -974,8 +974,8 @@ public class AgentSession {
* @param sessionID the sessionID to query for.
* @return Map a map of all metadata associated with the sessionID.
* @throws XMPPException if an error occurs while getting information from the server.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public Map<String, List<String>> getChatMetadata(String sessionID) throws XMPPException, NotConnectedException, InterruptedException {
ChatMetadata request = new ChatMetadata();
@ -1013,9 +1013,9 @@ public class AgentSession {
* @param reason the reason of the invitation.
* @throws XMPPErrorException if the sender of the invitation is not an agent or the service failed to process
* the request.
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void sendRoomInvitation(RoomInvitation.Type type, Jid invitee, String sessionID, String reason) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
final RoomInvitation invitation = new RoomInvitation(type, invitee, sessionID, reason);
@ -1050,9 +1050,9 @@ public class AgentSession {
* @param reason the reason of the invitation.
* @throws XMPPErrorException if the sender of the invitation is not an agent or the service failed to process
* the request.
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void sendRoomTransfer(RoomTransfer.Type type, String invitee, String sessionID, String reason) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
final RoomTransfer transfer = new RoomTransfer(type, invitee, sessionID, reason);
@ -1071,9 +1071,9 @@ public class AgentSession {
* @param query an optional query object used to tell the server what metadata to retrieve. This can be null.
* @return the settings for the workgroup.
* @throws XMPPErrorException if an error occurs while sending the request to the server.
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public GenericSettings getGenericSettings(XMPPConnection con, String query) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
GenericSettings setting = new GenericSettings();

View file

@ -81,8 +81,8 @@ public class Offer {
/**
* Accepts the offer.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void accept() throws NotConnectedException, InterruptedException {
Stanza acceptPacket = new AcceptPacket(this.session.getWorkgroupJID());
@ -93,8 +93,8 @@ public class Offer {
/**
* Rejects the offer.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void reject() throws NotConnectedException, InterruptedException {
RejectPacket rejectPacket = new RejectPacket(this.session.getWorkgroupJID());

View file

@ -48,10 +48,10 @@ public class TranscriptManager {
* @param sessionID the id of the session to get the full transcript.
* @param workgroupJID the JID of the workgroup that will process the request.
* @return the full conversation transcript of a given session.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public Transcript getTranscript(EntityBareJid workgroupJID, String sessionID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
Transcript request = new Transcript(sessionID);
@ -67,10 +67,10 @@ public class TranscriptManager {
* @param userID the id of the user to get his conversations.
* @param workgroupJID the JID of the workgroup that will process the request.
* @return the transcripts of a given user.
* @throws XMPPErrorException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public Transcripts getTranscripts(EntityBareJid workgroupJID, Jid userID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
Transcripts request = new Transcripts(userID);

View file

@ -50,10 +50,10 @@ public class TranscriptSearchManager {
*
* @param serviceJID the address of the workgroup service.
* @return the Form to use for searching transcripts.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public Form getSearchForm(DomainBareJid serviceJID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
TranscriptSearch search = new TranscriptSearch();
@ -73,10 +73,10 @@ public class TranscriptSearchManager {
* @param serviceJID the address of the workgroup service.
* @param completedForm the filled out search form.
* @return the result of the transcript search.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public ReportedData submitSearch(DomainBareJid serviceJID, Form completedForm) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
TranscriptSearch search = new TranscriptSearch();

View file

@ -38,8 +38,8 @@ public class MetaDataProvider extends ExtensionElementProvider<MetaData> {
/**
* PacketExtensionProvider implementation.
* @throws IOException
* @throws XmlPullParserException
* @throws IOException
* @throws XmlPullParserException
*/
@Override
public MetaData parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {

View file

@ -129,7 +129,7 @@ public class QueueOverview implements ExtensionElement {
int initialDepth) throws XmlPullParserException,
IOException, SmackException {
int eventType = parser.getEventType();
QueueOverview queueOverview = new QueueOverview();
QueueOverview queueOverview = new QueueOverview();
SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT);
eventType = parser.next();

View file

@ -55,7 +55,7 @@ public class RoomInvitation implements ExtensionElement {
private Type type;
/**
* JID of the entity being invited. The entity could be another agent, user , a queue or a workgroup. In
* the case of a queue or a workgroup the server will select the best agent to invite.
* the case of a queue or a workgroup the server will select the best agent to invite.
*/
private Jid invitee;
/**
@ -71,7 +71,7 @@ public class RoomInvitation implements ExtensionElement {
*/
private EntityBareJid room;
/**
* Text provided by the inviter explaining the reason why the invitee is invited.
* Text provided by the inviter explaining the reason why the invitee is invited.
*/
private String reason;
@ -183,7 +183,7 @@ public class RoomInvitation implements ExtensionElement {
invitation.sessionID = parser.getAttributeValue("", "id");
}
else if ("invitee".equals(elementName)) {
String inviteeString = parser.nextText();
String inviteeString = parser.nextText();
invitation.invitee = JidCreate.from(inviteeString);
}
else if ("inviter".equals(elementName)) {

View file

@ -27,7 +27,7 @@ import org.jivesoftware.smack.packet.Stanza;
/**
* Represents the conversation transcript that occurred in a group chat room between an Agent
* and a user that requested assistance. The transcript contains all the Messages that were sent
* to the room as well as the sent presences.
* to the room as well as the sent presences.
*
* @author Gaston Dombiak
*/

View file

@ -195,7 +195,7 @@ public class Transcripts extends IQ {
}
/**
* An AgentDetail contains information of an Agent that was involved in a conversation.
* An AgentDetail contains information of an Agent that was involved in a conversation.
*/
public static class AgentDetail {
private final String agentJID;

View file

@ -78,8 +78,8 @@ public class WorkgroupInformation implements ExtensionElement {
/**
* PacketExtensionProvider implementation.
* @throws IOException
* @throws XmlPullParserException
* @throws IOException
* @throws XmlPullParserException
*/
@Override
public WorkgroupInformation parse(XmlPullParser parser,

View file

@ -182,10 +182,10 @@ public class Workgroup {
* available only when agents are available for this workgroup.
*
* @return true if the workgroup is available for receiving new requests.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public boolean isAvailable() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
Presence directedPresence = new Presence(Presence.Type.available);
@ -260,8 +260,8 @@ public class Workgroup {
* @throws XMPPException if an error occurred joining the queue. An error may indicate
* that a connection failure occurred or that the server explicitly rejected the
* request to join the queue.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
*/
public void joinQueue() throws XMPPException, SmackException, InterruptedException {
joinQueue(null);
@ -299,8 +299,8 @@ public class Workgroup {
* @throws XMPPException if an error occurred joining the queue. An error may indicate
* that a connection failure occurred or that the server explicitly rejected the
* request to join the queue.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
*/
public void joinQueue(Form answerForm) throws XMPPException, SmackException, InterruptedException {
joinQueue(answerForm, null);
@ -338,9 +338,9 @@ public class Workgroup {
* @throws XMPPErrorException if an error occurred joining the queue. An error may indicate
* that a connection failure occurred or that the server explicitly rejected the
* request to join the queue.
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void joinQueue(Form answerForm, Jid userID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
// If already in the queue ignore the join request.
@ -387,8 +387,8 @@ public class Workgroup {
* @throws XMPPException if an error occurred joining the queue. An error may indicate
* that a connection failure occurred or that the server explicitly rejected the
* request to join the queue.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
*/
public void joinQueue(Map<String,Object> metadata, Jid userID) throws XMPPException, SmackException, InterruptedException {
// If already in the queue ignore the join request.
@ -421,9 +421,9 @@ public class Workgroup {
*
* @throws XMPPErrorException if an error occurred trying to send the depart queue
* request to the server.
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void departQueue() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
// If not in the queue ignore the depart request.
@ -603,8 +603,8 @@ public class Workgroup {
* @param key the key to find.
* @return the ChatSetting if found, otherwise false.
* @throws XMPPException if an error occurs while getting information from the server.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
*/
public ChatSetting getChatSetting(String key) throws XMPPException, SmackException, InterruptedException {
ChatSettings chatSettings = getChatSettings(key, -1);
@ -617,8 +617,8 @@ public class Workgroup {
* @param type the type of ChatSettings to return.
* @return the ChatSettings of given type, otherwise null.
* @throws XMPPException if an error occurs while getting information from the server.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
*/
public ChatSettings getChatSettings(int type) throws XMPPException, SmackException, InterruptedException {
return getChatSettings(null, type);
@ -629,8 +629,8 @@ public class Workgroup {
*
* @return all ChatSettings of a given workgroup.
* @throws XMPPException if an error occurs while getting information from the server.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
*/
public ChatSettings getChatSettings() throws XMPPException, SmackException, InterruptedException {
return getChatSettings(null, -1);
@ -641,10 +641,10 @@ public class Workgroup {
* Asks the workgroup for it's Chat Settings.
*
* @return key specify a key to retrieve only that settings. Otherwise for all settings, key should be null.
* @throws NoResponseException
* @throws NoResponseException
* @throws XMPPErrorException if an error occurs while getting information from the server.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
private ChatSettings getChatSettings(String key, int type) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
ChatSettings request = new ChatSettings();
@ -667,8 +667,8 @@ public class Workgroup {
* to see if the email service has been configured and is available.
*
* @return true if the email service is available, otherwise return false.
* @throws SmackException
* @throws InterruptedException
* @throws SmackException
* @throws InterruptedException
*/
public boolean isEmailAvailable() throws SmackException, InterruptedException {
ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection);
@ -687,10 +687,10 @@ public class Workgroup {
* Asks the workgroup for it's Offline Settings.
*
* @return offlineSettings the offline settings for this workgroup.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public OfflineSettings getOfflineSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
OfflineSettings request = new OfflineSettings();
@ -704,10 +704,10 @@ public class Workgroup {
* Asks the workgroup for it's Sound Settings.
*
* @return soundSettings the sound settings for the specified workgroup.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
*/
public SoundSettings getSoundSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
SoundSettings request = new SoundSettings();
@ -723,8 +723,8 @@ public class Workgroup {
* @return the WorkgroupProperties for the specified workgroup.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public WorkgroupProperties getWorkgroupProperties() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
WorkgroupProperties request = new WorkgroupProperties();
@ -741,8 +741,8 @@ public class Workgroup {
* @return the WorkgroupProperties for the specified workgroup.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public WorkgroupProperties getWorkgroupProperties(String jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
WorkgroupProperties request = new WorkgroupProperties();
@ -763,8 +763,8 @@ public class Workgroup {
* @return the Form to use for searching transcripts.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public Form getWorkgroupForm() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
WorkgroupForm workgroupForm = new WorkgroupForm();

View file

@ -25,8 +25,8 @@ import org.jxmpp.jid.Jid;
*
* Default implementation of the MessageEventRequestListener interface.<p>
*
* This class automatically sends a delivered notification to the sender of the message
* if the sender has requested to be notified when the message is delivered.
* This class automatically sends a delivered notification to the sender of the message
* if the sender has requested to be notified when the message is delivered.
*
* @author Gaston Dombiak
*/

View file

@ -42,10 +42,10 @@ import org.jivesoftware.smackx.xevent.packet.MessageEvent;
import org.jxmpp.jid.Jid;
/**
*
*
* Manages message events requests and notifications. A MessageEventManager provides a high
* level access to request for notifications and send event notifications. It also provides
* an easy way to hook up custom logic when requests or notifications are received.
* level access to request for notifications and send event notifications. It also provides
* an easy way to hook up custom logic when requests or notifications are received.
*
* @author Gaston Dombiak
* @see <a href="http://xmpp.org/extensions/xep-0022.html">XEP-22: Message Events</a>
@ -105,7 +105,7 @@ public final class MessageEventManager extends Manager {
* Adds event notification requests to a message. For each event type that
* the user wishes event notifications from the message recipient for, <tt>true</tt>
* should be passed in to this method.
*
*
* @param message the message to add the requested notifications.
* @param offline specifies if the offline event is requested.
* @param delivered specifies if the delivered event is requested.
@ -206,11 +206,11 @@ public final class MessageEventManager extends Manager {
/**
* Sends the notification that the message was delivered to the sender of the original message.
*
*
* @param to the recipient of the notification.
* @param packetID the id of the message to send.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void sendDeliveredNotification(Jid to, String packetID) throws NotConnectedException, InterruptedException {
// Create the message to send
@ -226,11 +226,11 @@ public final class MessageEventManager extends Manager {
/**
* Sends the notification that the message was displayed to the sender of the original message.
*
*
* @param to the recipient of the notification.
* @param packetID the id of the message to send.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void sendDisplayedNotification(Jid to, String packetID) throws NotConnectedException, InterruptedException {
// Create the message to send
@ -246,11 +246,11 @@ public final class MessageEventManager extends Manager {
/**
* Sends the notification that the receiver of the message is composing a reply.
*
*
* @param to the recipient of the notification.
* @param packetID the id of the message to send.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void sendComposingNotification(Jid to, String packetID) throws NotConnectedException, InterruptedException {
// Create the message to send
@ -266,11 +266,11 @@ public final class MessageEventManager extends Manager {
/**
* Sends the notification that the receiver of the message has cancelled composing a reply.
*
*
* @param to the recipient of the notification.
* @param packetID the id of the message to send.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void sendCancelledNotification(Jid to, String packetID) throws NotConnectedException, InterruptedException {
// Create the message to send

View file

@ -31,7 +31,7 @@ public interface MessageEventNotificationListener {
/**
* Called when a notification of message delivered is received.
*
*
* @param from the user that sent the notification.
* @param packetID the id of the message that was sent.
*/
@ -39,16 +39,16 @@ public interface MessageEventNotificationListener {
/**
* Called when a notification of message displayed is received.
*
*
* @param from the user that sent the notification.
* @param packetID the id of the message that was sent.
*/
void displayedNotification(Jid from, String packetID);
/**
* Called when a notification that the receiver of the message is composing a reply is
* Called when a notification that the receiver of the message is composing a reply is
* received.
*
*
* @param from the user that sent the notification.
* @param packetID the id of the message that was sent.
*/
@ -56,16 +56,16 @@ public interface MessageEventNotificationListener {
/**
* Called when a notification that the receiver of the message is offline is received.
*
*
* @param from the user that sent the notification.
* @param packetID the id of the message that was sent.
*/
void offlineNotification(Jid from, String packetID);
/**
* Called when a notification that the receiver of the message cancelled the reply
* Called when a notification that the receiver of the message cancelled the reply
* is received.
*
*
* @param from the user that sent the notification.
* @param packetID the id of the message that was sent.
*/

View file

@ -24,9 +24,9 @@ import org.jxmpp.jid.Jid;
/**
*
* A listener that is fired anytime a message event request is received.
* Message event requests are received when the received message includes an extension
* Message event requests are received when the received message includes an extension
* like this:
*
*
* <pre>
* &lt;x xmlns='jabber:x:event'&gt;
* &lt;offline/&gt;
@ -34,10 +34,10 @@ import org.jxmpp.jid.Jid;
* &lt;composing/&gt;
* &lt;/x&gt;
* </pre>
*
*
* In this example you can see that the sender of the message requests to be notified
* when the user couldn't receive the message because he/she is offline, the message
* was delivered or when the receiver of the message is composing a reply.
* when the user couldn't receive the message because he/she is offline, the message
* was delivered or when the receiver of the message is composing a reply.
*
* @author Gaston Dombiak
*/
@ -45,19 +45,19 @@ public interface MessageEventRequestListener {
/**
* Called when a request for message delivered notification is received.
*
*
* @param from the user that sent the notification.
* @param packetID the id of the message that was sent.
* @param messageEventManager the messageEventManager that fired the listener.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
void deliveredNotificationRequested(Jid from, String packetID,
MessageEventManager messageEventManager) throws NotConnectedException, InterruptedException;
/**
* Called when a request for message displayed notification is received.
*
*
* @param from the user that sent the notification.
* @param packetID the id of the message that was sent.
* @param messageEventManager the messageEventManager that fired the listener.
@ -66,9 +66,9 @@ public interface MessageEventRequestListener {
MessageEventManager messageEventManager);
/**
* Called when a request that the receiver of the message is composing a reply notification is
* Called when a request that the receiver of the message is composing a reply notification is
* received.
*
*
* @param from the user that sent the notification.
* @param packetID the id of the message that was sent.
* @param messageEventManager the messageEventManager that fired the listener.
@ -78,7 +78,7 @@ public interface MessageEventRequestListener {
/**
* Called when a request that the receiver of the message is offline is received.
*
*
* @param from the user that sent the notification.
* @param packetID the id of the message that was sent.
* @param messageEventManager the messageEventManager that fired the listener.

View file

@ -23,31 +23,31 @@ import java.util.List;
import org.jivesoftware.smack.packet.ExtensionElement;
/**
* Represents message events relating to the delivery, display, composition and cancellation of
* Represents message events relating to the delivery, display, composition and cancellation of
* messages.<p>
*
*
* There are four message events currently defined in this namespace:
* <ol>
* <li>Offline<br>
* Indicates that the message has been stored offline by the intended recipient's server. This
* event is triggered only if the intended recipient's server supports offline storage, has that
* Indicates that the message has been stored offline by the intended recipient's server. This
* event is triggered only if the intended recipient's server supports offline storage, has that
* support enabled, and the recipient is offline when the server receives the message for delivery.</li>
*
*
* <li>Delivered<br>
* Indicates that the message has been delivered to the recipient. This signifies that the message
* has reached the recipient's XMPP client, but does not necessarily mean that the message has
* has reached the recipient's XMPP client, but does not necessarily mean that the message has
* been displayed. This event is to be raised by the XMPP client.</li>
*
*
* <li>Displayed<br>
* Once the message has been received by the recipient's XMPP client, it may be displayed to the
* user. This event indicates that the message has been displayed, and is to be raised by the
* XMPP client. Even if a message is displayed multiple times, this event should be raised only
* user. This event indicates that the message has been displayed, and is to be raised by the
* XMPP client. Even if a message is displayed multiple times, this event should be raised only
* once.</li>
*
*
* <li>Composing<br>
* In threaded chat conversations, this indicates that the recipient is composing a reply to a
* In threaded chat conversations, this indicates that the recipient is composing a reply to a
* message. The event is to be raised by the recipient's XMPP client. A XMPP client is allowed
* to raise this event multiple times in response to the same request, providing the original
* to raise this event multiple times in response to the same request, providing the original
* event is cancelled first.</li>
* </ol>
*
@ -83,7 +83,7 @@ public class MessageEvent implements ExtensionElement {
return ELEMENT;
}
/**
/**
* Returns the XML namespace of the extension sub-packet root element.
* According the specification the namespace is always "jabber:x:event"
*
@ -97,9 +97,9 @@ public class MessageEvent implements ExtensionElement {
/**
* When the message is a request returns if the sender of the message requests to be notified
* when the receiver is composing a reply.
* When the message is a notification returns if the receiver of the message is composing a
* When the message is a notification returns if the receiver of the message is composing a
* reply.
*
*
* @return true if the sender is requesting to be notified when composing or when notifying
* that the receiver of the message is composing a reply
*/
@ -111,9 +111,9 @@ public class MessageEvent implements ExtensionElement {
* When the message is a request returns if the sender of the message requests to be notified
* when the message is delivered.
* When the message is a notification returns if the message was delivered or not.
*
* @return true if the sender is requesting to be notified when delivered or when notifying
* that the message was delivered
*
* @return true if the sender is requesting to be notified when delivered or when notifying
* that the message was delivered
*/
public boolean isDelivered() {
return delivered;
@ -123,8 +123,8 @@ public class MessageEvent implements ExtensionElement {
* When the message is a request returns if the sender of the message requests to be notified
* when the message is displayed.
* When the message is a notification returns if the message was displayed or not.
*
* @return true if the sender is requesting to be notified when displayed or when notifying
*
* @return true if the sender is requesting to be notified when displayed or when notifying
* that the message was displayed
*/
public boolean isDisplayed() {
@ -135,8 +135,8 @@ public class MessageEvent implements ExtensionElement {
* When the message is a request returns if the sender of the message requests to be notified
* when the receiver of the message is offline.
* When the message is a notification returns if the receiver of the message was offline.
*
* @return true if the sender is requesting to be notified when offline or when notifying
*
* @return true if the sender is requesting to be notified when offline or when notifying
* that the receiver of the message is offline
*/
public boolean isOffline() {
@ -144,9 +144,9 @@ public class MessageEvent implements ExtensionElement {
}
/**
* When the message is a notification returns if the receiver of the message cancelled
* When the message is a notification returns if the receiver of the message cancelled
* composing a reply.
*
*
* @return true if the receiver of the message cancelled composing a reply
*/
public boolean isCancelled() {
@ -192,10 +192,10 @@ public class MessageEvent implements ExtensionElement {
/**
* When the message is a request sets if the sender of the message requests to be notified
* when the receiver is composing a reply.
* When the message is a notification sets if the receiver of the message is composing a
* When the message is a notification sets if the receiver of the message is composing a
* reply.
*
* @param composing sets if the sender is requesting to be notified when composing or when
*
* @param composing sets if the sender is requesting to be notified when composing or when
* notifying that the receiver of the message is composing a reply
*/
public void setComposing(boolean composing) {
@ -207,9 +207,9 @@ public class MessageEvent implements ExtensionElement {
* When the message is a request sets if the sender of the message requests to be notified
* when the message is delivered.
* When the message is a notification sets if the message was delivered or not.
*
* @param delivered sets if the sender is requesting to be notified when delivered or when
* notifying that the message was delivered
*
* @param delivered sets if the sender is requesting to be notified when delivered or when
* notifying that the message was delivered
*/
public void setDelivered(boolean delivered) {
this.delivered = delivered;
@ -220,8 +220,8 @@ public class MessageEvent implements ExtensionElement {
* When the message is a request sets if the sender of the message requests to be notified
* when the message is displayed.
* When the message is a notification sets if the message was displayed or not.
*
* @param displayed sets if the sender is requesting to be notified when displayed or when
*
* @param displayed sets if the sender is requesting to be notified when displayed or when
* notifying that the message was displayed
*/
public void setDisplayed(boolean displayed) {
@ -233,8 +233,8 @@ public class MessageEvent implements ExtensionElement {
* When the message is a request sets if the sender of the message requests to be notified
* when the receiver of the message is offline.
* When the message is a notification sets if the receiver of the message was offline.
*
* @param offline sets if the sender is requesting to be notified when offline or when
*
* @param offline sets if the sender is requesting to be notified when offline or when
* notifying that the receiver of the message is offline
*/
public void setOffline(boolean offline) {
@ -243,11 +243,11 @@ public class MessageEvent implements ExtensionElement {
}
/**
* When the message is a notification sets if the receiver of the message cancelled
* When the message is a notification sets if the receiver of the message cancelled
* composing a reply.
* The Cancelled event is never requested explicitly. It is requested implicitly when
* requesting to be notified of the Composing event.
*
*
* @param cancelled sets if the receiver of the message cancelled composing a reply
*/
public void setCancelled(boolean cancelled) {
@ -276,10 +276,10 @@ public class MessageEvent implements ExtensionElement {
/**
* Returns the XML representation of a Message Event according the specification.
*
*
* Usually the XML representation will be inside of a Message XML representation like
* in the following examples:<p>
*
*
* Request to be notified when displayed:
* <pre>
* &lt;message
@ -291,7 +291,7 @@ public class MessageEvent implements ExtensionElement {
* &lt;/x&gt;
* &lt;/message&gt;
* </pre>
*
*
* Notification of displayed:
* <pre>
* &lt;message
@ -303,7 +303,7 @@ public class MessageEvent implements ExtensionElement {
* &lt;/x&gt;
* &lt;/message&gt;
* </pre>
*
*
*/
@Override
public String toXML(String enclosingNamespace) {
@ -312,19 +312,19 @@ public class MessageEvent implements ExtensionElement {
"\">");
// Note: Cancellation events don't specify any tag. They just send the packetID
// Add the offline tag if the sender requests to be notified of offline events or if
// Add the offline tag if the sender requests to be notified of offline events or if
// the target is offline
if (isOffline())
buf.append('<').append(MessageEvent.OFFLINE).append("/>");
// Add the delivered tag if the sender requests to be notified when the message is
// Add the delivered tag if the sender requests to be notified when the message is
// delivered or if the target notifies that the message has been delivered
if (isDelivered())
buf.append('<').append(MessageEvent.DELIVERED).append("/>");
// Add the displayed tag if the sender requests to be notified when the message is
// Add the displayed tag if the sender requests to be notified when the message is
// displayed or if the target notifies that the message has been displayed
if (isDisplayed())
buf.append('<').append(MessageEvent.DISPLAYED).append("/>");
// Add the composing tag if the sender requests to be notified when the target is
// Add the composing tag if the sender requests to be notified when the target is
// composing a reply or if the target notifies that he/she is composing a reply
if (isComposing())
buf.append('<').append(MessageEvent.COMPOSING).append("/>");

View file

@ -39,8 +39,8 @@ public class MessageEventProvider extends ExtensionElementProvider<MessageEvent>
*
* @param parser the XML parser, positioned at the starting element of the extension.
* @return a PacketExtension.
* @throws IOException
* @throws XmlPullParserException
* @throws IOException
* @throws XmlPullParserException
*/
@Override
public MessageEvent parse(XmlPullParser parser, int initialDepth)

View file

@ -31,9 +31,9 @@ public interface RosterExchangeListener {
/**
* Called when roster entries are received as part of a roster exchange.
*
*
* @param from the user that sent the entries.
* @param remoteRosterEntries the entries sent by the user. The entries are instances of
* @param remoteRosterEntries the entries sent by the user. The entries are instances of
* RemoteRosterEntry.
*/
void entriesReceived(Jid from, Iterator<RemoteRosterEntry> remoteRosterEntries);

View file

@ -41,9 +41,9 @@ import org.jxmpp.jid.Jid;
/**
*
* Manages Roster exchanges. A RosterExchangeManager provides a high level access to send
* Manages Roster exchanges. A RosterExchangeManager provides a high level access to send
* rosters, roster groups and roster entries to XMPP clients. It also provides an easy way
* to hook up custom logic when entries are received from another XMPP client through
* to hook up custom logic when entries are received from another XMPP client through
* RosterExchangeListeners.
*
* @author Gaston Dombiak
@ -102,7 +102,7 @@ public class RosterExchangeManager {
}
/**
* Removes a listener from roster exchanges. The listener will be fired anytime roster
* Removes a listener from roster exchanges. The listener will be fired anytime roster
* entries are received from remote XMPP clients.
*
* @param rosterExchangeListener a roster exchange listener..
@ -114,11 +114,11 @@ public class RosterExchangeManager {
/**
* Sends a roster to userID. All the entries of the roster will be sent to the
* target user.
*
*
* @param roster the roster to send
* @param targetUserID the user that will receive the roster entries
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void send(Roster roster, Jid targetUserID) throws NotConnectedException, InterruptedException {
// Create a new message to send the roster
@ -134,11 +134,11 @@ public class RosterExchangeManager {
/**
* Sends a roster entry to userID.
*
*
* @param rosterEntry the roster entry to send
* @param targetUserID the user that will receive the roster entries
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void send(RosterEntry rosterEntry, Jid targetUserID) throws NotConnectedException, InterruptedException {
// Create a new message to send the roster
@ -154,13 +154,13 @@ public class RosterExchangeManager {
}
/**
* Sends a roster group to userID. All the entries of the group will be sent to the
* Sends a roster group to userID. All the entries of the group will be sent to the
* target user.
*
*
* @param rosterGroup the roster group to send
* @param targetUserID the user that will receive the roster entries
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void send(RosterGroup rosterGroup, Jid targetUserID) throws NotConnectedException, InterruptedException {
// Create a new message to send the roster

View file

@ -32,19 +32,19 @@ import org.jivesoftware.smackx.xroster.RosterExchangeManager;
/**
* Represents XMPP Roster Item Exchange packets.<p>
*
* The 'jabber:x:roster' namespace (which is not to be confused with the 'jabber:iq:roster'
* namespace) is used to send roster items from one client to another. A roster item is sent by
* adding to the &lt;message/&gt; element an &lt;x/&gt; child scoped by the 'jabber:x:roster' namespace. This
*
* The 'jabber:x:roster' namespace (which is not to be confused with the 'jabber:iq:roster'
* namespace) is used to send roster items from one client to another. A roster item is sent by
* adding to the &lt;message/&gt; element an &lt;x/&gt; child scoped by the 'jabber:x:roster' namespace. This
* &lt;x/&gt; element may contain one or more &lt;item/&gt; children (one for each roster item to be sent).<p>
*
*
* Each &lt;item/&gt; element may possess the following attributes:<p>
*
*
* &lt;jid/&gt; -- The id of the contact being sent. This attribute is required.<br>
* &lt;name/&gt; -- A natural-language nickname for the contact. This attribute is optional.<p>
*
* Each &lt;item/&gt; element may also contain one or more &lt;group/&gt; children specifying the
* natural-language name of a user-specified group, for the purpose of categorizing this contact
*
* Each &lt;item/&gt; element may also contain one or more &lt;group/&gt; children specifying the
* natural-language name of a user-specified group, for the purpose of categorizing this contact
* into one or more roster groups.
*
* @author Gaston Dombiak
@ -67,7 +67,7 @@ public class RosterExchange implements ExtensionElement {
* @param roster the roster to send to other XMPP entity.
*/
public RosterExchange(Roster roster) {
// Add all the roster entries to the new RosterExchange
// Add all the roster entries to the new RosterExchange
for (RosterEntry rosterEntry : roster.getEntries()) {
this.addRosterEntry(rosterEntry);
}
@ -79,7 +79,7 @@ public class RosterExchange implements ExtensionElement {
* @param rosterEntry a roster entry to add.
*/
public void addRosterEntry(RosterEntry rosterEntry) {
// Obtain a String[] from the roster entry groups name
// Obtain a String[] from the roster entry groups name
List<String> groupNamesList = new ArrayList<>();
String[] groupNames;
for (RosterGroup group : rosterEntry.getGroups()) {
@ -116,7 +116,7 @@ public class RosterExchange implements ExtensionElement {
return RosterExchangeManager.ELEMENT;
}
/**
/**
* Returns the XML namespace of the extension sub-packet root element.
* According the specification the namespace is always "jabber:x:roster"
* (which is not to be confused with the 'jabber:iq:roster' namespace
@ -151,7 +151,7 @@ public class RosterExchange implements ExtensionElement {
/**
* Returns the XML representation of a Roster Item Exchange according the specification.
*
*
* Usually the XML representation will be inside of a Message XML representation like
* in the following example:
* <pre>
@ -164,7 +164,7 @@ public class RosterExchange implements ExtensionElement {
* &lt;/x&gt;
* &lt;/message&gt;
* </pre>
*
*
*/
@Override
public String toXML(String enclosingNamespace) {

View file

@ -43,8 +43,8 @@ public class RosterExchangeProvider extends ExtensionElementProvider<RosterExcha
*
* @param parser the XML parser, positioned at the starting element of the extension.
* @return a PacketExtension.
* @throws IOException
* @throws XmlPullParserException
* @throws IOException
* @throws XmlPullParserException
*/
@Override
public RosterExchange parse(XmlPullParser parser, int initialDepth)