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 07d4a28f0b..996ef760a8 100644 --- a/cave/com.raytheon.uf.viz.common.core.feature/feature.xml +++ b/cave/com.raytheon.uf.viz.common.core.feature/feature.xml @@ -220,6 +220,13 @@ install-size="0" version="0.0.0" unpack="false"/> + + + * + * SOFTWARE HISTORY + * + * Date Ticket# Engineer Description + * ------------ ---------- ----------- -------------------------- + * Nov 5, 2012 1302 djohnson Initial creation + * + * + * + * @author djohnson + * @version 1.0 + */ + +public class VizServers { + + private static final VizServers INSTANCE = new VizServers(); + + /** + * @return the instance + */ + public static VizServers getInstance() { + return INSTANCE; + } + + private Map serverLocations; + + private VizServers() { + } + + /** + * Retrieves a server location. + * + * @param key + * the key used as the server name + * @return the location of the server + * @throws NullPointerException + * if the server locations have not been initialized yet + */ + public String getServerLocation(final String key) { + if (serverLocations == null) { + throw new NullPointerException("serverLocations must not be null!"); + } + return serverLocations.get(key); + } + + /** + * @param serverLocations2 + */ + public void setServerLocations(Map serverLocations2) { + this.serverLocations = Collections.unmodifiableMap(serverLocations2); + } +} diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/auth/IUserManager.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/auth/IUserManager.java index af71a8e8db..fc0d61f4ec 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/auth/IUserManager.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/auth/IUserManager.java @@ -19,7 +19,11 @@ **/ package com.raytheon.uf.viz.core.auth; +import java.util.List; + import com.raytheon.uf.common.auth.user.IAuthenticationData; +import com.raytheon.uf.common.auth.user.IPermission; +import com.raytheon.uf.common.auth.user.IRole; import com.raytheon.uf.common.auth.user.IUser; import com.raytheon.uf.viz.core.requests.INotAuthHandler; @@ -32,6 +36,7 @@ import com.raytheon.uf.viz.core.requests.INotAuthHandler; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * May 21, 2010 mschenke Initial creation + * Nov 06, 2012 1302 djohnson Add ability to get roles/permissions for an application. * * * @@ -46,7 +51,7 @@ public interface IUserManager { * * @return */ - public IUser getUserObject(); + IUser getUserObject(); /** * Update the user object with the authentication data update @@ -54,7 +59,7 @@ public interface IUserManager { * @param user * @param authData */ - public void updateUserObject(IUser user, IAuthenticationData authData); + void updateUserObject(IUser user, IAuthenticationData authData); /** * Get the handler for UserNotAuthenticated and UserNotAuthorized response @@ -62,5 +67,22 @@ public interface IUserManager { * * @return */ - public INotAuthHandler getNotAuthHandler(); + INotAuthHandler getNotAuthHandler(); + + /** + * Get the list of permissions. + * + * @param application + * the application + * + * @return the permissions + */ + List getPermissions(String application); + + /** + * Get the list of roles. + * + * @return the list of roles + */ + List getRoles(String application); } diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/auth/UserController.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/auth/UserController.java index 5e92aa0102..a6f50a0a6e 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/auth/UserController.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/auth/UserController.java @@ -19,6 +19,9 @@ **/ package com.raytheon.uf.viz.core.auth; +import java.util.Collections; +import java.util.List; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtension; @@ -29,6 +32,8 @@ import org.eclipse.core.runtime.Platform; import com.raytheon.uf.common.auth.resp.UserNotAuthenticated; import com.raytheon.uf.common.auth.resp.UserNotAuthorized; import com.raytheon.uf.common.auth.user.IAuthenticationData; +import com.raytheon.uf.common.auth.user.IPermission; +import com.raytheon.uf.common.auth.user.IRole; import com.raytheon.uf.common.auth.user.IUser; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; @@ -45,6 +50,7 @@ import com.raytheon.uf.viz.core.requests.INotAuthHandler; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * May 21, 2010 mschenke Initial creation + * Nov 06, 2012 1302 djohnson Add ability to retrieve the {@link IUserManager}. * * * @@ -53,12 +59,12 @@ import com.raytheon.uf.viz.core.requests.INotAuthHandler; */ public class UserController { - private static transient IUFStatusHandler statusHandler = UFStatus + private static IUFStatusHandler statusHandler = UFStatus .getHandler(UserController.class, "CAVE"); private static final String EXTENSION_POINT = "com.raytheon.uf.viz.core.userManager"; - private static IUserManager manager = null; + private static IUserManager manager; static { IExtensionRegistry registry = Platform.getExtensionRegistry(); @@ -124,10 +130,24 @@ public class UserController { }; } + /** + * {@inheritDoc} + */ + @Override + public List getPermissions(String application) { + return Collections.emptyList(); + } + + @Override + public List getRoles(String application) { + return Collections.emptyList(); + } + }; } } + public static IUser getUserObject() { return manager.getUserObject(); } @@ -140,4 +160,10 @@ public class UserController { return manager.getNotAuthHandler(); } + /** + * @return the manager + */ + public static IUserManager getManager() { + return manager; + } } diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/localization/LocalizationInitializer.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/localization/LocalizationInitializer.java index 4fa546e591..92c4199739 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/localization/LocalizationInitializer.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/localization/LocalizationInitializer.java @@ -32,6 +32,7 @@ import com.raytheon.uf.common.localization.msgs.GetServersRequest; import com.raytheon.uf.common.localization.msgs.GetServersResponse; import com.raytheon.uf.common.util.FileUtil; import com.raytheon.uf.viz.core.VizApp; +import com.raytheon.uf.viz.core.VizServers; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.requests.ThriftClient; @@ -116,8 +117,6 @@ public class LocalizationInitializer { VizApp.setJmsServer(resp.getJmsServer()); VizApp.setPypiesServer(resp.getPypiesServer()); VizApp.setServerDataDir(resp.getServerDataDir()); - VizApp.setDataDeliveryServer(resp.getDataDeliveryServer()); - VizApp.setDataDeliveryLcmServer(resp.getDataDeliveryLcmServer()); - VizApp.setDataDeliveryQueryServer(resp.getDataDeliveryQueryServer()); + VizServers.getInstance().setServerLocations(resp.getServerLocations()); } } diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/localization/LocalizationManager.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/localization/LocalizationManager.java index 2300b3c721..bc2b6fb97e 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/localization/LocalizationManager.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/localization/LocalizationManager.java @@ -73,6 +73,7 @@ import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.viz.application.ProgramArguments; import com.raytheon.uf.viz.core.VizApp; +import com.raytheon.uf.viz.core.VizServers; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.requests.PrivilegedRequestFactory; import com.raytheon.uf.viz.core.requests.ServerRequestException; @@ -226,11 +227,9 @@ public class LocalizationManager implements IPropertyChangeListener { VizApp.setHttpServer(resp.getHttpServer()); VizApp.setJmsServer(resp.getJmsServer()); VizApp.setPypiesServer(resp.getPypiesServer()); - VizApp.setDataDeliveryServer(resp.getDataDeliveryServer()); - VizApp.setDataDeliveryLcmServer(resp.getDataDeliveryLcmServer()); - VizApp.setDataDeliveryQueryServer(resp - .getDataDeliveryQueryServer()); VizApp.setServerDataDir(resp.getServerDataDir()); + VizServers.getInstance().setServerLocations( + resp.getServerLocations()); } catch (VizException e) { statusHandler.handle(UFStatus.Priority.SIGNIFICANT, "Error connecting to localization server", e); diff --git a/cave/com.raytheon.uf.viz.cots.feature/feature.xml b/cave/com.raytheon.uf.viz.cots.feature/feature.xml index 120f9ad9b5..10e5cf6d94 100644 --- a/cave/com.raytheon.uf.viz.cots.feature/feature.xml +++ b/cave/com.raytheon.uf.viz.cots.feature/feature.xml @@ -360,12 +360,5 @@ install-size="0" version="0.0.0" unpack="false"/> - - diff --git a/cave/com.raytheon.uf.viz.feature.alertviz/feature.xml b/cave/com.raytheon.uf.viz.feature.alertviz/feature.xml index 0c9d401a24..93879e98bb 100644 --- a/cave/com.raytheon.uf.viz.feature.alertviz/feature.xml +++ b/cave/com.raytheon.uf.viz.feature.alertviz/feature.xml @@ -153,13 +153,6 @@ download-size="0" install-size="0" version="0.0.0"/> - - - + + + * @@ -64,11 +65,11 @@ import com.raytheon.viz.ui.perspectives.AbstractVizPerspectiveManager; public class LocalizationPerspectiveManager extends AbstractVizPerspectiveManager { - private static final transient IUFStatusHandler statusHandler = UFStatus + private static final IUFStatusHandler statusHandler = UFStatus .getHandler(LocalizationPerspectiveManager.class); /** The edit position restore map */ - private Map restoreMap = new HashMap(); + private final Map restoreMap = new HashMap(); public LocalizationPerspectiveManager() { saveEditors = true; @@ -155,7 +156,6 @@ public class LocalizationPerspectiveManager extends Priority.PROBLEM, "Error setting up python interpreter: " + t.getLocalizedMessage(), t); - t.printStackTrace(); } } diff --git a/cave/com.raytheon.uf.viz.monitor/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.monitor/META-INF/MANIFEST.MF index a5730f26c9..e28356a7ee 100644 --- a/cave/com.raytheon.uf.viz.monitor/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.monitor/META-INF/MANIFEST.MF @@ -17,7 +17,8 @@ Require-Bundle: org.eclipse.ui, com.raytheon.uf.edex.plugin.mesowest;bundle-version="1.0.0", com.raytheon.uf.edex.decodertools;bundle-version="1.0.0", org.apache.commons.logging;bundle-version="1.0.4", - com.raytheon.uf.common.monitor;bundle-version="1.11.17" + com.raytheon.uf.common.monitor;bundle-version="1.11.17", + org.apache.commons.lang;bundle-version="2.3.0" Bundle-ActivationPolicy: lazy Export-Package: com.raytheon.uf.viz.monitor, com.raytheon.uf.viz.monitor.data, diff --git a/cave/com.raytheon.uf.viz.plugin.nwsauth/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.plugin.nwsauth/META-INF/MANIFEST.MF index 556964ae8b..4eea9f3427 100644 --- a/cave/com.raytheon.uf.viz.plugin.nwsauth/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.uf.viz.plugin.nwsauth/META-INF/MANIFEST.MF @@ -11,3 +11,4 @@ Require-Bundle: org.eclipse.core.runtime, com.raytheon.uf.viz.core Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-ActivationPolicy: lazy +Export-Package: com.raytheon.uf.viz.plugin.nwsauth diff --git a/cave/com.raytheon.uf.viz.plugin.nwsauth/src/com/raytheon/uf/viz/plugin/nwsauth/FileManager.java b/cave/com.raytheon.uf.viz.plugin.nwsauth/src/com/raytheon/uf/viz/plugin/nwsauth/FileManager.java new file mode 100644 index 0000000000..7934ecd493 --- /dev/null +++ b/cave/com.raytheon.uf.viz.plugin.nwsauth/src/com/raytheon/uf/viz/plugin/nwsauth/FileManager.java @@ -0,0 +1,382 @@ +/** + * 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.plugin.nwsauth; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import javax.xml.bind.Unmarshaller; + +import com.raytheon.uf.common.auth.user.IPermission; +import com.raytheon.uf.common.auth.user.IRole; +import com.raytheon.uf.common.localization.IPathManager; +import com.raytheon.uf.common.localization.LocalizationContext; +import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; +import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; +import com.raytheon.uf.common.localization.LocalizationFile; +import com.raytheon.uf.common.localization.PathManagerFactory; +import com.raytheon.uf.common.localization.exception.LocalizationOpFailedException; +import com.raytheon.uf.common.plugin.nwsauth.NwsPermission; +import com.raytheon.uf.common.plugin.nwsauth.NwsRole; +import com.raytheon.uf.common.plugin.nwsauth.xml.NwsRoleData; +import com.raytheon.uf.common.plugin.nwsauth.xml.PermissionXML; +import com.raytheon.uf.common.plugin.nwsauth.xml.RoleXML; +import com.raytheon.uf.common.plugin.nwsauth.xml.UserXML; +import com.raytheon.uf.common.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; +import com.raytheon.uf.common.status.UFStatus.Priority; + +/** + * Uses localization data to determine role/permissions. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * May 30, 2012            mpduff     Initial creation
+ * Nov 06, 2012 1302       djohnson   Move to nwsauth plugin.
+ * 
+ * 
+ * + * @author mpduff + * @version 1.0 + */ + +public class FileManager { + /** Status handler */ + private static final IUFStatusHandler statusHandler = UFStatus + .getHandler(FileManager.class); + + private static final FileManager instance = new FileManager(); + + private final String ROLE_DIR = "roles"; + + /** JAXB context */ + private JAXBContext jax; + + /** Marshaller object */ + private Marshaller marshaller; + + /** Unmarshaller object */ + private Unmarshaller unmarshaller; + + private final Map roleDataMap = new HashMap(); + + /** + * Application name -> LocalizationFile map. + */ + private final Map roleFileMap = new HashMap(); + + private FileManager() { + createContext(); + readXML(); + } + + /** + * Get an instance. + * + * @return an instance + */ + public static FileManager getInstance() { + return instance; + } + + private void createContext() { + @SuppressWarnings("rawtypes") + Class[] classes = new Class[] { NwsRoleData.class, PermissionXML.class, + RoleXML.class, UserXML.class }; + + try { + jax = JAXBContext.newInstance(classes); + this.unmarshaller = jax.createUnmarshaller(); + this.marshaller = jax.createMarshaller(); + + // format the output xml file + this.marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); + + } catch (JAXBException e) { + e.printStackTrace(); + } + } + + /** + * Get the NwsRoleData object. + * + * @param application + * The application + * + * @return The NwsRoleData object + */ + public NwsRoleData getRoleData(String application) { + return this.roleDataMap.get(application); + } + + /** + * Get a list of user ids for the application. + * + * @param application + * the application + * @return String[] of user ids + */ + public String[] getUserIdList(String application) { + ArrayList userNameList = new ArrayList(); + for (UserXML ux : this.roleDataMap.get(application).getUserList()) { + userNameList.add(ux.getUserId()); + } + + return userNameList.toArray(new String[userNameList.size()]); + } + + /** + * Get an array of user roles. + * + * @param userId + * The user id + * @param application + * The application + * @return the array of roles + */ + public String[] getUserRoles(String userId, String application) { + ArrayList userRoles = new ArrayList(); + + for (UserXML userXml : this.roleDataMap.get(application).getUserList()) { + if (userXml.getUserId().equals(userId)) { + for (String role : userXml.getRoleList()) { + userRoles.add(role); + } + break; + } + } + + return userRoles.toArray(new String[userRoles.size()]); + } + + /** + * Get a list of user permissions. + * + * @param userId + * The user id + * @param application + * The application + * @return The array of user permissions + */ + public String[] getUserPermissions(String userId, String application) { + ArrayList userPermissions = new ArrayList(); + + for (UserXML userXml : this.roleDataMap.get(application).getUserList()) { + if (userXml.getUserId().equals(userId)) { + for (String permission : userXml.getPermissionList()) { + userPermissions.add(permission); + } + break; + } + } + + return userPermissions.toArray(new String[userPermissions.size()]); + } + + public String[] getRolePermissions(String roleId, String application) { + ArrayList rolePerms = new ArrayList(); + + for (RoleXML roleXml : roleDataMap.get(application).getRoleList()) { + if (roleXml.getRoleId().equals(roleId)) { + for (String perm : roleXml.getPermissionList()) { + rolePerms.add(perm); + } + } + } + + return rolePerms.toArray(new String[rolePerms.size()]); + } + + /** + * @param application + * @return + */ + public List getPermissions(String application) { + List permissions = new ArrayList(); + NwsRoleData roleData = roleDataMap.get(application); + + for (PermissionXML xml : roleData.getPermissionList()) { + String id = xml.getId(); + String description = xml.getDescription(); + permissions.add(new NwsPermission(id, description)); + } + return permissions; + } + + /** + * @return + */ + public List getRoles(String application) { + List roles = new ArrayList(); + for (NwsRoleData roleData : roleDataMap.values()) { + for (RoleXML xml : roleData.getRoleList()) { + String id = xml.getRoleId(); + String description = xml.getRoleDescription(); + roles.add(new NwsRole(id, + getPermissionsForRole(id, application), description)); + } + } + return roles; + } + + private List getPermissionsForRole(String roleId, + String application) { + List rolePerms = new ArrayList(); + List permissionIds = Arrays.asList(getRolePermissions(roleId, + application)); + + for (PermissionXML roleXml : roleDataMap.get(application) + .getPermissionList()) { + if (permissionIds.contains(roleXml.getId())) { + rolePerms.add(new NwsPermission(roleXml.getId(), roleXml + .getDescription())); + } + } + + return rolePerms; + } + + /** + * Return a list of applications that have roles/permissions defined. + * + * @return String[] of application names + */ + public String[] getApplications() { + return roleDataMap.keySet().toArray(new String[roleDataMap.size()]); + } + + public void addUser(String user, String application) { + if (user != null && user.length() > 0) { + UserXML userXml = new UserXML(); + userXml.setUserId(user); + this.roleDataMap.get(application).getUserList().add(userXml); + } + } + + public void addRole(String role, String description, String application) { + if (role != null && description != null && role.length() > 0 + && description.length() > 0) { + RoleXML roleXml = new RoleXML(); + roleXml.setRoleDescription(description); + roleXml.setRoleId(role); + this.roleDataMap.get(application).getRoleList().add(roleXml); + } + } + + public void deleteUser(String user, String application) { + if (user != null && user.length() > 0) { + int idx = -1; + for (UserXML u : roleDataMap.get(application).getUserList()) { + idx++; + if (u.getUserId().equalsIgnoreCase(user)) { + roleDataMap.get(application).getUserList().remove(idx); + break; + } + } + } + } + + public void deleteRole(String role, String application) { + if (role != null && role.length() > 0) { + int idx = -1; + for (RoleXML r : roleDataMap.get(application).getRoleList()) { + idx++; + if (r.getRoleId().equalsIgnoreCase(role)) { + roleDataMap.get(application).getRoleList().remove(idx); + break; + } + } + } + } + + /** + * Save the NwsRoleData object. + * + * @param application + */ + public void save(String application) { + NwsRoleData roleData = roleDataMap.get(application); + LocalizationFile lf = roleFileMap.get(application); + + IPathManager pm = PathManagerFactory.getPathManager(); + LocalizationContext context = pm.getContext( + LocalizationType.COMMON_STATIC, LocalizationLevel.SITE); + LocalizationFile locFile = pm + .getLocalizationFile(context, lf.getName()); + ; + + try { + marshaller.marshal(roleData, locFile.getFile()); + locFile.save(); + } catch (JAXBException e) { + statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e); + } catch (LocalizationOpFailedException e) { + statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e); + } + + } + + private void readXML() { + try { + IPathManager pm = PathManagerFactory.getPathManager(); + LocalizationContext[] contexts = new LocalizationContext[2]; + contexts[0] = pm.getContext(LocalizationType.COMMON_STATIC, + LocalizationLevel.BASE); + contexts[1] = pm.getContext(LocalizationType.COMMON_STATIC, + LocalizationLevel.SITE); + LocalizationFile[] roleFiles = pm.listFiles(contexts, ROLE_DIR, + null, false, true); + + for (LocalizationFile lf : roleFiles) { + File f = lf.getFile(true); + if (f != null && f.exists()) { + System.out.println(f.getAbsolutePath()); + NwsRoleData roleData = (NwsRoleData) unmarshaller + .unmarshal(f); + this.roleDataMap.put(roleData.getApplication(), roleData); + this.roleFileMap.put(roleData.getApplication(), lf); + } + } + } catch (JAXBException e1) { + statusHandler + .handle(Priority.PROBLEM, e1.getLocalizedMessage(), e1); + } catch (Exception e) { + statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e); + } + } + + /** + * Reload theXML files from disk. + */ + public void reloadXML() { + readXML(); + } +} diff --git a/cave/com.raytheon.uf.viz.plugin.nwsauth/src/com/raytheon/uf/viz/plugin/nwsauth/NwsUserManager.java b/cave/com.raytheon.uf.viz.plugin.nwsauth/src/com/raytheon/uf/viz/plugin/nwsauth/NwsUserManager.java index 044efd46fd..b3d527f677 100644 --- a/cave/com.raytheon.uf.viz.plugin.nwsauth/src/com/raytheon/uf/viz/plugin/nwsauth/NwsUserManager.java +++ b/cave/com.raytheon.uf.viz.plugin.nwsauth/src/com/raytheon/uf/viz/plugin/nwsauth/NwsUserManager.java @@ -19,7 +19,11 @@ **/ package com.raytheon.uf.viz.plugin.nwsauth; +import java.util.List; + import com.raytheon.uf.common.auth.user.IAuthenticationData; +import com.raytheon.uf.common.auth.user.IPermission; +import com.raytheon.uf.common.auth.user.IRole; import com.raytheon.uf.common.auth.user.IUser; import com.raytheon.uf.common.plugin.nwsauth.user.User; import com.raytheon.uf.viz.core.auth.IUserManager; @@ -43,7 +47,7 @@ import com.raytheon.uf.viz.core.requests.INotAuthHandler; public class NwsUserManager implements IUserManager { - private NwsNotAuthHandler notAuthHandler = new NwsNotAuthHandler(); + private final NwsNotAuthHandler notAuthHandler = new NwsNotAuthHandler(); /* * (non-Javadoc) @@ -78,4 +82,21 @@ public class NwsUserManager implements IUserManager { public void updateUserObject(IUser user, IAuthenticationData authData) { } + /** + * {@inheritDoc} + */ + @Override + public List getPermissions(String application) { + // TODO: Should this pass through to EDEX to get this stuff? + return FileManager.getInstance().getPermissions(application); + } + + /** + * {@inheritDoc} + */ + @Override + public List getRoles(String application) { + // TODO: Should this pass through to EDEX to get this stuff? + return FileManager.getInstance().getRoles(application); + } } diff --git a/cave/com.raytheon.viz.aviation/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.aviation/META-INF/MANIFEST.MF index d45d3260b7..002f22ab67 100644 --- a/cave/com.raytheon.viz.aviation/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.aviation/META-INF/MANIFEST.MF @@ -24,7 +24,8 @@ Require-Bundle: org.eclipse.ui, com.raytheon.uf.common.site, com.raytheon.viz.ui.personalities.awips;bundle-version="1.12.1174", com.raytheon.uf.viz.application;bundle-version="1.0.0", - com.raytheon.uf.common.tafqueue;bundle-version="1.0.0" + com.raytheon.uf.common.tafqueue;bundle-version="1.0.0", + org.apache.commons.lang;bundle-version="2.3.0" Bundle-ActivationPolicy: lazy Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization Export-Package: com.raytheon.viz.aviation, diff --git a/cave/com.raytheon.viz.avnconfig/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.avnconfig/META-INF/MANIFEST.MF index 00158a5e0e..b8dc665c46 100644 --- a/cave/com.raytheon.viz.avnconfig/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.avnconfig/META-INF/MANIFEST.MF @@ -9,7 +9,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, com.raytheon.uf.viz.core, com.raytheon.viz.ui;bundle-version="1.11.9", - org.geotools + org.geotools, + org.apache.commons.lang;bundle-version="2.3.0" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: com.raytheon.uf.common.dataplugin.persist, diff --git a/cave/com.raytheon.viz.feature.awips.developer/feature.xml b/cave/com.raytheon.viz.feature.awips.developer/feature.xml index 9ab0af6439..56fc0818dd 100644 --- a/cave/com.raytheon.viz.feature.awips.developer/feature.xml +++ b/cave/com.raytheon.viz.feature.awips.developer/feature.xml @@ -153,11 +153,15 @@ - + - + + + diff --git a/cave/com.raytheon.viz.grid/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.grid/META-INF/MANIFEST.MF index 0fe1eee7ec..47c5182e26 100644 --- a/cave/com.raytheon.viz.grid/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.grid/META-INF/MANIFEST.MF @@ -23,7 +23,8 @@ Require-Bundle: org.eclipse.ui, com.raytheon.uf.viz.productbrowser;bundle-version="1.11.31", com.raytheon.uf.common.dataplugin.radar;bundle-version="1.0.0", com.raytheon.uf.viz.points;bundle-version="1.0.0", - com.raytheon.uf.common.gridcoverage + com.raytheon.uf.common.gridcoverage, + org.apache.commons.beanutils;bundle-version="1.8.3" Bundle-ActivationPolicy: lazy Export-Package: com.raytheon.viz.grid, com.raytheon.viz.grid.inv, diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedTempResource.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedTempResource.java index 4576a0fdce..1bd05b9319 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedTempResource.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/PlotGriddedTempResource.java @@ -88,7 +88,8 @@ import com.vividsolutions.jts.geom.GeometryFactory; * Jun 30, 2009 2524 snaples Initial creation * Feb 29 2010 9909 lbousaidi changed the for loop for getting * the HRAP grid bin - * Apr 17, 2012 9602 mgamazaychikm Changed the HRAP grid j index for loop + * Apr 17, 2012 9602 mgamazaychikm Changed the HRAP grid j index for loop + * Nov 02, 2012 1302 djohnson Remove target.setUseBuiltinColorbar(). * * * @author snaples @@ -107,9 +108,9 @@ public class PlotGriddedTempResource extends private GridGeometry2D gridGeometry; - private float brightness = 1.0f; + private final float brightness = 1.0f; - private float contrast = 1.0f; + private final float contrast = 1.0f; private boolean isInterpolated; @@ -127,7 +128,7 @@ public class PlotGriddedTempResource extends private static final GeometryFactory gf = new GeometryFactory(); - private List colorSet; + private final List colorSet; Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid(); @@ -442,7 +443,6 @@ public class PlotGriddedTempResource extends protected void paintInternal(IGraphicsTarget target, PaintProperties paintProps) throws VizException { - target.setUseBuiltinColorbar(false); if (buf == null || DailyQcUtils.grids_flag != 1 || displayMgr.isMaxmin() != true) { return; diff --git a/cave/com.raytheon.viz.ui/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.ui/META-INF/MANIFEST.MF index 072d00907d..3250d6323d 100644 --- a/cave/com.raytheon.viz.ui/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.ui/META-INF/MANIFEST.MF @@ -28,6 +28,8 @@ Export-Package: com.raytheon.viz.ui, com.raytheon.viz.ui.panes, com.raytheon.viz.ui.parameter.converters, com.raytheon.viz.ui.perspectives, + com.raytheon.viz.ui.presenter, + com.raytheon.viz.ui.presenter.components, com.raytheon.viz.ui.statusline, com.raytheon.viz.ui.tools, com.raytheon.viz.ui.views, diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/IPresenterView.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/IPresenterView.java similarity index 97% rename from cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/IPresenterView.java rename to cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/IPresenterView.java index 0efc1bc753..4973e6622a 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/IPresenterView.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/IPresenterView.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.viz.core.presenter; +package com.raytheon.viz.ui.presenter; /** * A view interface that defines methods all views should provide an diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/ButtonConf.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/ButtonConf.java similarity index 98% rename from cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/ButtonConf.java rename to cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/ButtonConf.java index 9b55e191e7..5964e5bcd1 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/ButtonConf.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/ButtonConf.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.viz.core.presenter.components; +package com.raytheon.viz.ui.presenter.components; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/CheckBoxConf.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/CheckBoxConf.java similarity index 98% rename from cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/CheckBoxConf.java rename to cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/CheckBoxConf.java index e9d67ceda3..e2be4b7bce 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/CheckBoxConf.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/CheckBoxConf.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.viz.core.presenter.components; +package com.raytheon.viz.ui.presenter.components; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/ComboBoxConf.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/ComboBoxConf.java similarity index 98% rename from cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/ComboBoxConf.java rename to cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/ComboBoxConf.java index 063b1ded5c..2aacea3ef0 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/ComboBoxConf.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/ComboBoxConf.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.viz.core.presenter.components; +package com.raytheon.viz.ui.presenter.components; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/LabeledWidgetConf.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/LabeledWidgetConf.java similarity index 97% rename from cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/LabeledWidgetConf.java rename to cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/LabeledWidgetConf.java index 8a76f6522e..a5ed80b216 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/LabeledWidgetConf.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/LabeledWidgetConf.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.viz.core.presenter.components; +package com.raytheon.viz.ui.presenter.components; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/ListConf.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/ListConf.java similarity index 98% rename from cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/ListConf.java rename to cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/ListConf.java index 65f879d9b6..467d2c9a5d 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/ListConf.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/ListConf.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.viz.core.presenter.components; +package com.raytheon.viz.ui.presenter.components; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/WidgetConf.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/WidgetConf.java similarity index 97% rename from cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/WidgetConf.java rename to cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/WidgetConf.java index 944b07999d..13e9525713 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/presenter/components/WidgetConf.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/presenter/components/WidgetConf.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.viz.core.presenter.components; +package com.raytheon.viz.ui.presenter.components; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/widgets/duallist/IMenuData.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/widgets/duallist/IMenuData.java index 0776cc1c8f..144db7f93f 100644 --- a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/widgets/duallist/IMenuData.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/widgets/duallist/IMenuData.java @@ -23,20 +23,21 @@ package com.raytheon.viz.ui.widgets.duallist; import org.eclipse.swt.widgets.Shell; /** - * TODO Add Description + * Interface representing menu data. * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Jun 1, 2012            mpduff     Initial creation
- *
+ * Nov 02, 2012 1302       djohnson  Add javadoc.
+ * 
  * 
- * + * * @author mpduff - * @version 1.0 + * @version 1.0 */ public interface IMenuData { diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/widgets/duallist/IUpdate.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/widgets/duallist/IUpdate.java index 0c8916d9de..6fb307f825 100644 --- a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/widgets/duallist/IUpdate.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/widgets/duallist/IUpdate.java @@ -20,21 +20,22 @@ package com.raytheon.viz.ui.widgets.duallist; /** - * TODO Add Description + * Interface for an update. * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * May 31, 2012            mpduff     Initial creation.
  * Aug 08, 2012    863     jpiatt     Added selectedChange method for clean & dirty checks.
- *
+ * Nov 02, 2012 1302       djohnson   Add javadoc.
+ * 
  * 
- * + * * @author mpduff - * @version 1.0 + * @version 1.0 */ public interface IUpdate { @@ -50,5 +51,5 @@ public interface IUpdate { /** * Method called when a change in selection occurs. */ - public void selectionChanged(); + void selectionChanged(); } diff --git a/cave/ohd.hseb.common/.classpath b/cave/ohd.hseb.common/.classpath index 3385703d78..1c4954ee8c 100644 --- a/cave/ohd.hseb.common/.classpath +++ b/cave/ohd.hseb.common/.classpath @@ -7,6 +7,7 @@ +i diff --git a/cots/com.google.guava/.settings/org.eclipse.jdt.core.prefs b/cots/com.google.guava/.settings/org.eclipse.jdt.core.prefs index 9ea81993e4..1386d17f43 100644 --- a/cots/com.google.guava/.settings/org.eclipse.jdt.core.prefs +++ b/cots/com.google.guava/.settings/org.eclipse.jdt.core.prefs @@ -1,11 +1,5 @@ -<<<<<<< HEAD -#Wed Feb 15 11:40:52 CST 2012 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -======= #Thu Mar 26 11:28:33 CDT 2009 eclipse.preferences.version=1 ->>>>>>> development 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/cots/net.jcip/META-INF/MANIFEST.MF b/cots/net.jcip/META-INF/MANIFEST.MF deleted file mode 100644 index 2aa0f158d4..0000000000 --- a/cots/net.jcip/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Jcip Plugin -Bundle-SymbolicName: net.jcip -Bundle-Version: 1.0.0.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-ClassPath: jcip-annotations.jar, - . -Export-Package: net.jcip.annotations diff --git a/cots/net.jcip/jcip-annotations-src.jar b/cots/net.jcip/jcip-annotations-src.jar deleted file mode 100644 index bf52a507df..0000000000 Binary files a/cots/net.jcip/jcip-annotations-src.jar and /dev/null differ diff --git a/cots/net.jcip/jcip-annotations.jar b/cots/net.jcip/jcip-annotations.jar deleted file mode 100644 index ea263af054..0000000000 Binary files a/cots/net.jcip/jcip-annotations.jar and /dev/null differ diff --git a/cots/org.geotools/.classpath b/cots/org.geotools/.classpath index bb04b154d2..5303728d69 100644 --- a/cots/org.geotools/.classpath +++ b/cots/org.geotools/.classpath @@ -1,14 +1,14 @@ - - - - - - - - + + + + + + + + @@ -31,12 +31,9 @@ - - - @@ -45,13 +42,13 @@ - + - - - - - + + + + + diff --git a/cots/org.geotools/META-INF/MANIFEST.MF b/cots/org.geotools/META-INF/MANIFEST.MF index 19df7a6c76..429a3d0a75 100644 --- a/cots/org.geotools/META-INF/MANIFEST.MF +++ b/cots/org.geotools/META-INF/MANIFEST.MF @@ -14,31 +14,19 @@ Bundle-ClassPath: common-2.2.1.jar, ecore-2.2.2.jar, geoapi-2.3-M1.jar, geoapi-pending-2.3-M1.jar, - gt-api-2.6.4-sources.jar, gt-api-2.6.4.jar, - gt-coverage-2.6.4-sources.jar, gt-coverage-2.6.4.jar, gt-cql-2.6.4.jar, - gt-epsg-wkt-2.6.4-sources.jar, gt-epsg-wkt-2.6.4.jar, - gt-geotiff-2.6.4-sources.jar, gt-geotiff-2.6.4.jar, - gt-graph-2.6.4-sources.jar, gt-graph-2.6.4.jar, - gt-gtopo30-2.6.4-sources.jar, gt-gtopo30-2.6.4.jar, - gt-image-2.6.4-sources.jar, gt-image-2.6.4.jar, - gt-main-2.6.4-sources.jar, gt-main-2.6.4.jar, - gt-metadata-2.6.4-sources.jar, gt-metadata-2.6.4.jar, - gt-referencing-2.6.4-sources.jar, gt-referencing-2.6.4.jar, - gt-referencing3D-2.6.4-sources.jar, gt-referencing3D-2.6.4.jar, gt-render-2.6.4.jar, - gt-shapefile-2.6.4-sources.jar, gt-shapefile-2.6.4.jar, gt-xml-2.6.4.jar, gt-xsd-core-2.6.4.jar, @@ -56,9 +44,9 @@ Bundle-ClassPath: common-2.2.1.jar, xml-apis-xerces-2.7.1.jar, xsd-2.2.2.jar Bundle-Vendor: Raytheon-bundled OSS -Export-Package: ., - com.vividsolutions.jts, +Export-Package: com.vividsolutions.jts, com.vividsolutions.jts.algorithm, + com.vividsolutions.jts.algorithm.distance, com.vividsolutions.jts.algorithm.locate, com.vividsolutions.jts.geom, com.vividsolutions.jts.geom.impl, @@ -74,6 +62,7 @@ Export-Package: ., com.vividsolutions.jts.index.strtree, com.vividsolutions.jts.index.sweepline, com.vividsolutions.jts.io, + com.vividsolutions.jts.io.gml2, com.vividsolutions.jts.linearref, com.vividsolutions.jts.noding, com.vividsolutions.jts.noding.snapround, @@ -95,17 +84,6 @@ Export-Package: ., com.vividsolutions.jts.precision, com.vividsolutions.jts.simplify, com.vividsolutions.jts.util, - org.eclipse.emf.common, - org.eclipse.emf.common.archive, - org.eclipse.emf.common.command, - org.eclipse.emf.common.notify, - org.eclipse.emf.common.notify.impl, - org.eclipse.emf.common.util, - org.eclipse.xsd, - org.eclipse.xsd.ecore, - org.eclipse.xsd.impl, - org.eclipse.xsd.impl.type, - org.eclipse.xsd.util, org.geotools.console, org.geotools.coverage, org.geotools.coverage.grid, @@ -118,9 +96,18 @@ Export-Package: ., org.geotools.data, org.geotools.data.collection, org.geotools.data.crs, + org.geotools.data.jdbc, + org.geotools.data.jdbc.attributeio, + org.geotools.data.jdbc.datasource, + org.geotools.data.jdbc.fidmapper, + org.geotools.data.jdbc.referencing, org.geotools.data.memory, org.geotools.data.ows, org.geotools.data.postgis, + org.geotools.data.postgis.attributeio, + org.geotools.data.postgis.collection, + org.geotools.data.postgis.fidmapper, + org.geotools.data.postgis.referencing, org.geotools.data.shapefile, org.geotools.data.shapefile.dbf, org.geotools.data.shapefile.indexed, @@ -144,6 +131,10 @@ Export-Package: ., org.geotools.filter.function.string, org.geotools.filter.identity, org.geotools.filter.spatial, + org.geotools.filter.text.commons, + org.geotools.filter.text.cql2, + org.geotools.filter.text.ecql, + org.geotools.filter.text.generated.parsers, org.geotools.filter.v1_0, org.geotools.filter.v1_0.capabilities, org.geotools.filter.v1_1, @@ -202,6 +193,7 @@ Export-Package: ., org.geotools.index.quadtree, org.geotools.index.quadtree.fs, org.geotools.io, + org.geotools.jdbc, org.geotools.kml, org.geotools.kml.bindings, org.geotools.legend, @@ -276,13 +268,6 @@ Export-Package: ., org.geotools.xs, org.geotools.xs.bindings, org.geotools.xs.facets, - org.jdom, - org.jdom.adapters, - org.jdom.filter, - org.jdom.input, - org.jdom.output, - org.jdom.transform, - org.jdom.xpath, org.opengis.annotation, org.opengis.coverage, org.opengis.coverage.grid, diff --git a/edexOsgi/com.raytheon.edex.ingestsrv/src/com/raytheon/edex/services/PersistSrv.java b/edexOsgi/com.raytheon.edex.ingestsrv/src/com/raytheon/edex/services/PersistSrv.java index 94c796eb55..e8378306bf 100644 --- a/edexOsgi/com.raytheon.edex.ingestsrv/src/com/raytheon/edex/services/PersistSrv.java +++ b/edexOsgi/com.raytheon.edex.ingestsrv/src/com/raytheon/edex/services/PersistSrv.java @@ -46,6 +46,7 @@ import com.raytheon.uf.edex.database.plugin.PluginFactory; * ------------ ---------- ----------- -------------------------- * Oct 31, 2008 chammack Initial creation * 02/06/09 1990 bphillip Refactored to use plugin specific daos + * Nov 02, 2012 1302 djohnson Remove unused method, fix formatting. * * * @author chammack @@ -53,55 +54,54 @@ import com.raytheon.uf.edex.database.plugin.PluginFactory; */ public class PersistSrv { - private Log logger = LogFactory.getLog(getClass()); + private final Log logger = LogFactory.getLog(getClass()); - private static final PersistSrv instance = new PersistSrv(); + private static final PersistSrv instance = new PersistSrv(); - public static PersistSrv getInstance() { - return instance; - } + public static PersistSrv getInstance() { + return instance; + } - private PersistSrv() { - } + private PersistSrv() { + } - @SuppressWarnings("unchecked") - public PluginDataObject[] persist(PluginDataObject[] pdo) { + public PluginDataObject[] persist(PluginDataObject[] pdo) { - if (pdo == null || pdo.length == 0) { - return new PluginDataObject[0]; - } + if (pdo == null || pdo.length == 0) { + return new PluginDataObject[0]; + } - Set pdoList = new HashSet(); - EDEXUtil.checkPersistenceTimes(pdo); + Set pdoList = new HashSet(); + EDEXUtil.checkPersistenceTimes(pdo); - try { - PluginDao dao = PluginFactory.getInstance().getPluginDao( - pdo[0].getPluginName()); - StorageStatus ss = dao.persistToHDF5(pdo); - StorageException[] se = ss.getExceptions(); - pdoList.addAll(Arrays.asList(pdo)); - if (se != null) { - Map pdosThatFailed = new HashMap(); - for (StorageException s : se) { - IDataRecord rec = s.getRecord(); + try { + PluginDao dao = PluginFactory.getInstance().getPluginDao( + pdo[0].getPluginName()); + StorageStatus ss = dao.persistToHDF5(pdo); + StorageException[] se = ss.getExceptions(); + pdoList.addAll(Arrays.asList(pdo)); + if (se != null) { + Map pdosThatFailed = new HashMap(); + for (StorageException s : se) { + IDataRecord rec = s.getRecord(); - if (rec != null) { - // If we have correlation info and it's a pdo, use that - // for the error message... - Object corrObj = rec.getCorrelationObject(); - if (corrObj != null - && corrObj instanceof PluginDataObject) { - pdosThatFailed.put((PluginDataObject) corrObj, s); - } else { - // otherwise, do the best we can with the group - // information - logger.error("Persisting record " + rec.getGroup() - + "/" + rec.getName() + " failed.", s); - } - } else { - // All we know is something bad happened. - logger.error("Persistence error occurred: ", s); - } + if (rec != null) { + // If we have correlation info and it's a pdo, use that + // for the error message... + Object corrObj = rec.getCorrelationObject(); + if (corrObj != null + && corrObj instanceof PluginDataObject) { + pdosThatFailed.put((PluginDataObject) corrObj, s); + } else { + // otherwise, do the best we can with the group + // information + logger.error("Persisting record " + rec.getGroup() + + "/" + rec.getName() + " failed.", s); + } + } else { + // All we know is something bad happened. + logger.error("Persistence error occurred: ", s); + } } // Produce error messages for each pdo that failed @@ -134,26 +134,17 @@ public class PersistSrv { } } - } catch (Throwable e1) { - logger.error( - "Critical persistence error occurred. Individual records that failed will be logged separately.", - e1); - for (PluginDataObject p : pdo) { - logger.error("Record " - + p - + " failed persistence due to critical error logged above."); - } - } + } catch (Throwable e1) { + logger.error( + "Critical persistence error occurred. Individual records that failed will be logged separately.", + e1); + for (PluginDataObject p : pdo) { + logger.error("Record " + + p + + " failed persistence due to critical error logged above."); + } + } - return pdoList.toArray(new PluginDataObject[pdoList.size()]); - } - - public PluginDataObject[] removeRawData(PluginDataObject[] pdos) { - if (pdos != null) { - for (PluginDataObject pdo : pdos) { - pdo.setMessageData(null); - } - } - return pdos; - } + return pdoList.toArray(new PluginDataObject[pdoList.size()]); + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.plugin.gfe/META-INF/MANIFEST.MF index dee422c0dd..9c8d8a6e58 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/META-INF/MANIFEST.MF @@ -32,7 +32,6 @@ Require-Bundle: com.raytheon.uf.common.dataplugin.gfe;bundle-version="1.12.1174" com.raytheon.edex.plugin.satellite;bundle-version="1.12.1174", com.raytheon.uf.edex.auth;bundle-version="1.12.1174", com.raytheon.uf.common.auth;bundle-version="1.12.1174", - com.raytheon.uf.common.plugin.nwsauth;bundle-version="1.12.1174", com.raytheon.uf.common.site;bundle-version="1.12.1174", ucar.nc2;bundle-version="1.0.0", com.raytheon.uf.common.parameter;bundle-version="1.0.0" diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/CheckPermissionsRequestHandler.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/CheckPermissionsRequestHandler.java index 93cd3cee0d..603554ad48 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/CheckPermissionsRequestHandler.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/CheckPermissionsRequestHandler.java @@ -20,10 +20,10 @@ package com.raytheon.edex.plugin.gfe.server.handler.svcbu; import com.raytheon.edex.plugin.gfe.svcbackup.SvcBackupUtil; +import com.raytheon.uf.common.auth.exception.AuthorizationException; import com.raytheon.uf.common.auth.user.IUser; import com.raytheon.uf.common.dataplugin.gfe.request.CheckPermissionsRequest; import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse; -import com.raytheon.uf.common.plugin.nwsauth.exception.AuthorizationException; import com.raytheon.uf.edex.auth.req.AbstractPrivilegedRequestHandler; import com.raytheon.uf.edex.auth.resp.AuthorizationResponse; diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/ExportConfRequestHandler.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/ExportConfRequestHandler.java index 691a9192d1..f92764f58d 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/ExportConfRequestHandler.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/handler/svcbu/ExportConfRequestHandler.java @@ -21,15 +21,15 @@ package com.raytheon.edex.plugin.gfe.server.handler.svcbu; import com.raytheon.edex.plugin.gfe.svcbackup.ServiceBackupNotificationManager; import com.raytheon.edex.plugin.gfe.svcbackup.SvcBackupUtil; +import com.raytheon.uf.common.auth.exception.AuthorizationException; import com.raytheon.uf.common.auth.user.IUser; import com.raytheon.uf.common.dataplugin.gfe.request.ExportConfRequest; import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse; -import com.raytheon.uf.common.plugin.nwsauth.exception.AuthorizationException; import com.raytheon.uf.edex.auth.req.AbstractPrivilegedRequestHandler; import com.raytheon.uf.edex.auth.resp.AuthorizationResponse; /** - * TODO Add Description + * Exports configuration? * *
  * 
diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/svcbackup/SvcBackupUtil.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/svcbackup/SvcBackupUtil.java
index 1becb8428e..2bab561d3d 100644
--- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/svcbackup/SvcBackupUtil.java
+++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/svcbackup/SvcBackupUtil.java
@@ -29,11 +29,10 @@ import java.util.Properties;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import com.raytheon.uf.common.auth.exception.AuthorizationException;
 import com.raytheon.uf.common.auth.user.IUser;
 import com.raytheon.uf.common.dataplugin.gfe.exception.GfeException;
 import com.raytheon.uf.common.dataplugin.gfe.request.AbstractGfePrivilegedRequest;
-import com.raytheon.uf.common.plugin.nwsauth.exception.AuthorizationException;
-import com.raytheon.uf.common.plugin.nwsauth.roles.IRoleStorage;
 import com.raytheon.uf.common.status.IUFStatusHandler;
 import com.raytheon.uf.common.status.UFStatus;
 import com.raytheon.uf.common.status.UFStatus.Priority;
@@ -41,6 +40,7 @@ import com.raytheon.uf.common.util.RunProcess;
 import com.raytheon.uf.edex.auth.AuthManager;
 import com.raytheon.uf.edex.auth.AuthManagerFactory;
 import com.raytheon.uf.edex.auth.resp.AuthorizationResponse;
+import com.raytheon.uf.edex.auth.roles.IRoleStorage;
 import com.raytheon.uf.edex.core.EDEXUtil;
 import com.raytheon.uf.edex.core.props.PropertiesFactory;
 
diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/Grib1Decoder.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/Grib1Decoder.java
index 5ba42ab9bd..02e68c3af7 100644
--- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/Grib1Decoder.java
+++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/Grib1Decoder.java
@@ -90,7 +90,6 @@ import com.raytheon.uf.common.time.TimeRange;
  * Date         Ticket#     Engineer    Description
  * ------------ ----------  ----------- --------------------------
  * 3/11/10      4758        bphillip    Initial Creation
- * 6/12/12      0609        djohnson    Use EDEXUtil for EDEX_HOME.
  * 
  * 
* @@ -98,7 +97,7 @@ import com.raytheon.uf.common.time.TimeRange; * @version 1 */ public class Grib1Decoder extends AbstractDecoder { - private static final transient IUFStatusHandler statusHandler = UFStatus + private static final IUFStatusHandler statusHandler = UFStatus .getHandler(Grib1Decoder.class); /** Missing value string */ @@ -166,7 +165,7 @@ public class Grib1Decoder extends AbstractDecoder { ArrayList records = g1i.getRecords(); List gribRecords = new ArrayList(); for (int i = 0; i < records.size(); i++) { - GridRecord rec = decodeRecord((Grib1Record) records.get(i), raf); + GridRecord rec = decodeRecord(records.get(i), raf); if (rec != null) { gribRecords.add(rec); } diff --git a/edexOsgi/com.raytheon.edex.utilitysrv/.classpath b/edexOsgi/com.raytheon.edex.utilitysrv/.classpath index 69cf8ac476..1fa3e6803d 100644 --- a/edexOsgi/com.raytheon.edex.utilitysrv/.classpath +++ b/edexOsgi/com.raytheon.edex.utilitysrv/.classpath @@ -3,6 +3,5 @@ -
diff --git a/edexOsgi/com.raytheon.edex.utilitysrv/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.utilitysrv/META-INF/MANIFEST.MF index 6b450d0935..721c0b48f4 100644 --- a/edexOsgi/com.raytheon.edex.utilitysrv/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.edex.utilitysrv/META-INF/MANIFEST.MF @@ -10,11 +10,10 @@ Require-Bundle: org.apache.commons.logging, com.raytheon.uf.common.serialization.comm;bundle-version="1.0.0", com.raytheon.uf.edex.auth, com.raytheon.uf.common.status;bundle-version="1.12.1130", - com.raytheon.uf.common.plugin.nwsauth + com.raytheon.uf.common.auth;bundle-version="1.12.1174" Export-Package: com.raytheon.edex.services Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: com.raytheon.uf.common.auth.req, com.raytheon.uf.common.auth.user, - com.raytheon.uf.common.plugin.nwsauth.exception, com.raytheon.uf.edex.auth.req, com.raytheon.uf.edex.auth.resp diff --git a/edexOsgi/com.raytheon.edex.utilitysrv/res/spring/utility-request.xml b/edexOsgi/com.raytheon.edex.utilitysrv/res/spring/utility-request.xml index ccf89c928c..7513b3a613 100644 --- a/edexOsgi/com.raytheon.edex.utilitysrv/res/spring/utility-request.xml +++ b/edexOsgi/com.raytheon.edex.utilitysrv/res/spring/utility-request.xml @@ -8,7 +8,8 @@ - + + @@ -22,7 +23,7 @@ - + diff --git a/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/AbstractPrivilegedLocalizationRequestHandler.java b/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/AbstractPrivilegedLocalizationRequestHandler.java index bb8976d477..e5709ca09a 100644 --- a/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/AbstractPrivilegedLocalizationRequestHandler.java +++ b/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/AbstractPrivilegedLocalizationRequestHandler.java @@ -21,16 +21,16 @@ package com.raytheon.edex.services; import java.io.File; +import com.raytheon.uf.common.auth.exception.AuthorizationException; import com.raytheon.uf.common.auth.req.AbstractPrivilegedRequest; import com.raytheon.uf.common.auth.user.IUser; import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; -import com.raytheon.uf.common.plugin.nwsauth.exception.AuthorizationException; -import com.raytheon.uf.common.plugin.nwsauth.roles.IRoleStorage; import com.raytheon.uf.edex.auth.AuthManager; import com.raytheon.uf.edex.auth.AuthManagerFactory; import com.raytheon.uf.edex.auth.req.AbstractPrivilegedRequestHandler; import com.raytheon.uf.edex.auth.resp.AuthorizationResponse; +import com.raytheon.uf.edex.auth.roles.IRoleStorage; /** * Abstract privileged request handler for localization requests diff --git a/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/GetServersHandler.java b/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/GetServersHandler.java index 4af2822c42..fe95dbbd70 100644 --- a/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/GetServersHandler.java +++ b/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/GetServersHandler.java @@ -19,12 +19,15 @@ **/ package com.raytheon.edex.services; +import java.util.Collections; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.raytheon.uf.common.localization.msgs.GetServersRequest; import com.raytheon.uf.common.localization.msgs.GetServersResponse; import com.raytheon.uf.common.serialization.comm.IRequestHandler; +import com.raytheon.uf.common.util.registry.GenericRegistry; import com.raytheon.uf.edex.core.props.PropertiesFactory; /** @@ -45,7 +48,8 @@ import com.raytheon.uf.edex.core.props.PropertiesFactory; * @version 1.0 */ -public class GetServersHandler implements IRequestHandler { +public class GetServersHandler extends GenericRegistry + implements IRequestHandler { private static final Log logger = LogFactory.getLog(UtilityManager.class); @@ -56,19 +60,11 @@ public class GetServersHandler implements IRequestHandler { String httpServer = System.getProperty("http.server"); String jmsServer = System.getProperty("jms.server"); String pypiesServer = System.getProperty("pypies.server"); - String dataDeliveryServer = System - .getProperty("datadelivery.server"); - String dataDeliveryLcmServer = System - .getProperty("datadelivery.lcm.server"); - String dataDeliveryQueryServer = System - .getProperty("datadelivery.query.server"); logger.info("http.server=" + httpServer); logger.info("jms.server=" + jmsServer); logger.info("pypies.server=" + pypiesServer); - logger.info("datadelivery.server=" + dataDeliveryServer); - logger.info("datadelivery.lcm.server=" + dataDeliveryLcmServer); - logger.info("datadelivery.query.server=" + dataDeliveryQueryServer); + logger.info("server locations=" + registry); String hdf5DataDir = PropertiesFactory.getInstance().getEnvProperties() .getEnvValue("HDF5DIR"); @@ -76,11 +72,9 @@ public class GetServersHandler implements IRequestHandler { response.setHttpServer(httpServer); response.setJmsServer(jmsServer); response.setPypiesServer(pypiesServer); - response.setDataDeliveryServer(dataDeliveryServer); - response.setDataDeliveryLcmServer(dataDeliveryLcmServer); - response.setDataDeliveryQueryServer(dataDeliveryQueryServer); response.setServerDataDir(hdf5DataDir); + response.setServerLocations(Collections.unmodifiableMap(this.registry)); + return response; } - } diff --git a/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/LocalizationStreamHandler.java b/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/LocalizationStreamHandler.java index 2470a4733e..1d3cfa0aab 100644 --- a/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/LocalizationStreamHandler.java +++ b/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/LocalizationStreamHandler.java @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.Map; import com.raytheon.edex.utility.ProtectedFiles; +import com.raytheon.uf.common.auth.exception.AuthorizationException; import com.raytheon.uf.common.auth.user.IUser; import com.raytheon.uf.common.localization.FileUpdatedMessage; import com.raytheon.uf.common.localization.FileUpdatedMessage.FileChangeType; @@ -37,7 +38,6 @@ import com.raytheon.uf.common.localization.exception.LocalizationException; import com.raytheon.uf.common.localization.stream.AbstractLocalizationStreamRequest; import com.raytheon.uf.common.localization.stream.LocalizationStreamGetRequest; import com.raytheon.uf.common.localization.stream.LocalizationStreamPutRequest; -import com.raytheon.uf.common.plugin.nwsauth.exception.AuthorizationException; import com.raytheon.uf.edex.auth.resp.AuthorizationResponse; import com.raytheon.uf.edex.core.EDEXUtil; diff --git a/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/PrivilegedUtilityHandler.java b/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/PrivilegedUtilityHandler.java index 3f42e3a805..a4b9df6d99 100644 --- a/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/PrivilegedUtilityHandler.java +++ b/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/PrivilegedUtilityHandler.java @@ -3,6 +3,7 @@ package com.raytheon.edex.services; import java.util.ArrayList; import java.util.List; +import com.raytheon.uf.common.auth.exception.AuthorizationException; import com.raytheon.uf.common.auth.user.IUser; import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; @@ -11,7 +12,6 @@ import com.raytheon.uf.common.localization.msgs.AbstractUtilityResponse; import com.raytheon.uf.common.localization.msgs.DeleteUtilityCommand; import com.raytheon.uf.common.localization.msgs.PrivilegedUtilityRequestMessage; import com.raytheon.uf.common.localization.msgs.UtilityResponseMessage; -import com.raytheon.uf.common.plugin.nwsauth.exception.AuthorizationException; import com.raytheon.uf.edex.auth.resp.AuthorizationResponse; import com.raytheon.uf.edex.core.EdexException; import com.raytheon.uf.edex.core.props.PropertiesFactory; diff --git a/edexOsgi/com.raytheon.uf.common.auth/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.auth/META-INF/MANIFEST.MF index 559952c970..ccb292c23b 100644 --- a/edexOsgi/com.raytheon.uf.common.auth/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.auth/META-INF/MANIFEST.MF @@ -10,6 +10,7 @@ Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.11.31", com.raytheon.uf.common.serialization.comm;bundle-version="1.11.31", org.apache.commons.lang;bundle-version="2.3.0" Export-Package: com.raytheon.uf.common.auth, + com.raytheon.uf.common.auth.exception, com.raytheon.uf.common.auth.req, com.raytheon.uf.common.auth.resp, com.raytheon.uf.common.auth.user diff --git a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/exception/AuthorizationException.java b/edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/exception/AuthorizationException.java similarity index 96% rename from edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/exception/AuthorizationException.java rename to edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/exception/AuthorizationException.java index c6a68eef3a..ae3b8ea948 100644 --- a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/exception/AuthorizationException.java +++ b/edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/exception/AuthorizationException.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.plugin.nwsauth.exception; +package com.raytheon.uf.common.auth.exception; /** * Base exception for access authorization. diff --git a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/roles/IRole.java b/edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/user/IPermission.java similarity index 70% rename from edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/roles/IRole.java rename to edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/user/IPermission.java index e8cb749336..f0eb6c8509 100644 --- a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/roles/IRole.java +++ b/edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/user/IPermission.java @@ -17,29 +17,39 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.uf.common.plugin.nwsauth.roles; - -import com.raytheon.uf.common.auth.user.IUser; +package com.raytheon.uf.common.auth.user; /** - * Interface for representing a role. A role should be able to determine if it - * is valid for a specific user + * A permission. * *
  * 
  * SOFTWARE HISTORY
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
- * May 18, 2010            mschenke     Initial creation
+ * Nov 5, 2012  1302      djohnson     Initial creation
  * 
  * 
* - * @author mschenke + * @author djohnson * @version 1.0 */ -public interface IRole { +public interface IPermission { - public boolean validForUser(IUser user); + /** + * Get the description. + * + * @return the description + */ + String getDescription(); + /** + * The display name of the permission. + * + * @return the name + */ + @Override + String toString(); } diff --git a/edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/user/IRole.java b/edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/user/IRole.java new file mode 100644 index 0000000000..5534b08485 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/user/IRole.java @@ -0,0 +1,65 @@ +/** + * 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.auth.user; + +import java.util.List; + +/** + * Interface for representing a role. A role should be able to determine if it + * is valid for a specific user + * + *
+ * 
+ * SOFTWARE HISTORY
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * May 18, 2010            mschenke     Initial creation
+ * Nov 06, 2012 1302       djohnson     Move back to API plugin, add getter for permissions.
+ * 
+ * 
+ * + * @author mschenke + * @version 1.0 + */ + +public interface IRole { + + /** + * Get the list of permissions. + * + * @return the list of permissions + */ + List getPermissions(); + + /** + * Get the description of the role. + * + * @return the description + */ + String getDescription(); + + /** + * The representation of the role as a string. + * + * @return + */ + @Override + String toString(); +} diff --git a/edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/user/IUser.java b/edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/user/IUser.java index 2f598794ab..eedeea6f25 100644 --- a/edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/user/IUser.java +++ b/edexOsgi/com.raytheon.uf.common.auth/src/com/raytheon/uf/common/auth/user/IUser.java @@ -45,13 +45,20 @@ public interface IUser extends ISerializableObject { * * @return the user identifier object */ - public IUserId uniqueId(); + IUserId uniqueId(); + + // /** + // * Retrieve the roles assigned to the user. + // * + // * @return the roles + // */ + // IRole[] getUserRoles(); /** * Get the authentication data used to identify the user * * @return data needed to authenticate the user */ - public IAuthenticationData authenticationData(); + IAuthenticationData authenticationData(); } diff --git a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/GridCoverage.java b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/GridCoverage.java index 13127baf65..7c7aa57915 100644 --- a/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/GridCoverage.java +++ b/edexOsgi/com.raytheon.uf.common.gridcoverage/src/com/raytheon/uf/common/gridcoverage/GridCoverage.java @@ -71,6 +71,7 @@ import com.vividsolutions.jts.geom.Geometry; * 4/7/09 1994 bphillip Initial Creation * Sep 07, 2012 1102 djohnson Add missing JAXB annotations. * 09/10/2012 DR 15270 D. Friedman Fix subgrid model name handling. + * Nov 02, 2012 1302 djohnson Remove commented out code. * * * @@ -83,7 +84,8 @@ import com.vividsolutions.jts.geom.Geometry; @SequenceGenerator(name = "GRIDCOVERAGE_GENERATOR", sequenceName = "gridcoverage_seq", allocationSize = 1) @XmlAccessorType(XmlAccessType.NONE) @DynamicSerialize -public abstract class GridCoverage extends PersistableDataObject implements +public abstract class GridCoverage extends PersistableDataObject + implements ISpatialObject { private static final long serialVersionUID = -1355232934065074837L; @@ -591,14 +593,6 @@ public abstract class GridCoverage extends PersistableDataObject implements if ("degree".equals(spacingUnit)) { // lower left is cell center, we want cell corners. double minLat = getLowerLeftLat() - dy / 2; - // This commented out if block can probably be removed. It was added - // for WA 5 Data Delivery, but nobody can remember exactly why. - // Commented out 11/01/2012, if you are in this file messing with - // something at some reasonable point in the future (especially if - // Michael J. Fox is with you), then feel free to delete it. - // if (ny * dy < 180) { - // minLat = MapUtil.correctLat(getLowerLeftLat()) - dy / 2; - // } double maxLat = minLat + dy * ny; double minLon = getLowerLeftLon() - dx / 2; if (dx * nx <= 360) { diff --git a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetServersResponse.java b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetServersResponse.java index 5a31051484..2c0a0569ba 100644 --- a/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetServersResponse.java +++ b/edexOsgi/com.raytheon.uf.common.localization/src/com/raytheon/uf/common/localization/msgs/GetServersResponse.java @@ -19,6 +19,8 @@ **/ package com.raytheon.uf.common.localization.msgs; +import java.util.Map; + import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -56,13 +58,7 @@ public class GetServersResponse implements ISerializableObject { private String serverDataDir; @DynamicSerializeElement - private String dataDeliveryServer; - - @DynamicSerializeElement - private String dataDeliveryLcmServer; - - @DynamicSerializeElement - private String dataDeliveryQueryServer; + private Map serverLocations; public String getHttpServer() { return httpServer; @@ -97,47 +93,17 @@ public class GetServersResponse implements ISerializableObject { } /** - * @param dataDeliveryServer - * the dataDeliveryServer to set + * @return */ - public void setDataDeliveryServer(String dataDeliveryServer) { - this.dataDeliveryServer = dataDeliveryServer; + public Map getServerLocations() { + return serverLocations; } /** - * @return the dataDeliveryServer + * @param serverLocations + * the serverLocations to set */ - public String getDataDeliveryServer() { - return dataDeliveryServer; - } - - /** - * @return the dataDeliveryLcmServer - */ - public String getDataDeliveryLcmServer() { - return dataDeliveryLcmServer; - } - - /** - * @param dataDeliveryLcmServer - * the dataDeliveryLcmServer to set - */ - public void setDataDeliveryLcmServer(String dataDeliveryLcmServer) { - this.dataDeliveryLcmServer = dataDeliveryLcmServer; - } - - /** - * @return the dataDeliveryQueryServer - */ - public String getDataDeliveryQueryServer() { - return dataDeliveryQueryServer; - } - - /** - * @param dataDeliveryQueryServer - * the dataDeliveryQueryServer to set - */ - public void setDataDeliveryQueryServer(String dataDeliveryQueryServer) { - this.dataDeliveryQueryServer = dataDeliveryQueryServer; + public void setServerLocations(Map serverLocations) { + this.serverLocations = serverLocations; } } diff --git a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/META-INF/MANIFEST.MF index d01dff6413..32501c5d08 100644 --- a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/META-INF/MANIFEST.MF @@ -10,8 +10,8 @@ Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.12.2", com.raytheon.uf.common.auth;bundle-version="1.12.1174", com.raytheon.uf.common.status;bundle-version="1.12.1174", com.raytheon.uf.common.localization;bundle-version="1.12.1174" -Export-Package: com.raytheon.uf.common.plugin.nwsauth.exception, - com.raytheon.uf.common.plugin.nwsauth.roles, +Export-Package: com.raytheon.uf.common.plugin.nwsauth, + com.raytheon.uf.common.plugin.nwsauth.exception, com.raytheon.uf.common.plugin.nwsauth.user, com.raytheon.uf.common.plugin.nwsauth.xml Import-Package: com.raytheon.uf.common.plugin.nwsauth.exception diff --git a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/NwsPermission.java b/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/NwsPermission.java new file mode 100644 index 0000000000..0fc804f04e --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/NwsPermission.java @@ -0,0 +1,69 @@ +/** + * 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.plugin.nwsauth; + +import com.raytheon.uf.common.auth.user.IPermission; + +/** + * NWS implementation of {@link IPermission}. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Nov 5, 2012  1302      djohnson     Initial creation
+ * 
+ * 
+ * + * @author djohnson + * @version 1.0 + */ + +public class NwsPermission implements IPermission { + + private final String description; + + private final String name; + + /** + * @param name + * @param description + */ + public NwsPermission(String name, String description) { + this.name = name; + this.description = description; + } + + /** + * {@inheritDoc} + */ + @Override + public String getDescription() { + return description; + } + + @Override + public String toString() { + return name; + } + +} diff --git a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/NwsRole.java b/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/NwsRole.java new file mode 100644 index 0000000000..aec100577d --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/NwsRole.java @@ -0,0 +1,82 @@ +/** + * 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.plugin.nwsauth; + +import java.util.Collections; +import java.util.List; + +import com.raytheon.uf.common.auth.user.IPermission; +import com.raytheon.uf.common.auth.user.IRole; + +/** + * NWS implementation of {@link IRole}. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Nov 5, 2012  1302      djohnson     Initial creation
+ * 
+ * 
+ * + * @author djohnson + * @version 1.0 + */ + +public class NwsRole implements IRole { + + private final List permissions; + + private final String description; + + private final String name; + + public NwsRole(String name, List permissions, + String description) { + this.name = name; + this.permissions = (permissions == null) ? Collections + . emptyList() : permissions; + this.description = description; + } + + /** + * {@inheritDoc} + */ + @Override + public List getPermissions() { + return permissions; + } + + /** + * {@inheritDoc} + */ + @Override + public String getDescription() { + return description; + } + + @Override + public String toString() { + return name; + } + +} diff --git a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/exception/RoleApplicationNotFoundException.java b/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/exception/RoleApplicationNotFoundException.java index 4c317cb05a..2fa212e9f3 100644 --- a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/exception/RoleApplicationNotFoundException.java +++ b/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/exception/RoleApplicationNotFoundException.java @@ -19,6 +19,8 @@ **/ package com.raytheon.uf.common.plugin.nwsauth.exception; +import com.raytheon.uf.common.auth.exception.AuthorizationException; + /** * Exception when the application id for a role is not found. * diff --git a/edexOsgi/com.raytheon.uf.common.serialization/src/com/raytheon/uf/common/serialization/DynamicSerializationManager.java b/edexOsgi/com.raytheon.uf.common.serialization/src/com/raytheon/uf/common/serialization/DynamicSerializationManager.java index 318e6dca6b..075ad03b2f 100644 --- a/edexOsgi/com.raytheon.uf.common.serialization/src/com/raytheon/uf/common/serialization/DynamicSerializationManager.java +++ b/edexOsgi/com.raytheon.uf.common.serialization/src/com/raytheon/uf/common/serialization/DynamicSerializationManager.java @@ -92,8 +92,7 @@ import com.vividsolutions.jts.geom.Geometry; * Oct 08, 2012 #1251 dgilling Ensure type registered with * serialization adapter is encoded * in serialization stream. - * Nov 02, 2012 1310 djohnson Remove field level adapters, they - * break python serialization. + * Nov 02, 2012 1302 djohnson Remove field level adapters, they break python serialization. * * * @@ -499,4 +498,4 @@ public class DynamicSerializationManager { return sm; } -} \ No newline at end of file +} diff --git a/edexOsgi/com.raytheon.uf.common.serialization/src/com/raytheon/uf/common/serialization/thrift/ThriftSerializationContext.java b/edexOsgi/com.raytheon.uf.common.serialization/src/com/raytheon/uf/common/serialization/thrift/ThriftSerializationContext.java index 27931d799a..c2b41b87b1 100644 --- a/edexOsgi/com.raytheon.uf.common.serialization/src/com/raytheon/uf/common/serialization/thrift/ThriftSerializationContext.java +++ b/edexOsgi/com.raytheon.uf.common.serialization/src/com/raytheon/uf/common/serialization/thrift/ThriftSerializationContext.java @@ -65,7 +65,7 @@ import com.raytheon.uf.common.serialization.SerializationException; * Mar 01, 2011 njensen Restructured deserializeArray() * Sep 14, 2012 #1169 djohnson Add ability to write another object into the stream directly. * Sep 28, 2012 #1195 djohnson Add ability to specify adapter at field level. - * Nov 02, 2012 1310 djohnson No more field level adapters. + * Nov 02, 2012 1302 djohnson No more field level adapters. * * * @@ -1350,4 +1350,4 @@ public class ThriftSerializationContext extends BaseSerializationContext { throw new SerializationException(e); } } -} \ 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 87f5b51597..e2914c2ca3 100644 --- a/edexOsgi/com.raytheon.uf.common.time/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.time/META-INF/MANIFEST.MF @@ -6,7 +6,6 @@ Bundle-Version: 1.12.1174.qualifier 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", com.raytheon.uf.common.serialization;bundle-version="1.12.1174", com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174", diff --git a/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/SimulatedTime.java b/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/SimulatedTime.java index fd0fc26a70..dcf3bf8897 100644 --- a/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/SimulatedTime.java +++ b/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/SimulatedTime.java @@ -37,6 +37,7 @@ import java.util.TimeZone; * ------------ ---------- ----------- -------------------------- * Jul 16, 2008 randerso Initial creation * Aug 24, 2012 0743 djohnson Add option to use milliseconds for operations, change to singleton. + * Nov 02, 2012 1302 djohnson Change mistakenly public constructor to private. * * * @@ -129,7 +130,7 @@ public final class SimulatedTime { * @param isFrozen * true to freeze time */ - public SimulatedTime(long millis, double scale, boolean isFrozen) { + private SimulatedTime(long millis, double scale, boolean isFrozen) { setTime(millis); this.scale = scale; this.isFrozen = isFrozen; diff --git a/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/AbstractTimer.java b/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/AbstractTimer.java index 284831f894..0be0ed7b40 100644 --- a/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/AbstractTimer.java +++ b/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/AbstractTimer.java @@ -1,6 +1,5 @@ package com.raytheon.uf.common.time.util; -import net.jcip.annotations.NotThreadSafe; /** * @@ -20,7 +19,7 @@ import net.jcip.annotations.NotThreadSafe; * @author djohnson * @version 1.0 */ -@NotThreadSafe +// @NotThreadSafe abstract class AbstractTimer implements ITimer { private long start; diff --git a/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/ITimeStrategy.java b/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/ITimeStrategy.java index c2f55698e1..77a25a02f0 100644 --- a/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/ITimeStrategy.java +++ b/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/ITimeStrategy.java @@ -2,7 +2,10 @@ package com.raytheon.uf.common.time.util; /** * - * Denotes a strategy to retrieve the current time. + * Denotes a strategy to retrieve the current time. In production this will + * always retrieve it from {@link System#currentTimeMillis()} but in tests it + * can be used to give the behavior of specific time spans, or to freeze time + * entirely. * *
  * 
@@ -11,6 +14,7 @@ package com.raytheon.uf.common.time.util;
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Aug 16, 2012 0743       djohnson     Initial creation
+ * Nov 02, 2012 1302       djohnson     Add more Javadoc.
  * 
  * 
* diff --git a/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/ImmutableDate.java b/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/ImmutableDate.java index eb18ca0520..b46fe7c2b3 100644 --- a/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/ImmutableDate.java +++ b/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/ImmutableDate.java @@ -23,8 +23,6 @@ import java.util.Date; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import net.jcip.annotations.Immutable; - import com.raytheon.uf.common.serialization.IDeserializationContext; import com.raytheon.uf.common.serialization.ISerializationContext; import com.raytheon.uf.common.serialization.ISerializationTypeAdapter; @@ -34,7 +32,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeTypeAdap import com.raytheon.uf.common.time.SimulatedTime; /** - * An {@link Immutable} version of {@link Date}. + * An immutable version of {@link Date}. * *
  * 
@@ -51,7 +49,7 @@ import com.raytheon.uf.common.time.SimulatedTime;
  * @version 1.0
  */
 @XmlJavaTypeAdapter(value=ImmutableDateAdapter.class) 
-@Immutable 
+// @Immutable
 @DynamicSerialize
 @DynamicSerializeTypeAdapter(factory = ImmutableDate.class)
 public final class ImmutableDate extends Date implements
diff --git a/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/TimerImpl.java b/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/TimerImpl.java
index 6614625b3c..337deafa35 100644
--- a/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/TimerImpl.java
+++ b/edexOsgi/com.raytheon.uf.common.time/src/com/raytheon/uf/common/time/util/TimerImpl.java
@@ -1,6 +1,5 @@
 package com.raytheon.uf.common.time.util;
 
-import net.jcip.annotations.NotThreadSafe;
 
 /**
  * 
@@ -21,7 +20,7 @@ import net.jcip.annotations.NotThreadSafe;
  * @author djohnson
  * @version 1.0
  */
-@NotThreadSafe
+// @NotThreadSafe
 class TimerImpl extends AbstractTimer {
 
     /**
diff --git a/edexOsgi/com.raytheon.uf.edex.auth/.classpath b/edexOsgi/com.raytheon.uf.edex.auth/.classpath
index b614cf5821..ad32c83a78 100644
--- a/edexOsgi/com.raytheon.uf.edex.auth/.classpath
+++ b/edexOsgi/com.raytheon.uf.edex.auth/.classpath
@@ -3,6 +3,5 @@
 	
 	
 	
-	
 	
 
diff --git a/edexOsgi/com.raytheon.uf.edex.auth/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.auth/META-INF/MANIFEST.MF
index f8af623847..9b94d8d0cb 100644
--- a/edexOsgi/com.raytheon.uf.edex.auth/META-INF/MANIFEST.MF
+++ b/edexOsgi/com.raytheon.uf.edex.auth/META-INF/MANIFEST.MF
@@ -9,8 +9,7 @@ Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.11.31",
  com.raytheon.uf.common.serialization.comm;bundle-version="1.11.31",
  com.raytheon.uf.common.auth;bundle-version="1.0.0",
  com.raytheon.edex.common;bundle-version="1.11.31",
- com.raytheon.uf.common.status;bundle-version="1.11.31",
- com.raytheon.uf.common.plugin.nwsauth;bundle-version="1.12.1174"
+ com.raytheon.uf.common.status;bundle-version="1.11.31"
 Export-Package: com.raytheon.uf.edex.auth,
  com.raytheon.uf.edex.auth.authentication,
  com.raytheon.uf.edex.auth.req,
diff --git a/edexOsgi/com.raytheon.uf.edex.auth/src/com/raytheon/uf/edex/auth/AuthManager.java b/edexOsgi/com.raytheon.uf.edex.auth/src/com/raytheon/uf/edex/auth/AuthManager.java
index bc0abae9b7..248986367d 100644
--- a/edexOsgi/com.raytheon.uf.edex.auth/src/com/raytheon/uf/edex/auth/AuthManager.java
+++ b/edexOsgi/com.raytheon.uf.edex.auth/src/com/raytheon/uf/edex/auth/AuthManager.java
@@ -19,9 +19,9 @@
  **/
 package com.raytheon.uf.edex.auth;
 
-import com.raytheon.uf.common.plugin.nwsauth.roles.IRoleStorage;
 import com.raytheon.uf.edex.auth.authentication.IAuthenticationStorage;
 import com.raytheon.uf.edex.auth.authentication.IAuthenticator;
+import com.raytheon.uf.edex.auth.roles.IRoleStorage;
 
 /**
  * Authentication Manager class, contains classes for storing and retrieving
diff --git a/edexOsgi/com.raytheon.uf.edex.auth/src/com/raytheon/uf/edex/auth/req/AbstractPrivilegedRequestHandler.java b/edexOsgi/com.raytheon.uf.edex.auth/src/com/raytheon/uf/edex/auth/req/AbstractPrivilegedRequestHandler.java
index c881ea310f..912a068a96 100644
--- a/edexOsgi/com.raytheon.uf.edex.auth/src/com/raytheon/uf/edex/auth/req/AbstractPrivilegedRequestHandler.java
+++ b/edexOsgi/com.raytheon.uf.edex.auth/src/com/raytheon/uf/edex/auth/req/AbstractPrivilegedRequestHandler.java
@@ -19,9 +19,9 @@
  **/
 package com.raytheon.uf.edex.auth.req;
 
+import com.raytheon.uf.common.auth.exception.AuthorizationException;
 import com.raytheon.uf.common.auth.req.AbstractPrivilegedRequest;
 import com.raytheon.uf.common.auth.user.IUser;
-import com.raytheon.uf.common.plugin.nwsauth.exception.AuthorizationException;
 import com.raytheon.uf.common.serialization.comm.IRequestHandler;
 import com.raytheon.uf.edex.auth.resp.AuthorizationResponse;
 
@@ -51,7 +51,6 @@ public abstract class AbstractPrivilegedRequestHandler
  * 
@@ -68,4 +69,5 @@ public interface IRoleStorage {
      */
     public String[] getAllDefinedPermissions(String application)
             throws AuthorizationException;
+
 }
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 15b219d757..de0bca7678 100644
--- a/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml
+++ b/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml
@@ -275,6 +275,13 @@
          install-size="0"
          version="0.0.0"
          unpack="false"/>
+         
+   
 
    
 
-   
-
    
  * 
@@ -43,6 +43,7 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
  * ------------ ---------- ----------- --------------------------
  * Jan 21, 2009       1939 jkorman     Initial creation
  * Oct 10, 2012 1261       djohnson    Add some generics wildcarding.
+ * Nov 02, 2012 1302       djohnson    Add Javadoc.
  * 
  * 
* diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/META-INF/MANIFEST.MF index c8e3926a3c..db55acc1af 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/META-INF/MANIFEST.MF @@ -8,7 +8,8 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Require-Bundle: com.raytheon.uf.edex.auth;bundle-version="1.12.2", com.raytheon.uf.common.auth;bundle-version="1.12.2", com.raytheon.uf.common.plugin.nwsauth;bundle-version="1.0.0", - com.raytheon.uf.common.status;bundle-version="1.12.1174" + com.raytheon.uf.common.status;bundle-version="1.12.1174", + com.raytheon.uf.common.localization Import-Package: com.raytheon.uf.common.localization, com.raytheon.uf.common.serialization, com.raytheon.uf.common.status, diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/res/spring/nwsauth-request.xml b/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/res/spring/nwsauth-request.xml index 94734124d0..8157f3b3f6 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/res/spring/nwsauth-request.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/res/spring/nwsauth-request.xml @@ -4,7 +4,7 @@ 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"> - + diff --git a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/xml/NwsRoleStorage.java b/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/src/com/raytheon/uf/edex/plugin/nwsauth/NwsRoleStorage.java similarity index 90% rename from edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/xml/NwsRoleStorage.java rename to edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/src/com/raytheon/uf/edex/plugin/nwsauth/NwsRoleStorage.java index 776f137d7e..08988dd73e 100644 --- a/edexOsgi/com.raytheon.uf.common.plugin.nwsauth/src/com/raytheon/uf/common/plugin/nwsauth/xml/NwsRoleStorage.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/src/com/raytheon/uf/edex/plugin/nwsauth/NwsRoleStorage.java @@ -1,21 +1,22 @@ -package com.raytheon.uf.common.plugin.nwsauth.xml; +package com.raytheon.uf.edex.plugin.nwsauth; import java.io.File; import java.util.HashMap; import java.util.Map; +import com.raytheon.uf.common.auth.exception.AuthorizationException; import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; import com.raytheon.uf.common.localization.LocalizationFile; import com.raytheon.uf.common.localization.PathManagerFactory; -import com.raytheon.uf.common.plugin.nwsauth.exception.AuthorizationException; import com.raytheon.uf.common.plugin.nwsauth.exception.RoleApplicationNotFoundException; -import com.raytheon.uf.common.plugin.nwsauth.roles.IRoleStorage; +import com.raytheon.uf.common.plugin.nwsauth.xml.NwsRoleData; import com.raytheon.uf.common.serialization.SerializationUtil; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; +import com.raytheon.uf.edex.auth.roles.IRoleStorage; /** * Implementation of IRoleStorage @@ -35,11 +36,11 @@ import com.raytheon.uf.common.status.UFStatus.Priority; public class NwsRoleStorage implements IRoleStorage { private static NwsRoleStorage instance = null; - private Map lastUsedFileMap = new HashMap(); + private final Map lastUsedFileMap = new HashMap(); - private Map lastModificationTimeMap = new HashMap(); + private final Map lastModificationTimeMap = new HashMap(); - private Map applicationRoleMap = new HashMap(); + private final Map applicationRoleMap = new HashMap(); /** * This is called from the CAVE side for the User Administration dialogs. Do diff --git a/cots/net.jcip/.classpath b/edexOsgi/com.raytheon.uf.edex.spatial/.classpath similarity index 69% rename from cots/net.jcip/.classpath rename to edexOsgi/com.raytheon.uf.edex.spatial/.classpath index 10f492202b..1fa3e6803d 100644 --- a/cots/net.jcip/.classpath +++ b/edexOsgi/com.raytheon.uf.edex.spatial/.classpath @@ -1,7 +1,7 @@ - + diff --git a/edexOsgi/com.raytheon.uf.edex.spatial/.project b/edexOsgi/com.raytheon.uf.edex.spatial/.project new file mode 100644 index 0000000000..f8fdc72bc1 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.spatial/.project @@ -0,0 +1,28 @@ + + + com.raytheon.uf.common.spatial + + + + + + 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/cots/net.jcip/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/com.raytheon.uf.edex.spatial/.settings/org.eclipse.jdt.core.prefs similarity index 92% rename from cots/net.jcip/.settings/org.eclipse.jdt.core.prefs rename to edexOsgi/com.raytheon.uf.edex.spatial/.settings/org.eclipse.jdt.core.prefs index 503d44edbb..295d77f55d 100644 --- a/cots/net.jcip/.settings/org.eclipse.jdt.core.prefs +++ b/edexOsgi/com.raytheon.uf.edex.spatial/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,4 @@ -#Wed Jul 25 12:18:05 CDT 2012 +#Thu Dec 02 10:55:26 CST 2010 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.edex.spatial/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.spatial/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..0d3101c899 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.spatial/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Database +Bundle-SymbolicName: com.raytheon.uf.common.spatial +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: RAYTHEON +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Export-Package: com.raytheon.uf.common.spatial.repojection +Require-Bundle: org.apache.commons.lang;bundle-version="2.3.0", + org.apache.commons.logging;bundle-version="1.1.1", + org.geotools;bundle-version="2.6.4", + com.raytheon.uf.common.geospatial;bundle-version="1.12.1174", + com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174", + com.raytheon.uf.common.datastorage;bundle-version="1.12.1174", + com.raytheon.uf.common.serialization;bundle-version="1.12.1174" + diff --git a/cots/net.jcip/build.properties b/edexOsgi/com.raytheon.uf.edex.spatial/build.properties similarity index 63% rename from cots/net.jcip/build.properties rename to edexOsgi/com.raytheon.uf.edex.spatial/build.properties index 61cb16eb3f..5791d48d5f 100644 --- a/cots/net.jcip/build.properties +++ b/edexOsgi/com.raytheon.uf.edex.spatial/build.properties @@ -1,4 +1,5 @@ +source.. = src/ output.. = bin/ bin.includes = META-INF/,\ .,\ - jcip-annotations.jar + res/ diff --git a/edexOsgi/com.raytheon.uf.edex.spatial/res/spring/database-common.xml b/edexOsgi/com.raytheon.uf.edex.spatial/res/spring/database-common.xml new file mode 100644 index 0000000000..200e44abc3 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.spatial/res/spring/database-common.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/AbstractDataReprojector.java b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/AbstractDataReprojector.java similarity index 98% rename from edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/AbstractDataReprojector.java rename to edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/AbstractDataReprojector.java index 12cb58776c..a4056ed052 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/AbstractDataReprojector.java +++ b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/AbstractDataReprojector.java @@ -28,7 +28,7 @@ * Jun 15, 2011 bclement Initial creation * */ -package com.raytheon.uf.edex.database.spatial; +package com.raytheon.uf.common.spatial.repojection; import java.awt.image.DataBuffer; import java.awt.image.WritableRaster; diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/ByteDataReprojector.java b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/ByteDataReprojector.java similarity index 92% rename from edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/ByteDataReprojector.java rename to edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/ByteDataReprojector.java index e54ccb96b9..9b2e575743 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/ByteDataReprojector.java +++ b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/ByteDataReprojector.java @@ -28,7 +28,7 @@ * May 18, 2011 bclement Initial creation * */ -package com.raytheon.uf.edex.database.spatial; +package com.raytheon.uf.common.spatial.repojection; import java.awt.Point; import java.awt.image.DataBufferByte; @@ -60,7 +60,7 @@ public class ByteDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#getGridCoverage + * com.raytheon.uf.common.spatial.repojection.DataReprojector#getGridCoverage * (com.raytheon.uf.common.datastorage.records.IDataRecord, * org.opengis.referencing.crs.CoordinateReferenceSystem, * org.opengis.geometry.Envelope) @@ -82,7 +82,7 @@ public class ByteDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#getMaskCoverage + * com.raytheon.uf.common.spatial.repojection.DataReprojector#getMaskCoverage * (com.raytheon.uf.common.datastorage.records.IDataRecord, * org.opengis.referencing.crs.CoordinateReferenceSystem, * org.opengis.geometry.Envelope) @@ -103,7 +103,7 @@ public class ByteDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#extractData(org + * com.raytheon.uf.common.spatial.repojection.DataReprojector#extractData(org * .geotools.coverage.grid.GridCoverage2D) */ @Override @@ -128,7 +128,7 @@ public class ByteDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#extractData(org + * com.raytheon.uf.common.spatial.repojection.DataReprojector#extractData(org * .geotools.coverage.grid.GridCoverage2D, * org.geotools.coverage.grid.GridCoverage2D) */ @@ -176,7 +176,7 @@ public class ByteDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#getDataSlice(com + * com.raytheon.uf.common.spatial.repojection.DataReprojector#getDataSlice(com * .raytheon.uf.common.datastorage.records.IDataRecord, * com.raytheon.uf.common.datastorage.Request) */ @@ -213,7 +213,7 @@ public class ByteDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.AbstractDataReprojector#compatible + * com.raytheon.uf.common.spatial.repojection.AbstractDataReprojector#compatible * (com.raytheon.uf.common.datastorage.records.IDataRecord) */ @Override diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/DataReprojector.java b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/DataReprojector.java similarity index 98% rename from edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/DataReprojector.java rename to edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/DataReprojector.java index 450e6ee17d..063270dc86 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/DataReprojector.java +++ b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/DataReprojector.java @@ -28,7 +28,7 @@ * May 18, 2011 bclement Initial creation * */ -package com.raytheon.uf.edex.database.spatial; +package com.raytheon.uf.common.spatial.repojection; import java.awt.Point; import java.io.FileNotFoundException; @@ -68,8 +68,8 @@ import com.raytheon.uf.common.datastorage.records.IntegerDataRecord; import com.raytheon.uf.common.datastorage.records.ShortDataRecord; import com.raytheon.uf.common.geospatial.ISpatialObject; import com.raytheon.uf.common.geospatial.MapUtil; -import com.raytheon.uf.edex.database.spatial.AbstractDataReprojector.RequestWrapper; -import com.raytheon.uf.edex.database.spatial.KeyLocker.KeyLock; +import com.raytheon.uf.common.spatial.repojection.AbstractDataReprojector.RequestWrapper; +import com.raytheon.uf.common.spatial.repojection.KeyLocker.KeyLock; import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Envelope; diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/FloatDataReprojector.java b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/FloatDataReprojector.java similarity index 93% rename from edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/FloatDataReprojector.java rename to edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/FloatDataReprojector.java index 626fdde857..dd4ba746f6 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/FloatDataReprojector.java +++ b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/FloatDataReprojector.java @@ -28,7 +28,7 @@ * Jun 13, 2011 bclement Initial creation * */ -package com.raytheon.uf.edex.database.spatial; +package com.raytheon.uf.common.spatial.repojection; import java.awt.Point; import java.awt.image.DataBufferFloat; @@ -60,7 +60,7 @@ public class FloatDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#getGridCoverage + * com.raytheon.uf.common.spatial.repojection.DataReprojector#getGridCoverage * (com.raytheon.uf.common.datastorage.records.IDataRecord, * org.opengis.referencing.crs.CoordinateReferenceSystem, * org.opengis.geometry.Envelope) @@ -81,7 +81,7 @@ public class FloatDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#getMaskCoverage + * com.raytheon.uf.common.spatial.repojection.DataReprojector#getMaskCoverage * (com.raytheon.uf.common.datastorage.records.IDataRecord, * org.opengis.referencing.crs.CoordinateReferenceSystem, * org.opengis.geometry.Envelope) @@ -102,7 +102,7 @@ public class FloatDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#extractData(org + * com.raytheon.uf.common.spatial.repojection.DataReprojector#extractData(org * .geotools.coverage.grid.GridCoverage2D) */ @Override @@ -128,7 +128,7 @@ public class FloatDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#extractData(org + * com.raytheon.uf.common.spatial.repojection.DataReprojector#extractData(org * .geotools.coverage.grid.GridCoverage2D, * org.geotools.coverage.grid.GridCoverage2D) */ @@ -177,7 +177,7 @@ public class FloatDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#getDataSlice(com + * com.raytheon.uf.common.spatial.repojection.DataReprojector#getDataSlice(com * .raytheon.uf.common.datastorage.records.IDataRecord, * com.raytheon.uf.common.datastorage.Request) */ @@ -221,7 +221,7 @@ public class FloatDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.AbstractDataReprojector#compatible + * com.raytheon.uf.common.spatial.repojection.AbstractDataReprojector#compatible * (com.raytheon.uf.common.datastorage.records.IDataRecord) */ @Override diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/IntDataReprojector.java b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/IntDataReprojector.java similarity index 93% rename from edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/IntDataReprojector.java rename to edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/IntDataReprojector.java index a2452012ec..f54aa541e1 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/IntDataReprojector.java +++ b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/IntDataReprojector.java @@ -28,7 +28,7 @@ * Jun 13, 2011 bclement Initial creation * */ -package com.raytheon.uf.edex.database.spatial; +package com.raytheon.uf.common.spatial.repojection; import java.awt.Point; import java.awt.image.DataBuffer; @@ -61,7 +61,7 @@ public class IntDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#getGridCoverage + * com.raytheon.uf.common.spatial.repojection.DataReprojector#getGridCoverage * (com.raytheon.uf.common.datastorage.records.IDataRecord, * org.opengis.referencing.crs.CoordinateReferenceSystem, * org.opengis.geometry.Envelope) @@ -82,7 +82,7 @@ public class IntDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#getMaskCoverage + * com.raytheon.uf.common.spatial.repojection.DataReprojector#getMaskCoverage * (com.raytheon.uf.common.datastorage.records.IDataRecord, * org.opengis.referencing.crs.CoordinateReferenceSystem, * org.opengis.geometry.Envelope) @@ -103,7 +103,7 @@ public class IntDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#extractData(org + * com.raytheon.uf.common.spatial.repojection.DataReprojector#extractData(org * .geotools.coverage.grid.GridCoverage2D) */ @Override @@ -129,7 +129,7 @@ public class IntDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#extractData(org + * com.raytheon.uf.common.spatial.repojection.DataReprojector#extractData(org * .geotools.coverage.grid.GridCoverage2D, * org.geotools.coverage.grid.GridCoverage2D) */ @@ -178,7 +178,7 @@ public class IntDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#getDataSlice(com + * com.raytheon.uf.common.spatial.repojection.DataReprojector#getDataSlice(com * .raytheon.uf.common.datastorage.records.IDataRecord, * com.raytheon.uf.common.datastorage.Request) */ @@ -222,7 +222,7 @@ public class IntDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.AbstractDataReprojector#compatible + * com.raytheon.uf.common.spatial.repojection.AbstractDataReprojector#compatible * (com.raytheon.uf.common.datastorage.records.IDataRecord) */ @Override diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/KeyLocker.java b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/KeyLocker.java similarity index 97% rename from edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/KeyLocker.java rename to edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/KeyLocker.java index bb8e378dc2..50c7a778f3 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/KeyLocker.java +++ b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/KeyLocker.java @@ -21,7 +21,7 @@ * 402.291.0100 * */ -package com.raytheon.uf.edex.database.spatial; +package com.raytheon.uf.common.spatial.repojection; import java.util.HashMap; import java.util.Map; diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/ReferencedDataRecord.java b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/ReferencedDataRecord.java similarity index 96% rename from edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/ReferencedDataRecord.java rename to edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/ReferencedDataRecord.java index 9644ef3943..66087818f2 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/ReferencedDataRecord.java +++ b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/ReferencedDataRecord.java @@ -28,7 +28,7 @@ * May 18, 2011 bclement Initial creation * */ -package com.raytheon.uf.edex.database.spatial; +package com.raytheon.uf.common.spatial.repojection; import org.geotools.geometry.jts.ReferencedEnvelope; diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/ShortDataReprojector.java b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/ShortDataReprojector.java similarity index 93% rename from edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/ShortDataReprojector.java rename to edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/ShortDataReprojector.java index 95274d1f09..953db9efcd 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/spatial/ShortDataReprojector.java +++ b/edexOsgi/com.raytheon.uf.edex.spatial/src/com/raytheon/uf/common/spatial/repojection/ShortDataReprojector.java @@ -28,7 +28,7 @@ * Jun 13, 2011 bclement Initial creation * */ -package com.raytheon.uf.edex.database.spatial; +package com.raytheon.uf.common.spatial.repojection; import java.awt.Point; import java.awt.image.DataBuffer; @@ -62,7 +62,7 @@ public class ShortDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#getGridCoverage + * com.raytheon.uf.common.spatial.repojection.DataReprojector#getGridCoverage * (com.raytheon.uf.common.datastorage.records.IDataRecord, * org.opengis.referencing.crs.CoordinateReferenceSystem, * org.opengis.geometry.Envelope) @@ -83,7 +83,7 @@ public class ShortDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#getMaskCoverage + * com.raytheon.uf.common.spatial.repojection.DataReprojector#getMaskCoverage * (com.raytheon.uf.common.datastorage.records.IDataRecord, * org.opengis.referencing.crs.CoordinateReferenceSystem, * org.opengis.geometry.Envelope) @@ -104,7 +104,7 @@ public class ShortDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#extractData(org + * com.raytheon.uf.common.spatial.repojection.DataReprojector#extractData(org * .geotools.coverage.grid.GridCoverage2D) */ @Override @@ -130,7 +130,7 @@ public class ShortDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#extractData(org + * com.raytheon.uf.common.spatial.repojection.DataReprojector#extractData(org * .geotools.coverage.grid.GridCoverage2D, * org.geotools.coverage.grid.GridCoverage2D) */ @@ -179,7 +179,7 @@ public class ShortDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.DataReprojector#getDataSlice(com + * com.raytheon.uf.common.spatial.repojection.DataReprojector#getDataSlice(com * .raytheon.uf.common.datastorage.records.IDataRecord, * com.raytheon.uf.common.datastorage.Request) */ @@ -223,7 +223,7 @@ public class ShortDataReprojector extends * (non-Javadoc) * * @see - * com.raytheon.uf.edex.database.spatial.AbstractDataReprojector#compatible + * com.raytheon.uf.common.spatial.repojection.AbstractDataReprojector#compatible * (com.raytheon.uf.common.datastorage.records.IDataRecord) */ @Override diff --git a/ncep/gov.noaa.nws.ncep.viz.ui.perspectives/src/gov/noaa/nws/ncep/viz/ui/perspectives/PreferencesHandler.java b/ncep/gov.noaa.nws.ncep.viz.ui.perspectives/src/gov/noaa/nws/ncep/viz/ui/perspectives/PreferencesHandler.java new file mode 100644 index 0000000000..398e12f64b --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.ui.perspectives/src/gov/noaa/nws/ncep/viz/ui/perspectives/PreferencesHandler.java @@ -0,0 +1,64 @@ +/** + * 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 gov.noaa.nws.ncep.viz.ui.perspectives; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.preference.PreferenceDialog; +import org.eclipse.ui.dialogs.PreferencesUtil; + +/** + * Opens the preference window + * + *
+ * 
+ * SOFTWARE HISTORY
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Apr 11, 2007            chammack    Initial Creation.
+ * 
+ * 
+ * + * @author chammack + * @version 1.0 + */ +public class PreferencesHandler extends AbstractHandler { + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands + * .ExecutionEvent) + */ + @Override + public Object execute(ExecutionEvent arg0) throws ExecutionException { + + String prefPageId = "gov.noaa.nws.ncep.ui.pgen.Preferences"; + + PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn( + null, prefPageId, new String[] { prefPageId }, null); + dialog.open(); + return null; + } + +}