Merge branch 'omaha_14.4.1' into omaha_pgen

Former-commit-id: f742cb887192183a29f4984d7f95a299cad9867a
This commit is contained in:
Steve Harris 2015-01-13 11:18:52 -06:00
commit ed189dc7cf
109 changed files with 1746 additions and 8268 deletions

View file

@ -40,6 +40,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
* Jan 28, 2014 2698 bclement removed getInfo, added methods to replace
* Jan 30, 2014 2698 bclement changed UserId to VenueParticipant
* Mar 06, 2014 2751 bclement added getParticipantUserid()
* Jan 09, 2015 3709 bclement added isPersistent()
*
* </pre>
*
@ -91,4 +92,10 @@ public interface IVenue {
*/
public UserId getParticipantUserid(VenueParticipant participant);
/**
* @return true if this is a room that exists on the server even when there
* are no participants
*/
public boolean isPersistent();
}

View file

@ -34,10 +34,12 @@ import org.jivesoftware.smack.packet.Presence.Type;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.muc.Affiliate;
import org.jivesoftware.smackx.muc.MultiUserChat;
import org.jivesoftware.smackx.muc.RoomInfo;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.viz.collaboration.comm.identity.info.IVenue;
import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationConnection;
import com.raytheon.uf.viz.collaboration.comm.provider.user.IDConverter;
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
@ -59,6 +61,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
* Mar 05, 2014 2798 mpduff Get Presence from MUC.
* Mar 06, 2014 2751 bclement added getParticipantUserid()
* Mar 07, 2014 2848 bclement added hasOtherParticipants()
* Jan 09, 2015 3709 bclement added isPersistent()
*
* </pre>
*
@ -195,4 +198,21 @@ public class Venue implements IVenue {
return getParticipantCount() > 1;
}
@Override
public boolean isPersistent() {
boolean rval = false;
CollaborationConnection connection = CollaborationConnection
.getConnection();
XMPPConnection xmppConn = connection.getXmppConnection();
try {
RoomInfo roomInfo = MultiUserChat.getRoomInfo(xmppConn,
muc.getRoom());
rval = roomInfo.isPersistent();
} catch (XMPPException e) {
log.error("Unable to determine if room " + this.getId()
+ " is persistent", e);
}
return rval;
}
}

View file

@ -113,7 +113,8 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
* Apr 29, 2014 3061 bclement moved invite payload to shared display session
* May 09, 2014 3107 bclement removed catch from isRoomOwner() so callers know about errors
* Jun 16, 2014 3288 bclement changed String venueName to VenueId venueId, added createVenueId()
* Oct 08, 2014 3705 bclement aded getVenueId()
* Oct 08, 2014 3705 bclement added getVenueId()
* Jan 12, 2015 3709 bclement fixed rare invite bug
*
*
* </pre>
@ -247,7 +248,11 @@ public class VenueSession extends BaseSession implements IVenueSession {
protected Message createInviteMessage(UserId id, VenueInvite invite) {
Message msg = new Message();
msg.setType(Type.normal);
msg.setBody(invite.getMessage());
/*
* don't set a body on the message. smack will add a packet extension on
* it that will have the actual invite. openfire gets confused if there
* is both a body and an extension and drops the invite on the floor.
*/
return msg;
}

View file

@ -123,6 +123,7 @@ import com.raytheon.uf.viz.collaboration.ui.actions.RemoveFromRosterAction;
import com.raytheon.uf.viz.collaboration.ui.actions.SendSubReqAction;
import com.raytheon.uf.viz.collaboration.ui.actions.ShowVenueAction;
import com.raytheon.uf.viz.collaboration.ui.actions.UserSearchAction;
import com.raytheon.uf.viz.collaboration.ui.colors.UserColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.data.AlertWordWrapper;
import com.raytheon.uf.viz.collaboration.ui.data.CollaborationGroupContainer;
import com.raytheon.uf.viz.collaboration.ui.data.PublicRoomContainer;
@ -168,6 +169,7 @@ import com.raytheon.viz.ui.views.CaveWorkbenchPageManager;
* Nov 14, 2014 3709 mapeters Removed change background/foreground color actions from menu.
* Dec 08, 2014 3709 mapeters Added MB3 change user text color actions to contacts list.
* Dec 12, 2014 3709 mapeters Store {@link ChangeTextColorAction}s in map, dispose them.
* Jan 09, 2015 3709 bclement color config manager API changes
*
* </pre>
*
@ -448,7 +450,7 @@ public class CollaborationGroupView extends CaveFloatingView implements
if (o instanceof SessionGroupContainer) {
manager.add(createSessionAction);
return;
} else if (o instanceof PublicRoomContainer){
} else if (o instanceof PublicRoomContainer) {
manager.add(roomSearchAction);
return;
} else if (o instanceof IVenueSession) {
@ -476,14 +478,15 @@ public class CollaborationGroupView extends CaveFloatingView implements
}
manager.add(new AddNotifierAction(this));
manager.add(new Separator());
String name = user.getName();
ChangeTextColorAction userColorAction = userColorActions.get(name);
String colorActionKey = user.getFQName();
ChangeTextColorAction userColorAction = userColorActions
.get(colorActionKey);
if (userColorAction == null) {
userColorAction = ChangeTextColorAction
.createChangeUserTextColorAction(name, false, false,
.createChangeUserTextColorAction(user, false, false,
new RGB(0, 0, 255),
new UserColorConfigManager());
userColorActions.put(name, userColorAction);
UserColorConfigManager.getInstance());
userColorActions.put(colorActionKey, userColorAction);
}
manager.add(userColorAction);
} else if (o instanceof UserId) {
@ -494,15 +497,15 @@ public class CollaborationGroupView extends CaveFloatingView implements
UserId me = connection.getUser();
if (me.isSameUser(user)) {
createMenu(manager);
String name = user.getName();
String colorActionKey = user.getFQName();
ChangeTextColorAction userColorAction = userColorActions
.get(name);
.get(colorActionKey);
if (userColorAction == null) {
userColorAction = ChangeTextColorAction
.createChangeUserTextColorAction(name, true, true,
.createChangeUserTextColorAction(user, true, true,
new RGB(0, 0, 255),
new UserColorConfigManager());
userColorActions.put(name, userColorAction);
UserColorConfigManager.getInstance());
userColorActions.put(colorActionKey, userColorAction);
}
manager.insertBefore("afterFont", userColorAction);
}

View file

@ -32,12 +32,12 @@ import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
import com.google.common.eventbus.Subscribe;
import com.raytheon.uf.viz.collaboration.comm.identity.user.IUser;
import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationConnection;
import com.raytheon.uf.viz.collaboration.ui.AbstractColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.FeedColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.ForegroundBackgroundColorDlg;
import com.raytheon.uf.viz.collaboration.ui.UserColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.colors.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.colors.FeedColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.colors.ForegroundBackgroundColorDlg;
import com.raytheon.uf.viz.collaboration.ui.colors.IColorConfigManager;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
/**
@ -50,12 +50,13 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 12/02/14 3709 mapeters Initial creation.
* 12/09/14 3709 mapeters Uses {@link ForegroundBackgroundColorDlg}, renamed from
* Dec 02, 2014 3709 mapeters Initial creation.
* Dec 09, 2014 3709 mapeters Uses {@link ForegroundBackgroundColorDlg}, renamed from
* ChangeUserColorAction, support both user and site colors.
* 12/12/14 3709 mapeters Use static methods to call constructor, icon displays
* Dec 12, 2014 3709 mapeters Use static methods to call constructor, icon displays
* current foreground and background colors.
* 01/05/15 3709 mapeters Added getTextColors(), added me param to createChangeUserTextColorAction().
* Jan 05, 2015 3709 mapeters Added getTextColors(), added me param to createChangeUserTextColorAction().
* Jan 09, 2015 3709 bclement color change manager API changes
*
* </pre>
*
@ -68,7 +69,7 @@ public class ChangeTextColorAction extends Action {
private RGB defaultForeground;
private AbstractColorConfigManager colorConfigManager;
private IColorConfigManager colorConfigManager;
private Image icon;
@ -88,20 +89,21 @@ public class ChangeTextColorAction extends Action {
* @return
*/
public static ChangeTextColorAction createChangeUserTextColorAction(
String user, boolean me, boolean displayName,
RGB defaultForeground, UserColorConfigManager colorConfigManager) {
IUser user, boolean me, boolean displayName,
RGB defaultForeground, IColorConfigManager colorConfigManager) {
String name = user.getName();
String text = "Change ";
if (displayName) {
text += me ? "Your" : (user + "'s");
text += me ? "Your" : (name + "'s");
} else {
text += "User";
}
text += " Text Colors...";
return new ChangeTextColorAction(text, user, defaultForeground,
colorConfigManager);
return new ChangeTextColorAction(text, user.getFQName(),
defaultForeground, colorConfigManager);
}
/**
* Create and return new action for changing site colors.
*
@ -121,7 +123,7 @@ public class ChangeTextColorAction extends Action {
}
private ChangeTextColorAction(String text, String key,
RGB defaultForeground, AbstractColorConfigManager colorConfigManager) {
RGB defaultForeground, IColorConfigManager colorConfigManager) {
super(text);
this.key = key;
this.defaultForeground = defaultForeground;
@ -137,7 +139,8 @@ public class ChangeTextColorAction extends Action {
public void run() {
RGB[] colors = getTextColors();
ForegroundBackgroundColorDlg dialog = new ForegroundBackgroundColorDlg(
Display.getCurrent().getActiveShell(), colors[0], colors[1]);
Display.getCurrent().getActiveShell(),
colorConfigManager.getDescription(key), colors[0], colors[1]);
dialog.setCloseCallback(new ICloseCallback() {
@ -238,4 +241,5 @@ public class ChangeTextColorAction extends Action {
icon.dispose();
}
}
}

View file

@ -17,7 +17,7 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.ui;
package com.raytheon.uf.viz.collaboration.ui.colors;
import java.util.Map;

View file

@ -17,12 +17,12 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.ui;
package com.raytheon.uf.viz.collaboration.ui.colors;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.colors.ColorInfoMap.ColorInfo;
/**
* Configuration manager for reading/writing colors for each site to/from a
@ -35,21 +35,32 @@ import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 10, 2014 3708 bclement Moved color methods from SiteConfigurationManager
* Nov 26, 2014 3709 mapeters Abstracted out code to {@link AbstractColorConfigManager},
* Nov 26, 2014 3709 mapeters Abstracted out code to {@link PersistentColorConfigManager},
* renamed from SiteColorConfigManager.
* Dec 08, 2014 3709 mapeters Set foreground and background colors together.
* Jan 09, 2015 3709 bclement made into a true singleton, moved colorInfoMap to super
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class FeedColorConfigManager extends AbstractColorConfigManager {
public class FeedColorConfigManager extends PersistentColorConfigManager {
private static final String FILE_PATH = "collaboration"
private static final String FILE_PATH = CONFIG_DIR_NAME
+ IPathManager.SEPARATOR + "siteColorInfo.xml";
private static ColorInfoMap colorInfoMap;
private static FeedColorConfigManager instance;
public static synchronized FeedColorConfigManager getInstance() {
if (instance == null) {
instance = new FeedColorConfigManager();
}
return instance;
}
protected FeedColorConfigManager() {
}
/**
* Set and store the given colors for the given site.
@ -75,13 +86,16 @@ public class FeedColorConfigManager extends AbstractColorConfigManager {
return super.getColor(site, FILE_PATH);
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.collaboration.ui.colors.IColorConfigManager#
* getDescription()
*/
@Override
protected ColorInfoMap getColorInfoMap() {
return colorInfoMap;
public String getDescription(String key) {
return "Color changes will apply to all users from site " + key
+ " in the feed room.";
}
@Override
protected void setColorInfoMap(ColorInfoMap colorInfoMap) {
FeedColorConfigManager.colorInfoMap = colorInfoMap;
}
}

View file

@ -0,0 +1,177 @@
/**
* 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.collaboration.ui.colors;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
/**
* A dialog that displays a label with settable foreground and background colors
* using a color control.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 04, 2014 3709 lvenable Initial creation
* Jan 09, 2015 3709 bclement moved primary logic to new super class
*
* </pre>
*
* @author lvenable
* @version 1.0
*/
public class ForegroundBackgroundColorDlg extends ForegroundColorDlg {
/** Background color. */
private Color backgroundClr = null;
private Button foregroundRdo;
/**
* Constructor.
*
* @param parentShell
* Parent shell.
*/
public ForegroundBackgroundColorDlg(Shell parentShell, String description) {
this(parentShell, description, null, null);
}
/**
* Constructor.
*
* @param parentShell
* Parent shell.
* @param fgRGB
* Foreground RGB.
* @param bgRGB
* Background RGB.
*/
public ForegroundBackgroundColorDlg(Shell parentShell, String description,
RGB fgRGB, RGB bgRGB) {
super(parentShell, description, fgRGB);
setText("Foreground/Background Color Chooser");
/*
* If the background RGB is null then set it to a white color.
*/
if (bgRGB == null) {
backgroundClr = new Color(parentShell.getDisplay(), new RGB(255,
255, 255));
} else {
backgroundClr = new Color(parentShell.getDisplay(), bgRGB);
}
}
@Override
protected void disposed() {
super.disposed();
if (backgroundClr != null) {
backgroundClr.dispose();
}
}
@Override
protected void createColorControls() {
Composite colorControlComp = new Composite(shell, SWT.NONE);
colorControlComp.setLayout(new GridLayout(3, false));
colorControlComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT,
true, false));
/*
* Foreground/background radio buttons.
*/
foregroundRdo = new Button(colorControlComp, SWT.RADIO);
foregroundRdo.setText("Foreground Color");
foregroundRdo.setSelection(true);
foregroundRdo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
colorWheelComp.setColor(foregroundClr.getRGB());
}
});
GridData gd = new GridData();
gd.horizontalIndent = 13;
Button backgroundRdo = new Button(colorControlComp, SWT.RADIO);
backgroundRdo.setText("Background Color");
backgroundRdo.setLayoutData(gd);
backgroundRdo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
colorWheelComp.setColor(backgroundClr.getRGB());
}
});
/*
* Label displaying the foreground/background colors.
*/
gd = new GridData();
gd.horizontalIndent = 13;
previewLabel = new Label(colorControlComp, SWT.BORDER);
FontData fd = previewLabel.getFont().getFontData()[0];
fd.setHeight(16);
fd.setStyle(SWT.BOLD);
labelFont = new Font(getDisplay(), fd);
previewLabel.setFont(labelFont);
previewLabel.setText(" Sample Text ");
previewLabel.setLayoutData(gd);
previewLabel.setForeground(foregroundClr);
previewLabel.setBackground(backgroundClr);
}
@Override
protected void collectReturnValue() {
RGB[] rgbArray = new RGB[] { foregroundClr.getRGB(),
backgroundClr.getRGB() };
setReturnValue(rgbArray);
}
@Override
public void colorChange(RGB rgb, String colorWheelTitle) {
if (foregroundRdo.getSelection()) {
foregroundClr.dispose();
foregroundClr = new Color(getDisplay(), rgb);
previewLabel.setForeground(foregroundClr);
} else {
backgroundClr.dispose();
backgroundClr = new Color(getDisplay(), rgb);
previewLabel.setBackground(backgroundClr);
}
}
}

View file

@ -17,7 +17,7 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.ui;
package com.raytheon.uf.viz.collaboration.ui.colors;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@ -39,8 +39,8 @@ import com.raytheon.viz.ui.dialogs.colordialog.ColorWheelComp;
import com.raytheon.viz.ui.dialogs.colordialog.IColorWheelChange;
/**
* A dialog that displays a label with settable foreground and background colors
* using a color control.
* A dialog that displays a label with settable foreground color using a color
* control.
*
* <pre>
*
@ -48,32 +48,31 @@ import com.raytheon.viz.ui.dialogs.colordialog.IColorWheelChange;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 4, 2014 3709 lvenable Initial creation
* Jan 09, 2015 3709 bclement Initial creation, logic from ForegroundBackgroundColorDlg
*
* </pre>
*
* @author lvenable
* @author bclement
* @version 1.0
*/
public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
public class ForegroundColorDlg extends CaveSWTDialog implements
IColorWheelChange {
/** Color wheel composite. */
private ColorWheelComp colorWheelComp;
protected ColorWheelComp colorWheelComp;
/** Foreground color. */
private Color foregroundClr = null;
protected Color foregroundClr = null;
/** Background color. */
private Color backgroundClr = null;
/** preview label control. */
protected Label previewLabel = null;
/** Foreground/Background label control. */
private Label fgbgLabel = null;
/** Font for the preview label. */
protected Font labelFont = null;
/** Fond for the foreground/background label. */
private Font labelFont = null;
protected final String description;
private Button foregroundRdo;
protected Label descriptionLabel = null;
/**
* Constructor.
@ -81,8 +80,8 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
* @param parentShell
* Parent shell.
*/
public ForegroundBackgroundColorDlg(Shell parentShell) {
this(parentShell, null, null);
public ForegroundColorDlg(Shell parentShell, String description) {
this(parentShell, description, null);
}
/**
@ -92,14 +91,12 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
* Parent shell.
* @param fgRGB
* Foreground RGB.
* @param bgRGB
* Background RGB.
*/
public ForegroundBackgroundColorDlg(Shell parentShell, RGB fgRGB, RGB bgRGB) {
public ForegroundColorDlg(Shell parentShell, String description, RGB fgRGB) {
super(parentShell, SWT.DIALOG_TRIM | SWT.MIN, CAVE.DO_NOT_BLOCK
| CAVE.PERSPECTIVE_INDEPENDENT);
setText("Foreground/Background Color Chooser");
setText("Foreground Color Chooser");
this.description = description;
/*
* If the foreground RGB is null then set it to a blue color.
*/
@ -109,16 +106,6 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
} else {
foregroundClr = new Color(parentShell.getDisplay(), fgRGB);
}
/*
* If the background RGB is null then set it to a white color.
*/
if (bgRGB == null) {
backgroundClr = new Color(parentShell.getDisplay(), new RGB(255,
255, 255));
} else {
backgroundClr = new Color(parentShell.getDisplay(), bgRGB);
}
}
@Override
@ -140,19 +127,21 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
foregroundClr.dispose();
}
if (backgroundClr != null) {
backgroundClr.dispose();
}
if (labelFont != null) {
labelFont.dispose();
}
if (descriptionLabel != null) {
descriptionLabel.dispose();
}
}
@Override
protected void initializeComponents(Shell shell) {
createColorWheelControl();
createColorControls();
if (description != null && !description.isEmpty()) {
createDescriptionLabel();
}
addSeparator();
createBottomButtons();
@ -162,7 +151,7 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
/**
* Create the color wheel controls.
*/
private void createColorWheelControl() {
protected void createColorWheelControl() {
colorWheelComp = new ColorWheelComp(shell, this, " Color Chooser: ",
true);
}
@ -170,59 +159,33 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
/**
* Create the color controls.
*/
private void createColorControls() {
Composite colorControlComp = new Composite(shell, SWT.NONE);
colorControlComp.setLayout(new GridLayout(3, false));
colorControlComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT,
true, false));
/*
* Foreground/background radio buttons.
*/
foregroundRdo = new Button(colorControlComp, SWT.RADIO);
foregroundRdo.setText("Foreground Color");
foregroundRdo.setSelection(true);
foregroundRdo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
colorWheelComp.setColor(foregroundClr.getRGB());
}
});
GridData gd = new GridData();
gd.horizontalIndent = 13;
Button backgroundRdo = new Button(colorControlComp, SWT.RADIO);
backgroundRdo.setText("Background Color");
backgroundRdo.setLayoutData(gd);
backgroundRdo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
colorWheelComp.setColor(backgroundClr.getRGB());
}
});
/*
* Label displaying the foreground/background colors.
*/
gd = new GridData();
gd.horizontalIndent = 13;
fgbgLabel = new Label(colorControlComp, SWT.BORDER);
FontData fd = fgbgLabel.getFont().getFontData()[0];
protected void createColorControls() {
previewLabel = new Label(shell, SWT.BORDER);
FontData fd = previewLabel.getFont().getFontData()[0];
fd.setHeight(16);
fd.setStyle(SWT.BOLD);
labelFont = new Font(getDisplay(), fd);
fgbgLabel.setFont(labelFont);
fgbgLabel.setText(" Sample Text ");
fgbgLabel.setLayoutData(gd);
previewLabel.setFont(labelFont);
previewLabel.setText(" Sample Text ");
previewLabel.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true,
true));
previewLabel.setForeground(foregroundClr);
}
fgbgLabel.setForeground(foregroundClr);
fgbgLabel.setBackground(backgroundClr);
/**
* Create a label that describes the scope of the color change.
*/
protected void createDescriptionLabel() {
descriptionLabel = new Label(shell, SWT.CENTER);
descriptionLabel.setText(description);
descriptionLabel.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true,
true));
}
/**
* Create the bottom OK/Cancel buttons.
*/
private void createBottomButtons() {
protected void createBottomButtons() {
Composite buttonComp = new Composite(shell, SWT.NONE);
buttonComp.setLayout(new GridLayout(2, false));
buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true,
@ -238,9 +201,7 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
okBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
RGB[] rgbArray = new RGB[] { foregroundClr.getRGB(),
backgroundClr.getRGB() };
setReturnValue(rgbArray);
collectReturnValue();
close();
}
});
@ -259,10 +220,18 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
});
}
/**
* Collect the return value from fields. Called when user clicks the ok
* button.
*/
protected void collectReturnValue() {
setReturnValue(foregroundClr.getRGB());
}
/**
* Add a separator line to the dialog.
*/
private void addSeparator() {
protected void addSeparator() {
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
Label sepLbl = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
sepLbl.setLayoutData(gd);
@ -277,15 +246,9 @@ public class ForegroundBackgroundColorDlg extends CaveSWTDialog implements
*/
@Override
public void colorChange(RGB rgb, String colorWheelTitle) {
if (foregroundRdo.getSelection()) {
foregroundClr.dispose();
foregroundClr = new Color(getDisplay(), rgb);
fgbgLabel.setForeground(foregroundClr);
} else {
backgroundClr.dispose();
backgroundClr = new Color(getDisplay(), rgb);
fgbgLabel.setBackground(backgroundClr);
}
foregroundClr.dispose();
foregroundClr = new Color(getDisplay(), rgb);
previewLabel.setForeground(foregroundClr);
}
}

View file

@ -0,0 +1,68 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.ui.colors;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.viz.collaboration.ui.colors.ColorInfoMap.ColorInfo;
/**
* Interface for color configuration managers to keep track of custom color
* settings for users. Colors are tracked by a string key which could be the
* user name or attribute (eg site name).
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 08, 2015 3709 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public interface IColorConfigManager {
/**
* Set display colors
*
* @param key
* @param foreground
* @param background
*/
public void setColors(String key, RGB foreground, RGB background);
/**
* Get display colors
*
* @param key
* @return
*/
public ColorInfo getColor(String key);
/**
* @return human readable description of color management
*/
public String getDescription(String key);
}

View file

@ -1,4 +1,4 @@
package com.raytheon.uf.viz.collaboration.ui;
package com.raytheon.uf.viz.collaboration.ui.colors;
import java.util.HashMap;
import java.util.Map;
@ -14,7 +14,8 @@ import com.raytheon.uf.common.localization.PathManager;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.colors.ColorInfoMap.ColorInfo;
/**
* Abstract class for collaboration chat coloring configuration managers
@ -27,17 +28,24 @@ import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
* ------------ ---------- ----------- --------------------------
* Nov 13, 2014 3709 mapeters Initial creation.
* Dec 09, 2014 3709 mapeters setColors() sets foreground and background together.
* Jan 09, 2015 3709 bclement renamed from AbstractColorConfigManager
* moved colorInfoMap from subclasses to here
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public abstract class AbstractColorConfigManager {
public abstract class PersistentColorConfigManager implements
IColorConfigManager {
protected static final String CONFIG_DIR_NAME = "collaboration";
private static final SingleTypeJAXBManager<ColorInfoMap> jaxb = SingleTypeJAXBManager
.createWithoutException(ColorInfoMap.class);
private ColorInfoMap colorInfoMap;
/**
* Set and store the given foreground and background colors for the given
* user/site at the given file location.
@ -118,11 +126,11 @@ public abstract class AbstractColorConfigManager {
return null;
}
public abstract void setColors(String key, RGB foreground, RGB background);
protected ColorInfoMap getColorInfoMap() {
return colorInfoMap;
}
public abstract ColorInfo getColor(String key);
protected abstract ColorInfoMap getColorInfoMap();
protected abstract void setColorInfoMap(ColorInfoMap colorInfo);
protected void setColorInfoMap(ColorInfoMap colorInfo) {
this.colorInfoMap = colorInfo;
}
}

View file

@ -0,0 +1,119 @@
/**
* 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.collaboration.ui.colors;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.viz.collaboration.comm.provider.user.IDConverter;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueId;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.ui.colors.ColorInfoMap.ColorInfo;
/**
* Keeps track of custom user color configurations for users in a particular
* chat room
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 08, 2015 3709 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class RoomSpecificColorConfigManager extends
PersistentColorConfigManager {
private static final String ROOM_CONFIG_DIR = CONFIG_DIR_NAME
+ IPathManager.SEPARATOR + "roomColors";
private final String roomId;
private final String configFilePath;
/**
* @param roomId
* @return
*/
public static RoomSpecificColorConfigManager getManagerForRoom(String roomId) {
/*
* if multiple managers are created for the same room, it could cause
* concurrency issues with writing to localization. This could be solved
* with a soft reference cache here. However, since there *should* only
* be one of these per room id, it might be overkill
*/
return new RoomSpecificColorConfigManager(roomId);
}
/**
* @param roomId
*/
protected RoomSpecificColorConfigManager(String roomId) {
this.roomId = roomId;
this.configFilePath = ROOM_CONFIG_DIR + IPathManager.SEPARATOR + roomId;
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.collaboration.ui.AbstractColorConfigManager#setColors
* (java.lang.String, org.eclipse.swt.graphics.RGB,
* org.eclipse.swt.graphics.RGB)
*/
@Override
public synchronized void setColors(String participant, RGB foreground,
RGB background) {
super.setColors(participant, foreground, background, configFilePath);
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.collaboration.ui.AbstractColorConfigManager#getColor
* (java.lang.String)
*/
@Override
public synchronized ColorInfo getColor(String participant) {
return super.getColor(participant, configFilePath);
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.collaboration.ui.colors.IColorConfigManager#
* getDescription()
*/
@Override
public String getDescription(String key) {
VenueParticipant id = IDConverter.convertFromRoom(null, key);
VenueId venue = VenueId.fromString(roomId);
return "Color changes will apply to the user " + id.getName()
+ " only in the " + venue.getName() + " room.";
}
}

View file

@ -0,0 +1,103 @@
/**
* 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.collaboration.ui.colors;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.viz.collaboration.comm.provider.user.IDConverter;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueId;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.ui.colors.ColorInfoMap.ColorInfo;
/**
* Non-persistent color configuration manager
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 08, 2015 3709 bclement Initial creation
*
* </pre>
*
* @author bclement
* @version 1.0
*/
public class TemporaryColorConfigManager implements IColorConfigManager {
private final Map<String, ColorInfo> map = new HashMap<String, ColorInfoMap.ColorInfo>();
private final String roomId;
/**
*
*/
public TemporaryColorConfigManager(String roomId) {
this.roomId = roomId;
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.collaboration.ui.colors.IColorConfigManager#setColors
* (java.lang.String, org.eclipse.swt.graphics.RGB,
* org.eclipse.swt.graphics.RGB)
*/
@Override
public void setColors(String key, RGB foreground, RGB background) {
ColorInfo info = new ColorInfo();
info.setColors(foreground, background);
map.put(key, info);
}
/*
* (non-Javadoc)
*
* @see
* com.raytheon.uf.viz.collaboration.ui.colors.IColorConfigManager#getColor
* (java.lang.String)
*/
@Override
public ColorInfo getColor(String key) {
return map.get(key);
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.collaboration.ui.colors.IColorConfigManager#
* getDescription()
*/
@Override
public String getDescription(String key) {
VenueParticipant id = IDConverter.convertFromRoom(null, key);
VenueId venue = VenueId.fromString(roomId);
return "Color changes will apply to the user " + id.getName()
+ " only in the " + venue.getName() + " room. "
+ "\nColor changes will be discarded when you leave the room.";
}
}

View file

@ -17,15 +17,18 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.ui;
package com.raytheon.uf.viz.collaboration.ui.colors;
import org.eclipse.swt.graphics.RGB;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.comm.provider.user.IDConverter;
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
import com.raytheon.uf.viz.collaboration.ui.colors.ColorInfoMap.ColorInfo;
/**
* User coloring configuration manager
* Custom user coloring configuration manager for use where the user's true
* identity is known (eg one-to-one chat)
*
* <pre>
*
@ -34,20 +37,31 @@ import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 13, 2014 3709 mapeters Initial creation.
* Nov 26, 2014 3709 mapeters Abstracted out code to {@link AbstractColorConfigManager}.
* Nov 26, 2014 3709 mapeters Abstracted out code to {@link PersistentColorConfigManager}.
* Dec 08, 2014 3709 mapeters Set foreground and background colors together.
* Jan 09, 2015 3709 bclement made into a true singleton, moved colorInfoMap to super
*
* </pre>
*
* @author mapeters
* @version 1.0
*/
public class UserColorConfigManager extends AbstractColorConfigManager {
public class UserColorConfigManager extends PersistentColorConfigManager {
private static final String FILE_PATH = "collaboration"
private static final String FILE_PATH = CONFIG_DIR_NAME
+ IPathManager.SEPARATOR + "userColorInfo.xml";
private static ColorInfoMap colorInfoMap;
private static UserColorConfigManager instance;
public static synchronized UserColorConfigManager getInstance() {
if (instance == null) {
instance = new UserColorConfigManager();
}
return instance;
}
protected UserColorConfigManager() {
}
/**
* Set and store the given colors for the given user.
@ -73,13 +87,17 @@ public class UserColorConfigManager extends AbstractColorConfigManager {
return super.getColor(user, FILE_PATH);
}
/*
* (non-Javadoc)
*
* @see com.raytheon.uf.viz.collaboration.ui.colors.IColorConfigManager#
* getDescription()
*/
@Override
protected ColorInfoMap getColorInfoMap() {
return colorInfoMap;
public String getDescription(String key) {
UserId id = IDConverter.convertFrom(key);
return "Color changes will apply to one-on-one chat sessions with user "
+ id.getName() + ".";
}
@Override
protected void setColorInfoMap(ColorInfoMap colorInfoMap) {
UserColorConfigManager.colorInfoMap = colorInfoMap;
}
}

View file

@ -34,7 +34,6 @@ import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.ColorDialog;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
@ -73,6 +72,7 @@ import com.raytheon.uf.viz.collaboration.display.rsc.telestrator.CollaborationDr
import com.raytheon.uf.viz.collaboration.display.rsc.telestrator.CollaborationDrawingToolLayer;
import com.raytheon.uf.viz.collaboration.display.rsc.telestrator.CollaborationDrawingUIManager;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.colors.ForegroundColorDlg;
import com.raytheon.uf.viz.core.ContextManager;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.drawables.IRenderableDisplay;
@ -82,6 +82,7 @@ import com.raytheon.uf.viz.core.rsc.IResourceDataChanged;
import com.raytheon.uf.viz.core.rsc.capabilities.EditableCapability;
import com.raytheon.uf.viz.drawing.DrawingToolLayer;
import com.raytheon.uf.viz.drawing.DrawingToolLayer.DrawMode;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
import com.raytheon.viz.ui.input.EditableManager;
/**
@ -107,6 +108,7 @@ import com.raytheon.viz.ui.input.EditableManager;
* May 05, 2014 3076 bclement added clear all action
* Jun 30, 2014 1798 bclement added disableCurrentLayer()
* Dev 02, 2014 3709 mapeters added {@link #initComponents()} override
* Jan 09, 2015 3709 bclement now uses ForegroundColorDlg for consistency
*
* </pre>
*
@ -248,6 +250,29 @@ public class CollaborationSessionView extends SessionView implements
super.initComponents(parent);
}
/**
* Callback used in the change color action. Gets the new color from the
* dialog and sends a color change event to the session
*/
private final ICloseCallback colorChangeCallback = new ICloseCallback() {
public void dialogClosed(Object returnValue) {
if (returnValue != null && returnValue instanceof RGB) {
RGB rgb = (RGB) returnValue;
IStructuredSelection selection = (IStructuredSelection) usersTable
.getSelection();
VenueParticipant entry = (VenueParticipant) selection
.getFirstElement();
ColorChangeEvent event = new ColorChangeEvent(entry, rgb);
try {
session.sendObjectToVenue(event);
} catch (CollaborationException e) {
statusHandler.handle(Priority.PROBLEM,
"Unable to send color change to venue", e);
}
}
}
};
@Override
protected void createActions() {
super.createActions();
@ -256,22 +281,12 @@ public class CollaborationSessionView extends SessionView implements
IconUtil.getImageDescriptor(bundle, "change_color.gif")) {
@Override
public void run() {
ColorDialog dlg = new ColorDialog(Display.getCurrent()
.getActiveShell());
RGB rgb = dlg.open();
if (rgb != null) {
IStructuredSelection selection = (IStructuredSelection) usersTable
.getSelection();
VenueParticipant entry = (VenueParticipant) selection
.getFirstElement();
ColorChangeEvent event = new ColorChangeEvent(entry, rgb);
try {
session.sendObjectToVenue(event);
} catch (CollaborationException e) {
statusHandler.handle(Priority.PROBLEM,
"Unable to send color change to venue", e);
}
}
ForegroundColorDlg dlg = new ForegroundColorDlg(Display
.getCurrent().getActiveShell(),
"Color changes will be seen by all participants of the "
+ session.getVenueName() + " session.");
dlg.setCloseCallback(colorChangeCallback);
dlg.open();
}
};

View file

@ -49,10 +49,10 @@ import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationC
import com.raytheon.uf.viz.collaboration.comm.provider.user.RosterItem;
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.UserColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeTextColorAction;
import com.raytheon.uf.viz.collaboration.ui.actions.PrintLogActionContributionItem;
import com.raytheon.uf.viz.collaboration.ui.colors.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.colors.UserColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.notifier.NotifierTask;
import com.raytheon.uf.viz.collaboration.ui.notifier.NotifierTools;
import com.raytheon.uf.viz.core.sounds.SoundUtil;
@ -77,6 +77,7 @@ import com.raytheon.uf.viz.core.sounds.SoundUtil;
* Dec 08, 2014 3709 mapeters move color change actions to menu bar.
* Dec 12, 2014 3709 mapeters Store {@link ChangeTextColorAction}s as fields,
* dispose them.
* Jan 09, 2015 3709 bclement color config manager API changes
*
* </pre>
*
@ -241,7 +242,7 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
if (userId != null) {
// get user colors from config manager
ColorInfo userColor = colorConfigManager.getColor(userId
.getName());
.getFQName());
if (userColor != null) {
fgColor = getColorFromRGB(userColor.getColor(SWT.FOREGROUND));
bgColor = getColorFromRGB(userColor.getColor(SWT.BACKGROUND));
@ -329,7 +330,7 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
@Override
protected void initComponents(Composite parent) {
super.initComponents(parent);
colorConfigManager = new UserColorConfigManager();
colorConfigManager = UserColorConfigManager.getInstance();
// unfortunately this code cannot be a part of createToolbarButton
// because I cannot instantiate the ACI until after the messagesText
@ -398,11 +399,10 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
*/
private void createDropDownMenu() {
IMenuManager mgr = getViewSite().getActionBars().getMenuManager();
String myName = CollaborationConnection.getConnection().getUser()
.getName();
UserId myUser = CollaborationConnection.getConnection().getUser();
RGB defaultUserForeground = DEFAULT_USER_FOREGROUND_COLOR.getRGB();
userColorAction = ChangeTextColorAction
.createChangeUserTextColorAction(myName, true, true,
.createChangeUserTextColorAction(myUser, true, true,
defaultUserForeground, colorConfigManager);
mgr.add(userColorAction);
}
@ -412,10 +412,9 @@ public class PeerToPeerView extends AbstractSessionView<IUser> implements
*/
public void addChangePeerColorAction() {
IMenuManager mgr = getViewSite().getActionBars().getMenuManager();
String peerName = peer.getName();
RGB defaultPeerForeground = DEFAULT_PEER_FOREGROUND_COLOR.getRGB();
peerColorAction = ChangeTextColorAction
.createChangeUserTextColorAction(peerName, false, true,
.createChangeUserTextColorAction(peer, false, true,
defaultPeerForeground, colorConfigManager);
mgr.add(peerColorAction);
}

View file

@ -43,10 +43,10 @@ import com.raytheon.uf.viz.collaboration.comm.identity.info.SiteConfigInformatio
import com.raytheon.uf.viz.collaboration.comm.provider.connection.CollaborationConnection;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.FeedColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.SiteConfigurationManager;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeTextColorAction;
import com.raytheon.uf.viz.collaboration.ui.colors.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.colors.FeedColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.prefs.CollabPrefConstants;
/**
@ -79,6 +79,7 @@ import com.raytheon.uf.viz.collaboration.ui.prefs.CollabPrefConstants;
* Dec 08, 2014 3709 mapeters Removed ChangeSiteColorAction, uses {@link ChangeTextColorAction}.
* Dec 12, 2014 3709 mapeters Store {@link ChangeTextColorAction}s in map, dispose them.
* Jan 05, 2015 3709 mapeters Use both site and user name as key in siteColorActions map.
* Jan 09, 2015 3709 bclement color config manager API changes
*
* </pre>
*
@ -131,7 +132,7 @@ public class SessionFeedView extends SessionView {
enableUserColors = false;
super.initComponents(parent);
colorConfigManager = new FeedColorConfigManager();
colorConfigManager = FeedColorConfigManager.getInstance();
usersTable.refresh();
siteColorActions = new HashMap<>();

View file

@ -83,11 +83,13 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.display.data.SessionColorManager;
import com.raytheon.uf.viz.collaboration.ui.Activator;
import com.raytheon.uf.viz.collaboration.ui.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.UserColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.actions.ChangeTextColorAction;
import com.raytheon.uf.viz.collaboration.ui.actions.PeerToPeerChatAction;
import com.raytheon.uf.viz.collaboration.ui.actions.PrintLogActionContributionItem;
import com.raytheon.uf.viz.collaboration.ui.colors.ColorInfoMap.ColorInfo;
import com.raytheon.uf.viz.collaboration.ui.colors.IColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.colors.RoomSpecificColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.colors.TemporaryColorConfigManager;
import com.raytheon.uf.viz.collaboration.ui.prefs.CollabPrefConstants;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.sounds.SoundUtil;
@ -122,6 +124,7 @@ import com.raytheon.uf.viz.core.sounds.SoundUtil;
* use parent's colors map.
* Dec 02, 2014 3709 mapeters added color actions for group chats without shared display.
* Dec 12, 2014 3709 mapeters Store {@link ChangeTextColorAction}s in map, dispose them.
* Jan 09, 2015 3709 bclement color config manager API changes
*
* </pre>
*
@ -155,7 +158,7 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
protected SessionColorManager colorManager;
private static UserColorConfigManager colorConfigManager;
private IColorConfigManager colorConfigManager;
private Map<String, ChangeTextColorAction> userColorActions;
@ -183,7 +186,14 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
initColorManager();
super.initComponents(parent);
if (enableUserColors) {
colorConfigManager = new UserColorConfigManager();
IVenue venue = session.getVenue();
if (venue.isPersistent()) {
colorConfigManager = RoomSpecificColorConfigManager
.getManagerForRoom(venue.getId());
} else {
colorConfigManager = new TemporaryColorConfigManager(
venue.getId());
}
userColorActions = new HashMap<>();
}
@ -241,14 +251,15 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
}
if (enableUserColors) {
// add color actions if in group chat room without shared display
String user = entry.getName();
String colorActionKey = entry.getFQName();
RGB defaultForeground = colorManager.getColorForUser(entry);
ChangeTextColorAction userColorAction = userColorActions.get(user);
ChangeTextColorAction userColorAction = userColorActions
.get(colorActionKey);
if (userColorAction == null) {
userColorAction = ChangeTextColorAction
.createChangeUserTextColorAction(user, me, me,
.createChangeUserTextColorAction(entry, me, me,
defaultForeground, colorConfigManager);
userColorActions.put(user, userColorAction);
userColorActions.put(colorActionKey, userColorAction);
}
manager.add(userColorAction);
}
@ -522,9 +533,10 @@ public class SessionView extends AbstractSessionView<VenueParticipant>
protected void styleAndAppendText(StringBuilder sb, int offset,
String name, VenueParticipant userId, List<StyleRange> ranges,
Color fgColor, Color bgColor, String subject) {
if (enableUserColors && name != null) {
if (enableUserColors && userId != null) {
// Color text by user if in group chat room without shared display
ColorInfo userColor = colorConfigManager.getColor(name);
ColorInfo userColor = colorConfigManager.getColor(userId
.getFQName());
if (userColor != null) {
fgColor = getColorFromRGB(userColor.getColor(SWT.FOREGROUND));
bgColor = getColorFromRGB(userColor.getColor(SWT.BACKGROUND));

View file

@ -29,9 +29,6 @@ import java.util.SortedMap;
import java.util.TreeMap;
import java.util.regex.Pattern;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
@ -40,20 +37,17 @@ import com.raytheon.uf.common.dataplugin.fog.FogRecord.FOG_THREAT;
import com.raytheon.uf.common.geospatial.SpatialException;
import com.raytheon.uf.common.monitor.MonitorAreaUtils;
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager.MonName;
import com.raytheon.uf.common.monitor.data.AdjacentWfoMgr;
import com.raytheon.uf.common.monitor.data.CommonConfig;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.alerts.AlertMessage;
import com.raytheon.uf.viz.core.notification.NotificationMessage;
import com.raytheon.uf.viz.monitor.IMonitor;
import com.raytheon.uf.viz.monitor.Monitor;
import com.raytheon.uf.viz.monitor.ObsMonitor;
import com.raytheon.uf.viz.monitor.data.AreaContainer;
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
import com.raytheon.uf.viz.monitor.data.ObMultiHrsReports;
import com.raytheon.uf.viz.monitor.data.ObReport;
import com.raytheon.uf.viz.monitor.data.ObsData;
@ -65,7 +59,6 @@ import com.raytheon.uf.viz.monitor.fog.threshold.FogThresholdMgr;
import com.raytheon.uf.viz.monitor.fog.ui.dialogs.FogMonitoringAreaConfigDlg;
import com.raytheon.uf.viz.monitor.fog.ui.dialogs.FogZoneTableDlg;
import com.raytheon.uf.viz.monitor.ui.dialogs.MonitoringAreaConfigDlg;
import com.raytheon.uf.viz.monitor.util.MonitorThresholdConfiguration;
import com.raytheon.viz.alerts.observers.ProductAlertObserver;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
import com.vividsolutions.jts.geom.Geometry;
@ -93,6 +86,7 @@ import com.vividsolutions.jts.geom.Geometry;
* Sep 23, 2014 3356 njensen Remove unnecessary import
* Oct 16, 2014 3220 skorolev Corrected fogConfig assignment.
* Dec 11, 2014 3220 skorolev Moved refreshing of table in the UI thread.
* Jan 08, 2015 3220 skorolev Replaced MonitoringArea with fogConfig.
*
*
* </pre>
@ -165,12 +159,10 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
private FogMonitor() {
pluginPatterns.add(fogPattern);
fogConfig = FSSObsMonitorConfigurationManager.getFogObsManager();
updateMonitoringArea();
initObserver(OBS, this);
obData = new ObMultiHrsReports(CommonConfig.AppName.FOG);
obData.setThresholdMgr(FogThresholdMgr.getInstance());
obData.getZoneTableData();
readTableConfig(MonitorThresholdConfiguration.FOG_THRESHOLD_CONFIG);
}
/**
@ -184,7 +176,8 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
// Pre-populate dialog with an observations from DB
monitor.createDataStructures();
monitor.getAdjAreas();
monitor.processProductAtStartup(MonName.fog.name());
List<String> zones = monitor.fogConfig.getAreaList();
monitor.processProductAtStartup(zones);
monitor.fireMonitorEvent(monitor);
}
@ -215,8 +208,8 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
obsData = new ObsData();
algorithmData = new TreeMap<Date, Map<String, FOG_THREAT>>();
for (String zone : MonitoringArea.getPlatformMap().keySet()) {
obsData.addArea(zone, MonitoringArea.getPlatformMap().get(zone));
for (String zone : fogConfig.getAreaList()) {
obsData.addArea(zone, fogConfig.getAreaStations(zone));
}
}
@ -254,38 +247,11 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
@Override
public void processProductMessage(final AlertMessage filtered) {
if (fogPattern.matcher(filtered.dataURI).matches()) {
processURI(filtered.dataURI, filtered);
List<String> zones = fogConfig.getAreaList();
processURI(filtered.dataURI, filtered, zones);
}
}
/**
* Method that reads the table configuration and updates the zone monitor
* threshold map
*
* @param file
* -- the xml configuration filename
*/
public void readTableConfig(String file) {
// TODO update for Maritime
Map<String, List<String>> zones = new HashMap<String, List<String>>();
// create zones and stations list
try {
for (String zone : fogConfig.getAreaList()) {
// add the unique
List<String> stations = fogConfig.getAreaStations(zone);
zones.put(zone, stations);
}
} catch (Exception ve) {
String msg = "FOG Monitor failed to load configuration..."
+ this.getClass().getName();
ErrorDialog.openError(Display.getCurrent().getActiveShell(),
"FOG Monitor failed to load configuration", msg,
new Status(IStatus.ERROR, Activator.PLUGIN_ID, msg, ve));
}
MonitoringArea.setPlatformMap(zones);
}
/*
* (non-Javadoc)
*
@ -319,17 +285,9 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
@Override
public void configUpdate(IMonitorConfigurationEvent me) {
fogConfig = (FSSObsMonitorConfigurationManager) me.getSource();
updateMonitoringArea();
if (zoneDialog != null && !zoneDialog.isDisposed()) {
VizApp.runAsync(new Runnable() {
@Override
public void run() {
zoneDialog.refreshZoneTableData(obData);
fireMonitorEvent(zoneDialog.getClass().getName());
}
});
zoneDialog.refreshZoneTableData(obData);
fireMonitorEvent(zoneDialog.getClass().getName());
}
}
@ -343,21 +301,6 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
monitor = null;
}
/**
* Finds the zone based on the icao passed into it
*
* @param icao
* @return zone
*/
public String findZone(String icao) {
for (String zone : MonitoringArea.getPlatformMap().keySet()) {
if (MonitoringArea.getPlatformMap().get(zone).contains(icao)) {
return zone;
}
}
return null;
}
/**
* Gets the main map
*
@ -377,12 +320,16 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
@Override
protected void process(ObReport result) throws Exception {
obData.addReport(result);
String zone = findZone(result.getPlatformId());
if (zone != null) {
AreaContainer ac = getTableData().getArea(zone);
if (ac != null) {
ac.addReport(result.getObservationTime(), result);
fireMonitorEvent(this);
// Get zones containing station
List<String> zones = fogConfig.getAreaByStationId(result
.getPlatformId());
if (!zones.isEmpty() || zones != null) {
for (String zn : zones) {
AreaContainer ac = getTableData().getArea(zn);
if (ac != null) {
ac.addReport(result.getObservationTime(), result);
fireMonitorEvent(this);
}
}
}
}
@ -455,7 +402,7 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
algData = algorithmData.get(time);
} else {
// by default is nothing in the ALG column
for (String zone : MonitoringArea.getPlatformMap().keySet()) {
for (String zone : fogConfig.getAreaList()) {
algData.put(zone, FOG_THREAT.GRAY);
}
}
@ -632,9 +579,14 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
@Override
protected void processAtStartup(ObReport report) {
obData.addReport(report);
String zone = findZone(report.getPlatformId());
getTableData().getArea(zone).addReport(report.getObservationTime(),
report);
List<String> zones = fogConfig.getAreaByStationId(report
.getPlatformId());
if (!zones.isEmpty() || zones != null) {
for (String zn : zones) {
getTableData().getArea(zn).addReport(
report.getObservationTime(), report);
}
}
}
/**
@ -647,19 +599,11 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener {
}
/**
* Reads Table Configuration.
*
* Method that reads the table configuration and updates the zone monitor
* threshold map
* Gets Fog Area configuration dialog
*
* @return
*/
private void updateMonitoringArea() {
Map<String, List<String>> zones = new HashMap<String, List<String>>();
// create zones and station list
for (String zone : fogConfig.getAreaList()) {
List<String> stations = fogConfig.getAreaStations(zone);
zones.put(zone, stations);
}
MonitoringArea.setPlatformMap(zones);
public MonitoringAreaConfigDlg getAreaDialog() {
return areaDialog;
}
}

View file

@ -25,8 +25,8 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.viz.monitor.fog.FogMonitor;
import com.raytheon.uf.viz.monitor.fog.ui.dialogs.FogMonitoringAreaConfigDlg;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
/**
* The Fog Monitor Action
@ -42,6 +42,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* May 08, 2014 3086 skorolev Added CloseCallback to dialog.
* Sep 16, 2014 2757 skorolev Added test of dialog on dispose.
* Sep 19, 2014 3220 skorolev Added check on dispose.
* Jan 08, 2015 3220 skorolev Used area type for launchDialog.
*
* </pre>
*
@ -65,19 +66,13 @@ public class FogAreaConfigAction extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
if (areaDialog == null || areaDialog.isDisposed()) {
FogMonitor fog = FogMonitor.getInstance();
if (fog.getAreaDialog() == null || fog.getAreaDialog().isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
areaDialog = new FogMonitoringAreaConfigDlg(shell,
"Fog Monitor Area Configuration");
areaDialog.setCloseCallback(new ICloseCallback() {
@Override
public void dialogClosed(Object returnValue) {
areaDialog = null;
}
});
fog.launchDialog("area", shell);
}
areaDialog.open();
return null;
}
}

View file

@ -42,14 +42,12 @@ import com.raytheon.uf.common.monitor.data.CommonConfig;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.alerts.AlertMessage;
import com.raytheon.uf.viz.core.notification.NotificationMessage;
import com.raytheon.uf.viz.monitor.IMonitor;
import com.raytheon.uf.viz.monitor.Monitor;
import com.raytheon.uf.viz.monitor.ObsMonitor;
import com.raytheon.uf.viz.monitor.config.CommonTableConfig.CellType;
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
import com.raytheon.uf.viz.monitor.data.ObMultiHrsReports;
import com.raytheon.uf.viz.monitor.data.ObReport;
import com.raytheon.uf.viz.monitor.data.TableCellData;
@ -61,8 +59,6 @@ import com.raytheon.uf.viz.monitor.safeseas.listeners.ISSResourceListener;
import com.raytheon.uf.viz.monitor.safeseas.threshold.SSThresholdMgr;
import com.raytheon.uf.viz.monitor.safeseas.ui.dialogs.SSMonitoringAreaConfigDlg;
import com.raytheon.uf.viz.monitor.safeseas.ui.dialogs.SSZoneTableDlg;
import com.raytheon.uf.viz.monitor.ui.dialogs.ZoneTableDlg;
import com.raytheon.uf.viz.monitor.util.MonitorThresholdConfiguration;
import com.raytheon.viz.alerts.observers.ProductAlertObserver;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
import com.vividsolutions.jts.geom.Geometry;
@ -89,6 +85,7 @@ import com.vividsolutions.jts.geom.Geometry;
* Sep 04, 2014 3220 skorolev Updated configUpdate method and added updateMonitoringArea.
* Oct 16, 2014 3220 skorolev Corrected ssAreaConfig assignment.
* Dec 11, 2014 3220 skorolev Moved refreshing of table in the UI thread.
* Jan 08, 2015 3220 skorolev Replaced MonitoringArea with ssAreaConfig.
*
* </pre>
*
@ -164,13 +161,10 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
private SafeSeasMonitor() {
pluginPatterns.add(ssPattern);
ssAreaConfig = FSSObsMonitorConfigurationManager.getSsObsManager();
updateMonitoringArea();
initObserver(OBS, this);
obData = new ObMultiHrsReports(CommonConfig.AppName.SAFESEAS);
obData.setThresholdMgr(SSThresholdMgr.getInstance());
obData.getZoneTableData();
readTableConfig(MonitorThresholdConfiguration.SAFESEAS_THRESHOLD_CONFIG);
}
/**
@ -182,7 +176,8 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
// Pre-populate dialog with an observation (METAR) for KOMA
monitor.createDataStructures();
monitor.getAdjAreas();
monitor.processProductAtStartup("ss");
List<String> zones = monitor.ssAreaConfig.getAreaList();
monitor.processProductAtStartup(zones);
monitor.fireMonitorEvent(monitor);
}
return monitor;
@ -228,7 +223,7 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
} else if (type.equals("area")) {
if (areaDialog == null) {
areaDialog = new SSMonitoringAreaConfigDlg(shell,
"Safe Seas Monitor Area Configuration");
"SAFESEAS Monitor Area Configuration");
areaDialog.setCloseCallback(new ICloseCallback() {
@Override
@ -276,7 +271,8 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
@Override
public void processProductMessage(final AlertMessage filtered) {
if (ssPattern.matcher(filtered.dataURI).matches()) {
processURI(filtered.dataURI, filtered);
final List<String> zones = ssAreaConfig.getAreaList();
processURI(filtered.dataURI, filtered, zones);
}
}
@ -299,31 +295,6 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
stationTableData.addReplaceDataRow(stationRowData);
}
/**
* Reads Table Configuration.
*
* Method that reads the table configuration and updates the zone monitor
* threshold map
*
* @param file
* -- the xml configuration filename
*/
public void readTableConfig(String file) {
Map<String, List<String>> zones = new HashMap<String, List<String>>();
// create zones and station list
try {
for (String zone : ssAreaConfig.getAreaList()) {
List<String> stations = ssAreaConfig.getAreaStations(zone);
zones.put(zone, stations);
}
} catch (Exception e) {
statusHandler.handle(Priority.CRITICAL,
"SafeSeas failed to load configuration..."
+ this.getClass().getName(), e);
}
MonitoringArea.setPlatformMap(zones);
}
/*
* (non-Javadoc)
*
@ -357,18 +328,8 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
@Override
public void configUpdate(IMonitorConfigurationEvent me) {
ssAreaConfig = (FSSObsMonitorConfigurationManager) me.getSource();
updateMonitoringArea();
if (zoneDialog != null && !zoneDialog.isDisposed()) {
VizApp.runAsync(new Runnable() {
@Override
public void run() {
zoneDialog.refreshZoneTableData(obData);
fireMonitorEvent(zoneDialog.getClass().getName());
}
});
}
zoneDialog.refreshZoneTableData(obData);
fireMonitorEvent(zoneDialog.getClass().getName());
}
/**
@ -553,7 +514,7 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
algData = algorithmData.get(time);
} else {
// by default is nothing in the Fog column
for (String zone : MonitoringArea.getPlatformMap().keySet()) {
for (String zone : ssAreaConfig.getAreaList()) {
algData.put(zone, FOG_THREAT.GRAY);
}
}
@ -594,15 +555,6 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
return type;
}
/**
* Gets zone dialog
*
* @return zoneDialog
*/
public ZoneTableDlg getDialog() {
return zoneDialog;
}
/**
* Gets adjacent areas
*/
@ -679,19 +631,11 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener {
}
/**
* Reads Table Configuration.
*
* Method that reads the table configuration and updates the zone monitor
* threshold map
* Gets SAFESEAS Area configuration dialog
*
* @return
*/
public void updateMonitoringArea() {
Map<String, List<String>> zones = new HashMap<String, List<String>>();
// create zones and station list
for (String zone : ssAreaConfig.getAreaList()) {
List<String> stations = ssAreaConfig.getAreaStations(zone);
zones.put(zone, stations);
}
MonitoringArea.setPlatformMap(zones);
public SSMonitoringAreaConfigDlg getAreaDialog() {
return areaDialog;
}
}

View file

@ -25,8 +25,7 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.viz.monitor.safeseas.ui.dialogs.SSMonitoringAreaConfigDlg;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
import com.raytheon.uf.viz.monitor.safeseas.SafeSeasMonitor;
/**
* The SAFESEAS Action
@ -42,6 +41,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* May 08, 2014 3086 skorolev Added CloseCallback to dialog.
* Sep 16, 2014 2757 skorolev Added test of dialog on dispose.
* Sep 19, 2014 3220 skorolev Added check on dispose.
* Jan 08, 2015 3220 skorolev Used area type for launchDialog.
*
* </pre>
*
@ -51,11 +51,6 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
public class SafeseasAreaConfigAction extends AbstractHandler {
/**
* SAFESEAS Monitoring Area Configuration Dialog.
*/
private SSMonitoringAreaConfigDlg configDlg;
/*
* (non-Javadoc)
*
@ -65,19 +60,14 @@ public class SafeseasAreaConfigAction extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
if (configDlg == null || configDlg.isDisposed()) {
SafeSeasMonitor monitor = SafeSeasMonitor.getInstance();
if (monitor.getAreaDialog() == null
|| monitor.getAreaDialog().isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
configDlg = new SSMonitoringAreaConfigDlg(shell,
"SAFESEAS Monitor Area Configuration");
configDlg.setCloseCallback(new ICloseCallback() {
@Override
public void dialogClosed(Object returnValue) {
configDlg = null;
}
});
monitor.launchDialog("area", shell);
}
configDlg.open();
return null;
}
}

View file

@ -22,9 +22,7 @@ package com.raytheon.uf.viz.monitor.snow;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import org.eclipse.swt.widgets.Shell;
@ -34,13 +32,11 @@ import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
import com.raytheon.uf.common.monitor.data.CommonConfig;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.alerts.AlertMessage;
import com.raytheon.uf.viz.core.notification.NotificationMessage;
import com.raytheon.uf.viz.monitor.IMonitor;
import com.raytheon.uf.viz.monitor.Monitor;
import com.raytheon.uf.viz.monitor.ObsMonitor;
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
import com.raytheon.uf.viz.monitor.data.ObMultiHrsReports;
import com.raytheon.uf.viz.monitor.data.ObReport;
import com.raytheon.uf.viz.monitor.events.IMonitorConfigurationEvent;
@ -76,6 +72,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* Sep 04, 2014 3220 skorolev Updated configUpdate method and added updateMonitoringArea.
* Oct 16, 2014 3220 skorolev Corrected snowConfig assignment.
* Dec 11, 2014 3220 skorolev Moved refreshing of table in the UI thread.
* Jan 08, 2015 3220 skorolev Replaced MonitoringArea with snowAreaConfig.
*
* </pre>
*
@ -99,7 +96,7 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
private SnowMonitoringAreaConfigDlg areaDialog = null;
/** SNOW configuration manager **/
private FSSObsMonitorConfigurationManager snowConfig = null;
private FSSObsMonitorConfigurationManager snowAreaConfig = null;
/**
* This object contains all observation data necessary for the table dialogs
@ -130,8 +127,7 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
*/
private SnowMonitor() {
pluginPatterns.add(snowPattern);
snowConfig = FSSObsMonitorConfigurationManager.getSnowObsManager();
updateMonitoringArea();
snowAreaConfig = FSSObsMonitorConfigurationManager.getSnowObsManager();
initObserver(OBS, this);
obData = new ObMultiHrsReports(CommonConfig.AppName.SNOW);
obData.setThresholdMgr(SnowThresholdMgr.getInstance());
@ -146,7 +142,8 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
public static synchronized SnowMonitor getInstance() {
if (monitor == null) {
monitor = new SnowMonitor();
monitor.processProductAtStartup("snow");
List<String> zones = monitor.snowAreaConfig.getAreaList();
monitor.processProductAtStartup(zones);
monitor.fireMonitorEvent(monitor);
}
return monitor;
@ -239,7 +236,8 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
@Override
public void processProductMessage(final AlertMessage filtered) {
if (snowPattern.matcher(filtered.dataURI).matches()) {
processURI(filtered.dataURI, filtered);
List<String> zones = snowAreaConfig.getAreaList();
processURI(filtered.dataURI, filtered, zones);
}
}
@ -256,23 +254,6 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
}
}
/**
* Reads Table Configuration.
*
* Method that reads the table configuration and updates the zone monitor
* threshold map
*
*/
public void updateMonitoringArea() {
Map<String, List<String>> zones = new HashMap<String, List<String>>();
// create zones and station list
for (String zone : snowConfig.getAreaList()) {
List<String> stations = snowConfig.getAreaStations(zone);
zones.put(zone, stations);
}
MonitoringArea.setPlatformMap(zones);
}
/*
* (non-Javadoc)
*
@ -305,18 +286,10 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
*/
@Override
public void configUpdate(IMonitorConfigurationEvent me) {
snowConfig = (FSSObsMonitorConfigurationManager) me.getSource();
updateMonitoringArea();
snowAreaConfig = (FSSObsMonitorConfigurationManager) me.getSource();
if (zoneDialog != null && !zoneDialog.isDisposed()) {
VizApp.runAsync(new Runnable() {
@Override
public void run() {
zoneDialog.refreshZoneTableData(obData);
fireMonitorEvent(zoneDialog.getClass().getName());
}
});
zoneDialog.refreshZoneTableData(obData);
fireMonitorEvent(zoneDialog.getClass().getName());
}
}
@ -427,7 +400,7 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
}
/**
* Gets Zone Dialog.
* Gets SNOW Zone Dialog.
*
* @return zoneDialog
*/
@ -435,6 +408,15 @@ public class SnowMonitor extends ObsMonitor implements ISnowResourceListener {
return zoneDialog;
}
/**
* Gets SNOW Area configuration dialog
*
* @return
*/
public SnowMonitoringAreaConfigDlg getAreaDialog() {
return areaDialog;
}
/**
* Sets the zoneDialog
*

View file

@ -25,8 +25,7 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.viz.monitor.snow.ui.dialogs.SnowMonitoringAreaConfigDlg;
import com.raytheon.viz.ui.dialogs.ICloseCallback;
import com.raytheon.uf.viz.monitor.snow.SnowMonitor;
/**
* The Snow Area Action
@ -51,11 +50,6 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
public class SnowAreaConfigAction extends AbstractHandler {
/**
* SNOW Monitoring Area Configuration Dialog.
*/
private SnowMonitoringAreaConfigDlg configDlg;
/*
* (non-Javadoc)
*
@ -65,19 +59,12 @@ public class SnowAreaConfigAction extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
if (configDlg == null || configDlg.isDisposed()) {
SnowMonitor snow = SnowMonitor.getInstance();
if (snow.getAreaDialog() == null || snow.getAreaDialog().isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
configDlg = new SnowMonitoringAreaConfigDlg(shell,
"SNOW Monitor Area Configuration");
configDlg.setCloseCallback(new ICloseCallback() {
@Override
public void dialogClosed(Object returnValue) {
configDlg = null;
}
});
snow.launchDialog("area", shell);
}
configDlg.open();
return null;
}
}

View file

@ -22,11 +22,10 @@ package com.raytheon.uf.viz.monitor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import org.eclipse.swt.widgets.Display;
import com.raytheon.uf.common.dataplugin.PluginDataObject;
import com.raytheon.uf.common.dataplugin.annotations.DataURIUtil;
import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord;
@ -43,7 +42,6 @@ import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.localization.LocalizationManager;
import com.raytheon.uf.viz.core.notification.NotificationMessage;
import com.raytheon.uf.viz.datacube.DataCubeContainer;
import com.raytheon.uf.viz.monitor.data.MonitoringArea;
import com.raytheon.uf.viz.monitor.data.ObReport;
import com.raytheon.uf.viz.monitor.events.IMonitorConfigurationEvent;
import com.raytheon.uf.viz.monitor.events.IMonitorThresholdEvent;
@ -62,6 +60,7 @@ import com.raytheon.uf.viz.monitor.events.IMonitorThresholdEvent;
* Feb 04, 2014 2757 skorolev Added filter for removed stations
* May 08, 2014 3086 skorolev Added current site definition.
* Sep 04, 2014 3220 skorolev Removed cwa and monitorUsefrom vals.
* Jan 08, 2015 3220 skorolev Added zones parameter to processURI.
*
* </pre>
*
@ -187,45 +186,29 @@ public abstract class ObsMonitor extends Monitor {
*
* @param dataURI
* @param filtered
* @param zones
*/
public void processURI(String dataURI, AlertMessage filtered) {
public void processURI(String dataURI, AlertMessage filtered,
final List<String> zones) {
try {
Map<String, RequestConstraint> constraints = RequestConstraint
.toConstraintMapping(DataURIUtil.createDataURIMap(dataURI));
FSSObsRecord[] pdos = requestFSSObs(constraints, null);
if (pdos.length > 0 && pdos[0].getTimeObs() != null) {
final FSSObsRecord objectToSend = pdos[0];
try {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
try {
// Filter removed stations
ArrayList<String> zones = MonitoringArea
.getZoneIds(objectToSend
.getPlatformId());
if (!zones.isEmpty()) {
ObReport result = GenerateFSSObReport
.generateObReport(objectToSend);
statusHandler
.handle(Priority.INFO,
"New FSSrecord ===> "
+ objectToSend
.getDataURI());
process(result);
}
} catch (Exception e) {
statusHandler
.handle(Priority.PROBLEM,
"An error has occured processing the incoming messages.",
e);
}
}
});
} catch (Exception e) {
statusHandler
.handle(Priority.PROBLEM,
"An error has occured processing incoming dataURIs.",
e);
if (!zones.isEmpty()) {
ObReport result = GenerateFSSObReport
.generateObReport(objectToSend);
statusHandler.handle(Priority.INFO, "New FSSrecord ===> "
+ objectToSend.getDataURI());
try {
process(result);
} catch (Exception e) {
statusHandler
.handle(Priority.PROBLEM,
"An error has occured processing the incoming messages.",
e);
}
}
}
} catch (final Exception e) {
@ -237,10 +220,10 @@ public abstract class ObsMonitor extends Monitor {
/**
* Process products at startup
*
* @param monitorName
* @param zones
*
*/
public void processProductAtStartup(String monitorName) {
public void processProductAtStartup(List<String> zones) {
/**
* Assume this number for MaxNumObsTimes is larger enough to cover data
@ -275,8 +258,6 @@ public abstract class ObsMonitor extends Monitor {
FSSObsRecord[] obsRecords = requestFSSObs(vals, selectedTimes);
for (FSSObsRecord objectToSend : obsRecords) {
// Filter removed stations
ArrayList<String> zones = MonitoringArea
.getZoneIds(objectToSend.getPlatformId());
if (!zones.isEmpty()) {
ObReport result = GenerateFSSObReport
.generateObReport(objectToSend);
@ -286,7 +267,7 @@ public abstract class ObsMonitor extends Monitor {
}
} catch (DataCubeException e) {
statusHandler.handle(Priority.PROBLEM,
"No data in database at startup. " + monitorName);
"No data in database at startup.");
}
}

View file

@ -20,8 +20,10 @@
package com.raytheon.uf.viz.monitor.data;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
import com.raytheon.uf.common.monitor.data.ObConst;
import com.raytheon.uf.common.monitor.data.ObConst.ChosenAppKey;
import com.raytheon.uf.common.monitor.data.ObConst.ThreatLevel;
@ -40,6 +42,7 @@ import com.raytheon.uf.common.monitor.data.ObConst.VarName;
* Feb 17, 2009 1999 grichard Initial creation.
* 3/16/2009 2047 grichard Add threat monitoring routines.
* Dec 24, 2009 3424 zhao added getDualValuedThresholdMap and getSingleValuedThresholdMap
* Jan 12, 2015 3220 skorolev Replaced MonitoringArea with areaConfig.
*
* </pre>
*
@ -62,56 +65,6 @@ public final class MonitorAreaThresholds {
// Map containing the display thresholds
private static Map<String, DisplayThresholdsSet> zoneDisplayThresholds = new HashMap<String, DisplayThresholdsSet>();
/**
* This method receives an observation report and a variable name, and
* returns the threat level of that single variable.
*
* @param report
* -- the observation report
* @param varName
* -- the variable name within the report
* @return -- the threat level
*/
public static ObConst.ThreatLevel getThreatLevel(ObReport report,
VarName varName) {
ThreatLevel threatLevel = ThreatLevel.GRAY;
ThreatLevel temp = ThreatLevel.GRAY;
float varValue = ObConst.MISSING;
try {
varValue = getReportVarValue(report, varName);
String zoneId = report.getZoneId();
// TEMPORARILY USE DEFAULT ZONE ID, NAMELY, DEFAULT STATION.
zoneId = ObConst.DEFAULT_STATION_NAME;
if (report.isStationary()) {
if (MonitoringArea.listZonesToPlatform(report.getPlatformId())
.isEmpty()) {
// use the default zone if there are no zones
temp = getZoneThreatLevel(zoneId, varName, varValue);
if (temp.ordinal() < threatLevel.ordinal()) {
threatLevel = temp;
}
} else {
for (String z : MonitoringArea.listZonesToPlatform(report
.getPlatformId())) {
temp = getZoneThreatLevel(z, varName, varValue);
if (temp.ordinal() < threatLevel.ordinal()) {
threatLevel = temp;
}
}
}
} else {
temp = getZoneThreatLevel(zoneId, varName, varValue);
}
} catch (Exception e) {
// return the default threat level
}
return threatLevel;
}
/**
* This method receives an observation report and a variable name, and
* returns the threat level of that single variable.
@ -127,12 +80,13 @@ public final class MonitorAreaThresholds {
ThreatLevel threatLevel = ThreatLevel.GRAY;
ThreatLevel temp = ThreatLevel.GRAY;
String station = report.getPlatformId();
try {
if (report.isStationary()) {
if (chosenAppKey == ChosenAppKey.SAFESEAS) {
if (MonitoringArea.listZonesToPlatform(
report.getPlatformId()).isEmpty()) {
List<String> ssZones = FSSObsMonitorConfigurationManager
.getSsObsManager().getAreaByStationId(station);
if (ssZones.isEmpty()) {
// use the default zone if there are no zones
for (VarName v : VarName.values()) {
if (v == VarName.TEMPERATURE
@ -150,8 +104,7 @@ public final class MonitorAreaThresholds {
}
}
} else {
for (String z : MonitoringArea
.listZonesToPlatform(report.getPlatformId())) {
for (String z : ssZones) {
for (VarName v : VarName.values()) {
if (v == VarName.TEMPERATURE
|| v == VarName.WIND_CHILL
@ -169,8 +122,9 @@ public final class MonitorAreaThresholds {
}
}
} else if (chosenAppKey == ChosenAppKey.SNOW) {
if (MonitoringArea.listZonesToPlatform(
report.getPlatformId()).isEmpty()) {
List<String> snowZones = FSSObsMonitorConfigurationManager
.getSnowObsManager().getAreaByStationId(station);
if (snowZones.isEmpty()) {
// use the default zone if there are no zones
for (VarName v : VarName.values()) {
if (v == VarName.PRIM_SWELL_HT) {
@ -185,8 +139,7 @@ public final class MonitorAreaThresholds {
}
} else {
for (String z : MonitoringArea
.listZonesToPlatform(report.getPlatformId())) {
for (String z : snowZones) {
for (VarName v : VarName.values()) {
if (v == VarName.PRIM_SWELL_HT) {
break;
@ -199,9 +152,10 @@ public final class MonitorAreaThresholds {
}
}
}
} else {
if (MonitoringArea.listZonesToPlatform(
report.getPlatformId()).isEmpty()) {
} else {// chosenAppKey = FOG
List<String> fogZones = FSSObsMonitorConfigurationManager
.getFogObsManager().getAreaByStationId(station);
if (fogZones.isEmpty()) {
// use the default zone if there are no zones
temp = getZoneThreatLevel(ObConst.DEFAULT_STATION_NAME,
VarName.PRES_WX, report.getPresentWx());
@ -209,20 +163,21 @@ public final class MonitorAreaThresholds {
threatLevel = temp;
}
temp = getZoneThreatLevel(ObConst.DEFAULT_STATION_NAME,
VarName.VISIBILITY, getReportVarValue(report,
VarName.VISIBILITY));
VarName.VISIBILITY,
getReportVarValue(report, VarName.VISIBILITY));
if (temp.ordinal() < threatLevel.ordinal()) {
threatLevel = temp;
}
} else {
for (String z : MonitoringArea
.listZonesToPlatform(report.getPlatformId())) {
for (String z : fogZones) {
temp = getZoneThreatLevel(z, VarName.PRES_WX,
report.getPresentWx());
if (temp.ordinal() < threatLevel.ordinal()) {
threatLevel = temp;
}
temp = getZoneThreatLevel(z, VarName.VISIBILITY,
temp = getZoneThreatLevel(
z,
VarName.VISIBILITY,
getReportVarValue(report,
VarName.VISIBILITY));
if (temp.ordinal() < threatLevel.ordinal()) {
@ -231,6 +186,7 @@ public final class MonitorAreaThresholds {
}
}
}
// report is not Stationary
} else {
if (chosenAppKey == ChosenAppKey.SAFESEAS) {
String zoneId = report.getZoneId();
@ -243,8 +199,8 @@ public final class MonitorAreaThresholds {
} else if (v == VarName.STATIONARY) {
break;
}
temp = getZoneThreatLevel(zoneId, v, getReportVarValue(
report, v));
temp = getZoneThreatLevel(zoneId, v,
getReportVarValue(report, v));
if (temp.ordinal() < threatLevel.ordinal()) {
threatLevel = temp;
}
@ -257,13 +213,13 @@ public final class MonitorAreaThresholds {
if (v == VarName.PRIM_SWELL_HT) {
break;
}
temp = getZoneThreatLevel(zoneId, v, getReportVarValue(
report, v));
temp = getZoneThreatLevel(zoneId, v,
getReportVarValue(report, v));
if (temp.ordinal() < threatLevel.ordinal()) {
threatLevel = temp;
}
}
} else {
} else {// chosenAppKey = FOG
String zoneId = report.getZoneId();
// TEMPORARILY USE DEFAULT ZONE ID, NAMELY, DEFAULT STATION.
zoneId = ObConst.DEFAULT_STATION_NAME;
@ -605,32 +561,44 @@ public final class MonitorAreaThresholds {
}
return result;
}
/**
* [Dec 24, 2009, zhao]
* @param zone the zone ID
* @param varName enumerated-type variable name
* @return single-valued threshold map, or null if the variable
* name is invalid or if the map contains no mapping for the key
*
* @param zone
* the zone ID
* @param varName
* enumerated-type variable name
* @return single-valued threshold map, or null if the variable name is
* invalid or if the map contains no mapping for the key
*/
public static Map<ObConst.ThreatLevel,Float> getSingleValuedThresholdMap(String zone, ObConst.VarName varName) {
if (varName == VarName.WIND_DIR || varName == VarName.PRIM_SWELL_DIR || varName == VarName.SEC_SWELL_DIR ) {
return null;
}
return zoneMonitorThresholds.get(zone).getSingleValuedThresholdMap(varName);
public static Map<ObConst.ThreatLevel, Float> getSingleValuedThresholdMap(
String zone, ObConst.VarName varName) {
if (varName == VarName.WIND_DIR || varName == VarName.PRIM_SWELL_DIR
|| varName == VarName.SEC_SWELL_DIR) {
return null;
}
return zoneMonitorThresholds.get(zone).getSingleValuedThresholdMap(
varName);
}
/**
* [Dec 24, 2009, zhao]
* @param zone the zone ID
* @param varName enumerated-type variable name
* @return duel-valued threshold map, or null if the variable
* name is invalid or if the map contains no mapping for the key
*
* @param zone
* the zone ID
* @param varName
* enumerated-type variable name
* @return duel-valued threshold map, or null if the variable name is
* invalid or if the map contains no mapping for the key
*/
public static Map<ObConst.ThreatLevel,Float[]> getDualValuedThresholdMap(String zone, ObConst.VarName varName) {
if (varName != VarName.WIND_DIR || varName != VarName.PRIM_SWELL_DIR || varName != VarName.SEC_SWELL_DIR ) {
return null;
}
return zoneMonitorThresholds.get(zone).getDualValuedThresholdMap(varName);
public static Map<ObConst.ThreatLevel, Float[]> getDualValuedThresholdMap(
String zone, ObConst.VarName varName) {
if (varName != VarName.WIND_DIR || varName != VarName.PRIM_SWELL_DIR
|| varName != VarName.SEC_SWELL_DIR) {
return null;
}
return zoneMonitorThresholds.get(zone).getDualValuedThresholdMap(
varName);
}
}

View file

@ -23,7 +23,6 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.raytheon.uf.common.monitor.data.CommonConfig;
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
@ -40,13 +39,14 @@ import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec. 1, 2009 3424 zhao Initial creation.
* Oct.29, 2012 1297 skorolev Changed HashMap to Map
* Oct.31 2012 1297 skorolev Cleaned code.
* Sep 04 2014 3220 skorolev Added updateZones method.
* Dec 18 2014 3841 skorolev Corrected updateZones method.
* Oct.31, 2012 1297 skorolev Cleaned code.
* Sep 04, 2014 3220 skorolev Added updateZones method.
* Dec 18, 2014 3841 skorolev Corrected updateZones method.
* Jan 08, 2015 3220 skorolev Replaced MonitoringArea with areaConfig.
*
* </pre>
*
@ -73,6 +73,9 @@ public class ObHourReports {
*/
private Map<String, ObZoneHourReports> hourReports;
/**
* current threshold manager
*/
private AbstractThresholdMgr thresholdMgr;
/**
@ -86,9 +89,8 @@ public class ObHourReports {
this.appName = appName;
this.thresholdMgr = thresholdMgr;
hourReports = new HashMap<String, ObZoneHourReports>();
Map<String, List<String>> zoneStationMap = MonitoringArea
.getPlatformMap();
for (String zone : zoneStationMap.keySet()) {
List<String> zones = thresholdMgr.getAreaConfigMgr().getAreaList();
for (String zone : zones) {
hourReports.put(zone, new ObZoneHourReports(nominalTime, zone,
appName, thresholdMgr));
}
@ -101,7 +103,8 @@ public class ObHourReports {
*/
public void addReport(ObReport report) {
String station = report.getPlatformId();
List<String> zones = MonitoringArea.getZoneIds(station);
List<String> zones = thresholdMgr.getAreaConfigMgr()
.getAreaByStationId(station);
if (zones.size() == 0) {
statusHandler
.error("Error: station: "
@ -123,6 +126,8 @@ public class ObHourReports {
}
/**
* Gets HourReports
*
* @return hourReports
*/
public Map<String, ObZoneHourReports> getHourReports() {
@ -186,8 +191,8 @@ public class ObHourReports {
}
/**
* Returns the ObZoneHourReports object of a caller-specified zone. If such
* object not available, returns null.
* Gets ObZoneHourReports Returns the ObZoneHourReports object of a
* caller-specified zone. If such object not available, returns null.
*
* @param zone
* @return hour reports
@ -200,6 +205,8 @@ public class ObHourReports {
}
/**
* Gets NominalTime
*
* @return nominalTime
*/
public Date getNominalTime() {
@ -207,6 +214,8 @@ public class ObHourReports {
}
/**
* Gets AppName
*
* @return appName
*/
public CommonConfig.AppName getAppName() {
@ -217,10 +226,10 @@ public class ObHourReports {
* Updates zones in the Hour Reports
*/
public void updateZones() {
Map<String, List<String>> zoneStationMap = MonitoringArea
.getPlatformMap();
// Updated list of zones
Set<String> updtZones = zoneStationMap.keySet();
List<String> updtZones = thresholdMgr.getAreaConfigMgr().getAreaList();
// remove zones
hourReports.keySet().retainAll(updtZones);
// add zones
for (String zone : updtZones) {
if (!hourReports.keySet().contains(zone)) {
@ -228,12 +237,14 @@ public class ObHourReports {
appName, thresholdMgr));
}
}
// remove zones
hourReports.keySet().retainAll(updtZones);
// add and(or) remove stations
for (String zone : updtZones) {
// Updated list of stations in this zone
List<String> updtStns = zoneStationMap.get(zone);
List<String> updtStns = thresholdMgr.getAreaConfigMgr()
.getAreaStations(zone);
// remove stations
hourReports.get(zone).getZoneHourReports().keySet()
.retainAll(updtStns);
// add stations
for (String stn : updtStns) {
if (!hourReports.get(zone).getZoneHourReports()
@ -246,9 +257,8 @@ public class ObHourReports {
stn, appName, thresholdMgr));
}
}
// remove stations
hourReports.get(zone).getZoneHourReports().keySet()
.retainAll(updtStns);
// update hourReports for current zone
hourReports.get(zone).getZoneHourReports();
}
}
}

View file

@ -24,11 +24,13 @@ import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;
import com.raytheon.uf.common.monitor.config.FSSObsMonitorConfigurationManager;
import com.raytheon.uf.common.monitor.data.CommonConfig;
import com.raytheon.uf.common.monitor.data.CommonConfig.AppName;
import com.raytheon.uf.common.monitor.data.ObConst;
@ -53,7 +55,8 @@ import com.raytheon.uf.viz.monitor.thresholds.AbstractThresholdMgr;
* Oct.31, 2012 1297 skorolev Clean code.
* Jan. 29, 2013 15654 zhao add Wind Chill calculation for SNOW
* Sep 04, 2014 3220 skorolev Updated getStationTableData method.
*
* Jan 08, 2015 3220 skorolev Replaced MonitoringArea with cfgMgr.
*
* </pre>
*
* @author zhao
@ -151,13 +154,15 @@ public class ObMultiHrsReports {
/**
* DR15654: set Wind Chill for SNOW
*/
if ( appName == AppName.SNOW ) {
if ( report.getTemperature() != ObConst.MISSING && report.getWindSpeed() != ObConst.MISSING ) {
report.setWindChill(calcWindChill( report.getTemperature(), report.getWindSpeed() ));
if (appName == AppName.SNOW) {
if (report.getTemperature() != ObConst.MISSING
&& report.getWindSpeed() != ObConst.MISSING) {
report.setWindChill(calcWindChill(report.getTemperature(),
report.getWindSpeed()));
}
}
if (multiHrsReports.containsKey(nominalTime)) {
multiHrsReports.get(nominalTime).addReport(report);
} else {
@ -173,28 +178,28 @@ public class ObMultiHrsReports {
}
}
/**
* DR 15654:
* Wind Chill calculation formula based on
* http://www.nws.noaa.gov/om/windchill/
* as of Jan. 29, 2013
*
* @param temperature in degree F
* @param windSpeed in knots
* @return wind chill in degree F
*/
private float calcWindChill(float temp, float windSpd) {
if ( temp > 50.0 || windSpd < 3.0 ) {
return ObConst.MISSING;
}
/**
* 1 knots = 1.15078 mph
*/
float spd = (float) Math.pow(1.15078*windSpd, 0.16);
return 35.74f + 0.6215f*temp - 35.75f*spd + 0.4275f*temp*spd;
}
/**
* DR 15654: Wind Chill calculation formula based on
* http://www.nws.noaa.gov/om/windchill/ as of Jan. 29, 2013
*
* @param temp
* in degree F
* @param windSpd
* in knots
* @return wind chill in degree F
*/
private float calcWindChill(float temp, float windSpd) {
if (temp > 50.0 || windSpd < 3.0) {
return ObConst.MISSING;
}
/**
* 1 knots = 1.15078 mph
*/
float spd = (float) Math.pow(1.15078 * windSpd, 0.16);
return 35.74f + 0.6215f * temp - 35.75f * spd + 0.4275f * temp * spd;
}
/**
/**
* Returns a zone TableData object of the latest nominal time. If no data
* available (the map is empty), returns an empty zone TableData object
* (table cells filled with "N/A").
@ -252,6 +257,9 @@ public class ObMultiHrsReports {
/**
* Returns the station TableData object for the latest nominal time. If no
* data available, an empty/default station TableData object is returned
*
* @param zone
* @return
*/
public TableData getStationTableData(String zone) {
if (multiHrsReports.isEmpty()) {
@ -264,9 +272,13 @@ public class ObMultiHrsReports {
* Returns a station TableData object for a caller-specified nominal-time
* and zone ID. If no data available, an empty/default station TableData
* object is returned.
*
* @param nominalTime
* @param zone
* @return
*/
public TableData getStationTableData(Date nominalTime, String zone) {
if(zone.equals("")){
if (zone.equals("")) {
return this.getEmptyZoneTableData();
}
if (nominalTime == null) {
@ -296,6 +308,7 @@ public class ObMultiHrsReports {
* @param zone
* @param Station
* @param varName
* @param productName
* @return ObTrendDataSet object, or null if no data available
*/
public ObTrendDataSet getTrendDataSet(String zone, String station,
@ -373,12 +386,15 @@ public class ObMultiHrsReports {
}
/**
* Gets Histogram Table Data
*
* @param zone
* : current zone
* @param station
* station ID
* : station ID
* @param obsType
* ObsHistType
* @return TableData object for obs history table
* : ObsHistType
* @return
*/
public TableData getHistTableData(String zone, String station,
ObsHistType obsType) {
@ -467,17 +483,17 @@ public class ObMultiHrsReports {
}
/**
* Returns a SortedMap object <nominal time, ObHourReports object>
* Gets MultiHrsReports
*
* @return multiHrsReports
* @return SortedMap object <nominal time, ObHourReports object>
*/
public SortedMap<Date, ObHourReports> getMultiHrsReports() {
return multiHrsReports;
}
/**
* Returns a SortedMap object (key is nominal time, value is zone TableData
* object)
* Gets MultiHrsTableData Returns a SortedMap object (key is nominal time,
* value is zone TableData object)
*
* @return
*/
@ -500,8 +516,8 @@ public class ObMultiHrsReports {
}
/**
* Returns the latest nominal time if the map is not empty; otherwise,
* returns the nominal time of the present date-time
* Gets the Latest NominalTime Returns the latest nominal time if the map is
* not empty; otherwise, returns the nominal time of the present date-time
*
* @return
*/
@ -517,17 +533,17 @@ public class ObMultiHrsReports {
}
/**
* Returns a set of nominal times
* Gets Nominal Times
*
* @return
* @return a set of nominal times
*/
public Set<Date> getNominalTimes() {
return multiHrsReports.keySet();
}
/**
* Returns the ObHourReports object of the latest nominal time. If no data
* available, returns an empty ObHourReports object.
* Gets ObHourReports Returns the ObHourReports object of the latest nominal
* time. If no data available, returns an empty ObHourReports object.
*
* @return
*/
@ -540,8 +556,9 @@ public class ObMultiHrsReports {
}
/**
* Returns an ObHourReports object of a caller-specified nominal time. If no
* data available, returns an empty ObHourReports object.
* Gets ObHourReports Returns an ObHourReports object of a caller-specified
* nominal time. If no data available, returns an empty ObHourReports
* object.
*
* @param nominalTime
* @return
@ -574,6 +591,7 @@ public class ObMultiHrsReports {
}
/**
* Gets Threshold Manager
*
* @return the threshold manager
*/
@ -591,6 +609,7 @@ public class ObMultiHrsReports {
}
/**
* Gets map of types for ALG cell
*
* @return fogAlgCellType
*/
@ -603,7 +622,13 @@ public class ObMultiHrsReports {
*/
private void initFogAlgCellType() {
fogAlgCellType = new HashMap<String, CellType>();
Set<String> zones = MonitoringArea.getPlatformMap().keySet();
FSSObsMonitorConfigurationManager cfgMgr = null;
if (appName.equals(CommonConfig.AppName.FOG)) {
cfgMgr = FSSObsMonitorConfigurationManager.getFogObsManager();
} else if (appName.equals(CommonConfig.AppName.SAFESEAS)) {
cfgMgr = FSSObsMonitorConfigurationManager.getSsObsManager();
}
List<String> zones = cfgMgr.getAreaList();
Iterator<String> itr = zones.iterator();
while (itr.hasNext()) {
fogAlgCellType.put(itr.next(), CellType.NotAvailable);

File diff suppressed because it is too large Load diff

View file

@ -53,6 +53,7 @@ import com.raytheon.uf.viz.monitor.util.MonitorConfigConstants;
* Feb 28, 2013 14410 zhao Modified getCellTypeForBlizWarn
* May 23, 2014 3086 skorolev Corrected ObsHistType. Cleaned code.
* Nov 21, 2014 3841 skorolev Added coordinates in the hover text for a newly added zones.
* Jan 08, 2015 3220 skorolev Corrected code for Fog and SNOW table data.
*
* </pre>
*
@ -113,10 +114,10 @@ public final class TableUtil {
isZone = true;
}
String hoverText = null;
String hoverText = "";
if (isZone) {
AreaIdXML zoneXML = FSSObsMonitorConfigurationManager
.getSsObsManager().getAreaXml(zone);
.getFogObsManager().getAreaXml(zone);
if (zoneXML != null) {
hoverText = getZoneHoverText(zoneXML);
}
@ -344,7 +345,7 @@ public final class TableUtil {
isZone = true;
}
String hoverText = null;
String hoverText = "";
if (isZone) {
AreaIdXML zoneXML = FSSObsMonitorConfigurationManager
.getSsObsManager().getAreaXml(zone);
@ -649,10 +650,10 @@ public final class TableUtil {
isZone = true;
}
String hoverText = null;
String hoverText = "";
if (isZone) {
AreaIdXML zoneXML = FSSObsMonitorConfigurationManager
.getSsObsManager().getAreaXml(zone);
.getSnowObsManager().getAreaXml(zone);
if (zoneXML != null) {
hoverText = getZoneHoverText(zoneXML);
}

View file

@ -57,6 +57,7 @@ import com.raytheon.uf.viz.monitor.xml.ThresholdsXML;
* Feb 16, 2011 #7346 zhao added getDirectionalThresholdValueCellType(...)
* Apr 28, 2014 3086 skorolev Updated getAreaConfigMgr method.
* Oct 17, 2014 3220 skorolev Replaced System.out.print with debug statusHandler.
* Jan 08, 2015 3220 skorolev Added getAreaConfigMgr.
*
* </pre>
*
@ -71,7 +72,7 @@ public abstract class AbstractThresholdMgr {
/**
* Monitor Area Configuration Manager.
*/
protected FSSObsMonitorConfigurationManager areaConfigMgr;
public FSSObsMonitorConfigurationManager areaConfigMgr;
/**
* Default file name for the FOG display thresholds.
@ -808,4 +809,13 @@ public abstract class AbstractThresholdMgr {
}
}
}
/**
* Gets current Area configuration manager.
*
* @return
*/
public FSSObsMonitorConfigurationManager getAreaConfigMgr() {
return areaConfigMgr;
}
}

View file

@ -1301,6 +1301,9 @@ public abstract class MonitoringAreaConfigDlg extends CaveSWTDialog implements
* Handles the monitor area list selection.
*/
private void handleMonitorAreaListSelection() {
if (monitorAreaList.getSelectionIndex() == -1) {
return;
}
if (mode == Mode.Zone) {
String zone = monitorAreaList.getItem(monitorAreaList
.getSelectionIndex());

View file

@ -14,8 +14,8 @@ STATION_COLUMN='stationid'
LAT_COLUMN='latitude'
LON_COLUMN='longitude'
CONSTRAINT_NAME='latitude_longitude_officeId_refTime_forecastTime_eventType'
CONSTRAINT_COLUMNS='latitude, longitude, officeId, refTime, forecastTime, eventType'
CONSTRAINT_NAME='latitude_longitude_stationId_refTime_forecastTime_eventType'
CONSTRAINT_COLUMNS='latitude, longitude, stationId, refTime, forecastTime, eventType'
PSQL="/awips2/psql/bin/psql"

View file

@ -72,6 +72,7 @@ import com.vividsolutions.jts.geom.Geometry;
* Jan 15, 2014 2581 njensen Changed constraint to use officeId instead of stationId
* Jan 30, 2014 2581 njensen Added dataURI column back in
* Sep 16, 2014 2707 bclement removed dataURI column, event type now string, added event units
* Jan 06, 2014 2707 bclement changed unique constraint from officeId to stationId
*
* </pre>
*
@ -81,7 +82,7 @@ import com.vividsolutions.jts.geom.Geometry;
@Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "lsrseq")
@Table(name = "lsr", uniqueConstraints = { @UniqueConstraint(columnNames = {
"latitude", "longitude", "officeId", "refTime", "forecastTime",
"latitude", "longitude", "stationId", "refTime", "forecastTime",
"eventType" }) })
/*
* Both refTime and forecastTime are included in the refTimeIndex since

View file

@ -528,11 +528,11 @@ public class FSSObsMonitorConfigurationManager implements
}
/**
* Gets an area of a station.
* Gets the zones where station is monitoring
*
* @param stationId
* The station to get the area
* @return List of areas
* The station to get the zones
* @return List of zones
*/
public List<String> getAreaByStationId(String stationId) {
List<String> results = new ArrayList<String>();

View file

@ -132,7 +132,6 @@ public class FogConfig {
// our new coverage boundaries including adjacent areas
Geometry monitorAreaGeo = AdjacentWfoMgr.getAdjacentAreas(getCwa());
// (SK) Geometry monitorAreaGeo =
// FogDbUtils.getMonitoringAreaGeometry(filter.getCwaGeometry(),getCwa());
setCenter(monitorAreaGeo.getCentroid().getCoordinate());
Coordinate[] coords = monitorAreaGeo.getEnvelope().getCoordinates();
this.upperLeftCorner = coords[1];

View file

@ -42,6 +42,10 @@ import com.raytheon.uf.common.registry.constants.RegistryObjectTypes;
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
import com.raytheon.uf.common.registry.services.RegistryServiceException;
import com.raytheon.uf.common.security.encryption.AESEncryptor;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.util.ClusterIdUtil;
import com.raytheon.uf.edex.registry.ebxml.RegistryUsers;
import com.raytheon.uf.edex.registry.ebxml.dao.PersonDao;
import com.raytheon.uf.edex.registry.ebxml.services.RegistryRESTServices;
@ -61,6 +65,7 @@ import com.raytheon.uf.edex.security.SecurityConfiguration;
* ------------ ---------- ----------- --------------------------
* 7/10/2014 1717 bphillip Initial creation
* 7/24/2014 1712 bphillip No longer singleton
* 1/06/2015 3918 dhladky Fixed issue where clients can't start without central registry.
* </pre>
*
* @author bphillip
@ -87,10 +92,26 @@ public class CredentialCache {
public static final boolean centralRegistry = System.getProperty(
"edex.run.mode").equals("centralRegistry");
/** States whether this node will join the federation */
public static final boolean isFederationEnabled = Boolean
.getBoolean("ebxml.registry.federation.enabled");
/** Address of the central registry */
private static final String CENTRAL_REGISTRY_ADDRESS = "https://"
+ (System.getProperty("ncf.host")) + ":"
+ (System.getProperty("ebxml.registry.webserver.port"));
private static final IUFStatusHandler statusHandler = UFStatus
.getHandler(CredentialCache.class);
/** used in non federated standalone environment */
private static final String DEFAULT_USER = "DEFAULT_USER_"+ClusterIdUtil.getId();
/** used in non federated standalone environment */
private static final String DEFAULT_PASSWORD = "DEFAULT_PASSWORD_"+ClusterIdUtil.getId();
/** used in non federated standalone environment */
private static final String DEFAULT_ROLE = "DEFAULT_ROLE_"+ClusterIdUtil.getId();
/** Cache holding users' credentials */
private LoadingCache<String, String[]> credentialCache = CacheBuilder
@ -115,12 +136,16 @@ public class CredentialCache {
user = personDao.getById(userName
+ RegistryUsers.USER_SUFFIX);
}
/*
* If we are not the central registry, query
* the central registry to get the user's
* information
*/
else {
// This is a case required if you are
// connected to a central registry.
if (isFederationEnabled) {
/*
* If we are not the central registry,
* query the central registry to get the
* user's information
*/
try {
user = restServices
.getRegistryObject(
@ -132,36 +157,58 @@ public class CredentialCache {
"Error contacting central registry!",
e);
}
/*
* User not found means unauthorized
*/
if (user == null) {
throw new WebServiceException(
"User ["
+ userName
+ " Not authorized!");
} else {
/*
* Put the user name, password, and
* role in the return array. Decrypt
* the password.
*/
String userName = user
.getSlotValue(RegistryUsers.USER_SLOT_NAME);
String password = null;
try {
password = encryption.decrypt(
securityConfig
.getEncryptionKey(),
(String) user
.getSlotValue(RegistryUsers.PASSWORD_SLOT_NAME));
} catch (Exception e) {
throw new RegistryServiceException(
"Error decrypting password!",
e);
}
String role = user
.getSlotValue(RegistryUsers.ROLE_SLOT_NAME);
return new String[] { userName,
password, role };
}
}
/*
* User not found means unauthorized
* This is a case where you are not
* connected to a central registry
* (Standalone server and edge condition),
* use defaults.
*/
if (user == null) {
throw new WebServiceException("User ["
+ userName + " Not authorized!");
else {
statusHandler
.handle(Priority.INFO,
"Federation not enabled! Proceeding with default user, pass, and role!");
return new String[] { DEFAULT_USER,
DEFAULT_PASSWORD, DEFAULT_ROLE };
}
/*
* Put the user name, password, and role in
* the return array. Decrypt the password.
*/
String userName = user
.getSlotValue(RegistryUsers.USER_SLOT_NAME);
String password = null;
try {
password = encryption.decrypt(
securityConfig
.getEncryptionKey(),
(String) user
.getSlotValue(RegistryUsers.PASSWORD_SLOT_NAME));
} catch (Exception e) {
throw new RegistryServiceException(
"Error decrypting password!", e);
}
String role = user
.getSlotValue(RegistryUsers.ROLE_SLOT_NAME);
return new String[] { userName, password,
role };
}
});
}
});

View file

@ -1,192 +0,0 @@
diff -crB a/qpid/java/broker/bin/qpid-passwd b/qpid/java/broker/bin/qpid-passwd
*** a/qpid/java/broker/bin/qpid-passwd 2012-02-15 09:29:22.000000000 -0600
--- b/qpid/java/broker/bin/qpid-passwd 2013-07-30 16:23:13.000000000 -0500
***************
*** 24,30 ****
fi
# Set classpath to include Qpid jar with all required jars in manifest
! QPID_LIBS=$QPID_HOME/lib/qpid-all.jar
# Set other variables used by the qpid-run script before calling
export JAVA=java \
--- 24,30 ----
fi
# Set classpath to include Qpid jar with all required jars in manifest
! QPID_LIBS="$QPID_HOME/lib/qpid-all.jar:$QPID_HOME/lib/opt/*:$QPID_HOME/lib/opt/qpid-deps/*"
# Set other variables used by the qpid-run script before calling
export JAVA=java \
diff -crB a/qpid/java/broker/bin/qpid-server b/qpid/java/broker/bin/qpid-server
*** a/qpid/java/broker/bin/qpid-server 2011-09-30 08:38:14.000000000 -0500
--- b/qpid/java/broker/bin/qpid-server 2013-07-30 16:23:13.000000000 -0500
***************
*** 23,30 ****
fi
if [ -z "$QPID_WORK" ]; then
! echo "Setting QPID_WORK to $HOME as default"
! QPID_WORK=$HOME
fi
# Set to help us get round the manifold problems of ps/pgrep on various
--- 23,29 ----
fi
if [ -z "$QPID_WORK" ]; then
! export QPID_WORK=$QPID_HOME
fi
# Set to help us get round the manifold problems of ps/pgrep on various
***************
*** 34,43 ****
fi
# Set classpath to include the qpid-all manifest jar, and any jars supplied in lib/opt
! QPID_LIBS="$QPID_HOME/lib/qpid-all.jar:$QPID_HOME/lib/opt/*"
# Set other variables used by the qpid-run script before calling
! export JAVA=java \
JAVA_VM=-server \
JAVA_MEM=-Xmx1024m \
JAVA_GC="-XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError" \
--- 33,42 ----
fi
# Set classpath to include the qpid-all manifest jar, and any jars supplied in lib/opt
! QPID_LIBS="$QPID_HOME/lib/qpid-all.jar:$QPID_HOME/lib/opt/*:$QPID_HOME/lib/opt/qpid-deps/*"
# Set other variables used by the qpid-run script before calling
! export JAVA=/awips2/java/bin/java \
JAVA_VM=-server \
JAVA_MEM=-Xmx1024m \
JAVA_GC="-XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError" \
Only in b/qpid/java/broker/bin: qpid-server.orig
diff -crB a/qpid/java/build.deps b/qpid/java/build.deps
*** a/qpid/java/build.deps 2012-07-08 10:28:32.000000000 -0500
--- b/qpid/java/build.deps 2013-07-30 16:23:13.000000000 -0500
***************
*** 17,29 ****
# under the License.
#
! commons-beanutils-core=lib/required/commons-beanutils-core-1.8.3.jar
commons-cli=lib/required/commons-cli-1.2.jar
! commons-codec=lib/required/commons-codec-1.6.jar
commons-collections=lib/required/commons-collections-3.2.1.jar
commons-configuration=lib/required/commons-configuration-1.8.jar
commons-digester=lib/required/commons-digester-1.8.1.jar
! commons-lang=lib/required/commons-lang-2.6.jar
commons-logging=lib/required/commons-logging-1.1.1.jar
derby-db=lib/required/derby-10.8.2.2.jar
--- 17,29 ----
# under the License.
#
! commons-beanutils-core=lib/required/commons-beanutils-1.8.3.jar
commons-cli=lib/required/commons-cli-1.2.jar
! commons-codec=lib/required/commons-codec-1.4.jar
commons-collections=lib/required/commons-collections-3.2.1.jar
commons-configuration=lib/required/commons-configuration-1.8.jar
commons-digester=lib/required/commons-digester-1.8.1.jar
! commons-lang=lib/required/commons-lang-2.3.jar
commons-logging=lib/required/commons-logging-1.1.1.jar
derby-db=lib/required/derby-10.8.2.2.jar
***************
*** 33,39 ****
geronimo-jta=lib/required/geronimo-jta_1.1_spec-1.1.1.jar
geronimo-kernel=lib/required/geronimo-kernel-2.2.1.jar
geronimo-openejb=lib/required/geronimo-ejb_3.0_spec-1.0.1.jar
! geronimo-servlet=lib/required/geronimo-servlet_2.5_spec-1.2.jar
junit=lib/required/junit-3.8.1.jar
mockito-all=lib/required/mockito-all-1.9.0.jar
--- 33,39 ----
geronimo-jta=lib/required/geronimo-jta_1.1_spec-1.1.1.jar
geronimo-kernel=lib/required/geronimo-kernel-2.2.1.jar
geronimo-openejb=lib/required/geronimo-ejb_3.0_spec-1.0.1.jar
! geronimo-servlet=lib/required/geronimo-servlet_2.5_spec-1.1.2.jar
junit=lib/required/junit-3.8.1.jar
mockito-all=lib/required/mockito-all-1.9.0.jar
***************
*** 45,51 ****
slf4j-api=lib/required/slf4j-api-1.6.4.jar
slf4j-log4j=lib/required/slf4j-log4j12-1.6.4.jar
! xalan=lib/required/xalan-2.7.0.jar
jetty=lib/required/jetty-server-7.6.3.v20120416.jar
jetty-continuation=lib/required/jetty-continuation-7.6.3.v20120416.jar
--- 45,51 ----
slf4j-api=lib/required/slf4j-api-1.6.4.jar
slf4j-log4j=lib/required/slf4j-log4j12-1.6.4.jar
! xalan=lib/required/xalan-2.7.1.jar
jetty=lib/required/jetty-server-7.6.3.v20120416.jar
jetty-continuation=lib/required/jetty-continuation-7.6.3.v20120416.jar
***************
*** 63,70 ****
felix.libs=${felix-main}
! jackson-core=lib/required/jackson-core-asl-1.9.0.jar
! jackson-mapper=lib/required/jackson-mapper-asl-1.9.0.jar
commons-configuration.libs = ${commons-beanutils-core} ${commons-digester} \
${commons-codec} ${commons-lang} ${commons-collections} ${commons-configuration}
--- 63,70 ----
felix.libs=${felix-main}
! jackson-core=lib/required/jackson-core-asl-1.7.3.jar
! jackson-mapper=lib/required/jackson-mapper-asl-1.7.3.jar
commons-configuration.libs = ${commons-beanutils-core} ${commons-digester} \
${commons-codec} ${commons-lang} ${commons-collections} ${commons-configuration}
Only in b/qpid/java: build.deps.orig
diff -crB a/qpid/java/common/bin/qpid-jaddr b/qpid/java/common/bin/qpid-jaddr
*** a/qpid/java/common/bin/qpid-jaddr 2010-06-07 15:13:47.000000000 -0500
--- b/qpid/java/common/bin/qpid-jaddr 2013-07-30 16:23:13.000000000 -0500
***************
*** 24,30 ****
fi
# Set classpath to include Qpid jar with all required jars in manifest
! QPID_LIBS=$QPID_HOME/lib/qpid-all.jar
# Set other variables used by the qpid-run script before calling
export JAVA=java \
--- 24,30 ----
fi
# Set classpath to include Qpid jar with all required jars in manifest
! QPID_LIBS="$QPID_HOME/lib/qpid-all.jar:$QPID_HOME/lib/opt/*:$QPID_HOME/lib/opt/qpid-deps/*"
# Set other variables used by the qpid-run script before calling
export JAVA=java \
diff -crB a/qpid/java/common/bin/qpid-run b/qpid/java/common/bin/qpid-run
*** a/qpid/java/common/bin/qpid-run 2012-02-15 09:29:22.000000000 -0600
--- b/qpid/java/common/bin/qpid-run 2013-07-30 16:23:13.000000000 -0500
***************
*** 62,69 ****
fi
if [ -z "$QPID_WORK" ]; then
! log $INFO Setting QPID_WORK to $HOME as default
! QPID_WORK=$HOME
fi
if [ -z "$JAVA" ]; then
--- 62,68 ----
fi
if [ -z "$QPID_WORK" ]; then
! QPID_WORK=$QPID_HOME
fi
if [ -z "$JAVA" ]; then

View file

@ -1,10 +0,0 @@
org.apache.commons.cli/commons-cli-1.2.jar
org.apache.xalan/xalan-2.7.2.jar
org.apache.commons.beanutils/commons-beanutils-1.8.3.jar
org.apache.commons.digester/commons-digester-1.8.1.jar
org.apache.commons.codec/commons-codec-1.4.jar
org.apache.commons.lang/commons-lang-2.3.jar
org.apache.commons.collections/commons-collections-3.2.jar
org.codehaus.jackson/jackson-core-asl-1.7.3.jar
org.codehaus.jackson/jackson-mapper-asl-1.7.3.jar
org.mockito/mockito-all-1.9.0.jar

View file

@ -1,13 +0,0 @@
diff --git a/qpid/java/build.xml b/qpid/java/build.xml
index a41cff4..06e8c8a 100644
--- a/qpid/java/build.xml
+++ b/qpid/java/build.xml
@@ -161,7 +161,7 @@
<touch file="${qpid.jar}"/>
</target>
- <target name="build" depends="retrieve-dependencies" description="build the project">
+ <target name="build" description="build the project">
<iterate target="build"/>
<antcall target="manifest"/>
</target>

View file

@ -1,121 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
- 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.
-->
<!--
- Virtual host configuration for edex
-
-
- SOFTWARE HISTORY
-
- Date Ticket# Engineer Description
- ============ ========== =========== ==========================
- Mar 18, 2013 1814 rjpeter Initial Creation
-
-->
<broker>
<prefix>${QPID_HOME}</prefix>
<work>${QPID_WORK}</work>
<conf>${prefix}/etc</conf>
<plugin-directory>${QPID_HOME}/lib/opt</plugin-directory>
<cache-directory>${QPID_WORK}/cache</cache-directory>
<connector>
<!-- To enable SSL edit the keystorePath and keystorePassword
and set enabled to true.
To disable Non-SSL port set sslOnly to true -->
<ssl>
<enabled>false</enabled>
<port>5671</port>
<sslOnly>false</sslOnly>
<keyStorePath>/path/to/keystore.ks</keyStorePath>
<keyStorePassword>keystorepass</keyStorePassword>
</ssl>
<port>5672</port>
<socketReceiveBuffer>32768</socketReceiveBuffer>
<socketWriteBuffer>16384</socketWriteBuffer>
</connector>
<management>
<enabled>true</enabled>
<jmxport>
<registryServer>8999</registryServer>
<!--
If unspecified, connectorServer defaults to 100 + registryServer port.
<connectorServer>9099</connectionServer>
-->
</jmxport>
<ssl>
<enabled>false</enabled>
<!-- Update below path to your keystore location. -->
<keyStorePath>${conf}/qpid.keystore</keyStorePath>
<keyStorePassword>password</keyStorePassword>
</ssl>
<http>
<enabled>true</enabled>
<port>8180</port>
<basic-auth>false</basic-auth>
<sasl-auth>false</sasl-auth>
<session-timeout>600</session-timeout>
</http>
<https>
<enabled>false</enabled>
</https>
</management>
<advanced>
<framesize>65535</framesize>
<locale>en_US</locale>
</advanced>
<security>
<pd-auth-manager>
<principal-database>
<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>
<attributes>
<attribute>
<name>passwordFile</name>
<value>${conf}/passwd</value>
</attribute>
</attributes>
</principal-database>
</pd-auth-manager>
<!-- By default, all authenticated users have permissions to perform all actions -->
<!-- ACL Example
This example illustrates securing the both Management (JMX) and Messaging.
<acl>${conf}/broker_example.acl</acl>
-->
<msg-auth>false</msg-auth>
</security>
<virtualhosts>${conf}/virtualhosts.xml</virtualhosts>
<heartbeat>
<delay>0</delay>
<timeoutFactor>2.0</timeoutFactor>
</heartbeat>
<queue>
<auto_register>true</auto_register>
</queue>
<status-updates>ON</status-updates>
</broker>

View file

@ -1,96 +0,0 @@
From 4acdbf975c076c2c49e7e2436065ca7d18dfab20 Mon Sep 17 00:00:00 2001
From: rajith <rajith@redhat.com>
Date: Wed, 16 Jun 2010 16:37:11 -0400
Subject: [PATCH 02/52] These two files are not present in upstream and we currently carry them as a patch.
The reason being that the run_example.sh is tailored specific for the linux env.
Including the example.log4j depends on how the release artefacts will look like for the 0.7 qpid release.
---
qpid/java/client/example/bin/run_example.sh | 43 +++++++++++++++++++++++++++
qpid/java/client/example/example.log4j | 27 +++++++++++++++++
2 files changed, 70 insertions(+), 0 deletions(-)
create mode 100644 qpid/java/client/example/bin/run_example.sh
create mode 100644 qpid/java/client/example/example.log4j
diff --git a/qpid/java/client/example/bin/run_example.sh b/qpid/java/client/example/bin/run_example.sh
new file mode 100644
index 0000000..5bd0e99
--- /dev/null
+++ b/qpid/java/client/example/bin/run_example.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# set the CLASSPATH
+QPID_DEPS=`find /usr/share/java/qpid-deps/*.jar | tr '\n' ":"`
+QPID_JARS=`find /usr/share/java -name 'qpid-client*.jar' -or -name 'qpid-common*.jar' | tr '\n' ":"`
+LOG4J="/usr/share/java/log4j.jar"
+QPID_CLASSPATH=$QPID_DEPS$LOG4J:$QPID_JARS
+
+# compile the samples
+javac -cp "$QPID_CLASSPATH" -sourcepath "$PWD" -d . `find $PWD -name '*.java'`
+
+# Add output classes to CLASSPATH
+QPID_CLASSPATH="$PWD:$QPID_CLASSPATH"
+
+
+# Check if the user supplied a sample classname
+if test "'x$1'" = "'x'"
+then
+ echo "No sample classname specified"
+ exit;
+else
+ java -cp $QPID_CLASSPATH -Dlog4j.configuration=example.log4j "$@"
+fi
+
diff --git a/qpid/java/client/example/example.log4j b/qpid/java/client/example/example.log4j
new file mode 100644
index 0000000..50b4ed2
--- /dev/null
+++ b/qpid/java/client/example/example.log4j
@@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+log4j.logger.org.apache.qpid=WARN, console
+log4j.additivity.org.apache.qpid=false
+
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.Threshold=all
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n

View file

@ -1,130 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="null" threshold="null">
<appender class="org.apache.log4j.QpidCompositeRollingAppender" name="ArchivingFileAppender">
<!-- Ensure that logs always have the DatePattern appended to the filename.
DEFAULT IF NOT CONFIGURED: true -->
<param name="StaticLogFileName" value="true"/>
<param name="file" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/>
<!-- Style of rolling to use, by:
File Size(1)
Date(2)
Both(3)
When Date (or Both) is enabled then the value of DatePattern will determine
when the new file is made. e.g. a DatePattern of "'.'yyyy-MM-dd-HH-mm"
which includes minutes will cause a new backup file to be made every minute.
DEFAULT IF NOT CONFIGURED: 3 -->
<param name="RollingStyle" value="2"/>
<!-- Set the count direction:
Negative numbers mean backups are numbered <latest>, .0, .1, .2,..., .n
0 means backup is DatePattern stamped and followed with a Positive number
if the DatePattern stamp clashes with other existing backups.
Positive numbers mean backups are numbered 0, 1, 2, ..., n, <latest>
DEFAULT IF NOT CONFIGURED: -1 -->
<param name="CountDirection" value="0"/>
<!-- Maximum File Size:
DEFAULT IF NOT CONFIGURED: 10MB -->
<param name="MaxFileSize" value="500MB"/>
<!-- Date Pattern:
DEFAULT IF NOT CONFIGURED: "'.'yyyy-MM-dd" -->
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<!-- Maximum number of backup files:
0 means no backups
-1 means infinite backups
DEFAULT IF NOT CONFIGURED: 0 -->
<param name="MaxSizeRollBackups" value="14"/>
<!-- Compress(gzip) the backup files to the backup location:
DEFAULT IF NOT CONFIGURED: FALSE -->
<param name="CompressBackupFiles" value="true"/>
<!-- Compress the backup files using a second thread:
DEFAULT IF NOT CONFIGURED: FALSE -->
<param name="CompressAsync" value="true"/>
<!-- Backup Location:
DEFAULT IF NOT CONFIGURED: same dir as log file -->
<param name="backupFilesToPath" value="${QPID_WORK}/log"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t] (%F:%L) - %m%n"/>
</layout>
</appender>
<appender class="org.apache.log4j.FileAppender" name="FileAppender">
<param name="File" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/>
<param name="Append" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t] (%F:%L) - %m%n"/>
</layout>
</appender>
<appender class="org.apache.log4j.ConsoleAppender" name="STDOUT">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t] (%F:%L) - %m%n"/>
</layout>
</appender>
<!-- Provide warnings to standard output -->
<category additivity="true" name="org.apache.qpid">
<priority value="info"/>
</category>
<!-- Enable info messages for the status-logging hierarchy -->
<logger additivity="true" name="qpid.message">
<level value="warn"/>
</logger>
<!-- Subscription state may toggle frequently for clients with low prefetch
so switch off this operational logging by default-->
<logger additivity="true" name="qpid.message.subscription.state">
<level value="off"/>
</logger>
<!-- Enable log messages for the queue notifications -->
<logger additivity="true" name="org.apache.qpid.server.queue.NotificationCheck">
<level value="info"/>
</logger>
<!-- Examples of additional logging settings -->
<!-- Used to generate extra debug. See debug.log4j.xml -->
<category additivity="true" name="org.apache.qpid.server.store">
<priority value="warn"/>
</category>
<!-- Set the commons logging that the XML parser uses to WARN, it is very chatty at debug -->
<logger name="org.apache.commons">
<level value="WARN"/>
</logger>
<!-- Log all info events to file -->
<root>
<priority value="info"/>
<!--appender-ref ref="FileAppender"/-->
<appender-ref ref="ArchivingFileAppender"/>
</root>
</log4j:configuration>

File diff suppressed because it is too large Load diff

View file

@ -1,137 +0,0 @@
diff -crB a/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java b/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java
*** a/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java 2012-06-28 11:46:12.000000000 -0500
--- b/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java 2013-09-16 13:26:48.000000000 -0500
***************
*** 38,47 ****
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
public abstract class QueueEntryImpl implements QueueEntry
{
! private static final Logger _log = Logger.getLogger(QueueEntryImpl.class);
private final QueueEntryList _queueEntryList;
--- 38,48 ----
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
+ import java.util.logging.Level;
public abstract class QueueEntryImpl implements QueueEntry
{
! private static final java.util.logging.Logger _log = java.util.logging.Logger.getLogger(QueueEntryImpl.class.getName());
private final QueueEntryList _queueEntryList;
***************
*** 145,156 ****
ServerMessage message = getMessage();
if(message != null)
{
! long expiration = message.getExpiration();
! if (expiration != 0L)
! {
! long now = System.currentTimeMillis();
! return (now > expiration);
}
}
return false;
--- 146,162 ----
ServerMessage message = getMessage();
if(message != null)
{
! try {
! long expiration = message.getExpiration();
! if (expiration != 0L)
! {
! long now = System.currentTimeMillis();
! return (now > expiration);
! }
! } catch (Exception e) {
! _log.log(Level.SEVERE, "Caught exception checking if message is expired. Message State: " + _state.getState().name(), e);
! return isAvailable();
}
}
return false;
***************
*** 343,349 ****
}
else
{
! _log.warn("Requesting rejection by null subscriber:" + this);
}
}
--- 349,355 ----
}
else
{
! _log.warning("Requesting rejection by null subscriber:" + this);
}
}
diff -crB a/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java b/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
*** a/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java 2012-07-08 10:30:05.000000000 -0500
--- b/qpid-0.18/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java 2013-09-16 14:15:11.000000000 -0500
***************
*** 36,41 ****
--- 36,42 ----
import java.util.concurrent.atomic.AtomicLong;
import org.apache.log4j.Logger;
+ import org.apache.log4j.Level;
import org.apache.qpid.AMQException;
import org.apache.qpid.AMQSecurityException;
import org.apache.qpid.framing.AMQShortString;
***************
*** 1053,1060 ****
public long getOldestMessageArrivalTime()
{
! QueueEntry entry = getOldestQueueEntry();
! return entry == null ? Long.MAX_VALUE : entry.getMessage().getArrivalTime();
}
protected QueueEntry getOldestQueueEntry()
--- 1054,1090 ----
public long getOldestMessageArrivalTime()
{
! int tries = 0;
! QueueEntry prev = null;
!
! while (tries < 3) {
! QueueEntry entry = null;
! try {
! entry = getOldestQueueEntry();
! return entry == null ? Long.MAX_VALUE : entry.getMessage().getArrivalTime();
! } catch (Exception e) {
! if ((prev == null) || (prev != entry)) {
! tries++;
! _logger.log(Level.FATAL,
! "Error occurred getting oldest message arrival time, message: "
! + entry + ", attempt " + tries + " of 3", e);
! prev = entry;
! } else {
! // same invalid entry returned, try deleting?
! _logger.log(Level.WARN,
! "Received same invalid entry on getting oldest message, attempting discard.");
! try {
! entry.discard();
! } catch (Exception e2) {
! _logger.log(Level.ERROR,
! "Failed to discard message. Restart recommended if errors continue", e2);
! }
! }
! }
! }
!
! // default case
! return Long.MAX_VALUE;
}
protected QueueEntry getOldestQueueEntry()

View file

@ -1,51 +0,0 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# this version of the qpid start script will utilize the yajsw wrapper
CONF_FILE="wrapper.conf"
WHEREAMI=`dirname $0`
if [ -z "$QPID_HOME" ]; then
export QPID_HOME=`cd $WHEREAMI/../ && pwd`
fi
if [ -z "$QPID_WORK" ]; then
export QPID_WORK=$QPID_HOME
fi
if [ -z "${QPID_PID_FILENAME}" ]; then
export QPID_PID_FILENAME="qpid-server.pid"
fi
# Set other variables used by the wrapper
export JAVA=/awips2/java/bin/java \
JAVA_VM=-server \
AMQJ_LOGGING_LEVEL=info \
QPID_PNAME=" -DPNAME=QPBRKR" \
CONSOLE_LOGLEVEL=DEBUG
if [ ! -f ${JAVA} ]; then
echo "ERROR: the specified Java does not exist - ${JAVA}."
echo "Unable to Continue ... Terminating."
exit 1
fi
$JAVA -Xmx32m -XX:MaxPermSize=12m -XX:ReservedCodeCacheSize=4m -jar ${QPID_HOME}/bin/yajsw/wrapper.jar -c ${QPID_HOME}/conf/${CONF_FILE}

View file

@ -1,159 +0,0 @@
#!/bin/bash
#
# qpidd This shell script takes care of starting and stopping
# the AWIPS qpid instance.
#
# chkconfig: - 99 10
# description: Qpid messaging broker used by the AWIPS 2 instance
# processname: qpid-server
# config: /awips2/qpid/etc/config.xml
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
RETVAL=0
prog="qpid-wrapper"
# Who to run QPID as, usually "awips". (NOT "root")
QPIDUSER=awips
# Todays date in format of YYYYMMDD.
TODAY=`/bin/date +%Y%m%d`
QPID_HOME=/awips2/qpid
wrapper_process="org.rzo.yajsw.app.WrapperJVMMain"
_wrapper_jar=${QPID_HOME}/bin/yajsw/wrapper.jar
function getQPID_psCount()
{
psCount_qpid=`ps -ef | grep ${wrapper_process} | grep QPID_HOME="${QPID_HOME}" | grep -c "PNAME=QPBRKR "`
}
function getQPID_pid()
{
pid_qpid=`ps -e -o pid,args | grep ${wrapper_process} | grep QPID_HOME="${QPID_HOME}" | grep "PNAME=QPBRKR " | grep -e "^ *\([0-9]\+\)" -o`
}
function getWrapper_psCount()
{
psCount_wrapper=`ps -ef | grep "${_wrapper_jar} -c" | grep -c wrapper.conf`
}
function getWrapper_pid()
{
pid_wrapper=`ps -e -o pid,args | grep "${_wrapper_jar} -c" | grep wrapper.conf | grep -e "^ *\([0-9]\+\)" -o`
}
start() {
getQPID_psCount
if [ ${psCount_qpid} -eq 1 ]; then
echo "WARNING: QPID already running, not starting another instance"
return 1
fi
DAEMON="/bin/bash ${QPID_HOME}/bin/${prog}"
QPIDSTARTLOG=${QPID_HOME}/log/start-qpid-$TODAY.log
su $QPIDUSER -c "$DAEMON" >> $QPIDSTARTLOG 2>&1 &
sleep 5
checkStatus
}
stop() {
# determine if qpid is running, first.
getQPID_psCount
if [ ${psCount_qpid} -ne 1 ]; then
echo "WARNING: Qpid is not running, no shutdown attempted!"
return 1
fi
# get the qpid pid
getQPID_pid
# determine if the qpid wrapper is running.
getWrapper_psCount
if [ ${psCount_wrapper} -eq 1 ]; then
# get the wrapper pid
getWrapper_pid
# stop the wrapper
kill ${pid_wrapper}
else
# stop qpid
kill ${pid_qpid}
fi
# wait for and verify that qpid has stopped running
savepid=${pid_qpid}
while [ "X${pid_qpid}" != "X" ]; do
sleep 1
getQPID_psCount
if [ ${psCount_qpid} -eq 1 ]; then
pid_qpid=${savepid}
else
pid_qpid=""
fi
done
}
checkStatus() {
getQPID_psCount
if [ ${psCount_qpid} -eq 1 ]; then
getQPID_pid
echo "QPID is running (PID ${pid_qpid})"
else
echo "QPID is not running"
fi
}
# Verify root user
checkUser() {
REQUIREDUSER="root"
CURUSER=`whoami`
if [ "$CURUSER" != "$REQUIREDUSER" ]; then
echo "Insufficient privileges: must run script as $REQUIREDUSER"
exit 1
fi
}
# See how we were called.
case $1 in
start)
checkUser
echo "Starting QPID"
start
RETVAL=$?
;;
stop)
checkUser
echo "Stopping QPID"
stop
RETVAL=$?
;;
restart)
checkUser
echo "Stopping QPID"
stop
echo "Starting QPID"
start
RETVAL=$?
;;
status)
checkStatus
RETVAL=$?
;;
*)
# Print help
echo "Usage: $0 {start|stop|restart|reload|status}" 1>&2
exit 1
;;
esac
exit $RETVAL

View file

@ -1,76 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
- 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.
-->
<!--
- Virtual host configuration for edex
-
-
- SOFTWARE HISTORY
-
- Date Ticket# Engineer Description
- ============ ========== =========== ==========================
- Mar 18, 2013 1814 rjpeter Initial Creation
- May 08, 2013 1814 rjpeter Remove slow consumer disconnect
-
-->
<virtualhosts>
<default>edex</default>
<virtualhost>
<name>edex</name>
<edex>
<store>
<class>org.apache.qpid.server.store.derby.DerbyMessageStore</class>
<environment-path>${QPID_WORK}/messageStore</environment-path>
</store>
<queues>
<!-- Define default exchange -->
<exchange>amq.direct</exchange>
<!-- Set threshold values for queue monitor alerting to log -->
<!-- If a queue has more than this in memory print an error message -->
<maximumQueueDepth>5294080</maximumQueueDepth> <!-- 5Mb (QPID appears to use X * 1024^2 + X * 10 * 1024) -->
<!-- Logs if any message is this large -->
<maximumMessageSize>2117632</maximumMessageSize> <!-- 2Mb -->
<!-- Logs a message if any message is on queue for more than 5 minutes -->
<maximumMessageAge>300000</maximumMessageAge> <!-- 5 min -->
<!-- Logs a message if there are more that 15k messages on queue -->
<maximumMessageCount>15000</maximumMessageCount>
<durable>true</durable>
<!-- Configure queues
Queues created on demand for AWIPS II
<queue>
<name>external.dropbox</name>
<external..dropbox>
<durable>true</durable>
</external..dropbox>
</queue>
-->
</queues>
</edex>
</virtualhost>
</virtualhosts>

View file

@ -1,134 +0,0 @@
#********************************************************************
##
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to non-U.S. persons whether in the United States or abroad requires
# an export license or other authorization.
#
# Contractor Name: Raytheon Company
# Contractor Address: 6825 Pine Street, Suite 340
# Mail Stop B8
# Omaha, NE 68106
# 402.291.0100
#
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
# further licensing information.
##
# Wrapper Properties
#********************************************************************
wrapper.debug=false
set.default.QPID_HOME=../..
wrapper.working.dir=/awips2/qpid/bin
# required due to java bug:
# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4388188
# not sure if the yajsw developers have any intention of
# implementing the work-around (solution?) stated in the
# ticket.
wrapper.fork_hack=true
# at a minimum: prevents the printing of the "Invalid parameter" messages
wrapper.console.pipestreams=true
# Java Application
wrapper.java.command=/awips2/java/bin/java
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=${QPID_HOME}/bin/yajsw/wrapper.jar
# include ANY jar files that are found in the locations denoted by
# wrapper.search.java.classpath.#
wrapper.search.java.classpath.1=${QPID_HOME}/lib/opt
wrapper.search.java.classpath.2=${QPID_HOME}/lib/opt/qpid-deps
# garbage collection settings
wrapper.java.additional.gc.1=-XX:+UseConcMarkSweepGC
wrapper.java.additional.gc.2=-XX:+CMSIncrementalMode
wrapper.java.additional.gc.3=-XX:NewSize=400m
wrapper.java.additional.gc.4=-XX:MaxNewSize=400m
wrapper.java.additional.gc.5=-XX:SurvivorRatio=4
wrapper.java.additional.gc.6=-XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.gc.7=-XX:HeapDumpPath=/data/fxa/qpid
# the main qpid java class that will be started
wrapper.java.app.mainclass=org.apache.qpid.server.Main
# Java Additional Parameters
# note that n is the parameter number starting from 1.
wrapper.java.additional.1=${JAVA_VM}
wrapper.java.additional.2=${QPID_PNAME}
wrapper.java.additional.3=-Damqj.logging.level=${AMQJ_LOGGING_LEVEL}
wrapper.java.additional.4=-DQPID_HOME=${QPID_HOME}
wrapper.java.additional.5=-DQPID_WORK=${QPID_WORK}
wrapper.java.additional.6=-Damqj.read_write_pool_size=32
wrapper.java.additional.7=-Dqpid.broker.exceptionHandler.continue=true
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1536
wrapper.ping.interval=5
wrapper.ping.timeout=30
# NOTE: script must be located at /awips2/qpid/bin/yajsw/scripts for it to be found
wrapper.script.ABORT=wrapperCapture.sh
wrapper.script.ABORT.timeout=120
wrapper.script.RESTART=wrapperCapture.sh
wrapper.script.RESTART.timeout=120
#********************************************************************
# Monitor the Application
#********************************************************************
wrapper.java.monitor.heap = true
# warning messages will be logged; it is also possible to send an e-mail
wrapper.java.monitor.heap.threshold.percent = 90
wrapper.java.monitor.deadlock = true
wrapper.filter.trigger.deadlock.restart=wrapper.java.monitor.deadlock: DEADLOCK IN THREADS:
wrapper.filter.action.deadlock.restart=RESTART
# restart the application if it runs out of memory
wrapper.filter.trigger.1=java.lang.OutOfMemoryError
wrapper.filter.action.1=RESTART
# restart the application if it crashes
wrapper.on_exit.default=RESTART
#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console. (See docs for formats)
wrapper.console.format=M
# Log file to use for wrapper output logging.
wrapper.logfile=${QPID_HOME}/log/qpid-wrapper-YYYYMMDD.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LTM
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO
# Set the log rollover mode for the log.
# DATE - creates a new file each day - file name must include YYYYMMDD.
# SIZE - uses log size for log roll-over.
wrapper.logfile.rollmode=DATE
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=7
# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=${CONSOLE_LOGLEVEL}
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO
#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=QPID

View file

@ -1,389 +0,0 @@
Name: qpid-java
Version: 0.18
Release: 2%{?dist}
Summary: Java implementation of Apache Qpid
License: Apache Software License
Group: Development/Java
URL: http://qpid.apache.org/
%global qpid_src_dir qpid-%{version}
%global qpid_deps_src_dir qpid-deps-%{version}
Source0: %{qpid_src_dir}.tar.gz
Source1: qpid-build-deps-%{version}.tar.gz
Source2: %{qpid_deps_src_dir}.tar.gz
Patch0: mrg.patch
Patch1: examples.patch
Patch2: build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: ant >= 1.6.5
BuildRequires: ant-nodeps >= 1.6.5
BuildRequires: java-devel >= 1.6.0
BuildRequires: ant-trax >= 1.6.5
%description
Java implementation of Apache Qpid.
%package common
Summary: Java implementation of Apache Qpid - common files
Group: Development/Java
BuildArch: noarch
%description common
Java implementation of Apache Qpid - common files
%package client
Summary: Java implementation of Apache Qpid - client
Group: Development/Java
BuildArch: noarch
Requires: qpid-java-common = %{version}-%{release}
Requires: log4j >= 1.2.12
%description client
Java implementation of Apache Qpid - client
%package example
Summary: Java implementation of Apache Qpid - example
Group: Development/Java
BuildArch: noarch
Requires: qpid-java-client = %{version}-%{release}
%description example
Java implementation of Apache Qpid - example
%prep
%setup -q -n %{qpid_src_dir}
mkdir -p java/lib/required
tar -xvzf %SOURCE1 -C java/lib/required
%patch0 -p2
%patch1 -p2
%patch2 -p2
%setup -q -T -b 2 -n %{qpid_deps_src_dir}
%build
cd ..
(
cd %{qpid_src_dir}/java
ant -Dretrieve.dependencies=false -Dmodules=common\ client
# blacklisted jars are either provided by the Requires: or not needed.
BLACKLIST="slf4j qpid-client-tests qpid-all qpid-common-tests"
for jar in $BLACKLIST; do rm build/lib/${jar}*.jar; done
)
(cd %{qpid_deps_src_dir}; ant -Dqpid-src-dir=../%{qpid_src_dir}/java -Dversion=%{version})
%install
rm -rf %{buildroot}
cd ..
install -dm 755 %{buildroot}%{_javadir}
install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-client-%{version}.jar %{buildroot}%{_javadir}
install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-client-%{version}-sources.jar %{buildroot}%{_javadir}
install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-common-%{version}.jar %{buildroot}%{_javadir}
install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-common-%{version}-sources.jar %{buildroot}%{_javadir}
install -dm 755 %{buildroot}%{_javadir}/qpid-deps
install -pm 644 %{qpid_src_dir}/java/build/lib/log4j-slf4j.jar %{buildroot}%{_javadir}/qpid-deps
install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-deps-%{version}.jar %{buildroot}%{_javadir}/qpid-deps
# examples
install -dm 755 %{buildroot}%{_docdir}/%{name}-%{version}/examples/org/apache/qpid/example/
install -pm 644 %{qpid_src_dir}/java/client/example/src/main/java/org/apache/qpid/example/*.java \
%{buildroot}%{_docdir}/%{name}-%{version}/examples/org/apache/qpid/example/
install -pm 644 %{qpid_src_dir}/java/client/example/src/main/java/org/apache/qpid/example/hello.properties \
%{buildroot}%{_docdir}/%{name}-%{version}/examples/org/apache/qpid/example/
install -pm 644 %{qpid_src_dir}/java/client/example/example.log4j \
%{buildroot}%{_docdir}/%{name}-%{version}/examples/
install -pm 755 %{qpid_src_dir}/java/client/example/bin/run_example.sh \
%{buildroot}%{_docdir}/%{name}-%{version}/examples/
%clean
rm -rf %{buildroot}
%files common
%defattr(-,root,root,-)
%{_javadir}/qpid-deps/
%{_javadir}/qpid-common-%{version}.jar
%{_javadir}/qpid-common-%{version}-sources.jar
%doc ../%{qpid_src_dir}/java/resources/LICENSE
%doc ../%{qpid_src_dir}/java/resources/NOTICE
%files client
%defattr(-,root,root,-)
%{_javadir}/qpid-client-%{version}.jar
%{_javadir}/qpid-client-%{version}-sources.jar
%files example
%defattr(-,root,root,-)
%{_docdir}/%{name}-%{version}/examples/
%changelog
* Thu Sep 6 2012 Irina Boverman <iboverma@redhat.com> - 0.18-2
- Resolved bz 851574
* Tue Jul 10 2012 Justin Ross <jross@redhat.com> - 0.18-1
- Refactored spec file to use standard Qpid source export
- Rebased to Qpid 0.18 beta source
* Thu Feb 23 2012 Rajith Attapattu <rattapat@redhat.com> - 0:0.14-3
- Added a patch to account for changes between 0.14-rc1 and HEAD of 0.14-mrg-preview.
* Thu Feb 16 2012 Rajith Attapattu <rattapat@redhat.com> - 0:0.14-2
- Added a patch to account for changes between 0.14-rc1 and HEAD of 0.14-mrg-preview.
* Mon Dec 12 2011 Rajith Attapattu <rattapat@redhat.com> - 0:0.14-1
- Rebased the client to use the Qpid 0.14 RC1 source.
- Added a patch to account for changes between 0.14-rc1 and HEAD of 0.14-mrg-preview.
* Fri Sep 23 2011 Andrew Stitcher <astitcher@redhat.com> - 0:0.10-11
- Added new qpid-java-jca-zip package which wraps a zip of everything
in qpid jca.
- Make qpid-deps jar have correct 0.10 version
- Updated patch to include latest Qpid JCA work:
BZ.738316
BZ 733383
BZ 736252
BZ 700500
BZ 707535
BZ 722614
BZ 735030
BZ 738615
BZ 700494
BZ 705913
BZ 723714
BZ 735384
BZ 736794
BZ 737880
BZ 735322
BZ 736785
* Tue Sep 14 2011 Rajith Attapattu <rattapat@redhat.com> - 0:0.10-9
- Added a patch to account for changes between 0.10 and mrg_2.0.3 head rev on Sep 14th.
* Mon May 16 2011 Rajith Attapattu <rattapat@redhat.com> - 0:0.10.-6
- Added a patch to account for changes between 0.10 and qpid-0.10-package-set-7 tags.
* Thu Apr 28 2011 Andrew Stitcher <astitcher@redhat.com> - 0:0.10.-5
- Removed jar file that was not meant to be in qpid-java-common
* Wed Apr 20 2011 Rajith Attapattu <rattapat@redhat.com> - 0:0.10.-4
- Added a patch to account for changes between 0.10 and qpid-0.10-package-set-5 tags.
* Thu Apr 14 2011 Ted Ross <tross@redhat.com> - 0:0.10-3
- Added a patch to fix BZ694617
* Wed Apr 6 2011 Rajith Attapattu <rattapat@redhat.com> - 0:0.10.-2
- Added a patch to include QPID-3177 which is included in the upstream 0.10 release.
- Fixed an error in the qpid-deps source tarball.
* Thu Mar 24 2011 Rajith Attapattu <rattapat@redhat.com> - 0:0.10.-1
- Change the version from 0.10.1083082 to 0.10.
* Wed Mar 23 2011 Rajith Attapattu <rattapat@redhat.com> - 0:0.10.1083082-1
- Updated the source files to rev 1083082 in Qpid 0.10 branch.
* Thu Mar 10 2011 Andrew Stitcher <astitcher@redhat.com> - 0:0.9.1080013-3
- Fixed issue that stopped deployment on JBoss 5
- Added sample deployment resource
- Added some JCA example code
- Added separate Readme for JBoss deployment
* Thu Mar 10 2011 Andrew Stitcher <astitcher@redhat.com> - 0:0.9.1080013-2
- Updated JCA package added some documentation to it.
- Add qpid-deps jar into the qpid-ra rar file to supply dependencies for
qpid-common/qpid-client jars
* Wed Mar 9 2011 Rajith Attapattu <rattapat@redhat.com> - 0:0.9.1080013-1
- Updated the source files to rev 1080013 in Qpid 0.10 branch.
* Tue Mar 8 2011 Andrew Stitcher <astitcher@redhat.com> - 0:0.9.1073306-3
- Changed JCA build to use source for jar dependents
* Wed Mar 2 2011 Andrew Stitcher <astitcher@redhat.com> - 0:0.9.1073306-2
- Added new sub-package for JCA resource adapter
* Thu Feb 24 2011 Rajith Attapattu <rattapat@redhat.com> - 0:0.9.1073306-1
- Updated the source files to rev 1073306 in Qpid trunk.
* Thu Jan 27 2011 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-15
- Applied another patch for BZ 656488, 672212.
* Wed Jan 12 2011 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-14
- Applied patches for BZ 667428, 656488.
* Wed Nov 10 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-12
- Applied patches for BZ 645855
* Tue Oct 12 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-11
- Added "Obsoletes: qpid-java-qman <= 0.5.751061-9.el5" to the spec file.
* Wed Sep 22 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-10
- Applied patches for BZ 634794, 636097, 633969.
* Mon Sep 13 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-9
- Applied patches for BZ 626859.
* Mon Aug 30 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-8
- Applied patches for BZ 620808, 621395, 622619.
* Thu Jul 29 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-7
- Applied patches for BZ 616457, 614580, 618865, 618822, 614589, 513426, 619242.
* Mon Jul 12 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-6
- Applied patches for bz612531, bz612526, bz612535.
* Wed Jun 30 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-5
- Patches are now generated from git.
- Added a fix for bz608052
- Configured the javac target to 1.5 for dependencies
* Tue Jun 15 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-4
- For dependencies that are not available as rpms, they are now built from source.
- For commons lang, the required classes are now added as a patch, removing the required dependency.
* Mon May 24 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-3
- Fixed an error in the run_example script
- Added LICENSE and NOTICE to common rpm
* Mon May 24 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-2
- Added Drain and Spout examples
- Removed dependency from sl4j rpm, instead using the jar in qpid-deps
* Thu May 20 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.946106-1
- Updated to rev 946106 of Qpid trunk
* Thu Apr 15 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.934605-1
- Updated to rev 934605 of Qpid trunk
* Tue Mar 2 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.918215-1
- Updated to rev 918215 of Qpid trunk
* Wed Feb 3 2010 Rajith Attapattu <rattapat@redhat.com> - 0:0.7.906145-1
- Updated to rev 906145 of Qpid trunk
- Stripped the qman package. The java broker is also not built anymore.
* Fri Oct 9 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.5.751061-9
- Removing patch attached to bz494630
- Applying patch attached to bz493559
- Applying patch attached to bz509395
* Tue Jun 25 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.5.751061-8
- Applying patch attached to bz506739
- Applying patch attached to bz507369
* Mon Jun 8 2009 Rafael Schloming <rafaels@redhat.com> - 0:0.5.751061-7
- Applying the heartbeat echo patch from bz504590
* Thu Jun 04 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.5.751061-6
- Applying the modified patch attached to bz503539
* Wed Jun 03 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.5.751061-5
- Applying patch attached to bz503526
- Applying patch attached to bz503539
* Thu May 21 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.5.751061-4
- Fixed an error in the spec file to apply all patches correctly
* Wed May 20 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.5.751061-3
- Applying patch attached to bz500146
- Applying patch attached to bz501552
* Wed Apr 8 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.5.751061-2
- Going back to revision 751061 of Qpid trunk
- Applying patch attached to bz494630
* Fri Mar 27 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.5.758820-1
- Updated to revision 758820 of the Qpid trunk
* Thu Mar 12 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.5.751061-1
- Updated to revision 751061 of the Qpid trunk
* Wed Mar 04 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.4.750205-1
- Updated to revision 750205 of the Qpid trunk
* Fri Feb 13 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.4.743367-1
- Updated to revision 743367 of the Qpid trunk
* Mon Feb 09 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.4.742278-1
- Updated to revision 742278 of the Qpid trunk
* Wed Jan 28 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.4.738568-1
- Updated to revision 738568 of the Qpid trunk
- Removed thread patch as it's comitted to trunk
* Fri Jan 9 2009 Rajith Attapattu <rattapat@redhat.com> - 0:0.3.733043-2
- Updated to revision 733043 of the Qpid M4-RCs branch
* Mon Nov 19 2008 Rajith Attapattu <rattapat@redhat.com> - 0:0.3.724504-1
- Updated to revision 724504 of the qpid trunk
- Added the Qman package
- Applied the thread abstraction patch
* Mon Nov 10 2008 Rajith Attapattu <rattapat@redhat.com> - 0:0.3.712662-1
- Updated to revision 712662 of the qpid trunk
* Fri Oct 31 2008 Nuno Santos <nsantos@redhat.com> - 0:0.3.709187-1
- Rebased to svn rev 709187
* Mon Oct 28 2008 Rajith Attapattu <rattapat@redhat.com> - 0:0.3.708221-1
- Updated to revision 708221 of the qpid trunk
* Fri Aug 25 2008 Justin Ross <jross@redhat.com> - 0:0.2.687156-1
- Updated to revision 687156 of the qpid.0-10 branch
* Fri Aug 15 2008 Justin Ross <jross@redhat.com> - 0:0.2.686136-1
- Updated to revision 686136 of the qpid.0-10 branch
* Mon Jun 16 2008 Justin Ross <jross@redhat.com> - 0:0.2.668333-1
- Updated to source revision 668333
* Fri Jun 13 2008 Arnaud Simon <asimon@redhat.com> - 0:0.2.667615-1
- Updated to source revision 667615
* Mon Jun 11 2008 Arnaud Simon <asimon@redhat.com> - 0:0.2.666296-2
- Updated common dep and removed package broker
* Mon Jun 10 2008 Justin Ross <jross@redhat.com> - 0:0.2.666296-1
- Updated to source revision 666296
* Mon Jun 9 2008 Arnaud Simon <asimon@redhat.com> - 0:0.2.665769-1
- Updated to source revision 665769
* Thu May 15 2008 Justin Ross <jross@redhat.com> - 0:0.2.656760-1
- Updated source tarballs instructions
- Added svn revision number to version
- Updated to source revision 656760
* Tue May 13 2008 Arnaud Simon <asimon@redhat.com> - 0:0.2-11
- changed version for solving version conflic
* Tue May 13 2008 Arnaud Simon <asimon@redhat.com> - 0:0.2-10
- changed some default network configuration
* Tue May 13 2008 Arnaud Simon <asimon@redhat.com> - 0:0.2-9
- Bumped release for Beta 4
* Fri Feb 15 2008 Rafael Schloming <rafaels@redhat.com> - 0:0.2-9
- fix for deadlock exposed by TCK
* Wed Feb 13 2008 Rafael Schloming <rafaels@redhat.com> - 0:0.2-8
- More bug fixes for Beta 3
* Tue Feb 12 2008 Rafael Schloming <rafaels@redhat.com> - 0:0.2-7
- Bumped release for Beta 3 bug fixes
* Mon Feb 11 2008 Rafael Schloming <rafaels@redhat.com> - 0:0.2-6
- Bumped release for Beta 3
* Mon Feb 11 2008 Nuno Santos <nsantos@redhat.com> - 0.2-5
- Initial build.

View file

@ -1,319 +0,0 @@
diff -crB a/qpid-java.spec b/qpid-java.spec
*** a/qpid-java.spec 2013-09-16 16:26:10.000000000 -0500
--- b/qpid-java.spec 2013-09-16 16:25:55.000000000 -0500
***************
*** 1,6 ****
! Name: qpid-java
Version: 0.18
! Release: 2%{?dist}
Summary: Java implementation of Apache Qpid
License: Apache Software License
Group: Development/Java
--- 1,8 ----
! %define _awips2_directory "/awips2/qpid"
!
! Name: awips2-qpid-java
Version: 0.18
! Release: 5%{?dist}
Summary: Java implementation of Apache Qpid
License: Apache Software License
Group: Development/Java
***************
*** 12,21 ****
--- 14,32 ----
Source0: %{qpid_src_dir}.tar.gz
Source1: qpid-build-deps-%{version}.tar.gz
Source2: %{qpid_deps_src_dir}.tar.gz
+ Source3: config.xml
+ Source4: virtualhosts.xml
+ Source5: qpidd
+ Source6: log4j.xml
+ Source7: qpid-wrapper
+ Source8: wrapper.conf
+ Source9: yajsw-distribution.tar
Patch0: mrg.patch
Patch1: examples.patch
Patch2: build.patch
+ Patch3: awips.patch
+ Patch4: qpid-messageNotFound.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
***************
*** 35,45 ****
%description common
Java implementation of Apache Qpid - common files
%package client
Summary: Java implementation of Apache Qpid - client
Group: Development/Java
BuildArch: noarch
! Requires: qpid-java-common = %{version}-%{release}
Requires: log4j >= 1.2.12
%description client
--- 46,65 ----
%description common
Java implementation of Apache Qpid - common files
+ %package broker
+ Summary: Java implementation of Apache Qpid - broker files
+ Group: Development/Java
+ BuildArch: noarch
+ Provides: awips2-base-component
+
+ %description broker
+ Java implementation of Apache Qpid - broker files
+
%package client
Summary: Java implementation of Apache Qpid - client
Group: Development/Java
BuildArch: noarch
! Requires: awips2-qpid-java-common = %{version}-%{release}
Requires: log4j >= 1.2.12
%description client
***************
*** 49,55 ****
Summary: Java implementation of Apache Qpid - example
Group: Development/Java
BuildArch: noarch
! Requires: qpid-java-client = %{version}-%{release}
%description example
Java implementation of Apache Qpid - example
--- 69,75 ----
Summary: Java implementation of Apache Qpid - example
Group: Development/Java
BuildArch: noarch
! Requires: awips2-qpid-java-client = %{version}-%{release}
%description example
Java implementation of Apache Qpid - example
***************
*** 58,67 ****
--- 78,103 ----
%setup -q -n %{qpid_src_dir}
mkdir -p java/lib/required
tar -xvzf %SOURCE1 -C java/lib/required
+ # copy baseline libraries and other libraries to required
+ for dependency in `cat %{_topdir}/SOURCES/awips2/dependencies.txt`;
+ do
+ cp -f %{_baseline_workspace}/${dependency} java/lib/required
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ done
+ # copy dependencies that are not native to the baseline to required
+ cp -f %{_topdir}/SOURCES/awips2/*.jar %{_topdir}/SOURCES/awips2/*.war java/lib/required
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
%patch0 -p2
%patch1 -p2
%patch2 -p2
+ # apply the awips patch
+ %patch3 -p2
+ %patch4 -p2
%setup -q -T -b 2 -n %{qpid_deps_src_dir}
***************
*** 70,76 ****
(
cd %{qpid_src_dir}/java
! ant -Dretrieve.dependencies=false -Dmodules=common\ client
# blacklisted jars are either provided by the Requires: or not needed.
BLACKLIST="slf4j qpid-client-tests qpid-all qpid-common-tests"
--- 106,120 ----
(
cd %{qpid_src_dir}/java
! for module in ${QPID_MODULES[*]}; do
! ant -Dretrieve.dependencies=false \
! -Dmodules=${module}
! done
! ant -Dretrieve.dependencies=false \
! -Dmodules=common\ client\ amqp-1-0-common\ amqp-1-0-client\ amqp-1-0-client-jms\ management/common\ broker\ jca\ systests\ broker-plugins/access-control\ broker-plugins/firewall\ broker-plugins/management-http\ broker-plugins/management-jmx
! if [ $? -ne 0 ]; then
! exit 1
! fi
# blacklisted jars are either provided by the Requires: or not needed.
BLACKLIST="slf4j qpid-client-tests qpid-all qpid-common-tests"
***************
*** 84,130 ****
cd ..
! install -dm 755 %{buildroot}%{_javadir}
! install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-client-%{version}.jar %{buildroot}%{_javadir}
! install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-client-%{version}-sources.jar %{buildroot}%{_javadir}
! install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-common-%{version}.jar %{buildroot}%{_javadir}
! install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-common-%{version}-sources.jar %{buildroot}%{_javadir}
!
! install -dm 755 %{buildroot}%{_javadir}/qpid-deps
! install -pm 644 %{qpid_src_dir}/java/build/lib/log4j-slf4j.jar %{buildroot}%{_javadir}/qpid-deps
! install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-deps-%{version}.jar %{buildroot}%{_javadir}/qpid-deps
# examples
! install -dm 755 %{buildroot}%{_docdir}/%{name}-%{version}/examples/org/apache/qpid/example/
install -pm 644 %{qpid_src_dir}/java/client/example/src/main/java/org/apache/qpid/example/*.java \
! %{buildroot}%{_docdir}/%{name}-%{version}/examples/org/apache/qpid/example/
install -pm 644 %{qpid_src_dir}/java/client/example/src/main/java/org/apache/qpid/example/hello.properties \
! %{buildroot}%{_docdir}/%{name}-%{version}/examples/org/apache/qpid/example/
install -pm 644 %{qpid_src_dir}/java/client/example/example.log4j \
! %{buildroot}%{_docdir}/%{name}-%{version}/examples/
install -pm 755 %{qpid_src_dir}/java/client/example/bin/run_example.sh \
! %{buildroot}%{_docdir}/%{name}-%{version}/examples/
%clean
rm -rf %{buildroot}
%files common
! %defattr(-,root,root,-)
! %{_javadir}/qpid-deps/
! %{_javadir}/qpid-common-%{version}.jar
! %{_javadir}/qpid-common-%{version}-sources.jar
! %doc ../%{qpid_src_dir}/java/resources/LICENSE
! %doc ../%{qpid_src_dir}/java/resources/NOTICE
%files client
! %defattr(-,root,root,-)
! %{_javadir}/qpid-client-%{version}.jar
! %{_javadir}/qpid-client-%{version}-sources.jar
%files example
! %defattr(-,root,root,-)
! %{_docdir}/%{name}-%{version}/examples/
%changelog
* Thu Sep 6 2012 Irina Boverman <iboverma@redhat.com> - 0.18-2
--- 128,249 ----
cd ..
! install -dm 755 %{buildroot}%{_awips2_directory}/lib/opt
! install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-client-%{version}.jar \
! %{buildroot}%{_awips2_directory}/lib/opt
! install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-common-%{version}.jar \
! %{buildroot}%{_awips2_directory}/lib/opt
! install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-broker-%{version}.jar \
! %{buildroot}%{_awips2_directory}/lib/opt
! install -pm 644 %{qpid_src_dir}/java/build/lib/qpid-management-common-%{version}.jar \
! %{buildroot}%{_awips2_directory}/lib/opt
! install -pm 644 %{qpid_src_dir}/java/build/lib/plugins/qpid-broker-plugins-management-jmx-%{version}.jar \
! %{buildroot}%{_awips2_directory}/lib/opt
! install -pm 644 %{qpid_src_dir}/java/build/lib/plugins/qpid-broker-plugins-access-control-%{version}.jar \
! %{buildroot}%{_awips2_directory}/lib/opt
! install -pm 644 %{qpid_src_dir}/java/build/lib/plugins/qpid-broker-plugins-firewall-%{version}.jar \
! %{buildroot}%{_awips2_directory}/lib/opt
! install -pm 644 %{qpid_src_dir}/java/build/lib/plugins/qpid-broker-plugins-management-http-%{version}.jar \
! %{buildroot}%{_awips2_directory}/lib/opt
!
! # scripts for broker
! install -dm 755 %{buildroot}%{_awips2_directory}/bin
! install -pm 644 %{qpid_src_dir}/java/build/bin/* %{buildroot}%{_awips2_directory}/bin
! # install the wrapper script
! install -pm 644 %SOURCE7 %{buildroot}%{_awips2_directory}/bin
! # add the yajsw distribution
! tar -xf %SOURCE9 -C %{buildroot}%{_awips2_directory}/bin
!
! # wrapper configuration
! install -dm 755 %{buildroot}%{_awips2_directory}/conf
! install -pm 644 %SOURCE8 %{buildroot}%{_awips2_directory}/conf
!
! # service script
! mkdir -p %{buildroot}/etc/init.d
! install -pm 755 %SOURCE5 %{buildroot}/etc/init.d
! # logs directory
! mkdir -p %{buildroot}%{_awips2_directory}/log
!
! # qpid configuration
! install -dm 755 %{buildroot}%{_awips2_directory}/etc
! install -pm 644 %{qpid_src_dir}/java/broker/etc/* \
! %{buildroot}%{_awips2_directory}/etc
! # overwrite the default configuration with the AWIPS II configuration
! install -pm 644 %SOURCE3 %{buildroot}%{_awips2_directory}/etc
! install -pm 644 %SOURCE4 %{buildroot}%{_awips2_directory}/etc
!
! # overwrite the default log4j configuration with the AWIPS II log4j configuration
! install -pm 644 %SOURCE6 %{buildroot}%{_awips2_directory}/etc
!
! # foss dependencies
! install -dm 755 %{buildroot}%{_awips2_directory}/lib/opt/qpid-deps
! install -pm 644 %{qpid_src_dir}/java/lib/required/*.jar \
! %{buildroot}%{_awips2_directory}/lib/opt/qpid-deps
!
! # license & notice
! install -pm 644 %{qpid_src_dir}/java/resources/LICENSE \
! %{buildroot}%{_awips2_directory}
! install -pm 644 %{qpid_src_dir}/java/resources/NOTICE \
! %{buildroot}%{_awips2_directory}
# examples
! install -dm 755 %{buildroot}%{_awips2_directory}/doc/%{name}-%{version}/examples/org/apache/qpid/example/
install -pm 644 %{qpid_src_dir}/java/client/example/src/main/java/org/apache/qpid/example/*.java \
! %{buildroot}%{_awips2_directory}/doc/%{name}-%{version}/examples/org/apache/qpid/example/
install -pm 644 %{qpid_src_dir}/java/client/example/src/main/java/org/apache/qpid/example/hello.properties \
! %{buildroot}%{_awips2_directory}/doc/%{name}-%{version}/examples/org/apache/qpid/example/
install -pm 644 %{qpid_src_dir}/java/client/example/example.log4j \
! %{buildroot}%{_awips2_directory}/doc/%{name}-%{version}/examples/
install -pm 755 %{qpid_src_dir}/java/client/example/bin/run_example.sh \
! %{buildroot}%{_awips2_directory}/doc/%{name}-%{version}/examples/
%clean
rm -rf %{buildroot}
%files common
! %defattr(-,awips,fxalpha,-)
! %dir /awips2/qpid
! %dir /awips2/qpid/lib
! %dir /awips2/qpid/lib/opt
! /awips2/qpid/lib/opt/qpid-common-%{version}.jar
! /awips2/qpid/lib/opt/qpid-management-common-%{version}.jar
! %dir /awips2/qpid/lib/opt/qpid-deps
! /awips2/qpid/lib/opt/qpid-deps/*
! %doc /awips2/qpid/LICENSE
! %doc /awips2/qpid/NOTICE
%files client
! %defattr(-,awips,fxalpha,-)
! %dir /awips2/qpid
! %dir /awips2/qpid/lib
! %dir /awips2/qpid/lib/opt
! /awips2/qpid/lib/opt/qpid-client-%{version}.jar
!
! %files broker
! %defattr(-,awips,fxalpha,-)
! %dir /awips2/qpid
! %dir /awips2/qpid/lib
! %dir /awips2/qpid/lib/opt
! /awips2/qpid/lib/opt/qpid-broker-%{version}.jar
! /awips2/qpid/lib/opt/qpid-broker-plugins-management-jmx-%{version}.jar
! /awips2/qpid/lib/opt/qpid-broker-plugins-access-control-%{version}.jar
! /awips2/qpid/lib/opt/qpid-broker-plugins-firewall-%{version}.jar
! /awips2/qpid/lib/opt/qpid-broker-plugins-management-http-%{version}.jar
! %dir /awips2/qpid/log
! %dir /awips2/qpid/conf
! /awips2/qpid/conf/*
! %defattr(755,awips,fxalpha,755)
! %dir /awips2/qpid/bin
! /awips2/qpid/bin/*
! %dir /awips2/qpid/etc
! /awips2/qpid/etc/*
! %defattr(755,root,root,755)
! /etc/init.d/qpidd
%files example
! %defattr(-,awips,fxalpha,-)
! /awips2/qpid/doc/%{name}-%{version}/examples/
%changelog
* Thu Sep 6 2012 Irina Boverman <iboverma@redhat.com> - 0.18-2

View file

@ -1,122 +0,0 @@
%define _build_arch %(uname -i)
%define _qpid_version 0.18
%define _qpid_build_loc %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%global qpid_src_dir qpid-%{version}
#
# AWIPS II QPID native Spec File
#
Name: awips2-qpid-lib
Summary: AWIPS II QPID Native Library Distribution
Version: %{_qpid_version}
Release: 1.el6
Group: AWIPSII
BuildRoot: %{_build_root}
BuildArch: %{_build_arch}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
Source0: %{qpid_src_dir}.tar.gz
AutoReq: no
BuildRequires: awips2-python
provides: awips2-qpid-lib
%description
AWIPS II QPID Lib Distribution - Contains the qpid shared libraries and
header files for qpid %{_qpid_version}.
%prep
# Ensure that a "buildroot" has been specified.
if [ "%{_build_root}" = "" ]; then
echo "ERROR: A BuildRoot has not been specified."
echo "FATAL: Unable to Continue ... Terminating."
exit 1
fi
if [ -d %{_build_root} ]; then
rm -rf %{_build_root}
fi
if [ -d %{_qpid_build_loc} ]; then
rm -rf %{_qpid_build_loc}
fi
mkdir -p %{_qpid_build_loc}
if [ $? -ne 0 ]; then
exit 1
fi
cp -v %SOURCE0 %{_qpid_build_loc}
if [ $? -ne 0 ]; then
exit 1
fi
pushd . > /dev/null 2>&1
cd %{_qpid_build_loc}
tar -xvf %SOURCE0
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null 2>&1
%build
pushd . > /dev/null 2>&1
cd %{_qpid_build_loc}/%{qpid_src_dir}/cpp
./bootstrap
if [ $? -ne 0 ]; then
exit 1
fi
./configure --prefix=%{_qpid_build_loc}/awips2/qpid --without-sasl
if [ $? -ne 0 ]; then
exit 1
fi
make
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null 2>&1
%install
/bin/mkdir -p %{_qpid_build_loc}/awips2/qpid
if [ $? -ne 0 ]; then
exit 1
fi
pushd . > /dev/null 2>&1
cd %{_qpid_build_loc}/%{qpid_src_dir}/cpp
make install
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null 2>&1
/bin/mkdir -p %{_build_root}/awips2/qpid
if [ $? -ne 0 ]; then
exit 1
fi
# copy qpid lib and include directories.
/bin/cp -rv %{_qpid_build_loc}/awips2/qpid/lib \
%{_build_root}/awips2/qpid
/bin/cp -rv %{_qpid_build_loc}/awips2/qpid/include \
%{_build_root}/awips2/qpid
%pre
%post
%preun
%postun
%clean
rm -rf ${RPM_BUILD_ROOT}
rm -rf %{_qpid_build_loc}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/qpid
%dir /awips2/qpid/lib
/awips2/qpid/lib/*
%dir /awips2/qpid/include
/awips2/qpid/include/*

View file

@ -1,73 +0,0 @@
#!/bin/bash
# Verify that the workspace has been specified
if [ -z ${WORKSPACE} ]; then
echo "Error: the location of the baseline workspace must be specified using the WORKSPACE environment variable."
exit 1
fi
if [ -z ${AWIPSII_BUILD_ROOT} ]; then
export AWIPSII_BUILD_ROOT="/tmp/${USER}/awips-component"
echo "INFO: using default build root - ${AWIPSII_BUILD_ROOT}."
fi
__SPECS=qpid-java.spec
__SPECS_PATCH0=qpid-java.spec.patch0
# apply the rpm specification patch
cd ../SPECS
if [ $? -ne 0 ]; then
exit 1
fi
patch -p1 -i ${__SPECS_PATCH0}
if [ $? -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd ../
export TOPDIR=`pwd`
# create the rpm directory structure
if [ -d ${TOPDIR}/BUILD ]; then
rm -rf ${TOPDIR}/BUILD
if [ $? -ne 0 ]; then
exit 1
fi
fi
mkdir ${TOPDIR}/BUILD
if [ -d ${TOPDIR}/RPMS ]; then
rm -rf ${TOPDIR}/RPMS
if [ $? -ne 0 ]; then
exit 1
fi
fi
mkdir ${TOPDIR}/RPMS
if [ -d ${TOPDIR}/SRPMS ]; then
rm -rf ${TOPDIR}/SRPMS
if [ $? -ne 0 ]; then
exit 1
fi
fi
mkdir ${TOPDIR}/SRPMS
# build the rpm
rpmbuild -ba \
--define "_topdir ${TOPDIR}" \
--define "_baseline_workspace ${WORKSPACE}" \
SPECS/${__SPECS}
if [ $? -ne 0 ]; then
exit 1
fi
rpmbuild -ba \
--define "_topdir ${TOPDIR}" \
--define "_baseline_workspace ${WORKSPACE}" \
--define "_build_root ${AWIPSII_BUILD_ROOT}" \
--buildroot ${AWIPSII_BUILD_ROOT} \
SPECS/qpid-lib.spec
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null
exit 0

View file

@ -1,68 +0,0 @@
diff -crB a/qpid/java/build.deps b/qpid/java/build.deps
*** a/qpid/java/build.deps 2014-04-13 09:12:12.000000000 -0500
--- b/qpid/java/build.deps 2014-10-28 09:14:30.121201558 -0500
***************
*** 17,29 ****
# under the License.
#
! commons-beanutils-core=lib/required/commons-beanutils-core-1.8.3.jar
commons-cli=lib/required/commons-cli-1.2.jar
! commons-codec=lib/required/commons-codec-1.6.jar
commons-collections=lib/required/commons-collections-3.2.1.jar
commons-configuration=lib/required/commons-configuration-1.8.jar
commons-digester=lib/required/commons-digester-1.8.1.jar
! commons-lang=lib/required/commons-lang-2.6.jar
commons-logging=lib/required/commons-logging-1.1.1.jar
bcel=lib/required/bcel-5.2.jar
--- 17,29 ----
# under the License.
#
! commons-beanutils-core=lib/required/commons-beanutils-1.8.3.jar
commons-cli=lib/required/commons-cli-1.2.jar
! commons-codec=lib/required/commons-codec-1.4.jar
commons-collections=lib/required/commons-collections-3.2.1.jar
commons-configuration=lib/required/commons-configuration-1.8.jar
commons-digester=lib/required/commons-digester-1.8.1.jar
! commons-lang=lib/required/commons-lang-2.3.jar
commons-logging=lib/required/commons-logging-1.1.1.jar
bcel=lib/required/bcel-5.2.jar
***************
*** 35,41 ****
geronimo-jta=lib/required/geronimo-jta_1.1_spec-1.1.1.jar
geronimo-kernel=lib/required/geronimo-kernel-2.2.1.jar
geronimo-openejb=lib/required/geronimo-ejb_3.0_spec-1.0.1.jar
! geronimo-servlet=lib/required/geronimo-servlet_3.0_spec-1.0.jar
junit=lib/required/junit-3.8.1.jar
mockito-all=lib/required/mockito-all-1.9.0.jar
--- 35,41 ----
geronimo-jta=lib/required/geronimo-jta_1.1_spec-1.1.1.jar
geronimo-kernel=lib/required/geronimo-kernel-2.2.1.jar
geronimo-openejb=lib/required/geronimo-ejb_3.0_spec-1.0.1.jar
! geronimo-servlet=lib/required/geronimo-servlet_2.5_spec-1.1.2.jar
junit=lib/required/junit-3.8.1.jar
mockito-all=lib/required/mockito-all-1.9.0.jar
***************
*** 60,67 ****
dojo-version=1.9.1
dojo=lib/required/dojo-${dojo-version}.zip
! jackson-core=lib/required/jackson-core-asl-1.9.0.jar
! jackson-mapper=lib/required/jackson-mapper-asl-1.9.0.jar
commons-configuration.libs = ${commons-beanutils-core} ${commons-digester} \
${commons-codec} ${commons-lang} ${commons-collections} ${commons-configuration}
--- 60,67 ----
dojo-version=1.9.1
dojo=lib/required/dojo-${dojo-version}.zip
! jackson-core=lib/required/jackson-core-asl-1.7.3.jar
! jackson-mapper=lib/required/jackson-mapper-asl-1.7.3.jar
commons-configuration.libs = ${commons-beanutils-core} ${commons-digester} \
${commons-codec} ${commons-lang} ${commons-collections} ${commons-configuration}

View file

@ -1,10 +0,0 @@
org.apache.commons.cli/commons-cli-1.2.jar
org.apache.commons.beanutils/commons-beanutils-1.8.3.jar
org.apache.commons.digester/commons-digester-1.8.1.jar
org.apache.commons.codec/commons-codec-1.4.jar
org.apache.commons.lang/commons-lang-2.3.jar
org.apache.commons.collections/commons-collections-3.2.jar
org.apache.commons.digester/commons-digester-1.8.1.jar
org.codehaus.jackson/jackson-core-asl-1.7.3.jar
org.codehaus.jackson/jackson-mapper-asl-1.7.3.jar
org.mockito/mockito-all-1.9.0.jar

View file

@ -1,19 +0,0 @@
*** a/qpid/java/build.xml 2014-05-13 04:58:21.000000000 -0500
--- b/qpid/java/build.xml 2014-10-27 14:53:46.434396511 -0500
***************
*** 179,185 ****
<touch file="${qpid.jar}"/>
</target>
! <target name="build" depends="retrieve-dependencies" description="build the project">
<iterate target="build"/>
<antcall target="manifest"/>
<echo>
--- 179,185 ----
<touch file="${qpid.jar}"/>
</target>
! <target name="build" description="build the project">
<iterate target="build"/>
<antcall target="manifest"/>
<echo>

View file

@ -1,96 +0,0 @@
From 4acdbf975c076c2c49e7e2436065ca7d18dfab20 Mon Sep 17 00:00:00 2001
From: rajith <rajith@redhat.com>
Date: Wed, 16 Jun 2010 16:37:11 -0400
Subject: [PATCH 02/52] These two files are not present in upstream and we currently carry them as a patch.
The reason being that the run_example.sh is tailored specific for the linux env.
Including the example.log4j depends on how the release artefacts will look like for the 0.7 qpid release.
---
qpid/java/client/example/bin/run_example.sh | 43 +++++++++++++++++++++++++++
qpid/java/client/example/example.log4j | 27 +++++++++++++++++
2 files changed, 70 insertions(+), 0 deletions(-)
create mode 100644 qpid/java/client/example/bin/run_example.sh
create mode 100644 qpid/java/client/example/example.log4j
diff --git a/qpid/java/client/example/bin/run_example.sh b/qpid/java/client/example/bin/run_example.sh
new file mode 100644
index 0000000..5bd0e99
--- /dev/null
+++ b/qpid/java/client/example/bin/run_example.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# set the CLASSPATH
+QPID_DEPS=`find /usr/share/java/qpid-deps/*.jar | tr '\n' ":"`
+QPID_JARS=`find /usr/share/java -name 'qpid-client*.jar' -or -name 'qpid-common*.jar' | tr '\n' ":"`
+LOG4J="/usr/share/java/log4j.jar"
+QPID_CLASSPATH=$QPID_DEPS$LOG4J:$QPID_JARS
+
+# compile the samples
+javac -cp "$QPID_CLASSPATH" -sourcepath "$PWD" -d . `find $PWD -name '*.java'`
+
+# Add output classes to CLASSPATH
+QPID_CLASSPATH="$PWD:$QPID_CLASSPATH"
+
+
+# Check if the user supplied a sample classname
+if test "'x$1'" = "'x'"
+then
+ echo "No sample classname specified"
+ exit;
+else
+ java -cp $QPID_CLASSPATH -Dlog4j.configuration=example.log4j "$@"
+fi
+
diff --git a/qpid/java/client/example/example.log4j b/qpid/java/client/example/example.log4j
new file mode 100644
index 0000000..50b4ed2
--- /dev/null
+++ b/qpid/java/client/example/example.log4j
@@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+log4j.logger.org.apache.qpid=WARN, console
+log4j.additivity.org.apache.qpid=false
+
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.Threshold=all
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n

Some files were not shown because too many files have changed in this diff Show more