Skip to content

Commit

Permalink
US11103 Update Network Server to use PESC centric workflow. Provide t…
Browse files Browse the repository at this point in the history
…he ability to create a "Pesc Transcript Request" to be sent with document.
  • Loading branch information
sallen-parchment committed Aug 19, 2016
1 parent c6cedfd commit 25c8062
Show file tree
Hide file tree
Showing 52 changed files with 29,520 additions and 97 deletions.
18 changes: 14 additions & 4 deletions networkServer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>

<pesc.sdk.version>0.0.1-SNAPSHOT</pesc.sdk.version>
<docker.image.prefix>edex</docker.image.prefix>

</properties>

<dependencies>
Expand Down Expand Up @@ -56,6 +55,14 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>


<!-- database -->
Expand Down Expand Up @@ -131,8 +138,11 @@
<artifactId>json</artifactId>
<version>20160212</version>
</dependency>


<dependency>
<groupId>org.pesc</groupId>
<artifactId>pesc-sdk</artifactId>
<version>${pesc.sdk.version}</version>
</dependency>
</dependencies>

<build>
Expand Down
32 changes: 32 additions & 0 deletions networkServer/src/main/java/org/pesc/cds/config/CacheConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package org.pesc.cds.config;

import com.google.common.cache.CacheBuilder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.guava.GuavaCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

/**
* Created by sallen on 8/15/16.
*/
@Configuration
@EnableCaching
public class CacheConfig extends CachingConfigurerSupport {
public static final String PREFIX = "NetworkServer_";
@Value("${cache.manager.expire.time.minutes:120}")
private Integer expireTimeMinutes;
@Value("${cache.manager.maximum.size:1000}")
private Integer maximumSize;

@Bean
public CacheManager cacheManager(){
GuavaCacheManager guavaCacheManager = new GuavaCacheManager();
guavaCacheManager.setCacheBuilder(CacheBuilder.newBuilder().expireAfterAccess(expireTimeMinutes, TimeUnit.MINUTES).maximumSize(maximumSize));
return guavaCacheManager;
}
}
45 changes: 45 additions & 0 deletions networkServer/src/main/java/org/pesc/cds/config/JaxbConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package org.pesc.cds.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;

/**
* Created by sallen on 7/27/16.
*/
@Configuration
public class JaxbConfig {

@Bean(name="transcriptRequestMarshaller")
public Jaxb2Marshaller transcriptRequestMarshaller(){
Jaxb2Marshaller transcriptRequestMarshaller = new Jaxb2Marshaller();
transcriptRequestMarshaller.setContextPath("org.pesc.sdk.message.transcriptrequest.v1_2.impl");
transcriptRequestMarshaller.setSchema(new ClassPathResource("xsd/pesc/TranscriptRequest_v1.2.0.xsd"));
return transcriptRequestMarshaller;
}

@Bean(name="DocumentInfoMarshaller")
public Jaxb2Marshaller DocumentInfoMarshaller(){
Jaxb2Marshaller DocumentInfoMarshaller = new Jaxb2Marshaller();
DocumentInfoMarshaller.setContextPath("org.pesc.sdk.message.documentinfo.v1_0.impl");
DocumentInfoMarshaller.setSchema(new ClassPathResource("xsd/pesc/DocumentInfo_v1.0.0.xsd"));
return DocumentInfoMarshaller;
}

@Bean(name="functionalAcknowledgmentMarshaller")
public Jaxb2Marshaller functionalAcknowledgmentMarshaller(){
Jaxb2Marshaller functionalAcknowledgmentMarshaller = new Jaxb2Marshaller();
functionalAcknowledgmentMarshaller.setContextPath("org.pesc.sdk.message.functionalacknowledgment.v1_0.impl");
functionalAcknowledgmentMarshaller.setSchema(new ClassPathResource("xsd/pesc/FunctionalAcknowledgment_v1.0.0.xsd"));
return functionalAcknowledgmentMarshaller;
}

@Bean(name="transcriptResponseMarshaller")
public Jaxb2Marshaller transcriptResponseMarshaller(){
Jaxb2Marshaller transcriptResponseMarshaller = new Jaxb2Marshaller();
transcriptResponseMarshaller.setContextPath("org.pesc.sdk.message.transcriptresponse.v1_2.impl");
transcriptResponseMarshaller.setSchema(new ClassPathResource("xsd/pesc/TranscriptResponse_v1.2.0.xsd"));
return transcriptResponseMarshaller;
}
}
11 changes: 11 additions & 0 deletions networkServer/src/main/java/org/pesc/cds/domain/Transaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public class Transaction {
@Column(name="file_path")
private String filePath;

@Column(name="request_file_path")
private String requestFilePath;

@Column(name="ack_url")
private String ackURL;

Expand Down Expand Up @@ -128,6 +131,14 @@ public void setFilePath(String filePath) {
this.filePath = filePath;
}

public String getRequestFilePath() {
return requestFilePath;
}

public void setRequestFilePath(String requestFilePath) {
this.requestFilePath = requestFilePath;
}

public String getOperation() {
return operation;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package org.pesc.cds.model;

/**
* Created by sallen on 8/1/16.
*/
public enum SchoolCodeType {
ACT, ATP, FICE, IPEDS, OPEID;
}
Loading

0 comments on commit 25c8062

Please sign in to comment.