|
|
|
|
@ -6,10 +6,10 @@
|
|
|
|
|
*/
|
|
|
|
|
package net.java.sip.communicator.plugin.jabberaccregwizz;
|
|
|
|
|
|
|
|
|
|
import java.awt.*;
|
|
|
|
|
import java.awt.event.*;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
import java.awt.*;
|
|
|
|
|
import java.awt.event.*;
|
|
|
|
|
import javax.swing.*;
|
|
|
|
|
import javax.swing.event.*;
|
|
|
|
|
|
|
|
|
|
@ -17,44 +17,44 @@
|
|
|
|
|
import net.java.sip.communicator.service.protocol.*;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The <tt>FirstWizardPage</tt> is the page, where user could enter the uin
|
|
|
|
|
* The <tt>FirstWizardPage</tt> is the page, where user could enter the user ID
|
|
|
|
|
* and the password of the account.
|
|
|
|
|
*
|
|
|
|
|
* @author Yana Stamcheva
|
|
|
|
|
* @author Damian Minkov
|
|
|
|
|
*/
|
|
|
|
|
public class FirstWizardPage extends JPanel
|
|
|
|
|
implements WizardPage, DocumentListener {
|
|
|
|
|
public class FirstWizardPage
|
|
|
|
|
extends JPanel implements WizardPage, DocumentListener
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public static final String FIRST_PAGE_IDENTIFIER = "FirstPageIdentifier";
|
|
|
|
|
|
|
|
|
|
private static final String GOOGLE_USER_SUFFIX = "gmail.com";
|
|
|
|
|
private static final String GOOGLE_CONNECT_SRV = "talk.google.com";
|
|
|
|
|
|
|
|
|
|
private JPanel uinPassPanel = new JPanel(new BorderLayout(10, 10));
|
|
|
|
|
private JPanel userIDPassPanel = new JPanel(new BorderLayout(10, 10));
|
|
|
|
|
|
|
|
|
|
private JPanel labelsPanel = new JPanel();
|
|
|
|
|
|
|
|
|
|
private JPanel valuesPanel = new JPanel();
|
|
|
|
|
|
|
|
|
|
private JLabel uinLabel = new JLabel(Resources.getString("uin"));
|
|
|
|
|
|
|
|
|
|
private JLabel userIDLabel = new JLabel(Resources.getString("userID"));
|
|
|
|
|
|
|
|
|
|
private JLabel passLabel = new JLabel(Resources.getString("password"));
|
|
|
|
|
|
|
|
|
|
private JLabel existingAccountLabel
|
|
|
|
|
= new JLabel(Resources.getString("existingAccount"));
|
|
|
|
|
|
|
|
|
|
= new JLabel(Resources.getString("existingAccount"));
|
|
|
|
|
|
|
|
|
|
private JPanel emptyPanel = new JPanel();
|
|
|
|
|
|
|
|
|
|
private JLabel uinExampleLabel = new JLabel("Ex: johnsmith@jabber.org");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JTextField uinField = new JTextField();
|
|
|
|
|
|
|
|
|
|
private JLabel userIDExampleLabel = new JLabel("Ex: johnsmith@jabber.org");
|
|
|
|
|
|
|
|
|
|
private JTextField userIDField = new JTextField();
|
|
|
|
|
|
|
|
|
|
private JPasswordField passField = new JPasswordField();
|
|
|
|
|
|
|
|
|
|
private JCheckBox rememberPassBox = new JCheckBox(
|
|
|
|
|
Resources.getString("rememberPassword"));
|
|
|
|
|
Resources.getString("rememberPassword"));
|
|
|
|
|
|
|
|
|
|
private JPanel advancedOpPanel = new JPanel(new BorderLayout(10, 10));
|
|
|
|
|
|
|
|
|
|
@ -63,7 +63,7 @@ public class FirstWizardPage extends JPanel
|
|
|
|
|
private JPanel valuesAdvOpPanel = new JPanel(new GridLayout(0, 1, 10, 10));
|
|
|
|
|
|
|
|
|
|
private JCheckBox sendKeepAliveBox = new JCheckBox(
|
|
|
|
|
Resources.getString("sendKeepAlive"));
|
|
|
|
|
Resources.getString("sendKeepAlive"));
|
|
|
|
|
|
|
|
|
|
private JCheckBox enableAdvOpButton = new JCheckBox(
|
|
|
|
|
Resources.getString("ovverideServerOps"), false);
|
|
|
|
|
@ -77,7 +77,7 @@ public class FirstWizardPage extends JPanel
|
|
|
|
|
private JPanel mainPanel = new JPanel();
|
|
|
|
|
|
|
|
|
|
private Object nextPageIdentifier = WizardPage.SUMMARY_PAGE_IDENTIFIER;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JabberAccountRegistration registration;
|
|
|
|
|
|
|
|
|
|
private WizardContainer wizardContainer;
|
|
|
|
|
@ -90,7 +90,8 @@ public class FirstWizardPage extends JPanel
|
|
|
|
|
* be added
|
|
|
|
|
*/
|
|
|
|
|
public FirstWizardPage(JabberAccountRegistration registration,
|
|
|
|
|
WizardContainer wizardContainer) {
|
|
|
|
|
WizardContainer wizardContainer)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
super(new BorderLayout());
|
|
|
|
|
|
|
|
|
|
@ -105,63 +106,73 @@ public FirstWizardPage(JabberAccountRegistration registration,
|
|
|
|
|
this.init();
|
|
|
|
|
|
|
|
|
|
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.labelsPanel.setLayout(new BoxLayout(labelsPanel, BoxLayout.Y_AXIS));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.valuesPanel.setLayout(new BoxLayout(valuesPanel, BoxLayout.Y_AXIS));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Initializes all panels, buttons, etc.
|
|
|
|
|
*/
|
|
|
|
|
private void init() {
|
|
|
|
|
this.uinField.getDocument().addDocumentListener(this);
|
|
|
|
|
private void init()
|
|
|
|
|
{
|
|
|
|
|
this.userIDField.getDocument().addDocumentListener(this);
|
|
|
|
|
this.rememberPassBox.setSelected(true);
|
|
|
|
|
|
|
|
|
|
this.existingAccountLabel.setForeground(Color.RED);
|
|
|
|
|
|
|
|
|
|
this.uinExampleLabel.setForeground(Color.GRAY);
|
|
|
|
|
this.uinExampleLabel.setFont(uinExampleLabel.getFont().deriveFont(8));
|
|
|
|
|
|
|
|
|
|
this.userIDExampleLabel.setForeground(Color.GRAY);
|
|
|
|
|
this.userIDExampleLabel.setFont(userIDExampleLabel.getFont().deriveFont(
|
|
|
|
|
8));
|
|
|
|
|
this.emptyPanel.setMaximumSize(new Dimension(40, 35));
|
|
|
|
|
this.uinExampleLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 8, 0));
|
|
|
|
|
|
|
|
|
|
labelsPanel.add(uinLabel);
|
|
|
|
|
this.userIDExampleLabel.setBorder(BorderFactory.createEmptyBorder(0, 0,
|
|
|
|
|
8, 0));
|
|
|
|
|
|
|
|
|
|
labelsPanel.add(userIDLabel);
|
|
|
|
|
labelsPanel.add(emptyPanel);
|
|
|
|
|
labelsPanel.add(passLabel);
|
|
|
|
|
|
|
|
|
|
valuesPanel.add(uinField);
|
|
|
|
|
valuesPanel.add(uinExampleLabel);
|
|
|
|
|
valuesPanel.add(userIDField);
|
|
|
|
|
valuesPanel.add(userIDExampleLabel);
|
|
|
|
|
valuesPanel.add(passField);
|
|
|
|
|
|
|
|
|
|
uinPassPanel.add(labelsPanel, BorderLayout.WEST);
|
|
|
|
|
uinPassPanel.add(valuesPanel, BorderLayout.CENTER);
|
|
|
|
|
uinPassPanel.add(rememberPassBox, BorderLayout.SOUTH);
|
|
|
|
|
userIDPassPanel.add(labelsPanel, BorderLayout.WEST);
|
|
|
|
|
userIDPassPanel.add(valuesPanel, BorderLayout.CENTER);
|
|
|
|
|
userIDPassPanel.add(rememberPassBox, BorderLayout.SOUTH);
|
|
|
|
|
|
|
|
|
|
uinPassPanel.setBorder(BorderFactory
|
|
|
|
|
.createTitledBorder(Resources.getString("uinAndPassword")));
|
|
|
|
|
userIDPassPanel.setBorder(BorderFactory
|
|
|
|
|
.createTitledBorder(Resources.getString(
|
|
|
|
|
"userIDAndPassword")));
|
|
|
|
|
|
|
|
|
|
mainPanel.add(uinPassPanel);
|
|
|
|
|
mainPanel.add(userIDPassPanel);
|
|
|
|
|
|
|
|
|
|
serverField.setEditable(false);
|
|
|
|
|
portField.setEditable(false);
|
|
|
|
|
|
|
|
|
|
enableAdvOpButton.addActionListener(new ActionListener(){
|
|
|
|
|
public void actionPerformed(ActionEvent evt) {
|
|
|
|
|
// Perform action
|
|
|
|
|
JCheckBox cb = (JCheckBox)evt.getSource();
|
|
|
|
|
enableAdvOpButton.addActionListener(new ActionListener()
|
|
|
|
|
{
|
|
|
|
|
public void actionPerformed(ActionEvent evt)
|
|
|
|
|
{
|
|
|
|
|
// Perform action
|
|
|
|
|
JCheckBox cb = (JCheckBox) evt.getSource();
|
|
|
|
|
|
|
|
|
|
serverField.setEditable(cb.isSelected());
|
|
|
|
|
portField.setEditable(cb.isSelected());
|
|
|
|
|
}});
|
|
|
|
|
serverField.setEditable(cb.isSelected());
|
|
|
|
|
portField.setEditable(cb.isSelected());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
portField.getDocument().addDocumentListener(new DocumentListener(){
|
|
|
|
|
public void changedUpdate(DocumentEvent e){}
|
|
|
|
|
public void insertUpdate(DocumentEvent e)
|
|
|
|
|
portField.getDocument().addDocumentListener(new DocumentListener()
|
|
|
|
|
{
|
|
|
|
|
public void changedUpdate(DocumentEvent evt)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
public void insertUpdate(DocumentEvent evt)
|
|
|
|
|
{
|
|
|
|
|
setNextButtonAccordingToPort();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void removeUpdate(DocumentEvent e)
|
|
|
|
|
public void removeUpdate(DocumentEvent evt)
|
|
|
|
|
{
|
|
|
|
|
setNextButtonAccordingToPort();
|
|
|
|
|
}
|
|
|
|
|
@ -182,7 +193,8 @@ public void removeUpdate(DocumentEvent e)
|
|
|
|
|
advancedOpPanel.add(valuesAdvOpPanel, BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
advancedOpPanel.setBorder(BorderFactory
|
|
|
|
|
.createTitledBorder(Resources.getString("advancedOptions")));
|
|
|
|
|
.createTitledBorder(Resources.getString(
|
|
|
|
|
"advancedOptions")));
|
|
|
|
|
|
|
|
|
|
mainPanel.add(advancedOpPanel);
|
|
|
|
|
|
|
|
|
|
@ -192,62 +204,78 @@ public void removeUpdate(DocumentEvent e)
|
|
|
|
|
/**
|
|
|
|
|
* Implements the <code>WizardPage.getIdentifier</code> to return
|
|
|
|
|
* this page identifier.
|
|
|
|
|
*
|
|
|
|
|
* @return the id of the first wizard page.
|
|
|
|
|
*/
|
|
|
|
|
public Object getIdentifier() {
|
|
|
|
|
public Object getIdentifier()
|
|
|
|
|
{
|
|
|
|
|
return FIRST_PAGE_IDENTIFIER;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Implements the <code>WizardPage.getNextPageIdentifier</code> to return
|
|
|
|
|
* the next page identifier - the summary page.
|
|
|
|
|
*
|
|
|
|
|
* @return the id of the next wizard page.
|
|
|
|
|
*/
|
|
|
|
|
public Object getNextPageIdentifier() {
|
|
|
|
|
public Object getNextPageIdentifier()
|
|
|
|
|
{
|
|
|
|
|
return nextPageIdentifier;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Implements the <code>WizardPage.getBackPageIdentifier</code> to return
|
|
|
|
|
* the next back identifier - the default page.
|
|
|
|
|
*
|
|
|
|
|
* @return the id of the default wizard page.
|
|
|
|
|
*/
|
|
|
|
|
public Object getBackPageIdentifier() {
|
|
|
|
|
public Object getBackPageIdentifier()
|
|
|
|
|
{
|
|
|
|
|
return WizardPage.DEFAULT_PAGE_IDENTIFIER;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Implements the <code>WizardPage.getWizardForm</code> to return
|
|
|
|
|
* this panel.
|
|
|
|
|
*
|
|
|
|
|
* @return this wizard page.
|
|
|
|
|
*/
|
|
|
|
|
public Object getWizardForm() {
|
|
|
|
|
public Object getWizardForm()
|
|
|
|
|
{
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Before this page is displayed enables or disables the "Next" wizard
|
|
|
|
|
* button according to whether the UIN field is empty.
|
|
|
|
|
* button according to whether the User ID field is empty.
|
|
|
|
|
*/
|
|
|
|
|
public void pageShowing() {
|
|
|
|
|
this.setNextButtonAccordingToUIN();
|
|
|
|
|
public void pageShowing()
|
|
|
|
|
{
|
|
|
|
|
this.setNextButtonAccordingToUserID();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Saves the user input when the "Next" wizard buttons is clicked.
|
|
|
|
|
*/
|
|
|
|
|
public void pageNext() {
|
|
|
|
|
String uin = uinField.getText();
|
|
|
|
|
|
|
|
|
|
if(isExistingAccount(uin)) {
|
|
|
|
|
public void pageNext()
|
|
|
|
|
{
|
|
|
|
|
String userID = userIDField.getText();
|
|
|
|
|
|
|
|
|
|
if (isExistingAccount(userID))
|
|
|
|
|
{
|
|
|
|
|
nextPageIdentifier = FIRST_PAGE_IDENTIFIER;
|
|
|
|
|
uinPassPanel.add(existingAccountLabel, BorderLayout.NORTH);
|
|
|
|
|
userIDPassPanel.add(existingAccountLabel, BorderLayout.NORTH);
|
|
|
|
|
this.revalidate();
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
nextPageIdentifier = SUMMARY_PAGE_IDENTIFIER;
|
|
|
|
|
uinPassPanel.remove(existingAccountLabel);
|
|
|
|
|
|
|
|
|
|
registration.setUin(uinField.getText());
|
|
|
|
|
userIDPassPanel.remove(existingAccountLabel);
|
|
|
|
|
|
|
|
|
|
registration.setUserID(userIDField.getText());
|
|
|
|
|
registration.setPassword(new String(passField.getPassword()));
|
|
|
|
|
registration.setRememberPassword(rememberPassBox.isSelected());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
registration.setServerAddress(serverField.getText());
|
|
|
|
|
registration.setSendKeepAlive(sendKeepAliveBox.isSelected());
|
|
|
|
|
try
|
|
|
|
|
@ -261,63 +289,78 @@ public void pageNext() {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Enables or disables the "Next" wizard button according to whether the
|
|
|
|
|
* UIN field is empty.
|
|
|
|
|
* UserID field is empty.
|
|
|
|
|
*/
|
|
|
|
|
private void setNextButtonAccordingToUIN() {
|
|
|
|
|
if (uinField.getText() == null || uinField.getText().equals("")) {
|
|
|
|
|
private void setNextButtonAccordingToUserID()
|
|
|
|
|
{
|
|
|
|
|
if (userIDField.getText() == null || userIDField.getText().equals(""))
|
|
|
|
|
{
|
|
|
|
|
wizardContainer.setNextFinishButtonEnabled(false);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
wizardContainer.setNextFinishButtonEnabled(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Handles the <tt>DocumentEvent</tt> triggered when user types in the
|
|
|
|
|
* UIN field. Enables or disables the "Next" wizard button according to
|
|
|
|
|
* whether the UIN field is empty.
|
|
|
|
|
* UserID field. Enables or disables the "Next" wizard button according to
|
|
|
|
|
* whether the UserID field is empty.
|
|
|
|
|
*
|
|
|
|
|
* @param evt the document event that has triggered this method call.
|
|
|
|
|
*/
|
|
|
|
|
public void insertUpdate(DocumentEvent e) {
|
|
|
|
|
this.setNextButtonAccordingToUIN();
|
|
|
|
|
this.setServerFieldAccordingToUIN();
|
|
|
|
|
public void insertUpdate(DocumentEvent evt)
|
|
|
|
|
{
|
|
|
|
|
this.setNextButtonAccordingToUserID();
|
|
|
|
|
this.setServerFieldAccordingToUserID();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Handles the <tt>DocumentEvent</tt> triggered when user deletes letters
|
|
|
|
|
* from the UIN field. Enables or disables the "Next" wizard button
|
|
|
|
|
* according to whether the UIN field is empty.
|
|
|
|
|
* from the User ID field. Enables or disables the "Next" wizard button
|
|
|
|
|
* according to whether the User ID field is empty.
|
|
|
|
|
*
|
|
|
|
|
* @param evt the document event that has triggered this method call.
|
|
|
|
|
*/
|
|
|
|
|
public void removeUpdate(DocumentEvent e) {
|
|
|
|
|
this.setNextButtonAccordingToUIN();
|
|
|
|
|
this.setServerFieldAccordingToUIN();
|
|
|
|
|
public void removeUpdate(DocumentEvent evt)
|
|
|
|
|
{
|
|
|
|
|
this.setNextButtonAccordingToUserID();
|
|
|
|
|
this.setServerFieldAccordingToUserID();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void changedUpdate(DocumentEvent e) {
|
|
|
|
|
public void changedUpdate(DocumentEvent evt)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void pageHiding() {
|
|
|
|
|
public void pageHiding()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void pageShown() {
|
|
|
|
|
public void pageShown()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void pageBack() {
|
|
|
|
|
public void pageBack()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Fills the UIN and Password fields in this panel with the data comming
|
|
|
|
|
* Fills the User ID and Password fields in this panel with the data comming
|
|
|
|
|
* from the given protocolProvider.
|
|
|
|
|
* @param protocolProvider The <tt>ProtocolProviderService</tt> to load the
|
|
|
|
|
* data from.
|
|
|
|
|
*/
|
|
|
|
|
public void loadAccount(ProtocolProviderService protocolProvider) {
|
|
|
|
|
public void loadAccount(ProtocolProviderService protocolProvider)
|
|
|
|
|
{
|
|
|
|
|
AccountID accountID = protocolProvider.getAccountID();
|
|
|
|
|
String password = (String)accountID.getAccountProperties()
|
|
|
|
|
String password = (String) accountID.getAccountProperties()
|
|
|
|
|
.get(ProtocolProviderFactory.PASSWORD);
|
|
|
|
|
|
|
|
|
|
this.uinField.setText(accountID.getUserID());
|
|
|
|
|
this.userIDField.setText(accountID.getUserID());
|
|
|
|
|
|
|
|
|
|
if(password != null) {
|
|
|
|
|
if (password != null)
|
|
|
|
|
{
|
|
|
|
|
this.passField.setText(password);
|
|
|
|
|
this.rememberPassBox.setSelected(true);
|
|
|
|
|
}
|
|
|
|
|
@ -327,19 +370,23 @@ public void loadAccount(ProtocolProviderService protocolProvider) {
|
|
|
|
|
* Parse the server part from the jabber id and set it to server
|
|
|
|
|
* as default value. If Advanced option is enabled Do nothing.
|
|
|
|
|
*/
|
|
|
|
|
private void setServerFieldAccordingToUIN()
|
|
|
|
|
private void setServerFieldAccordingToUserID()
|
|
|
|
|
{
|
|
|
|
|
if(!enableAdvOpButton.isSelected())
|
|
|
|
|
if (!enableAdvOpButton.isSelected())
|
|
|
|
|
{
|
|
|
|
|
String uin = uinField.getText();
|
|
|
|
|
int delimIndex = uin.indexOf("@");
|
|
|
|
|
String userID = userIDField.getText();
|
|
|
|
|
int delimIndex = userID.indexOf("@");
|
|
|
|
|
if (delimIndex != -1)
|
|
|
|
|
{
|
|
|
|
|
String newServerAddr = uin.substring(delimIndex + 1);
|
|
|
|
|
if(newServerAddr.equals(GOOGLE_USER_SUFFIX))
|
|
|
|
|
String newServerAddr = userID.substring(delimIndex + 1);
|
|
|
|
|
if (newServerAddr.equals(GOOGLE_USER_SUFFIX))
|
|
|
|
|
{
|
|
|
|
|
serverField.setText(GOOGLE_CONNECT_SRV);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
serverField.setText(newServerAddr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -357,22 +404,25 @@ private void setNextButtonAccordingToPort()
|
|
|
|
|
}
|
|
|
|
|
catch (NumberFormatException ex)
|
|
|
|
|
{
|
|
|
|
|
wizardContainer.setNextFinishButtonEnabled(false);
|
|
|
|
|
wizardContainer.setNextFinishButtonEnabled(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isExistingAccount(String accountName)
|
|
|
|
|
{
|
|
|
|
|
ProtocolProviderFactory factory
|
|
|
|
|
{
|
|
|
|
|
ProtocolProviderFactory factory
|
|
|
|
|
= JabberAccRegWizzActivator.getJabberProtocolProviderFactory();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ArrayList registeredAccounts = factory.getRegisteredAccounts();
|
|
|
|
|
|
|
|
|
|
for(int i = 0; i < registeredAccounts.size(); i ++) {
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < registeredAccounts.size(); i++)
|
|
|
|
|
{
|
|
|
|
|
AccountID accountID = (AccountID) registeredAccounts.get(i);
|
|
|
|
|
|
|
|
|
|
if(accountName.equalsIgnoreCase(accountID.getUserID()))
|
|
|
|
|
|
|
|
|
|
if (accountName.equalsIgnoreCase(accountID.getUserID()))
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|