示例#1
0
 /**
  * Gets and formats the names of the peers in the call.
  *
  * @param maxLength maximum length of the filename
  * @return the name of the peer in the call formated
  */
 private String getCallPeerName(int maxLength) {
   List<CallPeer> callPeers = call.getConference().getCallPeers();
   CallPeer callPeer = null;
   String peerName = "";
   if (!callPeers.isEmpty()) {
     callPeer = callPeers.get(0);
     if (callPeer != null) {
       peerName = callPeer.getDisplayName();
       peerName = peerName.replaceAll("[^\\da-zA-Z\\_\\-@\\.]", "");
       if (peerName.length() > maxLength) {
         peerName = peerName.substring(0, maxLength);
       }
     }
   }
   return peerName;
 }
示例#2
0
  /**
   * Returns the default <tt>ContactDetail</tt> to use for any operations depending to the given
   * <tt>OperationSet</tt> class.
   *
   * @param opSetClass the <tt>OperationSet</tt> class we're interested in
   * @return the default <tt>ContactDetail</tt> to use for any operations depending to the given
   *     <tt>OperationSet</tt> class
   */
  public UIContactDetail getDefaultContactDetail(Class<? extends OperationSet> opSetClass) {
    List<UIContactDetail> details = getContactDetailsForOperationSet(opSetClass);

    return (details != null && !details.isEmpty()) ? details.get(0) : null;
  }