Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MATP-1102 Merge New Photon UI #1087

Merged
merged 47 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c033fe4
MATP-1102 Initial add of JavaFX work
colinduplantis Feb 26, 2023
4fb47aa
MATP-1102 Directory shuffle
colinduplantis Feb 26, 2023
d32731b
MATP-1102 Clean up workspace format, add footer
colinduplantis Feb 26, 2023
86fe85e
MATP-1102 Checkpoint commit, add order ticket and application icons
colinduplantis Feb 28, 2023
dade618
MATP-1102 Add icon to windows
colinduplantis Feb 28, 2023
b8bb2c8
MATP-1102 Add support for window close
colinduplantis Feb 28, 2023
c2dba57
MATP-1102 Fix problems with application icon and work on windows mana…
colinduplantis Feb 28, 2023
326ab76
MATP-1102 Rework Photon notifications
colinduplantis Mar 1, 2023
99a303a
MATP-1102 Switch to CSS dark mode, disable style service, update desk…
colinduplantis Mar 1, 2023
f7cb38b
MATP-1102 Add Reports View, add new images
colinduplantis Mar 2, 2023
72db445
MATP-1102 Add Open Orders View, make abstract FIX messages view
colinduplantis Mar 2, 2023
e2b85a9
MATP-1102 Add Fills View
colinduplantis Mar 2, 2023
9f6a538
MATP-1102 Add Average Price View
colinduplantis Mar 3, 2023
6bca924
MATP-1102 Work on login
colinduplantis Mar 3, 2023
158ee5f
MATP-1102 Add FIX session view
colinduplantis Mar 3, 2023
6ff8bff
MATP-1102 Work on FIX Session wizard
colinduplantis Mar 4, 2023
a905b7e
MATP-1102 Continue work on FIX session wizard, adjust size of Logon d…
colinduplantis Mar 5, 2023
ab9ae0b
MATP-1102 Update some issues with the FIX session view
colinduplantis Mar 6, 2023
5f47f61
MATP-1102 Add User View
colinduplantis Mar 6, 2023
cd3547a
MATP-1102 Add Permissions and Roles Views
colinduplantis Mar 6, 2023
22a3ac0
MATP-1102 Switch to SVG images
colinduplantis Mar 6, 2023
851bd4e
MATP-1102 Update server status indicator on the workspace toolbar
colinduplantis Mar 7, 2023
54ddad8
MATP-1102 Add market data list view, work out some issues with market…
colinduplantis Mar 8, 2023
2eaeb93
MATP-1102 Work on market data detail view
colinduplantis Mar 8, 2023
009711f
MATP-1102 Remove Web UI artifacts, some work on market data detail
colinduplantis Mar 9, 2023
cbce27a
MATP-1102 Add Strategy Subsystem
colinduplantis Mar 9, 2023
59fc57c
MATP-1102 Continue work on strategy service, some pom cleanup, upgrad…
colinduplantis Mar 10, 2023
c851001
MATP-1102 Work on strategy backend and view
colinduplantis Mar 10, 2023
987bff9
MATP-1102 Strategy File Upload
colinduplantis Mar 11, 2023
acae707
MATP-1102 Strategy File Upload
colinduplantis Mar 11, 2023
b12427d
MATP-1102 Work on uploading strategies
colinduplantis Mar 11, 2023
d791d48
MATP-1102 Work on transfering strategies and firing them off
colinduplantis Mar 11, 2023
ef4fd23
MATP-1102 Work on strategy upload cycle
colinduplantis Mar 12, 2023
993a15e
MATP-1102 Change upload to use name, add cancel strategy upload permi…
colinduplantis Mar 12, 2023
12f3c1e
MATP-1102 Add strategy events and event listeners, send updates from …
colinduplantis Mar 13, 2023
4634f54
MATP-1102 Manage uploaded strategies, move to correct directories, ma…
colinduplantis Mar 13, 2023
e38c8ce
MATP-1102 Add start/stop behaviors
colinduplantis Mar 13, 2023
c645c7c
MATP-1102 Add sample strategy, start strategy work
colinduplantis Mar 14, 2023
6697b2b
MATP-1102 Add strategy runtime update event
colinduplantis Mar 14, 2023
93b2213
MATP-1102 Add Strategy Messages
colinduplantis Mar 16, 2023
33c7f91
MATP-1102 Fixed some issues with strategy message display, removed ru…
colinduplantis Mar 16, 2023
e848dda
MATP-1102 Add strategy message events
colinduplantis Mar 16, 2023
8db4f69
MATP-1102 Speculative work on changing window manager
colinduplantis Mar 18, 2023
999abc2
MATP-1102 Update new windows manager
colinduplantis Mar 18, 2023
f26c6a7
MATP-1102 Partial refactoring of WindowManagerService
colinduplantis Mar 20, 2023
415285e
MATP-1102 Complete refactoring on WindowManagerService
colinduplantis Mar 20, 2023
8798f70
Merge pull request #1085 from Marketcetera/MATP-1102-workspace
colinduplantis Mar 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package org.marketcetera.admin.impl;

import java.util.Comparator;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import org.apache.commons.lang3.builder.CompareToBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.marketcetera.admin.Permission;
import org.marketcetera.persist.NDEntityBase;

Expand All @@ -20,7 +25,7 @@
@XmlAccessorType(XmlAccessType.NONE)
public class SimplePermission
extends NDEntityBase
implements Permission
implements Permission,Comparator<SimplePermission>
{
/**
* Create a new SimplePermission instance.
Expand Down Expand Up @@ -48,5 +53,38 @@ public String toString()
builder.append("SimplePermission [name=").append(getName()).append(", description=").append(getDescription()).append("]");
return builder.toString();
}
/* (non-Javadoc)
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
*/
@Override
public int compare(SimplePermission inO1,
SimplePermission inO2)
{
return new CompareToBuilder().append(inO1.getName(),inO2.getName()).toComparison();

}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode()
{
return new HashCodeBuilder().append(getName()).toHashCode();
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj)
{
if (this == obj) {
return true;
}
if (!(obj instanceof SimplePermission)) {
return false;
}
SimplePermission other = (SimplePermission) obj;
return new EqualsBuilder().append(other.getName(),getName()).isEquals();
}
private static final long serialVersionUID = 3085570489230392139L;
}
4 changes: 0 additions & 4 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.sirocco</groupId>
<artifactId>sirocco-text-table-formatter</artifactId>
Expand Down
12 changes: 12 additions & 0 deletions core/src/main/java/org/marketcetera/core/BaseClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ void stop()
* @return a <code>boolean</code> value
*/
boolean isRunning();
/**
* Add the given client status listener.
*
* @param inListener a <code>ClientStatusListener</code> value
*/
void addClientStatusListener(ClientStatusListener inListener);
/**
* Remove the given client status listener.
*
* @param inListener a <code>ClientStatusListener</code> value
*/
void removeClientStatusListener(ClientStatusListener inListener);
/* (non-Javadoc)
* @see java.io.Closeable#close()
*/
Expand Down
20 changes: 20 additions & 0 deletions core/src/main/java/org/marketcetera/core/ClientStatusListener.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.marketcetera.core;

/* $License$ */

/**
* Registers for changes in the availability of a client.
*
* @author <a href="mailto:colin@marketcetera.com">Colin DuPlantis</a>
* @version $Id$
* @since $Release$
*/
public interface ClientStatusListener
{
/**
* Receive the client status upon change.
*
* @param isAvailable a <code>boolean</code> value
*/
void receiveClientStatus(boolean isAvailable);
}
40 changes: 40 additions & 0 deletions core/src/main/java/org/marketcetera/core/PlatformServices.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
package org.marketcetera.core;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.MathContext;
import java.math.RoundingMode;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.UUID;

Expand Down Expand Up @@ -50,6 +55,38 @@ public void start()
"Starting {}",
getServiceName(getClass()));
}
public static String getFileChecksum(File inFile)
throws NoSuchAlgorithmException, IOException
{
return getFileChecksum(MessageDigest.getInstance("SHA-256"),
inFile);
}
public static String getFileChecksum(MessageDigest inDigest,
File inFile)
throws IOException
{
//Get file input stream for reading the file content
FileInputStream fis = new FileInputStream(inFile);
//Create byte array to read data in chunks
byte[] byteArray = new byte[1024];
int bytesCount = 0;
//Read file data and update in message digest
while ((bytesCount = fis.read(byteArray)) != -1) {
inDigest.update(byteArray, 0, bytesCount);
};
//close the stream; We don't need it now.
fis.close();
//Get the hash's bytes
byte[] bytes = inDigest.digest();
//This bytes[] has bytes in decimal format;
//Convert it to hexadecimal format
StringBuilder sb = new StringBuilder();
for(int i=0; i< bytes.length ;i++) {
sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));
}
//return complete hash
return sb.toString();
}
/**
* Split the given value into its components where each component starts with a capital letter.
*
Expand Down Expand Up @@ -272,4 +309,7 @@ public static Instrument getInstrument(String inFullSymbol)
* hostname value
*/
private static String hostname;
public static final CellStyle cellStyleRightAlign = new CellStyle(HorizontalAlign.right);
public static final CellStyle cellStyleLeftAlign = new CellStyle(HorizontalAlign.left);
public static final CellStyle cellStyleCenterAlign = new CellStyle(HorizontalAlign.center);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.annotation.concurrent.NotThreadSafe;

import org.marketcetera.core.PlatformServices;
import org.marketcetera.util.log.SLF4JLoggerProxy;

/* $License$ */
Expand All @@ -21,6 +23,16 @@ public class MultiMethodNotificationExecutor
extends AbstractNotificationExecutor
implements NotificationExecutor
{
/**
* Validate and start the object.
*/
@PostConstruct
public void start()
{
SLF4JLoggerProxy.info(this,
"Starting {}",
PlatformServices.getServiceName(NotificationExecutor.class));
}
/* (non-Javadoc)
* @see com.marketcetera.ramius.strategy.NotificationExecutor#notify(org.marketcetera.core.notifications.INotification)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* $License$ */

/**
*
* Provides a method for issuing notifications.
*
* @author <a href="mailto:colin@marketcetera.com">Colin DuPlantis</a>
* @version $Id$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import org.joda.time.LocalDate;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.DateTimeFormatterBuilder;
import org.joda.time.format.PeriodFormatter;
import org.joda.time.format.PeriodFormatterBuilder;
import org.marketcetera.util.misc.ClassVersion;
import org.springframework.stereotype.Component;

Expand Down Expand Up @@ -138,4 +140,11 @@ public DateTime create(long inValue)
*/
public static final DateTimeFormatter WALLCLOCK_MINUTES = new DateTimeFormatterBuilder().append(HOUR).append(COLON).append(MINUTE).toFormatter().withZone(ZONE);
private static final DateTimeFormatter[] FORMATTERS = new DateTimeFormatter[] { FULL_SECONDS,WALLCLOCK_SECONDS,WALLCLOCK_MINUTES,WALLCLOCK_MILLISECONDS,US_DATE,INTL_DATE,FULL_MILLISECONDS_CONDENSED };
public static final PeriodFormatter periodFormatter = new PeriodFormatterBuilder().minimumPrintedDigits(2)
.appendYears().appendSeparator(":")
.appendMonths().appendSeparator(":")
.appendDays().appendSeparator(":").printZeroAlways()
.appendHours().appendSeparator(":")
.appendMinutes().appendSeparator(":")
.appendSeconds().toFormatter();
}
11 changes: 11 additions & 0 deletions core/src/main/java/org/marketcetera/persist/PageRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ public PageRequest(int inPage,
pageNumber = inPage;
pageSize = inSize;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
StringBuilder builder = new StringBuilder();
builder.append("PageRequest [pageNumber=").append(pageNumber).append(", pageSize=").append(pageSize)
.append(", sortOrder=").append(sortOrder).append("]");
return builder.toString();
}
/**
* page request which requests all data in a single page
*/
Expand Down
15 changes: 2 additions & 13 deletions fork/commons-csv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,8 @@
</properties>

<build>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
</instructions>
</configuration>
</plugin>
</plugins>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
</build>

<reporting>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public void removeMarketDataStatusListener(MarketDataRpc.RemoveMarketDataStatusL
private String buildRequestId(String inSessionId,
String inRequestId)
{
return new StringBuilder().append(inSessionId).append('-').append(inRequestId).toString();
return new StringBuilder().append("sessionId->").append(inSessionId).append("/requestId->").append(inRequestId).toString();
}
}
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.marketcetera.marketdata.service;

import java.util.Set;
import java.util.UUID;

import org.apache.commons.lang3.exception.ExceptionUtils;
import org.marketcetera.event.Event;
Expand Down Expand Up @@ -55,7 +54,7 @@ public void onMarketDataRequestEvent(MarketDataRequestEvent inEvent)
"Received {}",
inEvent);
String provider = inEvent.getMarketDataRequestProvider().orElse(null);
String requestId = UUID.randomUUID().toString(); // TODO does this need to be fixed? inEvent.getMarketDataRequestId();
String requestId = inEvent.getMarketDataRequestId();
if(provider == null) {
SLF4JLoggerProxy.debug(this,
"No provider requested, issuing request to all providers");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.util.Deque;
import java.util.List;
import java.util.Set;
import java.util.UUID;

import javax.annotation.PostConstruct;

Expand Down Expand Up @@ -91,6 +90,7 @@ public void reportMarketDataStatus(MarketDataStatus inMarketDataStatus)
PlatformServices.handleException(this,
"Reporting market data status",
e);
removeMarketDataStatusListener(listener);
}
}
}
Expand All @@ -110,7 +110,7 @@ public String request(MarketDataRequest inRequest,
MarketDataListener inMarketDataListener)
{
String provider = inRequest.getProvider();
String requestId = UUID.randomUUID().toString();
String requestId = inRequest.getRequestId();
MarketDataRequestEvent requestEvent = new SimpleMarketDataRequestEvent(inRequest,
requestId,
provider,
Expand Down
14 changes: 0 additions & 14 deletions modules/cep/esper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,4 @@
</dependency>
</dependencies>

<build>
<plugins>

<!-- Configure Eclipse IDE metadata. -->
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<pde>true</pde>
<manifest>null</manifest>
<resolveDependencies>false</resolveDependencies>
</configuration>
</plugin>
</plugins>
</build>
</project>
10 changes: 0 additions & 10 deletions modules/cep/system/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@
</execution>
</executions>
</plugin>

<!-- Configure Eclipse IDE metadata. -->
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<pde>true</pde>
<manifest>null</manifest>
<resolveDependencies>false</resolveDependencies>
</configuration>
</plugin>
</plugins>
</build>
</project>
14 changes: 0 additions & 14 deletions modules/marketdata/bogus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,4 @@
</dependency>
</dependencies>

<build>
<plugins>

<!-- Configure Eclipse IDE metadata. -->
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<pde>true</pde>
<manifest>null</manifest>
<resolveDependencies>false</resolveDependencies>
</configuration>
</plugin>
</plugins>
</build>
</project>
14 changes: 0 additions & 14 deletions modules/misc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,4 @@
</dependency>
</dependencies>

<build>
<plugins>

<!-- Configure Eclipse IDE metadata. -->
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<pde>true</pde>
<manifest>null</manifest>
<resolveDependencies>false</resolveDependencies>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading