Fixes style formating, javadoc and eclipse related warnings.

cusax-fix
Sebastien Vincent 15 years ago
parent dc0feb41a0
commit d9bef7b03a

@ -114,7 +114,6 @@ public synchronized void unregisterShortcut(int keycode,
* Register a special key shortcut (for example key coming from headset).
*
* @param keycode keycode of the shortcut
* @param modifiers modifiers (CTRL, ALT, ...)
* @return true if success, false otherwise
*/
public synchronized boolean registerSpecial(int keycode)
@ -129,7 +128,6 @@ public synchronized boolean registerSpecial(int keycode)
* Unregister a special key shortcut (for example key coming from headset).
*
* @param keycode keycode of the shortcut
* @param modifiers modifiers (CTRL, ALT, ...)
*/
public synchronized void unregisterSpecial(int keycode)
{

@ -25,11 +25,23 @@ public class DBStructSerializer {
private HistoryServiceImpl historyService;
/**
* Constructor.
*
* @param historyService the history service
*/
public DBStructSerializer(HistoryServiceImpl historyService)
{
this.historyService = historyService;
}
/**
* Write the history.
*
* @param dbDatFile the database file
* @param history the history to write
* @throws IOException if write failed for any reason
*/
public void writeHistory(File dbDatFile, History history)
throws IOException {
DocumentBuilder builder = this.historyService.getDocumentBuilder();

@ -26,6 +26,9 @@ public class HistoryImpl
{
private static Logger log = Logger.getLogger(HistoryImpl.class);
/**
* The supported filetype.
*/
public static final String SUPPORTED_FILETYPE = "xml";
private HistoryID id;

@ -29,8 +29,14 @@
public class HistoryServiceImpl
implements HistoryService
{
/**
* The data directory.
*/
public static final String DATA_DIRECTORY = "history_ver1.0";
/**
* The data file.
*/
public static final String DATA_FILE = "dbstruct.dat";
/**
@ -66,6 +72,12 @@ public class HistoryServiceImpl
{"\\|", "&_pp"} // the char |
};
/**
* Constructor.
*
* @param bundleContext OSGi bundle context
* @throws Exception if something went wrong during initialization
*/
public HistoryServiceImpl(BundleContext bundleContext)
throws Exception
{

@ -22,7 +22,11 @@
public class HistoryWriterImpl
implements HistoryWriter
{
/**
* Maximum records per file.
*/
public static final int MAX_RECORDS_PER_FILE = 150;
private static final String CDATA_SUFFIX = "_CDATA";
private Object docCreateLock = new Object();

@ -8,6 +8,7 @@
* This implementation is the same as DefaultQueryResultSet but the
* container holding the records is LinkedList - so guarantees that values are ordered
*
* @param <T> element type of query
* @author Damian Minkov
*/
public class OrderedQueryResultSet<T>
@ -17,6 +18,11 @@ public class OrderedQueryResultSet<T>
private int currentPos = -1;
/**
* Constructor.
*
* @param records the <tt>Set</tt> of records
*/
public OrderedQueryResultSet(Set<T> records)
{
this.records = new LinkedList<T>(records);

@ -244,7 +244,7 @@ public void setHostname(String hostname)
*
* @return the encryption property
*
* @see LdapConstants.Encryption
* @see net.java.sip.communicator.service.ldap.LdapConstants.Encryption
*/
public Encryption getEncryption()
{
@ -256,7 +256,7 @@ public Encryption getEncryption()
*
* @param encryption the encryption property
*
* @see LdapConstants.Encryption
* @see net.java.sip.communicator.service.ldap.LdapConstants.Encryption
*/
public void setEncryption(Encryption encryption)
{
@ -288,7 +288,7 @@ public void setPort(int port)
*
* @return the auth property
*
* @see LdapConstants.Auth
* @see net.java.sip.communicator.service.ldap.LdapConstants.Auth
*/
public Auth getAuth()
{
@ -300,7 +300,7 @@ public Auth getAuth()
*
* @param auth the auth property
*
* @see LdapConstants.Auth
* @see net.java.sip.communicator.service.ldap.LdapConstants.Auth
*/
public void setAuth(Auth auth)
{
@ -398,7 +398,7 @@ public void setBaseDN(String baseDN)
*
* @return the search scope
*
* @see LdapConstants.Scope
* @see net.java.sip.communicator.service.ldap.LdapConstants.Scope
* @see LdapDirectorySettings#getScope
*/
public Scope getScope()
@ -412,7 +412,7 @@ public Scope getScope()
*
* @param scope the new search scope
*
* @see LdapConstants.Scope
* @see net.java.sip.communicator.service.ldap.LdapConstants.Scope
* @see LdapDirectorySettings#setScope
*/
public void setScope(Scope scope)

@ -34,6 +34,12 @@ public class EncodingConfigurationTableModel
private final MediaType type;
/**
* Constructor.
*
* @param encodingConfiguration the encoding configuration
* @param type media type
*/
public EncodingConfigurationTableModel(
EncodingConfiguration encodingConfiguration, int type)
{
@ -204,6 +210,13 @@ public boolean isCellEditable(int rowIndex, int columnIndex)
return (columnIndex == 0);
}
/**
* Move the row.
*
* @param rowIndex index of the row
* @param up true to move up, false to move down
* @return the next row index
*/
public int move(int rowIndex, boolean up)
{
if (up)

@ -10,9 +10,7 @@
import net.sf.fmj.media.rtp.*;
import java.net.*;
import java.util.*;
import javax.media.rtp.*;
import javax.media.rtp.rtcp.*;
/**
* Class used to compute stats concerning a MediaStream.
@ -127,7 +125,7 @@ public void updateStats()
// stream.
long downloadNewNbByte = this.getDownloadNbByte();
long uploadNewNbByte = this.getDownloadNbByte();
// Computes the number of update steps which has not been done since
// last update.
long downloadNbSteps = downloadNewNbRecv - this.downloadNbPackets;
@ -420,7 +418,7 @@ private static double computePercentLoss(long nbRecv, long nbLost)
* @param nbByteRecv The number of Byte received.
* @param callNbTimeMsSpent The time spent since the mediaStreamImpl is
* connected to the endpoint.
*
*
* @return the bandwidth rate computed in Kilo bits per secondes.
*/
private static double computeRateKiloBitPerSec(
@ -460,7 +458,7 @@ private static double computeEWMA(
EWMACoeff = 1.0;
}
return lastValue * (1.0 - EWMACoeff) + newValue * EWMACoeff;
}
/**
@ -554,5 +552,4 @@ private long getUploadNbByte()
}
return rtpManager.getGlobalTransmissionStats().getBytesSent();
}
}

@ -120,8 +120,8 @@ public String getName()
/**
* Implements {@link AbstractCodec#getSupportedOutputFormats(Format)}.
*
* @param inputFormat
* @return
* @param inputFormat input format
* @return array of supported output format
* @see AbstractCodec#getSupportedOutputFormats(Format)
*/
public Format[] getSupportedOutputFormats(Format inputFormat)
@ -138,6 +138,10 @@ public Format[] getSupportedOutputFormats(Format inputFormat)
/**
* Utility to perform format matching.
*
* @param in input format
* @param outs array of output formats
* @return the first output format that is supported
*/
public static Format matches(Format in, Format outs[])
{
@ -176,7 +180,8 @@ public void open()
*
* @param inputBuffer
* @param outputBuffer
* @return
* @return BUFFER_PROCESSED_OK if all go OK or BUFFER_PROCESSED_FAILED if
* problems occurred
* @see AbstractCodec#process(Buffer, Buffer)
*/
public int process(Buffer inputBuffer, Buffer outputBuffer)

@ -18,19 +18,69 @@
*/
public class Constants
{
/**
* The ALAW/RTP constant.
*/
public static final String ALAW_RTP = "ALAW/rtp";
/**
* The G722 constant.
*/
public static final String G722 = "g722";
/**
* The G722/RTP constant.
*/
public static final String G722_RTP = "g722/rtp";
/**
* The iLBC constant.
*/
public static final String ILBC = "ilbc";
/**
* The iLBC/RTP constant.
*/
public static final String ILBC_RTP = "ilbc/rtp";
/**
* The SILK constant.
*/
public static final String SILK = "SILK";
/**
* The SILK/RTP constant.
*/
public static final String SILK_RTP = "SILK/rtp";
/**
* The SPEEX constant.
*/
public static final String SPEEX = "speex";
/**
* The SPEEX/RTP constant.
*/
public static final String SPEEX_RTP = "speex/rtp";
/**
* The H264 constant.
*/
public static final String H264 = "h264";
/**
* The H264/RTP constant.
*/
public static final String H264_RTP = "h264/rtp";
/**
* The H263+ constant.
*/
public static final String H263P = "H263-1998";
/**
* The H263+/RTP constant.
*/
public static final String H263P_RTP = "h263-1998/rtp";
/**

@ -19,6 +19,9 @@ public class FFmpeg
*/
public static final long AV_NOPTS_VALUE = 0x8000000000000000L;
/**
* The AV sample format for signed 16.
*/
public static final int AV_SAMPLE_FMT_S16 = 1;
/**
@ -96,8 +99,14 @@ public class FFmpeg
*/
public static final int FF_MIN_BUFFER_SIZE = 16384;
/**
* The H264 baseline profile.
*/
public static final int FF_PROFILE_H264_BASELINE = 66;
/**
* The H264 main profile.
*/
public static final int FF_PROFILE_H264_MAIN = 77;
/**
@ -340,6 +349,12 @@ public static native int avcodec_encode_video(long avctx, byte[] buff,
*/
public static native void avcodeccontext_add_flags2(long avctx, int flags2);
/**
* Add specified partitions to the avcodeccontext.
*
* @param avctx pointer to AVCodecContext
* @param partitions the partitions to add
*/
public static native void avcodeccontext_add_partitions(long avctx,
int partitions);
@ -695,7 +710,7 @@ public static native int sws_scale(
/**
* Allocates a new <tt>AVFilterGraph</tt> instance.
*
* @return a pointer to the newly-allocated <tt>AVFilterGraph</tt> instance
* @return a pointer to the newly-allocated <tt>AVFilterGraph</tt> instance
*/
public static native long avfilter_graph_alloc();
@ -725,6 +740,7 @@ public static native int sws_scale(
* <tt>AVFilterContext</tt> instance with the specified name is to be found
* @param name the name of the <tt>AVFilterContext</tt> instance which is to
* be found in the specified <tt>graph</tt>
* @return the filter graph pointer
*/
public static native long avfilter_graph_get_filter(
long graph,

@ -28,6 +28,9 @@ public String getName()
return "GSM DePacketizer";
}
/**
* Constructs a new <tt>DePacketizer</tt>.
*/
public DePacketizer()
{
super();

@ -34,6 +34,9 @@ public String getName()
return "GSM Decoder";
}
/**
* Constructs a new <tt>Decoder</tt>.
*/
public Decoder()
{
super();
@ -130,7 +133,7 @@ public void open()
@Override
public void close()
{
}
private static final boolean TRACE = false;

@ -26,7 +26,6 @@ public class Encoder
private static final int PCM_BYTES = 320;
private static final int GSM_BYTES = 33;
private int innerDataLength = 0;
private int inputDataLength = 0;
byte[] innerContent;
@Override
@ -35,6 +34,9 @@ public String getName()
return "GSM Encoder";
}
/**
* Constructs a new <tt>Encoder</tt>.
*/
public Encoder()
{
super();
@ -123,7 +125,6 @@ public int process(Buffer inputBuffer, Buffer outputBuffer)
innerBuffer.setData(mergedContent);
innerBuffer.setLength(mergedContent.length);
innerDataLength = innerBuffer.getLength();
inputDataLength = inputBuffer.getLength();
if (TRACE) dump("input ", inputBuffer);

@ -22,6 +22,15 @@ public class GSMDecoderUtil
private static final int PCM_INTS = 160;
private static final int PCM_BYTES = 320;
/**
* Decode GSM data.
*
* @param bigEndian if the data are in big endian format
* @param data the GSM data
* @param offset offset
* @param length length of the data
* @param decoded decoded data array
*/
public static void gsmDecode(boolean bigEndian,
byte[] data,
int offset,

@ -32,6 +32,15 @@ public class GSMEncoderUtil {
*/
private static final int PCM_INTS = 160;
/**
* Encode data to GSM.
*
* @param bigEndian if the data is in big endian format
* @param data data to encode
* @param offset offset
* @param length length of data
* @param decoded array of encoded data.
*/
public static void gsmEncode(
boolean bigEndian,
byte[] data,

@ -28,6 +28,9 @@ public String getName()
return "GSM Packetizer";
}
/**
* Constructs a new <tt>Packetizer</tt>.
*/
public Packetizer()
{
super();

@ -23,7 +23,6 @@ public static int LSF_check( /* (o) 1 for stable lsf vectors and 0 for
table */
{
int k,n,m, Nit=2, change=0,pos;
float tmp;
float eps=(float)0.039; /* 50 Hz */
float eps2=(float)0.0195;
float maxlsf=(float)3.14; /* 4000 Hz */
@ -39,7 +38,6 @@ public static int LSF_check( /* (o) 1 for stable lsf vectors and 0 for
if ((lsf[pos+1]-lsf[pos])<eps) {
if (lsf[pos+1]<lsf[pos]) {
tmp=lsf[pos+1];
lsf[pos+1]= lsf[pos]+eps2;
lsf[pos]= lsf[pos+1]-eps2;
} else {

@ -24,6 +24,10 @@
public class AVFrameFormat
extends VideoFormat
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The encoding of the <tt>AVFrameFormat</tt> instances.

@ -79,6 +79,14 @@ protected void freeData0(long data0)
FFmpeg.av_free(data0);
}
/**
* Read the frame.
*
* @param buffer buffer
* @param format format of the buffer
* @param data the data
* @param byteBufferPool the <tt>ByteBuffer</tt> pool
*/
public static void read(
Buffer buffer,
Format format,

@ -8,7 +8,6 @@
import java.awt.*;
import java.awt.image.*;
import java.awt.geom.*;
import javax.media.Buffer;
import javax.media.Codec;
@ -24,7 +23,7 @@
* Codec that scales images from one size to another.
* Interestingly, cross-platform JMF does not appear to have a corresponding codec.
* @author Ken Larson
*
*
* Original from fmj project, changed only output format sizes.
* The sizes are those supported in h263 and h264.
* @author Damian Minkov
@ -79,14 +78,14 @@ public Format[] getSupportedOutputFormats(Format input)
// // TODO: we have to specify the RGB, etc. in the output format.
// return result;
}
@Override
public Format setInputFormat(Format format)
{
final VideoFormat videoFormat = (VideoFormat) format;
if (videoFormat.getSize() == null)
return null; // must set a size.
// TODO: check VideoFormat and compatibility
bufferToImage = new BufferToImage(videoFormat);
@ -123,7 +122,7 @@ private void updatePassthrough()
}
@Override
public int process(Buffer input, Buffer output)
public int process(Buffer input, Buffer output)
{
if (!checkInputBuffer(input))
{
@ -135,9 +134,9 @@ public int process(Buffer input, Buffer output)
propagateEOM(output); // TODO: what about data? can there be any?
return BUFFER_PROCESSED_OK;
}
// sometimes format sizes are the same but some other field is different
// and jmf use the scaler (in my case length field was not sent in
// and jmf use the scaler (in my case length field was not sent in
// one of the formats) the check for sizes is made in method
// setInputFormat
if(passthrough)
@ -147,17 +146,17 @@ public int process(Buffer input, Buffer output)
output.setOffset(input.getOffset());
return BUFFER_PROCESSED_OK;
}
final BufferedImage image = (BufferedImage) bufferToImage.createImage(input);
/*
final Dimension inputSize = ((VideoFormat) inputFormat).getSize();
final Dimension outputSize = ((VideoFormat) outputFormat).getSize();
final double scaleX = ((double) outputSize.width) / ((double) inputSize.width);
final double scaleY = ((double) outputSize.height) / ((double) inputSize.height);
final BufferedImage scaled = scale(image, scaleX, scaleY); // TODO: is the size exact? what about rounding errors?
*/
final Dimension outputSize = ((VideoFormat) outputFormat).getSize();
/* rescale by preserving ratio */
final BufferedImage scaled = scalePreserveRatio(image, outputSize.width, outputSize.height); // TODO: is the size exact? what about rounding errors?
@ -168,16 +167,8 @@ public int process(Buffer input, Buffer output)
output.setOffset(b.getOffset());
output.setFormat(b.getFormat());
// TODO: what about format?
return BUFFER_PROCESSED_OK;
}
private static BufferedImage scale(BufferedImage bi, double scaleX, double scaleY)
{
AffineTransform tx = new AffineTransform();
tx.scale(scaleX, scaleY);
AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BICUBIC);
return op.filter(bi, null);
return BUFFER_PROCESSED_OK;
}
/**
@ -220,7 +211,7 @@ public static BufferedImage scalePreserveRatio(BufferedImage src,
/* rescale width */
newWidth = ((src.getWidth() * height) / src.getHeight());
startWidth = (width - newWidth) / 2;
startHeight = 0;
width = newWidth;
}

@ -13,13 +13,32 @@
*/
public interface PortAudioStreamCallback
{
/**
* "Abort" resut code.
*/
public static final int RESULT_ABORT = 2;
/**
* "Complete" resut code.
*/
public static final int RESULT_COMPLETE = 1;
/**
* "Continue" resut code.
*/
public static final int RESULT_CONTINUE = 0;
/**
* Callback.
*
* @param input input <tt>ByteBuffer</tt>
* @param output output <tt>ByteBuffer</tt>
* @return
*/
public int callback(ByteBuffer input, ByteBuffer output);
/**
* Finished callback.
*/
public void finishedCallback();
}

@ -48,7 +48,7 @@ public class RewritablePushBufferDataSource
/**
* Initializes a new <tt>RewritablePushBufferDataSource</tt> instance which
* is to provide mute support for a specific <tt>PushBufferDataSource</tt>.
*
*
* @param dataSource the <tt>PushBufferDataSource</tt> the new instance is
* to provide mute support for
*/
@ -87,7 +87,7 @@ public PushBufferStream[] getStreams()
/**
* Determines whether this <tt>DataSource</tt> is mute.
*
*
* @return <tt>true</tt> if this <tt>DataSource</tt> is mute; otherwise,
* <tt>false</tt>
*/
@ -126,7 +126,7 @@ else if (Format.shortArray.equals(dataClass))
/**
* Sets the mute state of this <tt>DataSource</tt>.
*
*
* @param mute <tt>true</tt> to mute this <tt>DataSource</tt>; otherwise,
* <tt>false</tt>
*/
@ -174,8 +174,6 @@ public static void sendDTMF(
if (data != null && (buffer.getFormat() instanceof AudioFormat))
{
Class<?> dataClass = data.getClass();
double audioSample;
double amplitudeCoefficient;
int fromIndex = buffer.getOffset();
AudioFormat audioFormat = (AudioFormat) buffer.getFormat();
@ -186,14 +184,14 @@ public static void sendDTMF(
int[] sampleData = tone.getAudioSamples(
samplingFrequency,
sampleSizeInBits);
IntBuffer sampleDataIntBuffer = IntBuffer.wrap(sampleData);
IntBuffer.wrap(sampleData);
int toIndex = fromIndex +
sampleData.length * (sampleSizeInBits / 8);
ByteBuffer newData = ByteBuffer.allocate(toIndex);
// Prepares newData to be endian compliant with original buffer
// data.
// data.
if(audioFormat.getEndian() == AudioFormat.BIG_ENDIAN)
{
newData.order(ByteOrder.BIG_ENDIAN);
@ -282,7 +280,7 @@ private class MutePushBufferStream
/**
* Initializes a new <tt>MutePushBufferStream</tt> instance which is to
* provide mute support to a specific <tt>PushBufferStream</tt>.
*
*
* @param stream the <tt>PushBufferStream</tt> the new instance is to
* provide mute support to
*/

@ -275,7 +275,7 @@ else if(toneTransmissionState == ToneTransmissionState.END_REQUESTED)
pktEnd = true;
remainingsEndPackets = 2;
toneTransmissionState = ToneTransmissionState.END_SEQUENCE_INITIATED;
toneTransmissionState = ToneTransmissionState.END_SEQUENCE_INITIATED;
}
else if(toneTransmissionState == ToneTransmissionState.END_SEQUENCE_INITIATED)
{
@ -320,7 +320,7 @@ public void startSending(DTMFRtpTone tone)
* <tt>startSendingDTMF()</tt> method. Has no effect if no tone is currently
* being sent.
*
* @see AudioMediaStream#stopSendingDTMF()
* @see AudioMediaStream#stopSendingDTMF(DTMFMethod dtmfMethod)
*/
public void stopSendingDTMF()
{

@ -21,25 +21,40 @@
/**
* Default implementation of {@link SDesControl} that supports the crypto suites
* of the original RFC4568 and the KDR parameter, but nothing else.
*
*
* @author Ingo Bauersachs
*/
public class SDesControlImpl
implements SDesControl
{
/**
* List of enabled crypto suites.
*/
private List<String> enabledCryptoSuites = new ArrayList<String>(3)
{{
{
private static final long serialVersionUID = 0L;
{
add(SrtpCryptoSuite.AES_CM_128_HMAC_SHA1_80);
add(SrtpCryptoSuite.AES_CM_128_HMAC_SHA1_32);
add(SrtpCryptoSuite.F8_128_HMAC_SHA1_80);
}};
}
};
/**
* List of supported crypto suites.
*/
private final List<String> supportedCryptoSuites = new ArrayList<String>(3)
{{
{
private static final long serialVersionUID = 0L;
{
add(SrtpCryptoSuite.AES_CM_128_HMAC_SHA1_80);
add(SrtpCryptoSuite.AES_CM_128_HMAC_SHA1_32);
add(SrtpCryptoSuite.F8_128_HMAC_SHA1_80);
}};
}
};
private SrtpSDesFactory sdesFactory;
private SrtpCryptoAttribute[] attributes;
@ -48,11 +63,16 @@ public class SDesControlImpl
private SrtpCryptoAttribute selectedOutAttribute;
private SrtpListener srtpListener;
/**
* SDESControl
*/
public SDesControlImpl()
{
sdesFactory = new SrtpSDesFactory();
Random r = new Random()
{
private static final long serialVersionUID = 0L;
@Override
public void nextBytes(byte[] bytes)
{
@ -191,7 +211,7 @@ public void setConnector(AbstractRTPConnector newValue)
/**
* Returns true, SDES always requires the secure transport of its keys.
*
*
* @return true
*/
public boolean requiresSecureSignalingTransport()

@ -994,7 +994,8 @@ public void zrtpAskEnrollment(ZrtpCodes.InfoEnrollment info)
/**
*
* @param info
* @see gnu.java.zrtp.ZrtpCallback#zrtpInformEnrollment(java.lang.String)
* @see gnu.java.zrtp.ZrtpCallback#zrtpInformEnrollment(
* gnu.java.zrtp.ZrtpCodes.InfoEnrollment)
*/
public void zrtpInformEnrollment(ZrtpCodes.InfoEnrollment info)
{
@ -1186,7 +1187,7 @@ public void acceptEnrollment(boolean accepted)
/**
* Get the commited SAS rendering algorithm for this ZRTP session.
*
*
* @return the commited SAS rendering algorithm
*/
public ZrtpConstants.SupportedSASTypes getSasType() {
@ -1198,8 +1199,8 @@ public ZrtpConstants.SupportedSASTypes getSasType() {
/**
* Get the computed SAS hash for this ZRTP session.
*
* @return a refernce to the byte array that contains the full
*
* @return a refernce to the byte array that contains the full
* SAS hash.
*/
public byte[] getSasHash() {
@ -1211,15 +1212,19 @@ public byte[] getSasHash() {
/**
* Send the SAS relay packet.
*
*
* The method creates and sends a SAS relay packet according to the ZRTP
* specifications. Usually only a MitM capable user agent (PBX) uses this
* function.
*
*
* @param sh the full SAS hash value
* @param render the SAS rendering algorithm
* @return true if the SASReplay packet has been correctly sent, false
* otherwise
*/
public boolean sendSASRelayPacket(byte[] sh, ZrtpConstants.SupportedSASTypes render) {
public boolean sendSASRelayPacket(byte[] sh,
ZrtpConstants.SupportedSASTypes render)
{
if (zrtpEngine != null)
return zrtpEngine.sendSASRelayPacket(sh, render);
else
@ -1227,11 +1232,11 @@ public boolean sendSASRelayPacket(byte[] sh, ZrtpConstants.SupportedSASTypes ren
}
/**
* Check the state of the MitM mode flag.
*
*
* If true then this ZRTP session acts as MitM, usually enabled by a PBX
* based client (user agent)
*
* @return state of mitmMode
*
* @return state of mitmMode
*/
public boolean isMitmMode() {
return mitmMode;
@ -1239,10 +1244,10 @@ public boolean isMitmMode() {
/**
* Set the state of the MitM mode flag.
*
* If MitM mode is set to true this ZRTP session acts as MitM, usually
*
* If MitM mode is set to true this ZRTP session acts as MitM, usually
* enabled by a PBX based client (user agent).
*
*
* @param mitmMode defines the new state of the mitmMode flag
*/
public void setMitmMode(boolean mitmMode) {
@ -1251,10 +1256,10 @@ public void setMitmMode(boolean mitmMode) {
/**
* Check the state of the enrollment mode.
*
*
* If true then we will set the enrollment flag (E) in the confirm
* packets and performs the enrollment actions. A MitM (PBX) enrollment service sets this flagstarted this ZRTP
* session. Can be set to true only if mitmMode is also true.
* packets and performs the enrollment actions. A MitM (PBX) enrollment service sets this flagstarted this ZRTP
* session. Can be set to true only if mitmMode is also true.
* @return status of the enrollmentMode flag.
*/
public boolean isEnrollmentMode() {
@ -1266,13 +1271,13 @@ public boolean isEnrollmentMode() {
/**
* Set the state of the enrollment mode.
*
*
* If true then we will set the enrollment flag (E) in the confirm
* packets and perform the enrollment actions. A MitM (PBX) enrollment
* service must sets this mode to true.
*
* Can be set to true only if mitmMode is also true.
*
* packets and perform the enrollment actions. A MitM (PBX) enrollment
* service must sets this mode to true.
*
* Can be set to true only if mitmMode is also true.
*
* @param enrollmentMode defines the new state of the enrollmentMode flag
*/
public void setEnrollmentMode(boolean enrollmentMode) {

@ -10,12 +10,9 @@
import net.java.sip.communicator.service.systray.*;
import net.java.sip.communicator.util.*;
import javax.swing.*;
/**
* An implementation of the <tt>PopupMessageNotificationHandler</tt> interface.
*
*
* @author Yana Stamcheva
*/
public class PopupMessageNotificationHandlerImpl
@ -37,7 +34,7 @@ public String getActionType()
/**
* Shows the given <tt>PopupMessage</tt>
*
*
* @param action the action to act upon
* @param title the title of the given message
* @param message the message to use if and where appropriate (e.g. with

@ -53,7 +53,7 @@ public class InfoRetreiver
{
this.jabberProvider = jabberProvider;
this.ownerUin = ownerUin;
vcardTimeoutReply = JabberActivator.getConfigurationService().getLong(
ProtocolProviderServiceJabberImpl.VCARD_REPLY_TIMEOUT_PROPERTY,
-1);
@ -329,6 +329,12 @@ private String checkForFullName(VCard card)
/**
* Load VCard for the given user.
* Using the specified timeout.
*
* @param vcard VCard
* @param connection XMPP connection
* @param user the user
* @param timeout timeout in second
* @throws XMPPException if something went wrong during VCard loading
*/
public void load(VCard vcard,
Connection connection,

@ -1,6 +1,6 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
*
* Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.protocol.msn;
@ -13,7 +13,7 @@
import net.sf.jml.*;
/**
* Implements ad-hoc chat rooms for MSN.
* Implements ad-hoc chat rooms for MSN.
*
* @author Rupert Burchardi
* @author Valentin Martinet
@ -42,18 +42,18 @@ public class AdHocChatRoomMsnImpl
private MsnSwitchboard switchboard = null;
/**
* Listeners that will be notified of changes in participants status in the
* Listeners that will be notified of changes in participants status in the
* ad-hoc room, such as participant joined, left, etc.
*/
private Vector<AdHocChatRoomParticipantPresenceListener>
participantsPresenceListeners =
private Vector<AdHocChatRoomParticipantPresenceListener>
participantsPresenceListeners =
new Vector<AdHocChatRoomParticipantPresenceListener>();
/**
* Listeners that will be notified every time a new message is received on
* this ad-hoc chat room.
*/
private Vector<AdHocChatRoomMessageListener> messageListeners
private Vector<AdHocChatRoomMessageListener> messageListeners
= new Vector<AdHocChatRoomMessageListener>();
/**
@ -70,7 +70,7 @@ public class AdHocChatRoomMsnImpl
/**
* The list of participants of this ad-hoc chat room.
*/
private final Hashtable<String, Contact> participants =
private final Hashtable<String, Contact> participants =
new Hashtable<String, Contact>();
/**
@ -84,19 +84,19 @@ public class AdHocChatRoomMsnImpl
private final OperationSetPersistentPresenceMsnImpl presenceOpSet;
/**
* Creates a new ad-hoc chat room for MSN named <tt>name</tt>, using the
* Creates a new ad-hoc chat room for MSN named <tt>name</tt>, using the
* protocol provider <tt>provider</tt>.
*
*
* @param name
* @param provider
*/
public AdHocChatRoomMsnImpl(String name,
ProtocolProviderServiceMsnImpl provider)
ProtocolProviderServiceMsnImpl provider)
{
this.name = name;
this.provider = provider;
this.opSetAdHocMuc =
(OperationSetAdHocMultiUserChatMsnImpl)
this.opSetAdHocMuc =
(OperationSetAdHocMultiUserChatMsnImpl)
this.provider.getOperationSet(OperationSetAdHocMultiUserChat.class);
this.presenceOpSet
@ -106,22 +106,22 @@ public AdHocChatRoomMsnImpl(String name,
}
/**
* Creates a new ad-hoc chat room for MSN named <tt>name</tt>, using the
* Creates a new ad-hoc chat room for MSN named <tt>name</tt>, using the
* protocol provider <tt>provider</tt> and the msn switchboard
* <tt>switchboard</tt>.
*
*
* @param name
* @param provider
* @param switchboard
*/
public AdHocChatRoomMsnImpl(String name,
ProtocolProviderServiceMsnImpl provider,
MsnSwitchboard switchboard)
MsnSwitchboard switchboard)
{
this.name = name;
this.provider = provider;
this.opSetAdHocMuc
= (OperationSetAdHocMultiUserChatMsnImpl)
= (OperationSetAdHocMultiUserChatMsnImpl)
this.provider.getOperationSet(OperationSetAdHocMultiUserChat.class);
this.presenceOpSet
@ -129,7 +129,7 @@ public AdHocChatRoomMsnImpl(String name,
this.provider.getOperationSet(
OperationSetPersistentPresence.class);
this.switchboard = switchboard;
this.switchboard = switchboard;
this.updateParticipantsList(switchboard);
}
@ -137,7 +137,7 @@ public AdHocChatRoomMsnImpl(String name,
/**
* Adds a listener that will be notified of changes in our status in the
* room.
*
*
* @param listener a participant status listener.
*/
public void addParticipantPresenceListener(
@ -153,7 +153,7 @@ public void addParticipantPresenceListener(
/**
* Registers <tt>listener</tt> so that it would receive events every time a
* new message is received on this chat room.
*
*
* @param listener a <tt>MessageListener</tt> that would be notified every
* time a new message is received on this chat room.
*/
@ -169,7 +169,7 @@ public void addMessageListener(AdHocChatRoomMessageListener listener)
/**
* Removes <tt>listener</tt> so that it won't receive any further message
* events from this room.
*
*
* @param listener the <tt>MessageListener</tt> to remove from this room
*/
public void removeMessageListener(ChatRoomMessageListener listener)
@ -182,9 +182,9 @@ public void removeMessageListener(ChatRoomMessageListener listener)
}
/**
* Finds the participant of this ad-hoc chat room corresponding to the
* Finds the participant of this ad-hoc chat room corresponding to the
* given address.
*
*
* @param address the address to search for.
* @return the participant of this chat room corresponding to the given
* nick name.
@ -208,13 +208,13 @@ public Contact findParticipantForAddress(String address)
}
/**
* Creates a <tt>Message</tt> for this ad-hoc chat room containing
* Creates a <tt>Message</tt> for this ad-hoc chat room containing
* <tt>text</tt>.
*
*
* @param text
* @return Message the newly created <tt>Message</tt>
*/
public Message createMessage(String text)
public Message createMessage(String text)
{
Message msg =
new MessageMsnImpl(text,
@ -226,20 +226,20 @@ public Message createMessage(String text)
/**
* Returns the name of this ad-hoc chatroom
*
*
* @return String
*/
public String getName()
public String getName()
{
return this.name;
}
/**
* Returns the parent provider
*
*
* @return ProtocolProviderService
*/
public ProtocolProviderService getParentProvider()
public ProtocolProviderService getParentProvider()
{
return this.provider;
}
@ -247,10 +247,10 @@ public ProtocolProviderService getParentProvider()
/**
* Returns a list containing all the <tt>Contact</tt>s who participate in
* this ad-hoc chat room.
*
*
* @return List<Contact>
*/
public List<Contact> getParticipants()
public List<Contact> getParticipants()
{
return new LinkedList<Contact>(this.participants.values());
}
@ -258,7 +258,7 @@ public List<Contact> getParticipants()
/**
* Returns the participant of this ad-hoc chat room which corresponds to
* the given id.
*
*
* @param id ID of the participant
* @return Contact the corresponding Contact
*/
@ -269,7 +269,8 @@ public Contact getAdHocChatRoomParticipant(String id)
/**
* Adds a participant to the participants list.
*
*
* @param id the ID
* @param participant The participant (<tt>Contact</tt>) to add.
*/
public void addAdHocChatRoomParticipant(String id, Contact participant)
@ -283,28 +284,33 @@ public void addAdHocChatRoomParticipant(String id, Contact participant)
/**
* Removes the participant of this ad-hoc chat room which corresponds to
* the given id.
*
*
* @param id ID of the participant
*/
public void removeParticipant(String id)
{
Contact contact= this.participants.get(id);
this.participants.remove(id);
fireParticipantPresenceEvent(contact,
AdHocChatRoomParticipantPresenceChangeEvent.CONTACT_LEFT, null);
}
/**
* Returns the number of <tt>Contact</tt>s who participate in this ad-hoc
* Returns the number of <tt>Contact</tt>s who participate in this ad-hoc
* chat room.
*/
public int getParticipantsCount()
public int getParticipantsCount()
{
return this.participants.size();
}
public String getSubject()
/**
* Returns the subject.
*
* @return null
*/
public String getSubject()
{
return null;
}
@ -312,7 +318,7 @@ public String getSubject()
/**
* Invites another user to this room. If we're not joined nothing will
* happen.
*
*
* @param userAddress the address of the user (email address) to invite to
* the room.(one may also invite users not on their contact
* list).
@ -362,7 +368,7 @@ public void leave()
switchboard = null;
}
Iterator<Contact> participantsIter
Iterator<Contact> participantsIter
= participants.values().iterator();
while (participantsIter.hasNext())
@ -378,20 +384,25 @@ public void leave()
participants.clear();
}
/**
* Returns if this chatroom is a system ones.
*
* @return false
*/
public boolean isSystem()
{
return false;
}
/**
* Sends the given message through the participants of this ad-hoc chat
* Sends the given message through the participants of this ad-hoc chat
* room.
*
*
* @param message the message to delivered
*
*
* @throws OperationFailedException if send fails
*/
public void sendMessage(Message message) throws OperationFailedException
public void sendMessage(Message message) throws OperationFailedException
{
if (logger.isInfoEnabled())
logger.info("switchboard="+this.switchboard);
@ -409,7 +420,7 @@ public void sendMessage(Message message) throws OperationFailedException
/**
* Sets the corresponding switchboard.
*
*
* @param switchboard Corresponding switchboard.
*/
public void setSwitchboard(MsnSwitchboard switchboard)
@ -419,9 +430,9 @@ public void setSwitchboard(MsnSwitchboard switchboard)
/**
* Creates the corresponding AdHocChatRoomParticipantPresenceChangeEvent and
* notifies all <tt>AdHocChatRoomParticipantPresenceListener</tt>s that a
* notifies all <tt>AdHocChatRoomParticipantPresenceListener</tt>s that a
* participant has joined or left this <tt>AdHocChatRoom</tt>.
*
*
* @param participant the <tt>Contact</tt>
* @param eventID the identifier of the event
* @param eventReason the reason of the event
@ -455,7 +466,7 @@ private void fireParticipantPresenceEvent( Contact participant,
* <tt>AdHocChatRoomMessageDeliveredEvent</tt>,
* <tt>AdHocChatRoomMessageReceivedEvent</tt> or a
* <tt>AdHocChatRoomMessageDeliveryFailedEvent</tt> has been fired.
*
*
* @param evt The specific event
*/
public void fireMessageEvent(EventObject evt)
@ -495,9 +506,9 @@ else if (evt instanceof AdHocChatRoomMessageDeliveryFailedEvent)
}
/**
* Fills the participants list with all participants inside the switchboard
* Fills the participants list with all participants inside the switchboard
* (ad-hoc chat room).
*
*
* @param switchboard The corresponding switchboard
*/
public void updateParticipantsList(MsnSwitchboard switchboard)
@ -508,7 +519,7 @@ public void updateParticipantsList(MsnSwitchboard switchboard)
{
if (!this.participants.containsKey(msnContact.getId()))
{
// if the member is not inside the members list, create a
// if the member is not inside the members list, create a
// contact instance,
// add it to the list and fire a member presence event
ContactMsnImpl contact
@ -543,7 +554,7 @@ public void updateParticipantsList(MsnSwitchboard switchboard)
/**
* Returns the identifier of this ad-hoc chat room.
*
*
* @return a <tt>String</tt> containing the identifier of this ad-hoc room
*/
public String getIdentifier()
@ -553,7 +564,7 @@ public String getIdentifier()
/**
* Removes the given participant presence listener.
*
*
* @param listener the listener to remove
*/
public void removeParticipantPresenceListener(
@ -568,7 +579,7 @@ public void removeParticipantPresenceListener(
/**
* Removes the given message listener.
*
*
* @param listener the listener to remove
*/
public void removeMessageListener(AdHocChatRoomMessageListener listener)

@ -302,7 +302,7 @@ public String getStatusMessage()
/**
* Changes the current status message of this contact.
*
*
* @param newStatusMessage the new message.
*/
public void setStatusMessage(String newStatusMessage)

@ -1,19 +1,19 @@
/*
* MimeUtility.java
* Copyright (C) 2002, 2004, 2005 The Free Software Foundation
*
*
* This file is part of GNU JavaMail, a library.
*
*
* GNU JavaMail is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* GNU JavaMail is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
@ -48,10 +48,11 @@ public class MimeUtility
private MimeUtility()
{
}
/**
* Decodes headers that are defined as '*text' in RFC 822.
* @param etext the possibly encoded value
* @return decoded text
* @exception UnsupportedEncodingException if the charset conversion failed
*/
public static String decodeText(String etext)
@ -66,7 +67,7 @@ public static String decodeText(String etext)
StringBuffer buffer = new StringBuffer();
StringBuffer extra = new StringBuffer();
boolean decoded = false;
while (st.hasMoreTokens())
while (st.hasMoreTokens())
{
String token = st.nextToken();
char c = token.charAt(0);
@ -104,6 +105,7 @@ public static String decodeText(String etext)
* Decodes the specified string using the RFC 2047 rules for parsing an
* "encoded-word".
* @param text the possibly encoded value
* @return decoded word
* @exception Exception if the string is not an encoded-word
* @exception UnsupportedEncodingException if the decoding failed
*/

@ -1,6 +1,6 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
*
* Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.protocol.sip;
@ -10,13 +10,19 @@
/**
* A simple implementation of the <tt>OperationSetAvatar</tt> interface for the
* jabber protocol.
*
*
* @author Damian Minkov
*/
public class OperationSetAvatarSipImpl extends
AbstractOperationSetAvatar<ProtocolProviderServiceSipImpl>
{
/**
* Constructs a new <tt>OperationSetAvatarSipImpl</tt>.
*
* @param parentProvider parent protocol provider service
* @param accountInfoOpSet account info operation set
*/
public OperationSetAvatarSipImpl(
ProtocolProviderServiceSipImpl parentProvider,
OperationSetServerStoredAccountInfo accountInfoOpSet)

@ -1070,7 +1070,7 @@ private void processInvite(SipProvider sourceProvider,
//this is a brand new call (not a transferred one)
CallSipImpl call = new CallSipImpl(this);
MediaAwareCallPeer peer =
MediaAwareCallPeer<?,?,?> peer =
call.processInvite(sourceProvider, serverTransaction);
if(getProtocolProvider().getAccountID()
@ -1081,7 +1081,7 @@ private void processInvite(SipProvider sourceProvider,
{
// if in paranoia mode and we don't find any encryption
// fail peer/call send error with warning explaining why
peer.setState(
CallPeerState.FAILED,
"Encryption required!",

@ -1949,7 +1949,7 @@ public void sayError(ServerTransaction serverTransaction, int errorCode)
* @param serverTransaction the transaction that we'd like to send an error
* response in.
* @param errorCode the code that the response should have.
*
* @param header SIP header
* @throws OperationFailedException if we failed constructing or sending a
* SIP Message.
*/

@ -24,7 +24,14 @@
*/
public class SipApplicationData
{
/**
* Key service.
*/
public static final String KEY_SERVICE = "service";
/**
* Key subscriptions.
*/
public static final String KEY_SUBSCRIPTIONS = "subscriptions";
/**

@ -13,8 +13,8 @@
/**
* The <tt>SipStatusEnum</tt> gives access to presence states for the Sip
* protocol. All status icons corresponding to presence states are located with
* the help of the <tt>imagePath</tt> parameter
*
* the help of the <tt>imagePath</tt> parameter
*
* @author Emil Ivov
* @author Yana Stamcheva
*/
@ -95,11 +95,16 @@ public class SipStatusEnum
public final List<PresenceStatus> supportedStatusSet
= new LinkedList<PresenceStatus>();
/**
* Constructor.
*
* @param iconPath path of the icon
*/
public SipStatusEnum(String iconPath)
{
this.offlineStatus = new SipPresenceStatus(
0,
OFFLINE,
OFFLINE,
loadIcon(iconPath + "/sip16x16-offline.png"));
this.busyStatus = new SipPresenceStatus(
@ -137,7 +142,7 @@ public SipStatusEnum(String iconPath)
/**
* Returns the offline sip status.
*
*
* @param statusName the name of the status.
* @return the offline sip status.
*/
@ -152,7 +157,7 @@ else if (statusName.equals(BUSY))
else if (statusName.equals(ON_THE_PHONE))
return onThePhoneStatus;
else if (statusName.equals(AWAY))
return awayStatus;
return awayStatus;
else
return unknownStatus;
}

@ -9,7 +9,7 @@
/**
* Abstract class for the determining the address for the SIP proxy.
*
*
* @author Ingo Bauersachs
*/
public abstract class ProxyConnection
@ -69,7 +69,7 @@ public final String getOutboundProxyString()
proxyStringBuffer.insert(0, '[');
proxyStringBuffer.append(']');
}
proxyStringBuffer.append(':');
proxyStringBuffer.append(socketAddress.getPort());
proxyStringBuffer.append('/');
@ -81,7 +81,7 @@ public final String getOutboundProxyString()
/**
* Compares an InetAddress against the active outbound proxy. The comparison
* is by reference, not equals.
*
*
* @param addressToTest The addres to test.
* @return True when the InetAddress is the same as the outbound proxy.
*/
@ -97,10 +97,11 @@ public final boolean isSameInetAddress(InetAddress addressToTest)
/**
* Retrieves the next address to use from DNS. Duplicate results are
* suppressed.
*
*
* @return True if a new address is available through {@link #getAddress()},
* false if the last address was reached. A new lookup from scratch
* can be started by calling {@link #reset()}.
* @throws DnssecException if there is a problem related to DNSSEC
*/
public final boolean getNextAddress() throws DnssecException
{
@ -126,7 +127,7 @@ public final boolean getNextAddress() throws DnssecException
/**
* Implementations must use this method to get the next address, but do not
* have to care about duplicate addresses.
*
*
* @return True when a further address was available.
* @throws DnssecException when a DNSSEC validation failure occured.
*/
@ -145,7 +146,7 @@ public void reset()
/**
* Factory method to create a proxy connection based on the account settings
* of the protocol provider.
*
*
* @param pps the protocol provider that needs a SIP server connection.
* @return An instance of a derived class.
*/

@ -104,6 +104,7 @@ public static Attribute createAttribute(String name, String value)
*
* @return an empty instance of a <tt>SessionDescription</tt> with
* preinitialized <tt>s</tt>, <tt>v</tt>, and <tt>t</tt> parameters.
* @throws OperationFailedException if the SDP creation failed
*/
public static SessionDescription createSessionDescription(
InetAddress localAddress)
@ -127,6 +128,7 @@ public static SessionDescription createSessionDescription(
*
* @return an empty instance of a <tt>SessionDescription</tt> with
* preinitialized <tt>s</tt>, <tt>v</tt>, and <tt>t</tt> parameters.
* @throws OperationFailedException if the SDP creation failed
*/
public static SessionDescription createSessionDescription(
InetAddress localAddress,
@ -213,6 +215,7 @@ public static SessionDescription createSessionDescription(
*
* @return a new <tt>SessionDescription</tt> that updates
* <tt>descToUpdate</tt>;
* @throws OperationFailedException if the SDP creation failed
*/
public static SessionDescription createSessionUpdateDescription(
SessionDescription descToUpdate,
@ -1557,7 +1560,7 @@ public static MediaType getMediaType(MediaDescription description)
*
* @param description the <tt>MediaDescription</tt> whose media type we'd
* like to extract.
*
* @param attributeName name of the attribute to check
* @return the media type (e.g. audio or video) for the specified media
* <tt>description</tt>.
*

@ -14,6 +14,11 @@
*/
public class XCapException extends Exception
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* Creates a new <code>XCapException</code> instance
* which does not give a human-readable explanation why the operation is

@ -14,6 +14,11 @@
*/
public class ParsingException extends Exception
{
/**
* Serial versionUID.
*/
private static final long serialVersionUID = 0L;
/**
* Creates a new <code>XCapException</code> instance
* which does not give a human-readable explanation why the operation is

@ -6,7 +6,6 @@
*/
package net.java.sip.communicator.impl.protocol.sip.xcap.model;
import static net.java.sip.communicator.util.xml.XMLUtils.*;
import org.w3c.dom.*;
import java.util.*;

@ -23,44 +23,104 @@
*/
public final class CommonPolicyParser
{
/**
* The namespace of the common-policy.
*/
public static String NAMESPACE = "urn:ietf:params:xml:ns:common-policy";
/**
* The ruleset element name.
*/
public static String RULESET_ELEMENT = "ruleset";
/**
* The rule element name.
*/
public static String RULE_ELEMENT = "rule";
/**
* The rule id attribute element name.
*/
public static String RULE_ID_ATTR = "id";
/**
* The conditions element name.
*/
public static String CONDITIONS_ELEMENT = "conditions";
/**
* The actions element name.
*/
public static String ACTIONS_ELEMENT = "actions";
/**
* The transformations element name.
*/
public static String TRANSFORMATIONS_ELEMENT = "transformations";
/**
* The identify element name.
*/
public static String IDENTITY_ELEMENT = "identity";
/**
* The sphere element name.
*/
public static String SPHERE_ELEMENT = "sphere";
/**
* The sphere value element name.
*/
public static String SPHERE_VALUE_ATTR = "value";
/**
* The validity element name.
*/
public static String VALIDITY_ELEMENT = "validity";
/**
* The validity-from element name.
*/
public static String VALIDITY_FROM_ELEMENT = "from";
/**
* The validity-until element name.
*/
public static String VALIDITY_UNTIL_ELEMENT = "until";
/**
* The one element name.
*/
public static String ONE_ELEMENT = "one";
/**
* The one-id element name.
*/
public static String ONE_ID_ATTR = "id";
/**
* The many element name.
*/
public static String MANY_ELEMENT = "many";
/**
* The many domain element name.
*/
public static String MANY_DOMAIN_ATTR = "domain";
/**
* The except element name.
*/
public static String EXCEPT_ELEMENT = "except";
/**
* The except id element name.
*/
public static String EXCEPT_ID_ATTR = "id";
/**
* The except domain element name.
*/
public static String EXCEPT_DOMAIN_ATTR = "domain";
private CommonPolicyParser()

@ -31,15 +31,15 @@ interface ContactSSH
* conversation message sent by another contact.
*/
public static final int CONVERSATION_MESSAGE_RECEIVED = 1;
/**
* An event type indicting that the message being received is a system
* message being sent by the server or a system administrator.
*/
public static final int SYSTEM_MESSAGE_RECEIVED = 2;
//Following eight function declations to be moved to Contact
/**
* This method is only called when the contact is added to a new
* <tt>ContactGroupSSHImpl</tt> by the
@ -49,7 +49,7 @@ interface ContactSSH
* parent of this <tt>ContactSSHImpl</tt>
*/
void setParentGroup (ContactGroupSSHImpl newParentGroup);
/**
* Sets <tt>sshPresenceStatus</tt> as the PresenceStatus that this
* contact is currently in.
@ -57,7 +57,7 @@ interface ContactSSH
* currently valid for this contact.
*/
public void setPresenceStatus (PresenceStatus sshPresenceStatus);
/**
* Returns the persistent presence operation set that this contact belongs
* to.
@ -67,9 +67,9 @@ interface ContactSSH
*/
public OperationSetPersistentPresence
getParentPresenceOperationSet ();
/**
* Returns the BasicInstant Messaging operation set that this contact
* Returns the BasicInstant Messaging operation set that this contact
* belongs to.
*
* @return the <tt>OperationSetBasicInstantMessagingSSHImpl</tt> that
@ -77,7 +77,7 @@ interface ContactSSH
*/
public OperationSetBasicInstantMessaging
getParentBasicInstantMessagingOperationSet ();
/**
* Returns the File Transfer operation set that this contact belongs
* to.
@ -87,28 +87,28 @@ interface ContactSSH
*/
public OperationSetFileTransfer
getFileTransferOperationSet ();
/**
* Return the type of message received from remote server
*
* @return messageType
*/
public int getMessageType ();
/**
* Sets the type of message received from remote server
*
* @param messageType
*/
public void setMessageType (int messageType);
/**
* Stores persistent data of the contact.
*
* @param persistentData of the contact
*/
public void setPersistentData (String persistentData);
/**
* Makes the contact resolved or unresolved.
*
@ -116,7 +116,7 @@ interface ContactSSH
* make it unresolved
*/
public void setResolved (boolean resolved);
/**
* Specifies whether or not this contact is being stored by the server.
* Non persistent contacts are common in the case of simple, non-persistent
@ -131,7 +131,7 @@ interface ContactSSH
* otherwise.
*/
public void setPersistent (boolean isPersistent);
/**
* Returns true if a command has been sent whos reply was not received yet
* false otherwise
@ -139,7 +139,7 @@ interface ContactSSH
* @return commandSent
*/
public boolean isCommandSent ();
/**
* Set the state of commandSent variable which determines whether a reply
* to a command sent is awaited
@ -147,7 +147,7 @@ interface ContactSSH
* @param commandSent
*/
public void setCommandSent (boolean commandSent);
/**
* Initializes the reader and writers associated with shell of this contact
*
@ -156,26 +156,26 @@ interface ContactSSH
*/
void initializeShellIO (InputStream shellInputStream,
OutputStream shellOutputStream);
/**
* Closes the readers and writer associated with shell of this contact
*/
void closeShellIO ();
/**
* Determines whether a connection to a remote server is already underway
*
* @return connectionInProgress
*/
public boolean isConnectionInProgress ();
/**
* Sets the status of connection attempt to remote server
*
* @param connectionInProgress
*/
public void setConnectionInProgress (boolean connectionInProgress);
// /**
// * Sets the PS1 prompt of the current shell of Contact
// * This method is synchronized
@ -190,110 +190,111 @@ void initializeShellIO (InputStream shellInputStream,
// * @return sshPrompt
// */
// public String getShellPrompt();
/**
* Saves the details of contact in persistentData
*/
public void savePersistentDetails ();
/*
* Returns the SSHContactInfo associated with this contact
*
* @return sshConfigurationForm
*/
public SSHContactInfo getSSHConfigurationForm ();
/**
* Returns the JSch Stack identified associated with this contact
*
* @return jsch
*/
JSch getJSch ();
/**
* Starts the timer and its task to periodically update the status of
* remote machine
*/
void startTimerTask ();
/**
* Stops the timer and its task to stop updating the status of
* remote machine
*/
void stopTimerTask ();
/**
* Sets the JSch Stack identified associated with this contact
*
* @param jsch to be associated
*/
void setJSch (JSch jsch);
/**
* Returns the Username associated with this contact
*
* @return userName
*/
String getUserName ();
/**
* Returns the Hostname associated with this contact
*
* @return hostName
*/
String getHostName ();
/**
* Returns the Password associated with this contact
*
* @return password
*/
String getPassword ();
/**
* Sets the Password associated with this contact
*
* @param password
*/
void setPassword (String password);
/**
* Returns the SSH Session associated with this contact
*
* @return sshSession
*/
Session getSSHSession ();
/**
* Sets the SSH Session associated with this contact
*
* @param sshSession the newly created SSH Session to be associated
*/
void setSSHSession (Session sshSession);
/**
* Returns the SSH Shell Channel associated with this contact
*
* @return shellChannel
*/
Channel getShellChannel ();
/**
* Sets the SSH Shell channel associated with this contact
*
* @param shellChannel to be associated with SSH Session of this contact
*/
void setShellChannel (Channel shellChannel);
/**
* Sends a message a line to remote machine via the Shell Writer
*
* @param message to be sent
* @throws IOException if message failed to be sent
*/
public void sendLine (String message)
throws IOException;
throws IOException;
// /**
// * Reads a line from the remote machine via the Shell Reader
// *
@ -301,14 +302,14 @@ public void sendLine (String message)
// */
// public String getLine()
// throws IOException;
/**
* Returns the Input Stream associated with SSH Channel of this contact
*
* @return shellInputStream associated with SSH Channel of this contact
*/
public InputStream getShellInputStream ();
// /**
// * Sets the Input Stream associated with SSH Channel of this contact
// *
@ -316,14 +317,14 @@ public void sendLine (String message)
// * contact
// */
// public void setShellInputStream(InputStream shellInputStream);
/**
* Returns the Output Stream associated with SSH Channel of this contact
*
* @return shellOutputStream associated with SSH Channel of this contact
*/
public OutputStream getShellOutputStream ();
// /**
// * Sets the Output Stream associated with SSH Channel of this contact
// *
@ -345,14 +346,14 @@ public void sendLine (String message)
// * @param shellReader to be associated with SSH Channel of this contact
// */
// public void setShellReader(BufferedReader shellReader);
/**
* Returns the PrintWriter associated with SSH Channel of this contact
*
* @return shellWriter associated with SSH Channel of this contact
*/
public PrintWriter getShellWriter ();
// /**
// * Sets the PrintWriter associated with SSH Channel of this contact
// *

@ -93,6 +93,8 @@ public void run()
}
/**
* Creates a new instance of ContactTimerSSHImpl
*
* @param sshContact the <tt>Contact</tt>
*/
public ContactTimerSSHImpl(ContactSSH sshContact)
{

@ -28,26 +28,30 @@ public class OperationSetFileTransferSSHImpl
{
private static final Logger logger
= Logger.getLogger(OperationSetFileTransferSSHImpl.class);
/**
* Currently registered message listeners.
*/
private Vector<FileTransferListener> fileTransferListeners
= new Vector<FileTransferListener>();
/**
* The protocol provider that created us.
*/
private ProtocolProviderServiceSSHImpl parentProvider = null;
/** Creates a new instance of OperationSetFileTransferSSHImpl */
/**
* Creates a new instance of OperationSetFileTransferSSHImpl
*
* @param parentProvider the parent protocol provider service
*/
public OperationSetFileTransferSSHImpl(
ProtocolProviderServiceSSHImpl parentProvider)
{
this.parentProvider = parentProvider;
}
/**
* Registers a FileTransferListener with this operation set so that it gets
* notifications of start, complete, failure of file transfers
@ -74,7 +78,7 @@ public void removeFileTransferListener(
}
/**
* Sends a file transfer request to the given <tt>toContact</tt>.
* Sends a file transfer request to the given <tt>toContact</tt>.
* @param toContact the contact that should receive the file
* @param file the file to send
*/

@ -34,72 +34,72 @@ public class ProtocolProviderServiceSSHImpl
{
private static final Logger logger
= Logger.getLogger(ProtocolProviderServiceSSHImpl.class);
/**
* The name of this protocol.
*/
public static final String SSH_PROTOCOL_NAME = ProtocolNames.SSH;
// /**
// * The identifier for SSH Stack
// * Java Secure Channel JSch
// */
// JSch jsch = new JSch();
/**
* The test command given after each command to determine the reply length
* The test command given after each command to determine the reply length
* of the command
*/
//private final String testCommand =
//private final String testCommand =
// Resources.getString("testCommand");
/**
* A reference to the protocol provider of UIService
*/
private static ServiceReference ppUIServiceRef;
/**
* Connection timeout to a remote server in milliseconds
*/
private static int connectionTimeout = 30000;
/**
* A reference to UI Service
*/
private static UIService uiService;
/**
* The id of the account that this protocol provider represents.
*/
private AccountID accountID = null;
/**
* We use this to lock access to initialization.
*/
private final Object initializationLock = new Object();
private OperationSetBasicInstantMessagingSSHImpl basicInstantMessaging;
private OperationSetFileTransferSSHImpl fileTranfer;
/**
* Indicates whether or not the provider is initialized and ready for use.
*/
private boolean isInitialized = false;
/**
* The logo corresponding to the ssh protocol.
*/
private ProtocolIconSSHImpl sshIcon
= new ProtocolIconSSHImpl();
/**
* The registration state of SSH Provider is taken to be registered by
* default as it doesn't correspond to the state on remote server
*/
private RegistrationState currentRegistrationState
= RegistrationState.REGISTERED;
/**
* The default constructor for the SSH protocol provider.
*/
@ -107,7 +107,7 @@ public ProtocolProviderServiceSSHImpl()
{
if (logger.isTraceEnabled())
logger.trace("Creating a ssh provider.");
try
{
// converting to milliseconds
@ -119,7 +119,7 @@ public ProtocolProviderServiceSSHImpl()
logger.error("Connection Timeout set to 30 seconds");
}
}
/**
* Initializes the service implementation, and puts it in a sate where it
* could interoperate with other services. It is strongly recomended that
@ -140,11 +140,11 @@ protected void initialize(
synchronized(initializationLock)
{
this.accountID = accountID;
//initialize the presence operationset
OperationSetPersistentPresenceSSHImpl persistentPresence =
new OperationSetPersistentPresenceSSHImpl(this);
addSupportedOperationSet(
OperationSetPersistentPresence.class,
persistentPresence);
@ -154,25 +154,25 @@ protected void initialize(
addSupportedOperationSet(
OperationSetPresence.class,
persistentPresence);
//initialize the IM operation set
basicInstantMessaging = new
basicInstantMessaging = new
OperationSetBasicInstantMessagingSSHImpl(
this);
addSupportedOperationSet(
OperationSetBasicInstantMessaging.class,
basicInstantMessaging);
//initialze the file transfer operation set
fileTranfer = new OperationSetFileTransferSSHImpl(this);
addSupportedOperationSet(
OperationSetFileTransfer.class,
fileTranfer);
isInitialized = true;
}
}
/**
* Determines whether a vaild session exists for the contact of remote
* machine.
@ -188,12 +188,12 @@ public boolean isSessionValid(ContactSSH sshContact)
if( sshSession != null)
if(sshSession.isConnected())
return true;
// remove reference to an unconnected SSH Session, if any
sshContact.setSSHSession(null);
return false;
}
/**
* Determines whether the contact is connected to shell of remote machine
* as a precheck for any further operation
@ -206,22 +206,22 @@ public boolean isSessionValid(ContactSSH sshContact)
public boolean isShellConnected(ContactSSH sshContact)
{
// a test command may also be run here
if(isSessionValid(sshContact))
{
return(sshContact.getShellChannel() != null);
}
/*
* Above should be return(sshContact.getShellChannel() != null
* && sshContact.getShellChannel().isConnected());
*
* but incorrect reply from stack for isConnected()
*/
return false;
}
/**
* Creates a shell channel to the remote machine
* a new jsch session is also created if the current one is invalid
@ -242,35 +242,35 @@ public void run()
OperationSetPersistentPresenceSSHImpl persistentPresence
= (OperationSetPersistentPresenceSSHImpl)sshContact
.getParentPresenceOperationSet();
persistentPresence.changeContactPresenceStatus(
sshContact,
SSHStatusEnum.CONNECTING);
try
{
if(!isSessionValid(sshContact))
createSSHSessionAndLogin(sshContact);
createShellChannel(sshContact);
//initializing the reader and writers of ssh contact
persistentPresence.changeContactPresenceStatus(
sshContact,
SSHStatusEnum.CONNECTED);
showWelcomeMessage(sshContact);
sshContact.setMessageType(ContactSSH
.CONVERSATION_MESSAGE_RECEIVED);
sshContact.setConnectionInProgress(false);
Thread.sleep(1500);
sshContact.setCommandSent(true);
basicInstantMessaging.sendInstantMessage(
sshContact,
firstMessage);
@ -281,7 +281,7 @@ public void run()
persistentPresence.changeContactPresenceStatus(
sshContact,
SSHStatusEnum.NOT_AVAILABLE);
ex.printStackTrace();
}
finally
@ -290,38 +290,38 @@ public void run()
}
}
}));
newConnection.start();
}
/**
* Creates a channel for shell type in the current session
* channel types = shell, sftp, exec(X forwarding),
* direct-tcpip(stream forwarding) etc
*
* @param sshContact ID of SSH Contact
*
* @throws IOException if the shell channel cannot be created
*/
public void createShellChannel(ContactSSH sshContact)
throws IOException
throws IOException
{
try
{
Channel shellChannel = sshContact.getSSHSession()
.openChannel("shell");
//initalizing the reader and writers of ssh contact
sshContact.initializeShellIO(shellChannel.getInputStream(),
shellChannel.getOutputStream());
((ChannelShell)shellChannel).setPtyType(
sshContact.getSSHConfigurationForm().getTerminalType());
//initializing the shell
shellChannel.connect(1000);
sshContact.setShellChannel(shellChannel);
sshContact.sendLine("export PS1=");
}
catch (JSchException ex)
@ -331,11 +331,13 @@ public void createShellChannel(ContactSSH sshContact)
" server");
}
}
/**
* Closes the Shell channel are associated IO Streams
*
* @param sshContact ID of SSH Contact
* @throws JSchException if something went wrong in JSch
* @throws IOException if I/O exception occurred
*/
public void closeShellChannel(ContactSSH sshContact) throws
JSchException,
@ -345,7 +347,7 @@ public void closeShellChannel(ContactSSH sshContact) throws
sshContact.getShellChannel().disconnect();
sshContact.setShellChannel(null);
}
/**
* Creates a SSH Session with a remote machine and tries to login
* according to the details specified by Contact
@ -353,7 +355,7 @@ public void closeShellChannel(ContactSSH sshContact) throws
*
* @param sshContact ID of SSH Contact
*
* @throws JSchException if a JSch is unable to create a SSH Session with
* @throws JSchException if a JSch is unable to create a SSH Session with
* the remote machine
* @throws InterruptedException if the thread is interrupted before session
* connected or is timed out
@ -367,10 +369,10 @@ public void createSSHSessionAndLogin(ContactSSH sshContact) throws
if (logger.isInfoEnabled())
logger.info("Creating a new SSH Session to "
+ sshContact.getHostName());
// creating a new JSch Stack identifier for contact
JSch jsch = new JSch();
String knownHosts =
accountID.getAccountPropertyString("KNOWN_HOSTS_FILE");
@ -379,14 +381,14 @@ public void createSSHSessionAndLogin(ContactSSH sshContact) throws
String identitiyKey =
accountID.getAccountPropertyString("IDENTITY_FILE");
String userName = sshContact.getUserName();
// use the name of system user if the contact has not supplied SSH
// details
if(userName.equals(""))
userName = System.getProperty("user.name");
if(!identitiyKey.equals("Optional"))
jsch.addIdentity(identitiyKey);
@ -395,22 +397,22 @@ public void createSSHSessionAndLogin(ContactSSH sshContact) throws
userName,
sshContact.getHostName(),
sshContact.getSSHConfigurationForm().getPort());
/**
* Creating and associating User Info with the session
* User Info passes authentication from sshContact to SSH Stack
*/
SSHUserInfo sshUserInfo = new SSHUserInfo(sshContact);
session.setUserInfo(sshUserInfo);
/**
* initializing the session
*/
session.connect(connectionTimeout);
int count = 0;
// wait for session to get connected
while(!session.isConnected() && count<=30000)
{
@ -420,7 +422,7 @@ public void createSSHSessionAndLogin(ContactSSH sshContact) throws
logger.trace("SSH:" + sshContact.getHostName()
+ ": Sleep zzz .. " );
}
// if timeout have exceeded
if(count>30000)
{
@ -429,20 +431,20 @@ public void createSSHSessionAndLogin(ContactSSH sshContact) throws
null,
"SSH Connection attempt to "
+ sshContact.getHostName() + " timed out");
// error codes are not defined yet
throw new OperationFailedException("SSH Connection attempt to " +
sshContact.getHostName() + " timed out", 2);
}
sshContact.setJSch(jsch);
sshContact.setSSHSession(session);
if (logger.isInfoEnabled())
logger.info("A new SSH Session to " + sshContact.getHostName()
+ " Created");
}
/**
* Closes the SSH Session associated with the contact
*
@ -453,14 +455,15 @@ void closeSSHSession(ContactSSH sshContact)
sshContact.getSSHSession().disconnect();
sshContact.setSSHSession(null);
}
/**
* Presents the login welcome message to user
*
* @param sshContact ID of SSH Contact
* @throws IOException if I/O exception occurred
*/
public void showWelcomeMessage(ContactSSH sshContact)
throws IOException
throws IOException
{
/* //sending the command
sshContact.sendLine(testCommand);
@ -487,7 +490,7 @@ public void showWelcomeMessage(ContactSSH sshContact)
if (logger.isDebugEnabled())
logger.debug("SSH: Welcome message shown");
}
/**
* Returns a reference to UIServce for accessing UI related services
*
@ -497,7 +500,7 @@ public static UIService getUIService()
{
return uiService;
}
/**
* Returns the AccountID that uniquely identifies the account represented
* by this instance of the ProtocolProviderService.
@ -508,7 +511,7 @@ public AccountID getAccountID()
{
return accountID;
}
/**
* Returns the short name of the protocol that the implementation of this
* provider is based upon (like SIP, Jabber, ICQ/AIM, or others for
@ -533,7 +536,7 @@ public RegistrationState getRegistrationState()
{
return currentRegistrationState;
}
/**
* Starts the registration process.
*
@ -549,22 +552,22 @@ public void register(SecurityAuthority authority)
{
RegistrationState oldState = currentRegistrationState;
currentRegistrationState = RegistrationState.REGISTERED;
//get a reference to UI Service via its Service Reference
ppUIServiceRef = SSHActivator.getBundleContext()
.getServiceReference(UIService.class.getName());
uiService = (UIService)SSHActivator.getBundleContext()
.getService(ppUIServiceRef);
fireRegistrationStateChanged(
oldState
, currentRegistrationState
, RegistrationStateChangeEvent.REASON_USER_REQUEST
, null);
}
/**
* Makes the service implementation close all open sockets and release
* any resources that it might have taken and prepare for
@ -578,7 +581,7 @@ public void shutdown()
}
if (logger.isTraceEnabled())
logger.trace("Killing the SSH Protocol Provider.");
if(isRegistered())
{
try
@ -595,10 +598,10 @@ public void shutdown()
, ex);
}
}
isInitialized = false;
}
/**
* Ends the registration of this protocol provider with the current
* registration service.
@ -612,7 +615,7 @@ public void unregister()
{
RegistrationState oldState = currentRegistrationState;
currentRegistrationState = RegistrationState.UNREGISTERED;
fireRegistrationStateChanged(
oldState
, currentRegistrationState
@ -622,7 +625,7 @@ public void unregister()
/*
* (non-Javadoc)
*
*
* @see net.java.sip.communicator.service.protocol.ProtocolProviderService#
* isSignallingTransportSecure()
*/

@ -18,8 +18,11 @@
*/
public class Resources
{
/**
* The SSH logo imageID.
*/
public static ImageID SSH_LOGO = new ImageID("protocolIconSsh");
/**
* Returns an string corresponding to the given key.
*
@ -31,7 +34,7 @@ public static String getString(String key)
{
return SSHActivator.getResources().getI18NString(key);
}
/**
* Loads an image from a given image identifier.
* @param imageID The identifier of the image.

@ -29,26 +29,26 @@ public class SSHActivator
{
private static final Logger logger
= Logger.getLogger(SSHActivator.class);
/**
* A reference to the registration of our SSH protocol provider
* factory.
*/
private ServiceRegistration sshPpFactoryServReg = null;
/**
* A reference to the SSH protocol provider factory.
*/
private static ProtocolProviderFactorySSHImpl
sshProviderFactory = null;
/**
* The currently valid bundle context.
*/
private static BundleContext bundleContext = null;
private static ResourceManagementService resourcesService;
/**
* Called when this bundle is started. In here we'll export the
* ssh ProtocolProviderFactory implementation so that it could be
@ -63,8 +63,8 @@ public class SSHActivator
public void start(BundleContext context)
throws Exception
{
this.bundleContext = context;
bundleContext = context;
Hashtable<String, String> hashtable = new Hashtable<String, String>();
hashtable.put(ProtocolProviderFactory.PROTOCOL, "SSH");
@ -75,11 +75,11 @@ public void start(BundleContext context)
ProtocolProviderFactory.class.getName(),
sshProviderFactory,
hashtable);
if (logger.isInfoEnabled())
logger.info("SSH protocol implementation [STARTED].");
}
/**
* Returns a reference to the bundle context that we were started with.
* @return bundleContext a reference to the BundleContext instance
@ -89,7 +89,7 @@ public static BundleContext getBundleContext()
{
return bundleContext;
}
/**
* Retrurns a reference to the protocol provider factory that we have
* registered.
@ -101,8 +101,8 @@ public static BundleContext getBundleContext()
{
return sshProviderFactory;
}
/**
* Called when this bundle is stopped so the Framework can perform the
* bundle-specific activities necessary to stop the bundle.
@ -116,12 +116,17 @@ public static BundleContext getBundleContext()
public void stop(BundleContext context)
throws Exception
{
this.sshProviderFactory.stop();
sshProviderFactory.stop();
sshPpFactoryServReg.unregister();
if (logger.isInfoEnabled())
logger.info("SSH protocol implementation [STOPPED].");
}
/**
* Returns the <tt>ResourceManagementService</tt>.
*
* @return the <tt>ResourceManagementService</tt>.
*/
public static ResourceManagementService getResources()
{
if (resourcesService == null)

@ -23,15 +23,21 @@
/**
* @author Shobhit Jindal
*/
class SSHContactInfo extends SIPCommDialog {
class SSHContactInfo extends SIPCommDialog
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
private ContactSSH sshContact;
private JPanel mainPanel = new TransparentPanel();
private JPanel machinePanel = new TransparentPanel();
private JPanel detailNamesPanel = new TransparentPanel();
private JPanel detailFieldsPanel = new TransparentPanel();
private JPanel detailsPanel = new TransparentPanel();
private JCheckBox addDetailsCheckBox = new SIPCommCheckBox("Add Details");
private JButton doneButton = new JButton("Done");
@ -42,41 +48,41 @@ class SSHContactInfo extends SIPCommDialog {
private JLabel password = new JLabel("Password: ");
private JTextField passwordField = new JPasswordField();
private JLabel port = new JLabel("Port: ");
private JFormattedTextField portField;
private JLabel secs = new JLabel("secs");
private JLabel statusUpdate = new JLabel("Update Interval: ");
private JLabel terminalType = new JLabel("Terminal Type: ");
private JTextField terminalTypeField = new JTextField("SIP Communicator");
private JSpinner updateTimer = new JSpinner();
private JPanel emptyPanel1 = new TransparentPanel();
private JPanel emptyPanel2 = new TransparentPanel();
private JPanel emptyPanel3 = new TransparentPanel();
private JPanel emptyPanel4 = new TransparentPanel();
private JPanel emptyPanel5 = new TransparentPanel();
private JPanel emptyPanel6 = new TransparentPanel();
private JPanel emptyPanel7 = new TransparentPanel();
private JPanel emptyPanel8 = new TransparentPanel();
private JPanel emptyPanel9 = new TransparentPanel();
private JPanel emptyPanel10 = new TransparentPanel();
private JPanel emptyPanel11 = new TransparentPanel();
// private ContactGroup contactGroup = null;
/**
* Creates a new instance of SSHContactInfo
*
*
* @param sshContact the concerned contact
*/
public SSHContactInfo(ContactSSH sshContact) {
@ -84,27 +90,27 @@ public SSHContactInfo(ContactSSH sshContact) {
this.sshContact = sshContact;
initForm();
this.getContentPane().add(mainPanel);
this.setSize(370, 325);
this.setResizable(false);
this.setTitle("SSH: Account Details of " + sshContact.getDisplayName());
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension screenSize = toolkit.getScreenSize();
int x = (screenSize.width - this.getWidth()) / 2;
int y = (screenSize.height - this.getHeight()) / 2;
this.setLocation(x,y);
// ProtocolProviderServiceSSHImpl.getUIService().getConfigurationWindow().
// addConfigurationForm(this);
}
/**
* initialize the form.
*/
@ -119,13 +125,13 @@ public void initForm() {
maskFormatter.setAllowsInvalid(false);
portField = new JFormattedTextField(maskFormatter);
portField.setValue(22);
userNameField.setEnabled(false);
passwordField.setEditable(false);
portField.setEnabled(false);
terminalTypeField.setEnabled(false);
updateTimer.setEnabled(false);
mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
machinePanel.setLayout(new BoxLayout(machinePanel, BoxLayout.X_AXIS));
detailNamesPanel.setLayout(new BoxLayout(detailNamesPanel,
@ -133,10 +139,10 @@ public void initForm() {
detailFieldsPanel.setLayout(new BoxLayout(detailFieldsPanel,
BoxLayout.Y_AXIS));
detailsPanel.setLayout(new BoxLayout(detailsPanel, BoxLayout.X_AXIS));
machinePanel.add(machineID);
machinePanel.add(machineIDField);
detailNamesPanel.add(userName);
detailNamesPanel.add(emptyPanel1);
detailNamesPanel.add(password);
@ -146,7 +152,7 @@ public void initForm() {
detailNamesPanel.add(statusUpdate);
detailNamesPanel.add(emptyPanel4);
detailNamesPanel.add(terminalType);
detailFieldsPanel.add(userNameField);
detailFieldsPanel.add(emptyPanel5);
detailFieldsPanel.add(passwordField);
@ -156,12 +162,12 @@ public void initForm() {
detailFieldsPanel.add(updateTimer);
detailFieldsPanel.add(emptyPanel8);
detailFieldsPanel.add(terminalTypeField);
detailsPanel.add(detailNamesPanel);
detailsPanel.add(detailFieldsPanel);
detailsPanel.setBorder(BorderFactory.createTitledBorder("Details"));
mainPanel.add(emptyPanel9);
mainPanel.add(machinePanel);
mainPanel.add(addDetailsCheckBox);
@ -169,7 +175,7 @@ public void initForm() {
mainPanel.add(emptyPanel10);
mainPanel.add(doneButton);
mainPanel.add(emptyPanel11);
addDetailsCheckBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
addDetailsCheckBox.setEnabled(false);
@ -178,18 +184,18 @@ public void actionPerformed(ActionEvent event) {
portField.setEnabled(true);
terminalTypeField.setEnabled(true);
updateTimer.setEnabled(true);
userNameField.grabFocus();
}
});
doneButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
if(machineIDField.getText().equals("")) {
machineIDField.setText("Field needed");
return;
}
sshContact.savePersistentDetails();
//add contact to contact list
@ -200,10 +206,10 @@ public void actionPerformed(ActionEvent event) {
sshContact);
setVisible(false);
}
}
});
}
/**
* Return the ssh icon
*
@ -223,7 +229,7 @@ public byte[] getIcon() {
// {
// return this.contactGroup;
// }
/**
* Sets the UserName of the dialog
*
@ -232,7 +238,7 @@ public byte[] getIcon() {
public void setUserNameField(String userName) {
this.userNameField.setText(userName);
}
/**
* Sets the Password of the dialog
*
@ -241,7 +247,7 @@ public void setUserNameField(String userName) {
public void setPasswordField(String password) {
this.passwordField.setText(password);
}
/**
* Return the hostname
*
@ -250,7 +256,7 @@ public void setPasswordField(String password) {
public String getHostName() {
return this.machineIDField.getText();
}
/**
* Return the username
*
@ -259,7 +265,7 @@ public String getHostName() {
public String getUserName() {
return this.userNameField.getText();
}
/**
* Return the password
*
@ -268,7 +274,7 @@ public String getUserName() {
public String getPassword() {
return this.passwordField.getText();
}
/**
* Return the terminal type
*
@ -277,7 +283,7 @@ public String getPassword() {
public String getTerminalType() {
return this.terminalTypeField.getText();
}
/**
* Return the port
*
@ -286,7 +292,7 @@ public String getTerminalType() {
public int getPort() {
return Integer.parseInt(this.portField.getText().trim());
}
/**
* Return the update interval
*
@ -295,7 +301,7 @@ public int getPort() {
public int getUpdateInterval() {
return Integer.parseInt(String.valueOf(this.updateTimer.getValue()));
}
/**
* Sets the HostName of the dialog
*
@ -304,7 +310,7 @@ public int getUpdateInterval() {
public void setHostNameField(String hostName) {
this.machineIDField.setText(hostName);
}
/**
* Sets the Terminal Type of the dialog
*
@ -313,7 +319,7 @@ public void setHostNameField(String hostName) {
public void setTerminalType(String termType) {
this.terminalTypeField.setText(termType);
}
/**
* Sets the Update Interval of the dialog
*
@ -322,7 +328,7 @@ public void setTerminalType(String termType) {
public void setUpdateInterval(int interval) {
this.updateTimer.setValue(interval);
}
/**
* Sets the Port of the dialog
*

@ -11,7 +11,7 @@
/**
* NetworkManager D-Bus Interface
*
*
* @author Damian Minkov
* @author Ingo Bauersachs
*/
@ -71,7 +71,7 @@ public StateChange(String path, UInt32 status)
/**
* The current status.
* @return
* @return the current status
*/
public int getStatus()
{
@ -80,7 +80,7 @@ public int getStatus()
/**
* Returns status description
* @return
* @return the status description
*/
public String getStatusName()
{
@ -114,7 +114,7 @@ public StateChanged(String path, UInt32 status)
/**
* Returns status description
* @return
* @return the status name
*/
@Override
public String getStatusName()

@ -1,6 +1,6 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
*
* Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.plugin.accountinfo;
@ -24,7 +24,7 @@
* The right side panel of AccountDetailsDialog. Shows one tab of a summary of
* contact information for the selected subcontact, and has an extended tab
* listing all of the details.
*
*
* @author Yana Stamcheva
* @author Adam Netocny
*/
@ -97,7 +97,7 @@ public class AccountDetailsPanel
/**
* Construct a panel containing all account details for the given protocol
* provider.
*
*
* @param protocolProvider the protocol provider service
*/
public AccountDetailsPanel(ProtocolProviderService protocolProvider)
@ -207,7 +207,7 @@ private void initSummaryPanel()
}
/**
* Loads details for
* Loads details for
*/
public void loadDetails()
{
@ -513,7 +513,7 @@ private class ChangeAvatarActionListener implements ActionListener
public void actionPerformed(ActionEvent e)
{
SipCommFileChooser chooser = GenericFileDialog.create(
null, "Change avatar...",
null, "Change avatar...",
SipCommFileChooser.LOAD_FILE_OPERATION,
lastAvatarDir.getAbsolutePath());
chooser.addFilter(new ImageFilter());
@ -589,7 +589,10 @@ public boolean accept(File f)
/**
* Get the extension of a file.
*/
*
* @param f the file
* @return the extension of the file
*/
public String getExtension(File f)
{
String ext = null;
@ -615,7 +618,7 @@ public String getDescription()
/**
* Returns a scaled <tt>Image</tt> instance of the given byte image.
*
*
* @param image the image in bytes
* @return a scaled <tt>Image</tt> instance of the given byte image.
*/
@ -645,7 +648,7 @@ private Image getScaledImageInstance(byte[] image)
/**
* Returns <code>true</code> if the account details are loaded,
* <code>false</code> - otherwise.
*
*
* @return <code>true</code> if the account details are loaded,
* <code>false</code> - otherwise
*/

@ -16,7 +16,7 @@
/**
* Starts the account info bundle.
*
*
* @author Adam Glodstein
*/
public class AccountInfoActivator
@ -25,6 +25,9 @@ public class AccountInfoActivator
private static final Logger logger =
Logger.getLogger(AccountInfoActivator.class);
/**
* The OSGi bundle context.
*/
public static BundleContext bundleContext;
private static BrowserLauncherService browserLauncherService;
@ -46,7 +49,7 @@ public void stop(BundleContext bc) throws Exception
/**
* Returns all <tt>ProtocolProviderFactory</tt>s obtained from the bundle
* context.
*
*
* @return all <tt>ProtocolProviderFactory</tt>s obtained from the bundle
* context
*/
@ -83,6 +86,11 @@ public static Map<Object, ProtocolProviderFactory> getProtocolProviderFactories(
return providerFactoriesMap;
}
/**
* Returns the <tt>BrowserLauncherService</tt> currently registered.
*
* @return the <tt>BrowserLauncherService</tt>
*/
public static BrowserLauncherService getBrowserLauncher()
{
if (browserLauncherService == null)

@ -1,6 +1,6 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
*
* Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.plugin.accountinfo;
@ -19,12 +19,17 @@
/**
* A GUI plug-in for SIP Communicator that will allow users to set cross
* protocol account information.
*
*
* @author Adam Goldstein
*/
public class AccountInfoPanel
extends TransparentPanel
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The right side of the AccountInfo frame that contains protocol specific
* account details.

@ -1,6 +1,6 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
*
* Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.plugin.addrbook;
@ -23,6 +23,11 @@
public class AdvancedConfigForm
extends TransparentPanel
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* Creates the form.
*/

@ -19,6 +19,9 @@
public class MacOSXAddrBookContactSourceService
extends AsyncContactSourceService
{
/**
* the Mac OS X address book prefix.
*/
public static final String MACOSX_ADDR_BOOK_PREFIX
= "net.java.sip.communicator.plugin.addrbook.MACOSX_ADDR_BOOK_PREFIX";

@ -21,6 +21,9 @@
public class MsOutlookAddrBookContactSourceService
extends AsyncContactSourceService
{
/**
* The outlook address book prefix.
*/
public static final String OUTLOOK_ADDR_BOOK_PREFIX
= "net.java.sip.communicator.plugin.addrbook.OUTLOOK_ADDR_BOOK_PREFIX";

@ -15,6 +15,11 @@
public class MsOutlookMAPIHResultException
extends Exception
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The <tt>HRESULT</tt> which is represented by this <tt>Exception</tt>.
*/

@ -20,19 +20,22 @@
*
* @author Yana Stamcheva
*/
public class AimAccRegWizzActivator implements BundleActivator {
public class AimAccRegWizzActivator implements BundleActivator
{
/**
* The OSGi bundle context.
*/
public static BundleContext bundleContext;
private static Logger logger = Logger.getLogger(
AimAccRegWizzActivator.class);
private static BrowserLauncherService browserLauncherService;
private static UIService uiService;
private static AimAccountRegistrationWizard aimWizard;
/**
* Starts this bundle.
*/
@ -88,7 +91,7 @@ public static ProtocolProviderFactory getAimProtocolProviderFactory() {
return (ProtocolProviderFactory) bundleContext.getService(serRefs[0]);
}
/**
* Returns the <tt>BrowserLauncherService</tt> obtained from the bundle
* context.
@ -106,10 +109,10 @@ public static BrowserLauncherService getBrowserLauncher() {
return browserLauncherService;
}
/**
* Returns the <tt>UIService</tt>.
*
*
* @return the <tt>UIService</tt>
*/
public static UIService getUIService()

@ -27,6 +27,11 @@ public class FirstWizardPage
DocumentListener,
ActionListener
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The first page identifier.
*/

@ -11,7 +11,7 @@
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
*
*
* @author Yana Stamcheva
*/
public class Resources
@ -27,7 +27,7 @@ public class Resources
/**
* A constant pointing to the Aim protocol wizard page image.
*/
public static ImageID PAGE_IMAGE
public static ImageID PAGE_IMAGE
= new ImageID("service.protocol.aim.AIM_64x64");
/**
@ -50,6 +50,11 @@ public static byte[] getImage(ImageID imageID)
return getResources().getImageInBytes(imageID.getId());
}
/**
* Returns the <tt>ResourceManagementService</tt>.
*
* @return the <tt>ResourceManagementService</tt>.
*/
public static ResourceManagementService getResources()
{
if (resourcesService == null)

@ -39,6 +39,10 @@ public class AboutWindow
ExportedWindow,
Skinnable
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The global/shared <code>AboutWindow</code> currently showing.
@ -252,6 +256,11 @@ private static class WindowBackground
extends JPanel
implements Skinnable
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
private static final Logger logger
= Logger.getLogger(WindowBackground.class);
@ -403,6 +412,11 @@ public void setParams(Object[] windowParams) {}
*/
private class CloseAction extends UIAction
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
public void actionPerformed(ActionEvent e)
{
setVisible(false);

@ -33,6 +33,11 @@ public static void actionPerformed()
private JMenuItem aboutMenuItem;
/**
* Constructor.
*
* @param container parent container
*/
public AboutWindowPluginComponent(Container container)
{
super(container);

@ -16,6 +16,9 @@
import org.osgi.framework.*;
/**
* Branding bundle activator.
*/
public class BrandingActivator
implements BundleActivator
{
@ -30,7 +33,7 @@ public class BrandingActivator
= "net.java.sip.communicator.plugin.branding.SHOW_SPLASH_SCREEN";
private static BundleContext bundleContext;
private static ResourceManagementService resourcesService;
public void start(BundleContext bc) throws Exception
@ -254,6 +257,11 @@ private static ConfigurationService getConfigurationService()
: (ConfigurationService) bundleContext.getService(serRef);
}
/**
* Returns the <tt>ResourceManagementService</tt>.
*
* @return the <tt>ResourceManagementService</tt>.
*/
public static ResourceManagementService getResources()
{
if (resourcesService == null)

@ -26,6 +26,11 @@
public class JitsiWarningWindow
extends SIPCommDialog
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* Creates an <tt>JitsiWarningWindow</tt> by specifying the parent frame
* owner.
@ -133,6 +138,11 @@ public void actionPerformed(ActionEvent e)
*/
private class CloseAction extends UIAction
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
public void actionPerformed(ActionEvent e)
{
setVisible(false);

@ -21,11 +21,16 @@
* The <tt>WelcomeWindow</tt> is actually the splash screen shown while the
* application is loading. It displays the status of the loading process and
* some general information about the version, licenses and contact details.
*
*
* @author Yana Stamcheva
*/
public class WelcomeWindow extends JDialog
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
private static final String APPLICATION_NAME
= BrandingActivator.getResources()
.getSettingsString("service.gui.APPLICATION_NAME");
@ -40,6 +45,9 @@ public class WelcomeWindow extends JDialog
private final JLabel bundleLabel = new JLabel();
/**
* Constructor.
*/
public WelcomeWindow()
{
JLabel titleLabel = new JLabel(APPLICATION_NAME);
@ -109,7 +117,7 @@ public WelcomeWindow()
/**
* Initializes the title label.
*
*
* @param titleLabel the title label
*/
private void initTitleLabel(JLabel titleLabel)
@ -122,7 +130,7 @@ private void initTitleLabel(JLabel titleLabel)
/**
* Initializes the version label.
*
*
* @param versionLabel the version label
*/
private void initVersionLabel(JLabel versionLabel)
@ -135,7 +143,7 @@ private void initVersionLabel(JLabel versionLabel)
/**
* Initializes the logo area.
*
*
* @param logoArea the logo area
*/
private void initLogoArea(JTextArea logoArea)
@ -158,7 +166,7 @@ private void initLogoArea(JTextArea logoArea)
/**
* Initializes the copyright area.
*
*
* @param rightsArea the copyright area.
*/
private void initRightsArea(StyledHTMLEditorPane rightsArea)
@ -185,7 +193,7 @@ private void initRightsArea(StyledHTMLEditorPane rightsArea)
/**
* Initializes the license area.
*
*
* @param licenseArea the license area.
*/
private void initLicenseArea(StyledHTMLEditorPane licenseArea)
@ -277,7 +285,7 @@ protected void close()
/**
* Sets the name of the currently loading bundle.
*
*
* @param bundleName the name of the bundle to display
*/
public void setBundle(String bundleName)
@ -293,6 +301,11 @@ public void setBundle(String bundleName)
*/
private class CloseAction extends UIAction
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
public void actionPerformed(ActionEvent e)
{
WelcomeWindow.this.close();
@ -305,6 +318,11 @@ public void actionPerformed(ActionEvent e)
private static class WindowBackground
extends JPanel
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
private BufferedImage cache;
private int cacheHeight;

@ -26,7 +26,7 @@
/**
* Dialog window to add/edit client certificate configuration entries.
*
*
* @author Ingo Bauersachs
*/
public class CertConfigEntryDialog
@ -62,6 +62,11 @@ public class CertConfigEntryDialog
// ------------------------------------------------------------------------
// Initialization
// ------------------------------------------------------------------------
/**
* Constructor.
*
* @param e the <tt>CertificateConfigEntry</tt>
*/
public CertConfigEntryDialog(CertificateConfigEntry e)
{
super(false);
@ -373,7 +378,7 @@ public boolean accept(File f)
* Open the keystore selected by the user. If the type is set as PKCS#11,
* the file is loaded as a provider. If the store is protected by a
* password, the user is being asked by an authentication dialog.
*
*
* @return The loaded keystore
* @throws KeyStoreException when something goes wrong
*/
@ -508,6 +513,11 @@ private void showGenericError(String msg, Throwable e)
);
}
/**
* Show this dialog.
*
* @return true if OK has been pressed, false otherwise
*/
public boolean showDialog()
{
setModal(true);

@ -17,7 +17,7 @@
/**
* Backing data model for a JTable that displays the client certificate
* configuration entries.
*
*
* @author Ingo Bauersachs
*/
public class CertConfigTableModel
@ -29,6 +29,9 @@ public class CertConfigTableModel
private List<CertificateConfigEntry> model;
private ResourceManagementService R = CertConfigActivator.R;
/**
* Constructor.
*/
public CertConfigTableModel()
{
CertConfigActivator.getConfigService().addPropertyChangeListener(this);
@ -60,6 +63,12 @@ public Object getValueAt(int rowIndex, int columnIndex)
return null;
}
/**
* Get <tt>CertificateConfigEntry</tt> located at <tt>rowIndex</tt>.
*
* @param rowIndex row index
* @return <tt>CertificateConfigEntry</tt>
*/
public CertificateConfigEntry getItem(int rowIndex)
{
return model.get(rowIndex);

@ -1,6 +1,6 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
*
* Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.plugin.chatconfig;
@ -13,12 +13,17 @@
/**
* The chat configuration panel.
*
*
* @author Purvesh Sahoo
*/
public class ChatConfigPanel
extends TransparentPanel
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* Creates the <tt>ChatConfigPanel</tt>.
*/

@ -1,6 +1,6 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
*
* Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.plugin.chatconfig.replacement;
@ -23,12 +23,17 @@
/**
* The <tt>ConfigurationForm</tt> that would be added in the chat configuration
* window.
*
*
* @author Purvesh Sahoo
*/
public class ReplacementConfigPanel
extends TransparentPanel
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* Checkbox to enable/disable smiley replacement.
*/
@ -62,7 +67,7 @@ public ReplacementConfigPanel()
/**
* Init the main panel.
*
*
* @return the created component
*/
private Component createMainPanel()
@ -114,7 +119,7 @@ public void actionPerformed(ActionEvent e)
table.setOpaque(true);
table.setBackground(Color.white);
JScrollPane tablePane = new JScrollPane(table);
tablePane.setOpaque(false);
tablePane.setPreferredSize(new Dimension(mainPanel.getWidth(), 150));
@ -138,7 +143,7 @@ public void actionPerformed(ActionEvent e)
/*
* list of the source names. Removing 'Smiley' as it shouldn't show up in
* the table.
* the table.
*/
Set<String> keys = ChatConfigActivator.getReplacementSources().keySet();
ArrayList<String> sourceList = new ArrayList<String>(keys);
@ -229,6 +234,11 @@ private void saveData()
private static class FixedTableCellRenderer
extends DefaultTableCellRenderer
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
public Component getTableCellRendererComponent(JTable table, Object value,
boolean selected, boolean focused, int row, int column)
{

@ -1,6 +1,6 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
*
* Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.plugin.chatconfig.replacement;
@ -16,12 +16,17 @@
/**
* Table model for the table in <tt>ReplacementConfigPanel</tt> listing all
* available replacement sources
*
*
* @author Purvesh Sahoo
*/
public class ReplacementConfigurationTableModel
extends AbstractTableModel
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The source list of all the available replacement sources
*/
@ -73,7 +78,7 @@ public int getRowCount()
/**
* @param rowIndex the row index.
* @param columnIndex the column index
*
*
* @return the value specified rowIndex and columnIndex. boolean in case of
* the first column, String replacement source label in case of the
* second column; null otherwise
@ -83,7 +88,7 @@ public Object getValueAt(int rowIndex, int columnIndex)
String sourceName = sourceList.get(rowIndex);
ReplacementService source =
ChatConfigActivator.getReplacementSources().get(sourceName);
switch (columnIndex)
{
case 0:
@ -102,7 +107,7 @@ public Object getValueAt(int rowIndex, int columnIndex)
/**
* @param rowIndex the row index
* @param columnIndex the column index
*
*
* @return boolean; true for first column false otherwise
*/
public boolean isCellEditable(int rowIndex, int columnIndex)
@ -114,7 +119,7 @@ public boolean isCellEditable(int rowIndex, int columnIndex)
* Set the value at rowIndex and columnIndex. Sets the replacement source
* property enabled/disabled based on whether the first column is true or
* false.
*
*
* @param value The object to set at rowIndex and columnIndex
* @param rowIndex
* @param columnIndex
@ -126,7 +131,7 @@ public void setValueAt(Object value, int rowIndex, int columnIndex)
String sourceName = sourceList.get(rowIndex);
ReplacementService source =
ChatConfigActivator.getReplacementSources().get(sourceName);
boolean e = (Boolean) value;
configService.setProperty(ReplacementProperty
.getPropertyName(source.getSourceName()), e);

@ -1,6 +1,6 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
*
* Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.plugin.contactinfo;
@ -18,13 +18,18 @@
* The left side panel of ContactInfoDialog. Display all associated subcontacts
* and their respective protocols in a JList. If a user is selected, the
* ContactInfoDetailsPanel will be updated to the current contact.
*
*
* @author Adam Goldstein
* @author Yana Stamcheva
*/
public class ContactInfoContactPanel
extends TransparentPanel
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The list of all subcontacts related to the selected contact.
*/
@ -49,7 +54,7 @@ public class ContactInfoContactPanel
* contact that was originally selected. Whenever a sub-contact is picked,
* notifies the protocolPanel of the change and it will update the displayed
* details.
*
*
* @param contacts the list of contacts
* @param dialog the contact info dialog
*/
@ -111,6 +116,11 @@ public void valueChanged(ListSelectionEvent e)
private static class ContactPanelCellRenderer
extends DefaultListCellRenderer
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
private boolean isSelected;
private Color blueGreyBorderColor = new Color(131, 149, 178);
@ -125,7 +135,7 @@ public ContactPanelCellRenderer()
/**
* Renders a <tt>Contact</tt> object in a JList, by visualizing
* the contact name and the protocol icon.
*
*
* @param list the rendered JList
* @param value the object to be rendered
* @param index the index of the object in the list

@ -1,6 +1,6 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
*
* Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.plugin.contactinfo;
@ -26,13 +26,18 @@
* The right side panel of ContactInfoDialog. Shows one tab of a summary of
* contact information for the selected subcontact, and has an extended tab
* listing all of the details.
*
*
* @author Adam Goldstein
* @author Yana Stamcheva
*/
public class ContactInfoDetailsPanel
extends TransparentPanel
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The tabbed pane containing the two different tabs for details.
*/
@ -73,7 +78,7 @@ public ContactInfoDetailsPanel()
/**
* Retrieve and display the information for the newly selected contact, c.
*
*
* @param c the sub-contact we are now focusing on.
*/
public void loadContactDetails(Contact c)
@ -137,7 +142,7 @@ public void loadContactDetails(Contact c)
/**
* Creates the panel that indicates to the user that the currently selected
* contact does not support server stored contact info.
*
*
* @return the panel that is added and shows a message that the selected
* sub-contact does not have the operation set for server stored
* contact info supported.
@ -165,7 +170,7 @@ private JPanel createUnsupportedPanel()
* LastNameDetail - BirthdateDetail (and calculate age) - GenderDetail -
* EmailAddressDetail - PhoneNumberDetail. All other details will be* added
* to our list of extended details.
*
*
* @return the panel that will be added as the summary tab.
*/
private JPanel createSummaryInfoPanel()
@ -395,7 +400,7 @@ private JPanel createSummaryInfoPanel()
/**
* A panel that displays all of the details retrieved from the opSet.
*
*
* @return a panel that will be added as the extended tab.
*/
private JPanel createExtendedInfoPanel()
@ -569,6 +574,11 @@ private class HTMLTextPane
extends JTextPane
implements HyperlinkListener
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The regular expression (in the form of compiled <tt>Pattern</tt>)
* which matches URLs for the purposed of turning them into links.
@ -577,10 +587,10 @@ private class HTMLTextPane
+ "(\\bwww\\.[^\\s<>\"]+\\.[^\\s<>\"]+/*[?#]*(\\w+[&=;?]\\w+)*\\b)" // wwwURL
+ "|" + "(\\b\\w+://[^\\s<>\"]+/*[?#]*(\\w+[&=;?]\\w+)*\\b)" // protocolURL
+ ")");
private SIPCommHTMLEditorKit editorKit;
private HTMLDocument document;
/**
* Creates and instance of <tt>HTMLTextPane</tt>
*/
@ -589,19 +599,19 @@ public HTMLTextPane()
editorKit = new SIPCommHTMLEditorKit(this);
this.document = (HTMLDocument) editorKit.createDefaultDocument();
this.addHyperlinkListener(this);
this.setContentType("text/html");
this.setEditorKitForContentType("text/html", editorKit);
this.setEditorKit(editorKit);
this.setDocument(document);
putClientProperty(
JTextPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);
}
/**
* Override of parent <tt>setText(String)</tt> to search for URLs and
* set as hyperlinks.
@ -610,7 +620,7 @@ public HTMLTextPane()
@Override
public void setText(String string)
{
Matcher m = URL_PATTERN.matcher(string);
StringBuffer msgBuffer = new StringBuffer();
int prevEnd = 0;
@ -632,15 +642,15 @@ public void setText(String string)
msgBuffer.append(url);
msgBuffer.append("</A>");
}
String fromPrevEndToEnd = string.substring(prevEnd);
msgBuffer.append(fromPrevEndToEnd);
super.setText(msgBuffer.toString());
}
/**
* Handles activations of hyperlinks
* @param e <tt>HyperlinkEvent</tt> to handle.

@ -16,13 +16,18 @@
/**
* A GUI plug-in for SIP Communicator that will allow cross protocol contact
* information viewing and editing.
*
*
* @author Adam Goldstein
* @author Yana Stamcheva
*/
public class ContactInfoDialog
extends SIPCommFrame
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The right side of this frame that contains protocol specific contact
* details.
@ -71,7 +76,7 @@ public ContactInfoDialog(MetaContact metaContact)
/**
* Loads the details of the given contact.
*
*
* @param contact the <tt>Contact</tt>, which details we load
*/
public void loadContactDetails(Contact contact)

@ -18,7 +18,7 @@
/**
* The <tt>Resources</tt> class manages the access to the internationalization
* properties files and the image resources used in this plugin.
*
*
* @author Yana Stamcheva
*/
public class Resources {
@ -46,12 +46,12 @@ public static Image getImage(String imageID)
{
BufferedImage image = null;
InputStream in =
InputStream in =
getResources().getImageInputStream(imageID);
if(in == null)
return null;
try
{
image = ImageIO.read(in);
@ -63,7 +63,12 @@ public static Image getImage(String imageID)
return image;
}
/**
* Returns the <tt>ResourceManagementService</tt>.
*
* @return the <tt>ResourceManagementService</tt>.
*/
public static ResourceManagementService getResources()
{
if (resourcesService == null)

@ -1,6 +1,6 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
*
* Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.plugin.contactsourceconfig;
@ -21,13 +21,7 @@ public class ContactSourceConfigActivator
implements BundleActivator
{
/**
* The logger.
*/
private static Logger logger
= Logger.getLogger(ContactSourceConfigActivator.class);
/**
* The {@link BundleContext} of the {@link SecurityConfigActivator}.
* The {@link BundleContext} of the {@link ContactSourceConfigActivator}.
*/
public static BundleContext bundleContext;

@ -1,6 +1,6 @@
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
*
* Distributable under LGPL license. See terms of license at gnu.org.
*/
package net.java.sip.communicator.plugin.contactsourceconfig;
@ -16,13 +16,18 @@
import net.java.sip.communicator.util.swing.*;
/**
*
*
* @author Yana Stamcheva
*/
public class ContactSourceConfigForm
extends TransparentPanel
implements ServiceListener
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The drop down list of contact sources.
*/
@ -166,6 +171,11 @@ private void addConfigForm(ConfigurationForm form)
*/
private class ContactSourceRenderer extends DefaultListCellRenderer
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
public Component getListCellRendererComponent(
JList list, Object value, int index,
boolean isSelected, boolean hasFocus)

@ -34,6 +34,9 @@ public class DefaultLanguagePackImpl
*/
private Vector<Locale> availableLocales = new Vector<Locale>();
/**
* Constructor.
*/
public DefaultLanguagePackImpl()
{
// Finds all the files *.properties in the path : /resources/languages.

@ -49,7 +49,6 @@ public CallPeerRecord( String peerAddress,
Date endTime)
{
this.peerAddress = peerAddress;
this.displayName = displayName;
this.startTime = startTime;
this.endTime = endTime;
}

@ -8,12 +8,15 @@
import java.security.cert.*;
/**
* Interface to verify X.509 certificate
*/
public interface CertificateMatcher
{
/**
* Implementations check whether one of the supplied identities is
* contained in the certificate.
*
*
* @param identitiesToTest The that are compared against the certificate.
* @param cert The X.509 certificate that was supplied by the server or
* client.

@ -89,32 +89,32 @@ public interface CertificateService
// Client authentication configuration
// ------------------------------------------------------------------------
/**
* Returns all saved {@see CertificateConfigEntry}s.
*
* Returns all saved {@link CertificateConfigEntry}s.
*
* @return List of the saved authentication configurations.
*/
public List<CertificateConfigEntry> getClientAuthCertificateConfigs();
/**
* Deletes a saved {@see CertificateConfigEntry}.
*
* @param id The ID ({@see CertificateConfigEntry#getId()}) of the entry to
* Deletes a saved {@link CertificateConfigEntry}.
*
* @param id The ID ({@link CertificateConfigEntry#getId()}) of the entry to
* delete.
*/
public void removeClientAuthCertificateConfig(String id);
/**
* Saves or updates the passed @see CertificateConfigEntry to the config.
* If {@see CertificateConfigEntry#getId()} returns null, a new entry is
* Saves or updates the passed {@link CertificateConfigEntry} to the config.
* If {@link CertificateConfigEntry#getId()} returns null, a new entry is
* created.
*
*
* @param entry The @see CertificateConfigEntry to save or update.
*/
public void setClientAuthCertificateConfig(CertificateConfigEntry entry);
/**
* Gets a list of all supported KeyStore types.
*
*
* @return a list of all supported KeyStore types.
*/
public List<KeyStoreType> getSupportedKeyStoreTypes();
@ -125,10 +125,10 @@ public interface CertificateService
/**
* Get an SSL Context that validates certificates based on the JRE default
* check and asks the user when the JRE check fails.
*
*
* CAUTION: Only the certificate itself is validated, no check is performed
* whether it is valid for a specific server or client.
*
*
* @return An SSL context based on a user confirming trust manager.
* @throws GeneralSecurityException
*/
@ -136,7 +136,7 @@ public interface CertificateService
/**
* Get an SSL Context with the specified trustmanager.
*
*
* @param trustManager The trustmanager that will be used by the created
* SSLContext
* @return An SSL context based on the supplied trust manager.
@ -147,7 +147,7 @@ public SSLContext getSSLContext(X509TrustManager trustManager)
/**
* Get an SSL Context with the specified trustmanager.
*
*
* @param clientCertConfig The ID of a client certificate configuration
* entry that is to be used when the server asks for a client TLS
* certificate
@ -162,7 +162,7 @@ public SSLContext getSSLContext(String clientCertConfig,
/**
* Get an SSL Context with the specified trustmanager.
*
*
* @param keyManagers The key manager(s) to be used for client
* authentication
* @param trustManager The trustmanager that will be used by the created
@ -181,7 +181,7 @@ public SSLContext getSSLContext(KeyManager[] keyManagers,
* performed whether the certificate is valid for a specific server or
* client. The passed identities are checked by applying a behavior similar
* to the on regular browsers use.
*
*
* @param identitiesToTest when not <tt>null</tt>, the values are assumed
* to be hostnames for invocations of checkServerTrusted and
* e-mail addresses for invocations of checkClientTrusted
@ -193,7 +193,7 @@ public X509TrustManager getTrustManager(Iterable<String> identitiesToTest)
/**
* @see #getTrustManager(Iterable)
*
*
* @param identityToTest when not <tt>null</tt>, the value is assumed to
* be a hostname for invocations of checkServerTrusted and an
* e-mail address for invocations of checkClientTrusted
@ -205,7 +205,7 @@ public X509TrustManager getTrustManager(String identityToTest)
/**
* @see #getTrustManager(Iterable, CertificateMatcher, CertificateMatcher)
*
*
* @param identityToTest The identity to match against the supplied
* verifiers.
* @param clientVerifier The verifier to use in calls to checkClientTrusted
@ -225,7 +225,7 @@ public X509TrustManager getTrustManager(
* <tt>null</tt> is passed as the <tt>identityToTest</tt> then no check is
* performed whether the certificate is valid for a specific server or
* client.
*
*
* @param identitiesToTest The identities to match against the supplied
* verifiers.
* @param clientVerifier The verifier to use in calls to checkClientTrusted
@ -241,8 +241,9 @@ public X509TrustManager getTrustManager(
/**
* Adds a certificate to the local trust store.
*
*
* @param cert The certificate to add to the trust store.
* @param trustFor
* @param trustMode Whether to trust the certificate permanently or only
* for the current session.
* @throws CertificateException when the thumbprint could not be calculated

@ -18,9 +18,13 @@
public class FileRecord
{
/**
* Possible directions of the transfer
* Direction of the transfer: out
*/
public final static String OUT = "out";
/**
* Direction of the transfer: in
*/
public final static String IN = "in";
/**
@ -57,6 +61,8 @@ public class FileRecord
/**
* Constructs new FileRecord
*
* @param id
* @param contact
* @param direction
* @param date
* @param file

@ -17,10 +17,19 @@ public class WindowID{
private String dialogName;
/**
* Creates a new WindowID.
* @param dialogName the name of the dialog
*/
public WindowID(String dialogName){
this.dialogName = dialogName;
}
/**
* Get the ID.
*
* @return the ID
*/
public String getID(){
return this.dialogName;
}

@ -706,7 +706,7 @@ public Credentials getCredentials(AuthScope authscope)
else
{
// we have saved values lets return them
authUsername =
authUsername =
HttpUtilActivator.getConfigurationService().getString(
usernamePropertyName);
authPassword = pass;
@ -941,6 +941,8 @@ public String getContentString()
/**
* Get the credentials used by the request.
*
* @return the credentials (login at index 0 and password at index 1)
*/
public String[] getCredentials()
{
@ -950,10 +952,10 @@ public String[] getCredentials()
{
HTTPCredentialsProvider prov = (HTTPCredentialsProvider)
httpClient.getCredentialsProvider();
cred[0] = prov.getAuthenticationUsername();
cred[1] = prov.getAuthenticationPassword();
cred[0] = prov.getAuthenticationUsername();
cred[1] = prov.getAuthenticationPassword();
}
return cred;
}
}

@ -42,7 +42,14 @@ public abstract class KeybindingSet
*/
public enum Category
{
/**
* The "chat" category.
*/
CHAT("keybindings-chat", Persistence.SERIAL_HASH),
/**
* The "main" category.
*/
MAIN("keybindings-main", Persistence.SERIAL_HASH);
private final String resource;

@ -258,7 +258,7 @@ public interface LdapDirectorySettings
* Sets the global prefix to be used when calling phones from this ldap
* source.
*
* @param the global prefix to be used when calling phones from this ldap
* @param prefix the global prefix to be used when calling phones from this ldap
* source
*/
public void setGlobalPhonePrefix(String prefix);

@ -30,6 +30,13 @@ public class ProgressEvent
*/
private int progress = 0;
/**
* Constructor.
*
* @param source source <tt>Object</tt>
* @param evt the event
* @param progress initial progress
*/
public ProgressEvent(
Object source,
net.java.sip.communicator.service.history.event.ProgressEvent evt,

@ -7,9 +7,6 @@
package net.java.sip.communicator.service.neomedia;
import net.sf.fmj.media.rtp.*;
import java.util.*;
import javax.media.rtp.*;
import javax.media.rtp.rtcp.*;
/**
* Class used to compute stats concerning a MediaStream.

@ -9,12 +9,19 @@
/**
* Utility class to combine <tt>MediaType</tt> and <tt>SrtpControlType</tt> as a
* map key.
*
*
* @author Ingo Bauersachs
*/
public class MediaTypeSrtpControl implements Comparable<MediaTypeSrtpControl>
{
/**
* The media type.
*/
public final MediaType mediaType;
/**
* The SRTP control type.
*/
public final SrtpControlType srtpControlType;
/**
@ -49,7 +56,7 @@ public int compareTo(MediaTypeSrtpControl o)
{
return getWeight() == o.getWeight() ?
0 :
getWeight() < o.getWeight() ?
getWeight() < o.getWeight() ?
-1 : 1;
}

@ -12,12 +12,17 @@
/**
* Represents the event fired when playback volume value has changed.
*
*
* @author Damian Minkov
*/
public class VolumeChangeEvent
extends EventObject
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The volume level.
*/

@ -23,12 +23,12 @@ public interface NotificationService
/**
* Registers a notification for the given <tt>eventType</tt> by specifying
* the action to be performed when a notification is fired for this event.
*
*
* Unlike the other <tt>registerNotificationForEvent</tt>
* method, this one allows the user to specify its own
* <tt>NotificationAction</tt>, which would be used to handle notifications
* for the specified <tt>actionType</tt>.
*
*
* @param eventType the name of the event (as defined by the plug-in that's
* registering it) that we are setting an action for.
* @param action the <tt>NotificationAction</tt>, which would be
@ -41,15 +41,15 @@ public void registerNotificationForEvent(String eventType,
* Registers a default notification for the given <tt>eventType</tt> by
* specifying the action to be performed when a notification is fired for
* this event.
*
*
* Unlike the other <tt>registerDefaultNotificationForEvent</tt> method,
* this one allows the user to specify its own <tt>NotificationAction</tt>,
* which would be used to handle notifications.
*
*
* Default events are stored or executed at first run or when they are
* missing in the configuration. Also the registered default events are used
* when restoreDefaults is called.
*
*
* @param eventType the name of the event (as defined by the plug-in that's
* registering it) that we are setting an action for.
* @param handler the <tt>NotificationActionHandler</tt>, which would be
@ -63,7 +63,7 @@ public void registerDefaultNotificationForEvent(String eventType,
* specifying the type of the action to be performed when a notification is
* fired for this event, the <tt>actionDescriptor</tt> for sound and command
* actions and the <tt>defaultMessage</tt> for popup and log actions.
*
*
* Actions registered by this method would be handled by some default
* <tt>NotificationHandler</tt>s, declared by the implementation.
* <p>
@ -71,11 +71,11 @@ public void registerDefaultNotificationForEvent(String eventType,
* event. Setting the same <tt>actionType</tt> for the same
* <tt>eventType</tt> twice however would cause the first setting to be
* overridden.
*
*
* Default events are stored or executed at first run or when
* they are missing in the configuration. Also the registered default events
* are used when restoreDefaults is called.
*
*
* @param eventType the name of the event (as defined by the plug-in that's
* registering it) that we are setting an action for.
* @param actionType the type of the action that is to be executed when the
@ -105,7 +105,7 @@ public void registerDefaultNotificationForEvent(String eventType,
* event. Setting the same <tt>actionType</tt> for the same
* <tt>eventType</tt> twice however would cause the first setting to be
* overridden.
*
*
* @param eventType the name of the event (as defined by the plug-in that's
* registering it) that we are setting an action for.
* @param actionType the type of the action that is to be executed when the
@ -124,7 +124,7 @@ public void registerNotificationForEvent( String eventType,
String defaultMessage);
/**
* Deletes all registered events and actions
* Deletes all registered events and actions
* and registers and saves the default events as current.
*/
public void restoreDefaults();
@ -136,7 +136,7 @@ public void registerNotificationForEvent( String eventType,
* <p>
* This method does nothing if the given <tt>eventType</tt> is not contained
* in the list of registered event types.
*
*
* @param eventType the name of the event (as defined by the plugin that's
* registering it) to be removed.
*/
@ -148,7 +148,7 @@ public void registerNotificationForEvent( String eventType,
* <p>
* This method does nothing if the given <tt>eventType</tt> or
* <tt>actionType</tt> are not contained in the list of registered types.
*
*
* @param eventType the name of the event (as defined by the plugin that's
* registering it) for which we'll remove the notification.
* @param actionType the type of the action that is to be executed when the
@ -163,7 +163,7 @@ public void removeEventNotificationAction( String eventType,
* notification service. Each line in the returned list consists of a
* String, representing the name of the event (as defined by the plugin that
* registered it).
*
*
* @return an iterator over a list of all events registered in this
* notifications service
*/
@ -175,7 +175,7 @@ public void removeEventNotificationAction( String eventType,
* <p>
* This method returns <b>null</b> if the given <tt>eventType</tt> or
* <tt>actionType</tt> are not contained in the list of registered types.
*
*
* @param eventType the type of the event that we'd like to retrieve.
* @param actionType the type of the action that we'd like to retrieve a
* descriptor for.
@ -219,9 +219,10 @@ public void removeNotificationChangeListener(
/**
* Gets at list of handler for the specified action type.
*
*
* @param actionType the type for which the list of handlers should be
* retrieved or <tt>null</tt> if all handlers shall be returned.
* @return Iterable of NotificationHandler objects
*/
public Iterable<NotificationHandler> getActionHandlers(String actionType);
@ -232,7 +233,7 @@ public void removeNotificationChangeListener(
* <p>
* This method does nothing if the given <tt>eventType</tt> is not contained
* in the list of registered event types.
*
*
* @param eventType the type of the event that we'd like to fire a
* notification for.
* @param messageTitle the message title to use if and where appropriate
@ -259,10 +260,10 @@ public NotificationData fireNotification( String eventType,
* <p>
* This method does nothing if the given <tt>eventType</tt> is not contained
* in the list of registered event types.
*
*
* @param eventType the type of the event that we'd like to fire a
* notification for.
*
*
* @return An object referencing the notification. It may be used to stop a
* still running notification. Can be null if the eventType is
* unknown or the notification is not active.
@ -273,19 +274,19 @@ public NotificationData fireNotification( String eventType,
* Activates or deactivates all notification actions related to the
* specified <tt>eventType</tt>. This method does nothing if the given
* <tt>eventType</tt> is not contained in the list of registered event types.
*
*
* @param eventType the name of the event, which actions should be activated
* /deactivated.
* /deactivated.
* @param isActive indicates whether to activate or deactivate the actions
* related to the specified <tt>eventType</tt>.
*/
public void setActive(String eventType, boolean isActive);
/**
* Indicates whether or not actions for the specified <tt>eventType</tt>
* are activated. This method returns <code>false</code> if the given
* <tt>eventType</tt> is not contained in the list of registered event types.
*
*
* @param eventType the name of the event (as defined by the plugin that's
* registered it) that we are checking.
* @return <code>true</code> if actions for the specified <tt>eventType</tt>

@ -21,9 +21,24 @@ public interface PacketLoggingService
*/
public enum ProtocolName
{
/**
* SIP protocol name.
*/
SIP,
/**
* Jabber protocol name.
*/
JABBER,
/**
* RTP protocol name.
*/
RTP,
/**
* ICE protocol name.
*/
ICE4J
}
@ -32,7 +47,14 @@ public enum ProtocolName
*/
public enum TransportName
{
/**
* UDP transport name.
*/
UDP,
/**
* TCP transport name.
*/
TCP
}
@ -85,7 +107,7 @@ public void logPacket(
* @param sender are we the sender of the packet or not.
* @param packetContent the packet content.
* @param packetOffset the packet content offset.
* @param packetLength the packet content length.
* @param packetLength the packet content length.
*/
public void logPacket(
ProtocolName protocol,

@ -69,6 +69,7 @@ public void removeServerStoredDetailsChangeListener(
* Notify all listeners of the corresponding account detail
* change event.
*
* @param source the protocol provider service source
* @param eventID the int ID of the event to dispatch
* @param oldValue the value that the changed property had before the change
* occurred.

@ -241,11 +241,24 @@ public Map<String, String> getAccountProperties()
return new HashMap<String, String>(accountProperties);
}
/**
* Returns the specific account property.
*
* @param key property key
* @return property value corresponding to property key
*/
public Object getAccountProperty(Object key)
{
return accountProperties.get(key);
}
/**
* Returns the specific account property.
*
* @param key property key
* @param defaultValue default value if the property does not exist
* @return property value corresponding to property key
*/
public boolean getAccountPropertyBoolean(Object key, boolean defaultValue)
{
String value = getAccountPropertyString(key);

@ -34,6 +34,14 @@ public enum TransportProtocol
*/
TLS;
/**
* Parses a <tt>String</tt> and returns the appropriate
* <tt>TransportProtocol</tt>.
* @param transportProtocol string
* @return appropriate <tt>TransportProtocol</tt>
* @throws IllegalArgumentException if string is not a transport protocol
* valid name
*/
public static TransportProtocol parse(String transportProtocol)
throws IllegalArgumentException
{

@ -39,6 +39,8 @@ public class DTMFReceivedEvent
* contact.
*
* @param source the <tt>Message</tt> whose reception this event represents.
* @param value dmtf tone value
* @param duration duration of the DTMF tone
*/
public DTMFReceivedEvent(ProtocolProviderService source,
DTMFTone value,

@ -34,6 +34,12 @@ public class MessageDeliveredEvent
*/
private final long timestamp;
/**
* Constructor.
*
* @param source message source
* @param to the "to" contact
*/
public MessageDeliveredEvent(Message source, Contact to)
{
this(source, to, System.currentTimeMillis());

@ -74,6 +74,13 @@ public class MessageDeliveryFailedEvent
*/
private final long timestamp;
/**
* Constructor.
*
* @param source the message
* @param to the "to" contact
* @param errorCode error code
*/
public MessageDeliveryFailedEvent(Message source,
Contact to,
int errorCode)

@ -15,6 +15,9 @@
public interface PresenceStatusListener
extends EventListener
{
/**
* Callback the the contact presence status has changed.
*/
public void contactPresenceStatusChanged();
}

@ -13,6 +13,11 @@
public class ServerStoredDetailsChangeEvent
extends EventObject
{
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* Indicates that the ServerStoredDetailsChangeEvent instance was triggered
* by adding a new detail.
@ -52,6 +57,9 @@ public class ServerStoredDetailsChangeEvent
* Constructs a ServerStoredDetailsChangeEvent.
*
* @param source The object on which the Event initially occurred.
* @param eventID the event ID
* @param oldValue old value
* @param newValue new value
* @throws IllegalArgumentException if source is null.
*/
public ServerStoredDetailsChangeEvent(
@ -97,7 +105,9 @@ public Object getOldValue()
}
/**
* The event type id.
* Returns the event type id.
*
* @return the event ID
*/
public int getEventID()
{

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save