/** * Returns the Form to use for searching transcripts. It is unlikely that the server * will change the form (without a restart) so it is safe to keep the returned form * for future submissions. * * @return the Form to use for searching transcripts. * @throws XMPPException if an error occurs while sending the request to the server. */ public Form getTranscriptSearchForm() throws XMPPException { return transcriptSearchManager.getSearchForm(StringUtils.parseServer(workgroupJID)); }
/** * Returns the Form to use for searching transcripts. It is unlikely that the server * will change the form (without a restart) so it is safe to keep the returned form * for future submissions. * * @return the Form to use for searching transcripts. * @throws XMPPException if an error occurs while sending the request to the server. */ public Form getTranscriptSearchForm() throws XMPPException { return transcriptSearchManager.getSearchForm(StringUtils.parseServer(workgroupJID)); }
/** * Submits the completed form and returns the result of the transcript search. The result * will include all the data returned from the server so be careful with the amount of * data that the search may return. * * @param completedForm the filled out search form. * @return the result of the transcript search. * @throws XMPPException if an error occurs while submiting the search to the server. */ public ReportedData searchTranscripts(Form completedForm) throws XMPPException { return transcriptSearchManager.submitSearch(StringUtils.parseServer(workgroupJID), completedForm); }
/** * Returns the Form to use for searching transcripts. It is unlikely that the server * will change the form (without a restart) so it is safe to keep the returned form * for future submissions. * * @return the Form to use for searching transcripts. * @throws XMPPException if an error occurs while sending the request to the server. */ public Form getTranscriptSearchForm() throws XMPPException { return transcriptSearchManager.getSearchForm(StringUtils.parseServer(workgroupJID)); }
/** * Submits the completed form and returns the result of the transcript search. The result * will include all the data returned from the server so be careful with the amount of * data that the search may return. * * @param completedForm the filled out search form. * @return the result of the transcript search. * @throws XMPPException if an error occurs while submiting the search to the server. */ public ReportedData searchTranscripts(Form completedForm) throws XMPPException { return transcriptSearchManager.submitSearch(StringUtils.parseServer(workgroupJID), completedForm); }
/** * Submits the completed form and returns the result of the transcript search. The result * will include all the data returned from the server so be careful with the amount of * data that the search may return. * * @param completedForm the filled out search form. * @return the result of the transcript search. * @throws XMPPException if an error occurs while submiting the search to the server. */ public ReportedData searchTranscripts(Form completedForm) throws XMPPException { return transcriptSearchManager.submitSearch(StringUtils.parseServer(workgroupJID), completedForm); }
private static Kenai getKenai(String jid) { if (jid.contains("@muc.")) { final String server = StringUtils.parseServer(jid); return KenaiManager.getDefault().getKenai("https://" + server.substring(4)); } else { return KenaiManager.getDefault().getKenai("https://" + StringUtils.parseServer(jid)); } }
/** * Creates an Jingle session to start a communication with another user. * * @param responder the fully qualified jabber ID with resource of the other * user. * @param payloadTypes list of supported payload types * @return The session on which the negotiation can be run. */ public JingleSession createOutgoingJingleSession(String responder) throws XMPPException { if (responder == null || StringUtils.parseName(responder).length() <= 0 || StringUtils.parseServer(responder).length() <= 0 || StringUtils.parseResource(responder).length() <= 0) { throw new IllegalArgumentException("The provided user id was not fully qualified"); } JingleSession session = new JingleSession(connection, (JingleSessionRequest) null, connection.getUser(), responder, jingleMediaManagers); triggerSessionCreated(session); return session; }
/** * Creates an Jingle session to start a communication with another user. * * @param responder the fully qualified jabber ID with resource of the other * user. * @return The session on which the negotiation can be run. */ public JingleSession createOutgoingJingleSession(String responder) throws XMPPException { if (responder == null || StringUtils.parseName(responder).length() <= 0 || StringUtils.parseServer(responder).length() <= 0 || StringUtils.parseResource(responder).length() <= 0) { throw new IllegalArgumentException("The provided user id was not fully qualified"); } JingleSession session = new JingleSession(connection, (JingleSessionRequest) null, connection.getUser(), responder, jingleMediaManagers); triggerSessionCreated(session); return session; }
/** * Creates an OutgoingFileTransfer to send a file to another user. * * @param userID * The fully qualified jabber ID with resource of the user to * send the file to. * @return The send file object on which the negotiated transfer can be run. */ public OutgoingFileTransfer createOutgoingFileTransfer(String userID) { if (userID == null || StringUtils.parseName(userID).length() <= 0 || StringUtils.parseServer(userID).length() <= 0 || StringUtils.parseResource(userID).length() <= 0) { throw new IllegalArgumentException( "The provided user id was not fully qualified"); } return new OutgoingFileTransfer(connection.getUser(), userID, fileTransferNegotiator.getNextStreamID(), fileTransferNegotiator); }
public void processPacket(Packet packet) { if (packet instanceof AgentStatusRequest) { AgentStatusRequest statusRequest = (AgentStatusRequest)packet; for (Iterator i = statusRequest.getAgents().iterator(); i.hasNext();) { AgentStatusRequest.Item item = (AgentStatusRequest.Item)i.next(); String agentJID = item.getJID(); if ("remove".equals(item.getType())) { // Removing the user from the roster, so remove any presence information // about them. String key = StringUtils.parseName(StringUtils.parseName(agentJID) + "@" + StringUtils.parseServer(agentJID)); presenceMap.remove(key); // Fire event for roster listeners. fireEvent(EVENT_AGENT_REMOVED, agentJID); } else { entries.add(agentJID); // Fire event for roster listeners. fireEvent(EVENT_AGENT_ADDED, agentJID); } } // Mark the roster as initialized. rosterInitialized = true; } } }
public void processPacket(Packet packet) { if (packet instanceof AgentStatusRequest) { AgentStatusRequest statusRequest = (AgentStatusRequest)packet; for (Iterator i = statusRequest.getAgents().iterator(); i.hasNext();) { AgentStatusRequest.Item item = (AgentStatusRequest.Item)i.next(); String agentJID = item.getJID(); if ("remove".equals(item.getType())) { // Removing the user from the roster, so remove any presence information // about them. String key = StringUtils.parseName(StringUtils.parseName(agentJID) + "@" + StringUtils.parseServer(agentJID)); presenceMap.remove(key); // Fire event for roster listeners. fireEvent(EVENT_AGENT_REMOVED, agentJID); } else { entries.add(agentJID); // Fire event for roster listeners. fireEvent(EVENT_AGENT_ADDED, agentJID); } } // Mark the roster as initialized. rosterInitialized = true; } } }
/** * Creates the digest needed for a byte stream. It is the SHA1(sessionID + * initiator + target). * * @param sessionID The sessionID of the stream negotiation * @param initiator The inititator of the stream negotiation * @param target The target of the stream negotiation * @return SHA-1 hash of the three parameters */ private String createDigest(final String sessionID, final String initiator, final String target) { return StringUtils.hash(sessionID + StringUtils.parseName(initiator) + "@" + StringUtils.parseServer(initiator) + "/" + StringUtils.parseResource(initiator) + StringUtils.parseName(target) + "@" + StringUtils.parseServer(target) + "/" + StringUtils.parseResource(target)); }
public void processPacket(Packet packet) { if (packet instanceof AgentStatusRequest) { AgentStatusRequest statusRequest = (AgentStatusRequest)packet; for (Iterator<AgentStatusRequest.Item> i = statusRequest.getAgents().iterator(); i.hasNext();) { AgentStatusRequest.Item item = i.next(); String agentJID = item.getJID(); if ("remove".equals(item.getType())) { // Removing the user from the roster, so remove any presence information // about them. String key = StringUtils.parseName(StringUtils.parseName(agentJID) + "@" + StringUtils.parseServer(agentJID)); presenceMap.remove(key); // Fire event for roster listeners. fireEvent(EVENT_AGENT_REMOVED, agentJID); } else { entries.add(agentJID); // Fire event for roster listeners. fireEvent(EVENT_AGENT_ADDED, agentJID); } } // Mark the roster as initialized. rosterInitialized = true; } } }
/** * The workgroup service may be configured to send email. This queries the Workgroup Service * to see if the email service has been configured and is available. * * @return true if the email service is available, otherwise return false. */ public boolean isEmailAvailable() { ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection); try { String workgroupService = StringUtils.parseServer(workgroupJID); DiscoverInfo infoResult = discoManager.discoverInfo(workgroupService); return infoResult.containsFeature("jive:email:provider"); } catch (XMPPException e) { return false; } }
/** * The workgroup service may be configured to send email. This queries the Workgroup Service * to see if the email service has been configured and is available. * * @return true if the email service is available, otherwise return false. */ public boolean isEmailAvailable() { ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection); try { String workgroupService = StringUtils.parseServer(workgroupJID); DiscoverInfo infoResult = discoManager.discoverInfo(workgroupService); return infoResult.containsFeature("jive:email:provider"); } catch (XMPPException e) { return false; } }
/** * The workgroup service may be configured to send email. This queries the Workgroup Service * to see if the email service has been configured and is available. * * @return true if the email service is available, otherwise return false. */ public boolean isEmailAvailable() { ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection); try { String workgroupService = StringUtils.parseServer(workgroupJID); DiscoverInfo infoResult = discoManager.discoverInfo(workgroupService); return infoResult.containsFeature("jive:email:provider"); } catch (XMPPException e) { return false; } }
/** * Loads all getways which are in the users roster, but are not supplied by the * users server * @throws XMPPException */ private void loadNonLocalGateways() throws XMPPException{ if(roster!=null){ for(RosterEntry entry : roster.getEntries()){ if(entry.getUser().equalsIgnoreCase(StringUtils.parseServer(entry.getUser())) && !entry.getUser().contains(connection.getHost())){ discoverGateway(entry.getUser()); } } } }
config.setServiceName(StringUtils.parseServer(response));
config.setServiceName(StringUtils.parseServer(response));