[sip-comm-dev] GSoC - Profile Manager


#1

Hi Emil,

I'm starting the conversation on the dev list but we can continue this
by phone at any time. Further more other people can give their
thoughts.

My work is to create a profile manager. My first idea was to create a
new service in the lowest layer of SC (between the UtilsService and
the FileAccessService). A complete explaining of the idea is available
on the project blog. The idea was good but now the question is : how
to stop the starting of the framework to ask the user which profile he
wants to use ?

Emil proposes to implements the biggest part of the service in the
launch. Like that we can pass through the starting of the framework.
Then I can create a plugin to manage the profiles within the
application.

I think I can keep the same system I've developed but I will export it
into a jar file to minimize the code duplication which is the worst
thing.

To resume :

The jar will contain :
- the classes that manage the file
- the GUI's classes

The launcher will use the jar to checks the if we need to use the
default profile or ask the user (display the GUI), then saves the data
into the System class.

The two services, I mentioned in the blog's article, will be updated
as said in the article but instead of getting informations from the
service they will get the informations from the System class.

The future plugin will allow the user to manage the profiles : add,
rename, remove, set a default profile and change profile.

Now the main question is : Is there a way to restart all the bundles
when another profile is selected without restart the application ?

Do you know how other applications with profiles works ?

In my case I only know about Eclipse which restart completely when
switching to another workspace.

While reading the MainFrame class I found the line to stop the application :

GuiActivator.bundleContext.getBundle(0).stop();

I have two questions :
- What is the bundle 0 ?
- To restart the application, do I just need to add this line after
the other : GuiActivator.bundleContext.getBundle(0).start();

@+

Damien ROTH

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hey folks,

For those of you interested in work on the Profile Manager GSoC project,
we just had a chat with Damien over the phone and have reached the
following decisions:

1. Damien will place his code in

net.java.sip.communicator.profilemgr

The Profile manager would not be a classic bundle from an architecture
point of view even though its jar would be created the same way that the
bundle jars are created and stored in the same location as them. It
would also be registered as a bundle with felix but won't export any
packages and won't register any profile management services.

2. Damien will add a hook in the launcher class that would call the
ProfileManager before starting felix so that it would show its UI, let
the user create/edit/delete profiles and choose the one they wish to load.

3. The profile manager would also register its UI in the configuration
form so that users can change its settings after they have started the
application.

4. The profile manager would use its own configuration file so no
changes would be required for the FileAccess and Configuration services.
This file would be stored in $HOME/.sip-communicator

5. Profiles would be stored in $HOME/.sip-communicator/profileid by
default. Damien, I just thought of something. We need to think of a way
to make the transition smooth for users that already have their
configuration in .sip-communicator so that they won't lose everything
after we put the profile manager into service.

6. Users may also chose alternative locations to store profiles but the
profile configuration file would still be kept inside
$HOME/.sip-communicator.

7. The profile manager UI would not give the possibility to restart the
application. It would simply allow users to choose a default profile and
notify them that they need to restart in order to switch to that profile.

Think this is all.
Cheers
Emil

Damien Roth написа:

···

Hi Emil,

I'm starting the conversation on the dev list but we can continue this
by phone at any time. Further more other people can give their
thoughts.

My work is to create a profile manager. My first idea was to create a
new service in the lowest layer of SC (between the UtilsService and
the FileAccessService). A complete explaining of the idea is available
on the project blog. The idea was good but now the question is : how
to stop the starting of the framework to ask the user which profile he
wants to use ?

Emil proposes to implements the biggest part of the service in the
launch. Like that we can pass through the starting of the framework.
Then I can create a plugin to manage the profiles within the
application.

I think I can keep the same system I've developed but I will export it
into a jar file to minimize the code duplication which is the worst
thing.

To resume :

The jar will contain :
- the classes that manage the file
- the GUI's classes

The launcher will use the jar to checks the if we need to use the
default profile or ask the user (display the GUI), then saves the data
into the System class.

The two services, I mentioned in the blog's article, will be updated
as said in the article but instead of getting informations from the
service they will get the informations from the System class.

The future plugin will allow the user to manage the profiles : add,
rename, remove, set a default profile and change profile.

Now the main question is : Is there a way to restart all the bundles
when another profile is selected without restart the application ?

Do you know how other applications with profiles works ?

In my case I only know about Eclipse which restart completely when
switching to another workspace.

While reading the MainFrame class I found the line to stop the application :

GuiActivator.bundleContext.getBundle(0).stop();

I have two questions :
- What is the bundle 0 ?
- To restart the application, do I just need to add this line after
the other : GuiActivator.bundleContext.getBundle(0).start();

@+

Damien ROTH

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net