diff --git a/cave/com.raytheon.uf.viz.common.core.feature/feature.xml b/cave/com.raytheon.uf.viz.common.core.feature/feature.xml index 7791a0ca03..07d4a28f0b 100644 --- a/cave/com.raytheon.uf.viz.common.core.feature/feature.xml +++ b/cave/com.raytheon.uf.viz.common.core.feature/feature.xml @@ -63,13 +63,6 @@ version="0.0.0" unpack="false"/> - - + version="0.0.0"/> + + + version="0.0.0"/> + version="0.0.0"/> - - + diff --git a/cave/com.raytheon.uf.viz.cots.feature/feature.xml b/cave/com.raytheon.uf.viz.cots.feature/feature.xml index 5117e262e7..120f9ad9b5 100644 --- a/cave/com.raytheon.uf.viz.cots.feature/feature.xml +++ b/cave/com.raytheon.uf.viz.cots.feature/feature.xml @@ -309,12 +309,6 @@ install-size="0" version="0.0.0"/> - - + + diff --git a/cave/com.raytheon.uf.viz.datastorage.remote/.settings/org.eclipse.jdt.core.prefs b/cave/com.raytheon.uf.viz.datastorage.remote/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index abdea984c3..0000000000 --- a/cave/com.raytheon.uf.viz.datastorage.remote/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -#Mon Aug 03 13:10:34 CDT 2009 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/cave/com.raytheon.uf.viz.datastorage.remote/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.datastorage.remote/META-INF/MANIFEST.MF deleted file mode 100644 index c64c52b630..0000000000 --- a/cave/com.raytheon.uf.viz.datastorage.remote/META-INF/MANIFEST.MF +++ /dev/null @@ -1,12 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Thrift Plug-in -Bundle-SymbolicName: com.raytheon.uf.viz.datastorage.remote -Bundle-Version: 1.12.1174.qualifier -Bundle-Vendor: RAYTHEON -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Require-Bundle: com.raytheon.uf.common.datastorage;bundle-version="1.11.12", - com.raytheon.uf.common.datastorage.remote;bundle-version="1.0.0", - com.raytheon.uf.common.serialization.comm;bundle-version="1.0.0", - com.raytheon.uf.viz.core;bundle-version="1.11.12" -Export-Package: com.raytheon.uf.viz.datastorage.remote diff --git a/cave/com.raytheon.uf.viz.datastorage.remote/com.raytheon.uf.viz.datastorage.remote.ecl b/cave/com.raytheon.uf.viz.datastorage.remote/com.raytheon.uf.viz.datastorage.remote.ecl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/cave/com.raytheon.uf.viz.datastorage.remote/src/com/raytheon/uf/viz/datastorage/remote/RemoteDataStore.java b/cave/com.raytheon.uf.viz.datastorage.remote/src/com/raytheon/uf/viz/datastorage/remote/RemoteDataStore.java deleted file mode 100644 index 0936f0d3db..0000000000 --- a/cave/com.raytheon.uf.viz.datastorage.remote/src/com/raytheon/uf/viz/datastorage/remote/RemoteDataStore.java +++ /dev/null @@ -1,259 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.viz.datastorage.remote; - -import java.io.File; -import java.io.FileNotFoundException; -import java.util.Map; - -import com.raytheon.uf.common.datastorage.IDataStore; -import com.raytheon.uf.common.datastorage.Request; -import com.raytheon.uf.common.datastorage.StorageException; -import com.raytheon.uf.common.datastorage.StorageProperties; -import com.raytheon.uf.common.datastorage.StorageProperties.Compression; -import com.raytheon.uf.common.datastorage.StorageStatus; -import com.raytheon.uf.common.datastorage.records.IDataRecord; -import com.raytheon.uf.common.datastorage.remote.requests.ThriftDataRequest; -import com.raytheon.uf.common.datastorage.remote.requests.ThriftDataResponse; -import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.uf.viz.core.requests.ThriftClient; - -/** - * Creates RetrieveDataRequests and sends them to the edex server. - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Aug 3, 2009            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class RemoteDataStore implements IDataStore { - - private File file; - - private boolean useLocking; - - public RemoteDataStore(File file, boolean useLocking) { - this.file = file; - this.useLocking = useLocking; - } - - @Override - public String[] getDatasets(String group) throws StorageException, - FileNotFoundException { - ThriftDataRequest request = new ThriftDataRequest(); - request.setFile(file.getAbsolutePath()); - request.setUseLocking(useLocking); - request.setMethod("getDatasets"); - request.setParameterTypes(new String[] { String.class.getName() }); - request.setParameters(new Object[] { group }); - try { - ThriftDataResponse response = (ThriftDataResponse) ThriftClient - .sendRequest(request); - if (response.getDatasets() == null) { - throw new VizException("response object was null"); - } - return response.getDatasets(); - } catch (VizException e) { - throw new StorageException("unable to retrieve data over http", - null, e); - } - } - - @Override - public IDataRecord[] retrieve(String group) throws StorageException, - FileNotFoundException { - ThriftDataRequest request = new ThriftDataRequest(); - request.setFile(file.getAbsolutePath()); - request.setUseLocking(useLocking); - request.setMethod("retrieve"); - request.setParameterTypes(new String[] { String.class.getName() }); - request.setParameters(new Object[] { group }); - try { - ThriftDataResponse response = (ThriftDataResponse) ThriftClient - .sendRequest(request); - if (response.getRecords() == null) { - throw new VizException("response object was null"); - } - return response.getRecords(); - } catch (VizException e) { - throw new StorageException("unable to retrieve data over http", - null, e); - } - } - - @Override - public IDataRecord[] retrieve(String group, boolean includeInterpolated) - throws StorageException, FileNotFoundException { - ThriftDataRequest request = new ThriftDataRequest(); - request.setFile(file.getAbsolutePath()); - request.setUseLocking(useLocking); - request.setMethod("retrieve"); - request.setParameterTypes(new String[] { String.class.getName(), - boolean.class.getName() }); - request.setParameters(new Object[] { group, includeInterpolated }); - try { - ThriftDataResponse response = (ThriftDataResponse) ThriftClient - .sendRequest(request); - if (response.getRecords() == null) { - throw new VizException("response object was null"); - } - return response.getRecords(); - } catch (VizException e) { - throw new StorageException("unable to retrieve data over http", - null, e); - } - } - - @Override - public IDataRecord retrieve(String group, String dataset, Request request) - throws StorageException, FileNotFoundException { - ThriftDataRequest req = new ThriftDataRequest(); - req.setFile(file.getAbsolutePath()); - req.setUseLocking(useLocking); - req.setMethod("retrieve"); - req.setParameterTypes(new String[] { String.class.getName(), - String.class.getName(), Request.class.getName() }); - req.setParameters(new Object[] { group, dataset, request }); - try { - ThriftDataResponse response = (ThriftDataResponse) ThriftClient - .sendRequest(req); - if (response.getRecord() == null) { - throw new VizException("response object was null"); - } - return response.getRecord(); - } catch (VizException e) { - throw new StorageException("unable to retrieve data over http", - null, e); - } - } - - @Override - public IDataRecord[] retrieveDatasets(String[] datasetGroupPath, - Request request) throws StorageException, FileNotFoundException { - ThriftDataRequest req = new ThriftDataRequest(); - req.setFile(file.getAbsolutePath()); - req.setUseLocking(useLocking); - req.setMethod("retrieveDatasets"); - req.setParameterTypes(new String[] { String[].class.getName(), - Request.class.getName() }); - req.setParameters(new Object[] { datasetGroupPath, request }); - try { - ThriftDataResponse response = (ThriftDataResponse) ThriftClient - .sendRequest(req); - if (response.getRecords() == null) { - throw new VizException("response object was null"); - } - return response.getRecords(); - } catch (VizException e) { - throw new StorageException("unable to retrieve data over http", - null, e); - } - } - - @Override - public IDataRecord[] retrieveGroups(String[] groups, Request request) - throws StorageException, FileNotFoundException { - ThriftDataRequest req = new ThriftDataRequest(); - req.setFile(file.getAbsolutePath()); - req.setUseLocking(useLocking); - req.setMethod("retrieveGroups"); - req.setParameterTypes(new String[] { String[].class.getName(), - Request.class.getName() }); - req.setParameters(new Object[] { groups, request }); - try { - ThriftDataResponse response = (ThriftDataResponse) ThriftClient - .sendRequest(req); - if (response.getRecords() == null) { - throw new VizException("response object was null"); - } - return response.getRecords(); - } catch (VizException e) { - throw new StorageException("unable to retrieve data over http", - null, e); - } - } - - @Override - public void addDataRecord(IDataRecord dataset, StorageProperties properties) - throws StorageException { - throw new StorageException("Operation not supported", dataset); - } - - @Override - public void addDataRecord(IDataRecord dataset) throws StorageException { - throw new StorageException("Operation not supported", dataset); - } - - @Override - public void delete(String... location) throws StorageException, - FileNotFoundException { - throw new StorageException("Operation not supported", null); - } - - @Override - public StorageStatus store() throws StorageException { - throw new StorageException("Operation not supported", null); - } - - @Override - public StorageStatus store(StoreOp storeOp) throws StorageException { - throw new StorageException("Operation not supported", null); - } - - @Override - public void createLinks(Map links) - throws StorageException, FileNotFoundException { - throw new StorageException("Operation not supported", null); - - } - - @Override - public void deleteFiles(String[] datesToDelete) throws StorageException, - FileNotFoundException { - throw new StorageException("Operation not supported", null); - } - - @Override - public void createDataset(IDataRecord rec) throws StorageException, - FileNotFoundException { - throw new StorageException("Operation not supported", null); - } - - @Override - public void repack(Compression compression) throws StorageException { - throw new StorageException("Operation not supported", null); - } - - @Override - public void copy(String outputDir, Compression compression, - String timestampCheck, int minMillisSinceLastChange, - int maxMillisSinceLastChange) throws StorageException { - throw new StorageException("Operation not supported", null); - } - -} diff --git a/cave/com.raytheon.uf.viz.feature.alertviz/feature.xml b/cave/com.raytheon.uf.viz.feature.alertviz/feature.xml index 93718150be..0c9d401a24 100644 --- a/cave/com.raytheon.uf.viz.feature.alertviz/feature.xml +++ b/cave/com.raytheon.uf.viz.feature.alertviz/feature.xml @@ -199,8 +199,7 @@ id="com.raytheon.uf.common.time" download-size="0" install-size="0" - version="0.0.0" - unpack="false"/> + version="0.0.0"/> + version="0.0.0"/> - - - + diff --git a/cave/com.raytheon.uf.viz.spring.dm/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.spring.dm/META-INF/MANIFEST.MF index a212dcc512..e16b79390b 100644 --- a/cave/com.raytheon.uf.viz.spring.dm/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.spring.dm/META-INF/MANIFEST.MF @@ -7,7 +7,6 @@ Bundle-Activator: com.raytheon.uf.viz.spring.dm.Activator Bundle-Vendor: RAYTHEON Require-Bundle: org.eclipse.core.runtime, org.springframework;bundle-version="2.5.6", - org.apache.commons.logging;bundle-version="1.1.1", - org.springframework.dm;bundle-version="1.2.1" + org.apache.commons.logging;bundle-version="1.1.1" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-ActivationPolicy: lazy diff --git a/cave/com.raytheon.uf.viz.spring.dm/META-INF/p2.inf b/cave/com.raytheon.uf.viz.spring.dm/META-INF/p2.inf index 307c9954de..f5c5e0fd6f 100644 --- a/cave/com.raytheon.uf.viz.spring.dm/META-INF/p2.inf +++ b/cave/com.raytheon.uf.viz.spring.dm/META-INF/p2.inf @@ -1,3 +1,3 @@ instructions.configure = \ - setStartLevel(startLevel:5);\ + setStartLevel(startLevel:0);\ markStarted(started: true); \ No newline at end of file diff --git a/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/Activator.java b/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/Activator.java index 4469c34590..0c120fc982 100644 --- a/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/Activator.java +++ b/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/Activator.java @@ -1,48 +1,21 @@ package com.raytheon.uf.viz.spring.dm; +import java.io.IOException; +import java.net.URL; import java.util.ArrayList; -import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Timer; +import java.util.Set; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.IPath; import org.osgi.framework.Bundle; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; -import org.osgi.framework.BundleEvent; -import org.osgi.framework.ServiceReference; -import org.osgi.framework.SynchronousBundleListener; -import org.osgi.framework.Version; -import org.springframework.beans.factory.DisposableBean; -import org.springframework.beans.factory.config.BeanFactoryPostProcessor; -import org.springframework.core.CollectionFactory; -import org.springframework.core.task.SyncTaskExecutor; -import org.springframework.core.task.TaskExecutor; -import org.springframework.osgi.context.ConfigurableOsgiBundleApplicationContext; -import org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext; -import org.springframework.osgi.context.event.OsgiBundleApplicationContextEventMulticaster; -import org.springframework.osgi.context.event.OsgiBundleApplicationContextListener; -import org.springframework.osgi.extender.OsgiApplicationContextCreator; -import org.springframework.osgi.extender.internal.activator.ContextLoaderListener; -import org.springframework.osgi.extender.internal.dependencies.shutdown.BundleDependencyComparator; -import org.springframework.osgi.extender.internal.dependencies.shutdown.ComparatorServiceDependencySorter; -import org.springframework.osgi.extender.internal.dependencies.shutdown.ServiceDependencySorter; -import org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor; -import org.springframework.osgi.extender.internal.support.NamespaceManager; -import org.springframework.osgi.extender.internal.support.OsgiBeanFactoryPostProcessorAdapter; -import org.springframework.osgi.extender.internal.util.concurrent.Counter; -import org.springframework.osgi.extender.internal.util.concurrent.RunnableTimedExecution; -import org.springframework.osgi.extender.support.ApplicationContextConfiguration; -import org.springframework.osgi.extender.support.internal.ConfigUtils; -import org.springframework.osgi.service.importer.support.Cardinality; -import org.springframework.osgi.service.importer.support.CollectionType; -import org.springframework.osgi.service.importer.support.OsgiServiceCollectionProxyFactoryBean; -import org.springframework.osgi.util.OsgiBundleUtils; -import org.springframework.osgi.util.OsgiStringUtils; +import org.osgi.framework.Constants; /** * @@ -65,749 +38,133 @@ import org.springframework.osgi.util.OsgiStringUtils; */ public class Activator implements BundleActivator { - /** - * Common base class for {@link ContextLoaderListener} listeners. - * - * @author Costin Leau - */ - private abstract class BaseListener implements SynchronousBundleListener { + // The plug-in ID + public static final String PLUGIN_ID = "com.raytheon.uf.viz.spring.dm"; - /** - * A bundle has been started, stopped, resolved, or unresolved. This - * method is a synchronous callback, do not do any long-running work in - * this thread. - * - * @see org.osgi.framework.SynchronousBundleListener#bundleChanged - */ - public void bundleChanged(BundleEvent event) { + private static final String SPRING_PATH = "res" + IPath.SEPARATOR + + "spring"; - boolean trace = log.isTraceEnabled(); + private static final String SPRING_FILE_EXT = "*.xml"; - // check if the listener is still alive - synchronized (monitor) { - if (isClosed) { - if (trace) - log.trace("Listener is closed; events are being ignored"); - return; - } - } - if (trace) { - log.debug("Processing bundle event [" - + OsgiStringUtils.nullSafeToString(event) - + "] for bundle [" - + OsgiStringUtils.nullSafeSymbolicName(event - .getBundle()) + "]"); - } - try { - handleEvent(event); - } catch (Exception ex) { - /* log exceptions before swallowing */ - log.warn("Got exception while handling event " + event, ex); - } - } - - protected abstract void handleEvent(BundleEvent event); - } + // The shared instance + private static Activator plugin; /** - * Bundle listener used for detecting namespace handler/resolvers. Exists as - * a separate listener so that it can be registered early to avoid race - * conditions with bundles in INSTALLING state but still to avoid premature - * context creation before the Spring {@link ContextLoaderListener} is not - * fully initialized. - * - * @author Costin Leau + * The constructor */ - private class NamespaceBundleLister extends BaseListener { - - protected void handleEvent(BundleEvent event) { - - Bundle bundle = event.getBundle(); - - switch (event.getType()) { - case BundleEvent.STARTED: { - maybeAddNamespaceHandlerFor(bundle); - break; - } - case BundleEvent.STOPPED: { - maybeRemoveNameSpaceHandlerFor(bundle); - break; - } - default: - break; - } - } - } - - /** - * Bundle listener used for context creation/destruction. - */ - private class ContextBundleListener extends BaseListener { - - protected void handleEvent(BundleEvent event) { - - Bundle bundle = event.getBundle(); - - // ignore current bundle for context creation - if (bundle.getBundleId() == bundleId) { - return; - } - - switch (event.getType()) { - case BundleEvent.STARTED: { - maybeCreateApplicationContextFor(bundle); - break; - } - case BundleEvent.STOPPING: { - if (OsgiBundleUtils.isSystemBundle(bundle)) { - if (log.isDebugEnabled()) { - log.debug("System bundle stopping"); - } - // System bundle is shutting down; Special handling for - // framework shutdown - shutdown(); - } else { - maybeCloseApplicationContextFor(bundle); - } - break; - } - default: - break; - } - } - } - - private static final Log log = LogFactory - .getLog(ContextLoaderListener.class); - - // "Spring Application Context Creation Timer" - private Timer timer = new Timer(true); - - /** extender bundle id */ - private long bundleId; - - /** extender configuration */ - private ExtenderConfiguration extenderConfiguration; - - /** - * The contexts we are currently managing. Keys are bundle ids, values are - * ServiceDependentOsgiApplicationContexts for the application context - */ - private final Map managedContexts; - - /** Task executor used for bootstraping the Spring contexts in async mode */ - private TaskExecutor taskExecutor; - - /** ApplicationContext Creator */ - private OsgiApplicationContextCreator contextCreator; - - /** BFPP list */ - private List postProcessors; - - /** - * Task executor which uses the same thread for running tasks. Used when - * doing a synchronous wait-for-dependencies. - */ - private TaskExecutor sameThreadTaskExecutor = new SyncTaskExecutor(); - - /** listener counter - used to properly synchronize shutdown */ - private Counter contextsStarted = new Counter("contextsStarted"); - - /** Spring namespace/resolver manager */ - private NamespaceManager nsManager; - - /** The bundle's context */ - private BundleContext bundleContext; - - /** Bundle listener interested in context creation */ - private SynchronousBundleListener contextListener; - - /** Bundle listener interested in namespace resolvers/parsers discovery */ - private SynchronousBundleListener nsListener; - - /** Service-based dependency sorter for shutdown */ - private ServiceDependencySorter shutdownDependencySorter = new ComparatorServiceDependencySorter(); - - /** - * Monitor used for dealing with the bundle activator and synchronous bundle - * threads - */ - private transient final Object monitor = new Object(); - - /** - * flag indicating whether the context is down or not - useful during - * shutdown - */ - private boolean isClosed = false; - - /** This extender version */ - private Version extenderVersion; - - private OsgiBundleApplicationContextEventMulticaster multicaster; - - /** listeners interested in monitoring managed OSGi appCtxs */ - private List applicationListeners; - - /** dynamicList clean up hook */ - private DisposableBean applicationListenersCleaner; - - /** shutdown task executor */ - private TaskExecutor shutdownTaskExecutor; - - /** Required by the BundleActivator contract */ public Activator() { - this.managedContexts = CollectionFactory.createConcurrentMap(16); } - /** - *

- * Called by OSGi when this bundle is started. Finds all previously resolved - * bundles and adds namespace handlers for them if necessary. - *

- *

- * Creates application contexts for bundles started before the extender was - * started. - *

- *

- * Registers a namespace/entity resolving service for use by web app - * contexts. - *

+ /* + * (non-Javadoc) * - * @see org.osgi.framework.BundleActivator#start + * @see + * org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext) */ public void start(BundleContext context) throws Exception { + plugin = this; - this.bundleContext = context; - this.bundleId = context.getBundle().getBundleId(); + Map contextMap = new HashMap(); + Set processing = new HashSet(); + Bundle[] bundles = context.getBundles(); + Map bundleMap = new HashMap(); + for (Bundle b : bundles) { + bundleMap.put(b.getSymbolicName(), b); + } + for (Bundle b : bundles) { + createContext(bundleMap, contextMap, b, processing); + } + } - this.extenderVersion = OsgiBundleUtils.getBundleVersion(context - .getBundle()); - log.info("Starting [" + bundleContext.getBundle().getSymbolicName() - + "] bundle v.[" + extenderVersion + "]"); - - // Step 1 : discover existing namespaces (in case there are fragments - // with custom XML definitions) - nsManager = new NamespaceManager(context); - - // register listener first to make sure any bundles in INSTALLED state - // are not lost - nsListener = new NamespaceBundleLister(); - context.addBundleListener(nsListener); - - Bundle[] previousBundles = context.getBundles(); - - for (int i = 0; i < previousBundles.length; i++) { - Bundle bundle = previousBundles[i]; - if (OsgiBundleUtils.isBundleResolved(bundle)) { - maybeAddNamespaceHandlerFor(bundle); + private OSGIXmlApplicationContext createContext( + Map bundles, + Map contextMap, Bundle bundle, + Set processing) { + String bundleName = bundle.getSymbolicName(); + OSGIXmlApplicationContext appCtx = contextMap.get(bundleName); + if (contextMap.containsKey(bundleName) == false + && bundleName.contains(".edex.") == false) { + if (processing.contains(bundleName)) { + throw new RuntimeException( + "Found recursive spring dependency while processing plugins: " + + bundleName); } - } + processing.add(bundleName); - // discovery finished, publish the resolvers/parsers in the OSGi space - nsManager.afterPropertiesSet(); - - // Step 2: initialize the extender configuration - try { - extenderConfiguration = new ExtenderConfiguration(context); - } catch (Exception ex) { - log.error("Unable to process extender configuration", ex); - throw ex; - } - - // initialize the configuration once namespace handlers have been - // detected - this.taskExecutor = extenderConfiguration.getTaskExecutor(); - this.shutdownTaskExecutor = extenderConfiguration - .getShutdownTaskExecutor(); - - this.contextCreator = extenderConfiguration.getContextCreator(); - this.postProcessors = extenderConfiguration.getPostProcessors(); - - // init the OSGi event dispatch/listening system - initListenerService(); - - // Step 3: discover the bundles that are started - // and require context creation - - // register the context creation listener - contextListener = new ContextBundleListener(); - // listen to any changes in bundles - context.addBundleListener(contextListener); - // get the bundles again to get an updated view - previousBundles = context.getBundles(); - - // Instantiate all previously resolved bundles which are Spring - // powered - for (int i = 0; i < previousBundles.length; i++) { - if (OsgiBundleUtils.isBundleActive(previousBundles[i])) { - try { - maybeCreateApplicationContextFor(previousBundles[i]); - } catch (Throwable e) { - log.warn( - "Cannot start bundle " - + OsgiStringUtils - .nullSafeSymbolicName(previousBundles[i]) - + " due to", e); + // No context created yet and not edex project, check for files + Enumeration entries = bundle.findEntries(SPRING_PATH, + SPRING_FILE_EXT, true); + if (entries != null) { + List files = new ArrayList(); + while (entries.hasMoreElements()) { + URL url = (URL) entries.nextElement(); + try { + url = FileLocator.toFileURL(url); + files.add(url.toString()); + } catch (IOException e) { + throw new RuntimeException( + "Error resolving spring file: " + url, e); + } } - } - } - - } - - /** - * Called by OSGi when this bundled is stopped. Unregister the - * namespace/entity resolving service and clear all state. No further - * management of application contexts created by this extender prior to - * stopping the bundle occurs after this point (even if the extender bundle - * is subsequently restarted). - * - * @see org.osgi.framework.BundleActivator#stop - */ - public void stop(BundleContext context) throws Exception { - shutdown(); - } - - /** - * Shutdown the extender and all bundled managed by it. Shutdown of contexts - * is in the topological order of the dependency graph formed by the service - * references. - */ - protected void shutdown() { - synchronized (monitor) { - // if already closed, bail out - if (isClosed) - return; - else - isClosed = true; - } - log.info("Stopping [" + bundleContext.getBundle().getSymbolicName() - + "] bundle v.[" + extenderVersion + "]"); - - // first stop the watchdog - stopTimer(); - - // remove the bundle listeners (we are closing down) - if (contextListener != null) { - bundleContext.removeBundleListener(contextListener); - contextListener = null; - } - - if (nsListener != null) { - bundleContext.removeBundleListener(nsListener); - nsListener = null; - } - - // destroy bundles - Bundle[] bundles = new Bundle[managedContexts.size()]; - - int i = 0; - for (Iterator it = managedContexts.values().iterator(); it.hasNext();) { - ConfigurableOsgiBundleApplicationContext context = (ConfigurableOsgiBundleApplicationContext) it - .next(); - bundles[i++] = context.getBundle(); - } - - bundles = shutdownDependencySorter - .computeServiceDependencyGraph(bundles); - - boolean debug = log.isDebugEnabled(); - - StringBuffer buffer = new StringBuffer(); - - if (debug) { - buffer.append("Shutdown order is: {"); - for (i = 0; i < bundles.length; i++) { - buffer.append("\nBundle [" + bundles[i].getSymbolicName() + "]"); - ServiceReference[] services = bundles[i].getServicesInUse(); - HashSet usedBundles = new HashSet(); - if (services != null) { - for (int j = 0; j < services.length; j++) { - if (BundleDependencyComparator - .isSpringManagedService(services[j])) { - Bundle used = services[j].getBundle(); - if (!used.equals(bundleContext.getBundle()) - && !usedBundles.contains(used)) { - usedBundles.add(used); - buffer.append("\n Using [" - + used.getSymbolicName() + "]"); + if (files.size() > 0) { + // Files found, check for dependencies + String requiredBundlesHeader = (String) bundle.getHeaders() + .get(Constants.REQUIRE_BUNDLE); + // Split comma separated string from MANIFEST + String[] requiredBundles = requiredBundlesHeader + .split("[,]"); + List parentContexts = new ArrayList(); + for (String requiredBndl : requiredBundles) { + // Extract bundle name which is first item in + // semicolon + // split list + String[] bndlParts = requiredBndl.split("[;]"); + Bundle reqBndl = bundles.get(bndlParts[0]); + if (reqBndl != null) { + // Found bundle, process context for bundle + OSGIXmlApplicationContext parent = createContext( + bundles, contextMap, reqBndl, processing); + if (parent != null) { + // Context found, add to list + parentContexts.add(parent); } } + } + if (parentContexts.size() > 0) { + // Context with parent context + appCtx = new OSGIXmlApplicationContext( + new OSGIGroupApplicationContext(parentContexts), + files.toArray(new String[0]), bundle); + } else { + // No parent context required + appCtx = new OSGIXmlApplicationContext( + files.toArray(new String[0]), bundle); } } } - buffer.append("\n}"); - log.debug(buffer); + contextMap.put(bundleName, appCtx); } + processing.remove(bundleName); + return appCtx; + } - final List taskList = new ArrayList(managedContexts.size()); - final List closedContexts = Collections - .synchronizedList(new ArrayList()); - final Object[] contextClosingDown = new Object[1]; - - for (i = 0; i < bundles.length; i++) { - Long id = new Long(bundles[i].getBundleId()); - final ConfigurableOsgiBundleApplicationContext context = (ConfigurableOsgiBundleApplicationContext) managedContexts - .get(id); - if (context != null) { - closedContexts.add(context); - // add a new runnable - taskList.add(new Runnable() { - - private final String toString = "Closing runnable for context " - + context.getDisplayName(); - - public void run() { - contextClosingDown[0] = context; - // eliminate context - closedContexts.remove(context); - if (log.isDebugEnabled()) - log.debug("Closing appCtx " - + context.getDisplayName()); - context.close(); - } - - public String toString() { - return toString; - } - }); - } - } - - // tasks - final Runnable[] tasks = (Runnable[]) taskList - .toArray(new Runnable[taskList.size()]); - - // start the ripper >:) - for (int j = 0; j < tasks.length; j++) { - if (RunnableTimedExecution.execute(tasks[j], - extenderConfiguration.getShutdownWaitTime(), - shutdownTaskExecutor)) { - if (debug) { - log.debug(contextClosingDown[0] - + " context did not close successfully; forcing shutdown..."); - } - } - } - - this.managedContexts.clear(); - // clear the namespace registry - nsManager.destroy(); - - // release listeners - if (applicationListeners != null) { - applicationListeners = null; - try { - applicationListenersCleaner.destroy(); - } catch (Exception ex) { - log.warn( - "exception thrown while releasing OSGi event listeners", - ex); - } - } - - // release multicaster - if (multicaster != null) { - multicaster.removeAllListeners(); - multicaster = null; - } - - // before bailing out; wait for the threads that might be left by - // the task executor - stopTaskExecutor(); - - extenderConfiguration.destroy(); + /* + * (non-Javadoc) + * + * @see + * org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; } /** - * Cancel any tasks scheduled for the timer. - */ - private void stopTimer() { - if (timer != null) { - if (log.isDebugEnabled()) - log.debug("Canceling timer tasks"); - timer.cancel(); - } - timer = null; - } - - /** - * Do some additional waiting so the service dependency listeners detect the - * shutdown. - */ - private void stopTaskExecutor() { - boolean debug = log.isDebugEnabled(); - - if (debug) - log.debug("Waiting for " + contextsStarted - + " service dependency listener(s) to stop..."); - - contextsStarted - .waitForZero(extenderConfiguration.getShutdownWaitTime()); - - if (!contextsStarted.isZero()) { - if (debug) - log.debug(contextsStarted.getValue() - + " service dependency listener(s) did not responded in time; forcing them to shutdown..."); - extenderConfiguration.setForceThreadShutdown(true); - } - - else - log.debug("All listeners closed"); - } - - /** - * Utility method that does extender range versioning and approapriate - * logging. + * Returns the shared instance * - * @param bundle + * @return the shared instance */ - private boolean handlerBundleMatchesExtenderVersion(Bundle bundle) { - if (!ConfigUtils.matchExtenderVersionRange(bundle, extenderVersion)) { - if (log.isDebugEnabled()) - log.debug("Bundle [" - + OsgiStringUtils.nullSafeNameAndSymName(bundle) - + "] expects an extender w/ version[" - + OsgiBundleUtils.getHeaderAsVersion(bundle, - ConfigUtils.EXTENDER_VERSION) - + "] which does not match current extender w/ version[" - + extenderVersion - + "]; skipping bundle from handler detection"); - return false; - } - return true; - } - - private void maybeAddNamespaceHandlerFor(Bundle bundle) { - if (handlerBundleMatchesExtenderVersion(bundle)) - nsManager.maybeAddNamespaceHandlerFor(bundle); - } - - private void maybeRemoveNameSpaceHandlerFor(Bundle bundle) { - if (handlerBundleMatchesExtenderVersion(bundle)) - nsManager.maybeRemoveNameSpaceHandlerFor(bundle); - } - - /** - * Context creation is a potentially long-running activity (certainly more - * than we want to do on the synchronous event callback). - * - *

- * Based on our configuration, the context can be started on the same thread - * or on a different one. - * - *

- * Kick off a background activity to create an application context for the - * given bundle if needed. - * - * Note: Make sure to do the fastest filtering first to avoid - * slowdowns on platforms with a big number of plugins and wiring (i.e. - * Eclipse platform). - * - * @param bundle - */ - protected void maybeCreateApplicationContextFor(Bundle bundle) { - - boolean debug = log.isDebugEnabled(); - String bundleString = "[" - + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "]"; - - final Long bundleId = new Long(bundle.getBundleId()); - - if (managedContexts.containsKey(bundleId)) { - if (debug) { - log.debug("Bundle " + bundleString - + " is already managed; ignoring..."); - } - return; - } - - if (!ConfigUtils.matchExtenderVersionRange(bundle, extenderVersion)) { - if (debug) - log.debug("Bundle " - + bundleString - + " expects an extender w/ version[" - + OsgiBundleUtils.getHeaderAsVersion(bundle, - ConfigUtils.EXTENDER_VERSION) - + "] which does not match current extender w/ version[" - + extenderVersion - + "]; skipping bundle from context creation"); - return; - } - - BundleContext localBundleContext = OsgiBundleUtils - .getBundleContext(bundle); - - if (debug) - log.debug("Scanning bundle " + bundleString - + " for configurations..."); - - // initialize context - final DelegatedExecutionOsgiBundleApplicationContext localApplicationContext; - - if (debug) - log.debug("Creating an application context for bundle " - + bundleString); - - try { - localApplicationContext = contextCreator - .createApplicationContext(localBundleContext); - } catch (Exception ex) { - log.error("Cannot create application context for bundle " - + bundleString, ex); - return; - } - - if (localApplicationContext == null) { - log.debug("No application context created for bundle " - + bundleString); - return; - } - - // create a dedicated hook for this application context - BeanFactoryPostProcessor processingHook = new OsgiBeanFactoryPostProcessorAdapter( - localBundleContext, postProcessors); - - // add in the post processors - localApplicationContext.addBeanFactoryPostProcessor(processingHook); - - // add the context to the tracker - managedContexts.put(bundleId, localApplicationContext); - - localApplicationContext.setDelegatedEventMulticaster(multicaster); - - // create refresh runnable - Runnable contextRefresh = new Runnable() { - - public void run() { - localApplicationContext.refresh(); - } - }; - - // executor used for creating the appCtx - // chosen based on the sync/async configuration - TaskExecutor executor = null; - - ApplicationContextConfiguration config = new ApplicationContextConfiguration( - bundle); - - String creationType; - - // synch/asynch context creation - if (config.isCreateAsynchronously()) { - // for the async stuff use the executor - executor = taskExecutor; - creationType = "Asynchronous"; - } else { - // for the sync stuff, use this thread - executor = sameThreadTaskExecutor; - creationType = "Synchronous"; - } - - if (debug) { - log.debug(creationType + " context creation for bundle " - + bundleString); - } - - // wait/no wait for dependencies behaviour - if (config.isWaitForDependencies()) { - DependencyWaiterApplicationContextExecutor appCtxExecutor = new DependencyWaiterApplicationContextExecutor( - localApplicationContext, !config.isCreateAsynchronously(), - extenderConfiguration.getDependencyFactories()); - - long timeout; - // check whether a timeout has been defined - - if (ConfigUtils.isDirectiveDefined(bundle.getHeaders(), - ConfigUtils.DIRECTIVE_TIMEOUT)) { - timeout = config.getTimeout(); - if (debug) - log.debug("Setting bundle-defined, wait-for-dependencies timeout value=" - + timeout + " ms, for bundle " + bundleString); - - } else { - timeout = extenderConfiguration.getDependencyWaitTime(); - if (debug) - log.debug("Setting globally defined wait-for-dependencies timeout value=" - + timeout + " ms, for bundle " + bundleString); - } - - appCtxExecutor.setTimeout(config.getTimeout()); - - appCtxExecutor.setWatchdog(timer); - appCtxExecutor.setTaskExecutor(executor); - appCtxExecutor.setMonitoringCounter(contextsStarted); - // set events publisher - appCtxExecutor.setDelegatedMulticaster(this.multicaster); - - contextsStarted.increment(); - } else { - // do nothing; by default contexts do not wait for services. - } - - executor.execute(contextRefresh); - } - - /** - * Closing an application context is a potentially long-running activity, - * however, we *have* to do it synchronously during the event process as the - * BundleContext object is not valid once we return from this method. - * - * @param bundle - */ - protected void maybeCloseApplicationContextFor(Bundle bundle) { - final ConfigurableOsgiBundleApplicationContext context = (ConfigurableOsgiBundleApplicationContext) managedContexts - .remove(new Long(bundle.getBundleId())); - if (context == null) { - return; - } - - RunnableTimedExecution.execute(new Runnable() { - - private final String toString = "Closing runnable for context " - + context.getDisplayName(); - - public void run() { - if (context.isActive()) { - context.close(); - } - } - - public String toString() { - return toString; - } - - }, extenderConfiguration.getShutdownWaitTime(), shutdownTaskExecutor); - } - - private void initListenerService() { - multicaster = extenderConfiguration.getEventMulticaster(); - - createListenersList(); - // register the listener that does the dispatching - multicaster.addApplicationListener(new ListListenerAdapter( - applicationListeners)); - multicaster.addApplicationListener(extenderConfiguration - .getContextEventListener()); - - if (log.isDebugEnabled()) - log.debug("Initialization of OSGi listeners service completed..."); - } - - /** - * Creates a dynamic OSGi list of OSGi services interested in receiving - * events for OSGi application contexts. - */ - private void createListenersList() { - OsgiServiceCollectionProxyFactoryBean fb = new OsgiServiceCollectionProxyFactoryBean(); - fb.setBundleContext(bundleContext); - fb.setCardinality(Cardinality.C_0__N); - fb.setCollectionType(CollectionType.LIST); - fb.setInterfaces(new Class[] { OsgiBundleApplicationContextListener.class }); - fb.setBeanClassLoader(extenderConfiguration.getClassLoader()); - fb.afterPropertiesSet(); - - applicationListenersCleaner = fb; - applicationListeners = (List) fb.getObject(); + public static Activator getDefault() { + return plugin; } } diff --git a/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/CustomOsgiApplicationContextCreator.java b/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/CustomOsgiApplicationContextCreator.java deleted file mode 100644 index c8a4fa2a35..0000000000 --- a/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/CustomOsgiApplicationContextCreator.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.viz.spring.dm; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext; -import org.springframework.osgi.extender.support.ApplicationContextConfiguration; -import org.springframework.osgi.extender.support.DefaultOsgiApplicationContextCreator; -import org.springframework.osgi.extender.support.scanning.ConfigurationScanner; -import org.springframework.osgi.extender.support.scanning.DefaultConfigurationScanner; -import org.springframework.osgi.util.OsgiStringUtils; -import org.springframework.util.ObjectUtils; - -/** - * Custom DefaultOsgiApplicationContextCreator used to turn off xml validation - * - * - *

- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Oct 12, 2010            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class CustomOsgiApplicationContextCreator extends - DefaultOsgiApplicationContextCreator { - - /** logger */ - private static final Log log = LogFactory - .getLog(CustomOsgiApplicationContextCreator.class); - - private ConfigurationScanner configurationScanner = new DefaultConfigurationScanner(); - - public DelegatedExecutionOsgiBundleApplicationContext createApplicationContext( - BundleContext bundleContext) throws Exception { - Bundle bundle = bundleContext.getBundle(); - ApplicationContextConfiguration config = new ApplicationContextConfiguration( - bundle, configurationScanner); - if (log.isTraceEnabled()) - log.trace("Created configuration " + config + " for bundle " - + OsgiStringUtils.nullSafeNameAndSymName(bundle)); - - // it's not a spring bundle, ignore it - if (!config.isSpringPoweredBundle()) { - return null; - } - - log.info("Discovered configurations " - + ObjectUtils.nullSafeToString(config - .getConfigurationLocations()) + " in bundle [" - + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "]"); - - DelegatedExecutionOsgiBundleApplicationContext sdoac = new CustomOsgiBundleXmlApplicationContext( - config.getConfigurationLocations()); - sdoac.setBundleContext(bundleContext); - sdoac.setPublishContextAsService(config.isPublishContextAsService()); - - return sdoac; - } - -} diff --git a/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/ExtenderConfiguration.java b/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/ExtenderConfiguration.java deleted file mode 100644 index b4dba761e4..0000000000 --- a/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/ExtenderConfiguration.java +++ /dev/null @@ -1,577 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.viz.spring.dm; - -import java.io.UnsupportedEncodingException; -import java.net.URL; -import java.net.URLDecoder; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Enumeration; -import java.util.List; -import java.util.Properties; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.DisposableBean; -import org.springframework.context.event.SimpleApplicationEventMulticaster; -import org.springframework.core.JdkVersion; -import org.springframework.core.task.SimpleAsyncTaskExecutor; -import org.springframework.core.task.TaskExecutor; -import org.springframework.osgi.context.ConfigurableOsgiBundleApplicationContext; -import org.springframework.osgi.context.event.OsgiBundleApplicationContextEventMulticaster; -import org.springframework.osgi.context.event.OsgiBundleApplicationContextEventMulticasterAdapter; -import org.springframework.osgi.context.event.OsgiBundleApplicationContextListener; -import org.springframework.osgi.extender.OsgiApplicationContextCreator; -import org.springframework.osgi.extender.OsgiBeanFactoryPostProcessor; -import org.springframework.osgi.extender.OsgiServiceDependencyFactory; -import org.springframework.osgi.extender.internal.dependencies.startup.MandatoryImporterDependencyFactory; -import org.springframework.osgi.extender.internal.support.DefaultOsgiBundleApplicationContextListener; -import org.springframework.osgi.extender.internal.support.OsgiAnnotationPostProcessor; -import org.springframework.osgi.extender.support.internal.ConfigUtils; -import org.springframework.osgi.util.BundleDelegatingClassLoader; -import org.springframework.scheduling.timer.TimerTaskExecutor; -import org.springframework.util.Assert; -import org.springframework.util.ObjectUtils; - -/** - * TODO Add Description - * - *
- * 
- * Custom version of spring osgi ExtenderConfiguration to turn off xml validation
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Oct 12, 2010            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class ExtenderConfiguration implements DisposableBean { - - /** logger */ - private static final Log log = LogFactory - .getLog(ExtenderConfiguration.class); - - private static final String TASK_EXECUTOR_NAME = "taskExecutor"; - - private static final String SHUTDOWN_TASK_EXECUTOR_NAME = "shutdownTaskExecutor"; - - private static final String CONTEXT_CREATOR_NAME = "applicationContextCreator"; - - private static final String APPLICATION_EVENT_MULTICASTER_BEAN_NAME = "osgiApplicationEventMulticaster"; - - private static final String CONTEXT_LISTENER_NAME = "osgiApplicationContextListener"; - - private static final String PROPERTIES_NAME = "extenderProperties"; - - private static final String SHUTDOWN_WAIT_KEY = "shutdown.wait.time"; - - private static final String PROCESS_ANNOTATIONS_KEY = "process.annotations"; - - private static final String WAIT_FOR_DEPS_TIMEOUT_KEY = "dependencies.wait.time"; - - private static final String EXTENDER_CFG_LOCATION = "META-INF/spring/extender"; - - private static final String XML_PATTERN = "*.xml"; - - private static final String ANNOTATION_DEPENDENCY_FACTORY = "org.springframework.osgi.extensions.annotation.ServiceReferenceDependencyBeanFactoryPostProcessor"; - - /** annotation processing system property (kept for backwards compatibility) */ - private static final String AUTO_ANNOTATION_PROCESSING = "org.springframework.osgi.extender.annotation.auto.processing"; - - // - // defaults - // - - // default dependency wait time (in milliseconds) - private static final long DEFAULT_DEP_WAIT = ConfigUtils.DIRECTIVE_TIMEOUT_DEFAULT * 1000; - - private static final long DEFAULT_SHUTDOWN_WAIT = 10 * 1000; - - private static final boolean DEFAULT_PROCESS_ANNOTATION = false; - - private ConfigurableOsgiBundleApplicationContext extenderConfiguration; - - private TaskExecutor taskExecutor, shutdownTaskExecutor; - - private boolean isTaskExecutorManagedInternally; - - private boolean isShutdownTaskExecutorManagedInternally; - - private boolean isMulticasterManagedInternally; - - private long shutdownWaitTime, dependencyWaitTime; - - private boolean processAnnotation; - - private OsgiBundleApplicationContextEventMulticaster eventMulticaster; - - private OsgiBundleApplicationContextListener contextEventListener; - - private boolean forceThreadShutdown; - - private OsgiApplicationContextCreator contextCreator; - - /** bundle wrapped class loader */ - private final ClassLoader classLoader; - - /** List of context post processors */ - private final List postProcessors = Collections - .synchronizedList(new ArrayList(0)); - - /** List of service dependency factories */ - private final List dependencyFactories = Collections - .synchronizedList(new ArrayList(0)); - - // fields reading/writing lock - private Object lock = new Object(); - - /** - * Constructs a new ExtenderConfiguration instance. Locates the - * extender configuration, creates an application context which will - * returned the extender items. - * - * @param bundleContext - * extender OSGi bundle context - */ - public ExtenderConfiguration(BundleContext bundleContext) { - Bundle bundle = bundleContext.getBundle(); - Properties properties = new Properties(createDefaultProperties()); - - Enumeration enm = bundle.findEntries(EXTENDER_CFG_LOCATION, - XML_PATTERN, false); - - if (enm == null) { - log.info("No custom extender configuration detected; using defaults..."); - - synchronized (lock) { - taskExecutor = createDefaultTaskExecutor(); - shutdownTaskExecutor = createDefaultShutdownTaskExecutor(); - eventMulticaster = createDefaultEventMulticaster(); - contextCreator = createDefaultApplicationContextCreator(); - contextEventListener = createDefaultApplicationContextListener(); - - } - classLoader = BundleDelegatingClassLoader - .createBundleClassLoaderFor(bundle); - } else { - String[] configs = copyEnumerationToList(enm); - - log.info("Detected extender custom configurations at " - + ObjectUtils.nullSafeToString(configs)); - // create OSGi specific XML context - ConfigurableOsgiBundleApplicationContext extenderAppCtx = new CustomOsgiBundleXmlApplicationContext( - configs); - extenderAppCtx.setBundleContext(bundleContext); - extenderAppCtx.refresh(); - - synchronized (lock) { - extenderConfiguration = extenderAppCtx; - // initialize beans - taskExecutor = extenderConfiguration - .containsBean(TASK_EXECUTOR_NAME) ? (TaskExecutor) extenderConfiguration - .getBean(TASK_EXECUTOR_NAME, TaskExecutor.class) - : createDefaultTaskExecutor(); - - shutdownTaskExecutor = extenderConfiguration - .containsBean(SHUTDOWN_TASK_EXECUTOR_NAME) ? (TaskExecutor) extenderConfiguration - .getBean(SHUTDOWN_TASK_EXECUTOR_NAME, - TaskExecutor.class) - : createDefaultShutdownTaskExecutor(); - - eventMulticaster = extenderConfiguration - .containsBean(APPLICATION_EVENT_MULTICASTER_BEAN_NAME) ? (OsgiBundleApplicationContextEventMulticaster) extenderConfiguration - .getBean( - APPLICATION_EVENT_MULTICASTER_BEAN_NAME, - OsgiBundleApplicationContextEventMulticaster.class) - : createDefaultEventMulticaster(); - - contextCreator = extenderConfiguration - .containsBean(CONTEXT_CREATOR_NAME) ? (OsgiApplicationContextCreator) extenderConfiguration - .getBean(CONTEXT_CREATOR_NAME, - OsgiApplicationContextCreator.class) - : createDefaultApplicationContextCreator(); - - contextEventListener = extenderConfiguration - .containsBean(CONTEXT_LISTENER_NAME) ? (OsgiBundleApplicationContextListener) extenderConfiguration - .getBean(CONTEXT_LISTENER_NAME, - OsgiBundleApplicationContextListener.class) - : createDefaultApplicationContextListener(); - } - - // get post processors - postProcessors.addAll(extenderConfiguration.getBeansOfType( - OsgiBeanFactoryPostProcessor.class).values()); - - // get dependency factories - dependencyFactories.addAll(extenderConfiguration.getBeansOfType( - OsgiServiceDependencyFactory.class).values()); - - classLoader = extenderConfiguration.getClassLoader(); - // extender properties using the defaults as backup - if (extenderConfiguration.containsBean(PROPERTIES_NAME)) { - Properties customProperties = (Properties) extenderConfiguration - .getBean(PROPERTIES_NAME, Properties.class); - Enumeration propertyKey = customProperties.propertyNames(); - while (propertyKey.hasMoreElements()) { - String property = (String) propertyKey.nextElement(); - properties.setProperty(property, - customProperties.getProperty(property)); - } - } - } - - synchronized (lock) { - shutdownWaitTime = getShutdownWaitTime(properties); - dependencyWaitTime = getDependencyWaitTime(properties); - processAnnotation = getProcessAnnotations(properties); - } - - // load default dependency factories - addDefaultDependencyFactories(); - } - - /** - * {@inheritDoc} - * - * Cleanup the configuration items. - */ - public void destroy() { - - synchronized (lock) { - if (isMulticasterManagedInternally) { - eventMulticaster.removeAllListeners(); - eventMulticaster = null; - } - - if (extenderConfiguration != null) { - extenderConfiguration.close(); - extenderConfiguration = null; - } - - // postpone the task executor shutdown - if (forceThreadShutdown) { - - if (isTaskExecutorManagedInternally) { - log.warn("Forcing the (internally created) taskExecutor to stop..."); - ThreadGroup th = ((SimpleAsyncTaskExecutor) taskExecutor) - .getThreadGroup(); - if (!th.isDestroyed()) { - // ask the threads nicely to stop - th.interrupt(); - } - } - taskExecutor = null; - } - - if (isShutdownTaskExecutorManagedInternally) { - try { - ((DisposableBean) shutdownTaskExecutor).destroy(); - } catch (Exception ex) { - log.debug( - "Received exception while shutting down shutdown task executor", - ex); - } - shutdownTaskExecutor = null; - } - } - } - - /** - * Copies the URLs returned by the given enumeration and returns them as an - * array of Strings for consumption by the application context. - * - * @param enm - * @return - */ - private String[] copyEnumerationToList(Enumeration enm) { - List urls = new ArrayList(4); - while (enm != null && enm.hasMoreElements()) { - URL configURL = (URL) enm.nextElement(); - if (configURL != null) { - String configURLAsString = configURL.toExternalForm(); - try { - urls.add(URLDecoder.decode(configURLAsString, "UTF8")); - } catch (UnsupportedEncodingException uee) { - log.warn("UTF8 encoding not supported, using the platform default"); - urls.add(URLDecoder.decode(configURLAsString)); - } - } - } - - return (String[]) urls.toArray(new String[urls.size()]); - } - - private Properties createDefaultProperties() { - Properties properties = new Properties(); - properties.setProperty(SHUTDOWN_WAIT_KEY, "" + DEFAULT_SHUTDOWN_WAIT); - properties.setProperty(PROCESS_ANNOTATIONS_KEY, "" - + DEFAULT_PROCESS_ANNOTATION); - properties - .setProperty(WAIT_FOR_DEPS_TIMEOUT_KEY, "" + DEFAULT_DEP_WAIT); - - return properties; - } - - private void addDefaultDependencyFactories() { - boolean debug = log.isDebugEnabled(); - - // default JDK 1.4 processor - dependencyFactories.add(0, new MandatoryImporterDependencyFactory()); - - // load through reflection the dependency and injection processors if - // running on JDK 1.5 and annotation processing is enabled - if (processAnnotation) { - if (JdkVersion.isAtLeastJava15()) { - // dependency processor - Class annotationProcessor = null; - try { - annotationProcessor = Class.forName( - ANNOTATION_DEPENDENCY_FACTORY, false, - ExtenderConfiguration.class.getClassLoader()); - } catch (ClassNotFoundException cnfe) { - log.warn( - "Spring DM annotation package not found, annotation processing disabled.", - cnfe); - return; - } - Object processor = BeanUtils - .instantiateClass(annotationProcessor); - Assert.isInstanceOf(OsgiServiceDependencyFactory.class, - processor); - dependencyFactories.add(1, - (OsgiServiceDependencyFactory) processor); - - if (debug) - log.debug("Succesfully loaded annotation dependency processor [" - + ANNOTATION_DEPENDENCY_FACTORY + "]"); - - // add injection processor (first in line) - postProcessors.add(0, new OsgiAnnotationPostProcessor()); - log.info("Spring-DM annotation processing enabled"); - } else { - if (debug) - log.debug("JDK 5 not available [" - + ANNOTATION_DEPENDENCY_FACTORY + "] not loaded"); - log.warn("Spring-DM annotation processing enabled but JDK 5 is n/a; disabling annotation processing..."); - } - } else { - if (debug) { - log.debug("Spring-DM annotation processing disabled; [" - + ANNOTATION_DEPENDENCY_FACTORY + "] not loaded"); - } - } - - } - - private TaskExecutor createDefaultTaskExecutor() { - // create thread-pool for starting contexts - ThreadGroup threadGroup = new ThreadGroup("spring-osgi-extender[" - + ObjectUtils.getIdentityHexString(this) + "]-threads"); - threadGroup.setDaemon(false); - - SimpleAsyncTaskExecutor taskExecutor = new SimpleAsyncTaskExecutor(); - taskExecutor.setThreadGroup(threadGroup); - taskExecutor.setThreadNamePrefix("SpringOsgiExtenderThread-"); - - isTaskExecutorManagedInternally = true; - - return taskExecutor; - } - - private TaskExecutor createDefaultShutdownTaskExecutor() { - TimerTaskExecutor taskExecutor = new TimerTaskExecutor(); - taskExecutor.afterPropertiesSet(); - isShutdownTaskExecutorManagedInternally = true; - return taskExecutor; - } - - private OsgiBundleApplicationContextEventMulticaster createDefaultEventMulticaster() { - isMulticasterManagedInternally = true; - return new OsgiBundleApplicationContextEventMulticasterAdapter( - new SimpleApplicationEventMulticaster()); - } - - private OsgiApplicationContextCreator createDefaultApplicationContextCreator() { - return new CustomOsgiApplicationContextCreator(); - } - - private OsgiBundleApplicationContextListener createDefaultApplicationContextListener() { - return new DefaultOsgiBundleApplicationContextListener(); - } - - private long getShutdownWaitTime(Properties properties) { - return Long.parseLong(properties.getProperty(SHUTDOWN_WAIT_KEY)); - } - - private long getDependencyWaitTime(Properties properties) { - return Long - .parseLong(properties.getProperty(WAIT_FOR_DEPS_TIMEOUT_KEY)); - } - - private boolean getProcessAnnotations(Properties properties) { - return Boolean.valueOf(properties.getProperty(PROCESS_ANNOTATIONS_KEY)) - .booleanValue() - || Boolean.getBoolean(AUTO_ANNOTATION_PROCESSING); - } - - /** - * Returns the taskExecutor. - * - * @return Returns the taskExecutor - */ - public TaskExecutor getTaskExecutor() { - synchronized (lock) { - return taskExecutor; - } - } - - /** - * Returns the shutdown task executor. - * - * @return Returns the shutdown task executor - */ - public TaskExecutor getShutdownTaskExecutor() { - synchronized (lock) { - return shutdownTaskExecutor; - } - } - - /** - * Returns the contextEventListener. - * - * @return Returns the contextEventListener - */ - public OsgiBundleApplicationContextListener getContextEventListener() { - synchronized (lock) { - return contextEventListener; - } - } - - /** - * Returns the shutdownWaitTime. - * - * @return Returns the shutdownWaitTime - */ - public long getShutdownWaitTime() { - synchronized (lock) { - return shutdownWaitTime; - } - } - - /** - * Indicates if the process annotation is enabled or not. - * - * @return Returns true if the annotation should be processed or not - * otherwise. - */ - public boolean shouldProcessAnnotation() { - synchronized (lock) { - return processAnnotation; - } - } - - /** - * Returns the dependencyWaitTime. - * - * @return Returns the dependencyWaitTime - */ - public long getDependencyWaitTime() { - synchronized (lock) { - return dependencyWaitTime; - } - } - - /** - * Returns the eventMulticaster. - * - * @return Returns the eventMulticaster - */ - public OsgiBundleApplicationContextEventMulticaster getEventMulticaster() { - synchronized (lock) { - return eventMulticaster; - } - } - - /** - * Sets the flag to force the taskExtender to close up in case of runaway - * threads - this applies *only* if the taskExecutor has been created - * internally. - * - *

- * The flag will cause a best attempt to shutdown the threads. - * - * @param forceThreadShutdown - * The forceThreadShutdown to set. - */ - public void setForceThreadShutdown(boolean forceThreadShutdown) { - synchronized (lock) { - this.forceThreadShutdown = forceThreadShutdown; - } - } - - /** - * Returns the contextCreator. - * - * @return Returns the contextCreator - */ - public OsgiApplicationContextCreator getContextCreator() { - synchronized (lock) { - return contextCreator; - } - } - - /** - * Returns the postProcessors. - * - * @return Returns the postProcessors - */ - public List getPostProcessors() { - return postProcessors; - } - - /** - * Returns the class loader wrapped around the extender bundle. - * - * @return extender bundle class loader - */ - public ClassLoader getClassLoader() { - return classLoader; - } - - /** - * Returns the dependencies factories declared by the extender - * configuration. The list automatically contains the default listeners - * (such as the annotation one). - * - * @return list of dependency factories - */ - public List getDependencyFactories() { - return dependencyFactories; - } -} diff --git a/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/ListListenerAdapter.java b/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/ListListenerAdapter.java deleted file mode 100644 index d51400b57a..0000000000 --- a/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/ListListenerAdapter.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.viz.spring.dm; - -import java.util.Iterator; -import java.util.List; - -import org.springframework.osgi.context.event.OsgiBundleApplicationContextEvent; -import org.springframework.osgi.context.event.OsgiBundleApplicationContextListener; -import org.springframework.util.Assert; - -/** - * Direct copy of - * org.springframework.osgi.extender.internal.activator.ListListenerAdapter. - * Needed for copy of ContextLoaderListener (Activator) since spring class is - * package level visibility only - * - *

- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Oct 12, 2010            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -class ListListenerAdapter implements OsgiBundleApplicationContextListener { - - private final List listeners; - - /** - * Constructs a new ListListenerAdapter instance. - * - * @param listeners - */ - public ListListenerAdapter(List listeners) { - Assert.notNull(listeners); - this.listeners = listeners; - } - - public void onOsgiApplicationEvent(OsgiBundleApplicationContextEvent event) { - for (Iterator iterator = listeners.iterator(); iterator.hasNext();) { - OsgiBundleApplicationContextListener osgiListener = (OsgiBundleApplicationContextListener) iterator - .next(); - osgiListener.onOsgiApplicationEvent(event); - } - } -} diff --git a/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/OSGIGroupApplicationContext.java b/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/OSGIGroupApplicationContext.java new file mode 100644 index 0000000000..0396b29a7c --- /dev/null +++ b/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/OSGIGroupApplicationContext.java @@ -0,0 +1,62 @@ +/** + * This software was developed and / or modified by Raytheon Company, + * pursuant to Contract DG133W-05-CQ-1067 with the US Government. + * + * U.S. EXPORT CONTROLLED TECHNICAL DATA + * This software product contains export-restricted data whose + * export/transfer/disclosure is restricted by U.S. law. Dissemination + * to non-U.S. persons whether in the United States or abroad requires + * an export license or other authorization. + * + * Contractor Name: Raytheon Company + * Contractor Address: 6825 Pine Street, Suite 340 + * Mail Stop B8 + * Omaha, NE 68106 + * 402.291.0100 + * + * See the AWIPS II Master Rights File ("Master Rights File.pdf") for + * further licensing information. + **/ +package com.raytheon.uf.viz.spring.dm; + +import java.util.List; + +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.context.support.GenericApplicationContext; + +/** + * OSGI Group application context, constructs an {@link OSGIGroupBeanFactory} + * from the context group's factories + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Nov 1, 2012            mschenke     Initial creation
+ * 
+ * 
+ * + * @author mschenke + * @version 1.0 + */ + +public class OSGIGroupApplicationContext extends GenericApplicationContext { + + public OSGIGroupApplicationContext( + List contextGroup) { + refresh(); // refresh first to avoid recreating bean definitions + DefaultListableBeanFactory factory = getDefaultListableBeanFactory(); + // Register all bean definitions from other contexts into our factory + for (OSGIXmlApplicationContext ctx : contextGroup) { + ConfigurableListableBeanFactory ctxFactory = ctx.getBeanFactory(); + for (String beanName : ctxFactory.getBeanDefinitionNames()) { + factory.registerBeanDefinition(beanName, + ctxFactory.getBeanDefinition(beanName)); + } + } + } + +} diff --git a/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/CustomOsgiBundleXmlApplicationContext.java b/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/OSGIXmlApplicationContext.java similarity index 56% rename from cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/CustomOsgiBundleXmlApplicationContext.java rename to cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/OSGIXmlApplicationContext.java index 7d944907ca..66abec5c6f 100644 --- a/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/CustomOsgiBundleXmlApplicationContext.java +++ b/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/OSGIXmlApplicationContext.java @@ -19,11 +19,13 @@ **/ package com.raytheon.uf.viz.spring.dm; +import org.osgi.framework.Bundle; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext; +import org.springframework.context.ApplicationContext; +import org.springframework.context.support.AbstractXmlApplicationContext; /** - * Custom OsgiBundleXmlApplicationContext used to turn off xml validation + * TODO Add Description * *
  * 
@@ -31,7 +33,7 @@ import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
  * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
- * Oct 12, 2010            mschenke     Initial creation
+ * Oct 30, 2012            mschenke     Initial creation
  * 
  * 
* @@ -39,23 +41,32 @@ import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext; * @version 1.0 */ -public class CustomOsgiBundleXmlApplicationContext extends - OsgiBundleXmlApplicationContext { +public class OSGIXmlApplicationContext extends AbstractXmlApplicationContext { - /** - * @param configs - */ - public CustomOsgiBundleXmlApplicationContext(String[] configs) { - super(configs); + public OSGIXmlApplicationContext(String[] configLocations, Bundle bundle) { + this(null, configLocations, bundle); } + public OSGIXmlApplicationContext(ApplicationContext parent, + String[] configLocations, Bundle bundle) { + super(parent); + setClassLoader(new OSGIXmlClassLoader(bundle, getClassLoader())); + setConfigLocations(configLocations); + refresh(); + } + + /* + * (non-Javadoc) + * + * @see org.springframework.context.support.AbstractXmlApplicationContext# + * initBeanDefinitionReader + * (org.springframework.beans.factory.xml.XmlBeanDefinitionReader) + */ @Override protected void initBeanDefinitionReader( XmlBeanDefinitionReader beanDefinitionReader) { super.initBeanDefinitionReader(beanDefinitionReader); - beanDefinitionReader - .setValidationMode(XmlBeanDefinitionReader.VALIDATION_NONE); - beanDefinitionReader.setNamespaceAware(true); + beanDefinitionReader.setBeanClassLoader(getClassLoader()); } } diff --git a/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/OSGIXmlClassLoader.java b/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/OSGIXmlClassLoader.java new file mode 100644 index 0000000000..a7997b74b8 --- /dev/null +++ b/cave/com.raytheon.uf.viz.spring.dm/src/com/raytheon/uf/viz/spring/dm/OSGIXmlClassLoader.java @@ -0,0 +1,68 @@ +/** + * This software was developed and / or modified by Raytheon Company, + * pursuant to Contract DG133W-05-CQ-1067 with the US Government. + * + * U.S. EXPORT CONTROLLED TECHNICAL DATA + * This software product contains export-restricted data whose + * export/transfer/disclosure is restricted by U.S. law. Dissemination + * to non-U.S. persons whether in the United States or abroad requires + * an export license or other authorization. + * + * Contractor Name: Raytheon Company + * Contractor Address: 6825 Pine Street, Suite 340 + * Mail Stop B8 + * Omaha, NE 68106 + * 402.291.0100 + * + * See the AWIPS II Master Rights File ("Master Rights File.pdf") for + * further licensing information. + **/ +package com.raytheon.uf.viz.spring.dm; + +import org.osgi.framework.Bundle; + +/** + * + * Class loader for spring bundle context + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Nov 6, 2012            mschenke     Initial creation
+ * 
+ * 
+ * + * @author mschenke + * @version 1.0 + */ + +public class OSGIXmlClassLoader extends ClassLoader { + + private Bundle bundle; + + public OSGIXmlClassLoader(Bundle bundle, ClassLoader parent) { + super(parent); + this.bundle = bundle; + } + + @Override + protected synchronized Class loadClass(String name, boolean resolve) + throws ClassNotFoundException { + Class clazz = null; + try { + clazz = super.loadClass(name, resolve); + } catch (ClassNotFoundException e) { + // Ignore here + } + + if (clazz == null) { + clazz = bundle.loadClass(name); + } + + return clazz; + } + +} diff --git a/cave/com.raytheon.viz.alerts/src/com/raytheon/viz/alerts/jobs/MenuUpdater.java b/cave/com.raytheon.viz.alerts/src/com/raytheon/viz/alerts/jobs/MenuUpdater.java index ea7c8f1c22..64aee9f6b1 100644 --- a/cave/com.raytheon.viz.alerts/src/com/raytheon/viz/alerts/jobs/MenuUpdater.java +++ b/cave/com.raytheon.viz.alerts/src/com/raytheon/viz/alerts/jobs/MenuUpdater.java @@ -24,7 +24,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import com.raytheon.edex.util.Util; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.viz.core.alerts.AlertMessage; import com.raytheon.uf.viz.core.rsc.URICatalog; @@ -47,11 +46,6 @@ import com.raytheon.viz.alerts.IAlertObserver; */ public class MenuUpdater implements IAlertObserver { - public MenuUpdater() { - // TODO remove following line once Util removes static block - Util.getCurrentMemory(); - } - /* * (non-Javadoc) * diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/Activator.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/Activator.java index 34ab54357c..b90d13076b 100644 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/Activator.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/Activator.java @@ -22,10 +22,6 @@ package com.raytheon.viz.grid; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; -import com.raytheon.uf.common.dataplugin.convert.ConvertUtil; -import com.raytheon.uf.common.gridcoverage.GridCoverage; -import com.raytheon.uf.common.gridcoverage.convert.GridCoverageConverter; - /** * The activator class controls the plug-in life cycle */ @@ -53,8 +49,6 @@ public class Activator extends AbstractUIPlugin { */ public void start(BundleContext context) throws Exception { super.start(context); - ConvertUtil.registerConverter(new GridCoverageConverter(), - GridCoverage.class); } /* diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/GridUpdater.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/GridUpdater.java index 25b0953da5..227c654343 100644 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/GridUpdater.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/inv/GridUpdater.java @@ -27,7 +27,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import com.raytheon.edex.util.Util; import com.raytheon.uf.common.comm.CommunicationException; import com.raytheon.uf.common.dataplugin.PluginException; import com.raytheon.uf.common.dataplugin.grid.GridConstants; @@ -134,8 +133,6 @@ public class GridUpdater implements IAlertObserver { private Map> updateMap = new HashMap>(); public GridUpdater(GridInventory inventory) { - // TODO remove following line once Util removes static block - Util.getCurrentMemory(); this.inventory = inventory; } diff --git a/cave/com.raytheon.viz.product.awips/developer.product b/cave/com.raytheon.viz.product.awips/developer.product index e444cabd71..760b4375e3 100644 --- a/cave/com.raytheon.viz.product.awips/developer.product +++ b/cave/com.raytheon.viz.product.awips/developer.product @@ -47,7 +47,7 @@ - + diff --git a/cots/org.springframework.dm/.classpath b/cots/org.springframework.dm/.classpath deleted file mode 100644 index 89574b8582..0000000000 --- a/cots/org.springframework.dm/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/cots/org.springframework.dm/META-INF/MANIFEST.MF b/cots/org.springframework.dm/META-INF/MANIFEST.MF deleted file mode 100644 index f204b6691a..0000000000 --- a/cots/org.springframework.dm/META-INF/MANIFEST.MF +++ /dev/null @@ -1,58 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Spring OSGI -Bundle-SymbolicName: org.springframework.dm -Bundle-Version: 1.2.1 -Bundle-ClassPath: org.springframework.osgi.core-1.2.0.jar, - org.springframework.osgi.extender-1.2.0.jar, - org.springframework.osgi.io-1.2.0.jar -Export-Package: org.springframework.osgi, - org.springframework.osgi.bundle, - org.springframework.osgi.compendium.cm, - org.springframework.osgi.compendium.config, - org.springframework.osgi.compendium.internal.cm, - org.springframework.osgi.config, - org.springframework.osgi.config.internal.adapter, - org.springframework.osgi.config.internal.util, - org.springframework.osgi.context, - org.springframework.osgi.context.event, - org.springframework.osgi.context.internal.classloader, - org.springframework.osgi.context.support, - org.springframework.osgi.context.support.internal, - org.springframework.osgi.extender, - org.springframework.osgi.extender.event, - org.springframework.osgi.extender.internal.activator, - org.springframework.osgi.extender.internal.dependencies.shutdown, - org.springframework.osgi.extender.internal.dependencies.startup, - org.springframework.osgi.extender.internal.support, - org.springframework.osgi.extender.internal.util, - org.springframework.osgi.extender.internal.util.concurrent, - org.springframework.osgi.extender.support, - org.springframework.osgi.extender.support.internal, - org.springframework.osgi.extender.support.scanning, - org.springframework.osgi.io, - org.springframework.osgi.io.internal, - org.springframework.osgi.io.internal.resolver, - org.springframework.osgi.service, - org.springframework.osgi.service.dependency.internal, - org.springframework.osgi.service.exporter, - org.springframework.osgi.service.exporter.support, - org.springframework.osgi.service.exporter.support.internal.controller, - org.springframework.osgi.service.exporter.support.internal.support, - org.springframework.osgi.service.importer, - org.springframework.osgi.service.importer.event, - org.springframework.osgi.service.importer.support, - org.springframework.osgi.service.importer.support.internal.aop, - org.springframework.osgi.service.importer.support.internal.collection, - org.springframework.osgi.service.importer.support.internal.collection.comparator, - org.springframework.osgi.service.importer.support.internal.controller, - org.springframework.osgi.service.importer.support.internal.dependency, - org.springframework.osgi.service.importer.support.internal.support, - org.springframework.osgi.service.importer.support.internal.util, - org.springframework.osgi.service.util.internal.aop, - org.springframework.osgi.util, - org.springframework.osgi.util.internal -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Require-Bundle: org.apache.commons.logging;bundle-version="1.1.1", - org.eclipse.osgi;bundle-version="3.6.1", - org.springframework;bundle-version="2.5.6" diff --git a/cots/org.springframework.dm/build.properties b/cots/org.springframework.dm/build.properties deleted file mode 100644 index 2aa1fa3db9..0000000000 --- a/cots/org.springframework.dm/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -bin.includes = META-INF/,\ - org.springframework.osgi.core-1.2.0.jar,\ - org.springframework.osgi.extender-1.2.0.jar,\ - org.springframework.osgi.io-1.2.0.jar diff --git a/cots/org.springframework.dm/org.springframework.dm.ecl b/cots/org.springframework.dm/org.springframework.dm.ecl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/cots/org.springframework.dm/org.springframework.osgi.core-1.2.0.jar b/cots/org.springframework.dm/org.springframework.osgi.core-1.2.0.jar deleted file mode 100644 index ece0eb4f5d..0000000000 Binary files a/cots/org.springframework.dm/org.springframework.osgi.core-1.2.0.jar and /dev/null differ diff --git a/cots/org.springframework.dm/org.springframework.osgi.core-sources-1.2.0.jar b/cots/org.springframework.dm/org.springframework.osgi.core-sources-1.2.0.jar deleted file mode 100644 index 437d516644..0000000000 Binary files a/cots/org.springframework.dm/org.springframework.osgi.core-sources-1.2.0.jar and /dev/null differ diff --git a/cots/org.springframework.dm/org.springframework.osgi.extender-1.2.0.jar b/cots/org.springframework.dm/org.springframework.osgi.extender-1.2.0.jar deleted file mode 100644 index 31ba0c7b45..0000000000 Binary files a/cots/org.springframework.dm/org.springframework.osgi.extender-1.2.0.jar and /dev/null differ diff --git a/cots/org.springframework.dm/org.springframework.osgi.extender-sources-1.2.0.jar b/cots/org.springframework.dm/org.springframework.osgi.extender-sources-1.2.0.jar deleted file mode 100644 index b0f78cd113..0000000000 Binary files a/cots/org.springframework.dm/org.springframework.osgi.extender-sources-1.2.0.jar and /dev/null differ diff --git a/cots/org.springframework.dm/org.springframework.osgi.io-1.2.0.jar b/cots/org.springframework.dm/org.springframework.osgi.io-1.2.0.jar deleted file mode 100644 index 420b97467b..0000000000 Binary files a/cots/org.springframework.dm/org.springframework.osgi.io-1.2.0.jar and /dev/null differ diff --git a/cots/org.springframework.dm/org.springframework.osgi.io-sources-1.2.0.jar b/cots/org.springframework.dm/org.springframework.osgi.io-sources-1.2.0.jar deleted file mode 100644 index e1a9ccd60c..0000000000 Binary files a/cots/org.springframework.dm/org.springframework.osgi.io-sources-1.2.0.jar and /dev/null differ diff --git a/edexOsgi/build.edex/esb/conf/spring/edex.xml b/edexOsgi/build.edex/esb/conf/spring/edex.xml index 20a61c50e9..fe8490990b 100644 --- a/edexOsgi/build.edex/esb/conf/spring/edex.xml +++ b/edexOsgi/build.edex/esb/conf/spring/edex.xml @@ -174,16 +174,6 @@
- - - com.vividsolutions.jts.geom.Geometry - - - - - javax.measure.unit.Unit - - diff --git a/edexOsgi/com.raytheon.edex.common/component-deploy.xml b/edexOsgi/com.raytheon.edex.common/component-deploy.xml deleted file mode 100644 index 23afc06df6..0000000000 --- a/edexOsgi/com.raytheon.edex.common/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/msg/ResponseMessageASCII.java b/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/msg/ResponseMessageASCII.java index 798820e801..fc218342ed 100644 --- a/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/msg/ResponseMessageASCII.java +++ b/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/msg/ResponseMessageASCII.java @@ -24,8 +24,8 @@ import java.util.Calendar; import java.util.Date; import com.raytheon.edex.util.Util; -import com.raytheon.uf.common.dataplugin.convert.ConvertUtil; import com.raytheon.uf.common.message.response.AbstractResponseMessage; +import com.raytheon.uf.common.util.ConvertUtil; /** * Represents an ASCII product response from EDEX. diff --git a/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/util/Util.java b/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/util/Util.java index f6c4e96371..86370b9eef 100644 --- a/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/util/Util.java +++ b/edexOsgi/com.raytheon.edex.common/src/com/raytheon/edex/util/Util.java @@ -51,26 +51,17 @@ import java.util.regex.Pattern; import java.util.zip.DataFormatException; import java.util.zip.ZipEntry; -import javax.measure.unit.Unit; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; -import org.apache.commons.beanutils.ConvertUtils; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import com.raytheon.uf.common.dataplugin.convert.ConvertUtil; -import com.raytheon.uf.common.dataplugin.convert.UnitConverter; -import com.raytheon.uf.common.geospatial.util.JtsGeometryConverter; import com.raytheon.uf.common.serialization.SerializationException; import com.raytheon.uf.common.serialization.SerializationUtil; -import com.raytheon.uf.common.time.DataTime; -import com.raytheon.uf.common.time.util.CalendarConverter; -import com.raytheon.uf.common.time.util.DataTimeConverter; -import com.raytheon.uf.common.time.util.DateConverter; import com.raytheon.uf.common.time.util.TimeUtil; -import com.vividsolutions.jts.geom.Geometry; +import com.raytheon.uf.common.util.ConvertUtil; /** * Contains utility methods for use in common. @@ -121,17 +112,6 @@ public final class Util { public static final float GRID_FILL_VALUE = -999999; - // TODO remove this static block - // this registration should occur in spring and edex is set up to - // do this but CAVE isn't yet - static { - ConvertUtils.register(new DataTimeConverter(), DataTime.class); - ConvertUtils.register(new CalendarConverter(), Calendar.class); - ConvertUtils.register(new UnitConverter(), Unit.class); - ConvertUtils.register(new DateConverter(), Date.class); - ConvertUtils.register(new JtsGeometryConverter(), Geometry.class); - } - private Util() { // No Instantiation } diff --git a/edexOsgi/com.raytheon.edex.plugin.binlightning/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.plugin.binlightning/META-INF/MANIFEST.MF index 43a4213b56..799dd83d43 100644 --- a/edexOsgi/com.raytheon.edex.plugin.binlightning/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.plugin.binlightning/META-INF/MANIFEST.MF @@ -8,8 +8,7 @@ Bundle-Vendor: RAYTHEON Require-Bundle: org.apache.commons.logging, com.raytheon.edex.common, com.raytheon.uf.edex.decodertools;bundle-version="1.0.0", - javax.persistence + javax.persistence, + com.raytheon.uf.common.dataplugin.binlightning;bundle-version="1.12.1174";visibility:=reexport Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Import-Package: com.raytheon.uf.common.dataplugin.binlightning, - com.raytheon.uf.common.dataplugin.binlightning.dao, - com.raytheon.uf.common.dataplugin.binlightning.impl +Export-Package: com.raytheon.edex.plugin.binlightning.dao diff --git a/edexOsgi/com.raytheon.edex.plugin.binlightning/component-deploy.xml b/edexOsgi/com.raytheon.edex.plugin.binlightning/component-deploy.xml deleted file mode 100644 index df09595af9..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.binlightning/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/res/spring/binlightning-common.xml b/edexOsgi/com.raytheon.edex.plugin.binlightning/res/spring/binlightning-common.xml similarity index 90% rename from edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/res/spring/binlightning-common.xml rename to edexOsgi/com.raytheon.edex.plugin.binlightning/res/spring/binlightning-common.xml index 789a0b30c4..702667203e 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/res/spring/binlightning-common.xml +++ b/edexOsgi/com.raytheon.edex.plugin.binlightning/res/spring/binlightning-common.xml @@ -7,7 +7,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/dao/BinLightningDao.java b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/dao/BinLightningDao.java similarity index 97% rename from edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/dao/BinLightningDao.java rename to edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/dao/BinLightningDao.java index 2ba8a53427..70a9049e4c 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/src/com/raytheon/uf/common/dataplugin/binlightning/dao/BinLightningDao.java +++ b/edexOsgi/com.raytheon.edex.plugin.binlightning/src/com/raytheon/edex/plugin/binlightning/dao/BinLightningDao.java @@ -18,7 +18,7 @@ * further licensing information. **/ -package com.raytheon.uf.common.dataplugin.binlightning.dao; +package com.raytheon.edex.plugin.binlightning.dao; import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord; import com.raytheon.uf.common.dataplugin.PluginException; diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrua/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.plugin.bufrua/META-INF/MANIFEST.MF index d98fea61d4..0ccbb69f2e 100644 --- a/edexOsgi/com.raytheon.edex.plugin.bufrua/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.plugin.bufrua/META-INF/MANIFEST.MF @@ -14,7 +14,9 @@ Require-Bundle: com.raytheon.uf.common.dataplugin.bufrua;bundle-version="1.0.0", com.raytheon.uf.edex.pointdata;bundle-version="1.11.8", javax.measure, org.geotools, - javax.persistence + javax.persistence, + com.raytheon.uf.edex.menus;bundle-version="1.0.0", + com.raytheon.uf.common.localization;bundle-version="1.12.1174" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Export-Package: com.raytheon.edex.plugin.bufrua.dao Import-Package: com.raytheon.uf.common.status diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrua/component-deploy.xml b/edexOsgi/com.raytheon.edex.plugin.bufrua/component-deploy.xml deleted file mode 100644 index b25f1a9947..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.bufrua/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.sounding/res/spring/raob-request.xml b/edexOsgi/com.raytheon.edex.plugin.bufrua/res/spring/bufrua-request.xml similarity index 76% rename from edexOsgi/com.raytheon.uf.common.sounding/res/spring/raob-request.xml rename to edexOsgi/com.raytheon.edex.plugin.bufrua/res/spring/bufrua-request.xml index b9e87bffaa..d3c88b4737 100644 --- a/edexOsgi/com.raytheon.uf.common.sounding/res/spring/raob-request.xml +++ b/edexOsgi/com.raytheon.edex.plugin.bufrua/res/spring/bufrua-request.xml @@ -4,10 +4,10 @@ http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.sounding/src/com/raytheon/uf/common/sounding/util/RaobMenuUtil.java b/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/util/RaobMenuUtil.java similarity index 98% rename from edexOsgi/com.raytheon.uf.common.sounding/src/com/raytheon/uf/common/sounding/util/RaobMenuUtil.java rename to edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/util/RaobMenuUtil.java index a4404f02b1..aaad51be2b 100644 --- a/edexOsgi/com.raytheon.uf.common.sounding/src/com/raytheon/uf/common/sounding/util/RaobMenuUtil.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/util/RaobMenuUtil.java @@ -17,14 +17,13 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.common.sounding.util; +package com.raytheon.edex.plugin.bufrua.util; import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import com.raytheon.uf.common.menus.AbstractMenuUtil; import com.raytheon.uf.common.menus.xml.CommonAbstractMenuContribution; import com.raytheon.uf.common.menus.xml.CommonBundleMenuContribution; import com.raytheon.uf.common.menus.xml.CommonPlaceholderMenuContribution; @@ -33,6 +32,7 @@ import com.raytheon.uf.common.menus.xml.MenuTemplateFile; import com.raytheon.uf.common.menus.xml.VariableSubstitution; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; +import com.raytheon.uf.edex.menus.AbstractMenuUtil; /** * Builds the menus for raobs diff --git a/edexOsgi/com.raytheon.uf.common.sounding/src/com/raytheon/uf/common/sounding/util/RaobSitesInUseUtil.java b/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/util/RaobSitesInUseUtil.java similarity index 99% rename from edexOsgi/com.raytheon.uf.common.sounding/src/com/raytheon/uf/common/sounding/util/RaobSitesInUseUtil.java rename to edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/util/RaobSitesInUseUtil.java index 81b025645e..81c03e0573 100644 --- a/edexOsgi/com.raytheon.uf.common.sounding/src/com/raytheon/uf/common/sounding/util/RaobSitesInUseUtil.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/util/RaobSitesInUseUtil.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.common.sounding.util; +package com.raytheon.edex.plugin.bufrua.util; import java.io.BufferedReader; import java.io.File; diff --git a/edexOsgi/com.raytheon.uf.common.sounding/src/com/raytheon/uf/common/sounding/util/UpperAirSite.java b/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/util/UpperAirSite.java similarity index 97% rename from edexOsgi/com.raytheon.uf.common.sounding/src/com/raytheon/uf/common/sounding/util/UpperAirSite.java rename to edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/util/UpperAirSite.java index 815a781b48..3d4e4e8fff 100644 --- a/edexOsgi/com.raytheon.uf.common.sounding/src/com/raytheon/uf/common/sounding/util/UpperAirSite.java +++ b/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/plugin/bufrua/util/UpperAirSite.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.common.sounding.util; +package com.raytheon.edex.plugin.bufrua.util; /** * TODO Add Description diff --git a/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/util/bufrua/package-info.java b/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/util/bufrua/package-info.java deleted file mode 100644 index 02d6349bdf..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.bufrua/src/com/raytheon/edex/util/bufrua/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -/** - * BUFR Upperair data access classes. and other possible utility classes. - */ -package com.raytheon.edex.util.bufrua; \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.plugin.radar/META-INF/MANIFEST.MF index 7bdbdccb97..c7f22bd075 100644 --- a/edexOsgi/com.raytheon.edex.plugin.radar/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.plugin.radar/META-INF/MANIFEST.MF @@ -14,7 +14,8 @@ Require-Bundle: com.raytheon.edex.common, com.raytheon.uf.common.localization, com.raytheon.uf.common.serialization.comm, com.raytheon.uf.common.status;bundle-version="1.11.11", - com.raytheon.uf.common.dataplugin.radar + com.raytheon.uf.common.dataplugin.radar, + com.raytheon.uf.edex.menus;bundle-version="1.0.0" Bundle-ActivationPolicy: lazy Export-Package: com.raytheon.edex.plugin.radar, com.raytheon.edex.plugin.radar.dao, @@ -22,9 +23,7 @@ Export-Package: com.raytheon.edex.plugin.radar, com.raytheon.edex.uengine.tasks.radar Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: com.raytheon.uf.common.comm, - com.raytheon.uf.common.menus, - com.raytheon.uf.common.menus.xml, - com.raytheon.uf.common.site.ingest, com.raytheon.uf.common.dataplugin.text.db, + com.raytheon.uf.common.site.ingest, org.apache.commons.logging, org.apache.tools.bzip2 diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/component-deploy.xml b/edexOsgi/com.raytheon.edex.plugin.radar/component-deploy.xml deleted file mode 100644 index a8589388a6..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.radar/component-deploy.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/res/spring/radar-request.xml b/edexOsgi/com.raytheon.edex.plugin.radar/res/spring/radar-request.xml index d70f37aac4..41b247f4ac 100644 --- a/edexOsgi/com.raytheon.edex.plugin.radar/res/spring/radar-request.xml +++ b/edexOsgi/com.raytheon.edex.plugin.radar/res/spring/radar-request.xml @@ -18,7 +18,6 @@ - diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/util/RadarMenuUtil.java b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/util/RadarMenuUtil.java index 55fdc11c41..f17161c204 100644 --- a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/util/RadarMenuUtil.java +++ b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/util/RadarMenuUtil.java @@ -35,7 +35,6 @@ import java.util.Map; import com.raytheon.uf.common.dataplugin.radar.util.RadarsInUseUtil; import com.raytheon.uf.common.dataplugin.radar.util.TerminalRadarUtils; -import com.raytheon.uf.common.menus.AbstractMenuUtil; import com.raytheon.uf.common.menus.xml.CommonAbstractMenuContribution; import com.raytheon.uf.common.menus.xml.CommonIncludeMenuContribution; import com.raytheon.uf.common.menus.xml.CommonIncludeMenuItem; @@ -48,6 +47,7 @@ import com.raytheon.uf.common.site.ingest.INationalDatasetSubscriber; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; +import com.raytheon.uf.edex.menus.AbstractMenuUtil; /** * Builds menus using JAXB diff --git a/edexOsgi/com.raytheon.edex.plugin.satellite/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.plugin.satellite/META-INF/MANIFEST.MF index a08cbb5e0d..4bf7a78454 100644 --- a/edexOsgi/com.raytheon.edex.plugin.satellite/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.plugin.satellite/META-INF/MANIFEST.MF @@ -12,7 +12,8 @@ Require-Bundle: com.raytheon.edex.common, javax.measure, org.apache.commons.lang, javax.persistence, - com.raytheon.uf.common.dataplugin.satellite;bundle-version="1.0.0" + com.raytheon.uf.common.dataplugin.satellite;bundle-version="1.0.0", + com.raytheon.uf.edex.menus;bundle-version="1.0.0" Export-Package: com.raytheon.edex.plugin.satellite, com.raytheon.edex.plugin.satellite.dao, com.raytheon.edex.plugin.satellite.notify, @@ -21,7 +22,5 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: com.raytheon.edex.uengine.tasks.query, com.raytheon.uf.common.awipstools, com.raytheon.uf.common.localization, - com.raytheon.uf.common.menus, - com.raytheon.uf.common.menus.xml, com.raytheon.uf.common.status, com.raytheon.uf.edex.awipstools diff --git a/edexOsgi/com.raytheon.edex.plugin.satellite/component-deploy.xml b/edexOsgi/com.raytheon.edex.plugin.satellite/component-deploy.xml deleted file mode 100644 index ad6720095e..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.satellite/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.satellite/res/spring/satellite-request.xml b/edexOsgi/com.raytheon.edex.plugin.satellite/res/spring/satellite-request.xml index 5a417a1be5..43f701d9b5 100644 --- a/edexOsgi/com.raytheon.edex.plugin.satellite/res/spring/satellite-request.xml +++ b/edexOsgi/com.raytheon.edex.plugin.satellite/res/spring/satellite-request.xml @@ -5,7 +5,6 @@ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - diff --git a/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatelliteMenuUtil.java b/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatelliteMenuUtil.java index d7ff45c47a..3acc76cf69 100644 --- a/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatelliteMenuUtil.java +++ b/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatelliteMenuUtil.java @@ -30,13 +30,13 @@ import com.raytheon.uf.common.geospatial.ISpatialQuery; import com.raytheon.uf.common.geospatial.MapUtil; import com.raytheon.uf.common.geospatial.SpatialException; import com.raytheon.uf.common.geospatial.SpatialQueryFactory; -import com.raytheon.uf.common.menus.AbstractMenuUtil; import com.raytheon.uf.common.menus.xml.CommonIncludeMenuContribution; import com.raytheon.uf.common.menus.xml.MenuTemplateFile; import com.raytheon.uf.common.menus.xml.VariableSubstitution; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.edex.awipstools.GetWfoCenterHandler; +import com.raytheon.uf.edex.menus.AbstractMenuUtil; import com.vividsolutions.jts.geom.Coordinate; /** diff --git a/edexOsgi/com.raytheon.edex.plugin.textlightning/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.plugin.textlightning/META-INF/MANIFEST.MF index d6fba489fc..71e89cd9fa 100644 --- a/edexOsgi/com.raytheon.edex.plugin.textlightning/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.plugin.textlightning/META-INF/MANIFEST.MF @@ -11,5 +11,4 @@ Require-Bundle: org.apache.commons.logging, javax.persistence Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: com.raytheon.uf.common.dataplugin.binlightning, - com.raytheon.uf.common.dataplugin.binlightning.dao, com.raytheon.uf.common.dataplugin.binlightning.impl diff --git a/edexOsgi/com.raytheon.edex.plugin.textlightning/component-deploy.xml b/edexOsgi/com.raytheon.edex.plugin.textlightning/component-deploy.xml deleted file mode 100644 index d2359e2c90..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.textlightning/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/build.properties b/edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/build.properties index 5791d48d5f..34d2e4d2da 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/build.properties +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/build.properties @@ -1,5 +1,4 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - .,\ - res/ + . diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/component-deploy.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/component-deploy.xml deleted file mode 100644 index b7006af084..0000000000 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/META-INF/MANIFEST.MF index 49c0c711f7..c487d8fef5 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/META-INF/MANIFEST.MF @@ -7,7 +7,6 @@ Bundle-Vendor: RAYTHEON Eclipse-RegisterBuddy: com.raytheon.edex.common, com.raytheon.uf.common.serialization Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Export-Package: com.raytheon.uf.common.dataplugin.binlightning, - com.raytheon.uf.common.dataplugin.binlightning.dao, com.raytheon.uf.common.dataplugin.binlightning.impl Require-Bundle: com.raytheon.edex.common, org.geotools, diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/build.properties b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/build.properties index 5791d48d5f..34d2e4d2da 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/build.properties +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/build.properties @@ -1,5 +1,4 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - .,\ - res/ + . diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/component-deploy.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/component-deploy.xml deleted file mode 100644 index 433bb481bd..0000000000 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.binlightning/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin/META-INF/MANIFEST.MF index 2ad7deddef..13c9207b94 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.dataplugin/META-INF/MANIFEST.MF @@ -14,11 +14,11 @@ Import-Package: com.raytheon.uf.common.time, org.hibernate.annotations Export-Package: com.raytheon.uf.common.dataplugin, com.raytheon.uf.common.dataplugin.annotations, - com.raytheon.uf.common.dataplugin.convert, com.raytheon.uf.common.dataplugin.defaults, com.raytheon.uf.common.dataplugin.persist, com.raytheon.uf.common.dataplugin.request Require-Bundle: com.raytheon.uf.common.localization;bundle-version="1.12.1174", com.raytheon.uf.common.status, com.raytheon.uf.common.serialization, - com.raytheon.uf.common.serialization.comm + com.raytheon.uf.common.serialization.comm, + com.raytheon.uf.common.util;bundle-version="1.12.1174" diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin/component-deploy.xml b/edexOsgi/com.raytheon.uf.common.dataplugin/component-deploy.xml deleted file mode 100644 index b539470dc5..0000000000 --- a/edexOsgi/com.raytheon.uf.common.dataplugin/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/PluginDataObject.java b/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/PluginDataObject.java index c36e85ebbf..89c059618c 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/PluginDataObject.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/PluginDataObject.java @@ -44,7 +44,6 @@ import org.hibernate.annotations.Index; import com.raytheon.uf.common.dataplugin.annotations.DataURI; import com.raytheon.uf.common.dataplugin.annotations.DataURIUtil; -import com.raytheon.uf.common.dataplugin.convert.ConvertUtil; import com.raytheon.uf.common.dataplugin.persist.DefaultPathProvider; import com.raytheon.uf.common.dataplugin.persist.IHDFFilePathProvider; import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject; @@ -54,6 +53,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.util.TimeUtil; +import com.raytheon.uf.common.util.ConvertUtil; /** * Abstract class from which all plugin specific data types inherit. A plugin diff --git a/edexOsgi/com.raytheon.uf.common.datastorage.remote/.project b/edexOsgi/com.raytheon.uf.common.datastorage.remote/.project deleted file mode 100644 index b14433e2ca..0000000000 --- a/edexOsgi/com.raytheon.uf.common.datastorage.remote/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - com.raytheon.uf.common.datastorage.remote - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/edexOsgi/com.raytheon.uf.common.datastorage.remote/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.datastorage.remote/META-INF/MANIFEST.MF deleted file mode 100644 index 2e0d0983b2..0000000000 --- a/edexOsgi/com.raytheon.uf.common.datastorage.remote/META-INF/MANIFEST.MF +++ /dev/null @@ -1,16 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Thrift Plug-in -Bundle-SymbolicName: com.raytheon.uf.common.datastorage.remote -Bundle-Version: 1.12.1174.qualifier -Bundle-Vendor: RAYTHEON -Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization -Require-Bundle: com.raytheon.uf.common.datastorage;bundle-version="1.11.11", - com.raytheon.uf.common.message;bundle-version="1.11.11", - com.raytheon.uf.common.serialization.comm;bundle-version="1.0.0", - com.raytheon.uf.common.serialization;bundle-version="1.11.12", - net.sf.cglib;bundle-version="2.1.3" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-ActivationPolicy: lazy -Export-Package: com.raytheon.uf.common.datastorage.remote.handlers, - com.raytheon.uf.common.datastorage.remote.requests diff --git a/edexOsgi/com.raytheon.uf.common.datastorage.remote/com.raytheon.uf.common.datastorage.remote.ecl b/edexOsgi/com.raytheon.uf.common.datastorage.remote/com.raytheon.uf.common.datastorage.remote.ecl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/edexOsgi/com.raytheon.uf.common.datastorage.remote/component-deploy.xml b/edexOsgi/com.raytheon.uf.common.datastorage.remote/component-deploy.xml deleted file mode 100644 index 1d97dc7e9a..0000000000 --- a/edexOsgi/com.raytheon.uf.common.datastorage.remote/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.datastorage.remote/res/spring/rdatastorage-request.xml b/edexOsgi/com.raytheon.uf.common.datastorage.remote/res/spring/rdatastorage-request.xml deleted file mode 100644 index fadb69b369..0000000000 --- a/edexOsgi/com.raytheon.uf.common.datastorage.remote/res/spring/rdatastorage-request.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.datastorage.remote/src/com/raytheon/uf/common/datastorage/remote/handlers/RetrieveDataHandler.java b/edexOsgi/com.raytheon.uf.common.datastorage.remote/src/com/raytheon/uf/common/datastorage/remote/handlers/RetrieveDataHandler.java deleted file mode 100644 index 2bcc6dc9a6..0000000000 --- a/edexOsgi/com.raytheon.uf.common.datastorage.remote/src/com/raytheon/uf/common/datastorage/remote/handlers/RetrieveDataHandler.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.common.datastorage.remote.handlers; - -import java.io.File; -import java.lang.reflect.Method; - -import com.raytheon.uf.common.datastorage.DataStoreFactory; -import com.raytheon.uf.common.datastorage.IDataStore; -import com.raytheon.uf.common.datastorage.records.IDataRecord; -import com.raytheon.uf.common.datastorage.remote.requests.ThriftDataRequest; -import com.raytheon.uf.common.datastorage.remote.requests.ThriftDataResponse; -import com.raytheon.uf.common.serialization.comm.IRequestHandler; - -/** - * Uses reflection to invoke an IDataStore method instead of creating a Handler - * for each method - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Aug 3, 2009            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class RetrieveDataHandler implements IRequestHandler { - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.thrift.IRequestHandler#handleRequest(com.raytheon - * .uf.common.thrift.IServerRequest) - */ - @Override - public Object handleRequest(ThriftDataRequest req) throws Exception { - File file = new File(req.getFile()); - if (file.getParentFile().exists() == false) { - file = new File(new File(System.getProperty("edex.home") - + File.separator + "data" + File.separator + "hdf5"), file - .getAbsolutePath()); - } - IDataStore store = DataStoreFactory.getDataStore(file); - Class[] classes = new Class[req.getParameterTypes().length]; - int i = 0; - for (String clazz : req.getParameterTypes()) { - classes[i++] = Class.forName(clazz); - } - Method m = store.getClass().getMethod(req.getMethod(), classes); - Object obj = m.invoke(store, req.getParameters()); - if (obj == null) { - throw new Exception("datastore returned null"); - } else if (obj instanceof IDataRecord) { - return new ThriftDataResponse((IDataRecord) obj); - } else if (obj instanceof IDataRecord[]) { - return new ThriftDataResponse((IDataRecord[]) obj); - } else if (obj instanceof String[]) { - return new ThriftDataResponse((String[]) obj); - } else { - throw new Exception("datastore returned invalid response object: " - + obj.getClass().getName()); - } - } -} diff --git a/edexOsgi/com.raytheon.uf.common.datastorage.remote/src/com/raytheon/uf/common/datastorage/remote/requests/ThriftDataRequest.java b/edexOsgi/com.raytheon.uf.common.datastorage.remote/src/com/raytheon/uf/common/datastorage/remote/requests/ThriftDataRequest.java deleted file mode 100644 index 880473b5f4..0000000000 --- a/edexOsgi/com.raytheon.uf.common.datastorage.remote/src/com/raytheon/uf/common/datastorage/remote/requests/ThriftDataRequest.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.common.datastorage.remote.requests; - -import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; -import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; -import com.raytheon.uf.common.serialization.comm.IServerRequest; - -/** - * Request for invoking a method on IDataStore using thrift. This class uses - * reflection heavily - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Aug 3, 2009            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ -@DynamicSerialize -public class ThriftDataRequest implements IServerRequest { - - @DynamicSerializeElement - private Object[] parameters; - - @DynamicSerializeElement - private String[] parameterTypes; - - @DynamicSerializeElement - private String file; - - @DynamicSerializeElement - private String method; - - @DynamicSerializeElement - private boolean useLocking; - - public Object[] getParameters() { - return parameters; - } - - public void setParameters(Object[] parameters) { - this.parameters = parameters; - } - - public String getFile() { - return file; - } - - public void setFile(String file) { - this.file = file; - } - - public String getMethod() { - return method; - } - - public void setMethod(String method) { - this.method = method; - } - - public boolean isUseLocking() { - return useLocking; - } - - public void setUseLocking(boolean useLocking) { - this.useLocking = useLocking; - } - - public String[] getParameterTypes() { - return parameterTypes; - } - - /** - * Sets the parameter types, these types are turned into classes using - * Class.forName on the server side. Needed for reflective method invocation - * - * @param parameterTypes - * should match up 1-1 with parameters - */ - public void setParameterTypes(String[] parameterTypes) { - this.parameterTypes = parameterTypes; - } - -} diff --git a/edexOsgi/com.raytheon.uf.common.datastorage.remote/src/com/raytheon/uf/common/datastorage/remote/requests/ThriftDataResponse.java b/edexOsgi/com.raytheon.uf.common.datastorage.remote/src/com/raytheon/uf/common/datastorage/remote/requests/ThriftDataResponse.java deleted file mode 100644 index 5d1fb6a27a..0000000000 --- a/edexOsgi/com.raytheon.uf.common.datastorage.remote/src/com/raytheon/uf/common/datastorage/remote/requests/ThriftDataResponse.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.common.datastorage.remote.requests; - -import com.raytheon.uf.common.datastorage.records.IDataRecord; -import com.raytheon.uf.common.serialization.ISerializableObject; -import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; -import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; - -/** - * Data response object - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Aug 18, 2009            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ -@DynamicSerialize -public class ThriftDataResponse implements ISerializableObject { - - @DynamicSerializeElement - private String[] datasets; - - @DynamicSerializeElement - private IDataRecord[] records; - - @DynamicSerializeElement - private IDataRecord record; - - public ThriftDataResponse() { - - } - - public ThriftDataResponse(String[] datsets) { - this.datasets = datsets; - } - - public ThriftDataResponse(IDataRecord[] records) { - this.records = records; - } - - public ThriftDataResponse(IDataRecord record) { - this.record = record; - } - - public String[] getDatasets() { - return datasets; - } - - public void setDatasets(String[] datasets) { - this.datasets = datasets; - } - - public IDataRecord[] getRecords() { - return records; - } - - public void setRecords(IDataRecord[] records) { - this.records = records; - } - - public IDataRecord getRecord() { - return record; - } - - public void setRecord(IDataRecord record) { - this.record = record; - } - -} diff --git a/edexOsgi/com.raytheon.uf.common.geospatial/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.geospatial/META-INF/MANIFEST.MF index 8f6a0bee35..6728fad0a0 100644 --- a/edexOsgi/com.raytheon.uf.common.geospatial/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.geospatial/META-INF/MANIFEST.MF @@ -14,11 +14,12 @@ Require-Bundle: org.geotools;bundle-version="2.5.2";visibility:=reexport, org.apache.commons.beanutils;bundle-version="1.8.3", com.raytheon.uf.common.serialization;bundle-version="1.12.1174", com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174", - com.raytheon.uf.common.dataquery;bundle-version="1.0.0" + com.raytheon.uf.common.dataquery;bundle-version="1.0.0", + com.raytheon.uf.common.status;bundle-version="1.12.1174", + com.raytheon.uf.common.util;bundle-version="1.12.1174" Export-Package: com.raytheon.uf.common.geospatial, com.raytheon.uf.common.geospatial.interpolation, com.raytheon.uf.common.geospatial.interpolation.data, com.raytheon.uf.common.geospatial.request, com.raytheon.uf.common.geospatial.spi, com.raytheon.uf.common.geospatial.util -Import-Package: com.raytheon.uf.common.status diff --git a/edexOsgi/com.raytheon.uf.common.geospatial/build.properties b/edexOsgi/com.raytheon.uf.common.geospatial/build.properties index 34d2e4d2da..5791d48d5f 100644 --- a/edexOsgi/com.raytheon.uf.common.geospatial/build.properties +++ b/edexOsgi/com.raytheon.uf.common.geospatial/build.properties @@ -1,4 +1,5 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - . + .,\ + res/ diff --git a/edexOsgi/com.raytheon.uf.common.geospatial/component-deploy.xml b/edexOsgi/com.raytheon.uf.common.geospatial/component-deploy.xml deleted file mode 100644 index b75ce2262e..0000000000 --- a/edexOsgi/com.raytheon.uf.common.geospatial/component-deploy.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.geospatial/res/spring/geo-common.xml b/edexOsgi/com.raytheon.uf.common.geospatial/res/spring/geo-common.xml new file mode 100644 index 0000000000..39c1caedf6 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.geospatial/res/spring/geo-common.xml @@ -0,0 +1,13 @@ + + + + + com.vividsolutions.jts.geom.Geometry + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.gridcoverage/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.gridcoverage/META-INF/MANIFEST.MF index d925f249b7..52c3666e0c 100644 --- a/edexOsgi/com.raytheon.uf.common.gridcoverage/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.gridcoverage/META-INF/MANIFEST.MF @@ -11,14 +11,6 @@ Import-Package: com.raytheon.uf.common.dataplugin, com.raytheon.uf.common.dataplugin.persist, com.raytheon.uf.common.dataquery.requests, com.raytheon.uf.common.dataquery.responses, - com.raytheon.uf.common.geospatial, - com.raytheon.uf.common.serialization, - com.raytheon.uf.common.serialization.annotations, - com.raytheon.uf.common.serialization.comm, - com.raytheon.uf.common.status, - com.vividsolutions.jts.geom, - javax.measure.converter, - javax.measure.unit, javax.persistence, org.apache.commons.beanutils, org.apache.commons.collections.map, @@ -31,4 +23,9 @@ Export-Package: com.raytheon.uf.common.gridcoverage, com.raytheon.uf.common.gridcoverage.request, com.raytheon.uf.common.gridcoverage.subgrid Require-Bundle: org.geotools;bundle-version="2.6.4", - com.raytheon.uf.common.serialization + com.raytheon.uf.common.serialization, + com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174", + com.raytheon.uf.common.units;bundle-version="1.0.0", + com.raytheon.uf.common.geospatial;bundle-version="1.12.1174", + com.raytheon.uf.common.status;bundle-version="1.12.1174", + com.raytheon.uf.common.util;bundle-version="1.12.1174" diff --git a/edexOsgi/com.raytheon.uf.common.gridcoverage/res/spring/gridcoverage-converter-common.xml b/edexOsgi/com.raytheon.uf.common.gridcoverage/res/spring/gridcoverage-converter-common.xml new file mode 100644 index 0000000000..d34784ecc7 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.gridcoverage/res/spring/gridcoverage-converter-common.xml @@ -0,0 +1,13 @@ + + + + + com.raytheon.uf.common.gridcoverage.GridCoverage + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.menus/build.properties b/edexOsgi/com.raytheon.uf.common.menus/build.properties index 5791d48d5f..34d2e4d2da 100644 --- a/edexOsgi/com.raytheon.uf.common.menus/build.properties +++ b/edexOsgi/com.raytheon.uf.common.menus/build.properties @@ -1,5 +1,4 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - .,\ - res/ + . diff --git a/edexOsgi/com.raytheon.uf.common.menus/component-deploy.xml b/edexOsgi/com.raytheon.uf.common.menus/component-deploy.xml deleted file mode 100644 index 62a3667948..0000000000 --- a/edexOsgi/com.raytheon.uf.common.menus/component-deploy.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.menus/res/spring/menu-request.xml b/edexOsgi/com.raytheon.uf.common.menus/res/spring/menu-request.xml deleted file mode 100644 index 2df0461185..0000000000 --- a/edexOsgi/com.raytheon.uf.common.menus/res/spring/menu-request.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.monitor/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.monitor/META-INF/MANIFEST.MF index 1d2419a551..31e85cef77 100644 --- a/edexOsgi/com.raytheon.uf.common.monitor/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.monitor/META-INF/MANIFEST.MF @@ -20,7 +20,7 @@ Require-Bundle: com.raytheon.uf.common.dataplugin;bundle-version="1.11.5", org.geotools;bundle-version="2.5.2", org.apache.commons.collections, com.raytheon.uf.common.geospatial;bundle-version="1.0.0", - com.raytheon.uf.common.dataplugin.binlightning;bundle-version="1.0.0", + com.raytheon.edex.plugin.binlightning;bundle-version="1.0.0", com.raytheon.uf.common.localization;bundle-version="1.11.17", org.eclipse.swt, com.raytheon.uf.common.dataplugin.grib;bundle-version="1.11.26", diff --git a/edexOsgi/com.raytheon.uf.common.monitor/component-deploy.xml b/edexOsgi/com.raytheon.uf.common.monitor/component-deploy.xml deleted file mode 100644 index bfed537159..0000000000 --- a/edexOsgi/com.raytheon.uf.common.monitor/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java index 1ad2be83d3..953162fb9a 100644 --- a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java +++ b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java @@ -38,9 +38,9 @@ import org.opengis.referencing.crs.ProjectedCRS; import org.opengis.referencing.datum.PixelInCell; import org.opengis.referencing.operation.TransformException; +import com.raytheon.edex.plugin.binlightning.dao.BinLightningDao; import com.raytheon.uf.common.dataplugin.PluginException; import com.raytheon.uf.common.dataplugin.binlightning.BinLightningRecord; -import com.raytheon.uf.common.dataplugin.binlightning.dao.BinLightningDao; import com.raytheon.uf.common.dataplugin.binlightning.impl.LtgStrikeType; import com.raytheon.uf.common.dataplugin.bufrua.UAObs; import com.raytheon.uf.common.dataplugin.bufrua.UAObsAdapter; diff --git a/edexOsgi/com.raytheon.uf.common.sounding/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.sounding/META-INF/MANIFEST.MF index eb127bece8..fe03e26a1c 100644 --- a/edexOsgi/com.raytheon.uf.common.sounding/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.sounding/META-INF/MANIFEST.MF @@ -15,8 +15,6 @@ Export-Package: com.raytheon.uf.common.sounding, com.raytheon.uf.common.sounding.adapter, com.raytheon.uf.common.sounding.util Import-Package: com.raytheon.uf.common.localization, - com.raytheon.uf.common.menus, - com.raytheon.uf.common.menus.xml, com.raytheon.uf.common.serialization, com.raytheon.uf.common.status, org.apache.commons.logging diff --git a/edexOsgi/com.raytheon.uf.common.sounding/build.properties b/edexOsgi/com.raytheon.uf.common.sounding/build.properties index 02bc25751f..34d2e4d2da 100644 --- a/edexOsgi/com.raytheon.uf.common.sounding/build.properties +++ b/edexOsgi/com.raytheon.uf.common.sounding/build.properties @@ -1,5 +1,4 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - .,\ - res/spring/ + . diff --git a/edexOsgi/com.raytheon.uf.common.sounding/component-deploy.xml b/edexOsgi/com.raytheon.uf.common.sounding/component-deploy.xml deleted file mode 100644 index 154d8ca27c..0000000000 --- a/edexOsgi/com.raytheon.uf.common.sounding/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.sounding/utility/edex_static/base/python/RaobPyUtil.py b/edexOsgi/com.raytheon.uf.common.sounding/utility/edex_static/base/python/RaobPyUtil.py deleted file mode 100644 index 00224794de..0000000000 --- a/edexOsgi/com.raytheon.uf.common.sounding/utility/edex_static/base/python/RaobPyUtil.py +++ /dev/null @@ -1,26 +0,0 @@ -## -# This software was developed and / or modified by Raytheon Company, -# pursuant to Contract DG133W-05-CQ-1067 with the US Government. -# -# U.S. EXPORT CONTROLLED TECHNICAL DATA -# This software product contains export-restricted data whose -# export/transfer/disclosure is restricted by U.S. law. Dissemination -# to non-U.S. persons whether in the United States or abroad requires -# an export license or other authorization. -# -# Contractor Name: Raytheon Company -# Contractor Address: 6825 Pine Street, Suite 340 -# Mail Stop B8 -# Omaha, NE 68106 -# 402.291.0100 -# -# See the AWIPS II Master Rights File ("Master Rights File.pdf") for -# further licensing information. -## -# to recreate the menu files for radar and scan - -def generateMenuFiles(): - from com.raytheon.uf.common.sounding.util import RaobMenuUtil - r = RaobMenuUtil() - from com.raytheon.uf.common.message.response import ResponseMessageGeneric - return ResponseMessageGeneric("Rebuilt upper air local menu files") \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.time/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.time/META-INF/MANIFEST.MF index 1d8d912e33..87f5b51597 100644 --- a/edexOsgi/com.raytheon.uf.common.time/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.time/META-INF/MANIFEST.MF @@ -7,12 +7,11 @@ Bundle-Vendor: RAYTHEON Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Require-Bundle: net.sf.cglib, net.jcip;bundle-version="1.0.0", - com.raytheon.uf.common.status;bundle-version="1.12.1174" -Import-Package: com.raytheon.uf.common.serialization, - com.raytheon.uf.common.serialization.adapters, - com.raytheon.uf.common.serialization.annotations, - com.raytheon.uf.common.serialization.comm, - javax.persistence, + com.raytheon.uf.common.status;bundle-version="1.12.1174", + com.raytheon.uf.common.serialization;bundle-version="1.12.1174", + com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174", + com.raytheon.uf.common.util;bundle-version="1.12.1174" +Import-Package: javax.persistence, org.apache.commons.beanutils, org.apache.commons.lang, org.apache.commons.lang.builder, diff --git a/edexOsgi/com.raytheon.uf.common.time/component-deploy.xml b/edexOsgi/com.raytheon.uf.common.time/component-deploy.xml deleted file mode 100644 index 37f87ff5e2..0000000000 --- a/edexOsgi/com.raytheon.uf.common.time/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.time/res/spring/time-common.xml b/edexOsgi/com.raytheon.uf.common.time/res/spring/time-common.xml index 499243104b..88165841ab 100644 --- a/edexOsgi/com.raytheon.uf.common.time/res/spring/time-common.xml +++ b/edexOsgi/com.raytheon.uf.common.time/res/spring/time-common.xml @@ -5,17 +5,17 @@ http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - + com.raytheon.uf.common.time.DataTime - + java.util.Calendar - + java.util.Date diff --git a/cave/com.raytheon.uf.viz.datastorage.remote/.classpath b/edexOsgi/com.raytheon.uf.common.units/.classpath similarity index 77% rename from cave/com.raytheon.uf.viz.datastorage.remote/.classpath rename to edexOsgi/com.raytheon.uf.common.units/.classpath index 1fa3e6803d..ad32c83a78 100644 --- a/cave/com.raytheon.uf.viz.datastorage.remote/.classpath +++ b/edexOsgi/com.raytheon.uf.common.units/.classpath @@ -1,6 +1,6 @@ - + diff --git a/cave/com.raytheon.uf.viz.datastorage.remote/.project b/edexOsgi/com.raytheon.uf.common.units/.project similarity index 92% rename from cave/com.raytheon.uf.viz.datastorage.remote/.project rename to edexOsgi/com.raytheon.uf.common.units/.project index c14cea0d16..a5e13db529 100644 --- a/cave/com.raytheon.uf.viz.datastorage.remote/.project +++ b/edexOsgi/com.raytheon.uf.common.units/.project @@ -1,6 +1,6 @@ - com.raytheon.uf.viz.datastorage.remote + com.raytheon.uf.common.units diff --git a/cots/org.springframework.dm/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/com.raytheon.uf.common.units/.settings/org.eclipse.jdt.core.prefs similarity index 92% rename from cots/org.springframework.dm/.settings/org.eclipse.jdt.core.prefs rename to edexOsgi/com.raytheon.uf.common.units/.settings/org.eclipse.jdt.core.prefs index 05ddb3ae5c..5df4e25912 100644 --- a/cots/org.springframework.dm/.settings/org.eclipse.jdt.core.prefs +++ b/edexOsgi/com.raytheon.uf.common.units/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,4 @@ -#Wed Oct 13 11:24:37 CDT 2010 +#Mon Nov 05 16:48:55 CST 2012 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 diff --git a/edexOsgi/com.raytheon.uf.common.units/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.units/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..c46b0bd322 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.units/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Units +Bundle-SymbolicName: com.raytheon.uf.common.units +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: RAYTHEON +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Require-Bundle: javax.measure;bundle-version="1.0.0";visibility:=reexport, + com.raytheon.uf.common.util;bundle-version="1.12.1174", + org.apache.commons.beanutils;bundle-version="1.8.3" +Export-Package: com.raytheon.uf.common.units diff --git a/edexOsgi/com.raytheon.uf.common.datastorage.remote/build.properties b/edexOsgi/com.raytheon.uf.common.units/build.properties similarity index 100% rename from edexOsgi/com.raytheon.uf.common.datastorage.remote/build.properties rename to edexOsgi/com.raytheon.uf.common.units/build.properties diff --git a/edexOsgi/com.raytheon.uf.common.units/res/spring/units-common.xml b/edexOsgi/com.raytheon.uf.common.units/res/spring/units-common.xml new file mode 100644 index 0000000000..84e01dc0d4 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.units/res/spring/units-common.xml @@ -0,0 +1,13 @@ + + + + + javax.measure.unit.Unit + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/convert/UnitConverter.java b/edexOsgi/com.raytheon.uf.common.units/src/com/raytheon/uf/common/units/UnitConverter.java similarity index 94% rename from edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/convert/UnitConverter.java rename to edexOsgi/com.raytheon.uf.common.units/src/com/raytheon/uf/common/units/UnitConverter.java index aa70f3f2fc..e88faa4c19 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/convert/UnitConverter.java +++ b/edexOsgi/com.raytheon.uf.common.units/src/com/raytheon/uf/common/units/UnitConverter.java @@ -18,7 +18,7 @@ * further licensing information. **/ -package com.raytheon.uf.common.dataplugin.convert; +package com.raytheon.uf.common.units; import java.text.ParseException; @@ -41,7 +41,7 @@ import org.apache.commons.beanutils.Converter; */ public class UnitConverter implements Converter { - @SuppressWarnings("unchecked") + @SuppressWarnings("rawtypes") @Override public Object convert(Class clazz, Object value) { if (value instanceof String) { diff --git a/edexOsgi/com.raytheon.uf.common.util/component-deploy.xml b/edexOsgi/com.raytheon.uf.common.util/component-deploy.xml deleted file mode 100644 index 15709bdd0b..0000000000 --- a/edexOsgi/com.raytheon.uf.common.util/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/convert/ConvertUtil.java b/edexOsgi/com.raytheon.uf.common.util/src/com/raytheon/uf/common/util/ConvertUtil.java similarity index 98% rename from edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/convert/ConvertUtil.java rename to edexOsgi/com.raytheon.uf.common.util/src/com/raytheon/uf/common/util/ConvertUtil.java index 0986863af2..5bf7204cff 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/convert/ConvertUtil.java +++ b/edexOsgi/com.raytheon.uf.common.util/src/com/raytheon/uf/common/util/ConvertUtil.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.common.dataplugin.convert; +package com.raytheon.uf.common.util; import java.lang.reflect.Field; import java.util.Calendar; diff --git a/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml b/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml index 8484870e30..15b219d757 100644 --- a/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml +++ b/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml @@ -73,13 +73,6 @@ version="0.0.0" unpack="false"/> - - + + + + - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.dat.utils/res/spring/dat-request.xml b/edexOsgi/com.raytheon.uf.edex.dat.utils/res/spring/dat-request.xml index b675c610e6..820c8ed7c4 100644 --- a/edexOsgi/com.raytheon.uf.edex.dat.utils/res/spring/dat-request.xml +++ b/edexOsgi/com.raytheon.uf.edex.dat.utils/res/spring/dat-request.xml @@ -5,7 +5,6 @@ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - diff --git a/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/DatMenuUtil.java b/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/DatMenuUtil.java index 39877637bd..db2f36252e 100644 --- a/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/DatMenuUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.dat.utils/src/com/raytheon/uf/edex/dat/utils/DatMenuUtil.java @@ -30,7 +30,6 @@ import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; import com.raytheon.uf.common.localization.LocalizationFile; import com.raytheon.uf.common.localization.PathManager; import com.raytheon.uf.common.localization.PathManagerFactory; -import com.raytheon.uf.common.menus.AbstractMenuUtil; import com.raytheon.uf.common.menus.xml.CommonAbstractMenuContribution; import com.raytheon.uf.common.menus.xml.CommonIncludeMenuContribution; import com.raytheon.uf.common.menus.xml.CommonIncludeMenuItem; @@ -50,6 +49,7 @@ import com.raytheon.uf.common.monitor.xml.ProductXML; import com.raytheon.uf.common.monitor.xml.SourceXML; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; +import com.raytheon.uf.edex.menus.AbstractMenuUtil; /** * TODO Add Description diff --git a/edexOsgi/com.raytheon.uf.edex.database/component-deploy.xml b/edexOsgi/com.raytheon.uf.edex.database/component-deploy.xml deleted file mode 100644 index 5ce82feb6c..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.database/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/query/DatabaseQuery.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/query/DatabaseQuery.java index 7235404136..2e195101c6 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/query/DatabaseQuery.java +++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/query/DatabaseQuery.java @@ -34,13 +34,13 @@ import org.hibernate.SQLQuery; import org.hibernate.SessionFactory; import org.hibernate.metadata.ClassMetadata; -import com.raytheon.uf.common.dataplugin.convert.ConvertUtil; import com.raytheon.uf.common.dataquery.db.JoinField; import com.raytheon.uf.common.dataquery.db.OrderField; import com.raytheon.uf.common.dataquery.db.OrderField.ResultOrder; import com.raytheon.uf.common.dataquery.db.QueryParam; import com.raytheon.uf.common.dataquery.db.QueryParam.QueryOperand; import com.raytheon.uf.common.dataquery.db.ReturnedField; +import com.raytheon.uf.common.util.ConvertUtil; import com.raytheon.uf.edex.database.DataAccessLayerException; /** diff --git a/edexOsgi/com.raytheon.uf.edex.gridcoverage/res/spring/gridcoverage-common.xml b/edexOsgi/com.raytheon.uf.edex.gridcoverage/res/spring/gridcoverage-common.xml index 1a073842eb..74fa64e264 100644 --- a/edexOsgi/com.raytheon.uf.edex.gridcoverage/res/spring/gridcoverage-common.xml +++ b/edexOsgi/com.raytheon.uf.edex.gridcoverage/res/spring/gridcoverage-common.xml @@ -19,18 +19,6 @@ - - - - - - com.raytheon.uf.common.gridcoverage.GridCoverage - - - - - + diff --git a/cots/org.springframework.dm/.project b/edexOsgi/com.raytheon.uf.edex.menus/.project similarity index 93% rename from cots/org.springframework.dm/.project rename to edexOsgi/com.raytheon.uf.edex.menus/.project index 4b0e634a65..94e603dbc3 100644 --- a/cots/org.springframework.dm/.project +++ b/edexOsgi/com.raytheon.uf.edex.menus/.project @@ -1,6 +1,6 @@ - org.springframework.dm + com.raytheon.uf.edex.menus diff --git a/edexOsgi/com.raytheon.uf.common.datastorage.remote/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/com.raytheon.uf.edex.menus/.settings/org.eclipse.jdt.core.prefs similarity index 75% rename from edexOsgi/com.raytheon.uf.common.datastorage.remote/.settings/org.eclipse.jdt.core.prefs rename to edexOsgi/com.raytheon.uf.edex.menus/.settings/org.eclipse.jdt.core.prefs index b938cd0361..4ce6e190d5 100644 --- a/edexOsgi/com.raytheon.uf.common.datastorage.remote/.settings/org.eclipse.jdt.core.prefs +++ b/edexOsgi/com.raytheon.uf.edex.menus/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,6 @@ -#Fri Jul 31 08:04:53 CDT 2009 +#Fri Nov 02 09:55:31 CDT 2012 eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error diff --git a/edexOsgi/com.raytheon.uf.edex.menus/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.menus/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..a69beddf3a --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.menus/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Edex Menus +Bundle-SymbolicName: com.raytheon.uf.edex.menus +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: RAYTHEON +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Require-Bundle: com.raytheon.uf.common.menus;bundle-version="1.12.1174";visibility:=reexport, + com.raytheon.uf.common.localization;bundle-version="1.12.1174", + com.raytheon.uf.common.status;bundle-version="1.12.1174", + com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174", + com.raytheon.uf.common.serialization;bundle-version="1.12.1174", + com.raytheon.uf.common.util;bundle-version="1.12.1174" +Export-Package: com.raytheon.uf.edex.menus diff --git a/cave/com.raytheon.uf.viz.datastorage.remote/build.properties b/edexOsgi/com.raytheon.uf.edex.menus/build.properties similarity index 60% rename from cave/com.raytheon.uf.viz.datastorage.remote/build.properties rename to edexOsgi/com.raytheon.uf.edex.menus/build.properties index 34d2e4d2da..5791d48d5f 100644 --- a/cave/com.raytheon.uf.viz.datastorage.remote/build.properties +++ b/edexOsgi/com.raytheon.uf.edex.menus/build.properties @@ -1,4 +1,5 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - . + .,\ + res/ diff --git a/edexOsgi/com.raytheon.uf.edex.menus/res/spring/menus-request.xml b/edexOsgi/com.raytheon.uf.edex.menus/res/spring/menus-request.xml new file mode 100644 index 0000000000..7aeb8f380e --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.menus/res/spring/menus-request.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.menus/src/com/raytheon/uf/common/menus/AbstractMenuUtil.java b/edexOsgi/com.raytheon.uf.edex.menus/src/com/raytheon/uf/edex/menus/AbstractMenuUtil.java similarity index 98% rename from edexOsgi/com.raytheon.uf.common.menus/src/com/raytheon/uf/common/menus/AbstractMenuUtil.java rename to edexOsgi/com.raytheon.uf.edex.menus/src/com/raytheon/uf/edex/menus/AbstractMenuUtil.java index d598410eb1..18794df88d 100644 --- a/edexOsgi/com.raytheon.uf.common.menus/src/com/raytheon/uf/common/menus/AbstractMenuUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.menus/src/com/raytheon/uf/edex/menus/AbstractMenuUtil.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.common.menus; +package com.raytheon.uf.edex.menus; import java.io.File; import java.io.IOException; @@ -35,6 +35,7 @@ import com.raytheon.uf.common.localization.PathManager; import com.raytheon.uf.common.localization.PathManagerFactory; import com.raytheon.uf.common.localization.exception.LocalizationException; import com.raytheon.uf.common.localization.exception.LocalizationOpFailedException; +import com.raytheon.uf.common.menus.MenuSerialization; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; diff --git a/edexOsgi/com.raytheon.uf.common.menus/src/com/raytheon/uf/common/menus/MenuCreationHandler.java b/edexOsgi/com.raytheon.uf.edex.menus/src/com/raytheon/uf/edex/menus/MenuCreationHandler.java similarity index 96% rename from edexOsgi/com.raytheon.uf.common.menus/src/com/raytheon/uf/common/menus/MenuCreationHandler.java rename to edexOsgi/com.raytheon.uf.edex.menus/src/com/raytheon/uf/edex/menus/MenuCreationHandler.java index d0677a0d7d..d51f6c733b 100644 --- a/edexOsgi/com.raytheon.uf.common.menus/src/com/raytheon/uf/common/menus/MenuCreationHandler.java +++ b/edexOsgi/com.raytheon.uf.edex.menus/src/com/raytheon/uf/edex/menus/MenuCreationHandler.java @@ -17,8 +17,9 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.common.menus; +package com.raytheon.uf.edex.menus; +import com.raytheon.uf.common.menus.MenuCreationRequest; import com.raytheon.uf.common.serialization.comm.IRequestHandler; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; diff --git a/edexOsgi/com.raytheon.uf.common.menus/src/com/raytheon/uf/common/menus/MenuCreationRegistry.java b/edexOsgi/com.raytheon.uf.edex.menus/src/com/raytheon/uf/edex/menus/MenuCreationRegistry.java similarity index 97% rename from edexOsgi/com.raytheon.uf.common.menus/src/com/raytheon/uf/common/menus/MenuCreationRegistry.java rename to edexOsgi/com.raytheon.uf.edex.menus/src/com/raytheon/uf/edex/menus/MenuCreationRegistry.java index 255efe9bae..aa488acf1d 100644 --- a/edexOsgi/com.raytheon.uf.common.menus/src/com/raytheon/uf/common/menus/MenuCreationRegistry.java +++ b/edexOsgi/com.raytheon.uf.edex.menus/src/com/raytheon/uf/edex/menus/MenuCreationRegistry.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.common.menus; +package com.raytheon.uf.edex.menus; import com.raytheon.uf.common.util.registry.GenericRegistry; diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/component-deploy.xml b/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/component-deploy.xml deleted file mode 100644 index dcf9730239..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/res/spring/acars-sounding-plugin.xml b/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/res/spring/acars-sounding-plugin.xml deleted file mode 100644 index 6d13b53ce2..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/res/spring/acars-sounding-plugin.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/res/spring/acarssounding-common.xml b/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/res/spring/acarssounding-common.xml similarity index 100% rename from edexOsgi/com.raytheon.uf.common.dataplugin.acarssounding/res/spring/acarssounding-common.xml rename to edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/res/spring/acarssounding-common.xml diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/res/spring/acarssounding-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/res/spring/acarssounding-ingest.xml index 67834c612d..74d5ea4bb9 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/res/spring/acarssounding-ingest.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.acarssounding/res/spring/acarssounding-ingest.xml @@ -6,6 +6,10 @@ + + + + @@ -15,7 +19,7 @@ - @@ -63,5 +67,9 @@ + + + + \ No newline at end of file