forked from apache/fineract
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FINERACT-1932: Fineract modularization - custom modules
- Loading branch information
Showing
101 changed files
with
239 additions
and
194 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
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
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
68 changes: 68 additions & 0 deletions
68
...t-core/src/main/java/org/apache/fineract/interoperation/domain/InteropIdentifierType.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,68 @@ | ||
/** | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.fineract.interoperation.domain; | ||
|
||
import java.util.Arrays; | ||
import java.util.Map; | ||
import java.util.stream.Collectors; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum InteropIdentifierType { | ||
|
||
MSISDN("interopIdentifierType.msisdn"), // | ||
EMAIL("interopIdentifierType.email"), // | ||
PERSONAL_ID("interopIdentifierType.personalId", "PERSONALID", "PERSONALID"), // | ||
BUSINESS("interopIdentifierType.business"), // | ||
DEVICE("interopIdentifierType.device"), // | ||
ACCOUNT_ID("interopIdentifierType.accountId", "ACCOUNTID", "ACCOUNTID"), // | ||
IBAN("interopIdentifierType.iban"), // | ||
ALIAS("interopIdentifierType.alias"), // | ||
BBAN("interopIdentifierType.bban"), // | ||
; // | ||
|
||
public static final InteropIdentifierType[] VALUES = values(); | ||
|
||
private static final Map<String, InteropIdentifierType> BY_ALIAS = Arrays.stream(VALUES) | ||
.collect(Collectors.toMap(InteropIdentifierType::getAlias, v -> v)); | ||
private static final Map<String, InteropIdentifierType> BY_NAME = Arrays.stream(VALUES) | ||
.collect(Collectors.toMap(InteropIdentifierType::name, v -> v)); | ||
|
||
private final String code; | ||
private final String description; | ||
private final String alias; | ||
|
||
InteropIdentifierType(String code, String description, String alias) { | ||
this.code = code; | ||
this.description = description == null ? name() : description; | ||
this.alias = alias == null ? name() : alias; | ||
} | ||
|
||
InteropIdentifierType(String code) { | ||
this(code, null, null); | ||
} | ||
|
||
public static InteropIdentifierType resolveName(String name) { | ||
if (name == null) { | ||
return null; | ||
} | ||
InteropIdentifierType idType = BY_ALIAS.get(name); | ||
return idType == null ? BY_NAME.get(name) : idType; | ||
} | ||
} |
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
81 changes: 81 additions & 0 deletions
81
fineract-core/src/main/java/org/apache/fineract/portfolio/note/domain/NoteType.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,81 @@ | ||
/** | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.fineract.portfolio.note.domain; | ||
|
||
import java.util.Arrays; | ||
import java.util.Map; | ||
import java.util.stream.Collectors; | ||
import org.apache.fineract.infrastructure.core.data.EnumOptionData; | ||
|
||
public enum NoteType { | ||
|
||
CLIENT(100, "noteType.client", "clients", "Client note"), // | ||
LOAN(200, "noteType.loan", "loans", "Loan note"), // | ||
LOAN_TRANSACTION(300, "noteType.loan.transaction", "loanTransactions", "Loan transaction note"), // | ||
SAVING_ACCOUNT(500, "noteType.saving", "savings", " account note"), // | ||
GROUP(600, "noteType.group", "groups", "Group note"), // | ||
SHARE_ACCOUNT(700, "noteType.shares", "accounts/share", "Share account note"), // | ||
SAVINGS_TRANSACTION(800, "noteType.savings.transaction", "savingsTransactions", "Savings transaction note"), // | ||
; | ||
|
||
public static final NoteType[] VALUES = values(); | ||
|
||
private static final Map<Integer, NoteType> BY_ID = Arrays.stream(VALUES).collect(Collectors.toMap(NoteType::getValue, v -> v)); | ||
private static final Map<String, NoteType> BY_API = Arrays.stream(VALUES).collect(Collectors.toMap(NoteType::getApiUrl, v -> v)); | ||
|
||
private final Integer value; | ||
private final String code; | ||
private final String apiUrl; | ||
private final String description; | ||
|
||
NoteType(final Integer value, final String code, final String apiUrl, String description) { | ||
this.value = value; | ||
this.code = code; | ||
this.apiUrl = apiUrl; | ||
this.description = description; | ||
} | ||
|
||
public Integer getValue() { | ||
return this.value; | ||
} | ||
|
||
public String getCode() { | ||
return this.code; | ||
} | ||
|
||
public String getApiUrl() { | ||
return this.apiUrl; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public static NoteType fromInt(int i) { | ||
return BY_ID.get(i); | ||
} | ||
|
||
public static NoteType fromApiUrl(final String url) { | ||
return BY_API.get(url); | ||
} | ||
|
||
public EnumOptionData toEnumOptionData() { | ||
return new EnumOptionData(getValue().longValue(), getCode(), getDescription()); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.