Skip to content

Commit ac7b629

Browse files
committed
Added gitignore file
1 parent e48448a commit ac7b629

File tree

123 files changed

+3211
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+3211
-1
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ target/
2828
build/
2929

3030
### VS Code ###
31-
.vscode/
31+
.vscode/
32+
/security/target/
33+
/repository/target/
34+
/common/target/

.idea/dbnavigator.xml

Lines changed: 463 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<artifactId>common</artifactId>
6+
<dependencies>
7+
</dependencies>
8+
<modelVersion>4.0.0</modelVersion>
9+
10+
<parent>
11+
<artifactId>business-manager</artifactId>
12+
<groupId>com.business.manager</groupId>
13+
<version>1.0.0</version>
14+
</parent>
15+
16+
</project>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
package com.business.manager.common.constant;
2+
3+
public enum ApplicationPropertyEnum {
4+
CLOUD("cloud", "AWS"),
5+
LAB_COST_UNIT("lab.cost.unit", "hour"),
6+
LAB_DEFAULT_DURATION_IN_MINUTES("lab.default.duration.in.minutes", "5"),
7+
LAB_DESTROYER_TIME_INTERVAL_IN_MINUTES("lab.destroyer.time.interval.in.minutes", "10"),
8+
TRAINING_DESTROYER_TIME_INTERVAL_IN_MINUTES("training.destroyer.time.interval.in.minutes", "60"),
9+
ALLOWED_LABS_PER_USER_IP("allowed.labs.per.userip", "10"),
10+
STATIC_DATA_REFRESHER_TIME_INTERVAL_IN_MINUTES(
11+
"static.data.refresher.time.interval.in.minutes", "30"),
12+
AWS_MAX_INSTANCE_COUNT("aws.max.instance.count", "20"),
13+
AWS_HOST("aws.host", "svadhyatapas.com"),
14+
15+
AWS_LIGHTSAIL_AVAILABILITY_ZONE("aws.lightsail.availability.zone", "us-east-1a"),
16+
AWS_LIGHTSAIL_BUNDLE_ID("aws.lightsail.bundle.id", "micro_2_0"),
17+
AWS_LIGHTSAIL_INSTANCE_DEFAULT_SNAPSHOT(
18+
"aws.lightsail.instance.default.snapshot", "snapshot-us-east-1a-01"),
19+
20+
AWS_LIGHTSAIL_INSTANCE_LOAD_FACTOR("aws.lightsail.instance.loadfactor", "0.85"),
21+
AWS_LIGHTSAIL_INSTANCE_DEFAULT_COUNT("aws.lightsail.instance.default.count", "4"),
22+
AWS_LIGHTSAIL_INSTANCE_MULTIPLIER("aws.lightsail.instance.multiplier", "1.25"),
23+
24+
AWS_LIGHTSAIL_BLUEPRINT_ID("aws.lightsail.blueprint.id", "ubuntu_18_04"),
25+
AWS_LIGHTSAIL_PPK_FILE_PATH(
26+
"aws.lightsail.ppk.file.path", "/home/ec2-user/config/lightsail-ap-south-east-1.ppk"),
27+
AWS_LIGHTSAIL_INSTANCE_USER_NAME("aws.lightsail.instance.user.name", "ubuntu"),
28+
29+
AWS_ROUTE53_RECORD_SET_TYPE("aws.route53.record.set.type", "A"),
30+
AWS_ROUTE53_HOSTED_ZONE_ID("aws.route53.hosted.zone.id", "Z02012621845NES79CT36"),
31+
AWS_ROUTE53_RECORD_SET_TTL("aws.route53.record.set.ttl", "300"),
32+
INSUFFICIENT_WALLET_BALANCE_MANAGER_TIME_INETERVAL_IN_MINUTES(
33+
"insufficient.wallet.balance.manager.time.interval.in.minutes", "30"),
34+
SIGNUP_OFFER_AMOUNT("signup.offer.amount", "50");
35+
36+
private final String key;
37+
38+
private final String defaultValue;
39+
40+
ApplicationPropertyEnum(String key, String defaultValue) {
41+
this.key = key;
42+
this.defaultValue = defaultValue;
43+
}
44+
45+
public String getKey() {
46+
return key;
47+
}
48+
49+
public String getDefaultValue() {
50+
return defaultValue;
51+
}
52+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.business.manager.common.constant;
2+
3+
public enum AuthProviderEnum {
4+
local,
5+
facebook,
6+
google,
7+
github
8+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.business.manager.common.constant;
2+
3+
public enum AuthRoleEnum {
4+
USER,
5+
ADMIN
6+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.business.manager.common.dto;
2+
3+
import java.util.List;
4+
5+
public class ErrorDTO {
6+
7+
private String message;
8+
private List<String> details;
9+
10+
public ErrorDTO(String message, List<String> details) {
11+
this.message = message;
12+
this.details = details;
13+
}
14+
15+
public String getMessage() {
16+
return message;
17+
}
18+
19+
public void setMessage(String message) {
20+
this.message = message;
21+
}
22+
23+
public List<String> getDetails() {
24+
return details;
25+
}
26+
27+
public void setDetails(List<String> details) {
28+
this.details = details;
29+
}
30+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
package com.business.manager.common.dto;
2+
3+
public class UserDTO {
4+
private Long id;
5+
private String email;
6+
private String name;
7+
private String mobileNo;
8+
private String imageURL;
9+
private String dob;
10+
11+
public UserDTO() {
12+
}
13+
14+
public UserDTO(Long id, String email, String name, String mobileNo, String imageURL,
15+
String dob) {
16+
this.id = id;
17+
this.email = email;
18+
this.name = name;
19+
this.mobileNo = mobileNo;
20+
this.imageURL = imageURL;
21+
this.dob = dob;
22+
}
23+
24+
public Long getId() {
25+
return id;
26+
}
27+
28+
public void setId(Long id) {
29+
this.id = id;
30+
}
31+
32+
public String getEmail() {
33+
return email;
34+
}
35+
36+
public void setEmail(String email) {
37+
this.email = email;
38+
}
39+
40+
public String getName() {
41+
return name;
42+
}
43+
44+
public void setName(String name) {
45+
this.name = name;
46+
}
47+
48+
public String getMobileNo() {
49+
return mobileNo;
50+
}
51+
52+
public void setMobileNo(String mobileNo) {
53+
this.mobileNo = mobileNo;
54+
}
55+
56+
public String getImageURL() {
57+
return imageURL;
58+
}
59+
60+
public void setImageURL(String imageURL) {
61+
this.imageURL = imageURL;
62+
}
63+
64+
public String getDob() {
65+
return dob;
66+
}
67+
68+
public void setDob(String dob) {
69+
this.dob = dob;
70+
}
71+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.business.manager.common.exception;
2+
3+
import org.springframework.http.HttpStatus;
4+
import org.springframework.web.bind.annotation.ResponseStatus;
5+
6+
@ResponseStatus(HttpStatus.BAD_REQUEST)
7+
public class BadRequestException extends RuntimeException {
8+
public BadRequestException(String message) {
9+
super(message);
10+
}
11+
public BadRequestException(String message, Throwable cause) {
12+
super(message, cause);
13+
}
14+
}

0 commit comments

Comments
 (0)