cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomek...@apache.org
Subject svn commit: r960895 - in /cxf/sandbox/logbrowser: distribution/ distribution/src/main/release/samples/logbrowser/ distribution/src/main/release/samples/logbrowser/src/ distribution/src/main/release/samples/logbrowser/src/demo/ distribution/src/main/rel...
Date Tue, 06 Jul 2010 13:29:02 GMT
Author: tomekopo
Date: Tue Jul  6 13:29:01 2010
New Revision: 960895

URL: http://svn.apache.org/viewvc?rev=960895&view=rev
Log:
CXF-2879: Add servlet, which retrieve static content from JAR file. Additionally added sample project and fixed minor layout's issues.

Added:
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/   (with props)
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/README.txt
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/pom.xml
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/AtomPullServerApp.java
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/AuthenticationFilter.java
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/BootstrapStorageApp.java
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/XMLSettingsProvider.java
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Generate.java
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Server.java
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/webapp/
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/webapp/WEB-INF/
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/webapp/WEB-INF/web.xml
    cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/webapp/generate.html
    cxf/sandbox/logbrowser/rt/management-web/README.txt
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/bootstrapping/StaticContentServlet.java
    cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/loader.gif   (with props)
Modified:
    cxf/sandbox/logbrowser/distribution/pom.xml
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/browser/Entry.java
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/presenter/PlaceManager.java
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/BrowseViewImpl.java
    cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsView.ui.xml
    cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/LogBrowser.css

Modified: cxf/sandbox/logbrowser/distribution/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/distribution/pom.xml?rev=960895&r1=960894&r2=960895&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/distribution/pom.xml (original)
+++ cxf/sandbox/logbrowser/distribution/pom.xml Tue Jul  6 13:29:01 2010
@@ -143,6 +143,12 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
+            <artifactId>cxf-rt-management-web</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${project.groupId}</groupId>
             <artifactId>cxf-rt-transports-local</artifactId>
             <version>${project.version}</version>
         </dependency>

Propchange: cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jul  6 13:29:01 2010
@@ -0,0 +1,3 @@
+logBrowserSettingsStorage.xml
+
+target

Added: cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/README.txt
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/README.txt?rev=960895&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/README.txt (added)
+++ cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/README.txt Tue Jul  6 13:29:01 2010
@@ -0,0 +1,29 @@
+Prerequisite
+------------
+
+If your environment already includes cxf-manifest.jar on the
+CLASSPATH, and the JDK and ant bin directories on the PATH
+it is not necessary to set the environment as described in
+the samples directory README.  If your environment is not
+properly configured, or if you are planning on using wsdl2java,
+javac, and java to build and run the demos, you must set the
+environment.
+
+Building and running the demo using Maven
+---------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the pom.xml file is used to build and run the demo. 
+
+Using either UNIX or Windows:
+
+1)  Build and run by typing in terminal
+    mvn install
+2) Open browser and go to:
+    http://localhost:9002/logbrowser/LogBrowser.html
+3) Add new endpoint with URL:
+    http://localhost:9002/log/logs
+4) To generate custom log entry open new browser's window and go to:
+    http://localhost:9002/generate.html
+
+To remove the .class files, run "mvn clean".

Added: cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/pom.xml?rev=960895&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/pom.xml (added)
+++ cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/pom.xml Tue Jul  6 13:29:01 2010
@@ -0,0 +1,117 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.cxf.samples</groupId>
+    <artifactId>logbrowser-plain-webxml</artifactId>
+    <version>1.0</version>
+    <name>LogBrowser plain WEB.XML sample</name>
+    <properties>
+        <cxf.version>[2,)</cxf.version>
+    </properties>
+    <build>
+        <sourceDirectory>src</sourceDirectory>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>exec-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>java</goal>
+                        </goals>
+                        <configuration>
+                            <mainClass>demo.logbrowser.servlet.Server</mainClass>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+    <profiles>
+        <profile>
+            <id>snapshots</id>
+            <repositories>
+                <repository>
+                    <id>apache-snapshots</id>
+                    <name>Apache SNAPSHOT Repository</name>
+                    <url>https://repository.apache.org/content/groups/snapshots-group/</url>
+                    <snapshots>
+                        <enabled>true</enabled>
+                    </snapshots>
+                    <releases>
+                        <enabled>false</enabled>
+                    </releases>
+                </repository>
+            </repositories>
+            <pluginRepositories>
+                <pluginRepository>
+                    <id>apache-snapshots</id>
+                    <name>Apache Maven Plugin Snapshots</name>
+                    <url>https://repository.apache.org/content/groups/snapshots-group/</url>
+                    <releases>
+                        <enabled>false</enabled>
+                    </releases>
+                    <snapshots>
+                        <enabled>true</enabled>
+                    </snapshots>
+                </pluginRepository>
+            </pluginRepositories>
+        </profile>
+    </profiles>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-management-web</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>        
+        <!-- Jetty is needed if you're using the CXFServlet -->
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http-jetty</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        
+        <!--TODO temporary solution - remove this dependency-->
+        <dependency>
+            <groupId>com.thoughtworks.xstream</groupId>
+            <artifactId>xstream</artifactId>
+            <version>1.3.1</version>
+        </dependency>        
+    </dependencies>
+</project>

Added: cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/AtomPullServerApp.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/AtomPullServerApp.java?rev=960895&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/AtomPullServerApp.java (added)
+++ cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/AtomPullServerApp.java Tue Jul  6 13:29:01 2010
@@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.logbrowser;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.ws.rs.core.Application;
+
+import org.apache.cxf.jaxrs.provider.AtomEntryProvider;
+import org.apache.cxf.jaxrs.provider.AtomFeedProvider;
+import org.apache.cxf.management.web.logging.atom.*;
+
+public class AtomPullServerApp extends Application {
+    private static final AtomPullServer SERVICE;
+
+    static {
+        SERVICE = new AtomPullServer();
+        SERVICE.setPageSize(30);
+        SERVICE.setLoggers("demo");
+        SERVICE.init();
+    }
+
+    private static final AtomFeedProvider FEED = new AtomFeedProvider();
+    private static final AtomEntryProvider ENTRY = new AtomEntryProvider();
+
+    @Override
+    public Set<Class<?>> getClasses() {
+        Set<Class<?>> classes = new HashSet<Class<?>>();
+        classes.add(AtomPullServer.class);
+        classes.add(AtomFeedProvider.class);
+        classes.add(AtomEntryProvider.class);
+        return classes;
+    }
+
+    @Override
+    public Set<Object> getSingletons() {
+        Set<Object> classes = new HashSet<Object>();
+        classes.add(SERVICE);
+        classes.add(FEED);
+        classes.add(ENTRY);
+        return classes;
+    }
+}

Added: cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/AuthenticationFilter.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/AuthenticationFilter.java?rev=960895&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/AuthenticationFilter.java (added)
+++ cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/AuthenticationFilter.java Tue Jul  6 13:29:01 2010
@@ -0,0 +1,66 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.logbrowser;
+
+import java.util.logging.Logger;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.Provider;
+
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.configuration.security.AuthorizationPolicy;
+import org.apache.cxf.jaxrs.ext.RequestHandler;
+import org.apache.cxf.jaxrs.model.ClassResourceInfo;
+import org.apache.cxf.message.Message;
+
+import static javax.ws.rs.core.Response.Status.UNAUTHORIZED;
+
+@Provider
+public class AuthenticationFilter implements RequestHandler {
+    private static final Logger LOGGER = LogUtils.getL7dLogger(AuthenticationFilter.class);
+
+    private final String username;
+    private final String password;
+
+    public AuthenticationFilter(final String username, final String password) {
+        if (username == null) {
+            throw new IllegalArgumentException("'username' can't be null");
+        } else if (password == null) {
+            throw new IllegalArgumentException("'password' can't be null");
+        }
+        this.username = username;
+        this.password = password;
+    }
+
+    public Response handleRequest(final Message m, final ClassResourceInfo resourceClass) {
+        assert username != null;
+        assert password != null;
+        AuthorizationPolicy policy = (AuthorizationPolicy)m.get(AuthorizationPolicy.class);
+        if (policy == null) {
+            LOGGER.info("No authentication data'");
+            return Response.status(UNAUTHORIZED).build();
+        } else if (!username.equals(policy.getUserName()) || !password.equals(policy.getPassword())) {
+            LOGGER.info(String.format("Failed authentication, username='%s'", policy.getUserName()));
+            return Response.status(UNAUTHORIZED).build();
+        } else {
+            LOGGER.info(String.format("Successful authentication, username='%s'", policy.getUserName()));
+            return null;
+        }
+    }
+}

Added: cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/BootstrapStorageApp.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/BootstrapStorageApp.java?rev=960895&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/BootstrapStorageApp.java (added)
+++ cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/BootstrapStorageApp.java Tue Jul  6 13:29:01 2010
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.logbrowser;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.ws.rs.core.Application;
+import javax.ws.rs.ext.Provider;
+import org.apache.cxf.management.web.logging.bootstrapping.*;
+
+@Provider
+public class BootstrapStorageApp extends Application {
+
+    private static final BootstrapStorageService SERVICE =
+        new BootstrapStorageServiceImpl(new XMLSettingsProvider());
+
+    private static final AuthenticationFilter AUTHENTICATION =
+        new AuthenticationFilter("admin", "admin");
+
+    @Override
+    public Set<Class<?>> getClasses() {
+        Set<Class<?>> classes = new HashSet<Class<?>>();
+        classes.add(BootstrapStorageService.class);
+        classes.add(AuthenticationFilter.class);
+        return classes;
+    }
+
+    @Override
+    public Set<Object> getSingletons() {
+        Set<Object> classes = new HashSet<Object>();
+        classes.add(SERVICE);
+        classes.add(AUTHENTICATION);
+        return classes;
+    }
+}

Added: cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/XMLSettingsProvider.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/XMLSettingsProvider.java?rev=960895&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/XMLSettingsProvider.java (added)
+++ cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/XMLSettingsProvider.java Tue Jul  6 13:29:01 2010
@@ -0,0 +1,207 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.logbrowser;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import com.thoughtworks.xstream.XStream;
+
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.management.web.logging.bootstrapping.*;
+
+public class XMLSettingsProvider implements SettingsProvider {
+    private static final Logger LOGGER = LogUtils.getL7dLogger(XMLSettingsProvider.class);
+    private static final Settings DEFUALT_SETTINGS = new Settings();
+    private static final String DEFAULT_FILENAME = "logBrowserSettingsStorage.xml";    
+
+    private Map<String, Entry> cache = new HashMap<String, Entry>();
+    private volatile boolean cached;
+    private String filename;
+
+    public XMLSettingsProvider() {
+        this.filename = DEFAULT_FILENAME;
+    }
+
+    public XMLSettingsProvider(final String filename) {
+        if (filename == null) {
+            throw new IllegalArgumentException("'filename' can't be null");
+        }
+        this.filename = filename;
+    }
+
+    public void setSettings(final String username, final Settings settings) {
+        assert cache != null;
+        if (username == null || "".equals(username)) {
+            throw new IllegalArgumentException("'username' can't be null or empty");
+        } else if (settings == null) {
+            throw new IllegalArgumentException("'settings' can't be null");
+        }
+        load();
+        synchronized (cache) {
+            Entry entry = cache.get(username);
+            if (entry != null) {
+                entry.setSettings(settings);
+            } else {
+                cache.put(username, new Entry(username, settings));
+            }
+        }
+        save();
+    }
+
+    public Settings getSettings(final String username) {
+        assert cache != null;
+        if (username == null || "".equals(username)) {
+            throw new IllegalArgumentException("'username' can't be null or empty");
+        }
+        load();
+        synchronized (cache) {
+            Entry entry = cache.get(username);
+            return entry != null && entry.getSettings() != null ? entry.getSettings() : DEFUALT_SETTINGS;
+        }
+    }
+
+    private void load() {
+        assert cache != null;
+        assert filename != null;
+        if (cached) {
+            return;
+        }
+        LOGGER.info(String.format("Load settings from file, filename='%s'", filename));
+        XStream xs = getConfiguredXStream();
+        Entries entries = null;
+        try {
+            FileReader fr = new FileReader(filename);
+            BufferedReader br = new BufferedReader(fr);
+            entries = (Entries)xs.fromXML(br);
+            br.close();
+        } catch (IOException ex) {
+            LOGGER.log(Level.SEVERE, "Error occur while loading settings", ex);
+        }
+        if (entries != null) {
+            for (Entry entry : entries.getEntries()) {
+                if (entry != null && entry.getUsername() != null) {
+                    synchronized (cache) {
+                        cache.put(entry.getUsername(), entry);
+                    }
+                }
+            }
+        }
+        cached = true;
+    }
+
+    private void save() {
+        assert cache != null;
+        assert filename != null;
+        LOGGER.info(String.format("Persist settings to file, filename='%s'", filename));
+        XStream xs = getConfiguredXStream();
+        Entries entries;
+        synchronized (cache) {
+            entries = new Entries(cache.values());
+        }
+        try {
+            FileWriter fw = new FileWriter(filename);
+            BufferedWriter bw = new BufferedWriter(fw);
+            synchronized (cache) {
+                xs.toXML(entries, bw);
+            }
+            bw.flush();
+            bw.close();
+        } catch (IOException ex) {
+            LOGGER.log(Level.SEVERE, "Error occur while saving settings", ex);
+        }
+    }
+
+    private XStream getConfiguredXStream() {
+        XStream xs = new XStream();
+        xs.alias("settings", Settings.class);
+        xs.addImplicitCollection(Settings.class, "subscriptions");
+        xs.alias("subscription", Subscription.class);
+        xs.alias("entries", Entries.class);
+        xs.alias("entry", Entry.class);
+        xs.useAttributeFor(Entry.class, "username");
+        xs.useAttributeFor(Entry.class, "modified");
+        xs.addImplicitCollection(Entries.class, "entries");
+        return xs;
+    }
+
+    static class Entry {
+        private String username;
+        private Date modified;
+        private Settings settings;
+
+        Entry(String username, Settings settings) {
+            this.username = username;
+            this.modified = new Date();
+            this.settings = settings;
+        }
+
+        String getUsername() {
+            return username;
+        }
+
+        void setUsername(String username) {
+            this.username = username;
+        }
+
+        Date getModified() {
+            return modified;
+        }
+
+        Settings getSettings() {
+            return settings;
+        }
+
+        void setSettings(Settings settings) {
+            this.settings = settings;
+            this.modified = new Date();
+        }
+    }
+
+    static class Entries {
+        private List<Entry> entries;
+
+        Entries(Collection<Entry> entries) {
+            this.entries = new ArrayList<Entry>(entries);
+        }
+
+        List<Entry> getEntries() {
+            if (entries == null) {
+                entries = new ArrayList<Entry>();
+            }
+            return entries;
+        }
+
+        void setEntries(List<Entry> entries) {
+            this.entries = entries;
+        }
+    }
+}

Added: cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Generate.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Generate.java?rev=960895&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Generate.java (added)
+++ cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Generate.java Tue Jul  6 13:29:01 2010
@@ -0,0 +1,92 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.logbrowser.servlet;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import java.lang.RuntimeException;
+import java.util.logging.Logger;
+import java.util.logging.Level;
+
+import org.apache.cxf.common.logging.LogUtils;
+
+public class Generate extends HttpServlet {
+    private static final Logger LOGGER = LogUtils.getL7dLogger(Generate.class);
+
+    static {
+        LOGGER.setLevel(Level.FINE);    
+    }
+
+    private static final String LEVEL = "level";
+    private static final String MESSAGE = "message";
+    private static final String EXCEPTION_MESSAGE = "exceptionMessage";
+    private static final String FORM_URL = "./generate.html";
+
+    private enum Levels {
+        DEBUG, INFO, WARNING, ERROR;
+    }
+
+    public void doGet(final HttpServletRequest request, final HttpServletResponse response)
+            throws ServletException, IOException
+    {
+        final String level = request.getParameter(LEVEL) != null
+            ? request.getParameter(LEVEL).toLowerCase() : null;
+        final String message = request.getParameter(MESSAGE);
+        final String exceptionMessage = request.getParameter(EXCEPTION_MESSAGE);
+
+        assert level != null && !"".equals(level);
+
+        if (name(Levels.DEBUG).equals(level)) {
+            log(Level.FINE, message, exceptionMessage);
+        } else if (name(Levels.INFO).equals(level)) {
+            log(Level.INFO, message, exceptionMessage);
+        } else if (name(Levels.WARNING).equals(level)) {
+            log(Level.WARNING, message, exceptionMessage);
+        } else if (name(Levels.ERROR).equals(level)) {
+            log(Level.SEVERE, message, exceptionMessage);
+        }
+
+        final PrintWriter out = response.getWriter();
+        response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
+        response.setHeader("Location", FORM_URL);
+        response.setContentType("text/html");
+    }
+
+    private static void log(final Level level,
+            final String message, final String exceptionMessage) {
+        if (message != null && !"".equals(message)) {
+            if (exceptionMessage != null && !"".equals(exceptionMessage)) {
+               LOGGER.log(level, message, new Exception(exceptionMessage));
+            } else {
+               LOGGER.log(level, message); 
+            }
+        }
+    }
+
+    private static String name(final Levels level) {
+        return level.name().toLowerCase();
+    }
+}

Added: cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Server.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Server.java?rev=960895&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Server.java (added)
+++ cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/src/demo/logbrowser/servlet/Server.java Tue Jul  6 13:29:01 2010
@@ -0,0 +1,65 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.logbrowser.servlet;
+
+import org.mortbay.jetty.Connector;
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.handler.DefaultHandler;
+import org.mortbay.jetty.handler.HandlerCollection;
+import org.mortbay.jetty.nio.SelectChannelConnector;
+import org.mortbay.jetty.webapp.WebAppContext;
+
+public class Server {
+
+    protected Server() throws Exception {
+        System.out.println("Starting Server");
+
+        /**
+         * Important: This code simply starts up a servlet container and adds
+         * the web application in src/webapp to it. Normally you would be using
+         * Jetty or Tomcat and have the webapp packaged as a WAR. This is simply
+         * as a convenience so you do not need to configure your servlet
+         * container to see CXF in action!
+         */
+        org.mortbay.jetty.Server server = new org.mortbay.jetty.Server();
+
+        SelectChannelConnector connector = new SelectChannelConnector();
+        connector.setPort(9002);
+        server.setConnectors(new Connector[] {connector});
+
+        WebAppContext webappcontext = new WebAppContext();
+        webappcontext.setContextPath("/");
+
+        webappcontext.setWar("webapp");
+
+        HandlerCollection handlers = new HandlerCollection();
+        handlers.setHandlers(new Handler[] {webappcontext, new DefaultHandler()});
+
+        server.setHandler(handlers);
+        server.start();
+        System.out.println("Server ready...");
+        server.join();
+    }
+
+    public static void main(String args[]) throws Exception {
+        new Server();
+    }
+
+}

Added: cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/webapp/WEB-INF/web.xml?rev=960895&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/webapp/WEB-INF/web.xml (added)
+++ cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/webapp/WEB-INF/web.xml Tue Jul  6 13:29:01 2010
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements. See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership. The ASF licenses this file
+	to you under the Apache License, Version 2.0 (the
+	"License"); you may not use this file except in compliance
+	with the License. You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing,
+	software distributed under the License is distributed on an
+	"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+	KIND, either express or implied. See the License for the
+	specific language governing permissions and limitations
+	under the License.
+-->
+<!-- START SNIPPET: webxml -->
+<web-app>
+	<servlet>
+		<servlet-name>StaticServlet</servlet-name>
+		<display-name>Static Servlet</display-name>
+		<servlet-class>
+			org.apache.cxf.management.web.logging.bootstrapping.StaticContentServlet
+		</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>StaticServlet</servlet-name>
+		<url-pattern>/logbrowser/*</url-pattern>
+	</servlet-mapping>
+
+	<servlet>
+		<servlet-name>BootstrapStorage</servlet-name>
+		<display-name>BootstrapStorage</display-name>
+		<servlet-class>
+			org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet
+		</servlet-class>
+		<init-param>
+			<param-name>javax.ws.rs.Application</param-name>
+			<param-value>
+                demo.logbrowser.BootstrapStorageApp
+            </param-value>
+		</init-param>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>BootstrapStorage</servlet-name>
+		<url-pattern>/rest/*</url-pattern>
+	</servlet-mapping>
+
+	<servlet>
+		<servlet-name>AtomPullServer</servlet-name>
+		<display-name>AtomPullServer</display-name>
+		<servlet-class>
+			org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet
+		</servlet-class>
+		<init-param>
+			<param-name>javax.ws.rs.Application</param-name>
+			<param-value>
+                demo.logbrowser.AtomPullServerApp
+            </param-value>
+		</init-param>
+		<load-on-startup>2</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>AtomPullServer</servlet-name>
+		<url-pattern>/log/*</url-pattern>
+	</servlet-mapping>
+
+	<servlet>
+		<servlet-name>Generate</servlet-name>
+		<display-name>Generate log entry</display-name>
+		<servlet-class>
+			demo.logbrowser.servlet.Generate
+		</servlet-class>
+		<load-on-startup>3</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>Generate</servlet-name>
+		<url-pattern>/generate.do</url-pattern>
+	</servlet-mapping>
+</web-app>
+<!-- END SNIPPET: webxml -->
\ No newline at end of file

Added: cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/webapp/generate.html
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/webapp/generate.html?rev=960895&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/webapp/generate.html (added)
+++ cxf/sandbox/logbrowser/distribution/src/main/release/samples/logbrowser/webapp/generate.html Tue Jul  6 13:29:01 2010
@@ -0,0 +1,62 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+    <title>Generate log entry</title>
+    <style type="text/css">
+        label {
+        width: 5em;
+        float: left;
+        text-align: right;
+        margin-right: 0.5em;
+        display: block
+        }
+        .submit input {
+        margin-left: 8em;
+        }
+    </style>
+</head>
+<body>
+<form action="generate.do" method="get">
+    <p>
+        <label for="level">Level:</label>
+        <select id="level" name="level">
+            <option value="debug">DEBUG</option>
+            <option value="info">INFO</option>
+            <option value="warning">WARNING</option>
+            <option value="error">ERROR</option>
+        </select>
+    </p>
+    
+    <p>
+        <label for="message">Message:</label>
+        <textarea id="message" name="message" rows="10" cols="80"></textarea>
+    </p>
+
+    <p>
+        <label for="exceptionMessage">Exception message:</label>
+        <textarea id="exceptionMessage" name="exceptionMessage" rows="10" cols="80"></textarea>
+    </p>
+
+    <p class="submit"><input type="submit" value="Generate"/></p>
+</form>
+</body>
+</html>
\ No newline at end of file

Added: cxf/sandbox/logbrowser/rt/management-web/README.txt
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/README.txt?rev=960895&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/README.txt (added)
+++ cxf/sandbox/logbrowser/rt/management-web/README.txt Tue Jul  6 13:29:01 2010
@@ -0,0 +1,7 @@
+Debug mode
+----------
+
+1) To run LogBorwser in the debug mode, you must type in the terminal:
+    mvn clean gwt:run -Pdev
+2) Open new browser's window and go to: 
+    http://127.0.0.1:8888/logbrowser/LogBrowser.html?gwt.codesvr=127.0.0.1:9997
\ No newline at end of file

Added: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/bootstrapping/StaticContentServlet.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/bootstrapping/StaticContentServlet.java?rev=960895&view=auto
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/bootstrapping/StaticContentServlet.java (added)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/bootstrapping/StaticContentServlet.java Tue Jul  6 13:29:01 2010
@@ -0,0 +1,239 @@
+// CHECKSTYLE:OFF
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.logging.bootstrapping;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.JarURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.zip.GZIPOutputStream;
+import java.util.zip.ZipEntry;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@SuppressWarnings("serial")
+public class StaticContentServlet extends HttpServlet {
+
+    public static interface LookupResult {
+        public void respondGet(HttpServletResponse resp) throws IOException;
+
+        public void respondHead(HttpServletResponse resp);
+
+        public long getLastModified();
+    }
+
+    public static class Error implements LookupResult {
+        protected final int statusCode;
+        protected final String message;
+
+        public Error(int statusCode, String message) {
+            this.statusCode = statusCode;
+            this.message = message;
+        }
+
+        public long getLastModified() {
+            return -1;
+        }
+
+        public void respondGet(HttpServletResponse resp) throws IOException {
+            resp.sendError(statusCode, message);
+        }
+
+        public void respondHead(HttpServletResponse resp) {
+            throw new UnsupportedOperationException();
+        }
+    }
+
+    public static class StaticFile implements LookupResult {
+        protected final long lastModified;
+        protected final String mimeType;
+        protected final int contentLength;
+        protected final boolean acceptsDeflate;
+        protected final URL url;
+
+        public StaticFile(long lastModified, String mimeType, int contentLength, boolean acceptsDeflate,
+                          URL url) {
+            this.lastModified = lastModified;
+            this.mimeType = mimeType;
+            this.contentLength = contentLength;
+            this.acceptsDeflate = acceptsDeflate;
+            this.url = url;
+        }
+
+        public long getLastModified() {
+            return lastModified;
+        }
+
+        protected boolean willDeflate() {
+            return acceptsDeflate && deflatable(mimeType) && contentLength >= deflateThreshold;
+        }
+
+        protected void setHeaders(HttpServletResponse resp) {
+            resp.setStatus(HttpServletResponse.SC_OK);
+            resp.setContentType(mimeType);
+            if (contentLength >= 0 && !willDeflate()) {
+                resp.setContentLength(contentLength);
+            }
+        }
+
+        public void respondGet(HttpServletResponse resp) throws IOException {
+            setHeaders(resp);
+            final OutputStream os;
+            if (willDeflate()) {
+                resp.setHeader("Content-Encoding", "gzip");
+                os = new GZIPOutputStream(resp.getOutputStream(), bufferSize);
+            } else {
+                os = resp.getOutputStream();
+            }
+            transferStreams(url.openStream(), os);
+        }
+
+        public void respondHead(HttpServletResponse resp) {
+            if (willDeflate()) {
+                throw new UnsupportedOperationException();
+            }
+            setHeaders(resp);
+        }
+    }
+
+    @Override
+    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+        lookup(req).respondGet(resp);
+    }
+
+    @Override
+    protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+        doGet(req, resp);
+    }
+
+    @Override
+    protected void doHead(HttpServletRequest req, HttpServletResponse resp)
+        throws IOException, ServletException {
+        try {
+            lookup(req).respondHead(resp);
+        } catch (UnsupportedOperationException e) {
+            super.doHead(req, resp);
+        }
+    }
+
+    @Override
+    protected long getLastModified(HttpServletRequest req) {
+        return lookup(req).getLastModified();
+    }
+
+    protected LookupResult lookup(HttpServletRequest req) {
+        LookupResult r = (LookupResult)req.getAttribute("lookupResult");
+        if (r == null) {
+            r = lookupNoCache(req);
+            req.setAttribute("lookupResult", r);
+        }
+        return r;
+    }
+
+    protected LookupResult lookupNoCache(HttpServletRequest req) {
+        final String path = getPath(req);
+        final URL jarURL = getClass().getProtectionDomain().getCodeSource().getLocation();
+        final URL url;
+        try {
+            url = new URL(String.format("jar:%s!/static-content%s", jarURL.toString(), path));
+        } catch (MalformedURLException e) {
+            return new Error(HttpServletResponse.SC_BAD_REQUEST, "Malformed path");
+        }
+        final String mimeType = getMimeType(path);
+        try {
+            final JarURLConnection jurc = (JarURLConnection)url.openConnection();
+            if (jurc.getContentLength() == -1) {
+                return new Error(HttpServletResponse.SC_NOT_FOUND, "Not found");
+            }
+            final ZipEntry ze = jurc.getJarEntry();
+            if (ze != null) {
+                if (ze.isDirectory()) {
+                    return new Error(HttpServletResponse.SC_FORBIDDEN, "Forbidden");
+                } else {
+                    return new StaticFile(ze.getTime(), mimeType, 
+                        (int)ze.getSize(), acceptsDeflate(req), url);
+                }
+            } else {
+                return new Error(HttpServletResponse.SC_NOT_FOUND, "Not found");
+            }
+        } catch (IOException e) {
+            return new Error(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Internal server error");
+        }
+    }
+
+    protected String getPath(HttpServletRequest req) {
+        String servletPath = req.getServletPath();
+        String pathInfo = coalesce(req.getPathInfo(), "");
+        return servletPath + pathInfo;
+    }
+
+    protected boolean isForbidden(String path) {
+        String lpath = path.toLowerCase();
+        return lpath.startsWith("/web-inf/") || lpath.startsWith("/meta-inf/");
+    }
+
+    protected String getMimeType(String path) {
+        return coalesce(getServletContext().getMimeType(path), "application/octet-stream");
+    }
+
+    public static <T> T coalesce(T... ts) {
+        for (T t : ts) {
+            if (t != null) {
+                return t;
+            }
+        }
+        return null;
+    }
+
+    protected static boolean acceptsDeflate(HttpServletRequest req) {
+        final String ae = req.getHeader("Accept-Encoding");
+        return ae != null && ae.contains("gzip");
+    }
+
+    protected static boolean deflatable(String mimetype) {
+        return mimetype.startsWith("text/")
+            || "application/postscript".equals(mimetype)
+            || mimetype.startsWith("application/ms")
+            || mimetype.startsWith("application/vnd")
+            || "xml".equals(mimetype);
+    }
+
+    protected static final int deflateThreshold = 4 * 1024;
+
+    protected static final int bufferSize = 4 * 1024;
+
+    protected static void transferStreams(InputStream is, OutputStream os) throws IOException {
+        try {
+            byte[] buf = new byte[bufferSize];
+            int bytesRead;
+            while ((bytesRead = is.read(buf)) != -1) {
+                os.write(buf, 0, bytesRead);
+            }
+        } finally {
+            is.close();
+            os.close();
+        }
+    }
+}

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/browser/Entry.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/browser/Entry.java?rev=960895&r1=960894&r2=960895&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/browser/Entry.java (original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/browser/Entry.java Tue Jul  6 13:29:01 2010
@@ -28,8 +28,7 @@ import com.google.gwt.xml.client.NodeLis
 import static com.google.gwt.xml.client.Node.*;
 
 public class Entry {
-    private static DateTimeFormat dtf = DateTimeFormat.getFormat("yyyy-MM-ddTHH:mm:ss.SSSZ");
-
+    private static DateTimeFormat dtf = DateTimeFormat.getFormat("yyyy-MM-ddTHH:mm:ss'.'SSSZ");
     private final Node root;
     private String message;
     private String level;

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/presenter/PlaceManager.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/presenter/PlaceManager.java?rev=960895&r1=960894&r2=960895&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/presenter/PlaceManager.java (original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/presenter/PlaceManager.java Tue Jul  6 13:29:01 2010
@@ -24,7 +24,7 @@ import java.util.Map;
 import com.google.gwt.event.logical.shared.ValueChangeEvent;
 import com.google.gwt.event.logical.shared.ValueChangeHandler;
 import com.google.gwt.user.client.History;
-import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.RootLayoutPanel;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 
@@ -124,7 +124,7 @@ public class PlaceManager implements Val
         }
         currentPresenter = presenter;
 
-        presenter.go(RootPanel.get());
+        presenter.go(RootLayoutPanel.get());
     }
 
     public void start() {

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/BrowseViewImpl.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/BrowseViewImpl.java?rev=960895&r1=960894&r2=960895&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/BrowseViewImpl.java (original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/BrowseViewImpl.java Tue Jul  6 13:29:01 2010
@@ -306,9 +306,16 @@ public class BrowseViewImpl extends Comp
         StringBuilder sb = new StringBuilder();
         sb.append("[").append(DT_FORMATTER.format(entry.getEventTimestamp())).append("]");
         sb.append("[").append(entry.getLevel()).append("]");
-        sb.append("[").append(entry.getThreadName()).append("]");
-        sb.append(entry.getMessage()).append("\n");
-        sb.append(entry.getThrowable());
+
+        if (entry.getThreadName() != null) {
+            sb.append("[").append(entry.getThreadName()).append("]");
+        }
+        if (entry.getMessage() != null) {
+            sb.append(entry.getMessage()).append("\n");
+        }
+        if (entry.getThrowable() != null) {
+            sb.append(entry.getThrowable());
+        }
 
         entryDetails.setHTML(sb.toString());
     }

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsView.ui.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsView.ui.xml?rev=960895&r1=960894&r2=960895&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsView.ui.xml (original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/browser/client/view/SettingsView.ui.xml Tue Jul  6 13:29:01 2010
@@ -22,15 +22,19 @@
 	xmlns:g='urn:import:com.google.gwt.user.client.ui'>
 
 	<ui:style>
+        .header {
+            margin-top:0.5em;
+            margin-bottom:0em;
+            margin-right:2em;
+            margin-left:2em;
+        }
         .signOut {
-        padding-right:4em;
-        padding-top:0.3em;
+        margin-bottom:1em;
         text-align:right;
         }
         .settings {
         background: #FFCC66 none repeat scroll 0 0;
-        margin: 2em auto;
-        width: 90%;
+        width:100%;
         }
 
         .back {
@@ -51,51 +55,47 @@
         }
     </ui:style>
 
-	<g:HTMLPanel>
-		<div>
-			<g:Hyperlink ui:field="singOutHyperlink" addStyleNames="{style.signOut}">Sign
-				out</g:Hyperlink>
-			<g:VerticalPanel addStyleNames="{style.settings}">
-				<g:HorizontalPanel>
-					<g:Label addStyleNames="{style.title}">
-						Settings
-                    </g:Label>
-					<g:Hyperlink ui:field="backHyperlink" addStyleNames="{style.back}">
-						« Back to browse
-                    </g:Hyperlink>
-				</g:HorizontalPanel>
-
-				<g:TabLayoutPanel stylePrimaryName="settingsTabPanel"
-					barUnit="EM" barHeight="2" height="300px">
-					<g:tab>
-						<g:header>Endpoints</g:header>
-							<g:DockLayoutPanel unit="EM">
-								<g:north size="2">
-                                    <g:Button ui:field="addSubscriptionButton">
-                                        Add endpoint
-                                    </g:Button>
-								</g:north>
-
-								<g:center>
-                                    <g:ScrollPanel>
-                                        <g:FlexTable ui:field="subscriptionsFlexTable"
-                                            addStyleNames="{style.subscriptions}" />
-                                    </g:ScrollPanel>
-								</g:center>
-							</g:DockLayoutPanel>
-						<!--<g:HTMLPanel>
-							<g:Button ui:field="addSubscriptionButton">
-								Add endpoint
+
+    <g:DockLayoutPanel unit='EM'>
+        <g:north size='5'>
+            <g:HTMLPanel addStyleNames="{style.header}">
+                <g:Hyperlink ui:field="singOutHyperlink" addStyleNames="{style.signOut}">
+                    Sign out
+                </g:Hyperlink>
+                <g:VerticalPanel addStyleNames="{style.settings}">
+                    <g:HorizontalPanel>
+                        <g:Label addStyleNames="{style.title}">
+                            Settings
+                        </g:Label>
+                        <g:Hyperlink ui:field="backHyperlink" addStyleNames="{style.back}">
+                            &#171; Back to browse
+                        </g:Hyperlink>
+                    </g:HorizontalPanel>
+                </g:VerticalPanel>
+            </g:HTMLPanel>
+        </g:north>
+        <g:west size="2"><g:HTMLPanel></g:HTMLPanel></g:west>
+        <g:east size="2"><g:HTMLPanel></g:HTMLPanel></g:east>
+        <g:center>
+            <g:TabLayoutPanel barUnit="EM" barHeight="2" stylePrimaryName="settingsTabPanel">
+                <g:tab>
+                    <g:header>Endpoints</g:header>
+                    <g:DockLayoutPanel unit='EM'>
+                        <g:north size="2">
+                            <g:Button ui:field="addSubscriptionButton">
+                                Add endpoint
                             </g:Button>
+                        </g:north>
+                        <g:center>
                             <g:ScrollPanel>
                                 <g:FlexTable ui:field="subscriptionsFlexTable"
-                                    addStyleNames="{style.subscriptions}" />
+                                             addStyleNames="{style.subscriptions}"/>
                             </g:ScrollPanel>
-						</g:HTMLPanel>-->
-					</g:tab>
-				</g:TabLayoutPanel>
-			</g:VerticalPanel>
-		</div>
-	</g:HTMLPanel>
+                        </g:center>
+                    </g:DockLayoutPanel>
+                </g:tab>
+            </g:TabLayoutPanel>
+        </g:center>
+    </g:DockLayoutPanel>
 
 </ui:UiBinder>

Modified: cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/LogBrowser.css
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/LogBrowser.css?rev=960895&r1=960894&r2=960895&view=diff
==============================================================================
--- cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/LogBrowser.css (original)
+++ cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/LogBrowser.css Tue Jul  6 13:29:01 2010
@@ -1,21 +1,18 @@
 .settingsTabPanel {
-	margin: 0.3em;
 }
 
 .settingsTabPanel .gwt-TabLayoutPanelTabs {
-	
+	background: #FFCC66 none repeat scroll 0 0;
+	top:0em;
 }
 
 .settingsTabPanel .gwt-TabLayoutPanelContent {
-	/*border-color: #92C1F0;*/
-	border-color: #FFF7D7;
-	background: #FFF7D7 none repeat scroll 0 0;
-	border-style: solid;
-	border-width: 3px 2px 2px;
-	overflow: hidden;
-	padding: 6px;
-	height:100%;
-	width:100%;
+    background: #FFF7D7 none repeat scroll 0 0;
+    border-color:#FFF7D7;
+    border-style:solid;
+    border-width:3px 2px 2px;
+    overflow:hidden;
+    padding:6px;
 }
 
 .settingsTabPanel .gwt-TabLayoutPanelTab {

Added: cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/loader.gif
URL: http://svn.apache.org/viewvc/cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/loader.gif?rev=960895&view=auto
==============================================================================
Binary file - no diff available.

Propchange: cxf/sandbox/logbrowser/rt/management-web/src/main/resources/org/apache/cxf/management/web/logging/browser/public/loader.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message