cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomek...@apache.org
Subject svn commit: r1080893 - in /cxf/trunk: distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/ rt/management-web/src/main/java/org/apache/cxf/management/web/browser/ rt/management-web/src/main/java/org/apache/cxf/management/web/browser/boo...
Date Sat, 12 Mar 2011 08:55:29 GMT
Author: tomekopo
Date: Sat Mar 12 08:55:28 2011
New Revision: 1080893

URL: http://svn.apache.org/viewvc?rev=1080893&view=rev
Log:
Removed authentication and storing settings in local storage

Removed:
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/AbstractAuthenticationFilter.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/AuthenticationRequired.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/SimpleAuthenticationFilter.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToAccessControlerEvent.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToAccessControlerEventHandler.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/RemoteStorageAccessDeniedEvent.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/RemoteStorageAccessDeniedEventHandler.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/SignOutEvent.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/SignOutEventHandler.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Base64.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Credentials.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/LocalStorage.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/LocalStorageImpl.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/accesscontroler/
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/jstorage.config.js
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/jstorage.min.js
Modified:
    cxf/trunk/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/App.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/LogBrowser.gwt.xml
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Dispatcher.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Module.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/AbstractCallback.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxy.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxyImpl.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Settings.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/SettingsFacade.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java

Modified: cxf/trunk/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/App.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/App.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/App.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/App.java
Sat Mar 12 08:55:28 2011
@@ -28,7 +28,6 @@ import org.apache.cxf.jaxrs.provider.Ato
 import org.apache.cxf.jaxrs.provider.AtomFeedProvider;
 
 import org.apache.cxf.management.web.browser.bootstrapping.BootstrapStorage;
-import org.apache.cxf.management.web.browser.bootstrapping.SimpleAuthenticationFilter;
 import org.apache.cxf.management.web.browser.bootstrapping.SimpleXMLSettingsStorage;
 import org.apache.cxf.management.web.logging.atom.AtomPullServer;
 
@@ -41,11 +40,6 @@ public class App extends Application {
 
         // The log browser
         classes.add(new BootstrapStorage(new SimpleXMLSettingsStorage()));
-        classes.add(new SimpleAuthenticationFilter(new HashMap<String, String>() {
-            {
-                put("admin", "admin");
-            }
-        }));
         classes.add(new BootstrapStorage.StaticFileProvider());
         classes.add(new BootstrapStorage.SettingsProvider());
 

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/LogBrowser.gwt.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/LogBrowser.gwt.xml?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/LogBrowser.gwt.xml
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/LogBrowser.gwt.xml
Sat Mar 12 08:55:28 2011
@@ -28,8 +28,6 @@
 
     <script src="uuid.min.js" />
     <script src="json2.min.js" />
-    <script src="jstorage.config.js" />
-    <script src="jstorage.min.js" />
 
    <stylesheet src="custom.css" />
 

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java
Sat Mar 12 08:55:28 2011
@@ -64,23 +64,29 @@ public class BootstrapStorage {
     }
 
     @GET
-    @Path("/settings/{username}")
+    @Path("/settings")
     @Produces("application/json")
-    @AuthenticationRequired
-    public Settings getSettings(@PathParam("username") final String username) {
+    public Settings getSettings() {
+
+        //TODO Remove username everywhere
+        String username = "admin";
+
         Validate.notNull(username, "username is null");
         Validate.notEmpty(username, "username is empty");
-        
+
         LOGGER.fine(String.format("Retrieve settings, user='%s'", username));
-        
+
         return storage.getSettings(username);
     }
 
     @PUT
-    @Path("/settings/{username}")
+    @Path("/settings")
     @Consumes("application/json")
-    @AuthenticationRequired
-    public Response setSettings(@PathParam("username") final String username, final Settings
settings) {
+    public Response setSettings(final Settings settings) {
+
+        //TODO Remove username everywhere
+        String username = "admin";
+
         Validate.notNull(username, "username is null");
         Validate.notEmpty(username, "username is empty");
         Validate.notNull(settings, "settings is null");

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Dispatcher.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Dispatcher.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Dispatcher.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Dispatcher.java
Sat Mar 12 08:55:28 2011
@@ -26,36 +26,25 @@ import com.google.gwt.user.client.ui.Roo
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 
-import org.apache.cxf.management.web.browser.client.event.GoToAccessControlerEvent;
-import org.apache.cxf.management.web.browser.client.event.GoToAccessControlerEventHandler;
 import org.apache.cxf.management.web.browser.client.event.GoToBrowserEvent;
 import org.apache.cxf.management.web.browser.client.event.GoToBrowserEventHandler;
 import org.apache.cxf.management.web.browser.client.event.GoToEditCriteriaEvent;
 import org.apache.cxf.management.web.browser.client.event.GoToEditCriteriaEventHandler;
 import org.apache.cxf.management.web.browser.client.event.GoToSettingsEvent;
 import org.apache.cxf.management.web.browser.client.event.GoToSettingsEventHandler;
-import org.apache.cxf.management.web.browser.client.event.SignOutEvent;
-import org.apache.cxf.management.web.browser.client.event.SignOutEventHandler;
-import org.apache.cxf.management.web.browser.client.service.settings.Credentials;
 import org.apache.cxf.management.web.browser.client.service.settings.SettingsFacade;
 import org.apache.cxf.management.web.browser.client.service.settings.SettingsFacade.StorageStrategy;
 import org.apache.cxf.management.web.browser.client.ui.Presenter;
-import org.apache.cxf.management.web.browser.client.ui.accesscontroler.AccessControlPresenter;
 import org.apache.cxf.management.web.browser.client.ui.browser.BrowsePresenter;
 import org.apache.cxf.management.web.browser.client.ui.browser.EditCriteriaPresenter;
 import org.apache.cxf.management.web.browser.client.ui.settings.SettingsPresenter;
 
-
-
 public class Dispatcher {
 
     @Nonnull
     private final EventBus eventBus;
 
     @Nonnull
-    private final Provider<AccessControlPresenter> accessControlProvider;
-
-    @Nonnull
     private final Provider<BrowsePresenter> browseProvider;
 
     @Nonnull
@@ -73,12 +62,10 @@ public class Dispatcher {
     @Inject
     public Dispatcher(@Nonnull final EventBus eventBus,
                       @Nonnull final SettingsFacade settingsFacade,
-                      @Nonnull final Provider<AccessControlPresenter> accessControlProvider,
                       @Nonnull final Provider<BrowsePresenter> browseProvider,
                       @Nonnull final Provider<EditCriteriaPresenter> editCriteriaProvider,
                       @Nonnull final Provider<SettingsPresenter> settingsProvider)
{
         this.eventBus = eventBus;
-        this.accessControlProvider = accessControlProvider;
         this.browseProvider = browseProvider;
         this.editCriteriaProvider = editCriteriaProvider;
         this.settingsProvider = settingsProvider;
@@ -88,12 +75,8 @@ public class Dispatcher {
     }
 
     public void start() {
-        if (settingsFacade.isSettingsAlreadyInLocalStorage()) {
-            settingsFacade.initialize(StorageStrategy.LOCAL_AND_REMOTE, Credentials.EMPTY);
-            eventBus.fireEvent(new GoToBrowserEvent());
-        } else {
-            go(accessControlProvider.get());
-        }
+        settingsFacade.initialize(StorageStrategy.REMOTE);
+        eventBus.fireEvent(new GoToBrowserEvent());
     }
 
     private void go(@Nonnull final Presenter newPresenter) {
@@ -108,12 +91,6 @@ public class Dispatcher {
 
     private void bind() {
 
-        eventBus.addHandler(GoToAccessControlerEvent.TYPE, new GoToAccessControlerEventHandler()
{
-            public void onGoToAccessControler(@Nonnull final GoToAccessControlerEvent event)
{
-                go(accessControlProvider.get());
-            }
-        });
-
         eventBus.addHandler(GoToBrowserEvent.TYPE, new GoToBrowserEventHandler() {
             public void onGoToBrowser(@Nonnull final GoToBrowserEvent event) {
                 go(browseProvider.get());
@@ -132,13 +109,5 @@ public class Dispatcher {
                 go(settingsProvider.get());
             }
         });
-
-        eventBus.addHandler(SignOutEvent.TYPE, new SignOutEventHandler() {
-
-            public void onSignOut(@Nonnull final SignOutEvent event) {
-                settingsFacade.clearMemoryAndLocalStorage();
-                go(accessControlProvider.get());
-            }
-        });
     }
 }

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Module.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Module.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Module.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Module.java
Sat Mar 12 08:55:28 2011
@@ -24,15 +24,11 @@ import com.google.inject.name.Names;
 
 import org.apache.cxf.management.web.browser.client.service.settings.IdentifierGenerator;
 import org.apache.cxf.management.web.browser.client.service.settings.IdentifierGeneratorImpl;
-import org.apache.cxf.management.web.browser.client.service.settings.LocalStorage;
-import org.apache.cxf.management.web.browser.client.service.settings.LocalStorageImpl;
 import org.apache.cxf.management.web.browser.client.service.settings.RemoteStorageProxy;
 import org.apache.cxf.management.web.browser.client.service.settings.RemoteStorageProxyImpl;
 import org.apache.cxf.management.web.browser.client.ui.BindStrategy;
 import org.apache.cxf.management.web.browser.client.ui.DialogBindStrategyImpl;
 import org.apache.cxf.management.web.browser.client.ui.WidgetBindStrategyImpl;
-import org.apache.cxf.management.web.browser.client.ui.accesscontroler.AccessControlView;
-import org.apache.cxf.management.web.browser.client.ui.accesscontroler.AccessControlViewImpl;
 import org.apache.cxf.management.web.browser.client.ui.browser.BrowseView;
 import org.apache.cxf.management.web.browser.client.ui.browser.BrowseViewImpl;
 import org.apache.cxf.management.web.browser.client.ui.browser.EditCriteriaView;
@@ -54,7 +50,6 @@ public class Module extends AbstractGinM
     protected void configure() {
         bind(EventBus.class).to(DefaultEventBus.class);
         bind(IdentifierGenerator.class).to(IdentifierGeneratorImpl.class);
-        bind(AccessControlView.class).to(AccessControlViewImpl.class);
         bind(SettingsView.class).to(SettingsViewImpl.class);
         bind(SubscriptionDialog.class).to(SubscriptionDialogImpl.class);
         bind(BrowseView.class).to(BrowseViewImpl.class);
@@ -63,15 +58,10 @@ public class Module extends AbstractGinM
         bind(EditCriteriaView.class).to(EditCriteriaViewImpl.class);
         bind(ViewerView.class).to(ViewerViewImpl.class);
         bind(RemoteStorageProxy.class).to(RemoteStorageProxyImpl.class);
-        bind(LocalStorage.class).to(LocalStorageImpl.class);
 
         //TODO move it to view class:
 
         bind(BindStrategy.class)
-                .annotatedWith(Names.named("BindStrategyForAccessControl"))
-                .to(WidgetBindStrategyImpl.class);
-
-        bind(BindStrategy.class)
                 .annotatedWith(Names.named("BindStrategyForBrowser"))
                 .to(WidgetBindStrategyImpl.class);
 

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/AbstractCallback.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/AbstractCallback.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/AbstractCallback.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/AbstractCallback.java
Sat Mar 12 08:55:28 2011
@@ -25,15 +25,13 @@ import com.google.gwt.http.client.Reques
 import com.google.gwt.http.client.RequestCallback;
 import com.google.gwt.http.client.Response;
 
+//TODO Remove - this class is useless
 public abstract class AbstractCallback<T> implements RequestCallback {
     private static final int OK = 200;
-    private static final int UNAUTHORIZED = 401;
 
     public void onResponseReceived(@Nonnull final Request request, @Nonnull final Response
response) {
         if (OK == response.getStatusCode()) {
             onSuccess(parse(response));
-        } else if (UNAUTHORIZED == response.getStatusCode()) {
-            onAccessDenied();
         } else {
             
             // TODO add custom exception
@@ -47,8 +45,6 @@ public abstract class AbstractCallback<T
         throw new RuntimeException(ex);
     }
 
-    public abstract void onAccessDenied();
-
     public abstract void onSuccess(T obj);
 
     protected abstract T parse(Response response);    

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxy.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxy.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxy.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxy.java
Sat Mar 12 08:55:28 2011
@@ -23,7 +23,7 @@ import com.google.gwt.http.client.Reques
 
 public interface RemoteStorageProxy {
     
-    void saveSettings(Credentials credentials, RequestCallback callback);
+    void saveSettings(RequestCallback callback);
 
-    void retrieveSettings(Credentials credentials, Settings settings, RequestCallback callback);
+    void retrieveSettings(Settings settings, RequestCallback callback);
 }

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxyImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxyImpl.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxyImpl.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxyImpl.java
Sat Mar 12 08:55:28 2011
@@ -29,18 +29,15 @@ import com.google.gwt.http.client.Reques
 import com.google.gwt.http.client.RequestCallback;
 import com.google.gwt.http.client.RequestException;
 import com.google.gwt.http.client.Response;
-import com.google.gwt.http.client.URL;
 import com.google.gwt.json.client.JSONObject;
 import com.google.gwt.json.client.JSONValue;
-
 import org.apache.cxf.management.web.browser.client.service.AbstractCallback;
 
 public class RemoteStorageProxyImpl implements RemoteStorageProxy {
-    private static final String HOSTED_MODE_ENDPOINT_URL = "/log/browser/settings/";
+    private static final String HOSTED_MODE_ENDPOINT_URL = "/log/browser/settings";
     private static final String RESOURCES_ENDPOINT_SUFFIX = "/resources/";
-    private static final String SETTINGS_ENDPOINT_SUFFIX = "/settings/";
+    private static final String SETTINGS_ENDPOINT_SUFFIX = "/settings";
     
-    private static final String AUTHORIZATION_HEADER = "Authorization";
     private static final String CONTENT_TYPE_HEADER = "Content-Type";
     private static final String ACCEPT_HEADER = "Accept";    
     private static final String JSON_TYPE = "application/json";
@@ -49,29 +46,17 @@ public class RemoteStorageProxyImpl impl
 
     private String endpointURL;
 
-    public void saveSettings(@Nonnull final Credentials credentials,
-                             @Nonnull final RequestCallback callback) {
-        RequestBuilder builder = buildRequest(RequestBuilder.GET, buildURL(credentials),
credentials);
+    public void saveSettings(@Nonnull final RequestCallback callback) {
+        RequestBuilder builder = buildRequest(RequestBuilder.GET, buildEndpointURL());
         execute(null, builder, callback);
     }
 
-    public void retrieveSettings(@Nonnull final Credentials credentials, @Nonnull final Settings
settings,
-                                 @Nonnull final RequestCallback callback) {
-        RequestBuilder builder = buildRequest(RequestBuilder.PUT, buildURL(credentials),
credentials);
+    public void retrieveSettings(@Nonnull final Settings settings, @Nonnull final RequestCallback
callback) {
+        RequestBuilder builder = buildRequest(RequestBuilder.PUT, buildEndpointURL());
         execute(Converter.convertToRemoteSettings(settings), builder, callback);
     }
 
     @Nonnull
-    private String buildURL(@Nonnull final Credentials credentials) {
-        assert credentials.getUsername() != null && !"".equals(credentials.getUsername());
-
-        String url = URL.encode(buildEndpointURL() + credentials.getUsername());
-        
-        assert !"".equals(url);
-        return url;
-    }
-
-    @Nonnull
     private String buildEndpointURL() {
         if (endpointURL == null) {
             String baseURL = GWT.getHostPageBaseURL();
@@ -96,27 +81,18 @@ public class RemoteStorageProxyImpl impl
 
     @Nonnull
     private RequestBuilder buildRequest(@Nonnull final RequestBuilder.Method method,
-                                        @Nonnull final String url,
-                                        @Nonnull final Credentials credentials) {
+                                        @Nonnull final String url) {
         assert !"".equals(url);
         
         RequestBuilder builder = new RequestBuilder(method, url);
         builder.setHeader(CONTENT_TYPE_HEADER, JSON_TYPE);
         builder.setHeader(ACCEPT_HEADER, JSON_TYPE);
-        
-        if (credentials != null) {
-            builder.setHeader(AUTHORIZATION_HEADER, getAuthorizationData(credentials));
-        }
-        
-        return builder;
-    }
 
-    @Nonnull
-    private String getAuthorizationData(@Nonnull final Credentials credentials) {
-        return "Basic " + Base64.encode(credentials.getUsername() + ":" + credentials.getPassword());
+        return builder;
     }
 
-    private void execute(@Nullable final RemoteSettings remoteSettings, @Nonnull final RequestBuilder
builder,
+    private void execute(@Nullable final RemoteSettings remoteSettings,
+                         @Nonnull final RequestBuilder builder,
                          @Nonnull final RequestCallback callback) {
         String json = null;
         if (remoteSettings != null) {
@@ -269,9 +245,6 @@ public class RemoteStorageProxyImpl impl
     public static class NoActionCallback extends AbstractCallback<Settings> {
 
         @Override
-        public void onAccessDenied() { }
-
-        @Override
         public void onSuccess(@Nullable final Settings obj) { }
 
         @Override @Nullable

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Settings.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Settings.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Settings.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Settings.java
Sat Mar 12 08:55:28 2011
@@ -25,26 +25,10 @@ import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 public class Settings {
-
-    @Nullable
-    private Credentials credentials;
-
     @Nullable
     private Set<Subscription> subscriptions;
 
     @Nonnull
-    public Credentials getCredentials() {
-        if (credentials == null) {
-            credentials = Credentials.EMPTY;
-        }
-        return credentials;
-    }
-
-    public void setCredentials(@Nonnull final Credentials credentials) {
-        this.credentials = credentials;
-    }
-
-    @Nonnull
     public Set<Subscription> getSubscriptions() {
         if (subscriptions == null) {
             subscriptions = new LinkedHashSet<Subscription>();

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/SettingsFacade.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/SettingsFacade.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/SettingsFacade.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/SettingsFacade.java
Sat Mar 12 08:55:28 2011
@@ -21,17 +21,15 @@ package org.apache.cxf.management.web.br
 
 import java.util.ArrayList;
 import java.util.List;
-
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
-
 import org.apache.cxf.management.web.browser.client.EventBus;
-import org.apache.cxf.management.web.browser.client.event.GoToBrowserEvent;
-import org.apache.cxf.management.web.browser.client.event.RemoteStorageAccessDeniedEvent;
+import org.apache.cxf.management.web.browser.client.event.ChangedSubscriptionsEvent;
 
+//TODO Remove StorageStrategy feature
 @Singleton
 public class SettingsFacade {
 
@@ -39,9 +37,6 @@ public class SettingsFacade {
     private final RemoteStorageProxy remoteStorage;
 
     @Nonnull
-    private final LocalStorage localStorage;
-
-    @Nonnull
     private final EventBus eventBus;
 
     @Nullable
@@ -53,37 +48,24 @@ public class SettingsFacade {
     private boolean initialized;
 
     public enum StorageStrategy {
-        LOCAL_AND_REMOTE,
         REMOTE
     }    
 
     @Inject
     public SettingsFacade(@Nonnull final RemoteStorageProxy remoteStorage,
-                          @Nonnull final LocalStorage localStorage,
                           @Nonnull final EventBus eventBus,
                           @Nonnull final IdentifierGenerator identifierGenerator) {
         this.remoteStorage = remoteStorage;
-        this.localStorage = localStorage;
         this.eventBus = eventBus;
         this.identifierGenerator = identifierGenerator;
     }
 
-    public boolean isSettingsAlreadyInLocalStorage() {
-        return localStorage.isAvailable() && localStorage.retrieveSettings() != null;
-    }    
-
-    public void initialize(@Nonnull final StorageStrategy strategy, @Nonnull final Credentials
credentials) {
+    public void initialize(@Nonnull final StorageStrategy strategy) {
         storageLayer = createStorageLayers(strategy);
-        storageLayer.initialize(credentials);
+        storageLayer.initialize();
         initialized = true;
     }
 
-    public void clearMemoryAndLocalStorage() {
-        assert storageLayer != null;
-        storageLayer.clear();
-        initialized = false;
-    }
-
     public void addSubscription(@Nonnull final String name, @Nonnull final String url) {
         assert !"".equals(name);
         assert !"".equals(url);
@@ -133,9 +115,6 @@ public class SettingsFacade {
     @Nonnull
     private StorageLayer createStorageLayers(@Nonnull final StorageStrategy storageStrategy)
{
         switch(storageStrategy) {
-        case LOCAL_AND_REMOTE:
-            return new RemoteStorageLayer(remoteStorage,
-                new LocalStorageLayer(localStorage, new MemoryStorageLayer()));
         case REMOTE:
             return new RemoteStorageLayer(remoteStorage, new MemoryStorageLayer());
         default:
@@ -145,7 +124,7 @@ public class SettingsFacade {
 
     private interface StorageLayer {
 
-        boolean initialize(Credentials credentials);
+        boolean initialize();
 
         Settings getSettings();
 
@@ -161,9 +140,8 @@ public class SettingsFacade {
         @Nonnull
         private Settings settings;
 
-        public boolean initialize(@Nonnull final Credentials credentials) {
+        public boolean initialize() {
             this.settings = new Settings();
-            this.settings.setCredentials(credentials);
             return false;
         }
 
@@ -184,54 +162,6 @@ public class SettingsFacade {
         }
     }
 
-    private static class LocalStorageLayer implements StorageLayer {
-
-        @Nonnull
-        private final MemoryStorageLayer parent; // TODO change to StorageLayer interface
-
-        @Nonnull
-        private final LocalStorage localStorage;
-
-        public LocalStorageLayer(@Nonnull final LocalStorage localStorage,
-                                 @Nonnull final MemoryStorageLayer parent) {
-            this.parent = parent;
-            this.localStorage = localStorage;
-        }
-
-        public boolean initialize(@Nonnull final Credentials credentials) {
-            boolean isSuccess = parent.initialize(credentials);
-            
-            assert !isSuccess;
-
-            Settings settings = localStorage.retrieveSettings();
-            if (settings != null) {
-                parent.update(settings);
-                return true;
-            } else {
-                return false;
-            }
-        }
-
-        @Nonnull
-        public Settings getSettings() {
-            return parent.getSettings();
-        }
-
-        public void update(@Nonnull final Settings settings) {
-            parent.update(settings);
-            localStorage.saveSettings(settings);
-        }
-
-        public void update() {
-            update(parent.getSettings());
-        }
-
-        public void clear() {
-            parent.clear();
-            localStorage.clear();
-        }
-    }
-
     private class RemoteStorageLayer implements StorageLayer {
 
         @Nonnull
@@ -246,27 +176,19 @@ public class SettingsFacade {
             this.remoteStorage = remoteStorage;
         }
 
-        public boolean initialize(@Nonnull final Credentials credentials) {
-            assert credentials != null;
-
-            boolean isSuccess = parent.initialize(credentials);
+        public boolean initialize() {
+            boolean isSuccess = parent.initialize();
             
             if (!isSuccess) {
-                remoteStorage.saveSettings(credentials, new RemoteStorageProxyImpl.Callback()
{
-
-                    @Override
-                    public void onAccessDenied() {
-                        eventBus.fireEvent(new RemoteStorageAccessDeniedEvent());
-                    }
+                remoteStorage.saveSettings(new RemoteStorageProxyImpl.Callback() {
 
                     @Override
                     public void onSuccess(@Nullable final Settings retrievedSettings) {
                         Settings settings = retrievedSettings != null ? retrievedSettings
: new Settings();
-                        settings.setCredentials(credentials);
 
                         parent.update(settings);
 
-                        eventBus.fireEvent(new GoToBrowserEvent());
+                        eventBus.fireEvent(new ChangedSubscriptionsEvent());
                     }
                 });
             }
@@ -284,8 +206,7 @@ public class SettingsFacade {
 
             parent.update(settings);
 
-            remoteStorage.retrieveSettings(settings.getCredentials(), settings,
-                new RemoteStorageProxyImpl.NoActionCallback());
+            remoteStorage.retrieveSettings(settings, new RemoteStorageProxyImpl.NoActionCallback());
         }
         
         public void update() {

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
Sat Mar 12 08:55:28 2011
@@ -139,11 +139,6 @@ public class ViewerPresenter extends Bas
         proxy.getFeed(url, new FeedProxyImpl.Callback() {
 
             @Override
-            public void onAccessDenied() {
-                setFeed(Feed.EMPTY);
-            }
-
-            @Override
             public void onSuccess(@Nonnull final Feed newFeed) {
                 setFeed(newFeed);
             }

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java
Sat Mar 12 08:55:28 2011
@@ -25,7 +25,7 @@ import com.google.inject.Inject;
 import com.google.inject.name.Named;
 
 import org.apache.cxf.management.web.browser.client.EventBus;
-import org.apache.cxf.management.web.browser.client.event.SignOutEvent;
+import org.apache.cxf.management.web.browser.client.event.GoToSettingsEvent;
 import org.apache.cxf.management.web.browser.client.ui.BasePresenter;
 import org.apache.cxf.management.web.browser.client.ui.BindStrategy;
 
@@ -44,7 +44,7 @@ public class NavigationHeaderPresenter e
         this.view.setPresenter(this);
     }
 
-    public void onSignOutButtonClicked() {
-        eventBus.fireEvent(new SignOutEvent());
+    public void onSettingsButtonClicked() {
+        eventBus.fireEvent(new GoToSettingsEvent());
     }
 }

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java
Sat Mar 12 08:55:28 2011
@@ -24,7 +24,7 @@ import org.apache.cxf.management.web.bro
 public interface NavigationHeaderView extends View {
     
     public interface Presenter {
-        void onSignOutButtonClicked();
+        void onSettingsButtonClicked();
     }
 
     void setPresenter(Presenter presenter);

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml
Sat Mar 12 08:55:28 2011
@@ -29,8 +29,8 @@
          <tbody>
             <tr>
                <td align="right">
-                  <g:Hyperlink ui:field="signOutHyperlink" styleName='{res.css.topbarLink}'>
-                     Sign out
+                  <g:Hyperlink ui:field="settingsHyperlink" styleName='{res.css.topbarLink}'>
+                     Settings
                   </g:Hyperlink>
                </td>
             </tr>

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java
Sat Mar 12 08:55:28 2011
@@ -44,10 +44,10 @@ public class NavigationHeaderViewImpl ex
         initWidget(UI_BINDER.createAndBindUi(this));
     }
 
-    @UiHandler("signOutHyperlink")
+    @UiHandler("settingsHyperlink")
     void onSignOutHyperlinkClicked(@Nonnull final ClickEvent event) {
         assert presenter != null;
-        presenter.onSignOutButtonClicked();
+        presenter.onSettingsButtonClicked();
     }
 
     public void setPresenter(@Nonnull final Presenter presenter) {

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java
Sat Mar 12 08:55:28 2011
@@ -33,12 +33,6 @@ public interface LogBrowserCss extends C
     String errorDialogButtons();
     String errorDialogErrorType();
 
-    /* Access control tab styles */
-    String accessControlTab();
-    String accessControlTabErrorMessage();
-    String accessControlTabRememberMeCheckbox();
-    String accessControlTabSignInButton();
-
     /* Browser tab styles*/
     String browserTabLoadingMessage();
     String browserTabNoEntriesMessage();

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css
Sat Mar 12 08:55:28 2011
@@ -86,43 +86,6 @@ a {
   margin-top: 15px;
 }
 
-/* Access controler styles */
-
-.accessControlTab {
-    margin:50px auto;
-    width:25em;
-}
-
-.accessControlTab p > label {
-    width:7em;
-    float:left;
-    text-align:right;
-    margin-right:1em;
-    display:block;
-}
-
-.accessControlTab fieldset {
-    border:3px solid #BBCDF3;
-}
-
-.accessControlTab legend {
-    padding:2px 6px;
-    font-weight:bolder;
-}
-
-.accessControlTabErrorMessage {
-    color:red;
-    margin-left: 8em;
-}
-
-.accessControlTabRememberMeCheckbox {
-    margin-left:8em;
-}
-
-.accessControlTabSignInButton button {
-    margin-left: 8em;
-}
-
 /* Browser tab styles */
 
 @sprite .browserTabLoadingMessage {

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java
Sat Mar 12 08:55:28 2011
@@ -33,7 +33,6 @@ import com.google.inject.name.Named;
 import org.apache.cxf.management.web.browser.client.EventBus;
 import org.apache.cxf.management.web.browser.client.event.ChangedSubscriptionsEvent;
 import org.apache.cxf.management.web.browser.client.event.GoToBrowserEvent;
-import org.apache.cxf.management.web.browser.client.event.SignOutEvent;
 import org.apache.cxf.management.web.browser.client.service.settings.SettingsFacade;
 import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
 import org.apache.cxf.management.web.browser.client.ui.BasePresenter;
@@ -128,10 +127,6 @@ public class SettingsPresenter extends B
         eventBus.fireEvent(new GoToBrowserEvent());
     }
 
-    public void onSingOutHyperlinkClicked() {
-        eventBus.fireEvent(new SignOutEvent());
-    }
-
     private void updateSubscriptions() {
         eventBus.fireEvent(new ChangedSubscriptionsEvent());
         view.setData(settingsFacade.getSubscriptions());

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java?rev=1080893&r1=1080892&r2=1080893&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java
Sat Mar 12 08:55:28 2011
@@ -37,8 +37,6 @@ public interface SettingsView extends Vi
         void onRemoveSubscriptionButtonClicked(Subscription subscription);
 
         void onBackHyperlinkClicked();
-
-        void onSingOutHyperlinkClicked();
     }
 
     HasWidgets getNaviagationHeaderSlot();



Mime
View raw message