-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
*.class | ||
.mtj.tmp/ | ||
*.jar | ||
*.war | ||
*.ear | ||
hs_err_pid* | ||
target/ | ||
.metadata | ||
.classpath | ||
.project | ||
.settings/ | ||
bin/ | ||
tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.loadpath | ||
.DS_Store | ||
*.log | ||
*.zip | ||
*.logs | ||
*.ucls | ||
*.useq | ||
/PacketStore/* | ||
/PreRegPacketStore/* | ||
reg/* | ||
/test-output/ | ||
/reg/ | ||
/derby.log |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>mosip.pt</groupId> | ||
<artifactId>IDA_PtDataUtil</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<dependencies> | ||
|
||
<!-- https://mvnrepository.com/artifact/junit/junit --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<!-- https://mvnrepository.com/artifact/com.opencsv/opencsv --> | ||
<dependency> | ||
<groupId>com.opencsv</groupId> | ||
<artifactId>opencsv</artifactId> | ||
<version>4.1</version> | ||
</dependency> | ||
|
||
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson --> | ||
<dependency> | ||
<groupId>com.google.code.gson</groupId> | ||
<artifactId>gson</artifactId> | ||
<version>2.8.5</version> | ||
</dependency> | ||
|
||
<!-- Below dependencies are for loading data from a YML file --> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.dataformat</groupId> | ||
<artifactId>jackson-dataformat-yaml</artifactId> | ||
<version>2.3.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.2.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
<version>3.4</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.yaml</groupId> | ||
<artifactId>snakeyaml</artifactId> | ||
<version>1.21</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.6.1</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
<encoding>UTF-8</encoding> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import java.io.FileNotFoundException; | ||
|
||
import com.google.gson.Gson; | ||
|
||
import pt.util.PropertiesUtil; | ||
import pt.util.SequentialNumberGenerator; | ||
import worker.AddressAuthDataGenerator; | ||
import worker.AddressAuthDataUpdater; | ||
import worker.FailedRequestWorker; | ||
import worker.IdvIdExtractor; | ||
import worker.NameAuthDataUpdater; | ||
import worker.NameAuthdataGenerator; | ||
|
||
public class Main { | ||
|
||
private static final String CONFIG_FILE = "variables_config.properties"; | ||
|
||
// static Gson gson = new Gson(); | ||
|
||
public static void main(String[] args) { | ||
|
||
// new PropertiesUtil().loadProperties_debug(); | ||
Integer number = 100001; | ||
SequentialNumberGenerator.assignStartIndex(number); | ||
new PropertiesUtil().loadProperties(CONFIG_FILE); | ||
// PropertiesUtil.loadProperties(); | ||
//generateAddressAuthData(); | ||
// generateNameAuthRequest(); | ||
updateGeneratedAuthData(); | ||
// extractIdvId(); | ||
// System.lineSeparator(); | ||
// handleFailedRequests(); | ||
|
||
// new Util().currDD(); | ||
|
||
// String jsonFile = "/auth/demo_auth_data.json"; | ||
// DemoAuthEntity aE = JSONUtil.mapJSONToObject(jsonFile); | ||
// System.out.println(gson.toJson(aE)); | ||
|
||
} | ||
|
||
private static void handleFailedRequests() { | ||
|
||
int[] fileSuffix0 = { 855, 1020, 1193, 1609, 3655, 3746, 3815, 4312, 4795 }; | ||
int[] fileSuffix = { 1936, 1967 }; | ||
FailedRequestWorker worker = new FailedRequestWorker(); | ||
worker.processFailedRequests(fileSuffix); | ||
|
||
} | ||
|
||
private static void extractIdvId() { | ||
|
||
IdvIdExtractor vidExtractor = new IdvIdExtractor(); | ||
vidExtractor.extractIdvId(); | ||
|
||
} | ||
|
||
private static void updateGeneratedAuthData() { | ||
|
||
AddressAuthDataUpdater addressDataUpdater = new AddressAuthDataUpdater(); | ||
NameAuthDataUpdater nameDataUpdater = new NameAuthDataUpdater(); | ||
|
||
try { | ||
addressDataUpdater.updateAdressAuthData(); | ||
nameDataUpdater.updateNameAuthData(); | ||
} catch (FileNotFoundException e) { | ||
e.printStackTrace(); | ||
} | ||
|
||
} | ||
|
||
private static void generateAddressAuthData() { | ||
|
||
AddressAuthDataGenerator d = new AddressAuthDataGenerator(); | ||
try { | ||
d.processData(); | ||
} catch (FileNotFoundException e) { | ||
e.printStackTrace(); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
private static void generateNameAuthRequest() { | ||
|
||
NameAuthdataGenerator nGen = new NameAuthdataGenerator(); | ||
try { | ||
nGen.loadJsons(); | ||
} catch (FileNotFoundException e) { | ||
e.printStackTrace(); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package pt.dto.auth; | ||
|
||
public class AddressAuthEntity { | ||
|
||
private AddressIdentityRequest identityRequest; | ||
private String tspID; | ||
|
||
public AddressAuthEntity() { | ||
|
||
} | ||
|
||
public AddressAuthEntity(AddressIdentityRequest identityRequest, String tspID) { | ||
super(); | ||
this.identityRequest = identityRequest; | ||
this.tspID = tspID; | ||
} | ||
|
||
public AddressIdentityRequest getIdentityRequest() { | ||
return identityRequest; | ||
} | ||
|
||
public void setIdentityRequest(AddressIdentityRequest identityRequest) { | ||
this.identityRequest = identityRequest; | ||
} | ||
|
||
public String getTspID() { | ||
return tspID; | ||
} | ||
|
||
public void setTspID(String tspID) { | ||
this.tspID = tspID; | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package pt.dto.auth; | ||
|
||
import java.util.List; | ||
|
||
public class AddressIdentity { | ||
|
||
private List<Data> addressLine1; | ||
private List<Data> addressLine2; | ||
private List<Data> addressLine3; | ||
|
||
public AddressIdentity() { | ||
|
||
} | ||
|
||
public List<Data> getAddressLine1() { | ||
return addressLine1; | ||
} | ||
|
||
public void setAddressLine1(List<Data> addressLine1) { | ||
this.addressLine1 = addressLine1; | ||
} | ||
|
||
public List<Data> getAddressLine2() { | ||
return addressLine2; | ||
} | ||
|
||
public void setAddressLine2(List<Data> addressLine2) { | ||
this.addressLine2 = addressLine2; | ||
} | ||
|
||
public List<Data> getAddressLine3() { | ||
return addressLine3; | ||
} | ||
|
||
public void setAddressLine3(List<Data> addressLine3) { | ||
this.addressLine3 = addressLine3; | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package pt.dto.auth; | ||
|
||
public class AddressIdentityRequest { | ||
|
||
private AddressIdentity identity; | ||
|
||
public AddressIdentityRequest() { | ||
|
||
} | ||
|
||
public AddressIdentityRequest(AddressIdentity identity) { | ||
this.identity = identity; | ||
} | ||
|
||
public AddressIdentity getIdentity() { | ||
return identity; | ||
} | ||
|
||
public void setIdentity(AddressIdentity identity) { | ||
this.identity = identity; | ||
} | ||
|
||
} |