You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/12/22 14:23:23 UTC
[1/8] cxf git commit: [CXF-7192] Removing cxf-rt-management-web
module, to be restored on demand
Repository: cxf
Updated Branches:
refs/heads/master 337742ff1 -> 7f4a24d03
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/StandardConverter.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/StandardConverter.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/StandardConverter.java
deleted file mode 100644
index 52e4ee5..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/StandardConverter.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/**
- * 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.atom.converter;
-
-import java.io.StringWriter;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-
-import org.apache.abdera.Abdera;
-import org.apache.abdera.factory.Factory;
-import org.apache.abdera.model.Content;
-import org.apache.abdera.model.Element;
-import org.apache.abdera.model.Entry;
-import org.apache.abdera.model.ExtensibleElement;
-import org.apache.abdera.model.Feed;
-import org.apache.commons.lang3.Validate;
-import org.apache.cxf.jaxrs.provider.atom.AbstractEntryBuilder;
-import org.apache.cxf.jaxrs.provider.atom.AbstractFeedBuilder;
-import org.apache.cxf.management.web.logging.LogRecord;
-import org.apache.cxf.management.web.logging.LogRecords;
-
-/**
- * Converter producing ATOM Feeds on standalone Entries with LogRecords or LogRecordsLists embedded as content
- * or extension. For configuration details see constructor documentation.
- */
-public class StandardConverter implements Converter {
-
- /** Conversion output */
- public enum Output {
- FEED,
- ENTRY
- }
-
- /** Quantities of entries in feed or logrecords in entry */
- public enum Multiplicity {
- ONE,
- MANY
- }
-
- /** Entity format */
- public enum Format {
- CONTENT,
- EXTENSION
- }
-
- private Factory factory;
- private JAXBContext context;
- private DateFormat df;
- private Converter worker;
- private AbstractFeedBuilder<List<LogRecord>> feedBuilder;
- private AbstractEntryBuilder<List<LogRecord>> entryBuilder;
-
- /**
- * Creates configured converter with default post-processing of feeds/entries mandatory properties.
- * Regardless of "format", combination of "output" and "multiplicity" flags can be interpreted as follow:
- * <ul>
- * <li>ENTRY ONE - for each log record one entry is produced, converter returns list of entries</li>
- * <li>ENTRY MANY - list of log records is packed in one entry, converter return one entry.</li>
- * <li>FEED ONE - list of log records is packed in one entry, entry is inserted to feed, converter returns
- * one feed.</li>
- * <li>FEED MANY - for each log record one entry is produced, entries are collected in one feed, converter
- * returns one feed.</li>
- * </ul>
- *
- * @param output whether root elements if Feed or Entry (e.g. for AtomPub).
- * @param multiplicity for output==FEED it is multiplicity of entities in feed for output==ENTITY it is
- * multiplicity of log records in entity.
- * @param format log records embedded as entry content or extension.
- */
- public StandardConverter(Output output, Multiplicity multiplicity, Format format) {
- this(output, multiplicity, format, null, null);
- }
-
- /**
- * Creates configured converter with feeds/entries post-processing based on data provided by feed and
- * entry builders.
- */
- public StandardConverter(Output output, Multiplicity multiplicity, Format format,
- AbstractFeedBuilder<List<LogRecord>> feedBuilder,
- AbstractEntryBuilder<List<LogRecord>> entryBuilder) {
- Validate.notNull(output, "output is null");
- Validate.notNull(multiplicity, "multiplicity is null");
- Validate.notNull(format, "format is null");
- this.feedBuilder = feedBuilder;
- this.entryBuilder = entryBuilder;
-
- configure(output, multiplicity, format); //NOPMD
- df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
- factory = Abdera.getNewFactory();
- try {
- context = JAXBContext.newInstance(LogRecords.class, LogRecord.class);
- } catch (JAXBException e) {
- throw new RuntimeException(e);
- }
- }
-
- public List<? extends Element> convert(List<LogRecord> records) {
- return worker.convert(records);
- }
-
- private void configure(final Output output, final Multiplicity multiplicity, final Format format) {
- if (output == Output.ENTRY && multiplicity == Multiplicity.ONE) {
- worker = new Converter() {
- public List<Entry> convert(List<LogRecord> records) {
- return createEntries(format, records);
- }
- };
- }
- if (output == Output.ENTRY && multiplicity == Multiplicity.MANY) {
- worker = new Converter() {
- public List<Entry> convert(List<LogRecord> records) {
- // produces one entry with list of all log records
- return Arrays.asList(createEntryFromList(format, records));
- }
- };
- }
- if (output == Output.FEED && multiplicity == Multiplicity.ONE) {
- worker = new Converter() {
- public List<Feed> convert(List<LogRecord> records) {
- // produces one feed with one entry with list of all log records
- return Arrays.asList(createFeedWithSingleEntry(format, records));
- }
- };
- }
- if (output == Output.FEED && multiplicity == Multiplicity.MANY) {
- worker = new Converter() {
- public List<Feed> convert(List<LogRecord> records) {
- // produces one feed with many entries, each entry with one log record
- return Arrays.asList(createFeed(format, records));
- }
- };
- }
- if (worker == null) {
- throw new IllegalArgumentException("Unsupported configuration");
- }
- }
-
- private List<Entry> createEntries(Format format, List<LogRecord> records) {
- List<Entry> entries = new ArrayList<Entry>();
- for (int i = 0; i < records.size(); i++) {
- entries.add(createEntryFromRecord(format, records.get(i), i));
- }
- return entries;
- }
-
- private Entry createEntryFromList(Format format, List<LogRecord> records) {
- Entry e = createEntry(records, 0);
- if (format == Format.CONTENT) {
- setEntryContent(e, createContent(records));
- } else {
- setEntryContent(e, createExtension(records));
- }
- return e;
- }
-
- private Entry createEntryFromRecord(Format format, LogRecord record, int entryIndex) {
- Entry e = createEntry(Collections.singletonList(record), entryIndex);
- if (format == Format.CONTENT) {
- setEntryContent(e, createContent(record));
- } else {
- setEntryContent(e, createExtension(record));
- }
- return e;
- }
-
- private String createContent(LogRecord record) {
- StringWriter writer = new StringWriter();
- try {
- context.createMarshaller().marshal(record, writer);
- } catch (JAXBException e) {
- throw new RuntimeException(e);
- }
- return writer.toString();
- }
-
- private String createContent(List<LogRecord> records) {
- StringWriter writer = new StringWriter();
- LogRecords list = new LogRecords();
- list.setLogRecords(records);
- try {
- context.createMarshaller().marshal(list, writer);
- } catch (JAXBException e) {
- throw new RuntimeException(e);
- }
- return writer.toString();
- }
-
- private ExtensibleElement createExtension(LogRecord record) {
- ExtensibleElement erec = factory.newExtensionElement(qn("logRecord"));
-
- // forget about single line "addExtension().setText()" since
- // javac failure "org.apache.abdera.model.Element cannot be dereferenced"
- Element e = erec.addExtension(qn("eventTimestamp"));
- e.setText(toAtomDateFormat(record.getDate()));
- e = erec.addExtension(qn("level"));
- e.setText(record.getLevel().toString());
- e = erec.addExtension(qn("loggerName"));
- e.setText(record.getLoggerName());
- e = erec.addExtension(qn("message"));
- e.setText(record.getMessage());
- e = erec.addExtension(qn("threadName"));
- e.setText(record.getThreadName());
- e = erec.addExtension(qn("throwable"));
- e.setText(record.getThrowable());
- return erec;
- }
-
- private String toAtomDateFormat(Date d) {
- String date = df.format(d);
- // timezone in date does not have semicolon as XML Date requires
- // e.g we have "2009-11-23T22:03:53.996+0100"
- // instead of "2009-11-23T22:03:53.996+01:00"
- return date.substring(0, date.length() - 2) + ":" + date.substring(date.length() - 2);
- }
-
- private QName qn(String name) {
- return new QName("http://cxf.apache.org/log", name, "log");
- }
-
- private ExtensibleElement createExtension(List<LogRecord> records) {
- ExtensibleElement list = factory.newExtensionElement(qn("logRecords"));
- for (LogRecord rec : records) {
- list.addExtension(createExtension(rec));
- }
- return list;
- }
-
- private Entry createEntry(List<LogRecord> records, int entryIndex) {
- Entry entry = factory.newEntry();
- setDefaultEntryProperties(entry, records, entryIndex);
-
- return entry;
- }
-
- private void setEntryContent(Entry e, String content) {
- e.setContent(content, Content.Type.XML);
- }
-
- private void setEntryContent(Entry e, ExtensibleElement ext) {
- e.addExtension(ext);
- }
-
- private Feed createFeedWithSingleEntry(Format format, List<LogRecord> records) {
-
- Feed feed = factory.newFeed();
- feed.addEntry(createEntryFromList(format, records));
- setDefaultFeedProperties(feed, records);
- return feed;
- }
-
- private Feed createFeed(Format format, List<LogRecord> records) {
-
- Feed feed = factory.newFeed();
- List<Entry> entries = createEntries(format, records);
- for (Entry entry : entries) {
- feed.addEntry(entry);
- }
- setDefaultFeedProperties(feed, records);
- return feed;
- }
-
- protected void setDefaultFeedProperties(Feed feed, List<LogRecord> records) {
- if (feedBuilder != null) {
- feed.setId(feedBuilder.getId(records));
- feed.addAuthor(feedBuilder.getAuthor(records));
- feed.setTitle(feedBuilder.getTitle(records));
- feed.setUpdated(feedBuilder.getUpdated(records));
- feed.setBaseUri(feedBuilder.getBaseUri(records));
- List<String> categories = feedBuilder.getCategories(records);
- if (categories != null) {
- for (String category : categories) {
- feed.addCategory(category);
- }
- }
- Map<String, String> links = feedBuilder.getLinks(records);
- if (links != null) {
- for (java.util.Map.Entry<String, String> mapEntry : links.entrySet()) {
- feed.addLink(mapEntry.getKey(), mapEntry.getValue());
- }
- }
- } else {
- feed.setId("uuid:" + UUID.randomUUID().toString());
- feed.addAuthor("CXF");
- feed.setTitle("CXF Service Log Entries");
- feed.setUpdated(new Date());
- }
- }
-
- protected void setDefaultEntryProperties(Entry entry, List<LogRecord> records,
- int entryIndex) {
- if (entryBuilder != null) {
- entry.setId(entryBuilder.getId(records));
- entry.addAuthor(entryBuilder.getAuthor(records));
- entry.setTitle(entryBuilder.getTitle(records));
- entry.setUpdated(entryBuilder.getUpdated(records));
- entry.setBaseUri(entryBuilder.getBaseUri(records));
- entry.setSummary(entryBuilder.getSummary(records));
- List<String> categories = entryBuilder.getCategories(records);
- if (categories != null) {
- for (String category : categories) {
- entry.addCategory(category);
- }
- }
- Map<String, String> links = entryBuilder.getLinks(records);
- if (links != null) {
- for (java.util.Map.Entry<String, String> mapEntry : links.entrySet()) {
- entry.addLink(mapEntry.getKey(), mapEntry.getValue());
- }
- }
- entry.setPublished(entryBuilder.getPublished(records));
- entry.setSummary(entryBuilder.getSummary(records));
- } else {
- entry.addAuthor("CXF");
- if (records.size() != 1) {
- entry.setId("uuid:" + UUID.randomUUID().toString());
- entry.setTitle(String.format("Entry with %d log record(s)",
- records.size()));
- } else {
- entry.setId(records.get(0).getId());
- entry.setTitle("Log record with level " + records.get(0).getLevel().toString());
- entry.setSummary(records.get(0).getLoggerName() + " : " + records.get(0).getMessage());
- }
- if (records.size() > 0) {
- entry.setUpdated(toAtomDateFormat(records.get(0).getDate()));
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/Deliverer.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/Deliverer.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/Deliverer.java
deleted file mode 100644
index efc0e46..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/Deliverer.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.atom.deliverer;
-
-import org.apache.abdera.model.Element;
-
-/**
- * ATOM element deliverer. Represents transport strategy e.g. using
- * {@link org.apache.cxf.jaxrs.client.WebClient}, SOAP reliable messaging etc.
- */
-public interface Deliverer {
-
- /**
- * Delivers ATOM element.
- *
- * @param element element to deliver.
- * @return true if delivery successful, false otherwise.
- */
- boolean deliver(Element element) throws InterruptedException;
-
- /**
- * Returns the address of the remote endpoint this deliverer send elements to
- * @return
- */
- String getEndpointAddress();
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/RetryingDeliverer.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/RetryingDeliverer.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/RetryingDeliverer.java
deleted file mode 100644
index b8b1977..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/RetryingDeliverer.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- * 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.atom.deliverer;
-
-import java.util.Calendar;
-import java.util.Date;
-
-import org.apache.abdera.model.Element;
-import org.apache.commons.lang3.Validate;
-
-/**
- * Wrapper on other deliverer retrying delivery in case of failure. Delivery attempts repeat in loop with some
- * pause time between retries until successful delivery or exceeding time limit. Time delay between delivery
- * is configurable strategy. Two predefined strategies are given: each time pause same amount of time (linear)
- * and each next time pause time doubles (exponential).
- */
-public final class RetryingDeliverer implements Deliverer {
-
- private Deliverer deliverer;
- private PauseCalculator pauser;
- private int timeout;
-
- /**
- * Creates retrying deliverer with predefined retry strategy.
- *
- * @param worker real deliverer used to push data out.
- * @param timeout maximum time range (in seconds) that retrial is continued; time spent on delivery call
- * is included. No timeout (infinite loop) if set to zero.
- * @param pause time of pause (in seconds) greater than zero.
- * @param linear if true linear strategy (each time pause same amount of time), exponential otherwise
- * (each next time pause time doubles).
- */
- public RetryingDeliverer(Deliverer worker, int timeout, int pause, boolean linear) {
- Validate.notNull(worker, "worker is null");
- Validate.isTrue(timeout >= 0, "timeout is negative");
- Validate.isTrue(pause > 0, "pause is not greater than zero");
- deliverer = worker;
- this.timeout = timeout;
- this.pauser = linear ? new ConstantPause(pause) : new ExponentialPause(pause);
- }
-
- /**
- * Creates retrying deliverer with custom retry strategy.
- *
- * @param worker real deliverer used to push data out.
- * @param timeout maximum time range (in seconds) that retrial is continued; time spent on delivery call
- * is included. No timeout (infinite loop) if set to zero.
- * @param strategy custom retry pausing strategy.
- */
- public RetryingDeliverer(Deliverer worker, int timeout, PauseCalculator strategy) {
- Validate.notNull(worker, "worker is null");
- Validate.notNull(strategy, "strategy is null");
- Validate.isTrue(timeout >= 0, "timeout is negative");
- deliverer = worker;
- pauser = strategy;
- this.timeout = timeout;
- }
-
- public boolean deliver(Element element) throws InterruptedException {
- Calendar cal = Calendar.getInstance();
- cal.add(Calendar.SECOND, timeout);
- Date timeoutDate = cal.getTime();
- while (!deliverer.deliver(element)) {
- int sleep = pauser.nextPause();
- cal = Calendar.getInstance();
- cal.add(Calendar.SECOND, sleep);
- if (timeout == 0 || timeoutDate.after(cal.getTime())) {
- Thread.sleep((long)sleep * 1000L);
- } else {
- pauser.reset();
- return false;
- }
- }
- pauser.reset();
- return true;
- }
-
- /** Calculates time of subsequent pauses between delivery attempts. */
- public interface PauseCalculator {
-
- /** Time of next pause (in seconds). */
- int nextPause();
-
- /** Restarts calculation. */
- void reset();
- }
-
- private static class ConstantPause implements PauseCalculator {
- private int pause;
-
- ConstantPause(int pause) {
- this.pause = pause;
- }
-
- public int nextPause() {
- return pause;
- }
-
- public void reset() {
- }
- }
-
- private static class ExponentialPause implements PauseCalculator {
- private int pause;
- private int current;
-
- ExponentialPause(int pause) {
- this.pause = pause;
- current = pause;
- }
-
- public int nextPause() {
- int c = current;
- current *= 2;
- return c;
- }
-
- public void reset() {
- current = pause;
- }
- }
-
- public String getEndpointAddress() {
- return deliverer.getEndpointAddress();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/WebClientDeliverer.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/WebClientDeliverer.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/WebClientDeliverer.java
deleted file mode 100644
index 6fec88f..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/deliverer/WebClientDeliverer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.atom.deliverer;
-
-import java.util.Arrays;
-import java.util.List;
-
-import javax.ws.rs.core.Response;
-
-import org.apache.abdera.model.Element;
-import org.apache.abdera.model.Feed;
-import org.apache.commons.lang3.Validate;
-import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.cxf.jaxrs.provider.atom.AtomEntryProvider;
-import org.apache.cxf.jaxrs.provider.atom.AtomFeedProvider;
-
-/**
- * Marshaling and delivering based on JAXRS' WebClient.
- */
-public final class WebClientDeliverer implements Deliverer {
- private WebClient wc;
-
- @SuppressWarnings("unchecked")
- public WebClientDeliverer(String deliveryAddress) {
- Validate.notEmpty(deliveryAddress, "deliveryAddress is empty or null");
- List<?> providers = Arrays.asList(new AtomFeedProvider(), new AtomEntryProvider());
- wc = WebClient.create(deliveryAddress, providers);
- }
-
- public WebClientDeliverer(WebClient wc) {
- Validate.notNull(wc, "wc is null");
- this.wc = wc;
- }
-
- public boolean deliver(Element element) {
- String type = element instanceof Feed ? "application/atom+xml" : "application/atom+xml;type=entry";
- wc.type(type);
- Response res = wc.post(element);
- int status = res.getStatus();
- return status >= 200 && status <= 299;
- }
-
- public String getEndpointAddress() {
- return wc.getBaseURI().toString();
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/package-info.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/package-info.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/package-info.java
deleted file mode 100644
index 6ece89a..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/package-info.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.
- */
-
-/**
- * Support for producing logs in
- * <a href="http://tools.ietf.org/html/rfc4287">ATOM Syndication Format</a>.
- * Allows to configure <tt>java.util.logging</tt> (JUL) loggers to use
- * handlers producing ATOM feeds that are either pushed to or pulled by client.
- */
-@Hold
-package org.apache.cxf.management.web.logging.atom;
-
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/package-info.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/package-info.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/package-info.java
deleted file mode 100644
index 719f6bf..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.
- */
-
-/**
- * CXF specific logging support. Based on <tt>java.util.logging</tt> (JUL)
- * with use of different logging frameworks factored out; assumes that client
- * with source code logging to other systems, like Log4J, can bridge
- * to this implementation applying <a href="www.slf4j.org">SLF4J</a>
- * that JAXRS already depends on.
- */
-@javax.xml.bind.annotation.XmlSchema(xmlns = {
- @javax.xml.bind.annotation.XmlNs(namespaceURI = "http://cxf.apache.org/log", prefix = "log")
- })
-package org.apache.cxf.management.web.logging;
-
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/test/gwt-debug/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/rt/management-web/src/test/gwt-debug/WEB-INF/web.xml b/rt/management-web/src/test/gwt-debug/WEB-INF/web.xml
deleted file mode 100644
index c209885..0000000
--- a/rt/management-web/src/test/gwt-debug/WEB-INF/web.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
- <welcome-file-list>
- <welcome-file>logbrowser/LogBrowser.html</welcome-file>
- </welcome-file-list>
- <servlet>
- <servlet-name>Generate</servlet-name>
- <display-name>Generate log entry</display-name>
- <servlet-class>
- org.apache.cxf.management.web.logging.Generate
- </servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet>
- <servlet-name>MockApp</servlet-name>
- <display-name>MockApp</display-name>
- <servlet-class>
- org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet
- </servlet-class>
- <init-param>
- <param-name>javax.ws.rs.Application</param-name>
- <param-value>
- org.apache.cxf.management.web.logging.MockApp
- </param-value>
- </init-param>
- <init-param>
- <param-name>jaxrs.inInterceptors</param-name>
- <param-value>
- org.apache.cxf.interceptor.LoggingInInterceptor
- </param-value>
- </init-param>
- <init-param>
- <param-name>jaxrs.outInterceptors</param-name>
- <param-value>
- org.apache.cxf.interceptor.LoggingOutInterceptor
- </param-value>
- </init-param>
- <load-on-startup>2</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>Generate</servlet-name>
- <url-pattern>/generate.do</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>MockApp</servlet-name>
- <url-pattern>/log/*</url-pattern>
- </servlet-mapping>
-</web-app>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/test/gwt-debug/generate.html
----------------------------------------------------------------------
diff --git a/rt/management-web/src/test/gwt-debug/generate.html b/rt/management-web/src/test/gwt-debug/generate.html
deleted file mode 100644
index d7b1e1b..0000000
--- a/rt/management-web/src/test/gwt-debug/generate.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!--
- ~ 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="copies">Copies:</label>
- <input id="copies" name="copies" type="text" size="2" value="1"/>
- </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
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/test/gwt-debug/org/apache/cxf/management/web/logging/Generate.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/test/gwt-debug/org/apache/cxf/management/web/logging/Generate.java b/rt/management-web/src/test/gwt-debug/org/apache/cxf/management/web/logging/Generate.java
deleted file mode 100644
index 42f5efe..0000000
--- a/rt/management-web/src/test/gwt-debug/org/apache/cxf/management/web/logging/Generate.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * 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;
-
-import java.io.IOException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.cxf.common.logging.LogUtils;
-
-public class Generate extends HttpServlet {
- private static final Logger LOGGER = LogUtils.getL7dLogger(Generate.class);
-
- private static final String LEVEL = "level";
- private static final String MESSAGE = "message";
- private static final String COPIES = "copies";
- 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);
-
- int copies;
- try {
- copies = Integer.valueOf(request.getParameter(COPIES));
- if (copies < 0) {
- copies = 1;
- }
- } catch (NumberFormatException e) {
- copies = 1;
- }
-
- assert copies >= 1;
- assert level != null && !"".equals(level);
-
- if (name(Levels.DEBUG).equals(level)) {
- log(Level.FINE, message, exceptionMessage, copies);
- } else if (name(Levels.INFO).equals(level)) {
- log(Level.INFO, message, exceptionMessage, copies);
- } else if (name(Levels.WARNING).equals(level)) {
- log(Level.WARNING, message, exceptionMessage, copies);
- } else if (name(Levels.ERROR).equals(level)) {
- log(Level.SEVERE, message, exceptionMessage, copies);
- }
-
- 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, final int copies) {
- if (message != null && !"".equals(message)) {
- for (int i = 0; i < copies; i++) {
- 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();
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/test/gwt-debug/org/apache/cxf/management/web/logging/MockApp.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/test/gwt-debug/org/apache/cxf/management/web/logging/MockApp.java b/rt/management-web/src/test/gwt-debug/org/apache/cxf/management/web/logging/MockApp.java
deleted file mode 100644
index 7978b58..0000000
--- a/rt/management-web/src/test/gwt-debug/org/apache/cxf/management/web/logging/MockApp.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * 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;
-
-import java.util.HashSet;
-import java.util.Set;
-import javax.ws.rs.core.Application;
-import javax.ws.rs.ext.Provider;
-
-import org.apache.cxf.jaxrs.ext.search.SearchContextProvider;
-import org.apache.cxf.jaxrs.provider.atom.AtomEntryProvider;
-import org.apache.cxf.jaxrs.provider.atom.AtomFeedProvider;
-import org.apache.cxf.management.web.browser.bootstrapping.BootstrapStorage;
-import org.apache.cxf.management.web.browser.bootstrapping.SimpleXMLSettingsStorage;
-import org.apache.cxf.management.web.logging.atom.AtomPullServer;
-
-@Provider
-public class MockApp extends Application {
- private static final AtomPullServer LOGS;
-
- static {
- LOGS = new AtomPullServer();
- LOGS.setLogger("org.apache.cxf.management.web.logging.Generate");
- LOGS.init();
- }
-
- private static final AtomFeedProvider FEED = new AtomFeedProvider();
- private static final AtomEntryProvider ENTRY = new AtomEntryProvider();
-
- private static final BootstrapStorage BOOTSTRAP_STORAGE =
- new BootstrapStorage(new SimpleXMLSettingsStorage());
-
- private static final BootstrapStorage.SettingsProvider SETTINGS =
- new BootstrapStorage.SettingsProvider();
-
- @Override
- public Set<Class<?>> getClasses() {
- Set<Class<?>> classes = new HashSet<Class<?>>();
- classes.add(AtomPullServer.class);
- classes.add(AtomFeedProvider.class);
- classes.add(AtomEntryProvider.class);
- classes.add(BootstrapStorage.class);
- classes.add(BootstrapStorage.SettingsProvider.class);
- classes.add(SearchContextProvider.class);
- return classes;
- }
-
- @Override
- public Set<Object> getSingletons() {
- Set<Object> classes = new HashSet<Object>();
- classes.add(LOGS);
- classes.add(FEED);
- classes.add(ENTRY);
- classes.add(BOOTSTRAP_STORAGE);
- classes.add(SETTINGS);
- return classes;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/ReadOnlyFileStorageTest.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/ReadOnlyFileStorageTest.java b/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/ReadOnlyFileStorageTest.java
deleted file mode 100644
index 08fe7b3..0000000
--- a/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/ReadOnlyFileStorageTest.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/**
- * 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;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.cxf.jaxrs.ext.search.ConditionType;
-import org.apache.cxf.jaxrs.ext.search.PrimitiveSearchCondition;
-import org.apache.cxf.jaxrs.ext.search.SearchCondition;
-import org.apache.cxf.jaxrs.ext.search.SearchUtils;
-import org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ReadOnlyFileStorageTest extends Assert {
-
- private ReadOnlyFileStorage storage;
-
- @Before
- public void setUp() throws Exception {
- storage = new ReadOnlyFileStorage();
-
- storage.setNumberOfColumns("7");
- storage.setColumnSep("|");
-
- Map<Integer, String> columnsMap = new HashMap<Integer, String>();
- columnsMap.put(1, ReadOnlyFileStorage.DATE_PROPERTY);
- columnsMap.put(2, ReadOnlyFileStorage.LEVEL_PROPERTY);
- columnsMap.put(7, ReadOnlyFileStorage.MESSAGE_PROPERTY);
-
- storage.setColumnsMap(columnsMap);
-
- storage.setRecordDateFormat(ReadOnlyFileStorage.DATE_ONLY_FORMAT
- + " " + "kk:mm:ss,SSS");
- storage.setFileNameDatePattern("(\\d\\d\\d\\d-\\d\\d-\\d\\d)-.+");
-
- storage.setUseFileModifiedDate(true);
-
-
- }
-
- @After
- public void tearDown() throws Exception {
- storage.close();
- }
-
- @Test
- public void testReadRecords() throws Exception {
-
- storage.setLogLocation(getClass().getResource("logs/2011-01-22-karaf.log").toURI().getPath());
- List<LogRecord> recordsFirstPage1 = readPage(1, 10, 10);
-
- readPage(2, 10, 10);
- readPage(3, 10, 10);
- List<LogRecord> recordsLastPage1 = readPage(4, 10, 2);
-
- List<LogRecord> recordsFirstPage2 = readPage(1, 10, 10);
- compareRecords(recordsFirstPage1, recordsFirstPage2);
-
- List<LogRecord> recordsLastPage2 = readPage(4, 10, 2);
- compareRecords(recordsLastPage1, recordsLastPage2);
-
- LogRecord lastRecord = recordsLastPage1.get(1);
- assertTrue(lastRecord.getMessage().contains("Pax Web available at"));
- }
-
-
- @Test
- public void testReadRecordsWithMultiLines() throws Exception {
-
- storage.setLogLocation(getClass().getResource("logs/2011-01-23-karaf.log").toURI().getPath());
- List<LogRecord> recordsFirstPage1 = readPage(1, 10, 10);
-
- List<LogRecord> recordsLastPage1 = readPage(2, 10, 10);
-
- List<LogRecord> recordsFirstPage2 = readPage(1, 10, 10);
- compareRecords(recordsFirstPage1, recordsFirstPage2);
-
- List<LogRecord> recordsLastPage2 = readPage(2, 10, 10);
- compareRecords(recordsLastPage1, recordsLastPage2);
-
- LogRecord recordWithExceptionInMessage = recordsFirstPage1.get(2);
- assertEquals(LogLevel.ERROR, recordWithExceptionInMessage.getLevel());
- assertTrue(recordWithExceptionInMessage.getMessage()
- .contains("mvn:org.apache.cxf/cxf-bundle/"));
- assertTrue(recordWithExceptionInMessage.getMessage()
- .contains("Caused by: org.osgi.framework.BundleException"));
- }
-
- @Test
- public void testReadRecordsWithMultipleFiles() throws Exception {
-
- List<String> locations = new ArrayList<String>();
- locations.add(getClass().getResource("logs/2011-01-22-karaf.log").toURI().getPath());
- locations.add(getClass().getResource("logs/2011-01-23-karaf.log").toURI().getPath());
- storage.setLogLocations(locations);
- List<LogRecord> recordsFirstPage1 = readPage(1, 10, 10);
- readPage(2, 10, 10);
- readPage(3, 10, 10);
- List<LogRecord> recordsPage4 = readPage(4, 10, 10);
- readPage(4, 10, 10);
- readPage(5, 10, 10);
- List<LogRecord> recordsLastPage1 = readPage(6, 10, 2);
-
- LogRecord recordWithExceptionInMessage = recordsPage4.get(4);
- assertEquals(LogLevel.ERROR, recordWithExceptionInMessage.getLevel());
- assertTrue(recordWithExceptionInMessage.getMessage()
- .contains("mvn:org.apache.cxf/cxf-bundle/"));
- assertTrue(recordWithExceptionInMessage.getMessage()
- .contains("Caused by: org.osgi.framework.BundleException"));
-
- List<LogRecord> recordsFirstPage2 = readPage(1, 10, 10);
- compareRecords(recordsFirstPage1, recordsFirstPage2);
-
- List<LogRecord> recordsLastPage2 = readPage(6, 10, 2);
- compareRecords(recordsLastPage1, recordsLastPage2);
- }
-
- @Test
- public void testReadRecordsWithMultipleFilesAndSearch() throws Exception {
-
- List<String> locations = new ArrayList<String>();
- locations.add(getClass().getResource("logs/2011-01-22-karaf.log").toURI().getPath());
- locations.add(getClass().getResource("logs/2011-01-23-karaf.log").toURI().getPath());
- storage.setLogLocations(locations);
- SearchCondition<LogRecord> sc =
- new PrimitiveSearchCondition<LogRecord>("message",
- "*FeaturesServiceImpl.java:323*",
- ConditionType.EQUALS,
- new LogRecord());
- List<LogRecord> recordsFirstPage1 = readPage(1, sc, 2, 1);
- List<LogRecord> recordsFirstPage2 = readPage(1, sc, 2, 1);
- compareRecords(recordsFirstPage1, recordsFirstPage2);
- }
-
- @Test
- public void testReadRecordsWithMultipleFilesAndSearchDates() throws Exception {
-
- List<String> locations = new ArrayList<String>();
- locations.add(getClass().getResource("logs/2011-01-22-karaf.log").toURI().getPath());
- locations.add(getClass().getResource("logs/2011-01-23-karaf.log").toURI().getPath());
- storage.setLogLocations(locations);
-
- Map<String, String> props = new HashMap<String, String>();
- props.put(SearchUtils.DATE_FORMAT_PROPERTY, "yyyy-MM-dd'T'HH:mm:ss SSS");
- props.put(SearchUtils.TIMEZONE_SUPPORT_PROPERTY, "false");
- FiqlParser<LogRecord> parser = new FiqlParser<LogRecord>(LogRecord.class, props);
-
- SearchCondition<LogRecord> sc = parser.parse("date==2011-01-22T11:49:17 184");
-
- List<LogRecord> recordsFirstPage1 = readPage(1, sc, 2, 1);
- List<LogRecord> recordsFirstPage2 = readPage(1, sc, 2, 1);
- compareRecords(recordsFirstPage1, recordsFirstPage2);
-
- LogRecord record = recordsFirstPage1.get(0);
- assertEquals("Initializing Timer", record.getMessage());
- }
-
- @Test
- public void testReadRecordsWithMultipleFilesAndSearchDates2() throws Exception {
-
- List<String> locations = new ArrayList<String>();
- locations.add(getClass().getResource("logs/2011-01-22-karaf.log").toURI().getPath());
- locations.add(getClass().getResource("logs/2011-01-23-karaf.log").toURI().getPath());
- storage.setLogLocations(locations);
-
- Map<String, String> props = new HashMap<String, String>();
- props.put(SearchUtils.DATE_FORMAT_PROPERTY, "yyyy-MM-dd");
- props.put(SearchUtils.TIMEZONE_SUPPORT_PROPERTY, "false");
- FiqlParser<LogRecord> parser = new FiqlParser<LogRecord>(LogRecord.class, props);
-
- SearchCondition<LogRecord> sc = parser.parse("date=lt=2011-01-23");
-
- List<LogRecord> recordsFirstPage1 = readPage(1, sc, 32, 32);
- readPage(2, sc, 32, 0);
- List<LogRecord> recordsFirstPage2 = readPage(1, sc, 32, 32);
-
- compareRecords(recordsFirstPage1, recordsFirstPage2);
-
- LogRecord firstRecord = recordsFirstPage1.get(0);
- assertEquals("Starting JMX OSGi agent", firstRecord.getMessage());
- LogRecord lastRecord = recordsFirstPage1.get(31);
- assertTrue(lastRecord.getMessage().contains("Pax Web available at"));
-
- readPage(2, sc, 32, 0);
- }
-
- @Test
- public void testReadRecordsWithMultipleFiles2() throws Exception {
-
- List<String> locations = new ArrayList<String>();
- locations.add(getClass().getResource("logs/2011-01-23-karaf.log").toURI().getPath());
- locations.add(getClass().getResource("logs/2011-01-22-karaf.log").toURI().getPath());
- storage.setLogLocations(locations);
- List<LogRecord> recordsFirstPage1 = readPage(1, 10, 10);
- readPage(2, 10, 10);
- readPage(3, 10, 10);
- readPage(4, 10, 10);
- readPage(5, 10, 10);
- List<LogRecord> recordsLastPage1 = readPage(6, 10, 2);
-
- LogRecord recordWithExceptionInMessage = recordsFirstPage1.get(2);
- assertEquals(LogLevel.ERROR, recordWithExceptionInMessage.getLevel());
- assertTrue(recordWithExceptionInMessage.getMessage()
- .contains("mvn:org.apache.cxf/cxf-bundle/"));
- assertTrue(recordWithExceptionInMessage.getMessage()
- .contains("Caused by: org.osgi.framework.BundleException"));
-
- List<LogRecord> recordsFirstPage2 = readPage(1, 10, 10);
- compareRecords(recordsFirstPage1, recordsFirstPage2);
-
- List<LogRecord> recordsLastPage2 = readPage(6, 10, 2);
- compareRecords(recordsLastPage1, recordsLastPage2);
- }
-
- @Test
- public void testReadRecordsWithScanDirectory() throws Exception {
-
- String dir = getClass().getResource("logs").toURI().getPath();
- storage.setLogLocation(dir);
- List<LogRecord> recordsFirstPage1 = readPage(1, 10, 10);
- readPage(2, 10, 10);
- readPage(3, 10, 10);
- List<LogRecord> recordsPage4 = readPage(4, 10, 10);
- readPage(5, 10, 10);
- List<LogRecord> recordsLastPage1 = readPage(6, 10, 2);
-
- LogRecord recordWithExceptionInMessage = recordsPage4.get(4);
- assertEquals(LogLevel.ERROR, recordWithExceptionInMessage.getLevel());
- assertTrue(recordWithExceptionInMessage.getMessage()
- .contains("mvn:org.apache.cxf/cxf-bundle/"));
- assertTrue(recordWithExceptionInMessage.getMessage()
- .contains("Caused by: org.osgi.framework.BundleException"));
-
- List<LogRecord> recordsFirstPage2 = readPage(1, 10, 10);
- compareRecords(recordsFirstPage1, recordsFirstPage2);
-
- List<LogRecord> recordsLastPage2 = readPage(6, 10, 2);
- compareRecords(recordsLastPage1, recordsLastPage2);
- }
-
- private void compareRecords(List<LogRecord> records1, List<LogRecord> records2) {
- for (int i = 0; i < records1.size(); i++) {
- LogRecord r1 = records1.get(i);
- LogRecord r2 = records2.get(i);
- assertEquals(r1.getLevel(), r2.getLevel());
- assertEquals(r1.getDate(), r2.getDate());
- assertEquals(r1.getMessage(), r2.getMessage());
- }
- }
-
- private List<LogRecord> readPage(int page, int pageSize, int expected) {
- return readPage(page, null, pageSize, expected);
-
- }
-
- private List<LogRecord> readPage(int page, SearchCondition<LogRecord> sc,
- int pageSize, int expected) {
- List<LogRecord> records = new ArrayList<LogRecord>();
- storage.load(records, sc, page, pageSize);
- assertEquals(expected, records.size());
- return records;
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/logs/2011-01-22-karaf.log
----------------------------------------------------------------------
diff --git a/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/logs/2011-01-22-karaf.log b/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/logs/2011-01-22-karaf.log
deleted file mode 100644
index 251d689..0000000
--- a/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/logs/2011-01-22-karaf.log
+++ /dev/null
@@ -1,34 +0,0 @@
-03-Mar-2011 11:49:12 org.apache.karaf.main.SimpleFileLock lock
-INFO: locking
-11:49:13,031 | INFO | Event Dispatcher | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Starting JMX OSGi agent
-11:49:13,037 | WARN | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.shell.packages is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/shell/v1.0.0))]
-11:49:13,102 | INFO | Event Dispatcher | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Registering MBean with ObjectName [osgi.core:service=permissionadmin,version=1.2] for service with service.id [3]
-11:49:13,143 | INFO | Event Dispatcher | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Registering MBean with ObjectName [osgi.compendium:service=cm,version=1.3] for service with service.id [33]
-11:49:13,153 | WARN | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | There are no MBean servers registred, can't register MBeans
-11:49:13,154 | WARN | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | There are no MBean servers registred, can't register MBeans
-11:49:13,233 | WARN | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.shell.commands is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/shell/v1.0.0))]
-11:49:13,239 | WARN | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.management is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0)), (&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0))]
-11:49:13,242 | WARN | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.shell.dev is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/shell/v1.0.0))]
-11:49:13,272 | WARN | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.jaas.modules is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0)), (&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0)), (&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/jaas/v1.0.0))]
-11:49:13,277 | WARN | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.shell.console is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0))]
-11:49:13,365 | WARN | rint Extender: 3 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.admin.core is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0))]
-11:49:13,395 | WARN | rint Extender: 3 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.admin.command is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/shell/v1.0.0))]
-11:49:13,408 | WARN | rint Extender: 1 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.shell.osgi is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/shell/v1.0.0))]
-11:49:13,553 | WARN | rint Extender: 3 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.shell.ssh is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/shell/v1.0.0))]
-11:49:13,602 | WARN | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.features.command is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/shell/v1.0.0))]
-11:49:13,635 | WARN | rint Extender: 3 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.shell.log is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/shell/v1.0.0))]
-11:49:14,206 | INFO | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Registering org.osgi.jmx.framework.PackageStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5c3ac with name osgi.core:type=packageState,version=1.5
-11:49:14,208 | INFO | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Registering org.osgi.jmx.framework.FrameworkMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5c3ac with name osgi.core:type=framework,version=1.5
-11:49:14,208 | INFO | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Registering org.osgi.jmx.framework.ServiceStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5c3ac with name osgi.core:type=serviceState,version=1.5
-11:49:14,211 | INFO | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Registering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5c3ac with name osgi.compendium:service=cm,version=1.3
-11:49:14,211 | INFO | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Registering org.osgi.jmx.service.permissionadmin.PermissionAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5c3ac with name osgi.core:service=permissionadmin,version=1.2
-11:49:14,212 | INFO | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Registering org.osgi.jmx.framework.BundleStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5c3ac with name osgi.core:type=bundleState,version=1.5
-11:49:14,931 | INFO | rint Extender: 1 | SecurityUtils | e.sshd.common.util.SecurityUtils 80 | 28 - sshd-core - 0.4.0 | BouncyCastle not registered, using the default JCE provider
-11:49:16,463 | INFO | Thread-4 | FeaturesServiceImpl | res.internal.FeaturesServiceImpl 293 | 26 - org.apache.karaf.features.core - 2.1.4 | Bundles to refresh:
-11:49:16,843 | INFO | Thread-4 | ContextLoaderListener | .activator.ContextLoaderListener 354 | 42 - org.springframework.osgi.extender - 1.2.1 | Starting [org.springframework.osgi.extender] bundle v.[1.2.1]
-11:49:17,068 | WARN | Thread-4 | NamespaceManager | nternal.support.NamespaceManager 132 | 42 - org.springframework.osgi.extender - 1.2.1 | Bundle activemq-ra (org.apache.activemq.activemq-ra) cannot see class [org.springframework.beans.factory.xml.NamespaceHandlerResolver]; ignoring its namespace handlers
-11:49:17,172 | INFO | Thread-4 | ExtenderConfiguration | al.support.ExtenderConfiguration 150 | 42 - org.springframework.osgi.extender - 1.2.1 | No custom extender configuration detected; using defaults...
-11:49:17,184 | INFO | Thread-4 | TimerTaskExecutor | heduling.timer.TimerTaskExecutor 106 | 37 - org.springframework.context - 3.0.5.RELEASE | Initializing Timer
-11:49:17,497 | WARN | Thread-4 | NamespaceManager | nternal.support.NamespaceManager 132 | 42 - org.springframework.osgi.extender - 1.2.1 | Bundle activemq-ra (org.apache.activemq.activemq-ra) cannot see class [org.springframework.beans.factory.xml.NamespaceHandlerResolver]; ignoring its namespace handlers
-11:49:17,535 | INFO | Thread-4 | Activator | x.web.service.internal.Activator 80 | 67 - org.ops4j.pax.web.pax-web-runtime - 0.7.4 | Pax Web started
-11:49:17,775 | INFO | Thread-11 | JettyServerImpl | e.jetty.internal.JettyServerImpl 100 | 68 - org.ops4j.pax.web.pax-web-jetty - 0.7.4 | Pax Web available at [0.0.0.0]:[8080]
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/logs/2011-01-23-karaf.log
----------------------------------------------------------------------
diff --git a/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/logs/2011-01-23-karaf.log b/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/logs/2011-01-23-karaf.log
deleted file mode 100644
index 351240a..0000000
--- a/rt/management-web/src/test/java/org/apache/cxf/management/web/logging/logs/2011-01-23-karaf.log
+++ /dev/null
@@ -1,31 +0,0 @@
-11:49:17,821 | INFO | Thread-11 | HttpServiceFactoryImpl | .internal.HttpServiceFactoryImpl 33 | 67 - org.ops4j.pax.web.pax-web-runtime - 0.7.4 | Binding bundle: [org.apache.karaf.deployer.features_2.1.4 [27]] to http service
-11:49:17,865 | INFO | guration Updater | JettyServerImpl | e.jetty.internal.JettyServerImpl 100 | 68 - org.ops4j.pax.web.pax-web-jetty - 0.7.4 | Pax Web available at [0.0.0.0]:[8080]
-11:49:18,356 | ERROR | Thread-4 | FeaturesServiceImpl | s.internal.FeaturesServiceImpl$1 814 | 26 - org.apache.karaf.features.core - 2.1.4 | Error installing boot features
-java.lang.Exception: Could not start bundle mvn:org.apache.cxf/cxf-bundle/2.4.0-SNAPSHOT in feature(s) cxf-2.4.0-SNAPSHOT: The bundle "org.apache.cxf.bundle_2.4.0.SNAPSHOT [110]" could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.neethi; version="[3.0.0,4.0.0)"
- at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:326)[26:org.apache.karaf.features.core:2.1.4]
- at org.apache.karaf.features.internal.FeaturesServiceImpl$1.run(FeaturesServiceImpl.java:812)[26:org.apache.karaf.features.core:2.1.4]
-Caused by: org.osgi.framework.BundleException: The bundle "org.apache.cxf.bundle_2.4.0.SNAPSHOT [110]" could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.neethi; version="[3.0.0,4.0.0)"
- at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1317)[osgi-3.6.0.v20100517.jar:]
- at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1301)[osgi-3.6.0.v20100517.jar:]
- at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)[osgi-3.6.0.v20100517.jar:]
- at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)[osgi-3.6.0.v20100517.jar:]
- at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276)[osgi-3.6.0.v20100517.jar:]
- at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:323)[26:org.apache.karaf.features.core:2.1.4]
- ... 1 more
-11:49:24,415 | INFO | Bundle Shutdown | ContextLoaderListener | .activator.ContextLoaderListener 447 | 42 - org.springframework.osgi.extender - 1.2.1 | Stopping [org.springframework.osgi.extender] bundle v.[1.2.1]
-11:49:24,423 | INFO | Bundle Shutdown | TimerTaskExecutor | heduling.timer.TimerTaskExecutor 179 | 37 - org.springframework.context - 3.0.5.RELEASE | Cancelling Timer
-11:49:24,498 | INFO | Bundle Shutdown | Activator | x.web.service.internal.Activator 93 | 67 - org.ops4j.pax.web.pax-web-runtime - 0.7.4 | Pax Web stopped
-11:49:24,499 | INFO | Bundle Shutdown | HttpServiceFactoryImpl | .internal.HttpServiceFactoryImpl 40 | 67 - org.ops4j.pax.web.pax-web-runtime - 0.7.4 | Unbinding bundle: [org.apache.karaf.deployer.features_2.1.4 [27]]
-11:49:24,533 | INFO | Bundle Shutdown | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Stopping JMX OSGi agent
-11:49:24,534 | INFO | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Unregistering org.osgi.jmx.framework.PackageStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5c3ac with name osgi.core:type=packageState,version=1.5
-11:49:24,534 | INFO | Bundle Shutdown | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Unregistering MBean with ObjectName [osgi.compendium:service=cm,version=1.3] for service with service.id [33]
-11:49:24,534 | INFO | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Unregistering org.osgi.jmx.framework.FrameworkMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5c3ac with name osgi.core:type=framework,version=1.5
-11:49:24,534 | INFO | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Unregistering org.osgi.jmx.framework.ServiceStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5c3ac with name osgi.core:type=serviceState,version=1.5
-11:49:24,534 | INFO | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Unregistering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5c3ac with name osgi.compendium:service=cm,version=1.3
-11:49:24,535 | INFO | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Unregistering org.osgi.jmx.service.permissionadmin.PermissionAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5c3ac with name osgi.core:service=permissionadmin,version=1.2
-11:49:24,535 | INFO | JMX OSGi Agent | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Unregistering org.osgi.jmx.framework.BundleStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5c3ac with name osgi.core:type=bundleState,version=1.5
-11:49:24,534 | INFO | Bundle Shutdown | jmx | ? ? | 20 - org.apache.aries.jmx - 0.2.0.incubating | Unregistering MBean with ObjectName [osgi.core:service=permissionadmin,version=1.2] for service with service.id [3]
-11:49:24,539 | WARN | rint Extender: 1 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.jaas.modules is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/jaas/v1.0.0))]
-11:49:24,541 | WARN | rint Extender: 3 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.shell.packages is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/shell/v1.0.0))]
-11:49:24,543 | WARN | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.shell.commands is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/shell/v1.0.0))]
-11:49:24,544 | WARN | rint Extender: 1 | BlueprintContainerImpl | container.BlueprintContainerImpl 252 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Bundle org.apache.karaf.shell.dev is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://karaf.apache.org/xmlns/shell/v1.0.0))]
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/pom.xml
----------------------------------------------------------------------
diff --git a/rt/pom.xml b/rt/pom.xml
index f032f87..b3e1803 100644
--- a/rt/pom.xml
+++ b/rt/pom.xml
@@ -39,7 +39,6 @@
<module>ws</module>
<module>rs</module>
<module>management</module>
- <module>management-web</module>
<module>javascript</module>
<module>security</module>
<module>security-saml</module>
[5/8] cxf git commit: [CXF-7192] Removing cxf-rt-management-web
module, to be restored on demand
Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/Links.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/Links.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/Links.java
deleted file mode 100644
index 63878be..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/Links.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * 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.browser.client.service.browser;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Node;
-import com.google.gwt.xml.client.NodeList;
-
-public class Links {
- public static final Links EMPTY = new Links();
-
- @Nullable
- private String first;
-
- @Nullable
- private String previous;
-
- @Nullable
- private String self;
-
- @Nullable
- private String next;
-
- @Nullable
- private String last;
-
- private Links() {
- }
-
- public Links(@Nonnull final Document document) {
- new XmlParser().parseLinks(document);
- }
-
- public boolean firstAvailable() {
- return available(first);
- }
-
- public boolean previousAvailable() {
- return available(previous);
- }
-
- public boolean selfAvailable() {
- return available(self);
- }
-
- public boolean nextAvailable() {
- return available(next);
- }
-
- public boolean lastAvailable() {
- return available(last);
- }
-
- @Nullable
- public String getFirst() {
- return first;
- }
-
- @Nullable
- public String getPrevious() {
- return previous;
- }
-
- @Nullable
- public String getSelf() {
- return self;
- }
-
- @Nullable
- public String getNext() {
- return next;
- }
-
- @Nullable
- public String getLast() {
- return last;
- }
-
- private boolean available(@Nullable final String link) {
- return link != null && !"".equals(link);
- }
-
- private final class XmlParser {
- private static final String FEED_TAG = "feed";
- private static final String LINK_TAG = "link";
-
- private static final String TYPE_ATTRIBUTE = "rel";
- private static final String URL_ATTRIBUTE = "href";
-
- private static final String FIRST_LINK = "first";
- private static final String PREVIOUS_LINK = "previous";
- private static final String SELF_LINK = "self";
- private static final String NEXT_LINK = "next";
- private static final String LAST_LINK = "last";
-
- private XmlParser() {
- }
-
- private void parseLinks(@Nonnull final Document document) {
- NodeList linkNodes = document.getElementsByTagName(LINK_TAG);
-
- if (linkNodes != null) {
- Node linkNode;
- for (int i = 0; i < linkNodes.getLength(); i++) {
- linkNode = linkNodes.item(i);
- if (isLinkBelongToFeed(linkNode)) {
- setLink(linkNode);
- }
- }
- }
- }
-
- private boolean isLinkBelongToFeed(@Nonnull final Node node) {
- return node.getParentNode() != null && FEED_TAG.equals(node.getParentNode().getNodeName());
- }
-
- private void setLink(@Nonnull final Node node) {
- Node typeNode = node.getAttributes().getNamedItem(TYPE_ATTRIBUTE);
- Node urlNode = node.getAttributes().getNamedItem(URL_ATTRIBUTE);
-
- if (typeNode != null && urlNode != null) {
- String typeValue = typeNode.getNodeValue();
- String urlValue = urlNode.getNodeValue();
-
- if (FIRST_LINK.equals(typeValue)) {
- first = urlValue;
- } else if (PREVIOUS_LINK.equals(typeValue)) {
- previous = urlValue;
- } else if (SELF_LINK.equals(typeValue)) {
- self = urlValue;
- } else if (NEXT_LINK.equals(typeValue)) {
- next = urlValue;
- } else if (LAST_LINK.equals(typeValue)) {
- last = urlValue;
- }
- }
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/IdentifierGenerator.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/IdentifierGenerator.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/IdentifierGenerator.java
deleted file mode 100644
index 7a25caf..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/IdentifierGenerator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 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.browser.client.service.settings;
-
-public interface IdentifierGenerator {
- String generateUUID();
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/IdentifierGeneratorImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/IdentifierGeneratorImpl.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/IdentifierGeneratorImpl.java
deleted file mode 100644
index 3028a9e..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/IdentifierGeneratorImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.browser.client.service.settings;
-
-public class IdentifierGeneratorImpl implements IdentifierGenerator {
-
- public final native String generateUUID() /*-{
- return $wnd.Math.uuid();
- }-*/;
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxy.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxy.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxy.java
deleted file mode 100644
index 35cd72c..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxy.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.browser.client.service.settings;
-
-import com.google.gwt.http.client.RequestCallback;
-
-public interface RemoteStorageProxy {
-
- void saveSettings(RequestCallback callback);
-
- void retrieveSettings(Settings settings, RequestCallback callback);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxyImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxyImpl.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxyImpl.java
deleted file mode 100644
index 7a1ad73..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/RemoteStorageProxyImpl.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/**
- * 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.browser.client.service.settings;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.core.client.JsArray;
-import com.google.gwt.http.client.RequestBuilder;
-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.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 = "settings";
- private static final String RESOURCES_ENDPOINT_SUFFIX = "/resources/";
- private static final String SETTINGS_ENDPOINT_SUFFIX = "/settings";
-
- private static final String CONTENT_TYPE_HEADER = "Content-Type";
- private static final String ACCEPT_HEADER = "Accept";
- private static final String JSON_TYPE = "application/json";
-
- private static final String SETTINGS_KEY = "settings";
-
- private String endpointURL;
-
- public void saveSettings(@Nonnull final RequestCallback callback) {
- RequestBuilder builder = buildRequest(RequestBuilder.GET, buildEndpointURL());
- execute(null, builder, callback);
- }
-
- 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 buildEndpointURL() {
- if (endpointURL == null) {
- String baseURL = GWT.getHostPageBaseURL();
- if (baseURL.endsWith(RESOURCES_ENDPOINT_SUFFIX)) {
-
- // compute URL by replace "resources" suffix with "settings" suffix
- endpointURL = cutResourcesSuffix(baseURL) + SETTINGS_ENDPOINT_SUFFIX;
- } else {
-
- // it ought to execute only in hosted mode, because there is diffrent base URL
- endpointURL = HOSTED_MODE_ENDPOINT_URL;
- }
- }
-
- return endpointURL;
- }
-
- @Nonnull
- private String cutResourcesSuffix(@Nonnull final String url) {
- return url.substring(0, url.lastIndexOf(RESOURCES_ENDPOINT_SUFFIX));
- }
-
- @Nonnull
- private RequestBuilder buildRequest(@Nonnull final RequestBuilder.Method method,
- @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);
-
- return builder;
- }
-
- private void execute(@Nullable final RemoteSettings remoteSettings,
- @Nonnull final RequestBuilder builder,
- @Nonnull final RequestCallback callback) {
- String json = null;
- if (remoteSettings != null) {
-
- // TODO add appropriate comment - wrap
- JSONObject rootElement = new JSONObject();
- rootElement.put(SETTINGS_KEY, new JSONObject(remoteSettings));
- json = rootElement.toString();
- }
-
- try {
- builder.sendRequest(json, callback);
- } catch (RequestException ex) {
-
- // TODO add custom exception
- throw new RuntimeException(ex);
- }
- }
-
- protected static class RemoteSettings extends JavaScriptObject {
-
- protected RemoteSettings() {
- }
-
- public final native void setSubscriptions(@Nullable JsArray<RemoteSubscription> subscriptions) /*-{
- this.subscriptions = subscriptions;
- }-*/;
-
- @Nonnull
- public final native JsArray<RemoteSubscription> getSubscriptions() /*-{
- if (this.subscriptions != null) {
- return this.subscriptions;
- } else {
- return [];
- }
- }-*/;
- }
-
- protected static class RemoteSubscription extends JavaScriptObject {
-
- protected RemoteSubscription() {
- }
-
- public final native void setId(@Nullable String id) /*-{
- this.id = id;
- }-*/;
-
- @Nullable
- public final native String getId() /*-{
- return this.id;
- }-*/;
-
- public final native void setUrl(@Nullable String url) /*-{
- this.url = url;
- }-*/;
-
- @Nullable
- public final native String getUrl() /*-{
- return this.url;
- }-*/;
-
- public final native void setName(@Nullable String name) /*-{
- this.name = name;
- }-*/;
-
- @Nullable
- public final native String getName() /*-{
- return this.name;
- }-*/;
- }
-
- protected static final class Converter {
-
- private Converter() {
- }
-
- @Nonnull
- public static Settings convertToSettings(@Nonnull final RemoteSettings remoteSettings) {
- Settings settings = new Settings();
-
- JsArray<RemoteSubscription> remoteSubscriptions = remoteSettings.getSubscriptions();
- for (int i = 0; i < remoteSubscriptions.length(); i++) {
- settings.getSubscriptions().add(convertToSubscription(remoteSubscriptions.get(i)));
- }
-
- return settings;
- }
-
- @Nonnull
- public static Subscription convertToSubscription(@Nonnull RemoteSubscription remoteSubscription) {
- return new Subscription(remoteSubscription.getId(),
- remoteSubscription.getName(), remoteSubscription.getUrl());
- }
-
- @SuppressWarnings("unchecked") @Nonnull
- public static RemoteSettings convertToRemoteSettings(@Nonnull final Settings settings) {
- RemoteSettings remoteSettings = (RemoteSettings) JavaScriptObject.createObject();
-
- JsArray<RemoteSubscription> remoteSubscriptions =
- (JsArray<RemoteSubscription>) JavaScriptObject.createArray();
-
- for (Subscription subscription : settings.getSubscriptions()) {
- remoteSubscriptions.push(convertToRemoteSubscription(subscription));
- }
-
- remoteSettings.setSubscriptions(remoteSubscriptions);
-
- return remoteSettings;
- }
-
- @Nonnull
- public static RemoteSubscription convertToRemoteSubscription(@Nonnull Subscription subscription) {
- RemoteSubscription remoteSubscription = (RemoteSubscription) JavaScriptObject.createObject();
-
- remoteSubscription.setId(subscription.getId());
- remoteSubscription.setName(subscription.getName());
- remoteSubscription.setUrl(subscription.getUrl());
-
- return remoteSubscription;
- }
- }
-
- public abstract static class Callback extends AbstractCallback<Settings> {
-
- @Override @Nullable
- protected Settings parse(@Nonnull final Response response) {
- RemoteSettings result = null;
-
- if (response.getText() != null && !"".equals(response.getText())) {
-
- // TODO add appropriate comment - unwrap
- JSONValue rootElement = new JSONObject(convertFromJSON(response.getText())).get(SETTINGS_KEY);
- if (rootElement != null && rootElement.isObject() != null) {
- result = (RemoteSettings) rootElement.isObject().getJavaScriptObject();
- }
- }
-
- return result != null ? Converter.convertToSettings(result) : null;
- }
-
- // TODO check if this method must be final regardless to GWT's guidelines
- // CHECKSTYLE:OFF
- @Nonnull
- private final native JavaScriptObject convertFromJSON(@Nonnull final String json) /*-{
- return $wnd.JSON.parse(json);
- }-*/;
- // CHECKSTYLE:ON
- }
-
- public static class NoActionCallback extends AbstractCallback<Settings> {
-
- @Override
- public void onSuccess(@Nullable final Settings obj) { }
-
- @Override @Nullable
- protected Settings parse(@Nonnull final Response response) {
- return null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Settings.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Settings.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Settings.java
deleted file mode 100644
index e5ab3ab..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Settings.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.browser.client.service.settings;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-public class Settings {
- @Nullable
- private Set<Subscription> subscriptions;
-
- @Nonnull
- public Set<Subscription> getSubscriptions() {
- if (subscriptions == null) {
- subscriptions = new LinkedHashSet<Subscription>();
- }
- return subscriptions;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/SettingsFacade.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/SettingsFacade.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/SettingsFacade.java
deleted file mode 100644
index 08c00ce..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/SettingsFacade.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/**
- * 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.browser.client.service.settings;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import org.apache.cxf.management.web.browser.client.event.ChangedSubscriptionsEvent;
-
-//TODO Remove StorageStrategy feature
-@Singleton
-public class SettingsFacade {
-
- @Nonnull
- private final RemoteStorageProxy remoteStorage;
-
- @Nonnull
- private final EventBus eventBus;
-
- @Nullable
- private StorageLayer storageLayer;
-
- @Nonnull
- private final IdentifierGenerator identifierGenerator;
-
- private boolean initialized;
-
- public enum StorageStrategy {
- REMOTE
- }
-
- @Inject
- public SettingsFacade(@Nonnull final RemoteStorageProxy remoteStorage,
- @Nonnull final EventBus eventBus,
- @Nonnull final IdentifierGenerator identifierGenerator) {
- this.remoteStorage = remoteStorage;
- this.eventBus = eventBus;
- this.identifierGenerator = identifierGenerator;
- }
-
- public void initialize(@Nonnull final StorageStrategy strategy) {
- storageLayer = createStorageLayers(strategy);
- storageLayer.initialize();
- initialized = true;
- }
-
- public void addSubscription(@Nonnull final String name, @Nonnull final String url) {
- assert !"".equals(name);
- assert !"".equals(url);
- assert storageLayer != null;
- isValid();
-
- String id = identifierGenerator.generateUUID();
- assert id != null && !"".equals(id);
-
- storageLayer.getSettings().getSubscriptions().add(new Subscription(id, name, url));
- storageLayer.update();
- }
-
- public void updateSubscription(@Nonnull final Subscription subscription) {
- assert subscription.getUrl() != null && !"".equals(subscription.getUrl());
- assert storageLayer != null;
- isValid();
-
- storageLayer.getSettings().getSubscriptions().remove(subscription);
- storageLayer.getSettings().getSubscriptions().add(subscription);
- storageLayer.update();
- }
-
- public void removeSubscription(@Nonnull final Subscription subscription) {
- assert subscription.getUrl() != null && !"".equals(subscription.getUrl());
- assert storageLayer != null;
- isValid();
-
- storageLayer.getSettings().getSubscriptions().remove(subscription);
- storageLayer.update();
- }
-
- @Nonnull
- public List<Subscription> getSubscriptions() {
- assert storageLayer != null;
- isValid();
-
- return new ArrayList<Subscription>(storageLayer.getSettings().getSubscriptions());
- }
-
- private void isValid() {
- if (!initialized) {
- throw new IllegalStateException("Storage layers not initialized");
- }
- }
-
- @Nonnull
- private StorageLayer createStorageLayers(@Nonnull final StorageStrategy storageStrategy) {
- switch(storageStrategy) {
- case REMOTE:
- return new RemoteStorageLayer(remoteStorage, new MemoryStorageLayer());
- default:
- throw new IllegalArgumentException("Unknown storage strategy type");
- }
- }
-
- private interface StorageLayer {
-
- boolean initialize();
-
- Settings getSettings();
-
- void update(Settings settings);
-
- void update();
-
- void clear();
- }
-
- private static class MemoryStorageLayer implements StorageLayer {
-
- @Nonnull
- private Settings settings;
-
- public boolean initialize() {
- this.settings = new Settings();
- return false;
- }
-
- @Nonnull
- public Settings getSettings() {
- return this.settings;
- }
-
- public void update(@Nonnull final Settings newSettings) {
- this.settings = newSettings;
- }
-
- public void update() {
- }
-
- public void clear() {
- this.settings = new Settings();
- }
- }
-
- private class RemoteStorageLayer implements StorageLayer {
-
- @Nonnull
- private final StorageLayer parent;
-
- @Nonnull
- private final RemoteStorageProxy remoteStorage;
-
- RemoteStorageLayer(@Nonnull final RemoteStorageProxy remoteStorage,
- @Nonnull final StorageLayer parent) {
- this.parent = parent;
- this.remoteStorage = remoteStorage;
- }
-
- public boolean initialize() {
- boolean isSuccess = parent.initialize();
-
- if (!isSuccess) {
- remoteStorage.saveSettings(new RemoteStorageProxyImpl.Callback() {
-
- @Override
- public void onSuccess(@Nullable final Settings retrievedSettings) {
- Settings settings = retrievedSettings != null ? retrievedSettings : new Settings();
-
- parent.update(settings);
-
- eventBus.fireEvent(new ChangedSubscriptionsEvent());
- }
- });
- }
-
- return true;
- }
-
- @Nonnull
- public Settings getSettings() {
- return parent.getSettings();
- }
-
- public void update(@Nonnull final Settings settings) {
- assert settings != null;
-
- parent.update(settings);
-
- remoteStorage.retrieveSettings(settings, new RemoteStorageProxyImpl.NoActionCallback());
- }
-
- public void update() {
- update(parent.getSettings());
- }
-
- public void clear() {
- parent.clear();
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Subscription.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Subscription.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Subscription.java
deleted file mode 100644
index c8009e4..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/settings/Subscription.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.browser.client.service.settings;
-
-import javax.annotation.Nonnull;
-
-public class Subscription {
- private String id;
- private String name;
- private String url;
-
- public Subscription(@Nonnull final String id, @Nonnull final String name, @Nonnull final String url) {
- assert !"".equals(id);
- assert !"".equals(name);
- assert !"".equals(url);
-
- this.id = id;
- this.name = name;
- this.url = url;
- }
-
- @Nonnull
- public String getId() {
- return id;
- }
-
- @Nonnull
- public String getName() {
- return name;
- }
-
- @Nonnull
- public String getUrl() {
- return url;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- Subscription that = (Subscription)o;
-
- return !(id != null ? !id.equals(that.id) : that.id != null);
- }
-
- @Override
- public int hashCode() {
- return id != null ? id.hashCode() : 0;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/AbstractDialog.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/AbstractDialog.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/AbstractDialog.java
deleted file mode 100644
index 268db7c..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/AbstractDialog.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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.browser.client.ui;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.user.client.ui.DialogBox;
-import com.google.gwt.user.client.ui.Widget;
-
-public abstract class AbstractDialog extends DialogBox {
-
- protected void init(@Nonnull final String title, @Nonnull final Widget widget) {
- setGlassEnabled(true);
- setAnimationEnabled(false);
- setAutoHideEnabled(true);
-
- setText(title);
- setWidget(widget);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/BasePresenter.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/BasePresenter.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/BasePresenter.java
deleted file mode 100644
index 25f513c..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/BasePresenter.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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.browser.client.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.annotation.Nonnull;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.event.shared.HandlerRegistration;
-import com.google.gwt.user.client.ui.HasWidgets;
-
-
-public abstract class BasePresenter implements Presenter {
-
- @Nonnull
- protected final EventBus eventBus;
-
- @Nonnull
- private final View view;
-
- @Nonnull
- private final BindStrategy bindStrategy;
-
- @Nonnull
- private final List<HandlerRegistration> handlerRegistrations;
-
- public BasePresenter(@Nonnull final EventBus eventBus, @Nonnull final View view,
- @Nonnull final BindStrategy bindStrategy) {
- this.eventBus = eventBus;
- this.view = view;
- this.bindStrategy = bindStrategy;
- this.handlerRegistrations = new ArrayList<HandlerRegistration>();
- }
-
- public void go(HasWidgets container) {
- bindStrategy.bind(container, view);
- }
-
- public void unbind() {
- bindStrategy.unbind(view);
-
- for (HandlerRegistration handlerRegistration : handlerRegistrations) {
- handlerRegistration.removeHandler();
- }
- handlerRegistrations.clear();
- }
-
- protected void registerHandler(@Nonnull final HandlerRegistration handlerRegistration) {
- handlerRegistrations.add(handlerRegistration);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/BindStrategy.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/BindStrategy.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/BindStrategy.java
deleted file mode 100644
index f3c4365..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/BindStrategy.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.browser.client.ui;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.user.client.ui.HasWidgets;
-
-//TODO view should decide how to present it - bindstrategy should be receive by View not inject to presenter
-public interface BindStrategy {
- void bind(@Nonnull HasWidgets container, @Nonnull View view);
- void unbind(@Nonnull View view);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/DialogBindStrategyImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/DialogBindStrategyImpl.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/DialogBindStrategyImpl.java
deleted file mode 100644
index 4c172d0..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/DialogBindStrategyImpl.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.browser.client.ui;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.user.client.ui.DialogBox;
-import com.google.gwt.user.client.ui.HasWidgets;
-import com.google.inject.Singleton;
-
-@Singleton
-public class DialogBindStrategyImpl implements BindStrategy {
-
- public void bind(@Nonnull final HasWidgets container, @Nonnull final View view) {
- assert view instanceof DialogBox;
-
- ((DialogBox) view).center();
- }
-
- public void unbind(@Nonnull final View view) {
- assert view instanceof DialogBox;
-
- ((DialogBox) view).hide();
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/ErrorDialog.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/ErrorDialog.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/ErrorDialog.java
deleted file mode 100644
index be58e60..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/ErrorDialog.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * 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.browser.client.ui;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.event.dom.client.KeyPressEvent;
-import com.google.gwt.event.dom.client.KeyPressHandler;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.FlowPanel;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.PopupPanel;
-import com.google.inject.Inject;
-
-import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserConstans;
-import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources;
-
-/**
- * A dialog box showing an error message, when bad things happen.
- */
-public class ErrorDialog extends PopupPanel {
-
- @Nonnull
- private final LogBrowserResources resources;
-
- @Nonnull
- private final LogBrowserConstans contants;
-
- @Nonnull
- private final Button closeButton;
-
- @Inject
- protected ErrorDialog(@Nonnull final LogBrowserResources resources,
- @Nonnull final LogBrowserConstans contants) {
- super(/* auto hide */false, /* modal */true);
-
- this.resources = resources;
- this.contants = contants;
- this.closeButton = new Button();
- }
-
- /**
- * Create a dialog box to nicely format an exception.
- */
- public void setException(@Nonnull final Throwable exception) {
- String errorClassName = exception.getClass().getName();
-
- // Remove unwanted package (which begins on 'java.lang.' or 'org.apache.cxf.')
- if (errorClassName.startsWith("java.lang.")) {
- errorClassName = errorClassName.substring("java.lang.".length());
- } else if (errorClassName.startsWith("org.apache.cxf.")) {
- errorClassName = errorClassName.substring(errorClassName.lastIndexOf('.') + 1);
- }
-
- // Remove unwanted suffixes from class name (i.e. 'Exception', 'Error')
- if (errorClassName.endsWith("Exception")) {
- errorClassName = errorClassName.substring(0, errorClassName.length() - "Exception".length());
- } else if (errorClassName.endsWith("Error")) {
- errorClassName = errorClassName.substring(0, errorClassName.length() - "Error".length());
- }
-
- initializeLayout(errorClassName, exception.getMessage());
- }
-
- @Override
- public void center() {
- show();
- closeButton.setFocus(true);
- }
-
- private void initializeLayout(@Nonnull final String errorName, @Nullable final String errorMessage) {
-
- // Create error name and error message labels
- Label errorNameLabel = new Label(errorName);
- errorNameLabel.setStyleName(resources.css().errorDialogErrorType());
-
- Label errorMessageLabel = null;
- if (errorMessage != null && !"".equals(errorMessage)) {
- errorMessageLabel = new Label(errorMessage);
- DOM.setStyleAttribute(errorMessageLabel.getElement(), "whiteSpace", "pre");
- }
-
- // Initialize 'close' button
- closeButton.setText(contants.errorDialogContineButton());
- closeButton.addClickHandler(new ClickHandler() {
-
- public void onClick(ClickEvent event) {
- hide();
- }
- });
- closeButton.addKeyPressHandler(new KeyPressHandler() {
-
- public void onKeyPress(KeyPressEvent event) {
-
- /*
- if the close button is triggered by a key we need to consume the key
- event, otherwise the key event would be propagated to the parent
- screen and eventually trigger some unwanted action there after the
- error dialog was closed
- */
- event.stopPropagation();
- }
- });
-
- // Create 'title' label
- Label titleLabel = new Label();
- titleLabel.setStyleName(resources.css().errorDialogTitle());
- titleLabel.setText(contants.errorDialogTitle());
-
- // Create wrapper panel for 'error name' and 'error message' labels
- FlowPanel contentPanel = new FlowPanel();
- contentPanel.add(errorNameLabel);
- contentPanel.add(errorMessageLabel);
-
- // Create wrapper panel for 'close' button
- FlowPanel buttonsPanel = new FlowPanel();
- buttonsPanel.setStyleName(resources.css().errorDialogButtons());
- buttonsPanel.add(closeButton);
-
- // Create main panel and add all remain widgets
- FlowPanel centerPanel = new FlowPanel();
- centerPanel.add(titleLabel);
- centerPanel.add(contentPanel);
- centerPanel.add(buttonsPanel);
-
- // Add styles to window
- setGlassEnabled(true);
- getGlassElement().addClassName(resources.css().errorDialogGlass());
- addStyleName(resources.css().errorDialog());
-
- // Add main panel
- add(centerPanel);
-
- // Set window position
- int left = Window.getScrollLeft() + 20;
- int top = Window.getScrollTop() + 20;
- setPopupPosition(left, top);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/Presenter.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/Presenter.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/Presenter.java
deleted file mode 100644
index 0312d11..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/Presenter.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.browser.client.ui;
-
-import com.google.gwt.user.client.ui.HasWidgets;
-
-public interface Presenter {
- void go(HasWidgets container);
-
- void unbind();
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/PresenterWidget.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/PresenterWidget.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/PresenterWidget.java
deleted file mode 100644
index 2c616b8..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/PresenterWidget.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.browser.client.ui;
-
-import com.google.gwt.user.client.ui.HasWidgets;
-
-public interface PresenterWidget {
- void bind(HasWidgets container, View view);
- void unbind();
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/View.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/View.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/View.java
deleted file mode 100644
index eba64dd..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/View.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.browser.client.ui;
-
-import com.google.gwt.user.client.ui.Widget;
-
-public interface View {
- Widget asWidget();
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/WidgetBindStrategyImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/WidgetBindStrategyImpl.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/WidgetBindStrategyImpl.java
deleted file mode 100644
index 8f2d463..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/WidgetBindStrategyImpl.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.browser.client.ui;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.user.client.ui.HasWidgets;
-import com.google.inject.Singleton;
-
-@Singleton
-public class WidgetBindStrategyImpl implements BindStrategy {
-
- public void bind(@Nonnull final HasWidgets container, @Nonnull final View view) {
- assert view.asWidget() != null;
-
- container.clear();
- container.add(view.asWidget());
- }
-
- public void unbind(@Nonnull final View view) {
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowsePresenter.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowsePresenter.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowsePresenter.java
deleted file mode 100644
index f03be58..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowsePresenter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import com.google.inject.name.Named;
-
-import org.apache.cxf.management.web.browser.client.ui.BasePresenter;
-import org.apache.cxf.management.web.browser.client.ui.BindStrategy;
-import org.apache.cxf.management.web.browser.client.ui.common.NavigationHeaderPresenter;
-
-@Singleton
-public class BrowsePresenter extends BasePresenter implements BrowseView.Presenter {
-
- @Inject
- public BrowsePresenter(@Nonnull EventBus eventBus,
- @Nonnull BrowseView view,
- @Nonnull @Named("BindStrategyForBrowser") final BindStrategy bindStrategy,
- @Nonnull NavigationHeaderPresenter navigationHeaderPresenter,
- @Nonnull NavigationSidebarPresenter navigationSidebarPresenter,
- @Nonnull ViewerPresenter viewerPresenter) {
- super(eventBus, view, bindStrategy);
-
- navigationHeaderPresenter.go(view.getNaviagationHeaderSlot());
- navigationSidebarPresenter.go(view.getNaviagationSidebarSlot());
- viewerPresenter.go(view.getViewerSlot());
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowseView.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowseView.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowseView.java
deleted file mode 100644
index 6f5bbd5..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowseView.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import com.google.gwt.user.client.ui.HasWidgets;
-
-import org.apache.cxf.management.web.browser.client.ui.View;
-
-public interface BrowseView extends View {
-
- public interface Presenter {
- }
-
- HasWidgets getNaviagationHeaderSlot();
-
- HasWidgets getNaviagationSidebarSlot();
-
- HasWidgets getViewerSlot();
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowseView.ui.xml
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowseView.ui.xml b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowseView.ui.xml
deleted file mode 100644
index 4fd11cf..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowseView.ui.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
- -->
-<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui">
- <ui:with field="res" type="org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources"/>
- <g:RootLayoutPanel>
- <g:layer>
- <g:DockLayoutPanel unit="EM">
- <g:north size="2">
- <g:FlowPanel ui:field="navigationHeaderSlot"/>
- </g:north>
- <g:center>
- <g:SplitLayoutPanel>
- <g:west size="192">
- <g:FlowPanel styleName="{res.css.navigationSidebarSlot}" ui:field="navigationSidebarSlot"/>
- </g:west>
- <g:center>
- <g:FlowPanel styleName="{res.css.viewerSlot}" ui:field="viewerSlot"/>
- </g:center>
- </g:SplitLayoutPanel>
- </g:center>
- </g:DockLayoutPanel>
- </g:layer>
- </g:RootLayoutPanel>
-</ui:UiBinder>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowseViewImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowseViewImpl.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowseViewImpl.java
deleted file mode 100644
index 0c1b0e1..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/BrowseViewImpl.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.uibinder.client.UiTemplate;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.FlowPanel;
-import com.google.gwt.user.client.ui.HasWidgets;
-import com.google.gwt.user.client.ui.Widget;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-
-@Singleton
-public class BrowseViewImpl extends Composite implements BrowseView {
-
- @UiTemplate("BrowseView.ui.xml")
- interface BrowseViewUiBinder extends UiBinder<Widget, BrowseViewImpl> { }
-
- private static final BrowseViewUiBinder UI_BINDER = GWT.create(BrowseViewUiBinder.class);
-
- @UiField @Nonnull
- FlowPanel navigationHeaderSlot;
-
- @UiField @Nonnull
- FlowPanel navigationSidebarSlot;
-
- @UiField @Nonnull
- FlowPanel viewerSlot;
-
- @Inject
- public BrowseViewImpl() {
- initWidget(UI_BINDER.createAndBindUi(this));
-
- }
-
- public HasWidgets getNaviagationHeaderSlot() {
- return navigationHeaderSlot;
- }
-
- public HasWidgets getNaviagationSidebarSlot() {
- return navigationSidebarSlot;
- }
-
- public HasWidgets getViewerSlot() {
- return viewerSlot;
- }
-
- @Nonnull
- public Widget asWidget() {
- return this;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaPresenter.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaPresenter.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaPresenter.java
deleted file mode 100644
index 8b9f1ebd..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaPresenter.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import com.google.inject.name.Named;
-import org.apache.cxf.management.web.browser.client.event.ChangedFilterOptionsEvent;
-import org.apache.cxf.management.web.browser.client.service.browser.FilterOptions;
-import org.apache.cxf.management.web.browser.client.service.browser.FilterOptions.Level;
-import org.apache.cxf.management.web.browser.client.ui.BasePresenter;
-import org.apache.cxf.management.web.browser.client.ui.BindStrategy;
-
-@Singleton
-public class EditCriteriaPresenter extends BasePresenter implements EditCriteriaView.Presenter {
-
- @Nonnull
- private final EditCriteriaView view;
-
- @Inject
- public EditCriteriaPresenter(@Nonnull final EventBus eventBus,
- @Nonnull final EditCriteriaView view,
- @Nonnull @Named("BindStrategyForEditCriteria") final BindStrategy bindStrategy) {
- super(eventBus, view, bindStrategy);
-
- this.view = view;
- this.view.setPresenter(this);
- }
-
- public void onSaveButtonClicked() {
- String phrase = view.getPhraseValue().getValue();
- Date from = view.getFromValue().getValue();
- Date to = view.getToValue().getValue();
-
- List<Level> acceptedLevels = new ArrayList<FilterOptions.Level>();
-
- if (view.getDebugValue().getValue()) {
- acceptedLevels.add(Level.DEBUG);
- }
- if (view.getInfoValue().getValue()) {
- acceptedLevels.add(Level.INFO);
- }
- if (view.getWarnValue().getValue()) {
- acceptedLevels.add(Level.WARN);
- }
- if (view.getErrorValue().getValue()) {
- acceptedLevels.add(Level.ERROR);
- }
-
- FilterOptions filterOptions;
- if (from == null && to == null && acceptedLevels.isEmpty()) {
- filterOptions = FilterOptions.EMPTY;
- } else {
- filterOptions = new FilterOptions(phrase, from, to, acceptedLevels);
- }
-
- eventBus.fireEvent(new ChangedFilterOptionsEvent(filterOptions));
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.java
deleted file mode 100644
index a1fef74..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import java.util.Date;
-
-import com.google.gwt.user.client.ui.HasValue;
-import org.apache.cxf.management.web.browser.client.ui.View;
-
-public interface EditCriteriaView extends View {
-
- public interface Presenter {
- void onSaveButtonClicked();
- }
-
- HasValue<String> getPhraseValue();
-
- HasValue<Date> getFromValue();
-
- HasValue<Date> getToValue();
-
- HasValue<Boolean> getDebugValue();
-
- HasValue<Boolean> getInfoValue();
-
- HasValue<Boolean> getWarnValue();
-
- HasValue<Boolean> getErrorValue();
-
- void setPresenter(Presenter presenter);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.ui.xml
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.ui.xml b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.ui.xml
deleted file mode 100644
index 0a8597a..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.ui.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
- -->
-<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:dp="urn:import:com.google.gwt.user.datepicker.client">
- <ui:with field="res" type="org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources"/>
- <g:HTMLPanel>
- <table cellspacing="6">
- <tr>
- <td>
- <g:Label>Phrase:</g:Label>
- </td>
- <td>
- <g:TextBox ui:field="phraseTextBox" addStyleDependentNames="clear"/>
- </td>
- </tr>
- <tr>
- <td>
- <g:Label>From:</g:Label>
- </td>
- <td>
- <dp:DateBox ui:field="fromDateBox"/>
- </td>
- </tr>
- <tr>
- <td>
- <g:Label>To:</g:Label>
- </td>
- <td>
- <dp:DateBox ui:field="toDateBox"/>
- </td>
- </tr>
- <tr>
- <td valign="top">
- <g:Label>Levels:</g:Label>
- </td>
- <td>
- <g:VerticalPanel>
- <g:CheckBox ui:field="debugCheckBox">Debug</g:CheckBox>
- <g:CheckBox ui:field="warnCheckBox">Warning</g:CheckBox>
- <g:CheckBox ui:field="infoCheckBox">Information</g:CheckBox>
- <g:CheckBox ui:field="errorCheckBox">Error</g:CheckBox>
- </g:VerticalPanel>
- </td>
- </tr>
- </table>
- <g:FlowPanel addStyleNames="{res.css.editFeedDialogButtons}">
- <g:Button ui:field="cancelButton">
- Cancel
- </g:Button>
- <g:Button ui:field="saveButton" addStyleNames="{res.css.editFeedDialogAddButton}">
- Save
- </g:Button>
- </g:FlowPanel>
- </g:HTMLPanel>
-</ui:UiBinder>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaViewImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaViewImpl.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaViewImpl.java
deleted file mode 100644
index 1bf44c6..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaViewImpl.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import java.util.Date;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.uibinder.client.UiHandler;
-import com.google.gwt.uibinder.client.UiTemplate;
-import com.google.gwt.user.client.ui.CheckBox;
-import com.google.gwt.user.client.ui.HasValue;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.user.client.ui.Widget;
-import com.google.gwt.user.datepicker.client.DateBox;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import org.apache.cxf.management.web.browser.client.ui.AbstractDialog;
-import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserConstans;
-
-@Singleton
-public class EditCriteriaViewImpl extends AbstractDialog implements EditCriteriaView {
- @UiTemplate("EditCriteriaView.ui.xml")
- interface EditCriteriaViewUiBinder extends UiBinder<Widget, EditCriteriaViewImpl> { }
-
- private static final EditCriteriaViewUiBinder UI_BINDER = GWT.create(EditCriteriaViewUiBinder.class);
-
- @UiField @Nonnull TextBox phraseTextBox;
- @UiField @Nonnull DateBox fromDateBox;
- @UiField @Nonnull DateBox toDateBox;
- @UiField @Nonnull CheckBox debugCheckBox;
- @UiField @Nonnull CheckBox warnCheckBox;
- @UiField @Nonnull CheckBox infoCheckBox;
- @UiField @Nonnull CheckBox errorCheckBox;
-
- @Nonnull private Presenter presenter;
-
- @Inject
- public EditCriteriaViewImpl(@Nonnull final LogBrowserConstans constans) {
- init(constans.editCriteriaDialogTitle(), UI_BINDER.createAndBindUi(this));
- }
-
- @UiHandler("cancelButton")
- void onCancelButtonClicked(@Nonnull final ClickEvent event) {
- hide();
- }
-
- @UiHandler("saveButton")
- void onSaveButtonClicked(@Nonnull final ClickEvent event) {
- presenter.onSaveButtonClicked();
- hide();
- }
-
- public HasValue<String> getPhraseValue() {
- return phraseTextBox;
- }
-
- @Nonnull
- public HasValue<Date> getFromValue() {
- return fromDateBox;
- }
-
- @Nonnull
- public HasValue<Date> getToValue() {
- return toDateBox;
- }
-
- @Nonnull
- public HasValue<Boolean> getDebugValue() {
- return debugCheckBox;
- }
-
- @Nonnull
- public HasValue<Boolean> getInfoValue() {
- return infoCheckBox;
- }
-
- @Nonnull
- public HasValue<Boolean> getWarnValue() {
- return warnCheckBox;
- }
-
- @Nonnull
- public HasValue<Boolean> getErrorValue() {
- return errorCheckBox;
- }
-
- @Nullable
- public Widget asWidget() {
- return null;
- }
-
- public void setPresenter(Presenter presenter) {
- this.presenter = presenter;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EntryTable.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EntryTable.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EntryTable.java
deleted file mode 100644
index ba0afc3..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EntryTable.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import org.apache.cxf.management.web.browser.client.service.browser.Entry;
-
-public class EntryTable extends SelectableTable<Entry> {
- public EntryTable() {
- super(/* hotkeys enabled */ true);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarPresenter.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarPresenter.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarPresenter.java
deleted file mode 100644
index f1335e3..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarPresenter.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import java.util.List;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.http.client.URL;
-import com.google.gwt.i18n.client.DateTimeFormat;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import com.google.inject.name.Named;
-import org.apache.cxf.management.web.browser.client.event.ChangedFilterOptionsEvent;
-import org.apache.cxf.management.web.browser.client.event.ChangedFilterOptionsEventHandler;
-import org.apache.cxf.management.web.browser.client.event.ChangedSubscriptionsEvent;
-import org.apache.cxf.management.web.browser.client.event.ChangedSubscriptionsEventHandler;
-import org.apache.cxf.management.web.browser.client.event.GoToEditCriteriaEvent;
-import org.apache.cxf.management.web.browser.client.event.GoToSettingsEvent;
-import org.apache.cxf.management.web.browser.client.event.SelectedSubscriptionEvent;
-import org.apache.cxf.management.web.browser.client.service.browser.FilterOptions;
-import org.apache.cxf.management.web.browser.client.service.browser.FilterOptions.Level;
-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;
-import org.apache.cxf.management.web.browser.client.ui.BindStrategy;
-
-@Singleton
-public class NavigationSidebarPresenter extends BasePresenter implements NavigationSidebarView.Presenter {
- @Nonnull private final NavigationSidebarView view;
- @Nonnull private final SettingsFacade settingsManager;
-
- @Nonnull private FilterOptions filterOptions = FilterOptions.EMPTY;
-
- @Nullable private Subscription selectedSubscriptionInExplorer;
- @Nullable private Subscription selectedSubscriptionInFilter;
-
- @Nonnull private List<Subscription> subscriptions;
-
- @Inject
- public NavigationSidebarPresenter(@Nonnull final EventBus eventBus,
- @Nonnull final NavigationSidebarView view,
- @Nonnull @Named("BindStrategyForNavigationSidebar") final BindStrategy bindStrategy,
- @Nonnull final SettingsFacade settingsManager) {
- super(eventBus, view, bindStrategy);
-
- this.view = view;
- this.view.setPresenter(this);
-
- this.settingsManager = settingsManager;
-
- bind();
-
- updateSubscriptions();
- }
-
- public void onExploreSubcriptionItemClicked(int row) {
- assert row >= 0 && row < subscriptions.size();
-
- selectedSubscriptionInExplorer = subscriptions.get(row);
- selectedSubscriptionInFilter = null;
-
- eventBus.fireEvent(new SelectedSubscriptionEvent(selectedSubscriptionInExplorer.getUrl()));
- }
-
- public void onFilterSubcriptionItemClicked(int row) {
- assert row >= 0 && row < subscriptions.size();
-
- selectedSubscriptionInFilter = subscriptions.get(row);
- selectedSubscriptionInExplorer = null;
-
- selectSubscriptionWithFilterOptions();
- }
-
- private void selectSubscriptionWithFilterOptions() {
- assert selectedSubscriptionInFilter != null;
-
- StringBuilder url = new StringBuilder(selectedSubscriptionInFilter.getUrl());
-
- if (filterOptions != FilterOptions.EMPTY) {
- url.append("?_s=");
-
- DateTimeFormat dateTimeFormatter = DateTimeFormat.getFormat("yyyy-MM-dd");
-
- boolean isFirstAttribute = true;
-
- if (filterOptions.getPhrase() != null && !"".equals(filterOptions.getPhrase())) {
- url.append("message==*");
- url.append(filterOptions.getPhrase());
- url.append("*;");
- isFirstAttribute = false;
- }
-
- if (filterOptions.getFrom() != null) {
- url.append("date=ge=");
- url.append(dateTimeFormatter.format(filterOptions.getFrom()));
- url.append(";");
- isFirstAttribute = false;
- }
-
- if (filterOptions.getTo() != null) {
- url.append("date=lt=");
- url.append(dateTimeFormatter.format(filterOptions.getTo()));
- url.append(";");
- isFirstAttribute = false;
- }
-
- if (!filterOptions.getLevels().isEmpty()) {
-
- // Add parenthesis only if not first attribute
- if (!isFirstAttribute) {
- url.append("(");
- }
-
- for (Level level : filterOptions.getLevels()) {
- url.append("level==");
- url.append(level);
- url.append(",");
- }
-
- // Remove last ';' or ',' from URL
- url.deleteCharAt(url.length() - 1);
-
- // Add parenthesis only if not first attribute
- if (!isFirstAttribute) {
- url.append(")");
- }
- } else {
-
- // Remove last ';' or ',' from URL
- url.deleteCharAt(url.length() - 1);
- }
- }
-
- eventBus.fireEvent(new SelectedSubscriptionEvent(URL.encode(url.toString())));
- }
-
- public void onManageSubscriptionsButtonClicked() {
- eventBus.fireEvent(new GoToSettingsEvent());
- }
-
- public void onEditCriteriaHyperinkClicked() {
- eventBus.fireEvent(new GoToEditCriteriaEvent());
- }
-
- private void updateSubscriptions() {
- subscriptions = settingsManager.getSubscriptions();
- view.setSubscriptions(subscriptions);
- }
-
- private void bind() {
- eventBus.addHandler(ChangedSubscriptionsEvent.TYPE, new ChangedSubscriptionsEventHandler() {
-
- public void onChangedSubscriptions(ChangedSubscriptionsEvent event) {
- updateSubscriptions();
- }
- });
-
- eventBus.addHandler(ChangedFilterOptionsEvent.TYPE, new ChangedFilterOptionsEventHandler() {
-
- public void onChangedFilterOptions(ChangedFilterOptionsEvent event) {
- filterOptions = event.getFilterOptions();
- if (selectedSubscriptionInFilter != null) {
- selectSubscriptionWithFilterOptions();
- }
- }
- });
- }
-}
[2/8] cxf git commit: [CXF-7192] Removing cxf-rt-management-web
module, to be restored on demand
Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullServer.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullServer.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullServer.java
deleted file mode 100644
index fd0b4d7..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullServer.java
+++ /dev/null
@@ -1,622 +0,0 @@
-/**
- * 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.atom;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.WeakHashMap;
-import java.util.logging.Handler;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.HeaderParam;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.StreamingOutput;
-import javax.ws.rs.core.UriBuilder;
-
-import org.apache.abdera.model.Entry;
-import org.apache.abdera.model.Feed;
-import org.apache.cxf.Bus;
-import org.apache.cxf.jaxrs.ext.MessageContext;
-import org.apache.cxf.jaxrs.ext.StreamingResponse;
-import org.apache.cxf.jaxrs.ext.search.ConditionType;
-import org.apache.cxf.jaxrs.ext.search.OrSearchCondition;
-import org.apache.cxf.jaxrs.ext.search.PrimitiveStatement;
-import org.apache.cxf.jaxrs.ext.search.SearchCondition;
-import org.apache.cxf.jaxrs.ext.search.SearchConditionVisitor;
-import org.apache.cxf.jaxrs.ext.search.SearchContext;
-import org.apache.cxf.jaxrs.utils.ExceptionUtils;
-import org.apache.cxf.management.web.logging.LogLevel;
-import org.apache.cxf.management.web.logging.LogRecord;
-import org.apache.cxf.management.web.logging.ReadWriteLogStorage;
-import org.apache.cxf.management.web.logging.ReadableLogStorage;
-import org.apache.cxf.management.web.logging.atom.converter.StandardConverter;
-
-
-@Path("/logs")
-public class AtomPullServer extends AbstractAtomBean {
-
- private List<LogRecord> records = new LinkedList<LogRecord>();
- private WeakHashMap<Integer, Feed> feeds = new WeakHashMap<Integer, Feed>();
- private ReadableLogStorage storage;
- private int pageSize = 20;
- private int maxInMemorySize = 1000;
- private volatile int recordsSize;
- private volatile boolean alreadyClosed;
- private SearchCondition<LogRecord> readableStorageCondition;
- private Map<String, Object> activeStreams;
-
- @Context
- private MessageContext context;
-
- private List<String> endpointAddresses;
- private String serverAddress;
-
- public void setEndpointAddress(String address) {
- setEndpointAddresses(Collections.singletonList(address));
- }
-
- public void setEndpointAddresses(List<String> addresses) {
- this.endpointAddresses = addresses;
- }
-
- public void setServerAddress(String address) {
- this.serverAddress = address;
- }
-
- @Override
- public void init() {
- // the storage might've been used to save previous records or it might
- // point to a file log entries are added to
- if (storage != null) {
- //-1 can be returned by read-only storage if it does not know in advance
- // a number of records it may contain
- recordsSize = storage.getSize();
- }
-
- if (storage == null || storage instanceof ReadWriteLogStorage) {
- super.init();
- } else {
- // super.init() results in the additional Handler being created and publish()
- // method being called as a result. If the storage is read-only it is assumed it points to
- // the external source of log records thus no need to get the publish events here
-
- // instead we create a SearchCondition the external storage will check against when
- // loading the matching records on request
-
- List<SearchCondition<LogRecord>> list = new LinkedList<SearchCondition<LogRecord>>();
- for (LoggerLevel l : super.getLoggers()) {
- LogRecord r = new LogRecord();
- r.setLoggerName(l.getLogger());
- r.setLevel(LogLevel.valueOf(l.getLevel()));
- list.add(new SearchConditionImpl(r));
- }
- readableStorageCondition = list.size() == 0 ? null : new OrSearchCondition<LogRecord>(list);
- }
- activeStreams = Collections.synchronizedMap(new HashMap<String, Object>());
- initBusProperty();
- }
-
-
- @Override
- protected Handler createHandler() {
- return new AtomPullHandler(this);
- }
-
- @SuppressWarnings("unchecked")
- protected void initBusProperty() {
- if (endpointAddresses != null && serverAddress != null && getBus() != null) {
- Bus bus = getBus();
- synchronized (bus) {
- Map<String, String> addresses =
- (Map<String, String>)bus.getProperty("org.apache.cxf.extensions.logging.atom.pull");
- if (addresses == null) {
- addresses = new HashMap<String, String>();
- }
- for (String address : endpointAddresses) {
- addresses.put(address, serverAddress + "/logs");
- }
- bus.setProperty("org.apache.cxf.extensions.logging.atom.pull", addresses);
- }
- }
- }
-
- @GET
- @Produces("application/atom+xml")
- public Feed getXmlFeed() {
- return getXmlFeedWithPage(1);
- }
-
- @GET
- @Produces("application/atom+xml")
- @Path("{id}")
- public Feed getXmlFeedWithPage(@PathParam("id") int page) {
-
- // lets check if the Atom reader is asking for a set of records which has already been
- // converted to Feed
-
- synchronized (feeds) {
- Feed f = feeds.get(page);
- if (f != null) {
- return f;
- }
- }
-
- Feed feed = null;
- SearchCondition<LogRecord> condition = getCurrentCondition();
- synchronized (records) {
- List<LogRecord> list = new LinkedList<LogRecord>();
- int lastPage = fillSubList(list, page, condition);
- Collections.sort(list, new LogRecordComparator());
- feed = (Feed)new CustomFeedConverter(page).convert(list).get(0);
- setFeedPageProperties(feed, page, lastPage);
- }
- // if at the moment we've converted n < pageSize number of records only and
- // persist a Feed keyed by a page then another reader requesting the same page
- // may miss latest records which might've been added since the original request
- if (condition == null && feed.getEntries().size() == pageSize) {
- synchronized (feeds) {
- feeds.put(page, feed);
- }
- }
- return feed;
- }
-
- @GET
- @Produces({"text/html", "application/xhtml+xml" })
- @Path("alternate/{id}")
- public String getAlternateFeed(@PathParam("id") int page) {
- List<LogRecord> list = new LinkedList<LogRecord>();
- fillSubList(list, page, getCurrentCondition());
- Collections.sort(list, new LogRecordComparator());
- return convertEntriesToHtml(list);
-
- }
-
- @GET
- @Produces({"text/html", "application/xhtml+xml" })
- @Path("subscribe/alternate")
- public StreamingOutput getAlternateContinuousFeed(@HeaderParam("requestId") String reqid) {
- final String key = reqid == null ? "*" : reqid;
- return new StreamingOutput() {
- public void write(final OutputStream out) throws IOException, WebApplicationException {
- // return the last entry
- out.write(convertEntryToHtmlFragment(((LinkedList<LogRecord>)records).getLast()).getBytes());
-
- activeStreams.put(key, out);
- }
- };
- }
-
-
- @GET
- @Produces("application/atom+xml;type=entry")
- @Path("subscribe")
- public StreamingResponse<Entry> getXmlContinuousFeed(@HeaderParam("requestId") String reqid) {
- final String key = reqid == null ? "*" : reqid;
- return new StreamingResponse<Entry>() {
- public void writeTo(final StreamingResponse.Writer<Entry> out) throws IOException {
- // return the last entry
- Entry entry = (Entry) new StandardConverter(StandardConverter.Output.ENTRY,
- StandardConverter.Multiplicity.ONE,
- StandardConverter.Format.CONTENT)
- .convert(Collections.singletonList(((LinkedList<LogRecord>)records).getLast())).get(0);
- out.write(entry);
-
- activeStreams.put(key, out);
- }
- };
- }
-
- @GET
- @Produces("text/plain")
- @Path("unsubscribe/{key}")
- public Boolean unsubscribeContinuousFeed(@PathParam("key") String key) {
- return activeStreams.remove(key) != null;
- }
-
- @GET
- @Path("entry/{id}")
- @Produces("application/atom+xml;type=entry")
- public Entry getEntry(@PathParam("id") int index) {
- List<LogRecord> list = getLogRecords(index, getCurrentCondition());
- return (Entry)new CustomEntryConverter(index).convert(list).get(0);
- }
-
- @GET
- @Path("entry/alternate/{id}")
- @Produces({"text/html", "application/xhtml+xml" })
- public String getAlternateEntry(@PathParam("id") int index) {
- List<LogRecord> logRecords = getLogRecords(index, getCurrentCondition());
- return convertEntryToHtml(logRecords.get(0));
- }
-
- @GET
- @Path("records")
- @Produces("text/plain")
- public int getNumberOfAvailableRecords() {
- return recordsSize;
- }
-
- private List<LogRecord> getLogRecords(int index, SearchCondition<LogRecord> theSearch) {
- List<LogRecord> list = new LinkedList<LogRecord>();
- if (storage != null) {
- int storageSize = storage.getSize();
- if (recordsSize == -1 || index < storageSize) {
- storage.load(list, theSearch, index, 1);
- } else if (index < recordsSize) {
- list.add(records.get(index - storageSize));
- }
- } else {
- list.add(records.get(index));
- }
- if (list.size() != 1) {
- throw ExceptionUtils.toNotFoundException(null, null);
- }
- return list;
- }
-
-
- protected int fillSubList(List<LogRecord> list, int page, SearchCondition<LogRecord> theSearch) {
- int oldListSize = list.size();
-
- if (storage != null) {
- page = storage.load(list, theSearch, page, pageSize);
- }
-
- if (recordsSize == -1 || recordsSize == 0 || list.size() == pageSize) {
- return page;
- }
-
- int fromIndex = page == 1 ? list.size()
- : (page - 1) * pageSize + list.size();
- if (fromIndex > recordsSize) {
- // this should not happen really
- page = 1;
- fromIndex = 0;
- }
- int toIndex = page * pageSize;
- if (toIndex > recordsSize) {
- toIndex = recordsSize;
- }
- int offset = storage != null ? pageSize - (list.size() - oldListSize) : 0;
- fromIndex -= offset;
- toIndex -= offset;
- list.addAll(filterRecords(records.subList(fromIndex, toIndex), theSearch));
-
-
- if (theSearch != null && list.size() < pageSize && page * pageSize < recordsSize) {
- return fillSubList(list, page + 1, theSearch);
- } else {
- return page;
- }
- }
-
- private List<LogRecord> filterRecords(List<LogRecord> list, SearchCondition<LogRecord> theSearch) {
- return theSearch == null ? list : theSearch.findAll(list);
- }
-
- private SearchCondition<LogRecord> getCurrentCondition() {
- SearchCondition<LogRecord> current = context.getContext(SearchContext.class)
- .getCondition(LogRecord.class);
- if (current == null) {
- return readableStorageCondition;
- } else {
- return current;
- }
- }
-
- private String getSearchExpression() {
- return context.getContext(SearchContext.class).getSearchExpression();
- }
-
- protected void setFeedPageProperties(Feed feed, int page, int lastPage) {
- String self = context.getUriInfo().getAbsolutePath().toString();
- feed.addLink(self, "self");
-
- int feedSize = feed.getEntries().size();
- String searchExpression = getSearchExpression();
-
- String uri = context.getUriInfo().getBaseUriBuilder().path("logs").build().toString();
- feed.addLink(uri + "/alternate/" + page, "alternate");
- if (recordsSize != -1) {
- if (page > 2) {
- feed.addLink(createLinkUri(uri, searchExpression), "first");
- }
-
- if (searchExpression == null && lastPage * pageSize < recordsSize
- || searchExpression != null && feedSize == pageSize) {
- feed.addLink(createLinkUri(uri + "/" + (lastPage + 1), searchExpression), "next");
- }
-
- if (searchExpression == null && page * (pageSize + 1) < recordsSize) {
- feed.addLink(uri + "/" + (recordsSize / pageSize + 1), "last");
- }
- } else if (feedSize == pageSize) {
- feed.addLink(createLinkUri(uri + "/" + (lastPage + 1), searchExpression), "next");
- }
- if (page > 1) {
- uri = page > 2 ? uri + "/" + (page - 1) : uri;
- feed.addLink(createLinkUri(uri, searchExpression), "previous");
- }
- }
-
- private String createLinkUri(String uri, String search) {
- return search == null ? uri : uri + "?_s=" + search;
- }
-
- public void publish(LogRecord record) {
- if (alreadyClosed) {
- System.err.println("AtomPullServer has been closed, the following log record can not be saved : "
- + record.toString());
- return;
- }
- synchronized (records) {
- if (records.size() == maxInMemorySize) {
- if (storage instanceof ReadWriteLogStorage) {
- ((ReadWriteLogStorage)storage).save(records);
- records.clear();
- } else {
- LogRecord oldRecord = records.remove(0);
- System.err.println("The oldest log record is removed : " + oldRecord.toString());
- }
- }
- records.add(record);
- ++recordsSize;
- }
- submit(record);
- }
-
- private void submit(final LogRecord record) {
- //TODO use an executor to broadcast the record asynchronously
- //TODO take the search condition in consideration to filter out those non-matching entries
- if (activeStreams.size() > 0) {
- byte[] rbytes = null;
- Entry rentry = null;
- for (Iterator<Object> it = activeStreams.values().iterator(); it.hasNext();) {
- Object out = it.next();
- try {
- if (out instanceof OutputStream) {
- if (rbytes == null) {
- rbytes = convertEntryToHtmlFragment(record).getBytes();
- }
- ((OutputStream)out).write(rbytes);
- } else if (out instanceof StreamingResponse.Writer) {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- try {
- // switch TCCL as abdera uses TCCL to load various abdera classes during serialization
- Thread.currentThread().setContextClassLoader(StandardConverter.class.getClassLoader());
- if (rentry == null) {
- rentry = (Entry) new StandardConverter(StandardConverter.Output.ENTRY,
- StandardConverter.Multiplicity.ONE,
- StandardConverter.Format.CONTENT)
- .convert(Collections.singletonList(record)).get(0);
- }
- ((StreamingResponse.Writer<Entry>)out).write(rentry);
- } finally {
- Thread.currentThread().setContextClassLoader(cl);
- }
- }
- } catch (Throwable t) {
- // REVISIT
- // the reason for not logging anything here is to not further clog the logger
- // with this log broadcasting failure.
- System.err.print("ERROR | AtomPullServer | " + t + "; Unregistering " + out);
- it.remove();
- }
- }
- }
- }
-
- public void setPageSize(int size) {
- pageSize = size;
- }
-
- public void setMaxInMemorySize(int maxInMemorySize) {
- this.maxInMemorySize = maxInMemorySize;
- }
-
- public void setStorage(ReadableLogStorage storage) {
- this.storage = storage;
- }
-
- public void close() {
- if (alreadyClosed) {
- return;
- }
- alreadyClosed = true;
- if (storage instanceof ReadWriteLogStorage) {
- ((ReadWriteLogStorage)storage).save(records);
- }
- }
-
- public synchronized void reset() {
- records.clear();
- recordsSize = 0;
- feeds.clear();
- activeStreams.clear();
- }
-
- // TODO : this all can be done later on in a simple xslt template
- private String convertEntriesToHtml(List<LogRecord> rs) {
- StringBuilder sb = new StringBuilder();
- startHtmlHeadAndBody(sb, "CXF Service Log Entries");
- addRecordToTable(sb, rs, true);
- sb.append("</body></html>");
- return sb.toString();
- }
- // TODO : this all can be done later on in a simple xslt template
- private String convertEntryToHtml(LogRecord r) {
- StringBuilder sb = new StringBuilder();
- startHtmlHeadAndBody(sb, r.getLevel().toString());
- addRecordToTable(sb, Collections.singletonList(r), false);
- sb.append("</body></html>");
- return sb.toString();
- }
- private String convertEntryToHtmlFragment(LogRecord r) {
- StringBuilder sb = new StringBuilder();
- DateFormat df = new SimpleDateFormat("dd/MM/yy HH:mm:ss");
- addRecordToTable(sb, df, r, false);
- return sb.toString();
- }
-
- private void addRecordToTable(StringBuilder sb, List<LogRecord> list, boolean forFeed) {
- DateFormat df = new SimpleDateFormat("dd/MM/yy HH:mm:ss");
- sb.append("<table border=\"1\">");
- sb.append("<tr><th>Date</th><th>Level</th><th>Logger</th><th>Message</th></tr>");
- for (LogRecord lr : list) {
- addRecordToTable(sb, df, lr, forFeed);
- }
- sb.append("</table><br/><br/>");
- }
-
- private void addRecordToTable(StringBuilder sb, DateFormat df, LogRecord lr, boolean forFeed) {
- sb.append("<tr>");
- sb.append("<td>" + df.format(lr.getDate()) + "</td>");
- sb.append("<td>" + lr.getLevel().toString() + "</td>");
- sb.append("<td>" + lr.getLoggerName() + "</td>");
- String message = null;
- if (lr.getMessage().length() > 0) {
- message = lr.getThrowable().length() > 0 ? lr.getMessage() + " : " + lr.getThrowable()
- : lr.getMessage();
- } else if (lr.getThrowable().length() > 0) {
- message = lr.getThrowable();
- } else {
- message = " ";
- }
- if (forFeed && lr.getThrowable().length() > 0) {
- message = message.substring(0, message.length() / 2);
- }
- sb.append("<td>" + message + "</td>");
- sb.append("</tr>");
- }
-
- private void startHtmlHeadAndBody(StringBuilder sb, String title) {
- sb.append("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
- sb.append("<head>");
- sb.append("<meta http-equiv=\"content-type\" content=\"text/html;charset=UTF-8\"/>");
- sb.append("<title>" + "Log record with level " + title + "</title>");
- sb.append("</head>");
- sb.append("<body>");
- }
-
- private static class SearchConditionImpl implements SearchCondition<LogRecord> {
- private LogRecord template;
-
- SearchConditionImpl(LogRecord l) {
- this.template = l;
- }
-
- public boolean isMet(LogRecord pojo) {
-
- return (template.getLevel() == LogLevel.ALL
- || pojo.getLevel().compareTo(template.getLevel()) <= 0)
- && template.getLoggerName().equals(pojo.getLoggerName());
- }
-
- public LogRecord getCondition() {
- return new LogRecord(template);
- }
-
- public ConditionType getConditionType() {
- return ConditionType.CUSTOM;
- }
-
- public List<SearchCondition<LogRecord>> getSearchConditions() {
- return null;
- }
-
- public List<LogRecord> findAll(Collection<LogRecord> pojos) {
- List<LogRecord> list = new LinkedList<LogRecord>();
- for (LogRecord r : pojos) {
- if (isMet(r)) {
- list.add(r);
- }
- }
- return list;
- }
-
- public PrimitiveStatement getStatement() {
- return null;
- }
-
- public void accept(SearchConditionVisitor<LogRecord, ?> visitor) {
- }
- }
-
- private static class LogRecordComparator implements Comparator<LogRecord> {
-
- public int compare(LogRecord r1, LogRecord r2) {
- return r1.getDate().compareTo(r2.getDate()) * -1;
- }
-
- }
-
- private class CustomFeedConverter extends StandardConverter {
- private int page;
- CustomFeedConverter(int page) {
- super(Output.FEED, Multiplicity.MANY, Format.CONTENT);
- this.page = page;
- }
-
- @Override
- protected void setDefaultEntryProperties(Entry entry, List<LogRecord> rs, int entryIndex) {
- super.setDefaultEntryProperties(entry, rs, entryIndex);
- UriBuilder builder = context.getUriInfo().getAbsolutePathBuilder().path("entry");
- Integer realIndex = page == 1 ? entryIndex : page * pageSize + entryIndex;
-
- entry.addLink(builder.clone().path(realIndex.toString()).build().toString(), "self");
- entry.addLink(builder.path("alternate").path(realIndex.toString()).build().toString(),
- "alternate");
- }
-
- }
-
- private class CustomEntryConverter extends StandardConverter {
- private String selfFragment;
- private String altFragment;
- CustomEntryConverter(int index) {
- super(Output.ENTRY, Multiplicity.ONE, Format.CONTENT);
- this.selfFragment = "logs/entry/" + index;
- this.altFragment = "logs/alternate/entry/" + index;
- }
-
- @Override
- protected void setDefaultEntryProperties(Entry entry, List<LogRecord> rs, int entryIndex) {
- super.setDefaultEntryProperties(entry, rs, entryIndex);
- entry.addLink(context.getUriInfo().getBaseUriBuilder().path(selfFragment).build().toString(),
- "self");
- entry.addLink(context.getUriInfo().getBaseUriBuilder().path(altFragment).build().toString(),
- "alternate");
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushBean.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushBean.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushBean.java
deleted file mode 100644
index 6e0c096..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushBean.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/**
- * 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.atom;
-
-import java.util.logging.Handler;
-
-import org.apache.commons.lang3.Validate;
-import org.apache.cxf.management.web.logging.atom.converter.Converter;
-import org.apache.cxf.management.web.logging.atom.deliverer.Deliverer;
-
-/**
- * Bean used to configure {@link AtomPushHandler JUL handler} with Spring instead of properties file. See
- * {@link AtomPushHandler} class for detailed description of parameters. Next to configuration of handler,
- * Spring bean offers simple configuration of associated loggers that share ATOM push-style handler.
- * <p>
- * General rules:
- * <ul>
- * <li>When {@link #setDeliverer(Deliverer) deliverer} property is not set explicitly, URL must be set to
- * create default deliverer.</li>
- * <li>When {@link #setConverter(Converter) converter} property is not set explicitly, default converter is
- * created.</li>
- * <li>When {@link #setLoggers(String) loggers} property is used, it overrides pair of
- * {@link #setLogger(String) logger} and {@link #setLevel(String) level} properties; and vice versa.</li>
- * <li>When logger is not set, handler is attached to root logger (named ""); when level is not set for
- * logger, default "INFO" level is used.</li>
- * <li>When {@link #setBatchSize(String) batchSize} property is not set or set to wrong value, default batch
- * size of "1" is used.</li>
- * <li>When deliverer property is NOT set, use of "retryXxx" properties causes creation of retrying default
- * deliverer.</li>
- * </ul>
- * Examples:
- * <p>
- * ATOM push handler with registered with root logger for all levels or log events, pushing one feed per event
- * to specified URL, using default delivery and conversion methods:
- *
- * <pre>
- * <bean class="org.apache.cxf.jaxrs.ext.logging.atom.AtomPushBean"
- * init-method="init">
- * <property name="url" value="http://localhost:9080/feed"/>
- * <property name="level" value="ALL" />
- * </bean>
- * </pre>
- *
- * ATOM push handler registered with multiple loggers and listening for different levels (see
- * {@link #setLoggers(String) loggers} property description for syntax details). Custom deliverer will take
- * care of feeds, each of which carries batch of 10 log events:
- *
- * <pre>
- * <bean id="soapDeliverer" ...
- * ...
- * <bean class="org.apache.cxf.jaxrs.ext.logging.atom.AtomPushBean"
- * init-method="init">
- * <property name="deliverer">
- * <ref bean="soapDeliverer"/>
- * </property>
- * <property name="loggers" value="
- * org.apache.cxf:DEBUG,
- * org.apache.cxf.jaxrs,
- * org.apache.cxf.bus:ERROR" />
- * <property name="batchSize" value="10" />
- * </bean>
- * </pre>
- */
-public final class AtomPushBean extends AbstractAtomBean {
-
- private AtomPushEngineConfigurator conf = new AtomPushEngineConfigurator();
-
- /**
- * Creates unconfigured and uninitialized bean. To configure setters must be used, then {@link #init()}
- * must be called.
- */
- public AtomPushBean() {
- }
-
- /**
- * Set URL used when custom deliverer is not set (default deliverer is being created).
- */
- public void setUrl(String url) {
- checkInit();
- Validate.notNull(url, "url is null");
- conf.setUrl(url);
- }
-
- /**
- * Set initialized deliverer.
- */
- public void setDeliverer(Deliverer deliverer) {
- checkInit();
- Validate.notNull(deliverer, "deliverer is null");
- conf.setDeliverer(deliverer);
- }
-
- /**
- * Set initialized converter.
- */
- public void setConverter(Converter converter) {
- checkInit();
- Validate.notNull(converter, "converter is null");
- conf.setConverter(converter);
- }
-
- /**
- * Size of batch; empty string for default one element batch.
- */
- public void setBatchSize(String batchSize) {
- checkInit();
- Validate.notNull(batchSize, "batchSize is null");
- conf.setBatchSize(batchSize);
- }
-
- /**
- * Batch cleanup time in minutes
- */
- public void setBatchCleanupTime(String batchCleanupTime) {
- checkInit();
- Validate.notNull(batchCleanupTime, "batchCleanup is null");
- conf.setBatchCleanupTime(batchCleanupTime);
- }
-
- /**
- * Retry pause calculation strategy, either "linear" or "exponential".
- */
- public void setRetryPause(String retryPause) {
- checkInit();
- Validate.notNull(retryPause, "retryPause is null");
- conf.setRetryPause(retryPause);
- }
-
- /**
- * Retry pause time (in seconds).
- */
- public void setRetryPauseTime(String time) {
- checkInit();
- Validate.notNull(time, "time is null");
- conf.setRetryPauseTime(time);
- }
-
- /**
- * Retry timeout (in seconds).
- */
- public void setRetryTimeout(String timeout) {
- checkInit();
- Validate.notNull(timeout, "timeout is null");
- conf.setRetryTimeout(timeout);
- }
-
- /**
- * Conversion output type: "feed" or "entry".
- */
- public void setOutput(String output) {
- checkInit();
- Validate.notNull(output, "output is null");
- conf.setOutput(output);
- }
-
- /**
- * Multiplicity of subelement of output: "one" or "many".
- */
- public void setMultiplicity(String multiplicity) {
- checkInit();
- Validate.notNull(multiplicity, "multiplicity is null");
- conf.setMultiplicity(multiplicity);
- }
-
- /**
- * Entry data format: "content" or "extension".
- */
- public void setFormat(String format) {
- checkInit();
- Validate.notNull(format, "format is null");
- conf.setFormat(format);
- }
-
- protected Handler createHandler() {
- return new AtomPushHandler(conf.createEngine());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java
deleted file mode 100644
index 3069a73..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngine.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/**
- * 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.atom;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.abdera.model.Element;
-import org.apache.commons.lang3.Validate;
-import org.apache.cxf.management.web.logging.LogRecord;
-import org.apache.cxf.management.web.logging.atom.converter.Converter;
-import org.apache.cxf.management.web.logging.atom.deliverer.Deliverer;
-
-/**
- * Package private ATOM push-style engine. Engine enqueues log records as they are {@link #publish(LogRecord)
- * published}. After queue size exceeds {@link #getBatchSize() batch size} processing of collection of these
- * records (in size of batch size) is triggered.
- * <p>
- * Processing is done in separate thread not to block publishing interface. Processing is two step: first list
- * of log records is transformed by {@link Converter converter} to ATOM {@link Element element} and then it is
- * pushed out by {@link Deliverer deliverer} to client. Next to transport deliverer is indirectly responsible
- * for marshaling ATOM element to XML.
- * <p>
- * Processing is done by single threaded {@link java.util.concurrent.Executor executor}; next batch of records
- * is taken from queue only when currently processed batch finishes and queue has enough elements to proceed.
- * <p>
- * First failure of any delivery shuts engine down. To avoid this situation engine must have registered
- * reliable deliverer or use wrapping
- * {@link org.apache.cxf.jaxrs.ext.logging.atom.deliverer.RetryingDeliverer}.
- */
-// TODO add internal diagnostics - log messages somewhere except for logger :D
-final class AtomPushEngine {
- private List<LogRecord> queue = new ArrayList<LogRecord>();
- private ExecutorService executor = Executors.newSingleThreadExecutor();
- private int batchSize = 1;
- private int batchTime;
- private Converter converter;
- private Deliverer deliverer;
- private Timer timer;
-
- /**
- * Put record to publishing queue. Engine accepts published records only if is in proper state - is
- * properly configured (has deliverer and converter registered) and is not shot down; otherwise calls to
- * publish are ignored.
- *
- * @param record record to be published.
- */
- public synchronized void publish(LogRecord record) {
- Validate.notNull(record, "record is null");
- if (isValid()) {
- if (batchSize > 1 && batchTime > 0 && timer == null) {
- createTimerTask((long)batchTime * 60L * 1000L);
- }
- queue.add(record);
- if (queue.size() >= batchSize) {
- publishAndReset();
- }
- } else {
- handleUndeliveredRecords(Collections.singletonList(record),
- deliverer == null ? "" : deliverer.getEndpointAddress());
- }
- }
-
- protected synchronized void publishAndReset() {
- publishBatch(queue, deliverer, converter);
- queue = new ArrayList<LogRecord>();
- }
-
- /**
- * Shuts engine down.
- */
- public synchronized void shutdown() {
- cancelTimerTask();
- if (isValid() && queue.size() > 0) {
- publishAndReset();
- }
- executor.shutdown();
-
- try {
- //wait a little to try and flush the batches
- //it's not critical, but can avoid errors on the
- //console and such which could be confusing
- executor.awaitTermination(20, TimeUnit.SECONDS);
- } catch (InterruptedException e) {
- //ignore
- }
- }
-
- private boolean isValid() {
- if (deliverer == null) {
- // TODO report cause
- ///System.err.println("deliverer is not set");
- return false;
- }
- if (converter == null) {
- //System.err.println("converter is not set");
- return false;
- }
- return !executor.isShutdown();
- }
-
- private void publishBatch(final List<LogRecord> batch,
- final Deliverer d,
- final Converter c) {
- executor.execute(new Runnable() {
- public void run() {
- try {
- LoggingThread.markSilent(true);
- List<? extends Element> elements = c.convert(batch);
- for (int i = 0; i < elements.size(); i++) {
- Element element = elements.get(i);
- if (!d.deliver(element)) {
- System.err.println("Delivery to " + d.getEndpointAddress()
- + " failed, shutting engine down");
- List<LogRecord> undelivered = null;
- if (i == 0) {
- undelivered = batch;
- } else {
- int index = (batch.size() / elements.size()) * i;
- // should not happen but just in case :-)
- if (index < batch.size()) {
- undelivered = batch.subList(index, batch.size());
- }
- }
- handleUndeliveredRecords(undelivered, d.getEndpointAddress());
- shutdown();
- break;
- }
- }
- } catch (InterruptedException e) {
- // no action
- } finally {
- LoggingThread.markSilent(false);
- }
- }
- });
- }
-
- protected void handleUndeliveredRecords(List<LogRecord> records, String address) {
- // TODO : save them to some transient storage perhaps ?
- System.err.println("The following records have been undelivered to " + address + " : ");
- for (LogRecord r : records) {
- System.err.println(r.toString());
- }
- }
-
- public int getBatchSize() {
- return batchSize;
- }
-
- public void setBatchSize(int batchSize) {
- Validate.isTrue(batchSize > 0, "batch size is not greater than zero");
- this.batchSize = batchSize;
- }
-
- public void setBatchTime(int batchTime) {
- this.batchTime = batchTime;
- }
-
- /**
- * Creates a timer task which will periodically flush the batch queue
- * thus ensuring log records won't become too 'stale'.
- * Ex, if we have a batch size 10 and only WARN records need to be delivered
- * then without the periodic cleanup the consumers may not get prompt notifications
- *
- * @param timeout
- */
- protected void createTimerTask(long timeout) {
- timer = new Timer();
- timer.schedule(new TimerTask() {
- public void run() {
- publishAndReset();
- }
- }, timeout);
- }
-
- protected void cancelTimerTask() {
- if (timer != null) {
- timer.cancel();
- timer = null;
- }
- }
-
- public synchronized Converter getConverter() {
- return converter;
- }
-
- public synchronized void setConverter(Converter converter) {
- Validate.notNull(converter, "converter is null");
- this.converter = converter;
- }
-
- public synchronized Deliverer getDeliverer() {
- return deliverer;
- }
-
- public synchronized void setDeliverer(Deliverer deliverer) {
- Validate.notNull(deliverer, "deliverer is null");
- this.deliverer = deliverer;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngineConfigurator.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngineConfigurator.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngineConfigurator.java
deleted file mode 100644
index 78a8414..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushEngineConfigurator.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/**
- * 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.atom;
-
-import java.lang.reflect.Constructor;
-
-import org.apache.cxf.management.web.logging.atom.converter.Converter;
-import org.apache.cxf.management.web.logging.atom.converter.StandardConverter;
-import org.apache.cxf.management.web.logging.atom.converter.StandardConverter.Format;
-import org.apache.cxf.management.web.logging.atom.converter.StandardConverter.Multiplicity;
-import org.apache.cxf.management.web.logging.atom.converter.StandardConverter.Output;
-import org.apache.cxf.management.web.logging.atom.deliverer.Deliverer;
-import org.apache.cxf.management.web.logging.atom.deliverer.RetryingDeliverer;
-import org.apache.cxf.management.web.logging.atom.deliverer.WebClientDeliverer;
-
-/**
- * Package private interpreter of incomplete input of engine configuration. Used commonly by
- * {@link AtomPushHandler properties file} and {@link AtomPushBean spring} configuration schemes.
- */
-// TODO extract 'general rules' of interpretation in handler and bean and put here
-final class AtomPushEngineConfigurator {
-
- private Deliverer deliverer;
- private Converter converter;
- private String delivererClass;
- private String converterClass;
- private String batchSize;
- private String batchCleanupTime;
- private String delivererUrl;
- private String retryTimeout;
- private String retryPause;
- private String retryPauseTime;
- private String output;
- private String multiplicity;
- private String format;
-
- public void setUrl(String url) {
- this.delivererUrl = url;
- }
-
- public void setRetryTimeout(String retryTimeout) {
- this.retryTimeout = retryTimeout;
- }
-
- public void setRetryPause(String retryPause) {
- this.retryPause = retryPause;
- }
-
- public void setRetryPauseTime(String retryPauseTime) {
- this.retryPauseTime = retryPauseTime;
- }
-
- public void setBatchCleanupTime(String cleanupTime) {
- this.batchCleanupTime = cleanupTime;
- }
-
- public void setBatchSize(String batchSize) {
- this.batchSize = batchSize;
- }
-
- public void setDeliverer(Deliverer deliverer) {
- this.deliverer = deliverer;
- }
-
- public void setConverter(Converter converter) {
- this.converter = converter;
- }
-
- public void setDelivererClass(String delivererClass) {
- this.delivererClass = delivererClass;
- }
-
- public void setConverterClass(String converterClass) {
- this.converterClass = converterClass;
- }
-
- public void setOutput(String output) {
- this.output = output;
- }
-
- public void setMultiplicity(String multiplicity) {
- this.multiplicity = multiplicity;
- }
-
- public void setFormat(String format) {
- this.format = format;
- }
-
- public AtomPushEngine createEngine() {
- Deliverer d = deliverer;
- Converter c = converter;
- int batch = parseInt(batchSize, 1, 1);
- int batchTime = parseInt(batchCleanupTime, 0);
- if (d == null) {
- if (delivererUrl != null) {
- if (delivererClass != null) {
- d = createDeliverer(delivererClass, delivererUrl);
- } else {
- d = new WebClientDeliverer(delivererUrl);
- }
- } else {
- throw new IllegalStateException("Either url, deliverer or "
- + "deliverer class with url must be setup");
- }
- }
- if (c == null) {
- if (converterClass != null) {
- c = createConverter(converterClass);
- } else {
- Output out = parseEnum(output, Output.FEED, Output.class);
- Multiplicity defaultMul = out == Output.FEED ? Multiplicity.MANY
- : batch > 1 ? Multiplicity.MANY : Multiplicity.ONE;
- Multiplicity mul = parseEnum(multiplicity, defaultMul, Multiplicity.class);
- Format form = parseEnum(format, Format.CONTENT, Format.class);
- c = new StandardConverter(out, mul, form);
-
- if (retryPause != null) {
- int timeout = parseInt(retryTimeout, 0, 0);
- int pause = parseInt(retryPauseTime, 1, 30);
- boolean linear = !retryPause.equalsIgnoreCase("exponential");
- d = new RetryingDeliverer(d, timeout, pause, linear);
- }
- }
- }
- AtomPushEngine engine = new AtomPushEngine();
- engine.setDeliverer(d);
- engine.setConverter(c);
- engine.setBatchSize(batch);
- engine.setBatchTime(batchTime);
- return engine;
- }
-
- private Deliverer createDeliverer(String clazz, String url) {
- try {
- Constructor<Deliverer> ctor = loadClass(clazz, Deliverer.class).getConstructor(String.class);
- return ctor.newInstance(url);
- } catch (Exception e) {
- throw new IllegalArgumentException(e);
- }
- }
-
- private Converter createConverter(String clazz) {
- try {
- Constructor<Converter> ctor = loadClass(clazz, Converter.class).getConstructor();
- return ctor.newInstance();
- } catch (Exception e) {
- throw new IllegalArgumentException(e);
- }
- }
-
- @SuppressWarnings("unchecked")
- private <T> Class<T> loadClass(String clazz, Class<T> ifaceClass) throws ClassNotFoundException {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- try {
- return (Class<T>)cl.loadClass(clazz);
- } catch (ClassNotFoundException e) {
- try {
- // clazz could be shorted (stripped package name) retry for interface location
- String pkg = ifaceClass.getPackage().getName();
- String clazz2 = pkg + "." + clazz;
- return (Class<T>)cl.loadClass(clazz2);
- } catch (Exception e1) {
- throw new ClassNotFoundException(e.getMessage() + " or " + e1.getMessage());
- }
- }
- }
-
- private int parseInt(String property, int defaultValue) {
- try {
- return Integer.parseInt(property);
- } catch (NumberFormatException e) {
- return defaultValue;
- }
- }
-
- private int parseInt(String property, int lessThan, int defaultValue) {
- int ret = parseInt(property, defaultValue);
- if (ret < lessThan) {
- ret = defaultValue;
- }
- return ret;
- }
-
- private <T extends Enum<T>> T parseEnum(String value, T defaultValue, Class<T> enumClass) {
- if (value == null || "".equals(value)) {
- return defaultValue;
- }
- try {
- return Enum.valueOf(enumClass, value.toUpperCase());
- } catch (Exception e) {
- return defaultValue;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushHandler.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushHandler.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushHandler.java
deleted file mode 100644
index 7bd6869..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushHandler.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * 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.atom;
-
-import java.util.logging.Handler;
-import java.util.logging.LogManager;
-
-import org.apache.cxf.management.web.logging.LogRecord;
-import org.apache.cxf.management.web.logging.atom.converter.Converter;
-import org.apache.cxf.management.web.logging.atom.deliverer.Deliverer;
-
-/**
- * Handler pushing log records in batches as Atom Feeds or Entries to registered client. Handler
- * responsibility is to adapt to JUL framework while most of job is delegated to {@link AtomPushEngine}.
- * <p>
- * For simple configuration using properties file (one global root-level handler of this class) following
- * properties prefixed with full name of this class can be used:
- * <ul>
- * <li><b>url</b> - URL where feeds will be pushed (mandatory parameter)</li>
- * <li><b>batchSize</b> - integer number specifying minimal number of published log records that trigger
- * processing and pushing ATOM document. If parameter is not set, is not greater than zero or is not a number,
- * batch size is set to 1.</li>
- * </ul>
- * Conversion of log records into ATOM Elements can be tuned up using following parameters. Note that not all
- * combinations are meaningful, see {@link org.apache.cxf.jaxrs.ext.logging.atom.converter.StandardConverter}
- * for details:
- * <ul>
- * <li><b>output</b> - ATOM Element type pushed out, either "feed" or "entry"; when not specified or invalid
- * value provided "feed" is used.</li>
- * <li><b>multiplicity</b> - multiplicity of subelement(entries in feed for output=="feed" or log records in
- * entry for output=="entry"), either "one" or "many"; when not specified or invalid value provided "one" is
- * used.</li>
- * <li><b>format</b> - method of embedding data in entry, either "content" or "extension"; when not specified
- * or invalid value provided "content" is used.</li>
- * </ul>
- * By default delivery is served by WebClientDeliverer which does not support reliability of transport.
- * Availability of any of this parameters enables retrying of default delivery. Detailed explanation of these
- * parameter, see {@link org.apache.cxf.jaxrs.ext.logging.atom.deliverer.RetryingDeliverer} class description.
- * <ul>
- * <li><b>retry.pause</b> - pausing strategy of delivery retries, either <b>linear</b> or <b>exponential</b>
- * value (mandatory parameter). If mispelled linear is used.</li>
- * <li><b>retry.pause.time</b> - pause time (in seconds) between retries. If parameter is not set, pause is
- * set to 30 seconds.</li>
- * <li><b>retry.timeout</b> - maximum time (in seconds) retrying will be continued. If not set timeout is not
- * set (infinite loop of retries).</li>
- * </ul>
- * Ultimate control on conversion and delivery is obtained specifying own implementation classes:
- * <ul>
- * <li><b>converter</b> - name of class implementing {@link Converter} class replacing default conversion and
- * its specific parameters ("output", "multiplicity" and "format") are ignored. For classes located in same
- * package as Converter interface only class name can be given e.g. instead of
- * "org.apache.cxf.jaxrs.ext.logging.atom.converter.FooBarConverter" one can specify "FooBarConverter".</li>
- * <li><b>deliverer</b> - name of class implementing {@link Deliverer} class replacing default delivery and
- * its specific parameters ("retry.Xxx") are ignored. For classes located in same package as Deliverer
- * interface only class name can be given e.g. instead of
- * "org.apache.cxf.jaxrs.ext.logging.atom.deliverer.WebClientDeliverer" one can specify
- * "WebClientDeliverer".</li>
- * </ul>
- * Example:
- *
- * <pre>
- * handlers = org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler, java.util.logging.ConsoleHandler
- * .level = INFO
- *
- * # deliver to given URL triggering after each batch of 10 log records
- * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.url = http://localhost:9080
- * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.batchSize = 10
- *
- * # enable retrying delivery every 10 seconds for 5 minutes
- * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.retry.pause = linear
- * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.retry.pause.time = 10
- * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.retry.timeout = 300
- *
- * # output for AtomPub: push entries not feeds, each entry with one log record as "atom:extension"
- * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.output = entry
- * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.multiplicity = one
- * org.apache.cxf.jaxrs.ext.logging.atom.AtomPushHandler.format = extension
- * ...
- * </pre>
- */
-public final class AtomPushHandler extends Handler {
-
- private AtomPushEngine engine;
- private boolean lazyConfig;
-
- /**
- * Creates handler with configuration taken from properties file.
- */
- public AtomPushHandler() {
- // deferred configuration: configure() called from here would use utilities that attempt to log
- // and create this handler instance in recursion; configure() will be called on first publish()
- lazyConfig = true;
- }
-
- /**
- * Creates handler with custom parameters.
- *
- * @param batchSize batch size, see {@link AtomPushEngine#getBatchSize()}
- * @param converter converter transforming logs into ATOM elements
- * @param deliverer deliverer pushing ATOM elements to client
- */
- public AtomPushHandler(int batchSize, Converter converter, Deliverer deliverer) {
- engine = new AtomPushEngine();
- engine.setBatchSize(batchSize);
- engine.setConverter(converter);
- engine.setDeliverer(deliverer);
- }
-
- /**
- * Creates handler using (package private).
- *
- * @param engine configured engine.
- */
- AtomPushHandler(AtomPushEngine engine) {
- this.engine = engine;
- }
-
- @Override
- public synchronized void publish(java.util.logging.LogRecord record) {
- if (LoggingThread.isSilent()) {
- return;
- }
- LoggingThread.markSilent(true);
- try {
- if (lazyConfig) {
- lazyConfig = false;
- configure();
- }
- if (engine == null) {
- return;
- }
- LogRecord rec = LogRecord.fromJUL(record);
- engine.publish(rec);
- } finally {
- LoggingThread.markSilent(false);
- }
- }
-
- @Override
- public synchronized void close() throws SecurityException {
- if (engine != null) {
- engine.shutdown();
- }
- engine = null;
- }
-
- @Override
- public synchronized void flush() {
- // no-op
- }
-
- /**
- * Configuration from properties. Aligned to JUL strategy - properties file is only for simple
- * configuration: it allows configure one root handler with its parameters. What is even more dummy, JUL
- * does not allow to iterate over configuration properties to make interpretation automated (e.g. using
- * commons-beanutils)
- */
- private void configure() {
- LogManager manager = LogManager.getLogManager();
- String cname = getClass().getName();
- AtomPushEngineConfigurator conf = new AtomPushEngineConfigurator();
- conf.setUrl(manager.getProperty(cname + ".url"));
- conf.setDelivererClass(manager.getProperty(cname + ".deliverer"));
- conf.setConverterClass(manager.getProperty(cname + ".converter"));
- conf.setBatchSize(manager.getProperty(cname + ".batchSize"));
- conf.setBatchCleanupTime(manager.getProperty(cname + ".batchCleanupTime"));
- conf.setRetryPause(manager.getProperty(cname + ".retry.pause"));
- conf.setRetryPauseTime(manager.getProperty(cname + ".retry.pause.time"));
- conf.setRetryTimeout(manager.getProperty(cname + ".retry.timeout"));
- conf.setOutput(manager.getProperty(cname + ".output"));
- conf.setMultiplicity(manager.getProperty(cname + ".multiplicity"));
- conf.setFormat(manager.getProperty(cname + ".format"));
- engine = conf.createEngine();
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushOverWebSocketServer.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushOverWebSocketServer.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushOverWebSocketServer.java
deleted file mode 100644
index 11f04df..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPushOverWebSocketServer.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- * 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.atom;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.logging.Handler;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.HeaderParam;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-
-import org.apache.abdera.model.Element;
-import org.apache.abdera.model.Feed;
-import org.apache.commons.lang3.Validate;
-import org.apache.cxf.jaxrs.ext.StreamingResponse;
-import org.apache.cxf.management.web.logging.atom.converter.Converter;
-import org.apache.cxf.management.web.logging.atom.deliverer.Deliverer;
-
-/**
- * Bean used to configure {@link AtomPushHandler JUL handler} with Spring instead of properties file. See
- * {@link AtomPushHandler} class for detailed description of parameters. Next to configuration of handler,
- * Spring bean offers simple configuration of associated loggers that share ATOM push-style handler.
- * <p>
- * General rules:
- * <ul>
- * <li>When {@link #setConverter(Converter) converter} property is not set explicitly, default converter is
- * created.</li>
- * <li>When {@link #setLoggers(String) loggers} property is used, it overrides pair of
- * {@link #setLogger(String) logger} and {@link #setLevel(String) level} properties; and vice versa.</li>
- * <li>When logger is not set, handler is attached to root logger (named ""); when level is not set for
- * logger, default "INFO" level is used.</li>
- * <li>When {@link #setBatchSize(String) batchSize} property is not set or set to wrong value, default batch
- * size of "1" is used.</li>
- * <li>When deliverer property is NOT set, use of "retryXxx" properties causes creation of retrying default
- * deliverer.</li>
- * </ul>
- * Examples:
- * <p>
- * ATOM push handler with registered with root logger for all levels or log events, pushing one feed per event
- * over the connected websocket, using default conversion methods:
- *
- * <pre>
- * <bean class="org.apache.cxf.jaxrs.ext.logging.atom.AtomPushOverWebSocketBean"
- * init-method="init">
- * <property name="level" value="ALL" />
- * </bean>
- * </pre>
- *
- * ATOM push handler registered with multiple loggers and listening for different levels (see
- * {@link #setLoggers(String) loggers} property description for syntax details). Custom deliverer will take
- * care of feeds, each of which carries batch of 10 log events:
- *
- * <pre>
- * ...
- * <bean class="org.apache.cxf.jaxrs.ext.logging.atom.AtomPushOverWebSocketServer"
- * init-method="init">
- * <property name="loggers" value="
- * org.apache.cxf:DEBUG,
- * org.apache.cxf.jaxrs,
- * org.apache.cxf.bus:ERROR" />
- * <property name="batchSize" value="10" />
- * </bean>
- * </pre>
- */
-//REVISIT we will move the common part into AbstractAtomPushBean so that it can be shared by both AtomPushBean and this
-@Path("/logs2")
-public final class AtomPushOverWebSocketServer extends AbstractAtomBean {
- private AtomPushEngineConfigurator conf = new AtomPushEngineConfigurator();
- private Map<String, Object> activeStreams;
-
- /**
- * Creates unconfigured and uninitialized bean. To configure setters must be used, then {@link #init()}
- * must be called.
- */
- public AtomPushOverWebSocketServer() {
- conf.setDeliverer(new WebSocketDeliverer());
- }
-
- @Override
- public void init() {
- super.init();
- activeStreams = Collections.synchronizedMap(new HashMap<String, Object>());
- }
-
- /**
- * Set initialized converter.
- */
- public void setConverter(Converter converter) {
- checkInit();
- Validate.notNull(converter, "converter is null");
- conf.setConverter(converter);
- }
-
- /**
- * Size of batch; empty string for default one element batch.
- */
- public void setBatchSize(String batchSize) {
- checkInit();
- Validate.notNull(batchSize, "batchSize is null");
- conf.setBatchSize(batchSize);
- }
-
- /**
- * Batch cleanup time in minutes
- */
- public void setBatchCleanupTime(String batchCleanupTime) {
- checkInit();
- Validate.notNull(batchCleanupTime, "batchCleanup is null");
- conf.setBatchCleanupTime(batchCleanupTime);
- }
-
- /**
- * Retry pause calculation strategy, either "linear" or "exponential".
- */
- public void setRetryPause(String retryPause) {
- checkInit();
- Validate.notNull(retryPause, "retryPause is null");
- conf.setRetryPause(retryPause);
- }
-
- /**
- * Retry pause time (in seconds).
- */
- public void setRetryPauseTime(String time) {
- checkInit();
- Validate.notNull(time, "time is null");
- conf.setRetryPauseTime(time);
- }
-
- /**
- * Retry timeout (in seconds).
- */
- public void setRetryTimeout(String timeout) {
- checkInit();
- Validate.notNull(timeout, "timeout is null");
- conf.setRetryTimeout(timeout);
- }
-
- /**
- * Conversion output type: "feed" or "entry".
- */
- public void setOutput(String output) {
- checkInit();
- Validate.notNull(output, "output is null");
- conf.setOutput(output);
- }
-
- /**
- * Multiplicity of subelement of output: "one" or "many".
- */
- public void setMultiplicity(String multiplicity) {
- checkInit();
- Validate.notNull(multiplicity, "multiplicity is null");
- conf.setMultiplicity(multiplicity);
- }
-
- /**
- * Entry data format: "content" or "extension".
- */
- public void setFormat(String format) {
- checkInit();
- Validate.notNull(format, "format is null");
- conf.setFormat(format);
- }
-
- protected Handler createHandler() {
- return new AtomPushHandler(conf.createEngine());
- }
-
- @GET
- @Produces("application/atom+xml")
- @Path("subscribe")
- public StreamingResponse<Feed> subscribeXmlFeed(@HeaderParam("requestId") String reqid) {
- final String key = reqid == null ? "*" : reqid;
- return new StreamingResponse<Feed>() {
- public void writeTo(final StreamingResponse.Writer<Feed> out) throws IOException {
- activeStreams.put(key, out);
- }
- };
- }
-
- @GET
- @Produces("text/plain")
- @Path("unsubscribe/{key}")
- public Boolean unsubscribeXmlFeed(@PathParam("key") String key) {
- return activeStreams.remove(key) != null;
- }
-
- private class WebSocketDeliverer implements Deliverer {
-
- @Override
- public boolean deliver(Element element) throws InterruptedException {
- if (activeStreams.size() > 0) {
- for (Iterator<Object> it = activeStreams.values().iterator(); it.hasNext();) {
- Object out = it.next();
- try {
- if (out instanceof StreamingResponse.Writer) {
- ((StreamingResponse.Writer)out).write(element);
- }
- } catch (Throwable t) {
- // REVISIT
- // the reason for not logging anything here is to not further clog the logger
- // with this log broadcasting failure.
- System.err.print("ERROR | AtomPushOverWebSocketServer | " + t + "; Unregistering " + out);
- it.remove();
- }
- }
- }
-
- return true;
- }
-
- @Override
- public String getEndpointAddress() {
- //REVISIT return something else?
- return null;
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/Hold.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/Hold.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/Hold.java
deleted file mode 100644
index b347e13..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/Hold.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.atom;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/*
- * Marker annotation to force the package-info.java to be compiled by javac
- * to avoid problems with the maven compiler plugin always compiling everything
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ ElementType.PACKAGE })
-@interface Hold {
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java
deleted file mode 100644
index e8056e6..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/LoggingThread.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.atom;
-
-/**
- * Helps disable logging from calls of the same thread. Motivation: log handlers in this package causes other
- * threads (from executor) to start logging (by using JAXB that itself uses JUL) which in turn can be caught
- * by the same handler leading to infinite loop.
- * <p>
- * Other approach than using thread local storage would be scanning of stack trace of current thread to see if
- * root of call comes from same package as package of handler - it's less effective so TLS is using here.
- */
-final class LoggingThread {
-
- private static ThreadLocal<Boolean> threadLocal = new ThreadLocal<Boolean>();
-
- private LoggingThread() {
- }
-
- public static void markSilent(boolean silent) {
- if (silent) {
- threadLocal.set(Boolean.TRUE);
- } else {
- threadLocal.remove();
- }
- }
-
- public static boolean isSilent() {
- Boolean b = threadLocal.get();
- if (b != null) {
- return b;
- }
- return false;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/Converter.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/Converter.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/Converter.java
deleted file mode 100644
index 0966854..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/converter/Converter.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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.atom.converter;
-
-import java.util.List;
-
-import org.apache.abdera.model.Element;
-import org.apache.cxf.management.web.logging.LogRecord;
-
-/**
- * Converts batch of log records into one or more ATOM Elements to deliver.
- */
-public interface Converter {
-
- /**
- * Converts given collection.
- *
- * @param records not-null collection of records
- * @return non-empty collection of ATOM Elements that represent log records
- */
- List<? extends Element> convert(List<LogRecord> records);
-}
[8/8] cxf git commit: [CXF-7192] Removing cxf-rt-management-web
module, to be restored on demand
Posted by se...@apache.org.
[CXF-7192] Removing cxf-rt-management-web module, to be restored on demand
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7f4a24d0
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7f4a24d0
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7f4a24d0
Branch: refs/heads/master
Commit: 7f4a24d037c06f76770e969ad7e2a47f4687a33a
Parents: 337742f
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Thu Dec 22 14:22:58 2016 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Thu Dec 22 14:22:58 2016 +0000
----------------------------------------------------------------------
.../samples/logbrowser-blueprint/README.txt | 39 --
.../samples/logbrowser-blueprint/pom.xml | 109 ----
.../resources/OSGI-INF/blueprint/context.xml | 56 --
.../src/test/resources/index_plain.html | 211 -------
.../main/release/samples/logbrowser/README.txt | 49 --
.../samples/logbrowser/logging.properties | 27 -
.../src/main/release/samples/logbrowser/pom.xml | 153 -----
.../src/main/java/demo/logbrowser/App.java | 58 --
.../src/main/java/demo/service/App.java | 36 --
.../main/java/demo/service/CustomerService.java | 141 -----
.../src/main/java/demo/service/Server.java | 60 --
.../logbrowser/src/main/webapp/WEB-INF/web.xml | 65 --
.../src/main/webapp/customer-service.html | 179 ------
.../src/main/webapp/jquery-1.4.2.min.js | 154 -----
distribution/src/main/release/samples/pom.xml | 2 -
rt/management-web/README.txt | 18 -
rt/management-web/pom.xml | 328 ----------
.../src/main/appended-resources/META-INF/NOTICE | 12 -
.../management/web/browser/LogBrowser.gwt.xml | 31 -
.../browser/bootstrapping/BootstrapStorage.java | 242 --------
.../web/browser/bootstrapping/Settings.java | 42 --
.../browser/bootstrapping/SettingsStorage.java | 26 -
.../bootstrapping/SimpleXMLSettingsStorage.java | 205 ------
.../web/browser/bootstrapping/Subscription.java | 55 --
.../web/browser/client/DefaultEventBus.java | 34 -
.../web/browser/client/Dispatcher.java | 114 ----
.../management/web/browser/client/Injector.java | 35 --
.../web/browser/client/LogBrowser.java | 48 --
.../management/web/browser/client/Module.java | 91 ---
.../client/event/ChangedFilterOptionsEvent.java | 51 --
.../event/ChangedFilterOptionsEventHandler.java | 26 -
.../client/event/ChangedSubscriptionsEvent.java | 40 --
.../event/ChangedSubscriptionsEventHandler.java | 26 -
.../browser/client/event/GoToBrowserEvent.java | 39 --
.../client/event/GoToBrowserEventHandler.java | 26 -
.../client/event/GoToEditCriteriaEvent.java | 39 --
.../event/GoToEditCriteriaEventHandler.java | 26 -
.../browser/client/event/GoToSettingsEvent.java | 39 --
.../client/event/GoToSettingsEventHandler.java | 26 -
.../client/event/SelectedSubscriptionEvent.java | 50 --
.../event/SelectedSubscriptionEventHandler.java | 26 -
.../client/service/AbstractCallback.java | 51 --
.../browser/client/service/browser/Entry.java | 220 -------
.../browser/client/service/browser/Feed.java | 88 ---
.../client/service/browser/FeedProxy.java | 26 -
.../client/service/browser/FeedProxyImpl.java | 86 ---
.../client/service/browser/FilterOptions.java | 72 ---
.../browser/client/service/browser/Links.java | 159 -----
.../service/settings/IdentifierGenerator.java | 23 -
.../settings/IdentifierGeneratorImpl.java | 26 -
.../service/settings/RemoteStorageProxy.java | 29 -
.../settings/RemoteStorageProxyImpl.java | 255 --------
.../client/service/settings/Settings.java | 38 --
.../client/service/settings/SettingsFacade.java | 221 -------
.../client/service/settings/Subscription.java | 72 ---
.../web/browser/client/ui/AbstractDialog.java | 37 --
.../web/browser/client/ui/BasePresenter.java | 69 --
.../web/browser/client/ui/BindStrategy.java | 30 -
.../client/ui/DialogBindStrategyImpl.java | 42 --
.../web/browser/client/ui/ErrorDialog.java | 161 -----
.../web/browser/client/ui/Presenter.java | 28 -
.../web/browser/client/ui/PresenterWidget.java | 27 -
.../management/web/browser/client/ui/View.java | 26 -
.../client/ui/WidgetBindStrategyImpl.java | 39 --
.../client/ui/browser/BrowsePresenter.java | 49 --
.../browser/client/ui/browser/BrowseView.java | 36 --
.../browser/client/ui/browser/BrowseView.ui.xml | 41 --
.../client/ui/browser/BrowseViewImpl.java | 74 ---
.../ui/browser/EditCriteriaPresenter.java | 83 ---
.../client/ui/browser/EditCriteriaView.java | 48 --
.../client/ui/browser/EditCriteriaView.ui.xml | 71 ---
.../client/ui/browser/EditCriteriaViewImpl.java | 117 ----
.../browser/client/ui/browser/EntryTable.java | 28 -
.../ui/browser/NavigationSidebarPresenter.java | 187 ------
.../ui/browser/NavigationSidebarView.java | 42 --
.../ui/browser/NavigationSidebarView.ui.xml | 58 --
.../ui/browser/NavigationSidebarViewImpl.java | 120 ----
.../client/ui/browser/SelectableTable.java | 268 --------
.../client/ui/browser/SubscriptionTable.java | 28 -
.../client/ui/browser/ViewerPresenter.java | 154 -----
.../browser/client/ui/browser/ViewerView.java | 53 --
.../browser/client/ui/browser/ViewerView.ui.xml | 83 ---
.../client/ui/browser/ViewerViewImpl.java | 203 ------
.../ui/common/NavigationHeaderPresenter.java | 50 --
.../client/ui/common/NavigationHeaderView.java | 31 -
.../ui/common/NavigationHeaderView.ui.xml | 35 --
.../ui/common/NavigationHeaderViewImpl.java | 60 --
.../client/ui/resources/LogBrowserConstans.java | 62 --
.../client/ui/resources/LogBrowserCss.java | 77 ---
.../ui/resources/LogBrowserResources.java | 32 -
.../web/browser/client/ui/resources/loader.gif | Bin 1849 -> 0 bytes
.../browser/client/ui/resources/logbrowser.css | 290 ---------
.../client/ui/settings/SettingsPresenter.java | 159 -----
.../client/ui/settings/SettingsView.java | 47 --
.../client/ui/settings/SettingsView.ui.xml | 82 ---
.../client/ui/settings/SettingsViewImpl.java | 152 -----
.../client/ui/settings/SubscriptionDialog.java | 50 --
.../ui/settings/SubscriptionDialogImpl.java | 146 -----
.../client/ui/settings/SubscriptionEntry.ui.xml | 40 --
.../client/ui/settings/SubscriptionForm.ui.xml | 62 --
.../web/browser/resources/LogBrowser.html | 43 --
.../management/web/browser/resources/custom.css | 16 -
.../web/browser/resources/json2.min.js | 7 -
.../web/browser/resources/uuid.min.js | 9 -
.../cxf/management/web/logging/LogLevel.java | 89 ---
.../cxf/management/web/logging/LogRecord.java | 190 ------
.../cxf/management/web/logging/LogRecords.java | 65 --
.../web/logging/ReadOnlyFileStorage.java | 621 ------------------
.../web/logging/ReadWriteLogStorage.java | 40 --
.../web/logging/ReadableLogStorage.java | 59 --
.../web/logging/atom/AbstractAtomBean.java | 180 ------
.../web/logging/atom/AtomPullHandler.java | 61 --
.../web/logging/atom/AtomPullServer.java | 622 -------------------
.../web/logging/atom/AtomPushBean.java | 194 ------
.../web/logging/atom/AtomPushEngine.java | 223 -------
.../atom/AtomPushEngineConfigurator.java | 210 -------
.../web/logging/atom/AtomPushHandler.java | 191 ------
.../atom/AtomPushOverWebSocketServer.java | 242 --------
.../cxf/management/web/logging/atom/Hold.java | 35 --
.../web/logging/atom/LoggingThread.java | 51 --
.../web/logging/atom/converter/Converter.java | 38 --
.../atom/converter/StandardConverter.java | 356 -----------
.../web/logging/atom/deliverer/Deliverer.java | 42 --
.../atom/deliverer/RetryingDeliverer.java | 143 -----
.../atom/deliverer/WebClientDeliverer.java | 62 --
.../web/logging/atom/package-info.java | 28 -
.../management/web/logging/package-info.java | 31 -
.../src/test/gwt-debug/WEB-INF/web.xml | 49 --
.../src/test/gwt-debug/generate.html | 67 --
.../cxf/management/web/logging/Generate.java | 100 ---
.../cxf/management/web/logging/MockApp.java | 75 ---
.../web/logging/ReadOnlyFileStorageTest.java | 288 ---------
.../web/logging/logs/2011-01-22-karaf.log | 34 -
.../web/logging/logs/2011-01-23-karaf.log | 31 -
rt/pom.xml | 1 -
135 files changed, 12470 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser-blueprint/README.txt
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser-blueprint/README.txt b/distribution/src/main/release/samples/logbrowser-blueprint/README.txt
deleted file mode 100644
index 80bf7e3..0000000
--- a/distribution/src/main/release/samples/logbrowser-blueprint/README.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-Building and running the logbrowser-blueprint demo on Karaf
-----------------------------------------------------
-
-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:
-
-0) Build the project by typing:
- mvn clean install
-
-This sample project generates a bundle file which can be used in an OSGi container.
-
-Assuming you have a freshly intalled Apache Karaf-3.x,
-1) Start Karaf and at its console, type(*Note)
- feature:repo-add cxf 3.0.2
- feature:install cxf-management-web
- install -s mvn:org.apache.cxf.samples/logbrowser-blueprint/3.0.2
-
-2) Open browser and go to:
- http://localhost:8181/cxf/samples/logbrowser/browser/LogBrowser.html
-
-3) Add a new endpoint with URL:
- http://localhost:8181/cxf/samples/logbrowser/logs
-
-4) To generate custom log entry, run some CXF scenarios that write some logs.
-
-Additional features
-5) Open the Log-Browser(PlainView) page by opening file test/resources/index_plain.html in the browser.
-
-6) Click on the Connect button to open a WebSocket connection to the log browser service.
-Once the connection is open, click on the Subscribe button to subscribe to the logging feed.
-When there are new log entries, they will be pushed to the socket and displayed on the Log text area.
-
-*Note:
-- CXF version 3.0.2 is used in this example, but any verions that include this
-sample code may be used.
-- The default logging setting is set to org.apache.cxf:INFO. This can be changed
-in the configuration file org.apache.cxf.samples.logbrowser.cfg file in etc/.
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser-blueprint/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser-blueprint/pom.xml b/distribution/src/main/release/samples/logbrowser-blueprint/pom.xml
deleted file mode 100644
index 0dc787a..0000000
--- a/distribution/src/main/release/samples/logbrowser-blueprint/pom.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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>
- <artifactId>logbrowser-blueprint</artifactId>
- <packaging>bundle</packaging>
- <name>Apache CXF Samples LogBrowser Blueprint</name>
- <description>Apacher CXF Samples LogBrowser Blueprint</description>
- <parent>
- <groupId>org.apache.cxf.samples</groupId>
- <artifactId>cxf-samples</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${project.groupId}.${project.artifactId};blueprint.aries.xml-validation:=false</Bundle-SymbolicName>
- <Import-Package>
- org.apache.cxf.jaxrs.servlet,
- org.apache.abdera.parser.stax,
- org.apache.abdera,
- com.ctc.wstx.stax,
- org.eclipse.jetty.continuation;resolution:=optional;version="[7.6,9)",
- org.eclipse.jetty.websocket;resolution:=optional;version="[7.6,9)",
- org.eclipse.jetty.websocket.api;resolution:=optional;version="[9.1,10)",
- org.eclipse.jetty.websocket.server;resolution:=optional;version="[9.1,10)",
- org.eclipse.jetty.websocket.servlet;resolution:=optional;version="[9.1,10)",
- org.apache.catalina;resolution:=optional;version="[6.0,9)",
- org.apache.catalina.comet;resolution:=optional;version="[6.0,9)",
- org.apache.catalina.connector;resolution:=optional;version="[6.0,9)",
- org.apache.catalina.util;resolution:=optional;version="[6.0,9)",
- org.apache.catalina.websocket;resolution:=optional;version="[6.0,9)",
- org.apache.coyote.http11.upgrade;resolution:=optional,
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-management-web</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-extension-providers</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-extension-search</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http-jetty</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-websocket</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.abdera</groupId>
- <artifactId>abdera-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.abdera</groupId>
- <artifactId>abdera-parser</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.apache.james</groupId>
- <artifactId>apache-mime4j-core</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml b/distribution/src/main/release/samples/logbrowser-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml
deleted file mode 100644
index 54c9c94..0000000
--- a/distribution/src/main/release/samples/logbrowser-blueprint/src/main/resources/OSGI-INF/blueprint/context.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:cxf="http://cxf.apache.org/blueprint/core"
- xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
- xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
-
- xsi:schemaLocation="
- http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
- http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
- http://cxf.apache.org/blueprint/jaxrs http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
- http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">
-
- <cm:property-placeholder id="props" persistent-id="org.apache.cxf.samples.logbrowser" update-strategy="reload">
- <cm:default-properties>
- <cm:property name="logger" value="org.apache.cxf:INFO" />
- </cm:default-properties>
- </cm:property-placeholder>
-
- <bean id="bs-sxs" class="org.apache.cxf.management.web.browser.bootstrapping.SimpleXMLSettingsStorage" />
-
- <bean id="bs" class="org.apache.cxf.management.web.browser.bootstrapping.BootstrapStorage">
- <argument ref="bs-sxs" index="0"/>
- </bean>
-
- <bean id="bs-sfp" class="org.apache.cxf.management.web.browser.bootstrapping.BootstrapStorage$StaticFileProvider" />
-
- <bean id="bs-sp" class="org.apache.cxf.management.web.browser.bootstrapping.BootstrapStorage$SettingsProvider" />
-
- <bean id="scp" class="org.apache.cxf.jaxrs.ext.search.SearchContextProvider" />
-
- <bean id="aps" class="org.apache.cxf.management.web.logging.atom.AtomPullServer" init-method="init">
- <property name="loggers" value="${logger}"/>
- </bean>
-
- <bean id="afp" class="org.apache.cxf.jaxrs.provider.atom.AtomFeedProvider" />
-
- <bean id="aep" class="org.apache.cxf.jaxrs.provider.atom.AtomEntryProvider" />
-
- <bean id="srp" class="org.apache.cxf.jaxrs.provider.StreamingResponseProvider" />
-
- <jaxrs:server id="serviceEndpoint" address="/samples/logbrowser" transportId="http://cxf.apache.org/transports/websocket">
- <jaxrs:serviceBeans>
- <ref component-id="aps" />
- <ref component-id="bs" />
- </jaxrs:serviceBeans>
- <jaxrs:providers>
- <ref component-id="bs-sfp" />
- <ref component-id="bs-sp" />
- <ref component-id="scp" />
- <ref component-id="afp" />
- <ref component-id="aep" />
- <ref component-id="srp" />
- </jaxrs:providers>
- </jaxrs:server>
-</blueprint>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser-blueprint/src/test/resources/index_plain.html
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser-blueprint/src/test/resources/index_plain.html b/distribution/src/main/release/samples/logbrowser-blueprint/src/test/resources/index_plain.html
deleted file mode 100644
index f30ecf6..0000000
--- a/distribution/src/main/release/samples/logbrowser-blueprint/src/test/resources/index_plain.html
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-
- 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.
-
--->
-<html>
-<head>
-<meta charset="utf-8"/>
-<title>CXF Log-Browser using WebSocket (PlainView)</title>
-</head>
-<body>
-<h2>CXF Log-Browser using WebSocket (PlainView)</h2>
-<p>The purpose of this page is simply show how the log-feed can be subscribed and the log records are pushed over the WebSocket.</p>
-<div id="output">
- <div id="config" style="float: left; width: 600px">
- <strong>Log-Browser Endpoint URL:</strong><br />
- <input id="wsUri" size="72" style="width: 100%" value="ws://localhost:8181/cxf/samples/logbrowser"/>
- <br/>
- <button id="connect">Connect</button>
- <button id="disconnect">Disconnect</button>
- <br />
- <br />
- <button id="subscribe">Subscribe</button>
- <button id="unsubscribe">Unsubscribe</button>
- <br />
- <br />
- <input id="modeatom" type="checkbox" name="mode" value="atom"/>Atom<br/>
- <br />
- <br />
- </div>
- <div id="log" style="float: left; width: 90%; height: 500px">
- <strong>Log:</strong><br />
- <button id="clearLogBut" style="position: relative; top: 3px;">Clear log</button>
- <div id="consoleLog" style="margin-top: 5px; border: solid 1px #aaaaaa; overflow-y: scroll; height:100%"></div>
- </div>
- <div class="clearfix"></div>
-</div>
-<script language="javascript" type="text/javascript">
- var output;
-
- var connectBut = document.getElementById("connect");
- connectBut.onclick = doConnect;
-
- var disconnectBut = document.getElementById("disconnect");
- disconnectBut.onclick = doDisconnect;
-
- var subBut = document.getElementById("subscribe");
- subBut.onclick = doSub;
-
- var unsubBut = document.getElementById("unsubscribe");
- unsubBut.onclick = doUnsub;
-
- var modeatomCB = document.getElementById("modeatom");
-
- var consoleLog = document.getElementById("consoleLog");
-
- var clearLogBut = document.getElementById("clearLogBut");
- clearLogBut.onclick = clearLog;
-
- function init() {
- output = document.getElementById("output");
- setGuiConnected(false);
- }
-
- function doConnect() {
- var wsUri = document.getElementById("wsUri");
-
- websocket = new WebSocket(wsUri.value);
- websocket.binaryType = 'arraybuffer';
-
- websocket.onopen = function(evt) {
- onOpen(evt)
- };
-
- websocket.onclose = function(evt) {
- onClose(evt)
- };
-
- websocket.onmessage = function(evt) {
- onMessage(evt)
- };
-
- websocket.onerror = function(evt) {
- onError(evt)
- };
- }
-
- function doDisconnect() {
- // unsubscribe
- websocket.close()
- }
-
- function clearLog() {
- while (consoleLog.childNodes.length > 0) {
- consoleLog.removeChild(consoleLog.lastChild);
- }
- }
-
- function onOpen(evt) {
- writeToLog('<span style="color:black; font-size:75%; font-style:italic">CONNECTED</span>');
- setGuiConnected(true);
- }
-
- function onClose(evt) {
- writeToLog('<span style="color:black; font-size:75%; font-style:italic">DISCONNECTED</span>');
- setGuiConnected(false);
- }
-
- function onMessage(evt) {
- writeToLog(createMessage(extractBody(evt.data)), true);
- }
-
- function onError(evt) {
- writeToLog('<span style="color:red; font-size:75%; font-style:italic">ERROR</span><span style="color: red;"><pre>' + evt.data + '</pre></span>');
- }
-
- function doSub(evt) {
- var msg = modeatomCB.checked ? "GET /cxf/samples/logbrowser/logs/subscribe" : "GET /cxf/samples/logbrowser/logs/subscribe/alternate";
- writeToLog('<span style="color:green; font-size:75%; font-style:italic">SENT</span><span style="color: green;"><pre>' + createMessage(msg) + '</pre></span>');
- websocket.send(msg);
- setGuiSubscribed(true);
- }
-
- function doUnsub(evt) {
- var msg = "GET /cxf/samples/logbrowser/logs/unsubscribe/*";
- writeToLog('<span style="color:green; font-size:75%; font-style:italic">SENT</span><span style="color: green;"><pre>' + createMessage(msg) + '</pre></span>');
- websocket.send(msg);
- setGuiSubscribed(false);
- }
-
- function setGuiConnected(isConnected) {
- wsUri.disabled = isConnected;
- connectBut.disabled = isConnected;
- disconnectBut.disabled = !isConnected;
- subBut.disabled = !isConnected;
- unsubBut.disabled = true;
- modeatomCB.disabled = !isConnected;
- }
-
- function setGuiSubscribed(isSubscribed) {
- subBut.disabled = isSubscribed;
- unsubBut.disabled = !isSubscribed;
- modeatomCB.disabled = isSubscribed;
- }
-
- // painfully extracting the body by finding the \n delimiter
- function extractBody(data) {
- var ba = new Uint8Array(data);
- var aa = new Array(ba.length);
- var skipping = true;
- var maystart = true;
- for (i = 0; i < ba.length; i++) {
- if (skipping) {
- if (ba[i] == 10) {
- if (maystart) {
- skipping = false;
- } else {
- maystart = true;
- }
- } else {
- if (ba[i] != 13) {
- maystart = false;
- }
- continue;
- }
- }
- aa[i] = String.fromCharCode(ba[i]);
- }
- return Array.prototype.slice.call(aa).join("");
- }
-
- function createMessage(data) {
- return data.replace(/&/g, '&').replace(/</g, '<');
- }
-
- function writeToLog(message, raw) {
- var pre = document.createElement(raw ? "code" : "p");
- pre.wordWrap = "break-word";
- pre.innerHTML = message;
- consoleLog.appendChild(pre);
- if (raw) {
- consoleLog.appendChild(document.createElement("br"));
- consoleLog.appendChild(document.createElement("br"));
- }
- while (consoleLog.childNodes.length > 100) {
- consoleLog.removeChild(consoleLog.firstChild);
- }
-
- consoleLog.scrollTop = consoleLog.scrollHeight;
- }
-
- window.addEventListener("load", init, false);
-
- </script>
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser/README.txt
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser/README.txt b/distribution/src/main/release/samples/logbrowser/README.txt
deleted file mode 100644
index 454838f..0000000
--- a/distribution/src/main/release/samples/logbrowser/README.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-Building and running the logbrowser 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:
-
-0) Build the project by typing:
- mvn clean install
-1) Start the server:
- mvn -Pserver
-2) Open browser and go to:
- http://localhost:9002/log/browser/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/customer-service.html
-
-To remove the .class files, run "mvn clean".
-
-
-This sample project generates a war file which can be used in a servlet container
-or even in an OSGi container.
-
-Assuming you have a freshly intalled Apache Karaf-3.x,
-1) Start Karaf and at its console, type(*Note)
- feature:repo-add cxf 3.0.2
- feature:install war
- feature:install cxf-management-web
- install -s mvn:org.apache.cxf.samples/logbrowser/3.0.2/war
-
-2) Open browser and go to:
- http://localhost:8181/cxf-samples-logbrowser/log/browser/LogBrowser.html
-3) Add new endpoint with URL:
- http://localhost:8181/cxf-samples-logbrowser/log/logs
-4) To generate custom log entry open new browser's window and go to:
- http://localhost:8181/cxf-samples-logbrowser/customer-service.html
-
-*Note:
-- CXF version 3.0.2 is used in this example, but any verions that include this
-sample code may be used.
-- As this web.xml registers two CXFServlets (one for the browsing the log and
-the other for providing the test service), OSGi system property
-org.apache.cxf.osgi.http.transport.disable must be set to false
-(in etc/system.properties) to allow these two servlets to be started.
-However, this will disable the auto-registration of normal CXF endpoints.
-To avoid this issue, use samples/logbrowser-blueprint which is compatible
-with the normal CXF endpoints.
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser/logging.properties
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser/logging.properties b/distribution/src/main/release/samples/logbrowser/logging.properties
deleted file mode 100644
index fb0c6a2..0000000
--- a/distribution/src/main/release/samples/logbrowser/logging.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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.
-
-handlers = java.util.logging.ConsoleHandler
-
-.level = WARNING
-
-java.util.logging.ConsoleHandler.level = FINE
-java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
-
-demo.logbrowser.level = FINE
-org.apache.cxf.interceptor.LoggingInInterceptor.level = INFO
-org.apache.cxf.interceptor.LoggingOutInterceptor.level = INFO
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser/pom.xml b/distribution/src/main/release/samples/logbrowser/pom.xml
deleted file mode 100644
index 29c9980..0000000
--- a/distribution/src/main/release/samples/logbrowser/pom.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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>
- <artifactId>logbrowser</artifactId>
- <packaging>war</packaging>
- <name>Apache CXF Samples LogBrowser</name>
- <description>Apacher CXF Samples LogBrowser</description>
- <parent>
- <groupId>org.apache.cxf.samples</groupId>
- <artifactId>cxf-samples</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <!-- excluding libs and classes/META-INF for OSGi -->
- <packagingExcludes>WEB-INF/lib/,WEB-INF/classes/META-INF/</packagingExcludes>
- <archive>
- <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <executions>
- <execution>
- <id>bundle-manifest</id>
- <phase>process-classes</phase>
- <goals>
- <goal>manifest</goal>
- </goals>
- </execution>
- </executions>
- <extensions>true</extensions>
- <configuration>
- <supportedProjectTypes>
- <supportedProjectType>jar</supportedProjectType>
- <supportedProjectType>bundle</supportedProjectType>
- <supportedProjectType>war</supportedProjectType>
- </supportedProjectTypes>
- <instructions>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Bundle-Description>${project.description}</Bundle-Description>
- <Web-ContextPath>/cxf-samples-logbrowser</Web-ContextPath>
- <Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
- <Export-Package />
- <Import-Package>
- org.apache.cxf.jaxrs.servlet,
- org.apache.abdera.parser.stax,
- com.ctc.wstx.stax,
- org.apache.abdera,
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <profile>
- <id>server</id>
- <build>
- <defaultGoal>test</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>test</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>demo.service.Server</mainClass>
- <systemProperties>
- <systemProperty>
- <key>java.util.logging.config.file</key>
- <value>${basedir}/logging.properties</value>
- </systemProperty>
- </systemProperties>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
- <dependencies>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-management-web</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-extension-providers</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-extension-search</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http-jetty</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.abdera</groupId>
- <artifactId>abdera-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.abdera</groupId>
- <artifactId>abdera-parser</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.apache.james</groupId>
- <artifactId>apache-mime4j-core</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser/src/main/java/demo/logbrowser/App.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser/src/main/java/demo/logbrowser/App.java b/distribution/src/main/release/samples/logbrowser/src/main/java/demo/logbrowser/App.java
deleted file mode 100644
index b262a19..0000000
--- a/distribution/src/main/release/samples/logbrowser/src/main/java/demo/logbrowser/App.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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.atom.AtomEntryProvider;
-import org.apache.cxf.jaxrs.provider.atom.AtomFeedProvider;
-
-import org.apache.cxf.management.web.browser.bootstrapping.BootstrapStorage;
-import org.apache.cxf.management.web.browser.bootstrapping.SimpleXMLSettingsStorage;
-import org.apache.cxf.management.web.logging.atom.AtomPullServer;
-
-public class App extends Application {
-
-
- @Override
- public Set<Object> getSingletons() {
- Set<Object> classes = new HashSet<Object>();
-
- // The log browser
- classes.add(new BootstrapStorage(new SimpleXMLSettingsStorage()));
- classes.add(new BootstrapStorage.StaticFileProvider());
- classes.add(new BootstrapStorage.SettingsProvider());
- // this provider will have to be discovered via the class-scanning
- classes.add(new org.apache.cxf.jaxrs.ext.search.SearchContextProvider());
-
- // The pull server
- AtomPullServer aps = new AtomPullServer();
- aps.setLoggers("demo.service:DEBUG,org.apache.cxf.interceptor:INFO");
- aps.init();
- classes.add(aps);
-
- classes.add(new AtomFeedProvider());
- classes.add(new AtomEntryProvider());
-
- return classes;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser/src/main/java/demo/service/App.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser/src/main/java/demo/service/App.java b/distribution/src/main/release/samples/logbrowser/src/main/java/demo/service/App.java
deleted file mode 100644
index 58ac502..0000000
--- a/distribution/src/main/release/samples/logbrowser/src/main/java/demo/service/App.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.service;
-
-import java.util.HashSet;
-import java.util.Set;
-import javax.ws.rs.core.Application;
-
-public class App extends Application {
-
- @Override
- public Set<Object> getSingletons() {
- Set<Object> classes = new HashSet<Object>();
-
- classes.add(new CustomerService());
-
- return classes;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser/src/main/java/demo/service/CustomerService.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser/src/main/java/demo/service/CustomerService.java b/distribution/src/main/release/samples/logbrowser/src/main/java/demo/service/CustomerService.java
deleted file mode 100644
index 2fb2038..0000000
--- a/distribution/src/main/release/samples/logbrowser/src/main/java/demo/service/CustomerService.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * 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.service;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Response;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.commons.lang.Validate;
-import org.apache.cxf.common.logging.LogUtils;
-
-@Path("/customers/")
-public class CustomerService {
- private static final Logger LOGGER = LogUtils.getL7dLogger(CustomerService.class);
-
- Map<Long, Customer> customers = new HashMap<Long, Customer>();
-
- @GET
- @Path("/{id}/")
- @Produces("application/json")
- public Customer getCustomer(@PathParam("id") final String id) {
- Validate.notNull(id);
- Validate.notEmpty(id);
-
- LOGGER.log(Level.FINE, "Invoking getCustomer, id={0}", id);
-
- Customer customer = customers.get(Long.parseLong(id));
-
- if (customer == null) {
- LOGGER.log(Level.SEVERE, "Specified customer does not exist, id={0}", id);
- }
-
- return customer;
- }
-
- @POST
- @Consumes("application/json")
- public Response updateCustomer(final Customer customer) {
- Validate.notNull(customer);
-
- LOGGER.log(Level.FINE, "Invoking updateCustomer, customer={0}", customer);
-
- if (isCustomerExists(customer)) {
- LOGGER.log(Level.FINE, "Specified customer exists, update data, customer={0}", customer);
- } else {
- LOGGER.log(Level.WARNING, "Specified customer does not exist, add data, customer={0}", customer);
- }
-
- customers.put(customer.getId(), customer);
-
- LOGGER.log(Level.INFO, "Customer was updated successful, customer={0}", customer);
- return Response.ok().build();
- }
-
- @DELETE
- @Path("/{id}/")
- public Response deleteCustomer(@PathParam("id") String id) {
- Validate.notNull(id);
- Validate.notEmpty(id);
-
- LOGGER.log(Level.FINE, "Invoking deleteCustomer, id={0}", id);
-
- long identifier = Long.parseLong(id);
-
- Response response;
-
- if (isCustomerExists(identifier)) {
- LOGGER.log(Level.FINE, "Specified customer exists, remove data, id={0}", id);
- customers.remove(identifier);
- LOGGER.log(Level.INFO, "Customer was removed successful, id={0}", id);
- response = Response.ok().build();
- } else {
- LOGGER.log(Level.SEVERE, "Specified customer does not exist, remove fail, id={0}", id);
- response = Response.notModified().build();
- }
-
- return response;
- }
-
- private boolean isCustomerExists(final Customer customer) {
- return customers.get(customer.getId()) != null;
- }
-
- private boolean isCustomerExists(final long id) {
- return customers.get(id) != null;
- }
-
- @XmlRootElement(name = "Customer")
- public static class Customer {
- private long id;
- private String name;
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public String toString() {
- return "Customer{id=" + id + ", name='" + name + "'}";
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser/src/main/java/demo/service/Server.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser/src/main/java/demo/service/Server.java b/distribution/src/main/release/samples/logbrowser/src/main/java/demo/service/Server.java
deleted file mode 100644
index e5b2fed..0000000
--- a/distribution/src/main/release/samples/logbrowser/src/main/java/demo/service/Server.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.service;
-
-import org.eclipse.jetty.server.Handler;
-import org.eclipse.jetty.server.handler.DefaultHandler;
-import org.eclipse.jetty.server.handler.HandlerCollection;
-import org.eclipse.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.eclipse.jetty.server.Server server = new org.eclipse.jetty.server.Server(9002);
-
-
- WebAppContext webappcontext = new WebAppContext();
- webappcontext.setContextPath("/");
-
- webappcontext.setWar("src/main/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();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser/src/main/webapp/WEB-INF/web.xml b/distribution/src/main/release/samples/logbrowser/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index eaa0d99..0000000
--- a/distribution/src/main/release/samples/logbrowser/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- 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.
--->
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- version="2.5"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
- <servlet>
- <display-name>CustomerService</display-name>
- <servlet-name>CustomerService</servlet-name>
- <servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</servlet-class>
- <init-param>
- <param-name>javax.ws.rs.Application</param-name>
- <param-value>demo.service.App</param-value>
- </init-param>
- <init-param>
- <param-name>jaxrs.inInterceptors</param-name>
- <param-value>
- org.apache.cxf.interceptor.LoggingInInterceptor
- </param-value>
- </init-param>
- <init-param>
- <param-name>jaxrs.outInterceptors</param-name>
- <param-value>
- org.apache.cxf.interceptor.LoggingOutInterceptor
- </param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet>
- <display-name>BrowserServlet</display-name>
- <servlet-name>BrowserServlet</servlet-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.App</param-value>
- </init-param>
- <load-on-startup>2</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>BrowserServlet</servlet-name>
- <url-pattern>/log/*</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>CustomerService</servlet-name>
- <url-pattern>/service/*</url-pattern>
- </servlet-mapping>
-</web-app>
-<!-- END SNIPPET: webxml -->
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser/src/main/webapp/customer-service.html
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser/src/main/webapp/customer-service.html b/distribution/src/main/release/samples/logbrowser/src/main/webapp/customer-service.html
deleted file mode 100644
index 97c2ceb..0000000
--- a/distribution/src/main/release/samples/logbrowser/src/main/webapp/customer-service.html
+++ /dev/null
@@ -1,179 +0,0 @@
-<!--
- ~ 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>Customer Service</title>
-
- <style type="text/css">
- label {
- width: 5em;
- float: left;
- text-align: right;
- margin-right: 0.5em;
- display: block;
- }
- .submit a {
- margin-left: 5.5em;
- }
- .submit input {
- margin-left: 8em;
- }
- </style>
-
- <script type="text/javascript" src="./jquery-1.4.2.min.js"></script>
-
- <script type="text/javascript">
-
- var wloc = window.location.pathname;
- wloc = wloc.substring(0, wloc.lastIndexOf('/'));
-
- function buildCustomerAsString(id, name) {
- return "{ \"Customer\" : { \"id\" : \"" + id + "\", \"name\" : \"" + name +"\" } }";
- }
-
- $(document).ready(function() {
- $("#addOrUpdateCustomerButton").click(function() {
- var isError = false;
-
- var id = $("#addOrUpdateCustomerForm INPUT[name='customer.id']").val();
- if (id == null || id == "") {
- alert("Field 'ID' can't be empty");
- isError = true;
- }
-
- var name = $("#addOrUpdateCustomerForm INPUT[name='customer.name']").val();
- if (name == null || name == "") {
- alert("Field 'Name' can't be empty");
- isError = true;
- }
-
- if (isError) {
- return;
- }
-
- $.ajax({
- type: "POST",
- url : wloc + "/service/customers/",
- contentType : "application/json",
- data : buildCustomerAsString(id, name),
- complete : function(xhr) {
- if (xhr.status == 200) {
- alert("Customer added/updated successfully");
- } else {
- alert("Error occurred");
- }
- }
- });
- });
-
- $("#getCustomerButton").click(function() {
- var id = $("#getCustomerForm INPUT[name='customer.id']").val();
- if (id == null || id == "") {
- alert("Field 'ID' can't be empty");
- return;
- }
-
- $.ajax({
- type: "GET",
- url : wloc + "/service/customers/" + id,
- dataType : "text",
- complete : function(xhr) {
- if (xhr.status == 200) {
- alert(xhr.responseText);
- } else if (xhr.status == 204) {
- alert("Customer, with specified ID, doesn't exist");
- } else {
- alert("Error occurred");
- }
- }
- });
- });
-
- $("#deleteCustomerButton").click(function() {
- var id = $("#deleteCustomerForm INPUT[name='customer.id']").val();
- if (id == null || id == "") {
- alert("Field 'ID' can't be empty");
- return;
- }
-
- $.ajax({
- type: "DELETE",
- url : wloc + "/service/customers/" + id,
- complete : function(xhr) {
- if (xhr.status == 200) {
- alert("Customer deleted successfully");
- } else if (xhr.status == 304) {
- alert("Customer, with specified ID, doesn't exist");
- } else {
- alert("Error occurred");
- }
- }
- });
- });
-
- $("INPUT.digits").keyup(function () {
- this.value = this.value.replace(/[^0-9\.]/g,'');
- });
- });
- </script>
-</head>
-<body>
-
-<div>
- <h1>Customer Service</h1>
-
- <h2>Add or update customer</h2>
- <form id="addOrUpdateCustomerForm" action="#">
- <p>
- <label>ID:</label>
- <input name="customer.id" class="digits" type="text" size="3"/>
- </p>
-
- <p>
- <label>Name:</label>
- <input name="customer.name" type="text" size="30"/>
- </p>
-
- <p class="submit"><a id="addOrUpdateCustomerButton" href="#">Add or Update</a></p>
- </form>
-
- <h2>Get customer</h2>
- <form id="getCustomerForm" action="#">
- <p>
- <label>ID:</label>
- <input name="customer.id" class="digits" type="text" size="3"/>
- </p>
-
- <p class="submit"><a id="getCustomerButton" href="#">Get</a></p>
- </form>
-
- <h2>Delete customer</h2>
- <form id="deleteCustomerForm" action="#">
- <p>
- <label>ID:</label>
- <input name="customer.id" class="digits" type="text" size="3"/>
- </p>
-
- <p class="submit"><a id="deleteCustomerButton" href="#">Delete</a></p>
- </form>
-</div>
-</body>
-</html>
[6/8] cxf git commit: [CXF-7192] Removing cxf-rt-management-web
module, to be restored on demand
Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/appended-resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/appended-resources/META-INF/NOTICE b/rt/management-web/src/main/appended-resources/META-INF/NOTICE
deleted file mode 100644
index cc6e959..0000000
--- a/rt/management-web/src/main/appended-resources/META-INF/NOTICE
+++ /dev/null
@@ -1,12 +0,0 @@
-File json2.min.js has been placed in the public domain.
-
-
-Portions of the file uuid.min.js derives from code marked:
-/*
-Math.uuid.js (v1.4)
-http://www.broofa.com
-mailto:robert@broofa.com
-
-Copyright (c) 2010 Robert Kieffer
-Dual licensed under the MIT and GPL licenses.
-*/
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/LogBrowser.gwt.xml
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/LogBrowser.gwt.xml b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/LogBrowser.gwt.xml
deleted file mode 100644
index a6705e9..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/LogBrowser.gwt.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<module rename-to="logbrowser">
- <inherits name="com.google.gwt.user.User"/>
- <inherits name="com.google.gwt.user.theme.standard.Standard"/>
- <inherits name="com.google.gwt.inject.Inject"/>
- <inherits name="com.google.gwt.http.HTTP"/>
- <inherits name="com.google.gwt.json.JSON"/>
- <inherits name="com.google.gwt.xml.XML"/>
- <stylesheet src="custom.css"/>
- <entry-point class="org.apache.cxf.management.web.browser.client.LogBrowser"/>
- <public path="resources"/>
- <source path="client"/>
-</module>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java
deleted file mode 100644
index ccbd29d..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/BootstrapStorage.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- * 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.browser.bootstrapping;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.net.JarURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Locale;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.zip.GZIPOutputStream;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.Variant;
-import javax.ws.rs.ext.MessageBodyWriter;
-import javax.ws.rs.ext.Provider;
-
-import org.apache.commons.lang3.Validate;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.jaxrs.ext.MessageContext;
-import org.apache.cxf.jaxrs.provider.json.JSONProvider;
-
-@Path("/browser")
-public class BootstrapStorage {
- private static final Logger LOGGER = LogUtils.getL7dLogger(BootstrapStorage.class);
- private final SettingsStorage storage;
-
- public BootstrapStorage(final SettingsStorage storage) {
- Validate.notNull(storage, "provider is null");
-
- this.storage = storage;
- }
-
- @GET
- @Path("/settings")
- @Produces("application/json")
- 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")
- @Consumes("application/json")
- 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");
-
- LOGGER.fine(String.format("Save settings, user='%s'; settings='%s'", username, settings));
-
- storage.setSettings(username, settings);
- return Response.ok().build();
- }
-
- @GET
- @Path("{resource:.*}")
- public Response getResource(@Context final MessageContext mc,
- @PathParam("resource") final String resource) {
- if (isLastModifiedRequest(mc)) {
- return Response.notModified().build();
- }
-
- try {
- URL url;
- URL jar = getClass().getProtectionDomain().getCodeSource().getLocation();
-
- url = new URL(String.format("jar:%s!/static-content/logbrowser/%s", jar, resource));
-
- JarURLConnection connection = (JarURLConnection) url.openConnection();
- if (connection.getContentLength() == -1 || connection.getJarEntry() == null) {
- return Response.status(Status.NOT_FOUND).build();
- } else if (connection.getJarEntry().isDirectory()) {
- return Response.status(Status.FORBIDDEN).build();
- } else { // correct
- MediaType mime = getMimeType(mc, resource);
- StaticFile staticFile = new StaticFile(url, acceptsGzip(mc), mime);
-
- Response.ResponseBuilder builder = Response.ok(staticFile);
- builder.variant(new Variant(mime, (Locale)null, staticFile.isGzipEnabled() ? "gzip" : null));
-
- return builder.build();
- }
- } catch (MalformedURLException e) {
- return Response.status(Status.BAD_REQUEST).build();
- } catch (IOException e) {
- LOGGER.log(Level.SEVERE, "Error occur while retrieve static file", e);
- return Response.serverError().build();
- }
- }
-
- private boolean isLastModifiedRequest(final MessageContext mc) {
- return mc.getHttpServletRequest().getHeader("Last-Modified") != null;
- }
-
- private MediaType getMimeType(final MessageContext mc, final String resource) {
- return MediaType.valueOf(mc.getServletContext().getMimeType(resource));
- }
-
- private boolean acceptsGzip(final MessageContext mc) {
- String ae = mc.getHttpServletRequest().getHeader("Accept-Encoding");
- return ae != null && ae.contains("gzip");
- }
-
- private final class StaticFile {
- private URL url;
- private boolean isGzipEnabled;
-
- private StaticFile(URL url, boolean acceptsGzip, MediaType mime) {
- assert url != null;
- assert mime != null;
-
- this.url = url;
- this.isGzipEnabled = acceptsGzip && "text".equals(mime.getType());
- }
-
- public URL getUrl() {
- return this.url;
- }
-
- public boolean isGzipEnabled() {
- return this.isGzipEnabled;
- }
- }
-
- @Provider
- public static class StaticFileProvider implements MessageBodyWriter<StaticFile> {
-
- public boolean isWriteable(final Class<?> type, final Type genericType,
- final Annotation[] annotations, final MediaType mediaType) {
- return StaticFile.class.isAssignableFrom(type);
- }
-
- public long getSize(final StaticFile staticFile, final Class<?> type, final Type genericType,
- final Annotation[] annotations, final MediaType mediaType) {
- return -1;
- }
-
- public void writeTo(final StaticFile staticFile, final Class<?> clazz, final Type genericType,
- final Annotation[] annotations, final MediaType type,
- final MultivaluedMap<String, Object> headers, final OutputStream os)
- throws IOException {
-
- if (staticFile.isGzipEnabled()) {
- GZIPOutputStream gzip = new GZIPOutputStream(os);
- try {
- IOUtils.copyAndCloseInput(staticFile.getUrl().openStream(), gzip);
- } finally {
- gzip.finish();
- }
- } else {
- IOUtils.copyAndCloseInput(staticFile.getUrl().openStream(), os);
- }
- }
- }
-
- @Provider
- public static class SettingsProvider extends JSONProvider<Object> {
- private static final String LOGGING_NAMESPACE = "http://cxf.apache.org/log";
- private static final String SUBSCRIPTIONS_ARRAY = "subscriptions";
-
- public SettingsProvider() {
- setIgnoreNamespaces(true);
-
- // Solved common JSON's problem with parsing array, which has only one element
- setSerializeAsArray(true);
- setArrayKeys(Arrays.asList(SUBSCRIPTIONS_ARRAY));
-
- // Removes namespace from output
-/*
- setOutTransformElements(new HashMap<String, String>() {
- private static final long serialVersionUID = -1341932955817405356L;
-
- {
- put("{" + LOGGING_NAMESPACE + "}*", "*");
- }
- });
-*/
- setOutTransformElements(Collections.singletonMap(
- "{" + LOGGING_NAMESPACE + "}*", "*"));
-
- // Adds namespace to input
-/*
- setInTransformElements(new HashMap<String, String>() {
- private static final long serialVersionUID = -1509522821399368946L;
-
- {
- put("*", "{" + LOGGING_NAMESPACE + "}*");
- }
- });
-*/
- setInTransformElements(Collections.singletonMap(
- "*", "{" + LOGGING_NAMESPACE + "}*"));
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/Settings.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/Settings.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/Settings.java
deleted file mode 100644
index 5e9d3bd..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/Settings.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.browser.bootstrapping;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(namespace = "http://cxf.apache.org/log")
-public class Settings {
- private List<Subscription> subscriptions;
-
- @XmlElement(name = "subscriptions", namespace = "http://cxf.apache.org/log")
- public List<Subscription> getSubscriptions() {
- if (subscriptions == null) {
- subscriptions = new ArrayList<Subscription>();
- }
- return subscriptions;
- }
-
- public void setSubscriptions(List<Subscription> subscriptions) {
- this.subscriptions = subscriptions;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/SettingsStorage.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/SettingsStorage.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/SettingsStorage.java
deleted file mode 100644
index debc8fa..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/SettingsStorage.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.browser.bootstrapping;
-
-public interface SettingsStorage {
- Settings getSettings(String username);
-
- void setSettings(String username, Settings settings);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/SimpleXMLSettingsStorage.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/SimpleXMLSettingsStorage.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/SimpleXMLSettingsStorage.java
deleted file mode 100644
index 3017590..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/SimpleXMLSettingsStorage.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/**
- * 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.browser.bootstrapping;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.stream.XMLStreamReader;
-
-import org.apache.commons.lang3.Validate;
-import org.apache.cxf.staxutils.StaxUtils;
-
-public class SimpleXMLSettingsStorage implements SettingsStorage {
- private static final String DEFAULT_FILENAME = "logbrowser-settings.xml";
- private static final Settings DEFAULT_SETTINGS = new Settings();
-
- private final String filename;
- private final Marshaller marshaller;
-
- private Entries entries;
-
- public SimpleXMLSettingsStorage() {
- this(DEFAULT_FILENAME);
- }
-
- public SimpleXMLSettingsStorage(final String filename) {
- Validate.notNull(filename, "filename is null");
- Validate.notEmpty(filename, "filename is empty");
- this.filename = filename;
-
- try {
- JAXBContext context = JAXBContext.newInstance(Entries.class, Entry.class,
- Settings.class, Subscription.class);
-
- marshaller = context.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
-
- File file = new File(filename);
- if (file.exists()) {
- Unmarshaller unmarshaller = context.createUnmarshaller();
- XMLStreamReader reader = StaxUtils.createXMLStreamReader(new FileInputStream(file));
- entries = (Entries) unmarshaller.unmarshal(reader);
- }
-
- if (entries == null) {
- entries = new Entries();
- }
- } catch (FileNotFoundException e) {
- throw new RuntimeException(e);
- } catch (JAXBException e) {
- throw new RuntimeException(e);
- }
- }
-
- public synchronized Settings getSettings(final String username) {
- Validate.notNull(username, "username is null");
- Validate.notEmpty(username, "username is empty");
-
- Entry entry = getCachedEntry(username);
- return entry != null ? entry.getSettings() : DEFAULT_SETTINGS;
- }
-
- public synchronized void setSettings(final String username, final Settings settings) {
- Validate.notNull(username, "username is null");
- Validate.notEmpty(username, "username is empty");
-
- Entry entry = getCachedEntry(username);
- if (entry != null) {
- entry.setSettings(settings);
- entry.setModified(getCurrentTime());
- } else {
- entries.getEntries().add(new Entry(username, getCurrentTime(), settings));
- }
-
- FileOutputStream outputStream = null;
-
- try {
- outputStream = new FileOutputStream(filename);
- marshaller.marshal(entries, outputStream);
- } catch (JAXBException e) {
- throw new RuntimeException(e);
- } catch (FileNotFoundException e) {
- throw new RuntimeException(e);
- } finally {
- if (outputStream != null) {
- try {
- outputStream.close();
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
- }
- }
-
- private Entry getCachedEntry(final String username) {
- assert username != null;
- assert !"".equals(username);
-
- for (Entry entry : entries.getEntries()) {
- if (username.equals(entry.getUsername())) {
- return entry;
- }
- }
- return null;
- }
-
- private XMLGregorianCalendar getCurrentTime() {
- try {
- return DatatypeFactory.newInstance()
- .newXMLGregorianCalendar((GregorianCalendar) GregorianCalendar.getInstance());
- } catch (DatatypeConfigurationException e) {
- throw new RuntimeException(e);
- }
- }
-
- @XmlRootElement(namespace = "http://cxf.apache.org/log")
- private static class Entries {
- private List<Entry> entries;
-
- @XmlElement(name = "entry", namespace = "http://cxf.apache.org/log")
- public List<Entry> getEntries() {
- if (entries == null) {
- entries = new ArrayList<Entry>();
- }
- return this.entries;
- }
- }
-
- @XmlRootElement(namespace = "http://cxf.apache.org/log")
- private static class Entry {
- private Settings settings;
- private String username;
- private XMLGregorianCalendar modified;
-
- private Entry() { }
-
- Entry(final String username, final XMLGregorianCalendar modified, final Settings settings) {
- this.settings = settings;
- this.username = username;
- this.modified = modified;
- }
-
- @XmlElement(required = true, namespace = "http://cxf.apache.org/log")
- public Settings getSettings() {
- return settings;
- }
-
- public void setSettings(Settings value) {
- this.settings = value;
- }
-
- @XmlAttribute(name = "username", namespace = "http://cxf.apache.org/log")
- public String getUsername() {
- return username;
- }
-
- public void setUsername(String value) {
- this.username = value;
- }
-
- @XmlAttribute(name = "modified", namespace = "http://cxf.apache.org/log")
- @XmlSchemaType(name = "date")
- public XMLGregorianCalendar getModified() {
- return modified;
- }
-
- public void setModified(XMLGregorianCalendar value) {
- this.modified = value;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/Subscription.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/Subscription.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/Subscription.java
deleted file mode 100644
index a0462b8..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/bootstrapping/Subscription.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.browser.bootstrapping;
-
-import javax.xml.bind.annotation.XmlElement;
-
-public class Subscription {
- private String id;
- private String name;
- private String url;
-
- @XmlElement(required = true, namespace = "http://cxf.apache.org/log")
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- @XmlElement(required = true, namespace = "http://cxf.apache.org/log")
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @XmlElement(required = true, namespace = "http://cxf.apache.org/log")
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/DefaultEventBus.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/DefaultEventBus.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/DefaultEventBus.java
deleted file mode 100644
index 8fafdad..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/DefaultEventBus.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.browser.client;
-
-import com.google.gwt.event.shared.SimpleEventBus;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-
-@Singleton
-public class DefaultEventBus extends SimpleEventBus {
-
- @Inject
- public DefaultEventBus() {
- super();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Dispatcher.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Dispatcher.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Dispatcher.java
deleted file mode 100644
index 4b6edd8..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Dispatcher.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * 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.browser.client;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.user.client.ui.RootLayoutPanel;
-import com.google.inject.Inject;
-import com.google.inject.Provider;
-
-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.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.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<BrowsePresenter> browseProvider;
-
- @Nonnull
- private final Provider<EditCriteriaPresenter> editCriteriaProvider;
-
- @Nonnull
- private final Provider<SettingsPresenter> settingsProvider;
-
- @Nonnull
- private final SettingsFacade settingsFacade;
-
- @Nullable
- private Presenter currentPresenter;
-
- @Inject
- public Dispatcher(@Nonnull final EventBus eventBus,
- @Nonnull final SettingsFacade settingsFacade,
- @Nonnull final Provider<BrowsePresenter> browseProvider,
- @Nonnull final Provider<EditCriteriaPresenter> editCriteriaProvider,
- @Nonnull final Provider<SettingsPresenter> settingsProvider) {
- this.eventBus = eventBus;
- this.browseProvider = browseProvider;
- this.editCriteriaProvider = editCriteriaProvider;
- this.settingsProvider = settingsProvider;
- this.settingsFacade = settingsFacade;
-
- bind();
- }
-
- public void start() {
- settingsFacade.initialize(StorageStrategy.REMOTE);
- eventBus.fireEvent(new GoToBrowserEvent());
- }
-
- private void go(@Nonnull final Presenter newPresenter) {
- if (currentPresenter != null) {
- currentPresenter.unbind();
- }
-
- currentPresenter = newPresenter;
-
- currentPresenter.go(RootLayoutPanel.get());
- }
-
- private void bind() {
-
- eventBus.addHandler(GoToBrowserEvent.TYPE, new GoToBrowserEventHandler() {
- public void onGoToBrowser(@Nonnull final GoToBrowserEvent event) {
- go(browseProvider.get());
- }
- });
-
- eventBus.addHandler(GoToEditCriteriaEvent.TYPE, new GoToEditCriteriaEventHandler() {
- public void onGoToEditCriteria(@Nonnull final GoToEditCriteriaEvent event) {
- go(editCriteriaProvider.get());
- }
- });
-
- eventBus.addHandler(GoToSettingsEvent.TYPE, new GoToSettingsEventHandler() {
-
- public void onGoToSettings(@Nonnull final GoToSettingsEvent event) {
- go(settingsProvider.get());
- }
- });
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Injector.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Injector.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Injector.java
deleted file mode 100644
index a866cb1..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Injector.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * 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.browser.client;
-
-import com.google.gwt.inject.client.GinModules;
-import com.google.gwt.inject.client.Ginjector;
-
-import org.apache.cxf.management.web.browser.client.ui.ErrorDialog;
-import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources;
-
-@GinModules(Module.class)
-public interface Injector extends Ginjector {
- Dispatcher getDispatcher();
-
- LogBrowserResources getResources();
-
- ErrorDialog getErrorDialog();
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/LogBrowser.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/LogBrowser.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/LogBrowser.java
deleted file mode 100644
index ecb9559..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/LogBrowser.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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.browser.client;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.core.client.GWT;
-
-import org.apache.cxf.management.web.browser.client.ui.ErrorDialog;
-
-public class LogBrowser implements EntryPoint {
-
- @Nonnull
- private final Injector injector = GWT.create(Injector.class);
-
- public void onModuleLoad() {
- injector.getResources().css().ensureInjected();
-
- GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
-
- public void onUncaughtException(@Nonnull final Throwable throwable) {
- ErrorDialog errorDialog = injector.getErrorDialog();
- errorDialog.setException(throwable);
- errorDialog.center();
- }
- });
-
- injector.getDispatcher().start();
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Module.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Module.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Module.java
deleted file mode 100644
index d0e8153..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/Module.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * 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.browser.client;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.inject.client.AbstractGinModule;
-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.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.browser.BrowseView;
-import org.apache.cxf.management.web.browser.client.ui.browser.BrowseViewImpl;
-import org.apache.cxf.management.web.browser.client.ui.browser.EditCriteriaView;
-import org.apache.cxf.management.web.browser.client.ui.browser.EditCriteriaViewImpl;
-import org.apache.cxf.management.web.browser.client.ui.browser.NavigationSidebarView;
-import org.apache.cxf.management.web.browser.client.ui.browser.NavigationSidebarViewImpl;
-import org.apache.cxf.management.web.browser.client.ui.browser.ViewerView;
-import org.apache.cxf.management.web.browser.client.ui.browser.ViewerViewImpl;
-import org.apache.cxf.management.web.browser.client.ui.common.NavigationHeaderView;
-import org.apache.cxf.management.web.browser.client.ui.common.NavigationHeaderViewImpl;
-import org.apache.cxf.management.web.browser.client.ui.settings.SettingsView;
-import org.apache.cxf.management.web.browser.client.ui.settings.SettingsViewImpl;
-import org.apache.cxf.management.web.browser.client.ui.settings.SubscriptionDialog;
-import org.apache.cxf.management.web.browser.client.ui.settings.SubscriptionDialogImpl;
-
-public class Module extends AbstractGinModule {
-
- @Override
- protected void configure() {
- bind(EventBus.class).to(DefaultEventBus.class);
- bind(IdentifierGenerator.class).to(IdentifierGeneratorImpl.class);
- bind(SettingsView.class).to(SettingsViewImpl.class);
- bind(SubscriptionDialog.class).to(SubscriptionDialogImpl.class);
- bind(BrowseView.class).to(BrowseViewImpl.class);
- bind(NavigationHeaderView.class).to(NavigationHeaderViewImpl.class);
- bind(NavigationSidebarView.class).to(NavigationSidebarViewImpl.class);
- bind(EditCriteriaView.class).to(EditCriteriaViewImpl.class);
- bind(ViewerView.class).to(ViewerViewImpl.class);
- bind(RemoteStorageProxy.class).to(RemoteStorageProxyImpl.class);
-
- //TODO move it to view class:
-
- bind(BindStrategy.class)
- .annotatedWith(Names.named("BindStrategyForBrowser"))
- .to(WidgetBindStrategyImpl.class);
-
- bind(BindStrategy.class)
- .annotatedWith(Names.named("BindStrategyForNavigationHeader"))
- .to(WidgetBindStrategyImpl.class);
-
- bind(BindStrategy.class)
- .annotatedWith(Names.named("BindStrategyForEditCriteria"))
- .to(DialogBindStrategyImpl.class);
-
- bind(BindStrategy.class)
- .annotatedWith(Names.named("BindStrategyForNavigationSidebar"))
- .to(WidgetBindStrategyImpl.class);
-
- bind(BindStrategy.class)
- .annotatedWith(Names.named("BindStrategyForSettings"))
- .to(WidgetBindStrategyImpl.class);
-
- bind(BindStrategy.class)
- .annotatedWith(Names.named("BindStrategyForViewer"))
- .to(WidgetBindStrategyImpl.class);
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEvent.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEvent.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEvent.java
deleted file mode 100644
index dd64b4d..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEvent.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.browser.client.event;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.event.shared.GwtEvent;
-import org.apache.cxf.management.web.browser.client.service.browser.FilterOptions;
-
-public class ChangedFilterOptionsEvent extends GwtEvent<ChangedFilterOptionsEventHandler> {
- public static final Type<ChangedFilterOptionsEventHandler> TYPE =
- new Type<ChangedFilterOptionsEventHandler>();
-
- @Nonnull private FilterOptions filterOptions;
-
- public ChangedFilterOptionsEvent(@Nonnull FilterOptions filterOptions) {
- this.filterOptions = filterOptions;
- }
-
- @Nonnull
- public FilterOptions getFilterOptions() {
- return filterOptions;
- }
-
- @Override @Nonnull
- public Type<ChangedFilterOptionsEventHandler> getAssociatedType() {
- return TYPE;
- }
-
- @Override
- protected void dispatch(@Nonnull final ChangedFilterOptionsEventHandler handler) {
- handler.onChangedFilterOptions(this);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEventHandler.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEventHandler.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEventHandler.java
deleted file mode 100644
index 265cab1..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEventHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.browser.client.event;
-
-import com.google.gwt.event.shared.EventHandler;
-
-public interface ChangedFilterOptionsEventHandler extends EventHandler {
- void onChangedFilterOptions(ChangedFilterOptionsEvent event);
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedSubscriptionsEvent.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedSubscriptionsEvent.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedSubscriptionsEvent.java
deleted file mode 100644
index 5160068..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedSubscriptionsEvent.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.browser.client.event;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.event.shared.GwtEvent;
-
-public class ChangedSubscriptionsEvent extends GwtEvent<ChangedSubscriptionsEventHandler> {
- public static final Type<ChangedSubscriptionsEventHandler> TYPE =
- new Type<ChangedSubscriptionsEventHandler>();
-
- @Override
- @Nonnull
- public Type<ChangedSubscriptionsEventHandler> getAssociatedType() {
- return TYPE;
- }
-
- @Override
- protected void dispatch(@Nonnull final ChangedSubscriptionsEventHandler handler) {
- handler.onChangedSubscriptions(this);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedSubscriptionsEventHandler.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedSubscriptionsEventHandler.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedSubscriptionsEventHandler.java
deleted file mode 100644
index b3860b9..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedSubscriptionsEventHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.browser.client.event;
-
-import com.google.gwt.event.shared.EventHandler;
-
-public interface ChangedSubscriptionsEventHandler extends EventHandler {
- void onChangedSubscriptions(ChangedSubscriptionsEvent event);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToBrowserEvent.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToBrowserEvent.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToBrowserEvent.java
deleted file mode 100644
index 1a8e370..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToBrowserEvent.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.browser.client.event;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.event.shared.GwtEvent;
-
-public class GoToBrowserEvent extends GwtEvent<GoToBrowserEventHandler> {
- public static final Type<GoToBrowserEventHandler> TYPE = new Type<GoToBrowserEventHandler>();
-
- @Override
- @Nonnull
- public Type<GoToBrowserEventHandler> getAssociatedType() {
- return TYPE;
- }
-
- @Override
- protected void dispatch(@Nonnull final GoToBrowserEventHandler handler) {
- handler.onGoToBrowser(this);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToBrowserEventHandler.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToBrowserEventHandler.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToBrowserEventHandler.java
deleted file mode 100644
index 22b3785..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToBrowserEventHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.browser.client.event;
-
-import com.google.gwt.event.shared.EventHandler;
-
-public interface GoToBrowserEventHandler extends EventHandler {
- void onGoToBrowser(GoToBrowserEvent event);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToEditCriteriaEvent.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToEditCriteriaEvent.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToEditCriteriaEvent.java
deleted file mode 100644
index cd4225d..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToEditCriteriaEvent.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.browser.client.event;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.event.shared.GwtEvent;
-
-public class GoToEditCriteriaEvent extends GwtEvent<GoToEditCriteriaEventHandler> {
- public static final Type<GoToEditCriteriaEventHandler> TYPE = new Type<GoToEditCriteriaEventHandler>();
-
- @Override
- @Nonnull
- public Type<GoToEditCriteriaEventHandler> getAssociatedType() {
- return TYPE;
- }
-
- @Override
- protected void dispatch(@Nonnull final GoToEditCriteriaEventHandler handler) {
- handler.onGoToEditCriteria(this);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToEditCriteriaEventHandler.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToEditCriteriaEventHandler.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToEditCriteriaEventHandler.java
deleted file mode 100644
index e968057..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToEditCriteriaEventHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.browser.client.event;
-
-import com.google.gwt.event.shared.EventHandler;
-
-public interface GoToEditCriteriaEventHandler extends EventHandler {
- void onGoToEditCriteria(GoToEditCriteriaEvent event);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToSettingsEvent.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToSettingsEvent.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToSettingsEvent.java
deleted file mode 100644
index b66c8c2..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToSettingsEvent.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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.browser.client.event;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.event.shared.GwtEvent;
-
-public class GoToSettingsEvent extends GwtEvent<GoToSettingsEventHandler> {
- public static final Type<GoToSettingsEventHandler> TYPE = new Type<GoToSettingsEventHandler>();
-
- @Override
- @Nonnull
- public Type<GoToSettingsEventHandler> getAssociatedType() {
- return TYPE;
- }
-
- @Override
- protected void dispatch(@Nonnull final GoToSettingsEventHandler handler) {
- handler.onGoToSettings(this);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToSettingsEventHandler.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToSettingsEventHandler.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToSettingsEventHandler.java
deleted file mode 100644
index c6ad797..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/GoToSettingsEventHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.browser.client.event;
-
-import com.google.gwt.event.shared.EventHandler;
-
-public interface GoToSettingsEventHandler extends EventHandler {
- void onGoToSettings(GoToSettingsEvent event);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/SelectedSubscriptionEvent.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/SelectedSubscriptionEvent.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/SelectedSubscriptionEvent.java
deleted file mode 100644
index ff4684a..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/SelectedSubscriptionEvent.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.browser.client.event;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.event.shared.GwtEvent;
-
-public class SelectedSubscriptionEvent extends GwtEvent<SelectedSubscriptionEventHandler> {
- public static final Type<SelectedSubscriptionEventHandler> TYPE =
- new Type<SelectedSubscriptionEventHandler>();
-
- private final String url;
-
- public SelectedSubscriptionEvent(String url) {
- this.url = url;
- }
-
- @Override
- @Nonnull
- public Type<SelectedSubscriptionEventHandler> getAssociatedType() {
- return TYPE;
- }
-
- @Override
- protected void dispatch(@Nonnull final SelectedSubscriptionEventHandler handler) {
- handler.onSelectedSubscription(this);
- }
-
- public String getUrl() {
- return url;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/SelectedSubscriptionEventHandler.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/SelectedSubscriptionEventHandler.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/SelectedSubscriptionEventHandler.java
deleted file mode 100644
index c406586..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/SelectedSubscriptionEventHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.browser.client.event;
-
-import com.google.gwt.event.shared.EventHandler;
-
-public interface SelectedSubscriptionEventHandler extends EventHandler {
- void onSelectedSubscription(SelectedSubscriptionEvent event);
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/AbstractCallback.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/AbstractCallback.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/AbstractCallback.java
deleted file mode 100644
index a28e6d6..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/AbstractCallback.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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.browser.client.service;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.http.client.Request;
-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;
-
- public void onResponseReceived(@Nonnull final Request request, @Nonnull final Response response) {
- if (OK == response.getStatusCode()) {
- onSuccess(parse(response));
- } else {
-
- // TODO add custom exception
- onError(request, new RuntimeException("Undefined remote service error"));
- }
- }
-
- public void onError(final Request request, final Throwable ex) {
-
- // TODO add custom exception
- throw new RuntimeException(ex);
- }
-
- public abstract void onSuccess(T obj);
-
- protected abstract T parse(Response response);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/Entry.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/Entry.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/Entry.java
deleted file mode 100644
index 5362fbf..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/Entry.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/**
- * 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.browser.client.service.browser;
-
-import java.util.Date;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.i18n.client.DateTimeFormat;
-import com.google.gwt.xml.client.Element;
-import com.google.gwt.xml.client.Node;
-import com.google.gwt.xml.client.NodeList;
-
-import static com.google.gwt.xml.client.Node.ELEMENT_NODE;
-import static com.google.gwt.xml.client.Node.TEXT_NODE;
-
-/**
- * The class represents log record, which is parsed from DOM representation of {@link LogRecord}.
- * <p/>
- * Log record is single piece of information log by logger. For example:
- * <code>
- * <p/>
- * </code>
- *
- * @see FeedProxy
- */
-public class Entry {
-
- /**
- * short message
- */
- private String title;
-
- /**
- * long message
- */
- private String message;
-
- /**
- * level: 'DEBUG', 'INFO', 'WARN', 'ERROR'
- */
- private String level;
-
- /**
- * error message and stack trace related with occured exception
- */
- private String throwable;
-
- /**
- * date of occured
- */
- private Date eventTimestamp;
-
- @Nonnull
- private final LazyXmlParser xmlParser;
-
- /**
- * Constructs a new <code>Entry</code> by convert DOM representation.
- *
- * @param entryNode XML node which represent entry (nonnull);
- */
- public Entry(@Nonnull final Node entryNode) {
- xmlParser = new LazyXmlParser(entryNode);
- }
-
- /**
- * Returns short message of the log record.
- *
- * @return short message (nonull)
- */
- @Nonnull
- public String getTitle() {
- if (title == null) {
- title = avoidNull(xmlParser.getTitle());
- }
- return title;
- }
-
- /**
- * Returns long message of the log record.
- *
- * @return long message (nonull)
- */
- @Nonnull
- public String getMessage() {
- if (message == null) {
- message = avoidNull(xmlParser.getMessage());
- }
- return message;
- }
-
- /**
- * Returns level of the log record. Possible values: 'DEBUG', 'INFO', 'WARN', 'ERROR'.
- *
- * @return level (nonull)
- */
- @Nonnull
- public String getLevel() {
- if (level == null) {
- level = avoidNull(xmlParser.getLevel());
- }
-
- return level;
- }
-
- /**
- * Returns error message and stack trace related with occured exception.
- *
- * @return error message and stack trace (nonull)
- */
- @Nonnull
- public String getThrowable() {
- if (throwable == null) {
- throwable = avoidNull(xmlParser.getThrowable());
- }
- return throwable;
- }
-
- @Nullable
- public Date getEventTimestamp() {
- if (eventTimestamp == null) {
- eventTimestamp = xmlParser.getEventTimestamp();
- }
- return eventTimestamp != null ? (Date)eventTimestamp.clone() : null;
- }
-
- @Nonnull
- private String avoidNull(@Nullable final String value) {
- return value != null ? value : "";
- }
-
- private static class LazyXmlParser {
- private static final String TITLE_TAG = "title";
- private static final String MESSAGE_TAG = "message";
- private static final String LEVEL_TAG = "level";
- private static final String THROWABLE_TAG = "throwable";
- private static final String EVENT_TIMESTAMP_TAG = "date";
-
- private static final DateTimeFormat DATETIME_FORMATTER =
- DateTimeFormat.getFormat("yyyy-MM-ddTHH:mm:ss'.'SSSZ");
-
- @Nonnull
- private final Node entryNode;
-
- LazyXmlParser(@Nonnull final Node entryNode) {
- assert "entry".equals(entryNode.getNodeName());
- assert entryNode.getNodeType() == ELEMENT_NODE;
-
- this.entryNode = entryNode;
- }
-
- @Nullable
- private String getTagValue(@Nonnull final String tagName) {
- Node node = getUniqueElementByTagName(tagName);
-
- return node != null ? getTextValue(node) : null;
- }
-
- @Nullable
- private Node getUniqueElementByTagName(@Nonnull final String tagName) {
- NodeList nodes = ((Element)entryNode).getElementsByTagName(tagName);
- return nodes.getLength() == 1 ? nodes.item(0) : null;
- }
-
- @Nullable
- private String getTextValue(@Nonnull final Node node) {
- Node child = node.getFirstChild();
-
- if (child != null && child.getNodeType() == TEXT_NODE) {
- return child.getNodeValue();
- }
-
- return null;
- }
-
- @Nullable
- public String getTitle() {
- return getTagValue(TITLE_TAG);
- }
-
- @Nullable
- public String getMessage() {
- return getTagValue(MESSAGE_TAG);
- }
-
- @Nullable
- public String getLevel() {
- return getTagValue(LEVEL_TAG);
- }
-
- @Nullable
- public String getThrowable() {
- return getTagValue(THROWABLE_TAG);
- }
-
- @Nullable
- public Date getEventTimestamp() {
- String value = getTagValue(EVENT_TIMESTAMP_TAG);
- return value != null ? DATETIME_FORMATTER.parse(value) : null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/Feed.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/Feed.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/Feed.java
deleted file mode 100644
index 65d1d04..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/Feed.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * 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.browser.client.service.browser;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.xml.client.Document;
-import com.google.gwt.xml.client.Node;
-import com.google.gwt.xml.client.NodeList;
-
-import static com.google.gwt.xml.client.Node.ELEMENT_NODE;
-
-public class Feed {
- public static final Feed EMPTY = new Feed();
-
- @Nonnull
- private final List<Entry> entries;
-
- @Nonnull
- private final Links links;
-
- private Feed() {
- entries = new ArrayList<Entry>();
- links = Links.EMPTY;
- }
-
- public Feed(@Nonnull final Document document) {
- entries = new ArrayList<Entry>();
- new XmlParser().parseEntries(document);
-
- links = new Links(document);
- }
-
- @Nonnull
- public List<Entry> getEntries() {
- return entries;
- }
-
- @Nonnull
- public Links getLinks() {
- return links;
- }
-
- private final class XmlParser {
- private static final String ENTRY_TAG = "entry";
-
- private XmlParser() {
- }
-
- private void parseEntries(@Nonnull final Document document) {
- NodeList entryNodes = document.getElementsByTagName(ENTRY_TAG);
-
- if (entryNodes != null) {
- Node entryNode;
- for (int i = 0; i < entryNodes.getLength(); i++) {
- entryNode = entryNodes.item(i);
- assert entryNode != null;
-
- if (entryNode.getNodeType() == ELEMENT_NODE) {
- entries.add(new Entry(entryNodes.item(i)));
- }
- }
- Collections.reverse(entries);
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FeedProxy.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FeedProxy.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FeedProxy.java
deleted file mode 100644
index 2bb147d..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FeedProxy.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.browser.client.service.browser;
-
-import com.google.gwt.http.client.RequestCallback;
-
-public interface FeedProxy {
- void getFeed(String url, RequestCallback callback);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FeedProxyImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FeedProxyImpl.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FeedProxyImpl.java
deleted file mode 100644
index 124b377..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FeedProxyImpl.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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.browser.client.service.browser;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.http.client.RequestBuilder;
-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.xml.client.Document;
-import com.google.gwt.xml.client.XMLParser;
-
-import static com.google.gwt.http.client.RequestBuilder.GET;
-import static com.google.gwt.http.client.RequestBuilder.Method;
-
-import org.apache.cxf.management.web.browser.client.service.AbstractCallback;
-
-public class FeedProxyImpl implements FeedProxy {
- private static final String CONTENT_TYPE_HEADER = "Content-Type";
- private static final String ACCEPT_HEADER = "Accept";
- private static final String ATOM_TYPE = "application/atom+xml";
-
- public void getFeed(@Nonnull final String url, @Nonnull final RequestCallback callback) {
- RequestBuilder builder = buildRequest(GET, url);
-
- try {
- builder.sendRequest(null, callback);
- } catch (RequestException ex) {
-
- // TODO add custom exception
- throw new RuntimeException(ex);
- }
- }
-
- @Nonnull
- private RequestBuilder buildRequest(@Nonnull final Method method, @Nonnull final String url) {
- assert !"".equals(url);
-
- RequestBuilder builder = new RequestBuilder(method, url);
- builder.setHeader(CONTENT_TYPE_HEADER, ATOM_TYPE);
- builder.setHeader(ACCEPT_HEADER, ATOM_TYPE);
-
- return builder;
- }
-
- public abstract static class Callback extends AbstractCallback<Feed> {
-
- @Override @Nonnull
- protected Feed parse(@Nonnull final Response response) {
- Document document = convertFromXML(response);
- if (document != null) {
- return new Feed(document);
- } else {
- return Feed.EMPTY;
- }
- }
-
- @Nullable
- private Document convertFromXML(@Nonnull final Response response) {
- if (response.getText() != null) {
- return XMLParser.parse(response.getText());
- } else {
- return null;
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FilterOptions.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FilterOptions.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FilterOptions.java
deleted file mode 100644
index 75de309..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FilterOptions.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.browser.client.service.browser;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-public class FilterOptions {
- public enum Level {
- DEBUG, INFO, WARN, ERROR
- }
-
- public static final FilterOptions EMPTY = new FilterOptions();
-
- @Nullable private String phrase;
- @Nullable private Date from;
- @Nullable private Date to;
- @Nonnull private List<Level> levels;
-
- private FilterOptions() {
- this.levels = new ArrayList<Level>();
- }
-
- public FilterOptions(@Nullable String phrase, @Nullable Date from,
- @Nullable Date to, @Nonnull List<Level> levels) {
- this.phrase = phrase;
- this.from = from;
- this.to = to;
- this.levels = levels;
- }
-
- @Nullable
- public String getPhrase() {
- return phrase;
- }
-
- @Nullable
- public Date getFrom() {
- return from;
- }
-
- @Nullable
- public Date getTo() {
- return to;
- }
-
- @Nonnull
- public List<Level> getLevels() {
- return levels;
- }
-}
[7/8] cxf git commit: [CXF-7192] Removing cxf-rt-management-web
module, to be restored on demand
Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/logbrowser/src/main/webapp/jquery-1.4.2.min.js
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/logbrowser/src/main/webapp/jquery-1.4.2.min.js b/distribution/src/main/release/samples/logbrowser/src/main/webapp/jquery-1.4.2.min.js
deleted file mode 100644
index 7c24308..0000000
--- a/distribution/src/main/release/samples/logbrowser/src/main/webapp/jquery-1.4.2.min.js
+++ /dev/null
@@ -1,154 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.4.2
- * http://jquery.com/
- *
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2010, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Sat Feb 13 22:33:48 2010 -0500
- */
-(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
-e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
-j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
-"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
-true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
-Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
-(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
-a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
-"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
-function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
-c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
-L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
-"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
-a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
-d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
-a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
-!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
-true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
-parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
-false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
-s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
-applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
-else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
-a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
-w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
-cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
-i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
-" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
-this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
-e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
-c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
-a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
-function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
-k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
-C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
-null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
-e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
-f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
-if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
-fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
-d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
-"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
-a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
-isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
-{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
-if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
-e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
-"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
-d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
-!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
-toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
-u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
-function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
-if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
-e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
-t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
-g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
-for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
-1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
-CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
-relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
-l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
-h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
-CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
-g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
-text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
-setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
-h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
-m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
-"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
-h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
-!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
-h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
-q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
-if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
-(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
-function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
-gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
-c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
-{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
-"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
-d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
-a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
-1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
-a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
-c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
-wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
-prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
-this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
-return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
-""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
-this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
-u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
-1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
-return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
-""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
-c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
-c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
-function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
-Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
-"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
-a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
-a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
-"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
-serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
-function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
-global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
-e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
-"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
-false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
-false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
-c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
-d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
-g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
-1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
-"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
-if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
-this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
-"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
-animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
-j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
-this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
-"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
-c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
-this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
-this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
-e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
-c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
-function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
-this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
-k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
-f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
-a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
-c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
-d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
-"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
-e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/distribution/src/main/release/samples/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/pom.xml b/distribution/src/main/release/samples/pom.xml
index f90aad6..6dae5e0 100644
--- a/distribution/src/main/release/samples/pom.xml
+++ b/distribution/src/main/release/samples/pom.xml
@@ -106,8 +106,6 @@
<module>jax_rs/spring_boot_scan/client</module>
<module>jax_rs/spring_boot_scan/eureka-registry</module>
<module>jaxws_spring_boot</module>
- <module>logbrowser</module>
- <module>logbrowser-blueprint</module>
<module>ws_notification</module>
<module>sts</module>
<module>corba/bank</module>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/README.txt
----------------------------------------------------------------------
diff --git a/rt/management-web/README.txt b/rt/management-web/README.txt
deleted file mode 100644
index 78eba6c..0000000
--- a/rt/management-web/README.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-Debug mode
-----------
-
-Run application:
-
-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
-
-Configure settings:
-
-4) Add new endpoint with URL:
- http://127.0.0.1:8888/log/logs
-5) Generate entry logs by interacting with URL:
- http://127.0.0.1:8888/generate.html
-
-Enjoy!
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/pom.xml
----------------------------------------------------------------------
diff --git a/rt/management-web/pom.xml b/rt/management-web/pom.xml
deleted file mode 100644
index 560492a..0000000
--- a/rt/management-web/pom.xml
+++ /dev/null
@@ -1,328 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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>
- <artifactId>cxf-rt-management-web</artifactId>
- <packaging>bundle</packaging>
- <name>Apache CXF Runtime Web Management</name>
- <description>Apache CXF Runtime Web Management</description>
- <url>http://cxf.apache.org</url>
- <parent>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-parent</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- <relativePath>../../parent/pom.xml</relativePath>
- </parent>
- <properties>
- <cxf.osgi.import>
- !com.google.*,
- org.apache.abdera.parser.stax,
- org.apache.abdera,
- com.ctc.wstx.stax,
- *
- </cxf.osgi.import>
- <gwt.version>2.7.0</gwt.version>
- <gwt.inject.version>2.1.2</gwt.inject.version>
- <gwt.plugin.version>2.7.0</gwt.plugin.version>
- <google.findbugs.version>1.3.9</google.findbugs.version>
- <gwt.hostedmode.dir>${project.build.directory}/war</gwt.hostedmode.dir>
- <gwt.classes.dir>${gwt.hostedmode.dir}/WEB-INF/classes</gwt.classes.dir>
- <cxf.pmd.eclipse.ruleset.ext>-generated</cxf.pmd.eclipse.ruleset.ext>
- </properties>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.abdera</groupId>
- <artifactId>abdera-core</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.apache.abdera</groupId>
- <artifactId>abdera-parser</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.apache.abdera</groupId>
- <artifactId>abdera-extensions-json</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-extension-providers</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-extension-search</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${cxf.servlet-api.group}</groupId>
- <artifactId>${cxf.servlet-api.artifact}</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jettison</groupId>
- <artifactId>jettison</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-management</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-servlet</artifactId>
- <version>${gwt.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-user</artifactId>
- <version>${gwt.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.google.gwt.inject</groupId>
- <artifactId>gin</artifactId>
- <version>${gwt.inject.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <version>${google.findbugs.version}</version>
- </dependency>
- </dependencies>
- <build>
- <outputDirectory>${gwt.classes.dir}</outputDirectory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>gwt-maven-plugin</artifactId>
- <version>${gwt.plugin.version}</version>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <goals>
- <goal>compile</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <soyc>false</soyc>
- <disableClassMetadata>true</disableClassMetadata>
- <disableCastChecking>true</disableCastChecking>
- <webappDirectory>${gwt.classes.dir}/static-content</webappDirectory>
- <hostedWebapp>${gwt.hostedmode.dir}</hostedWebapp>
- <runTarget>logbrowser/LogBrowser.html</runTarget>
- <gen>${project.build.directory}/generated-sources/gwt</gen>
- <persistentunitcache>false</persistentunitcache>
- <extraJvmArgs>-Dgwt.usearchives=false -Xmx512m</extraJvmArgs>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Include-Resource>
- {maven-resources},
- static-content=${gwt.classes.dir}/static-content
- </Include-Resource>
- <Export-Package>
- org.apache.cxf.management.web.browser,
- org.apache.cxf.management.web.browser*,
- org.apache.cxf.management.web.logging.atom*,
- </Export-Package>
- <Import-Package>
- javax.servlet*;version="[2,4)",
- *
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
-
- </plugins>
- <pluginManagement>
- <plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>
- org.codehaus.mojo
- </groupId>
- <artifactId>
- gwt-maven-plugin
- </artifactId>
- <versionRange>
- [2.6.0,)
- </versionRange>
- <goals>
- <goal>compile</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore />
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- <profiles>
- <profile>
- <id>setup.eclipse</id>
- <build>
- <defaultGoal>process-test-sources</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>setup.eclipse.project.sdo</id>
- <phase>process-test-sources</phase>
- <configuration>
- <target>
- <!-- GWT generated code is pretty crappy -->
- <propertyfile file="${basedir}/.settings/org.eclipse.jdt.core.prefs">
- <entry key="org.eclipse.jdt.core.compiler.problem.rawTypeReference" value="ignore" />
- <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport" value="ignore" />
- <entry key="org.eclipse.jdt.core.compiler.problem.unusedLocal" value="ignore" />
- <entry key="org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation" value="ignore" />
- <entry key="org.eclipse.jdt.core.compiler.problem.deprecation" value="ignore" />
- <entry key="org.eclipse.jdt.core.compiler.problem.unusedPrivateMember" value="ignore" />
- </propertyfile>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-source-dir</id>
- <phase>process-classes</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.build.directory}/generated-sources/gwt</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>dev</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-resources</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${gwt.hostedmode.dir}</outputDirectory>
- <resources>
- <resource>
- <directory>${project.basedir}/src/test/gwt-debug</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.basedir}/src/test/gwt-debug</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
[4/8] cxf git commit: [CXF-7192] Removing cxf-rt-management-web
module, to be restored on demand
Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.java
deleted file mode 100644
index 2d3aa0c..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import java.util.List;
-
-import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
-import org.apache.cxf.management.web.browser.client.ui.View;
-
-public interface NavigationSidebarView extends View {
-
- public interface Presenter {
- void onExploreSubcriptionItemClicked(int row);
-
- void onFilterSubcriptionItemClicked(int row);
-
- void onManageSubscriptionsButtonClicked();
-
- void onEditCriteriaHyperinkClicked();
- }
-
- void setSubscriptions(List<Subscription> subscriptions);
-
- void setPresenter(Presenter presenter);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.ui.xml
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.ui.xml b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.ui.xml
deleted file mode 100644
index f6d5490..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.ui.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
- -->
-<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:logbrowser="urn:import:org.apache.cxf.management.web.browser.client.ui.browser">
- <ui:with field="res" type="org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources"/>
- <g:StackLayoutPanel unit="EM">
- <g:stack>
- <g:header size="3">
- <div><div/>
- Explore
- </div>
- </g:header>
- <g:ScrollPanel>
- <g:HTMLPanel>
- <g:Label styleName="{res.css.sidebarHeader}">Tasks</g:Label>
- <g:Hyperlink ui:field="manageSubscriptionsHyperlink" styleName="{res.css.sidebarItem}">
- Manage endpoints
- </g:Hyperlink>
- <g:Label styleName="{res.css.sidebarHeader}">Endpoints</g:Label>
- <logbrowser:SubscriptionTable ui:field="exploreSubscriptionTable" styleName="{res.css.browserTabEntrySelectableTable}"/>
- </g:HTMLPanel>
- </g:ScrollPanel>
- </g:stack>
- <g:stack>
- <g:header size="3">
- <div><div/>
- Filter
- </div>
- </g:header>
- <g:ScrollPanel>
- <g:HTMLPanel>
- <g:Label styleName="{res.css.sidebarHeader}">Tasks</g:Label>
- <g:Hyperlink ui:field="editCriteriaHyperlink" styleName="{res.css.sidebarItem}">
- Edit criteria
- </g:Hyperlink>
- <g:Label styleName="{res.css.sidebarHeader}">Endpoints</g:Label>
- <logbrowser:SubscriptionTable ui:field="filterSubscriptionTable" styleName="{res.css.browserTabEntrySelectableTable}"/>
- </g:HTMLPanel>
- </g:ScrollPanel>
- </g:stack>
- </g:StackLayoutPanel>
-</ui:UiBinder>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarViewImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarViewImpl.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarViewImpl.java
deleted file mode 100644
index 2aa23d7..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarViewImpl.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import java.util.List;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.uibinder.client.UiHandler;
-import com.google.gwt.uibinder.client.UiTemplate;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.Widget;
-import com.google.inject.Singleton;
-
-import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
-
-@Singleton
-public class NavigationSidebarViewImpl extends Composite implements NavigationSidebarView {
-
- @UiTemplate("NavigationSidebarView.ui.xml")
- interface NavigationSidebarViewUiBinder extends UiBinder<Widget, NavigationSidebarViewImpl> { }
-
- private static final NavigationSidebarViewUiBinder UI_BINDER =
- GWT.create(NavigationSidebarViewUiBinder.class);
-
- @UiField @Nonnull
- SubscriptionTable exploreSubscriptionTable;
-
- @UiField @Nonnull
- SubscriptionTable filterSubscriptionTable;
-
- @Nullable
- private Presenter presenter;
-
- public NavigationSidebarViewImpl() {
- initWidget(UI_BINDER.createAndBindUi(this));
-
- addColumnDefinitions(exploreSubscriptionTable);
- exploreSubscriptionTable.addSelectRowHandler(new SelectableTable.SelectRowHandler() {
-
- public void onSelectRow(int row) {
-
- // Remove selection from subscription list in filter section
- filterSubscriptionTable.deselect();
- presenter.onExploreSubcriptionItemClicked(row);
- }
- });
-
- addColumnDefinitions(filterSubscriptionTable);
- filterSubscriptionTable.addSelectRowHandler(new SelectableTable.SelectRowHandler() {
-
- public void onSelectRow(int row) {
-
- // Remove selection from subscription list in explore section
- exploreSubscriptionTable.deselect();
- presenter.onFilterSubcriptionItemClicked(row);
- }
- });
- }
-
- public void setSubscriptions(@Nonnull final List<Subscription> subscriptions) {
- exploreSubscriptionTable.setData(subscriptions);
- filterSubscriptionTable.setData(subscriptions);
- }
-
- @UiHandler("editCriteriaHyperlink")
- void onEditCriteriaHyperlinkClicked(@Nonnull final ClickEvent event) {
- assert presenter != null;
- presenter.onEditCriteriaHyperinkClicked();
- }
-
- @UiHandler("manageSubscriptionsHyperlink")
- void onManageSubscriptionsHyperlinkClicked(@Nonnull final ClickEvent event) {
- assert presenter != null;
- presenter.onManageSubscriptionsButtonClicked();
- }
-
- @SuppressWarnings("unchecked")
- private void addColumnDefinitions(@Nonnull SubscriptionTable table) {
- table.setColumnDefinitions(new SelectableTable.ColumnDefinition<Subscription>() {
-
- public String getContent(Subscription subscription) {
- return subscription.getName();
- }
-
- public String getWidth() {
- return null;
- }
- });
- }
-
- public void setPresenter(Presenter presenter) {
- this.presenter = presenter;
- }
-
- public Widget asWidget() {
- return this;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SelectableTable.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SelectableTable.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SelectableTable.java
deleted file mode 100644
index 8472b3e..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SelectableTable.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.dom.client.Element;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.event.dom.client.KeyDownEvent;
-import com.google.gwt.event.dom.client.KeyDownHandler;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.FlexTable;
-import com.google.gwt.user.client.ui.FlowPanel;
-import com.google.gwt.user.client.ui.FocusPanel;
-import com.google.gwt.user.client.ui.HTMLTable.Cell;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.ScrollPanel;
-import com.google.gwt.user.client.ui.UIObject;
-
-import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources;
-
-public class SelectableTable<T> extends Composite {
-
- @Nonnull
- private final ScrollPanel scroller;
-
- @Nullable
- private final FocusPanel focuser;
-
- @Nonnull
- private final FlexTable table;
-
- @Nonnull
- private final List<SelectRowHandler> selectRowHandlers;
-
- private final boolean hotkeysEnabled;
-
- private int selectedRowIndex;
-
- private boolean isRowSelected;
-
- private Label messageLabel;
-
- @Nullable
- private List<ColumnDefinition<T>> columnDefinitions;
-
- @Nonnull
- private LogBrowserResources resources = GWT.create(LogBrowserResources.class);
-
- public SelectableTable(final boolean hotkeysEnabled) {
- this.hotkeysEnabled = hotkeysEnabled;
- selectRowHandlers = new ArrayList<SelectRowHandler>();
-
- table = new FlexTable();
- table.setCellPadding(0);
- table.setCellSpacing(0);
- table.setVisible(false);
-
- messageLabel = new Label();
- messageLabel.setVisible(false);
-
- FlowPanel content = new FlowPanel();
- content.add(messageLabel);
- content.add(table);
-
- scroller = new ScrollPanel();
-
- if (hotkeysEnabled) {
- focuser = new FocusPanel();
- focuser.setWidth("99%");
- focuser.add(content);
-
- scroller.add(focuser);
- } else {
- focuser = null;
-
- scroller.add(content);
- }
-
- addEventHandlers();
-
- initWidget(scroller);
- }
-
- public void setMessageInsteadOfData(@Nonnull final String message, @Nullable final String styleName) {
- messageLabel.setText(message);
-
- messageLabel.setVisible(true);
- table.setVisible(false);
-
- if (styleName != null) {
- messageLabel.setStyleName(styleName);
- }
- }
-
- public void setData(@Nonnull final List<T> entries) {
- assert columnDefinitions != null;
-
- table.removeAllRows();
-
- messageLabel.setVisible(false);
- table.setVisible(true);
-
- for (int i = 0; i < entries.size(); i++) {
- T entry = entries.get(i);
- for (int j = 0; j < columnDefinitions.size(); j++) {
- ColumnDefinition<T> columnDefinition = columnDefinitions.get(j);
- table.setText(i, j, columnDefinition.getContent(entry));
- table.getCellFormatter().addStyleName(i, j, resources.css().selectableTableRow());
- }
- }
-
- restoreRowSelection();
-
- if (hotkeysEnabled) {
- focuser.setFocus(true);
- }
- }
-
- public void setColumnDefinitions(@Nonnull final List<ColumnDefinition<T>> columnDefinitions) {
- this.columnDefinitions = columnDefinitions;
- setColumnsWidth();
- }
-
- public void setColumnDefinitions(ColumnDefinition<T>... columnDefinitions) {
- this.columnDefinitions = Arrays.asList(columnDefinitions);
- setColumnsWidth();
- }
-
- public void addSelectRowHandler(@Nonnull final SelectRowHandler selectRowHandler) {
- selectRowHandlers.add(selectRowHandler);
- }
-
- public void deselect() {
- if (table.getRowCount() > 0) {
- styleRow(selectedRowIndex, false);
- selectedRowIndex = 0;
- isRowSelected = false;
- }
- }
-
- private void addEventHandlers() {
- table.addClickHandler(new ClickHandler() {
-
- public void onClick(@Nonnull final ClickEvent event) {
- performClickAction(event);
- }
- });
-
- if (hotkeysEnabled) {
- focuser.addKeyDownHandler(new KeyDownHandler() {
-
- public void onKeyDown(@Nonnull final KeyDownEvent event) {
- performKeyDownAction(event);
- }
- });
- }
- }
-
- private void performClickAction(@Nonnull final ClickEvent event) {
- Cell cell = table.getCellForEvent(event);
- if (cell != null) {
- int row = cell.getRowIndex();
- selectRow(row);
- }
- }
-
- private void performKeyDownAction(@Nonnull final KeyDownEvent event) {
- if (isRowSelected) {
- event.preventDefault();
-
- if (event.isUpArrow()) {
- selectRow(selectedRowIndex - 1);
- } else if (event.isDownArrow()) {
- selectRow(selectedRowIndex + 1);
- }
-
- ScrollMarker scrollMarker =
- new ScrollMarker(table.getRowFormatter().getElement(selectedRowIndex));
- scroller.ensureVisible(scrollMarker);
- }
- }
-
- private void selectRow(final int row) {
- if (row >= 0 && row < table.getRowCount()) {
- if (isRowSelected) {
- styleRow(selectedRowIndex, false);
- }
-
- selectedRowIndex = row;
- styleRow(selectedRowIndex, true);
- isRowSelected = true;
-
- fireSelectRowEvent();
- }
- }
-
- private void styleRow(final int row, final boolean selected) {
- String style = resources.css().browserTabSelectedRow();
-
- if (selected) {
- table.getRowFormatter().addStyleName(row, style);
- } else {
- table.getRowFormatter().removeStyleName(row, style);
- }
- }
-
- private void fireSelectRowEvent() {
- for (SelectRowHandler selectRowHandler : selectRowHandlers) {
- selectRowHandler.onSelectRow(selectedRowIndex);
- }
- }
-
- private void restoreRowSelection() {
- if (isRowSelected && selectedRowIndex < table.getRowCount()) {
- selectRow(selectedRowIndex);
- } else {
- isRowSelected = false;
- }
- }
-
- private void setColumnsWidth() {
- assert columnDefinitions != null;
- for (int j = 0; j < columnDefinitions.size(); j++) {
- ColumnDefinition<?> columnDefinition = columnDefinitions.get(j);
- table.getColumnFormatter().setWidth(j, columnDefinition.getWidth());
- }
- }
-
- private class ScrollMarker extends UIObject {
- ScrollMarker(Element element) {
- setElement(element);
- }
- }
-
- public interface SelectRowHandler {
- void onSelectRow(int row);
- }
-
- public interface ColumnDefinition<T> {
- String getContent(T t);
-
- String getWidth();
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SubscriptionTable.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SubscriptionTable.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SubscriptionTable.java
deleted file mode 100644
index 8df7c1a..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/SubscriptionTable.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
-
-public class SubscriptionTable extends SelectableTable<Subscription> {
- public SubscriptionTable() {
- super(/* hotkeys not enabled */ false);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
deleted file mode 100644
index 21d92c8..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.http.client.Request;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import com.google.inject.name.Named;
-
-import org.apache.cxf.management.web.browser.client.event.SelectedSubscriptionEvent;
-import org.apache.cxf.management.web.browser.client.event.SelectedSubscriptionEventHandler;
-import org.apache.cxf.management.web.browser.client.service.browser.Feed;
-import org.apache.cxf.management.web.browser.client.service.browser.FeedProxyImpl;
-import org.apache.cxf.management.web.browser.client.ui.BasePresenter;
-import org.apache.cxf.management.web.browser.client.ui.BindStrategy;
-import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserConstans;
-import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources;
-
-@Singleton
-public class ViewerPresenter extends BasePresenter implements ViewerView.Presenter {
-
- @Nonnull
- private final FeedProxyImpl proxy;
-
- @Nonnull
- private Feed feed;
-
- @Nonnull
- private final ViewerView view;
-
- @Nonnull
- private final LogBrowserConstans constans;
-
- @Nonnull
- private final LogBrowserResources resources;
-
- @Inject
- public ViewerPresenter(@Nonnull final EventBus eventBus,
- @Nonnull final ViewerView view,
- @Nonnull @Named("BindStrategyForViewer") final BindStrategy bindStrategy,
- @Nonnull final FeedProxyImpl proxy,
- @Nonnull final LogBrowserConstans constans,
- @Nonnull final LogBrowserResources resources) {
- super(eventBus, view, bindStrategy);
-
- this.view = view;
- this.view.setPresenter(this);
-
- this.proxy = proxy;
- this.constans = constans;
- this.resources = resources;
-
- setFeed(Feed.EMPTY);
-
- bind();
- }
-
- private void bind() {
- eventBus.addHandler(SelectedSubscriptionEvent.TYPE, new SelectedSubscriptionEventHandler() {
-
- public void onSelectedSubscription(SelectedSubscriptionEvent event) {
- getFeed(event.getUrl());
- }
- });
-
- }
-
- public void onEntryItemClicked(final int row) {
- assert row >= 0 && row < feed.getEntries().size();
- view.setEntryDetails(feed.getEntries().get(row));
- }
-
- public void onNewerButtonClicked() {
- getFeed(feed.getLinks().getNext());
- }
-
- public void onLastButtonClicked() {
- getFeed(feed.getLinks().getLast());
- }
-
- public void onFirstButtonClicked() {
- getFeed(feed.getLinks().getFirst());
- }
-
- public void onRefreshButtonClicked() {
- getFeed(feed.getLinks().getSelf());
- }
-
- public void onOlderButtonClicked() {
- getFeed(feed.getLinks().getPrevious());
- }
-
- private void setFeed(@Nonnull final Feed newFeed) {
- feed = newFeed;
-
- view.setEntryDetails(null);
- view.setLinks(feed.getLinks());
-
- if (feed.getEntries().isEmpty()) {
- setNoEntriesMessage();
- } else {
- view.setEntries(feed.getEntries());
- }
- }
-
- private void setNoEntriesMessage() {
- view.setMessageInsteadOfEntries(constans.browserTabNoEntries(),
- resources.css().browserTabNoEntriesMessage());
- }
-
- private void setLoadingMessage() {
- view.setMessageInsteadOfEntries(constans.browserTabLoading(),
- resources.css().browserTabLoadingMessage());
- }
-
- //TODO Rename this method. Name should emphasize that it gets and sets feed
- private void getFeed(@Nonnull final String url) {
- setLoadingMessage();
- proxy.getFeed(url, new FeedProxyImpl.Callback() {
-
- @Override
- public void onSuccess(@Nonnull final Feed newFeed) {
- setFeed(newFeed);
- }
-
- @Override
- public void onError(@Nonnull final Request request, @Nonnull final Throwable ex) {
- setFeed(Feed.EMPTY);
- super.onError(request, ex);
- }
-
- });
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.java
deleted file mode 100644
index 716942d..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import java.util.List;
-
-import org.apache.cxf.management.web.browser.client.service.browser.Entry;
-import org.apache.cxf.management.web.browser.client.service.browser.Links;
-import org.apache.cxf.management.web.browser.client.ui.View;
-
-public interface ViewerView extends View {
-
- public interface Presenter {
- void onEntryItemClicked(int row);
-
- void onOlderButtonClicked();
-
- void onNewerButtonClicked();
-
- void onLastButtonClicked();
-
- void onFirstButtonClicked();
-
- void onRefreshButtonClicked();
- }
-
- void setMessageInsteadOfEntries(String message, String styleName);
-
- void setEntries(List<Entry> entries);
-
- void setEntryDetails(Entry entry);
-
- void setLinks(Links links);
-
- void setPresenter(Presenter presenter);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.ui.xml
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.ui.xml b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.ui.xml
deleted file mode 100644
index cc27a4b..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerView.ui.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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.
- -->
-<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:logbrowser="urn:import:org.apache.cxf.management.web.browser.client.ui.browser">
- <ui:with field="res" type="org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources"/>
- <g:SplitLayoutPanel>
- <g:north size="200">
- <g:DockLayoutPanel styleName="{res.css.browserTabToolBar}" unit="EM">
- <g:north size="2.2">
- <g:HTMLPanel>
- <table cellspacing="0" cellpadding="0" class="{res.css.browserTabEntryTableHeaders}">
- <colgroup>
- <!--TODO move this values to constans-->
- <col width="160px"/>
- <col width="128px"/>
- <col/>
- <col width="350px"/>
- </colgroup>
- <tbody>
- <tr>
- <td>
- Date
- </td>
- <td>
- Level
- </td>
- <td>
- Message
- </td>
- <td style="text-align:right;">
- <g:Anchor styleName="{res.css.browserTabNavigationLink}" ui:field="firstButton" href="javascript:;">
- « first
- </g:Anchor>
- <g:Anchor styleName="{res.css.browserTabNavigationLink}" ui:field="olderButton" href="javascript:;">
- ‹ previous
- </g:Anchor>
- <g:Anchor styleName="{res.css.browserTabNavigationLink}" ui:field="refreshButton" href="javascript:;">
- refresh
- </g:Anchor>
- <g:Anchor styleName="{res.css.browserTabNavigationLink}" ui:field="newerButton" href="javascript:;">
- next ›
- </g:Anchor>
- <g:Anchor styleName="{res.css.browserTabNavigationLink}" ui:field="lastButton" href="javascript:;">
- last »
- </g:Anchor>
- </td>
- </tr>
- </tbody>
- </table>
- </g:HTMLPanel>
- </g:north>
- <g:center>
- <logbrowser:EntryTable ui:field="entryTable" styleName="{res.css.browserTabEntrySelectableTable}"/>
- </g:center>
- </g:DockLayoutPanel>
- </g:north>
- <g:center size="200">
- <g:DockLayoutPanel styleName="{res.css.browserTabEntryDetailsSection}" unit="EM">
- <g:center>
- <g:ScrollPanel>
- <g:HTML ui:field="entryDetails" styleName="{res.css.browserTabEntryDetailsContent}"/>
- </g:ScrollPanel>
- </g:center>
- </g:DockLayoutPanel>
- </g:center>
- </g:SplitLayoutPanel>
-</ui:UiBinder>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java
deleted file mode 100644
index 4b7f6cb..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerViewImpl.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/**
- * 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.browser.client.ui.browser;
-
-import java.util.List;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.i18n.client.DateTimeFormat;
-import com.google.gwt.safehtml.shared.SafeHtmlUtils;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.uibinder.client.UiHandler;
-import com.google.gwt.uibinder.client.UiTemplate;
-import com.google.gwt.user.client.ui.Anchor;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.Widget;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-
-import org.apache.cxf.management.web.browser.client.service.browser.Entry;
-import org.apache.cxf.management.web.browser.client.service.browser.Links;
-import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserConstans;
-
-@Singleton
-public class ViewerViewImpl extends Composite implements ViewerView {
-
- private static final DateTimeFormat DT_FORMATTER =
- DateTimeFormat.getFormat("HH:mm:ss dd.MM.yyyy");
-
- @UiTemplate("ViewerView.ui.xml")
- interface ViewerViewUiBinder extends UiBinder<Widget, ViewerViewImpl> { }
-
- private static final ViewerViewUiBinder UI_BINDER =
- GWT.create(ViewerViewUiBinder.class);
-
- @UiField @Nonnull
- EntryTable entryTable;
-
- @UiField @Nonnull
- HTML entryDetails;
-
- @UiField @Nonnull
- Anchor refreshButton;
-
- @UiField @Nonnull
- Anchor newerButton;
-
- @UiField @Nonnull
- Anchor olderButton;
-
- @UiField @Nonnull
- Anchor lastButton;
-
- @UiField @Nonnull
- Anchor firstButton;
-
- private Presenter presenter;
-
- @Nonnull
- private final LogBrowserConstans constans;
-
- @Inject
- public ViewerViewImpl(@Nonnull final LogBrowserConstans constans) {
- this.constans = constans;
-
- initWidget(UI_BINDER.createAndBindUi(this));
-
- initEntryTable();
- }
-
- public void setEntries(@Nonnull final List<Entry> entries) {
- entryTable.setData(entries);
- }
-
-
- public void setMessageInsteadOfEntries(@Nonnull final String message, @Nullable final String styleName) {
- entryTable.setMessageInsteadOfData(message, styleName);
- }
-
- public void setEntryDetails(@Nullable final Entry entry) {
- if (entry == null) {
- entryDetails.setHTML("");
- return;
- }
-
- String val = entry.getMessage() != null
- ? entry.getMessage() : entry.getThrowable() != null
- ? entry.getThrowable() : "";
- entryDetails.setHTML(SafeHtmlUtils.fromString(val));
- }
-
- public void setLinks(@Nonnull final Links links) {
- olderButton.setVisible(links.previousAvailable());
- newerButton.setVisible(links.nextAvailable());
- refreshButton.setVisible(links.selfAvailable());
- lastButton.setVisible(links.lastAvailable());
- firstButton.setVisible(links.firstAvailable());
- }
-
- @UiHandler("firstButton")
- void onFirstButtonClicked(@Nonnull ClickEvent event) {
- assert presenter != null;
- presenter.onFirstButtonClicked();
- }
-
- @UiHandler("newerButton")
- void onNewerButtonClicked(@Nonnull ClickEvent event) {
- assert presenter != null;
- presenter.onNewerButtonClicked();
- }
-
- @UiHandler("refreshButton")
- void onRefreshButtonClicked(@Nonnull ClickEvent event) {
- assert presenter != null;
- presenter.onRefreshButtonClicked();
- }
-
- @UiHandler("olderButton")
- void onOlderButtonClicked(@Nonnull ClickEvent event) {
- assert presenter != null;
- presenter.onOlderButtonClicked();
- }
-
- @UiHandler("lastButton")
- void onLastButtonClicked(@Nonnull ClickEvent event) {
- assert presenter != null;
- presenter.onLastButtonClicked();
- }
-
- @SuppressWarnings("unchecked")
- private void initEntryTable() {
- entryTable.setColumnDefinitions(
- new SelectableTable.ColumnDefinition<Entry>() {
-
- public String getContent(Entry entry) {
- return DT_FORMATTER.format(entry.getEventTimestamp());
- }
-
- public String getWidth() {
- return constans.browseTabDatatimeColumnWidth();
- }
- },
- new SelectableTable.ColumnDefinition<Entry>() {
-
- public String getContent(Entry entry) {
- return entry.getLevel();
- }
-
- public String getWidth() {
- return constans.browseTabLevelColumnWidth();
- }
- },
- new SelectableTable.ColumnDefinition<Entry>() {
-
- public String getContent(Entry entry) {
- return entry.getTitle();
- }
-
- public String getWidth() {
- return null;
- }
- }
- );
-
- entryTable.addSelectRowHandler(new SelectableTable.SelectRowHandler() {
-
- public void onSelectRow(int row) {
- assert presenter != null;
- presenter.onEntryItemClicked(row);
- }
- });
- }
-
- public void setPresenter(Presenter presenter) {
- this.presenter = presenter;
- }
-
- public Widget asWidget() {
- return this;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java
deleted file mode 100644
index 6464719..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderPresenter.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.browser.client.ui.common;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.inject.Inject;
-import com.google.inject.name.Named;
-
-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;
-
-public class NavigationHeaderPresenter extends BasePresenter implements NavigationHeaderView.Presenter {
-
- @Nonnull
- private NavigationHeaderView view;
-
- @Inject
- public NavigationHeaderPresenter(@Nonnull final EventBus eventBus,
- @Nonnull final NavigationHeaderView view,
- @Nonnull @Named("BindStrategyForNavigationHeader") final BindStrategy bindStrategy) {
- super(eventBus, view, bindStrategy);
-
- this.view = view;
- this.view.setPresenter(this);
- }
-
- public void onSettingsButtonClicked() {
- eventBus.fireEvent(new GoToSettingsEvent());
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java
deleted file mode 100644
index 2f1a06b..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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.browser.client.ui.common;
-
-import org.apache.cxf.management.web.browser.client.ui.View;
-
-public interface NavigationHeaderView extends View {
-
- public interface Presenter {
- void onSettingsButtonClicked();
- }
-
- void setPresenter(Presenter presenter);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml
deleted file mode 100644
index 02c855d..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderView.ui.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
- -->
-<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui">
- <ui:with field="res" type="org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources"/>
- <g:HTMLPanel>
- <table>
- <tbody>
- <tr>
- <td align="right">
- <g:Hyperlink ui:field="settingsHyperlink" styleName="{res.css.topbarLink}">
- Settings
- </g:Hyperlink>
- </td>
- </tr>
- </tbody>
- </table>
- </g:HTMLPanel>
-</ui:UiBinder>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java
deleted file mode 100644
index f993802..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/common/NavigationHeaderViewImpl.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.browser.client.ui.common;
-
-import javax.annotation.Nonnull;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiHandler;
-import com.google.gwt.uibinder.client.UiTemplate;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.Widget;
-
-public class NavigationHeaderViewImpl extends Composite implements NavigationHeaderView {
-
- @UiTemplate("NavigationHeaderView.ui.xml")
- interface NavigationHeaderViewUiBinder extends UiBinder<Widget, NavigationHeaderViewImpl> { }
-
- private static final NavigationHeaderViewUiBinder UI_BINDER =
- GWT.create(NavigationHeaderViewUiBinder.class);
-
- @Nonnull
- private Presenter presenter;
-
- public NavigationHeaderViewImpl() {
- initWidget(UI_BINDER.createAndBindUi(this));
- }
-
- @UiHandler("settingsHyperlink")
- void onSignOutHyperlinkClicked(@Nonnull final ClickEvent event) {
- assert presenter != null;
- presenter.onSettingsButtonClicked();
- }
-
- public void setPresenter(@Nonnull final Presenter presenter) {
- this.presenter = presenter;
- }
-
- public Widget asWidget() {
- return this;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserConstans.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserConstans.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserConstans.java
deleted file mode 100644
index a80c6a4..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserConstans.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * 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.browser.client.ui.resources;
-
-import com.google.gwt.i18n.client.Constants;
-
-//TODO divide items into groups (like: browseTab, settingsTab etc.)
-public interface LogBrowserConstans extends Constants {
-
- @DefaultStringValue("Application Error")
- String errorDialogTitle();
-
- @DefaultStringValue("Continue")
- String errorDialogContineButton();
-
- @DefaultStringValue("No entries")
- String browserTabNoEntries();
-
- @DefaultStringValue("160px")
- String browseTabDatatimeColumnWidth();
-
- @DefaultStringValue("128px")
- String browseTabLevelColumnWidth();
-
- @DefaultStringValue("350px")
- String browseTabNavigationLinksColumnWidth();
-
- @DefaultStringValue("Loading")
- String browserTabLoading();
-
- @DefaultStringValue("Edit criteria")
- String editCriteriaDialogTitle();
-
- @DefaultStringValue("Add endpoint")
- String settingsTabAddSubscriptionDialogTitle();
-
- @DefaultStringValue("Edit endpoint")
- String settingsTabEditSubscriptionDialogTitle();
-
- @DefaultStringValue("Name can't be empty")
- String settingsTabSubscriptionDialogEmptyName();
-
- @DefaultStringValue("URL can't be empty")
- String settingsTabSubscriptionDialogEmptyUrl();
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java
deleted file mode 100644
index db9410c..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserCss.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.browser.client.ui.resources;
-
-import com.google.gwt.resources.client.CssResource;
-
-public interface LogBrowserCss extends CssResource {
-
- String navigationSidebarSlot();
- String viewerSlot();
-
- /* Error Dialog styles */
- String errorDialog();
- String errorDialogGlass();
- String errorDialogTitle();
- String errorDialogButtons();
- String errorDialogErrorType();
-
- /* Browser tab styles*/
- String browserTabLoadingMessage();
- String browserTabNoEntriesMessage();
- String browserTabSelectedRow();
- String browserTabManageSubscriptionsButton();
- String browserTabToolBar();
- String browserTabEntryTableHeaders();
- String browserTabEntrySelectableTable();
- String browserTabSubscriptionsSideBar();
- String browserTabSubscriptionsHeader();
- String browserTabEntryDetailsSection();
- String browserTabEntryDetailsContent();
- String browserTabNavigationLink();
-
- String sidebarItem();
- String sidebarHeader();
-
- String topbarLink();
-
- String selectableTableRow();
-
- /* Settings tab styles */
- String settingsTabHeader();
- String settingsTabBackButton();
- String settingsTabTitle();
- String settingsTabToolBar();
- String settingsTabContent();
- String settingsTabFeedList();
-
- /* Feed's entry (in settings tab) styles */
- String feedEntry();
- String feedEntryNameLabel();
- String feedEntryUrlLabel();
- String feedEntryButtons();
- String feedEntryRemoveButton();
- String feedEntryEditButton();
-
- /* Edit feed dialog (in settings tab) styles */
- String editFeedDialogErrorMessage();
- String editFeedDialogButtons();
- String editFeedDialogAddButton();
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserResources.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserResources.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserResources.java
deleted file mode 100644
index 8726cef..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/LogBrowserResources.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.browser.client.ui.resources;
-
-import com.google.gwt.resources.client.ClientBundle;
-import com.google.gwt.resources.client.ImageResource;
-
-public interface LogBrowserResources extends ClientBundle {
-
- @Source("logbrowser.css")
- LogBrowserCss css();
-
- @Source("loader.gif")
- ImageResource loader();
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/loader.gif
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/loader.gif b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/loader.gif
deleted file mode 100644
index d42f72c..0000000
Binary files a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/loader.gif and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css
deleted file mode 100644
index a42aca3..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/resources/logbrowser.css
+++ /dev/null
@@ -1,290 +0,0 @@
-a {
- cursor: pointer;
-}
-
-.topbarLink {
- width: 5em;
-}
-
-.topbarLink > a {
- color:#00C;
- text-decoration: underline;
- padding-top: 2px;
- padding-right: 10px;
-}
-
-.selectableTableRow {
- cursor: pointer;
-}
-
-.navigationSidebarSlot > div {
- position: absolute !important;
- left: 0px;
- top: 0px;
- right: 0px;
- bottom: 0px;
-}
-
-.viewerSlot > div {
- position: absolute !important;
- left: 0px;
- top: 0px;
- right: 0px;
- bottom: 0px;
-}
-
-
-/** Error Dialog **/
-
-.errorDialog {
- background: none;
- border: none;
- padding: 10px;
- width: 600px;
- color: #FFFFFF;
- font-size: 15px;
- font-family: verdana;
-}
-
-.errorDialogGlass {
- opacity: 0.75;
-}
-
-@if user.agent safari {
-
- .errorDialogGlass {
- opacity: 0.80;
- }
-}
-
-@if user.agent ie6 ie8 {
-
- /* IE just doesn't do opacity the way we want, make our dialog
- * stand out in a way that it can't be missed against the page
- */
- .errorDialog {
- color: black;
- background: darkgray;
- border: 10px groove lightgrey;
- }
-}
-
-.errorDialogTitle {
- font-size: 30px;
- font-weight: bold;
- margin-bottom: 15px;
-}
-
-.errorDialogErrorType {
- font-weight: bold;
- white-space: nowrap;
- margin-bottom: 15px;
-}
-
-.errorDialogButtons {
- width: 100%;
- margin-top: 15px;
-}
-
-/* Browser tab styles */
-
-@sprite .browserTabLoadingMessage {
- gwt-image: "loader";
- background-repeat:no-repeat;
- background-position:left;
- color:grey;
- font-size:large;
- margin-top:1em;
- text-align:right;
- margin-left:auto;
- margin-right:auto;
- width:5.7em;
- height:100%;
-}
-
-.browserTabNoEntriesMessage {
- color:grey;
- font-size:large;
- height:auto;
- margin-top:1em;
- text-align:center;
-}
-
-.browserTabSelectedRow {
- background: #adcce7;
-}
-
-.browserTabSelectedRow td {
- border-top: 1px solid #88a4d6;
- border-bottom: 1px solid #7b97d0;
-}
-
-.browserTabManageSubscriptionsButton {
- font-size: 11px;
- color: #3366CC;
- margin-left: 0.7em;
-}
-
-.browserTabToolBar {
- border-left: 1px solid #999;
- border-bottom: 1px solid #999;
-}
-
-.browserTabEntryTableHeaders {
- background: #E3E8F3 url(gwt/standard/images/hborder.png) repeat-x scroll 0 -2003px;
- table-layout: fixed;
- width: 100%;
- height: 100%;
- border-bottom: 2px solid #BBCDF3;
- border-top: 3px solid #BBCDF3;
-}
-
-.browserTabEntryTableHeaders td {
- text-shadow: #fff 0 2px 2px;
- padding: 2px 0 1px 10px;
-}
-
-.browserTabEntrySelectableTable {
- table-layout: fixed;
- width: 100%;
-}
-
-.browserTabEntrySelectableTable table {
- width: 100%;
-}
-
-.browserTabEntrySelectableTable td {
- border-top: 1px solid #fff;
- border-bottom: 1px solid #fff;
- padding: 2px 0 2px 10px;
-}
-
-.sidebarItem {
- margin-top: 2px;
- margin-bottom: 5px;
- padding-left:10px;
- white-space:nowrap;
-}
-
-.sidebarHeader {
- color:#666;
- text-transform:uppercase;
- letter-spacing:1px;
- font-size: x-small;
- border-bottom-style:solid;
- border-bottom-color:#666;
- border-width:1px;
- margin-top: 10px;
- margin-bottom: 5px;
- white-space:nowrap;
-}
-
-.browserTabSubscriptionsSideBar {
- border-right: 1px solid #999999;
-}
-
-.browserTabSubscriptionsHeader {
- background: #E3E8F3 url(gwt/standard/images/hborder.png) repeat-x scroll 0 -2003px;
- border-bottom: 2px solid #BBCDF3;
- border-top: 3px solid #BBCDF3;
- padding-left:0.7em;
- padding-top:0.25em;
- padding-bottom:0.2em;
-}
-
-.browserTabEntryDetailsSection {
- border: 1px solid #999999;
-}
-
-.browserTabEntryDetailsContent {
- white-space:pre-wrap;
- line-height: 150%;
- padding: 20px 40px 20px 10px;
- font-family: monospace, serif;
-}
-
-.browserTabNavigationLink {
- margin: 0 8px;
-}
-
-/* Settings tab styles */
-
-.settingsTabHeader {
- background: #FFCC66 none repeat scroll 0 0;
- padding:0.3em;
- margin-top:0.5em;
-}
-
-.settingsTabBackButton {
- margin-top: 0.5em;
- display:inline;
-}
-
-.settingsTabTitle {
- font-size: 140%;
- margin: 0.1em 1.5em 0 0.3em;
- font-weight: bold;
- display:inline;
-}
-
-.settingsTabToolBar {
- padding-left:1em;
- padding-top:0.5em;
- padding-bottom:0.5em;
- background-color:#FFEDA3;
-}
-
-.settingsTabContent {
- background-color:#FFF7D7;
-}
-
-.settingsTabFeedList {
- width:100%;
- padding:0.5em;
-}
-
-/* Feed's entry (in settings tab) styles */
-
-.feedEntry {
- border-bottom:1px solid #FFCC66;
- padding-bottom:0.5em;
- width:100%;
-}
-
-.feedEntryNameLabel {
- font-weight: bold;
-}
-
-.feedEntryUrlLabel {
- color: gray;
- float: left;
-}
-
-.feedEntryButtons {
- text-align:right;
- vertical-align:center;
-}
-
-.feedEntryRemoveButton {
-}
-
-.feedEntryEditButton {
- margin-left: 0.5em;
- margin-right: 1em;
-}
-
-/* Edit feed dialog styles */
-
-.editFeedDialogAddButton {
- margin:0.4em;
-}
-
-.editFeedDialogButtons {
- text-align:right;
-}
-
-.editFeedDialogErrorMessage {
- color:red;
-}
-
-
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java
deleted file mode 100644
index f2e4f7f..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsPresenter.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * 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.browser.client.ui.settings;
-
-import java.util.HashMap;
-import java.util.Map;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.user.client.ui.HasValue;
-import com.google.gwt.user.client.ui.HasWidgets;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import com.google.inject.name.Named;
-
-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.service.settings.SettingsFacade;
-import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
-import org.apache.cxf.management.web.browser.client.ui.BasePresenter;
-import org.apache.cxf.management.web.browser.client.ui.BindStrategy;
-import org.apache.cxf.management.web.browser.client.ui.common.NavigationHeaderPresenter;
-import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserConstans;
-
-@Singleton
-public class SettingsPresenter extends BasePresenter
- implements SettingsView.Presenter, SubscriptionDialog.Presenter {
-
- @Nonnull
- private final SettingsView view;
-
- @Nonnull
- private final SettingsFacade settingsFacade;
-
- @Nonnull
- private final SubscriptionDialog subscriptionDialog;
-
- @Nonnull
- private final LogBrowserConstans constans;
-
- @Inject
- public SettingsPresenter(@Nonnull final EventBus eventBus,
- @Nonnull final SettingsView view,
- @Nonnull @Named("BindStrategyForSettings") final BindStrategy bindStrategy,
- @Nonnull final NavigationHeaderPresenter navigationHeaderPresenter,
- @Nonnull final SettingsFacade settingsFacade,
- @Nonnull final SubscriptionDialog subscriptionDialog,
- @Nonnull final LogBrowserConstans constans) {
- super(eventBus, view, bindStrategy);
-
- this.view = view;
- this.settingsFacade = settingsFacade;
- this.subscriptionDialog = subscriptionDialog;
- this.constans = constans;
-
- this.view.setPresenter(this);
- this.subscriptionDialog.setPresenter(this);
-
- navigationHeaderPresenter.go(view.getNaviagationHeaderSlot());
-
- updateSubscriptions();
- }
-
- public void go(@Nonnull final HasWidgets container) {
- container.clear();
- container.add(view.asWidget());
- }
-
- public void onAddSubscriptionButtonClicked() {
- showSubscriptionDialog(constans.settingsTabAddSubscriptionDialogTitle(), null);
- }
-
- public void onEditSubscriptionButtonClicked(@Nonnull final Subscription subscription) {
- showSubscriptionDialog(constans.settingsTabEditSubscriptionDialogTitle(), subscription);
- }
-
- public void onRemoveSubscriptionButtonClicked(@Nonnull final Subscription subscription) {
- settingsFacade.removeSubscription(subscription);
- updateSubscriptions();
- }
-
- public void onSaveButtonClicked(@Nullable final String id,
- @Nonnull final HasValue<String> name,
- @Nonnull final HasValue<String> url) {
- Map<HasValue<String>, String> errors = validate(name, url);
-
- if (errors.isEmpty()) {
- String nameValue = name.getValue();
- String urlValue = url.getValue();
-
- if (id == null) {
- settingsFacade.addSubscription(nameValue, urlValue);
- } else {
- settingsFacade.updateSubscription(new Subscription(id, nameValue, urlValue));
- }
-
- updateSubscriptions();
- subscriptionDialog.hide();
- } else {
- subscriptionDialog.setValidationErrors(errors);
- }
- }
-
- public void onCancelButtonClicked() {
- subscriptionDialog.hide();
- }
-
- public void onBackHyperlinkClicked() {
- eventBus.fireEvent(new GoToBrowserEvent());
- }
-
- private void updateSubscriptions() {
- eventBus.fireEvent(new ChangedSubscriptionsEvent());
- view.setData(settingsFacade.getSubscriptions());
- }
-
- private void showSubscriptionDialog(@Nonnull final String title, @Nullable final Subscription data) {
- subscriptionDialog.setTitle(title);
- subscriptionDialog.setData(data);
- subscriptionDialog.setValidationErrors(null);
- subscriptionDialog.center();
- subscriptionDialog.show();
- }
-
- private Map<HasValue<String>, String> validate(@Nonnull final HasValue<String> name,
- @Nonnull final HasValue<String> url) {
- Map<HasValue<String>, String> errors = new HashMap<HasValue<String>, String>();
-
- String nameValue = name.getValue();
- if (nameValue == null || nameValue.length() == 0) {
- errors.put(name, constans.settingsTabSubscriptionDialogEmptyName());
- }
-
- String urlValue = url.getValue();
- if (urlValue == null || urlValue.length() == 0) {
- errors.put(url, constans.settingsTabSubscriptionDialogEmptyUrl());
- }
-
- return errors;
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java
deleted file mode 100644
index d516e4e..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.browser.client.ui.settings;
-
-import java.util.List;
-
-import com.google.gwt.user.client.ui.HasWidgets;
-
-import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
-import org.apache.cxf.management.web.browser.client.ui.View;
-
-public interface SettingsView extends View {
-
- public interface Presenter {
-
- void onAddSubscriptionButtonClicked();
-
- void onEditSubscriptionButtonClicked(Subscription subscription);
-
- void onRemoveSubscriptionButtonClicked(Subscription subscription);
-
- void onBackHyperlinkClicked();
- }
-
- HasWidgets getNaviagationHeaderSlot();
-
- void setData(List<Subscription> subscriptions);
-
- void setPresenter(Presenter presenter);
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.ui.xml
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.ui.xml b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.ui.xml
deleted file mode 100644
index eec19e2..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsView.ui.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
- -->
-<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui">
- <ui:with field="res" type="org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources"/>
- <ui:style>
- .content {
- margin: 0.5em 1em;
- padding: 3px;
- background-color: #FC6;
- }
-
- .header {
- width: auto;
- margin-bottom: 0.5em;
- }
-
- .header td {
- vertical-align: bottom;
- }
-
- .title {
- font-size: 140%;
- font-weight: bold;
- margin-left: 0.3em;
- margin-right: 1em;
- }
-
- .backLink {
- text-decoration: underline;
- }
- </ui:style>
- <g:ScrollPanel>
- <g:HTMLPanel>
- <g:FlowPanel ui:field="navigationHeaderSlot"/>
- <div class="{style.content}">
- <table class="{style.header}">
- <tbody>
- <tr>
- <td>
- <g:Label addStyleNames="{style.title}">
- Settings
- </g:Label>
- </td>
- <td>
- <g:Hyperlink ui:field="backHyperlink" addStyleNames="{style.backLink}">
- � Back to Explorer
- </g:Hyperlink>
- </td>
- </tr>
- </tbody>
- </table>
- <g:DecoratedTabPanel ui:field="tabPanel" addStyleDependentNames="settings">
- <g:Tab text="Endpoints">
- <g:HTMLPanel>
- <g:Button ui:field="addSubscriptionButton">
- Add endpoint
- </g:Button>
- <g:FlexTable ui:field="subscriptionsTable"/>
- </g:HTMLPanel>
- </g:Tab>
- </g:DecoratedTabPanel>
- </div>
- </g:HTMLPanel>
- </g:ScrollPanel>
-</ui:UiBinder>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsViewImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsViewImpl.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsViewImpl.java
deleted file mode 100644
index 9676742..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SettingsViewImpl.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * 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.browser.client.ui.settings;
-
-import java.util.List;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.uibinder.client.UiHandler;
-import com.google.gwt.uibinder.client.UiTemplate;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.DecoratedTabPanel;
-import com.google.gwt.user.client.ui.FlexTable;
-import com.google.gwt.user.client.ui.FlowPanel;
-import com.google.gwt.user.client.ui.HasWidgets;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.Widget;
-import com.google.inject.Singleton;
-
-import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
-
-@Singleton
-public class SettingsViewImpl extends Composite implements SettingsView {
-
- @UiTemplate("SettingsView.ui.xml")
- interface SettingsViewUiBinder extends UiBinder<Widget, SettingsViewImpl> {
- }
-
- private static final SettingsViewUiBinder UI_BINDER = GWT.create(SettingsViewUiBinder.class);
-
- @UiField @Nonnull
- DecoratedTabPanel tabPanel;
-
- @UiField @Nonnull
- FlowPanel navigationHeaderSlot;
-
- @UiField @Nonnull
- FlexTable subscriptionsTable;
-
- @Nullable
- private Presenter presenter;
-
- public SettingsViewImpl() {
- initWidget(UI_BINDER.createAndBindUi(this));
- tabPanel.selectTab(0);
- }
-
- public HasWidgets getNaviagationHeaderSlot() {
- return navigationHeaderSlot;
- }
-
- public void setData(@Nonnull final List<Subscription> subscriptions) {
- subscriptionsTable.clear();
-
- int row = 0;
- for (final Subscription subscription : subscriptions) {
- SubscriptionEntry subscriptionEntry = new SubscriptionEntry();
-
- subscriptionEntry.nameLabel.setText(subscription.getName());
- subscriptionEntry.urlLabel.setText(subscription.getUrl());
-
- subscriptionEntry.editButton.addClickHandler(new ClickHandler() {
-
- public void onClick(@Nonnull final ClickEvent event) {
- assert presenter != null;
- presenter.onEditSubscriptionButtonClicked(subscription);
- }
- });
- subscriptionEntry.removeButton.addClickHandler(new ClickHandler() {
-
- public void onClick(@Nonnull final ClickEvent event) {
- assert presenter != null;
- presenter.onRemoveSubscriptionButtonClicked(subscription);
- }
- });
-
- subscriptionsTable.setWidget(row, 0, subscriptionEntry);
-
- row++;
- }
- }
-
- @UiHandler("backHyperlink")
- void onBackHyperlinkClicked(@Nonnull final ClickEvent event) {
- assert presenter != null;
- presenter.onBackHyperlinkClicked();
- }
-
- @UiHandler("addSubscriptionButton")
- void onAddSubscriptionButtonClicked(@Nonnull final ClickEvent event) {
- assert presenter != null;
- presenter.onAddSubscriptionButtonClicked();
- }
-
- public void setPresenter(@Nonnull final Presenter presenter) {
- this.presenter = presenter;
- }
-
- @Nonnull
- public Widget asWidget() {
- return this;
- }
-
- protected static class SubscriptionEntry extends Composite {
-
- @UiTemplate("SubscriptionEntry.ui.xml")
- interface SubscriptionEntryUiBinder extends UiBinder<Widget, SubscriptionEntry> { }
-
- private static final SubscriptionEntryUiBinder UI_BINDER =
- GWT.create(SubscriptionEntryUiBinder.class);
-
- @UiField @Nonnull
- Label nameLabel;
-
- @UiField @Nonnull
- Label urlLabel;
-
- @UiField @Nonnull
- Button editButton;
-
- @UiField @Nonnull
- Button removeButton;
-
- public SubscriptionEntry() {
- initWidget(UI_BINDER.createAndBindUi(this));
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialog.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialog.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialog.java
deleted file mode 100644
index 862e5bf..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialog.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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.browser.client.ui.settings;
-
-import java.util.Map;
-
-import com.google.gwt.user.client.ui.HasValue;
-
-import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
-
-public interface SubscriptionDialog {
-
- public interface Presenter {
-
- void onSaveButtonClicked(String id, HasValue<String> name, HasValue<String> url);
-
- void onCancelButtonClicked();
- }
-
- void center();
-
- void show();
-
- void hide();
-
- void setValidationErrors(Map<HasValue<String>, String> errors);
-
- void setTitle(String title);
-
- void setData(Subscription subscription);
-
- void setPresenter(Presenter presenter);
-}
\ No newline at end of file
[3/8] cxf git commit: [CXF-7192] Removing cxf-rt-management-web
module, to be restored on demand
Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialogImpl.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialogImpl.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialogImpl.java
deleted file mode 100644
index b9649f6..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionDialogImpl.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * 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.browser.client.ui.settings;
-
-import java.util.Map;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.uibinder.client.UiTemplate;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.DialogBox;
-import com.google.gwt.user.client.ui.HasValue;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.TextBox;
-import com.google.gwt.user.client.ui.Widget;
-
-import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
-
-public class SubscriptionDialogImpl extends DialogBox implements SubscriptionDialog {
-
- @Nonnull
- private Form form;
-
- @Nullable
- private Presenter presenter;
-
- @Nullable
- private String subscriptionId;
-
- public SubscriptionDialogImpl() {
- form = new Form();
- form.nameErrorLabel.setVisible(false);
- form.urlErrorLabel.setVisible(false);
-
- form.cancelButton.addClickHandler(new ClickHandler() {
-
- public void onClick(@Nonnull final ClickEvent clickEvent) {
- assert presenter != null;
- presenter.onCancelButtonClicked();
- }
- });
- form.saveButton.addClickHandler(new ClickHandler() {
-
- public void onClick(@Nonnull final ClickEvent clickEvent) {
- assert presenter != null;
- presenter.onSaveButtonClicked(subscriptionId, form.nameTextBox, form.urlTextBox);
- }
- });
-
- setGlassEnabled(true);
- setAnimationEnabled(false);
- setAutoHideEnabled(true);
- setWidget(form);
- }
-
- public void setValidationErrors(@Nullable Map<HasValue<String>, String> errors) {
- form.nameErrorLabel.setVisible(false);
- form.urlErrorLabel.setVisible(false);
-
- if (errors == null) {
- return;
- }
-
- if (errors.containsKey(form.nameTextBox)) {
- form.nameErrorLabel.setText(errors.get(form.nameTextBox));
- form.nameErrorLabel.setVisible(true);
- }
- if (errors.containsKey(form.urlTextBox)) {
- form.urlErrorLabel.setText(errors.get(form.urlTextBox));
- form.urlErrorLabel.setVisible(true);
- }
- }
-
- public void setTitle(@Nonnull final String title) {
- setText(title);
- }
-
- public void setData(@Nullable final Subscription subscription) {
- if (subscription == null) {
- form.nameTextBox.setValue("");
- form.urlTextBox.setValue("");
- subscriptionId = null;
- } else {
- form.nameTextBox.setValue(subscription.getName());
- form.urlTextBox.setValue(subscription.getUrl());
- subscriptionId = subscription.getId();
- }
- }
-
- public void setPresenter(@Nonnull final Presenter presenter) {
- this.presenter = presenter;
- }
-
- protected static class Form extends Composite {
-
- @UiTemplate("SubscriptionForm.ui.xml")
- interface FormViewUiBinder extends UiBinder<Widget, Form> { }
-
- private static final FormViewUiBinder UI_BINDER = GWT.create(FormViewUiBinder.class);
-
- @UiField @Nonnull
- TextBox nameTextBox;
-
- @UiField @Nonnull
- Label nameErrorLabel;
-
- @UiField @Nonnull
- TextBox urlTextBox;
-
- @UiField @Nonnull
- Label urlErrorLabel;
-
- @UiField @Nonnull
- Button saveButton;
-
- @UiField @Nonnull
- Button cancelButton;
-
- public Form() {
- initWidget(UI_BINDER.createAndBindUi(this));
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionEntry.ui.xml
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionEntry.ui.xml b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionEntry.ui.xml
deleted file mode 100644
index c9a554d..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionEntry.ui.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
- -->
-<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui">
- <ui:with field="res" type="org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources"/>
- <g:HTMLPanel>
- <table class="{res.css.feedEntry}">
- <tr>
- <td>
- <g:Label ui:field="nameLabel" addStyleNames="{res.css.feedEntryNameLabel}"/>
- <g:Label ui:field="urlLabel" addStyleNames="{res.css.feedEntryUrlLabel}"/>
- </td>
- <td class="{res.css.feedEntryButtons}">
- <g:Button ui:field="removeButton" addStyleNames="{res.css.feedEntryRemoveButton}">
- Remove
- </g:Button>
- <g:Button ui:field="editButton" addStyleNames="{res.css.feedEntryEditButton}">
- Edit
- </g:Button>
- </td>
- </tr>
- </table>
- </g:HTMLPanel>
-</ui:UiBinder>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionForm.ui.xml
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionForm.ui.xml b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionForm.ui.xml
deleted file mode 100644
index 8b06e97..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/settings/SubscriptionForm.ui.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
- -->
-<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui">
- <ui:with field="res" type="org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserResources"/>
- <g:HTMLPanel>
- <table cellspacing="6">
- <tr>
- <td>
- <g:Label>Name:</g:Label>
- </td>
- <td>
- <g:TextBox ui:field="nameTextBox"/>
- </td>
- </tr>
- <tr>
- <td/>
- <td>
- <g:Label ui:field="nameErrorLabel" addStyleNames="{res.css.editFeedDialogErrorMessage}"/>
- </td>
- </tr>
- <tr>
- <td>
- <g:Label>URL:</g:Label>
- </td>
- <td>
- <g:TextBox ui:field="urlTextBox"/>
- </td>
- </tr>
- <tr>
- <td/>
- <td>
- <g:Label ui:field="urlErrorLabel" addStyleNames="{res.css.editFeedDialogErrorMessage}"/>
- </td>
- </tr>
- </table>
- <g:FlowPanel addStyleNames="{res.css.editFeedDialogButtons}">
- <g:Button ui:field="cancelButton">
- Cancel
- </g:Button>
- <g:Button ui:field="saveButton" addStyleNames="{res.css.editFeedDialogAddButton}">
- Save
- </g:Button>
- </g:FlowPanel>
- </g:HTMLPanel>
-</ui:UiBinder>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/LogBrowser.html
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/LogBrowser.html b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/LogBrowser.html
deleted file mode 100644
index 89d7238..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/LogBrowser.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!doctype html>
-<!--
- ~ * 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.
- -->
-
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-
- <title>LogBrowser</title>
-
- <script type="text/javascript" language="javascript" src="logbrowser.nocache.js"></script>
- <script type="text/javascript" language="javascript" src="uuid.min.js"></script>
- <script type="text/javascript" language="javascript" src="json2.min.js"></script>
-
- </head>
-
- <body>
- <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
-
- <noscript>
- <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
- Your web browser must have JavaScript enabled
- in order for this application to display correctly.
- </div>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/custom.css
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/custom.css b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/custom.css
deleted file mode 100644
index 71d568b..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/custom.css
+++ /dev/null
@@ -1,16 +0,0 @@
-body table {
- width:100%;
-}
-
-.gwt-DecoratedTabPanel-settings .gwt-TabPanelBottom {
- border-color: #FFF7D7;
- background-color: #FFF7D7;
-}
-
-.gwt-DecoratedTabPanel-settings .tabMiddleLeft, .gwt-DecoratedTabPanel-settings .tabMiddleCenter, .gwt-DecoratedTabPanel-settings .tabMiddleRight, .gwt-DecoratedTabPanel-settings .tabTopLeft, .gwt-DecoratedTabPanel-settings .tabTopCenter, .gwt-DecoratedTabPanel-settings .tabTopRight {
- background: none repeat scroll 0 0 #FFF7D7 !important;
-}
-
-.gwt-TextBox-clear {
- padding: 1px 0px;
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/json2.min.js
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/json2.min.js b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/json2.min.js
deleted file mode 100644
index df33848..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/json2.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-if(!this.JSON)this.JSON={};
-(function(){function l(b){return b<10?"0"+b:b}function o(b){p.lastIndex=0;return p.test(b)?'"'+b.replace(p,function(f){var c=r[f];return typeof c==="string"?c:"\\u"+("0000"+f.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+b+'"'}function m(b,f){var c,d,g,j,i=h,e,a=f[b];if(a&&typeof a==="object"&&typeof a.toJSON==="function")a=a.toJSON(b);if(typeof k==="function")a=k.call(f,b,a);switch(typeof a){case "string":return o(a);case "number":return isFinite(a)?String(a):"null";case "boolean":case "null":return String(a);
-case "object":if(!a)return"null";h+=n;e=[];if(Object.prototype.toString.apply(a)==="[object Array]"){j=a.length;for(c=0;c<j;c+=1)e[c]=m(c,a)||"null";g=e.length===0?"[]":h?"[\n"+h+e.join(",\n"+h)+"\n"+i+"]":"["+e.join(",")+"]";h=i;return g}if(k&&typeof k==="object"){j=k.length;for(c=0;c<j;c+=1){d=k[c];if(typeof d==="string")if(g=m(d,a))e.push(o(d)+(h?": ":":")+g)}}else for(d in a)if(Object.hasOwnProperty.call(a,d))if(g=m(d,a))e.push(o(d)+(h?": ":":")+g);g=e.length===0?"{}":h?"{\n"+h+e.join(",\n"+h)+
-"\n"+i+"}":"{"+e.join(",")+"}";h=i;return g}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+l(this.getUTCMonth()+1)+"-"+l(this.getUTCDate())+"T"+l(this.getUTCHours())+":"+l(this.getUTCMinutes())+":"+l(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var q=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
-p=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,h,n,r={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;if(typeof JSON.stringify!=="function")JSON.stringify=function(b,f,c){var d;n=h="";if(typeof c==="number")for(d=0;d<c;d+=1)n+=" ";else if(typeof c==="string")n=c;if((k=f)&&typeof f!=="function"&&(typeof f!=="object"||typeof f.length!=="number"))throw new Error("JSON.stringify");return m("",
-{"":b})};if(typeof JSON.parse!=="function")JSON.parse=function(b,f){function c(g,j){var i,e,a=g[j];if(a&&typeof a==="object")for(i in a)if(Object.hasOwnProperty.call(a,i)){e=c(a,i);if(e!==undefined)a[i]=e;else delete a[i]}return f.call(g,j,a)}var d;b=String(b);q.lastIndex=0;if(q.test(b))b=b.replace(q,function(g){return"\\u"+("0000"+g.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(b.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
-"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){d=eval("("+b+")");return typeof f==="function"?c({"":d},""):d}throw new SyntaxError("JSON.parse");}})();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/uuid.min.js
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/uuid.min.js b/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/uuid.min.js
deleted file mode 100644
index 846fb48..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/resources/uuid.min.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
-Math.uuid.js (v1.4)
-http://www.broofa.com
-mailto:robert@broofa.com
-
-Copyright (c) 2010 Robert Kieffer
-Dual licensed under the MIT and GPL licenses.
-*/
-(function(){var c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");Math.uuid=function(f,d){var a=[];d=d||c.length;if(f)for(var b=0;b<f;b++)a[b]=c[0|Math.random()*d];else{var e;a[8]=a[13]=a[18]=a[23]="-";a[14]="4";for(b=0;b<36;b++)if(!a[b]){e=0|Math.random()*16;a[b]=c[b==19?e&3|8:e]}}return a.join("")}})();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogLevel.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogLevel.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogLevel.java
deleted file mode 100644
index 535f68e..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogLevel.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 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;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlTransient;
-
-/**
- * Log level of {@link LogRecord}. Based on SLF4J being popular facade for loggers like JUL, Log4J, JCL and so
- * on. Severities order is: FATAL > ERROR > WARN > INFO > DEBUG > TRACE.
- * <p>
- * Mapping of levels:
- * <ol>
- * <li>JUL - same as <a href="http://www.slf4j.org/apidocs/org/slf4j/bridge/SLF4JBridgeHandler.html">SLF4J
- * approach</a>.</li>
- * <li>Log4J - levels are identical</li>
- * </ol>
- */
-@XmlEnum
-public enum LogLevel {
- ALL,
- FATAL,
- ERROR,
- WARN,
- INFO,
- DEBUG,
- TRACE,
- OFF;
-
- @XmlTransient
- private static Map<Level, LogLevel> fromJul = new HashMap<Level, LogLevel>();
-
- @XmlTransient
- private static Map<LogLevel, Level> toJul = new HashMap<LogLevel, Level>();
-
- static {
- fromJul.put(Level.ALL, LogLevel.ALL);
- fromJul.put(Level.SEVERE, LogLevel.ERROR);
- fromJul.put(Level.WARNING, LogLevel.WARN);
- fromJul.put(Level.INFO, LogLevel.INFO);
- fromJul.put(Level.FINE, LogLevel.DEBUG);
- fromJul.put(Level.FINER, LogLevel.DEBUG);
- fromJul.put(Level.FINEST, LogLevel.TRACE);
- fromJul.put(Level.OFF, LogLevel.OFF);
-
- toJul.put(LogLevel.ALL, Level.ALL);
- toJul.put(LogLevel.FATAL, Level.SEVERE);
- toJul.put(LogLevel.ERROR, Level.SEVERE);
- toJul.put(LogLevel.WARN, Level.WARNING);
- toJul.put(LogLevel.INFO, Level.INFO);
- toJul.put(LogLevel.DEBUG, Level.FINE);
- toJul.put(LogLevel.TRACE, Level.FINEST);
- toJul.put(LogLevel.OFF, Level.OFF);
- }
-
- /**
- * Creates this enum from JUL {@link Level}.
- */
- public static LogLevel fromJUL(Level level) {
- return fromJul.get(level);
- }
-
- /**
- * Creates this JUL {@link Level} from this enum.
- */
- public static Level toJUL(LogLevel level) {
- return toJul.get(level);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecord.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecord.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecord.java
deleted file mode 100644
index 3b95118..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecord.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * 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;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.text.MessageFormat;
-import java.util.Date;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-
-import org.apache.commons.lang3.Validate;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * Log entry serializable to XML. Based on common set of {@link java.util.logging.LogRecord} and
- * {@link org.apache.log4j.spi.LoggingEvent} attributes.
- * <p>
- * LogRecord are never null; if some attributes are not set (e.g. logger name, or rendered cause taken from
- * Throwable) empty strings are returned.
- */
-@XmlRootElement(namespace = "http://cxf.apache.org/log")
-public class LogRecord {
-
- @XmlTransient
- private String id = "uuid:" + UUID.randomUUID().toString();
-
- private Date eventTimestamp = new Date();
- private LogLevel level = LogLevel.INFO;
- private String message = "";
- private String loggerName = "";
- private String threadName = "";
- private String throwable = "";
-
- public LogRecord() {
-
- }
-
- public LogRecord(String id) {
- this.id = id;
- }
-
- public LogRecord(LogRecord copy) {
- this.eventTimestamp = copy.getDate();
- this.level = copy.getLevel();
- this.message = copy.getMessage();
- this.loggerName = copy.getLoggerName();
- this.threadName = copy.getThreadName();
- this.throwable = copy.getThrowable();
- }
-
- /**
- * Creates this object from JUL LogRecord. Most attributes are copied, others are converted as follows:
- * raw {@link java.util.logging.LogRecord#getMessage() message} is formatted with
- * {@link java.util.logging.LogRecord#getParameters() parameters} using {@link MessageFormat}, attached
- * {@link java.util.logging.LogRecord#getThrown() throwable} has full stack trace dumped, and log levels
- * are mapped as specified in {@link LogRecord}.
- *
- * @param julRecord log record to convert.
- * @return conversion result.
- */
- public static LogRecord fromJUL(java.util.logging.LogRecord julRecord) {
- Validate.notNull(julRecord, "julRecord is null");
- LogRecord record = new LogRecord();
- record.setDate(new Date(julRecord.getMillis()));
- record.setLevel(LogLevel.fromJUL(julRecord.getLevel()));
- record.setLoggerName(julRecord.getLoggerName());
- if (julRecord.getThrown() != null) {
- StringWriter sw = new StringWriter();
- julRecord.getThrown().printStackTrace(new PrintWriter(sw));
- record.setThrowable(sw.getBuffer().toString());
- }
- if (julRecord.getParameters() != null) {
- record.setMessage(MessageFormat.format(julRecord.getMessage(), julRecord.getParameters()));
- } else {
- record.setMessage(julRecord.getMessage());
- }
- record.setThreadName(Integer.toString(julRecord.getThreadID()));
- return record;
- }
-
- public String getId() {
- return id;
- }
-
- @XmlElement(namespace = "http://cxf.apache.org/log")
- public Date getDate() {
- return eventTimestamp;
- }
-
- public void setDate(Date date) {
- Validate.notNull(date, "eventTimestamp is null");
- this.eventTimestamp = date;
- }
-
- @XmlElement(namespace = "http://cxf.apache.org/log")
- public LogLevel getLevel() {
- return level;
- }
-
- public void setLevel(LogLevel level) {
- Validate.notNull(level, "level is null");
- this.level = level;
- }
-
- /**
- * Formatted message with parameters filled in.
- */
- @XmlElement(namespace = "http://cxf.apache.org/log")
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String renderedMessage) {
- Validate.notNull(level, "message is null");
- this.message = renderedMessage;
- }
-
- @XmlElement(namespace = "http://cxf.apache.org/log")
- public String getLoggerName() {
- return loggerName;
- }
-
- public void setLoggerName(String loggerName) {
- Validate.notNull(level, "loggerName is null");
- this.loggerName = loggerName;
- }
-
- @XmlElement(namespace = "http://cxf.apache.org/log")
- public String getThreadName() {
- return threadName;
- }
-
- public void setThreadName(String threadName) {
- Validate.notNull(level, "threadName is null");
- this.threadName = threadName;
- }
-
- /**
- * Full stack trace of {@link Throwable} associated with log record.
- */
- @XmlElement(namespace = "http://cxf.apache.org/log")
- public String getThrowable() {
- return throwable;
- }
-
- public void setThrowable(String throwable) {
- Validate.notNull(throwable, "throwable is null");
- this.throwable = throwable;
- }
-
- @Override
- public boolean equals(Object obj) {
- return EqualsBuilder.reflectionEquals(obj, this);
- }
-
- @Override
- public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
- }
-
- @Override
- public String toString() {
- return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecords.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecords.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecords.java
deleted file mode 100644
index 9a6d336..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/LogRecords.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.apache.commons.lang3.Validate;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * List of {@link LogRecord}s. Necessary wrapper for {@link List} used in JAXB context.
- */
-@XmlRootElement(namespace = "http://cxf.apache.org/log")
-public class LogRecords {
-
- private List<LogRecord> logRecords = new ArrayList<LogRecord>();
-
- @XmlElement(name = "logRecord", namespace = "http://cxf.apache.org/log")
- public List<LogRecord> getLogRecords() {
- return logRecords;
- }
-
- public void setLogRecords(List<LogRecord> logRecords) {
- Validate.notNull(logRecords, "logRecords is null");
- this.logRecords = logRecords;
- }
-
- @Override
- public boolean equals(Object obj) {
- return EqualsBuilder.reflectionEquals(obj, this);
- }
-
- @Override
- public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
- }
-
- @Override
- public String toString() {
- return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadOnlyFileStorage.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadOnlyFileStorage.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadOnlyFileStorage.java
deleted file mode 100644
index 79849e7..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadOnlyFileStorage.java
+++ /dev/null
@@ -1,621 +0,0 @@
-/**
- * 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;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.text.SimpleDateFormat;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.cxf.common.util.SystemPropertyAction;
-import org.apache.cxf.jaxrs.ext.search.SearchCondition;
-
-/**
- * Facilitates reading the log entries from the existing log files.
- */
-public class ReadOnlyFileStorage implements ReadableLogStorage {
-
- public static final String LEVEL_PROPERTY = "level";
- public static final String DATE_PROPERTY = "date";
- public static final String MESSAGE_PROPERTY = "message";
- public static final String CATEGORY_PROPERTY = "category";
- public static final String THREAD_PROPERTY = "thread";
-
- public static final String DATE_ONLY_FORMAT = "yyyy-MM-dd";
-
- private static final String LINE_SEP = SystemPropertyAction.getProperty("line.separator");
- private static final String DEFAULT_COLUMN_SEP = "|";
-
- private String columnSep = DEFAULT_COLUMN_SEP;
- private int numberOfColumns;
- private boolean startsFromSeparator;
- private boolean endsWithSeparator;
-
- private SimpleDateFormat recordDateFormat;
- private boolean useFileModifiedDate;
- private Pattern fileNameDatePattern;
- private String fileNameDateFormat;
-
- private File logDirectory;
- private Comparator<String> fileNameComparator;
-
- private Map<Integer, String> columnsMap;
- private List<FileInfo> logFiles = new LinkedList<FileInfo>();
- private Map<String, String> levelsMap;
- private Map<Integer, PageInfo> pagesMap = new HashMap<Integer, PageInfo>();
-
- /**
- * {@inheritDoc}
- */
- public int getSize() {
- return -1;
- }
-
- /**
- * {@inheritDoc}
- */
- // Synchronization can not be avoided at the moment as
- // the file position is continuously changed.
- // Realistically, the log files will probably be viewed
- // by the admin so it's not a problem. However the memory mapping can
- // help in making it more flexible
- public synchronized int load(List<LogRecord> list,
- SearchCondition<LogRecord> condition,
- int pageNumber,
- int pageSize) {
- FileInfo logFileInfo = getLogFileInfo(pageNumber);
- if (logFileInfo == null) {
- return pageNumber;
- }
-
- int recordCount = 0;
- int currentIndex = 0;
- while (true) {
- LogRecord record = readRecord(logFileInfo);
- if (record == null) {
- logFileInfo = getNextLogFileInfo(logFileInfo, true);
- if (logFileInfo != null) {
- continue;
- } else {
- return pageNumber;
- }
- }
- if (condition == null || condition.isMet(record)) {
- list.add(record);
- if (++recordCount == pageSize) {
- saveNextPagePosition(pageNumber + 1, logFileInfo);
- break;
- }
- }
- if (++currentIndex == pageSize) {
- pageNumber++;
- recordCount = 0;
- currentIndex = 0;
- }
- }
- return pageNumber;
- }
-
- /**
- * If no more records is available in the current file then try to get
- * the next one with an optional scanning
- **/
- private FileInfo getNextLogFileInfo(FileInfo logFileInfo, boolean firstTry) {
- for (int i = 0; i < logFiles.size(); i++) {
- FileInfo fileInfo = logFiles.get(i);
- if (fileInfo == logFileInfo) {
- if (i + 1 < logFiles.size()) {
- return setFilePosition(logFiles.get(i + 1), logFiles.get(i + 1).getStartPosition());
- } else {
- break;
- }
- }
- }
- if (firstTry && logDirectory != null && scanLogDirectory()) {
- return getNextLogFileInfo(logFileInfo, false);
- }
- return null;
- }
-
- private FileInfo setFilePosition(FileInfo fileInfo, long pos) {
- try {
- fileInfo.getFile().seek(pos);
- return fileInfo;
- } catch (IOException ex) {
- System.err.println("Problem setting a page position in " + fileInfo.getFileName());
- return null;
- }
- }
-
- /**
- * Gets the file corresponding to the current page.
- */
- private FileInfo getLogFileInfo(int pageNumber) {
- PageInfo pageInfo = pagesMap.get(pageNumber);
- if (pageInfo != null) {
- return setFilePosition(pageInfo.getFileInfo(), pageInfo.getPosition());
- }
- int oldSize = logFiles.size();
- if (logDirectory != null
- && scanLogDirectory()) {
- FileInfo fileInfo = logFiles.get(oldSize);
- saveNextPagePosition(pageNumber, fileInfo);
- return fileInfo;
- }
- return null;
- }
-
- /**
- * Save the position of the next page
- */
- private void saveNextPagePosition(int pageNumber, FileInfo fileInfo) {
- try {
- long pos = fileInfo.getFile().getFilePointer();
- if (pos < fileInfo.getFile().length()) {
- pagesMap.put(pageNumber, new PageInfo(fileInfo, pos));
- } else {
- FileInfo nextFileInfo = getNextLogFileInfo(fileInfo, false);
- if (nextFileInfo != null) {
- pagesMap.put(pageNumber,
- new PageInfo(nextFileInfo, nextFileInfo.getFile().getFilePointer()));
- }
- }
- } catch (IOException ex) {
- // ignore
- }
-
- }
-
- protected LogRecord readRecord(FileInfo logFileInfo) {
- try {
- Map<Integer, String> map = new HashMap<Integer, String>(numberOfColumns);
- readTheLine(logFileInfo.getFile(), map, 1);
- return createRecord(map, logFileInfo);
- } catch (IOException ex) {
- throw new RuntimeException(ex);
- }
-
- }
-
- protected LogRecord createRecord(Map<Integer, String> map, FileInfo logFileInfo) {
- if (map.isEmpty()) {
- return null;
- }
- LogRecord record = new LogRecord();
- for (Map.Entry<Integer, String> entry : map.entrySet()) {
- String propertyName = columnsMap.get(entry.getKey());
- if (LEVEL_PROPERTY.equals(propertyName)) {
- setLogRecordLevel(record, entry.getValue());
- } else if (DATE_PROPERTY.equals(propertyName)) {
- setLogRecordDate(record, entry.getValue(), logFileInfo);
- } else if (MESSAGE_PROPERTY.equals(propertyName)) {
- record.setMessage(entry.getValue());
- } else if (CATEGORY_PROPERTY.equals(propertyName)) {
- record.setLoggerName(entry.getValue());
- } else if (THREAD_PROPERTY.equals(propertyName)) {
- record.setThreadName(entry.getValue());
- }
- }
- return record;
- }
-
- protected void setLogRecordLevel(LogRecord record, String logLevel) {
- if (levelsMap != null) {
- logLevel = levelsMap.get(logLevel);
- }
- if (logLevel != null) {
- record.setLevel(LogLevel.valueOf(logLevel));
- }
- }
-
- protected void setLogRecordDate(LogRecord record, String logDate, FileInfo logFileInfo) {
- if (recordDateFormat != null) {
- try {
- String fileModifiedDate = logFileInfo.getFileModified();
- logDate = fileModifiedDate != null ? fileModifiedDate + " " + logDate : logDate;
- Date date = recordDateFormat.parse(logDate);
- record.setDate(date);
- } catch (Exception ex) {
- // ignore
- }
- }
- }
-
- protected void readTheLine(RandomAccessFile logFile, Map<Integer, String> map, int columnIndex)
- throws IOException {
-
- long nextPos = logFile.getFilePointer();
- if (nextPos >= logFile.length()) {
- return;
- }
-
- String line = logFile.readLine();
-
- int lastIndex = 0;
- if (columnIndex == 1 && startsFromSeparator) {
- lastIndex = 1;
- }
-
- Set<Integer> requestedColumns = columnsMap.keySet();
- int startingColumn = columnIndex;
- while (lastIndex < line.length()) {
-
- int sepIndex = line.indexOf(columnSep, lastIndex);
-
- if (sepIndex != -1 && startingColumn == numberOfColumns && !endsWithSeparator) {
- logFile.seek(nextPos);
- return;
- }
-
- int actualIndex = sepIndex == -1 ? line.length() : sepIndex;
-
- if (requestedColumns.contains(columnIndex)) {
- String value = line.substring(lastIndex, actualIndex).trim();
- String existingValue = map.get(columnIndex);
- map.put(columnIndex, existingValue == null
- ? value : existingValue + LINE_SEP + value);
- }
-
- lastIndex = actualIndex + 1;
- if (sepIndex != -1 && columnIndex != numberOfColumns) {
- columnIndex++;
- }
- }
-
- if (columnIndex == numberOfColumns) {
- readTheLine(logFile, map, columnIndex);
- }
- }
-
- /**
- * Log column separator such as '|'
- * @param columnSep the separator
- */
- public void setColumnSep(String columnSep) {
- this.columnSep = columnSep;
- }
-
- /**
- * Sets the number of columns per record
- * @param number the number of columns per record
- */
- public void setNumberOfColumns(String number) {
- this.numberOfColumns = Integer.parseInt(number);
- }
-
- /**
- * Identifies the columns which this reader should use
- * when creating a LogRecord. Example, given a 7-columns
- * record a user may only need the information from 1, 2,
- * and the last column. Regular expressions are not suitable.
- *
- * @param columnsMap the map, the key is the column number (starting from 1)
- * and the value is the name of the property such as 'message'.
- * The following properties are supported at the moment:
- * 'date', 'level' 'category', 'thread', 'message'.
- */
- public void setColumnsMap(Map<Integer, String> columnsMap) {
- this.columnsMap = columnsMap;
- }
-
- /**
- * A list of log files, the oldest files are expected to be in the top
- * of the list
- * @param locations the locations
- */
- public void setLogLocations(List<String> locations) {
- logFiles = new LinkedList<FileInfo>();
- for (int i = 0; i < locations.size(); i++) {
- String realPath = getRealLocation(locations.get(i));
-
- try {
- processNewLogFile(new File(realPath));
- } catch (IOException ex) {
- throw new RuntimeException("The log file " + realPath + " can not be opened: "
- + ex.getMessage());
- }
- }
- }
-
-
- /**
- * It may make sense to map logFile.getChannel() to memory for large files
- * >= 1MB
- */
- private void processNewLogFile(File file) throws IOException {
- RandomAccessFile logFile = new RandomAccessFile(file, "r");
-
- String fileModifiedDate = null;
- if (useFileModifiedDate) {
- if (fileNameDatePattern != null) {
- fileModifiedDate = getDateFromFileName(file.getName());
- }
- if (fileModifiedDate == null) {
- Date fileDate = new Date(file.lastModified());
- fileModifiedDate = getLogDateFormat().format(fileDate);
- }
- }
- skipIgnorableRecords(logFile);
- FileInfo fileInfo = new FileInfo(logFile,
- file.getName(),
- fileModifiedDate,
- logFile.getFilePointer());
- if (logFiles.size() == 0) {
- pagesMap.put(1, new PageInfo(fileInfo, fileInfo.getStartPosition()));
- }
- logFiles.add(fileInfo);
- }
-
- private String getDateFromFileName(String name) {
- Matcher m = fileNameDatePattern.matcher(name);
- if (m.matches() && m.groupCount() > 0) {
- return m.group(1);
- } else {
- return null;
- }
- }
-
- private SimpleDateFormat getLogDateFormat() {
- String format = fileNameDateFormat == null ? DATE_ONLY_FORMAT : fileNameDateFormat;
- return new SimpleDateFormat(format);
- }
-
- private String getRealLocation(String location) {
- int indexOpen = location.indexOf("{");
- int indexClose = location.indexOf("}");
- String realPath = null;
- if (indexOpen == 0 && indexClose != -1) {
- String property = location.substring(1, indexClose);
- String resolvedPath = SystemPropertyAction.getProperty(property);
- if (resolvedPath == null) {
- throw new IllegalArgumentException("System property " + property + " can not be resolved");
- }
- realPath = resolvedPath + location.substring(indexClose + 1);
-
- } else {
- realPath = location;
- }
- return realPath;
- }
-
- /**
- * Sets the log location.
- * @param location the location, if it is a directory then
- * the on-demand scanning will be enabled
- */
- public void setLogLocation(String location) {
- String realPath = getRealLocation(location);
- File file = new File(realPath);
- if (file.isDirectory()) {
- logDirectory = file;
- } else {
- setLogLocations(Collections.singletonList(realPath));
- }
- }
-
- /**
- * Skip the records at the top of the file which have no column separators
- */
- private void skipIgnorableRecords(RandomAccessFile file) throws IOException {
- long nextPos = file.getFilePointer();
- if (nextPos == file.length()) {
- return;
- }
- String line = file.readLine();
- if (line.contains(columnSep)) {
- file.seek(nextPos);
- } else {
- skipIgnorableRecords(file);
- }
-
- }
- //CHECKSTYLE:OFF
- /**
- * The format for parsing the log date
- * <p>
- * Please see <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/text/SimpleDateFormat.html">SimpleDateFormat</a>
- * </p>
- */
- //CHECKSTYLE:ON
- public void setRecordDateFormat(String format) {
- recordDateFormat = new SimpleDateFormat(format);
- }
-
- /**
- * Optional map for converting the levels.
- * This map is not required if the log records have levels
- * with one of the following values:
- * 'WARN', 'ERROR', 'DEBUG', 'TRACE', 'INFO', 'FATAL'.
- * @param map the map of levels
- */
- public void setLevelsMap(Map<String, String> map) {
- this.levelsMap = map;
- }
-
- /**
- * Optional comparator which can be used for sorting the
- * new log files found after the latest scan iteration.
- *
- * If scanning is enabled then by default the file names are compared
- * using either the embedded date (provided the fileNameDatePattern is set)
- * or the last segment in the file name which is expected to be a number.
- * The files with the oldest dates or bigger indexes will be positioned first.
- *
- * @param comp the comparator
- */
- public void setFileNameComparator(Comparator<String> comp) {
- this.fileNameComparator = comp;
- }
-
- public void close() {
- for (FileInfo fileInfo : logFiles) {
- try {
- fileInfo.getFile().close();
- } catch (IOException ex) {
- // ignore
- }
- }
- }
-
- /**
- * Indicates if the file modified date needs to be used for
- * creating a LogRecord date - in case the actual log record
- * contains no year/month/hour information.
- */
- public void setUseFileModifiedDate(boolean useFileModifiedDate) {
- this.useFileModifiedDate = useFileModifiedDate;
- }
-
- private boolean scanLogDirectory() {
- int oldSize = logFiles.size();
- for (File file : logDirectory.listFiles()) {
- if (file.isDirectory() || file.isHidden()
- || fileNameDatePattern != null
- && getDateFromFileName(file.getName()) == null) {
- continue;
- }
-
- boolean isNew = true;
- for (FileInfo fInfo : logFiles) {
- if (fInfo.getFileName().equalsIgnoreCase(file.getName())) {
- isNew = false;
- break;
- }
- }
- if (isNew) {
- try {
- processNewLogFile(file);
- } catch (IOException ex) {
- System.out.println("Log file " + file.getName() + " can not be opened");
- }
- }
- }
- if (logFiles.size() > oldSize) {
- Collections.sort(logFiles, new FileInfoComparator());
- return true;
- } else {
- return false;
- }
- }
-
- /**
- * Sets the regular expression for capturing the date from the file name
- * If set then it must contain a single capturing group only.
- * @param fileNameDatePattern
- */
- public void setFileNameDatePattern(String fileNameDatePattern) {
- this.fileNameDatePattern = Pattern.compile(fileNameDatePattern);
- }
-
- /**
- * Optional pattern for parsing the file date
- * @param fileNameDateFormat
- */
- public void setFileNameDateFormat(String fileNameDateFormat) {
- this.fileNameDateFormat = fileNameDateFormat;
- }
-
- protected static class PageInfo {
- private FileInfo fileInfo;
- private long pos;
- public PageInfo(FileInfo fileInfo, long pos) {
- this.fileInfo = fileInfo;
- this.pos = pos;
- }
-
- public FileInfo getFileInfo() {
- return fileInfo;
- }
- public long getPosition() {
- return pos;
- }
- }
-
- protected static class FileInfo {
- private RandomAccessFile file;
- private String fileModified;
- private String fileName;
- private long startPosition;
-
- public FileInfo(RandomAccessFile file, String fileName, String fileModified, long startPos) {
- this.file = file;
- this.fileModified = fileModified;
- this.fileName = fileName;
- this.startPosition = startPos;
- }
-
- public RandomAccessFile getFile() {
- return file;
- }
- public String getFileModified() {
- return fileModified;
- }
- public String getFileName() {
- return fileName;
- }
- public long getStartPosition() {
- return startPosition;
- }
- }
-
- protected class FileInfoComparator implements Comparator<FileInfo> {
-
- public int compare(FileInfo info1, FileInfo info2) {
-
- if (useFileModifiedDate && fileNameDatePattern != null) {
- SimpleDateFormat dateFormat = getLogDateFormat();
- try {
- Date date1 = dateFormat.parse(info1.getFileModified());
- Date date2 = dateFormat.parse(info2.getFileModified());
- return date1.compareTo(date2);
- } catch (Exception ex) {
- // continue
- }
- }
-
- String name1 = info1.getFileName();
- String name2 = info2.getFileName();
- if (fileNameComparator != null) {
- return fileNameComparator.compare(name1, name2);
- }
- Integer logIndex1 = getLogIndex(name1);
- Integer logIndex2 = getLogIndex(name2);
- return logIndex1.compareTo(logIndex2) * -1;
- }
-
- private int getLogIndex(String name) {
- int index = name.lastIndexOf('.');
- try {
- return Integer.parseInt(name.substring(index + 1));
- } catch (Exception ex) {
- return 0;
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadWriteLogStorage.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadWriteLogStorage.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadWriteLogStorage.java
deleted file mode 100644
index 81eb9ff..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadWriteLogStorage.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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;
-
-import java.util.List;
-
-/**
- * Can be used by pull-style loggers to offload/save the records to some external storage
- *
- */
-public interface ReadWriteLogStorage extends ReadableLogStorage {
-
- /**
- * Save the records
- * @param records log records to save
- */
- void save(List<LogRecord> records);
-
- /**
- * Clear the storage
- */
- void clear();
-
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadableLogStorage.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadableLogStorage.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadableLogStorage.java
deleted file mode 100644
index 5a7e87b..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/ReadableLogStorage.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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;
-
-import java.util.List;
-
-import org.apache.cxf.jaxrs.ext.search.SearchCondition;
-
-/**
- * Can be used by pull-style loggers to read the records from some external storage
- *
- */
-public interface ReadableLogStorage {
-
-
- /**
- * Read the records and load them into a provided list
- * @param list the list saved records should be added to
- * @param condition the condition loaded records must meet, can be null
- * @param pageNumber the initial page to have records loaded from
- * @param int pageSize the max number of records to load from the storage
- *
- * @return the current page number; it may be different from the starting page if
- * certain records within the given page range did not match the search condition.
- */
- int load(List<LogRecord> list,
- SearchCondition<LogRecord> condition,
- int pageNumber,
- int pageSize);
-
-
- /**
- * Get the size of storage (in records)
- * @return the size, -1 if not known, for ex, when reading from an open file containing log entries
- */
- int getSize();
-
-
- /**
- * Close the storage
- */
- void close();
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AbstractAtomBean.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AbstractAtomBean.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AbstractAtomBean.java
deleted file mode 100644
index 589a156..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AbstractAtomBean.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * 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.atom;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.util.logging.Handler;
-import java.util.logging.Logger;
-
-import org.apache.commons.lang3.Validate;
-import org.apache.cxf.Bus;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.management.web.logging.LogLevel;
-
-
-public abstract class AbstractAtomBean {
-
- private List<LoggerLevel> loggers = new ArrayList<LoggerLevel>();
- private boolean initialized;
- private Bus bus;
-
- /**
- * Creates unconfigured and uninitialized bean. To configure setters must be used, then {@link #init()}
- * must be called.
- */
- public AbstractAtomBean() {
- initSingleLogger();
- }
-
- private void initSingleLogger() {
- loggers = new ArrayList<LoggerLevel>();
- loggers.add(new LoggerLevel("", "INFO"));
- }
-
- public void setBus(Bus bus) {
- this.bus = bus;
- }
-
- public Bus getBus() {
- return bus;
- }
-
- /**
- * Set one or more loggers and levels descriptor. <br>
- * Parsed input syntax is:
- *
- * <pre>
- * loggers := <logger>(<separator><logger>)*
- * logger := <name>[":"<level>]
- * separator := "," | " " | "\n"
- * </pre>
- *
- * Examples:
- * <p>
- * Two loggers and two levels: <br>
- * <tt>org.apache.cxf:INFO, org.apache.cxf.jaxrs:DEBUG</tt>
- * <p>
- * Three loggers, first with default "INFO" level: <br>
- * <tt>org.apache.cxf, org.apache.cxf.jaxrs:DEBUG, namedLogger:ERROR</tt><br>
- * <p>
- * One logger with default "INFO" level: <br>
- * <tt>org.apache.cxf</tt><br>
- */
- public void setLoggers(String loggers) {
- checkInit();
- Validate.notNull(loggers, "loggers is null");
- parseLoggers(loggers);
- }
-
- /**
- * Name of logger to associate with ATOM push handler; empty string for root logger.
- */
- public void setLogger(String logger) {
- checkInit();
- Validate.notNull(logger, "logger is null");
- if (loggers.size() != 1) {
- initSingleLogger();
- }
- loggers.get(0).setLogger(logger);
- }
-
- /**
- * Name of level that logger will use publishing log events to ATOM push handler; empty string for default
- * "INFO" level.
- */
- public void setLevel(String level) {
- checkInit();
- Validate.notNull(level, "level is null");
- if (loggers.size() != 1) {
- initSingleLogger();
- }
- loggers.get(0).setLevel(level);
- }
-
-
- /**
- * Initializes bean; creates ATOM handler based on current properties state, and attaches handler to
- * logger(s).
- */
- public void init() {
- checkInit();
- initialized = true;
- Handler h = createHandler();
- for (int i = 0; i < loggers.size(); i++) {
- Logger l = LogUtils.getL7dLogger(AbstractAtomBean.class, null, loggers.get(i).getLogger());
- l.addHandler(h);
- l.setLevel(LogLevel.toJUL(LogLevel.valueOf(loggers.get(i).getLevel())));
- }
- }
-
- protected abstract Handler createHandler();
-
- protected void checkInit() {
- if (initialized) {
- throw new IllegalStateException("Bean is already initialized");
- }
- }
-
- private void parseLoggers(String param) {
- loggers = new ArrayList<LoggerLevel>();
- StringTokenizer st1 = new StringTokenizer(param, ", \t\n\r\f");
- while (st1.hasMoreTokens()) {
- String tok = st1.nextToken();
- int idx = tok.indexOf(":");
- if (idx != -1) {
- loggers.add(new LoggerLevel(tok.substring(0, idx), tok.substring(idx + 1, tok.length())));
- } else {
- loggers.add(new LoggerLevel(tok, "INFO"));
- }
- }
- }
-
- protected List<LoggerLevel> getLoggers() {
- return loggers;
- }
-
- protected static class LoggerLevel {
- private String logger;
- private String level;
-
- public LoggerLevel(String logger, String level) {
- this.logger = logger;
- this.level = level;
- }
-
- public String getLogger() {
- return logger;
- }
-
- public void setLogger(String logger) {
- this.logger = logger;
- }
-
- public String getLevel() {
- return level;
- }
-
- public void setLevel(String level) {
- this.level = level;
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/7f4a24d0/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullHandler.java
----------------------------------------------------------------------
diff --git a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullHandler.java b/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullHandler.java
deleted file mode 100644
index ff2215d..0000000
--- a/rt/management-web/src/main/java/org/apache/cxf/management/web/logging/atom/AtomPullHandler.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.atom;
-
-import java.util.logging.Handler;
-
-import org.apache.cxf.management.web.logging.LogRecord;
-
-
-public final class AtomPullHandler extends Handler {
-
- private AtomPullServer engine;
- /**
- * Creates handler using (package private).
- *
- * @param engine configured engine.
- */
- AtomPullHandler(AtomPullServer engine) {
- this.engine = engine;
- }
-
- @Override
- public void publish(java.util.logging.LogRecord record) {
- if (LoggingThread.isSilent()) {
- return;
- }
- LoggingThread.markSilent(true);
- try {
- LogRecord rec = LogRecord.fromJUL(record);
- engine.publish(rec);
- } finally {
- LoggingThread.markSilent(false);
- }
- }
-
- @Override
- public synchronized void close() throws SecurityException {
- engine.close();
- }
-
- @Override
- public synchronized void flush() {
- // no-op
- }
-}