Ticket #2392 (closed planned_task: obsolete)

Opened 15 years ago

Last modified 13 years ago

client connectivity

Reported by: dido Owned by: mira
Priority: major Milestone:
Component: S2S_CLIENT_SUPPORT Version: 2.0
Keywords: server Cc: dido
Category: S2S Effort:
Importance: 80 Ticket_group:
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0
Analysis_owners: dido Design_owners: mira
Imp._owners: mira Test_owners:
Analysis_reviewers: deyan Changelog: Changelog
Design_reviewers: meddle, pap Imp._reviewers: todor, deyan, pap
Test_reviewers: Analysis_score: 4
Design_score: 3 Imp._score: 3.5
Test_score: 0

Description (last modified by dido) (diff)

The goal of this task is to allow the user to log in to the server from Sophie Author and Reader.

  • After the user selects server and press connect (or double click on a server) - Dialog window pops up. This will allow the user to identify himself. Fields for user name and password will appear as well as button for data submission.
    • This window will also provide "Log in as anonymous" functionality - this will happen with default value inside user name field (Anonymous) and empty password.
    • In case the server url is from type [user name]@[server url]. The default value of the user name filed should be the user name.
  • Error or success notifications should appear next.
    • Error message should be "Something went wrong and Sophie was unable to connect to [server url]."
    • Success message should be "You have successfully connected to [server url]."
  • Change the tooltip over the add button to say "Add connection" in order to be more consistent

Related: http://sophie2.org/trac/wiki/ServerOverview

Change History

comment:1 Changed 15 years ago by dido

  • Owner set to dido
  • Status changed from new to s1a_analysis_started
  • Description modified (diff)

comment:2 Changed 15 years ago by dido

  • Description modified (diff)

comment:3 Changed 15 years ago by dido

  • Cc dido added
  • Analysis_owners set to dido

comment:4 Changed 15 years ago by dido

  • Description modified (diff)

comment:5 Changed 15 years ago by dido

  • Status changed from s1a_analysis_started to s1b_analysis_finished

comment:6 Changed 15 years ago by dido

  • Description modified (diff)

comment:7 Changed 15 years ago by dido

  • Status changed from s1b_analysis_finished to new
  • Description modified (diff)

comment:8 Changed 15 years ago by dido

  • Status changed from new to s1a_analysis_started
  • Description modified (diff)

comment:9 Changed 15 years ago by dido

  • Status changed from s1a_analysis_started to s1b_analysis_finished

comment:10 Changed 15 years ago by dido

  • Description modified (diff)

comment:11 Changed 15 years ago by dido

  • Description modified (diff)

comment:12 Changed 15 years ago by dido

  • Description modified (diff)

comment:13 Changed 15 years ago by dido

  • Description modified (diff)

comment:14 Changed 15 years ago by dido

  • Description modified (diff)

comment:15 Changed 15 years ago by dido

  • Description modified (diff)

comment:16 Changed 15 years ago by dido

  • Status changed from s1b_analysis_finished to new

comment:17 Changed 15 years ago by dido

  • Status changed from new to s1a_analysis_started
  • Description modified (diff)

comment:18 Changed 15 years ago by dido

  • Description modified (diff)

comment:19 Changed 15 years ago by dido

  • Status changed from s1a_analysis_started to s1b_analysis_finished

comment:20 Changed 15 years ago by deyan

  • Status changed from s1b_analysis_finished to s1c_analysis_ok
  • Analysis_reviewers set to deyan
  • Analysis_score changed from 0 to 4

comment:21 Changed 15 years ago by mira

  • Design_owners set to mira
  • Owner changed from dido to mira
  • Status changed from s1c_analysis_ok to s2a_design_started

comment:22 Changed 15 years ago by mira

ServerConnection.connect() method

  • After getting a sessionId from the server, show the ServerLoginDialog dialog.
  • Try to login to the server with the given userName and pass. The dialog output is LoginInfo.
  • If the login is successfull change the account of the ServerConnection. The AccountR4 keys.

comment:23 Changed 15 years ago by mira

  • Status changed from s2a_design_started to s2b_design_finished

Design

Make createComponent() and a setUpExtra() methods in to be BoundTextField. They should be used by all classes that extend it. Make a BoundPasswordField that extends BoundTextField and just uses a JPasswordField as a text field.

  • ServerLoginDialog

Make a dialog that will be prompted to the user when he/she is trying to connect to a server. It should contain three static inner classes:

  • LoginInfo - This should be simple immutable class that contains two final strings - username and password. They should have public getters and modify methods that return new LoginInfo objects. This class should be used as a output of the ServerLoginDialog.
  • Input - This class should extend DialogInput<LoginInfo>. It would be constructed by an account object and should provide method getLoginInfo(). This class should be used as a input of the ServerLoginDialog.
  • SwingLoginDIalog - This class is used as the swing component for this dialog. it should have two inner classes: -- UserNameField - actual implementation of the BoundTextField, used to get the username used to connect to server. -- PasswordFiels - actual implementation of the BoundPasswordField, used to get the password to connect to the server.

Change the ServerConnection.connect() method. After getting a sessionId from the server, show the ServerLoginDialog dialog. Try to login to the server with the given userName and pass. If the login is successfull change the account of the ServerConnection. Review the AccountR4 keys.

To be able to download webui changes in TrueAuthor it should be able to resurect all used AutoActions in the web. For this they will be moved to a WebActionsUtil in the base.model.security module. Since it doed not depend on the func.images module the UserR4 should not use image resource as an avatar but a simple Key<ImmImage>. Make this key and remove the avatar ref from the users functionality.

comment:24 Changed 15 years ago by pap

  • Status changed from s2b_design_finished to s2c_design_ok
  • Design_score changed from 0 to 3
  • Design_reviewers set to meddle, pap
  • Designs should be acompanied by some code related to them.
  • No need to change ImageResource4 usage to ImmImage as ImageResource4 is in base.model.book module. You should've checked that.
  • I think it is better to use resources as these would ease the implementation of other features.
  • WebActionsUtil is not nice as a name and as an idea.
  • Don't write fake JavaDoc, if the code is not to be documented now, just don't document it, beacause at the implementation phase it is possible to forget something undocumented.
  • Update the lookandfeel xml files. First fix the java5 one to have the same definitions as that for java6. Also there are two bindings for PasswordFiled. One of them is unnecessary
  • Also you mentioned quite briefly the way BoundPasswordField would be made. But you explained quite thoroughky simple immutables :)
  • Don't change the port in the startServer() method. It should always call the other overload with the default port constant.

comment:25 Changed 15 years ago by mira

  • Status changed from s2c_design_ok to s3a_implementation_started
  • Imp._owners set to mira

comment:26 Changed 15 years ago by mira

  • Status changed from s3a_implementation_started to s3b_implementation_finished

The implementation is done according to the design with several alterations:

  • I descided to keep the avatar image as resource and access it through the AVATAR_REF.
  • I moved the auto-actions out of the webui module to the UserH (and discarded the WebActionsUtil idea). I think that people will look for them there.
  • I moved the users directory name and ref to the UserR4, since for some reason the TrueAuthor could not find them from the servers.core.ServerResourceHelper
  • I made the Accounts to keep only string userName, not ref.
  • I moved the auto-actions out of the base.model.resources.r4 module since they were not loaded correctly and weren`t registered on the server.
  • I fixed the bug #2363.

The implementation is at branches/private/mira/connectivity

comment:27 Changed 15 years ago by deyan

Error or success notifications should appear next.

    * Error message should be "Something went wrong and Sophie was unable to connect to [server url]."
    * Success message should be "You have successfully connected to [server url]." 

These requirements are not met. Additionally, Anonymous user can be logged with any password, which is incorrect.

comment:28 Changed 15 years ago by deyan

Also, Cancel and X button should only close the dialog without notifications.

comment:29 Changed 15 years ago by mira

Both messages and cancel are fixed on the todors vnc where the task is merged.

comment:30 Changed 15 years ago by pap

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Imp._score changed from 0 to 3.5
  • Imp._reviewers set to todor, deyan, pap
  • Commited in [9090].
  • In the whole chain of logic for connecting you used Boolean instead of boolean in order to have three states. This is not nice :)
  • In BoundPasswordField instead of returning the default value if nothing is present in the skin, just return the skin value. Also add the default value in an initSkin method in the base class.
  • Otherwise the task seems good.
  • 3.5p

comment:31 Changed 13 years ago by meddle

  • Status changed from s3c_implementation_ok to closed
  • Resolution set to obsolete

Closing all the tickets before M Y1

Note: See TracTickets for help on using tickets.