Issue #1302 Address peer review comments for 5-Data_Delivery/development merge
Amend: More peer review comments Restore PreferencesHandler Change-Id: Ib995f58c31ce844466674dbe29bf3048b78048f7 Former-commit-id:efd3d3735a
[formerly064ef82d1e
] [formerly1dbeb22893
[formerly c04f7dca6f980ab7f3d77825312ddc34ba3b188d]] Former-commit-id:1dbeb22893
Former-commit-id:4222b24d09
This commit is contained in:
parent
b45ba40abf
commit
2d1e886cf3
97 changed files with 1211 additions and 415 deletions
|
@ -220,6 +220,13 @@
|
|||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.spatial"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.dataplugin.level"
|
||||
|
|
|
@ -63,8 +63,6 @@ Export-Package: com.raytheon.uf.viz.core,
|
|||
com.raytheon.uf.viz.core.notification.jobs,
|
||||
com.raytheon.uf.viz.core.notification.observers,
|
||||
com.raytheon.uf.viz.core.preferences,
|
||||
com.raytheon.uf.viz.core.presenter,
|
||||
com.raytheon.uf.viz.core.presenter.components,
|
||||
com.raytheon.uf.viz.core.procedures,
|
||||
com.raytheon.uf.viz.core.requests,
|
||||
com.raytheon.uf.viz.core.rsc,
|
||||
|
|
|
@ -257,50 +257,6 @@ public final class VizApp {
|
|||
VizApp.pypiesServer = pypiesServer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the dataDeliveryServer
|
||||
*/
|
||||
public static String getDataDeliveryServer() {
|
||||
return dataDeliveryServer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dataDeliveryServer
|
||||
* the dataDeliveryServer to set
|
||||
*/
|
||||
public static void setDataDeliveryServer(String dataDeliveryServer) {
|
||||
VizApp.dataDeliveryServer = dataDeliveryServer;
|
||||
}
|
||||
/**
|
||||
* @return the dataDeliveryLcmServer
|
||||
*/
|
||||
public static String getDataDeliveryLcmServer() {
|
||||
return dataDeliveryLcmServer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dataDeliveryLcmServer
|
||||
* the dataDeliveryLcmServer to set
|
||||
*/
|
||||
public static void setDataDeliveryLcmServer(String dataDeliveryLcmServer) {
|
||||
VizApp.dataDeliveryLcmServer = dataDeliveryLcmServer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the dataDeliveryQueryServer
|
||||
*/
|
||||
public static String getDataDeliveryQueryServer() {
|
||||
return dataDeliveryQueryServer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dataDeliveryQueryServer
|
||||
* the dataDeliveryQueryServer to set
|
||||
*/
|
||||
public static void setDataDeliveryQueryServer(String dataDeliveryQueryServer) {
|
||||
VizApp.dataDeliveryQueryServer = dataDeliveryQueryServer;
|
||||
}
|
||||
|
||||
public static String getServerDataDir() {
|
||||
return VizApp.serverDataDir;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
/**
|
||||
* 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.core;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Provides the ability to retrieve server locations.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 5, 2012 1302 djohnson Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @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<String, String> 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<String, String> serverLocations2) {
|
||||
this.serverLocations = Collections.unmodifiableMap(serverLocations2);
|
||||
}
|
||||
}
|
|
@ -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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -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<IPermission> getPermissions(String application);
|
||||
|
||||
/**
|
||||
* Get the list of roles.
|
||||
*
|
||||
* @return the list of roles
|
||||
*/
|
||||
List<IRole> getRoles(String application);
|
||||
}
|
||||
|
|
|
@ -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}.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -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<IPermission> getPermissions(String application) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IRole> 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -360,12 +360,5 @@
|
|||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="net.jcip"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
|
|
@ -153,13 +153,6 @@
|
|||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="net.jcip"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.viz.product.alertviz"
|
||||
|
@ -432,7 +425,7 @@
|
|||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.edex.database"
|
||||
download-size="0"
|
||||
|
@ -440,6 +433,13 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.spatial"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.alertmonitor"
|
||||
download-size="0"
|
||||
|
|
|
@ -55,6 +55,7 @@ import com.raytheon.viz.ui.perspectives.AbstractVizPerspectiveManager;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 18, 2010 mnash Initial creation
|
||||
* Nov 02, 2012 1302 djohnson Remove printStackTrace.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -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<IEditorInput, Point> restoreMap = new HashMap<IEditorInput, Point>();
|
||||
private final Map<IEditorInput, Point> restoreMap = new HashMap<IEditorInput, Point>();
|
||||
|
||||
public LocalizationPerspectiveManager() {
|
||||
saveEditors = true;
|
||||
|
@ -155,7 +156,6 @@ public class LocalizationPerspectiveManager extends
|
|||
Priority.PROBLEM,
|
||||
"Error setting up python interpreter: "
|
||||
+ t.getLocalizedMessage(), t);
|
||||
t.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 30, 2012 mpduff Initial creation
|
||||
* Nov 06, 2012 1302 djohnson Move to nwsauth plugin.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @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<String, NwsRoleData> roleDataMap = new HashMap<String, NwsRoleData>();
|
||||
|
||||
/**
|
||||
* Application name -> LocalizationFile map.
|
||||
*/
|
||||
private final Map<String, LocalizationFile> roleFileMap = new HashMap<String, LocalizationFile>();
|
||||
|
||||
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<String> userNameList = new ArrayList<String>();
|
||||
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<String> userRoles = new ArrayList<String>();
|
||||
|
||||
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<String> userPermissions = new ArrayList<String>();
|
||||
|
||||
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<String> rolePerms = new ArrayList<String>();
|
||||
|
||||
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<IPermission> getPermissions(String application) {
|
||||
List<IPermission> permissions = new ArrayList<IPermission>();
|
||||
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<IRole> getRoles(String application) {
|
||||
List<IRole> roles = new ArrayList<IRole>();
|
||||
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<IPermission> getPermissionsForRole(String roleId,
|
||||
String application) {
|
||||
List<IPermission> rolePerms = new ArrayList<IPermission>();
|
||||
List<String> 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();
|
||||
}
|
||||
}
|
|
@ -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<IPermission> getPermissions(String application) {
|
||||
// TODO: Should this pass through to EDEX to get this stuff?
|
||||
return FileManager.getInstance().getPermissions(application);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<IRole> getRoles(String application) {
|
||||
// TODO: Should this pass through to EDEX to get this stuff?
|
||||
return FileManager.getInstance().getRoles(application);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -153,11 +153,15 @@
|
|||
<includes
|
||||
id="com.raytheon.uf.viz.useradmin.feature"
|
||||
version="0.0.0"/>
|
||||
|
||||
|
||||
<includes
|
||||
id="com.raytheon.uf.viz.collaboration.feature"
|
||||
version="0.0.0"/>
|
||||
|
||||
|
||||
<includes
|
||||
id="com.raytheon.uf.viz.kml.export.feature"
|
||||
version="0.0.0"/>
|
||||
|
||||
<requires>
|
||||
<import feature="com.raytheon.uf.viz.core.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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().
|
||||
* </pre>
|
||||
*
|
||||
* @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<Colorvalue> colorSet;
|
||||
private final List<Colorvalue> 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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -23,20 +23,21 @@ package com.raytheon.viz.ui.widgets.duallist;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Interface representing menu data.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 1, 2012 mpduff Initial creation
|
||||
*
|
||||
* Nov 02, 2012 1302 djohnson Add javadoc.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author mpduff
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public interface IMenuData {
|
||||
|
|
|
@ -20,21 +20,22 @@
|
|||
package com.raytheon.viz.ui.widgets.duallist;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Interface for an update.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @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();
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<classpathentry exported="true" kind="lib" path="externaljars/fldat.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="externaljars/ihfsdb.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="externaljars/jcchart.jar"/>
|
||||
i <classpathentry exported="true" kind="lib" path="externaljars/jdom.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="externaljars/junit.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="externaljars/netcdfUI-2.2.22.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="externaljars/postgresql-8.3-603.jdbc3.jar"/>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
Binary file not shown.
Binary file not shown.
|
@ -1,14 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="gt-postgis-2.6.4.jar" sourcepath="gt-postgis-2.6.4-sources.zip"/>
|
||||
<classpathentry exported="true" kind="lib" path="common-2.2.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="commons-beanutils-1.7.0.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="commons-codec-1.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="commons-collections-3.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="commons-dbcp-1.2.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="commons-jxpath-1.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="commons-lang-2.3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="commons-pool-1.5.3.jar"/>
|
||||
<classpathentry kind="lib" path="common-2.2.1.jar"/>
|
||||
<classpathentry kind="lib" path="commons-beanutils-1.7.0.jar"/>
|
||||
<classpathentry kind="lib" path="commons-codec-1.2.jar"/>
|
||||
<classpathentry kind="lib" path="commons-collections-3.1.jar"/>
|
||||
<classpathentry kind="lib" path="commons-dbcp-1.2.2.jar"/>
|
||||
<classpathentry kind="lib" path="commons-jxpath-1.2.jar"/>
|
||||
<classpathentry kind="lib" path="commons-lang-2.3.jar"/>
|
||||
<classpathentry kind="lib" path="commons-pool-1.5.3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="ecore-2.2.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="geoapi-2.3-M1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="geoapi-pending-2.3-M1.jar"/>
|
||||
|
@ -31,12 +31,9 @@
|
|||
<classpathentry exported="true" kind="lib" path="gt-main-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-metadata-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-metadata-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-referencing-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-referencing-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-referencing3D-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-referencing3D-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-render-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-shapefile-2.6.4-sources.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-shapefile-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xml-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-core-2.6.4.jar"/>
|
||||
|
@ -45,13 +42,13 @@
|
|||
<classpathentry exported="true" kind="lib" path="gt-xsd-gml3-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-kml-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="gt-xsd-sld-2.6.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jdom-1.0.jar"/>
|
||||
<classpathentry kind="lib" path="jdom-1.0.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jts-1.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="picocontainer-1.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="xercesImpl-2.7.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="xml-apis-1.0.b2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="xml-apis-xerces-2.7.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="xsd-2.2.2.jar"/>
|
||||
<classpathentry kind="lib" path="picocontainer-1.2.jar"/>
|
||||
<classpathentry kind="lib" path="xercesImpl-2.7.1.jar"/>
|
||||
<classpathentry kind="lib" path="xml-apis-1.0.b2.jar"/>
|
||||
<classpathentry kind="lib" path="xml-apis-xerces-2.7.1.jar"/>
|
||||
<classpathentry kind="lib" path="xsd-2.2.2.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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.
|
||||
* </pre>
|
||||
*
|
||||
* @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<PluginDataObject> pdoList = new HashSet<PluginDataObject>();
|
||||
EDEXUtil.checkPersistenceTimes(pdo);
|
||||
Set<PluginDataObject> pdoList = new HashSet<PluginDataObject>();
|
||||
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<PluginDataObject, StorageException> pdosThatFailed = new HashMap<PluginDataObject, StorageException>();
|
||||
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<PluginDataObject, StorageException> pdosThatFailed = new HashMap<PluginDataObject, StorageException>();
|
||||
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()]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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?
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -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<Grib1Record> records = g1i.getRecords();
|
||||
List<GridRecord> gribRecords = new ArrayList<GridRecord>();
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,5 @@
|
|||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/com.raytheon.uf.common.plugin.nwsauth"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
<bean id="utilitySrv" class="com.raytheon.edex.services.UtilitySrv"/>
|
||||
<bean id="privilegedUtilityHandler" class="com.raytheon.edex.services.PrivilegedUtilityHandler"/>
|
||||
<bean id="getServers" class="com.raytheon.edex.services.GetServersHandler"/>
|
||||
<!-- Dual purpose bean, provides the thrift handler for getServers requests and contains the registry of servers -->
|
||||
<bean id="serverLocationRegistry" class="com.raytheon.edex.services.GetServersHandler"/>
|
||||
<bean id="getServerTime" class="com.raytheon.edex.services.GetServerTimeHandler"/>
|
||||
<bean id="streamSrv" class="com.raytheon.edex.services.LocalizationStreamHandler"/>
|
||||
|
||||
|
@ -22,7 +23,7 @@
|
|||
</bean>
|
||||
<bean factory-bean="handlerRegistry" factory-method="register">
|
||||
<constructor-arg value="com.raytheon.uf.common.localization.msgs.GetServersRequest"/>
|
||||
<constructor-arg ref="getServers"/>
|
||||
<constructor-arg ref="serverLocationRegistry"/>
|
||||
</bean>
|
||||
<bean factory-bean="handlerRegistry" factory-method="register">
|
||||
<constructor-arg value="com.raytheon.uf.common.time.msgs.GetServerTimeRequest"/>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<GetServersRequest> {
|
||||
public class GetServersHandler extends GenericRegistry<String, String>
|
||||
implements IRequestHandler<GetServersRequest> {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(UtilityManager.class);
|
||||
|
||||
|
@ -56,19 +60,11 @@ public class GetServersHandler implements IRequestHandler<GetServersRequest> {
|
|||
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<GetServersRequest> {
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
|
@ -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.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 18, 2010 mschenke Initial creation
|
||||
* Nov 5, 2012 1302 djohnson Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @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();
|
||||
}
|
|
@ -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
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public interface IRole {
|
||||
|
||||
/**
|
||||
* Get the list of permissions.
|
||||
*
|
||||
* @return the list of permissions
|
||||
*/
|
||||
List<IPermission> getPermissions();
|
||||
|
||||
/**
|
||||
* Get the description of the role.
|
||||
*
|
||||
* @return the description
|
||||
*/
|
||||
String getDescription();
|
||||
|
||||
/**
|
||||
* The representation of the role as a string.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
String toString();
|
||||
}
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -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<Integer>
|
||||
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) {
|
||||
|
|
|
@ -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<String, String> 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<String, String> 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<String, String> serverLocations) {
|
||||
this.serverLocations = serverLocations;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 5, 2012 1302 djohnson Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
}
|
|
@ -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}.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 5, 2012 1302 djohnson Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author djohnson
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class NwsRole implements IRole {
|
||||
|
||||
private final List<IPermission> permissions;
|
||||
|
||||
private final String description;
|
||||
|
||||
private final String name;
|
||||
|
||||
public NwsRole(String name, List<IPermission> permissions,
|
||||
String description) {
|
||||
this.name = name;
|
||||
this.permissions = (permissions == null) ? Collections
|
||||
.<IPermission> emptyList() : permissions;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<IPermission> getPermissions() {
|
||||
return permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -499,4 +498,4 @@ public class DynamicSerializationManager {
|
|||
return sm;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1350,4 +1350,4 @@ public class ThriftSerializationContext extends BaseSerializationContext {
|
|||
throw new SerializationException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
|
|
@ -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}.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,6 +3,5 @@
|
|||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/com.raytheon.uf.common.plugin.nwsauth"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<T extends AbstractPrivile
|
|||
*
|
||||
* @param request
|
||||
* @return
|
||||
* @throws AuthorizationException
|
||||
*/
|
||||
public abstract AuthorizationResponse authorized(IUser user, T request)
|
||||
throws AuthorizationException;
|
||||
|
|
|
@ -17,13 +17,14 @@
|
|||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.common.plugin.nwsauth.roles;
|
||||
package com.raytheon.uf.edex.auth.roles;
|
||||
|
||||
import com.raytheon.uf.common.plugin.nwsauth.exception.AuthorizationException;
|
||||
import com.raytheon.uf.common.auth.exception.AuthorizationException;
|
||||
|
||||
/**
|
||||
* Storage class for roles. NOTE, ALL ROLES IDS SHOULD BE TREATED AS
|
||||
* CASE-INSENSITIVE
|
||||
* Storage class for roles. Should have a concept of a default role which all
|
||||
* users get by default and the ability to lookup a role given an id. NOTE, ALL
|
||||
* ROLES IDS SHOULD BE TREATED AS CASE-INSENSITIVE
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -68,4 +69,5 @@ public interface IRoleStorage {
|
|||
*/
|
||||
public String[] getAllDefinedPermissions(String application)
|
||||
throws AuthorizationException;
|
||||
|
||||
}
|
|
@ -275,6 +275,13 @@
|
|||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.spatial"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.jms"
|
||||
|
|
|
@ -312,12 +312,6 @@
|
|||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="net.jcip"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="com.google.guava"
|
||||
download-size="0"
|
||||
|
|
|
@ -19,7 +19,8 @@ Require-Bundle: com.raytheon.uf.common.dataquery;bundle-version="1.0.0",
|
|||
com.raytheon.uf.common.time;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
|
||||
org.geotools;bundle-version="2.6.4",
|
||||
com.raytheon.uf.common.localization;bundle-version="1.12.1174"
|
||||
com.raytheon.uf.common.localization;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.spatial
|
||||
Export-Package: com.raytheon.uf.edex.database,
|
||||
com.raytheon.uf.edex.database.cluster,
|
||||
com.raytheon.uf.edex.database.cluster.handler,
|
||||
|
@ -28,7 +29,6 @@ Export-Package: com.raytheon.uf.edex.database,
|
|||
com.raytheon.uf.edex.database.plugin,
|
||||
com.raytheon.uf.edex.database.purge,
|
||||
com.raytheon.uf.edex.database.query,
|
||||
com.raytheon.uf.edex.database.spatial,
|
||||
com.raytheon.uf.edex.database.status,
|
||||
com.raytheon.uf.edex.database.tasks
|
||||
Import-Package: com.raytheon.uf.common.message,
|
||||
|
|
|
@ -70,6 +70,8 @@ import com.raytheon.uf.common.localization.LocalizationFile;
|
|||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.spatial.repojection.DataReprojector;
|
||||
import com.raytheon.uf.common.spatial.repojection.ReferencedDataRecord;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.common.util.FileUtil;
|
||||
import com.raytheon.uf.edex.core.EdexException;
|
||||
|
@ -81,8 +83,6 @@ import com.raytheon.uf.edex.database.purge.PurgeLogger;
|
|||
import com.raytheon.uf.edex.database.purge.PurgeRule;
|
||||
import com.raytheon.uf.edex.database.purge.PurgeRuleSet;
|
||||
import com.raytheon.uf.edex.database.query.DatabaseQuery;
|
||||
import com.raytheon.uf.edex.database.spatial.DataReprojector;
|
||||
import com.raytheon.uf.edex.database.spatial.ReferencedDataRecord;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
import com.vividsolutions.jts.geom.Envelope;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
|
|
@ -34,7 +34,7 @@ import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
|
|||
import com.raytheon.uf.edex.database.DataAccessLayerException;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* ACARDS dao.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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">
|
||||
|
||||
<bean id="roleStorage" class="com.raytheon.uf.common.plugin.nwsauth.xml.NwsRoleStorage"/>
|
||||
<bean id="roleStorage" class="com.raytheon.uf.edex.plugin.nwsauth.NwsRoleStorage"/>
|
||||
<bean id="authenticator" class="com.raytheon.uf.edex.plugin.nwsauth.authentication.Authenticator"/>
|
||||
<bean id="authStorage" class="com.raytheon.uf.edex.plugin.nwsauth.authentication.AuthenticationStorage"/>
|
||||
|
||||
|
|
|
@ -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<String, File> lastUsedFileMap = new HashMap<String, File>();
|
||||
private final Map<String, File> lastUsedFileMap = new HashMap<String, File>();
|
||||
|
||||
private Map<String, Long> lastModificationTimeMap = new HashMap<String, Long>();
|
||||
private final Map<String, Long> lastModificationTimeMap = new HashMap<String, Long>();
|
||||
|
||||
private Map<String, NwsRoleData> applicationRoleMap = new HashMap<String, NwsRoleData>();
|
||||
private final Map<String, NwsRoleData> applicationRoleMap = new HashMap<String, NwsRoleData>();
|
||||
|
||||
/**
|
||||
* This is called from the CAVE side for the User Administration dialogs. Do
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="jcip-annotations.jar" sourcepath="jcip-annotations-src.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
28
edexOsgi/com.raytheon.uf.edex.spatial/.project
Normal file
28
edexOsgi/com.raytheon.uf.edex.spatial/.project
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.raytheon.uf.common.spatial</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -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
|
16
edexOsgi/com.raytheon.uf.edex.spatial/META-INF/MANIFEST.MF
Normal file
16
edexOsgi/com.raytheon.uf.edex.spatial/META-INF/MANIFEST.MF
Normal file
|
@ -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"
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
jcip-annotations.jar
|
||||
res/
|
|
@ -0,0 +1,43 @@
|
|||
<beans
|
||||
xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:amq="http://activemq.apache.org/schema/core"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
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">
|
||||
|
||||
<bean id="queryData" class="com.raytheon.uf.edex.database.handlers.DbQueryHandler"/>
|
||||
<bean id="querySpatialData" class="com.raytheon.uf.edex.database.handlers.SpatialDbQueryHandler"/>
|
||||
<bean id="queryDataSet" class="com.raytheon.uf.edex.database.handlers.DbQueryHandlerSet"/>
|
||||
|
||||
<bean factory-bean="handlerRegistry" factory-method="register">
|
||||
<constructor-arg value="com.raytheon.uf.common.geospatial.request.SpatialDbQueryRequest"/>
|
||||
<constructor-arg ref="querySpatialData"/>
|
||||
</bean>
|
||||
<bean id="queryDataRegistered" factory-bean="handlerRegistry" factory-method="register">
|
||||
<constructor-arg value="com.raytheon.uf.common.dataquery.requests.DbQueryRequest"/>
|
||||
<constructor-arg ref="queryData"/>
|
||||
</bean>
|
||||
<bean factory-bean="handlerRegistry" factory-method="register">
|
||||
<constructor-arg value="com.raytheon.uf.common.dataquery.requests.DbQueryRequestSet"/>
|
||||
<constructor-arg ref="queryDataSet"/>
|
||||
</bean>
|
||||
|
||||
<bean id="qlServerRequestHandler" class="com.raytheon.uf.edex.database.QlServerRequestHandler" />
|
||||
<bean factory-bean="handlerRegistry" factory-method="register">
|
||||
<constructor-arg value="com.raytheon.uf.common.dataquery.requests.QlServerRequest"/>
|
||||
<constructor-arg ref="qlServerRequestHandler"/>
|
||||
</bean>
|
||||
|
||||
<bean id="timeQueryHandler" class="com.raytheon.uf.edex.database.handlers.TimeQueryHandler" />
|
||||
<bean id="timeQueryHandlerSet" class="com.raytheon.uf.edex.database.handlers.TimeQueryHandlerSet" />
|
||||
<bean factory-bean="handlerRegistry" factory-method="register">
|
||||
<constructor-arg value="com.raytheon.uf.common.dataquery.requests.TimeQueryRequest"/>
|
||||
<constructor-arg ref="timeQueryHandler"/>
|
||||
</bean>
|
||||
<bean factory-bean="handlerRegistry" factory-method="register">
|
||||
<constructor-arg value="com.raytheon.uf.common.dataquery.requests.TimeQueryRequestSet"/>
|
||||
<constructor-arg ref="timeQueryHandlerSet"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
|
@ -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;
|
|
@ -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
|
|
@ -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;
|
||||
|
|
@ -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
|
|
@ -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
|
|
@ -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;
|
|
@ -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;
|
||||
|
|
@ -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
|
|
@ -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
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 11, 2007 chammack Initial Creation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue