-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from alexguerre/feature/add-feature-cipher-mask…
…-json Feature/add feature cipher mask json
- Loading branch information
Showing
19 changed files
with
911 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
core/src/main/java/co/com/bancolombia/datamask/databind/mask/DataMask.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package co.com.bancolombia.datamask.databind.mask; | ||
|
||
import lombok.Getter; | ||
import lombok.NonNull; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.stream.Collectors; | ||
|
||
@Getter | ||
public class DataMask<T> { | ||
private final T data; | ||
private final Map<IdentifyField, MaskingFormat> fields; | ||
|
||
public DataMask(T data, Map<IdentifyField, MaskingFormat> fields){ | ||
this.data = data; | ||
this.fields = fields; | ||
} | ||
|
||
public DataMask(T data, @NonNull List<IdentifyField> defaultFields){ | ||
this.data = data; | ||
this.fields = defaultFields.stream() | ||
.collect(Collectors.toMap(k -> k, v -> new MaskingFormat())); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
core/src/main/java/co/com/bancolombia/datamask/databind/mask/IdentifyField.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package co.com.bancolombia.datamask.databind.mask; | ||
|
||
import co.com.bancolombia.datamask.databind.util.QueryType; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@EqualsAndHashCode | ||
public class IdentifyField { | ||
private String query; | ||
private QueryType queryType; | ||
} |
Oops, something went wrong.