diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java index 49921eaabd0..88e1106d8e1 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java @@ -317,10 +317,6 @@ public boolean isAllowedLoanChargeTime() { return ChargeTimeType.fromInt(this.chargeTimeType).isAllowedLoanChargeTime(); } - public boolean isAllowedClientChargeTime() { - return ChargeTimeType.fromInt(this.chargeTimeType).isAllowedClientChargeTime(); - } - public boolean isSavingsCharge() { return ChargeAppliesTo.fromInt(this.chargeAppliesTo).isSavingsCharge(); } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageDataURLNotValidException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageDataURLNotValidException.java deleted file mode 100644 index c2270bf975e..00000000000 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageDataURLNotValidException.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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.infrastructure.core.exception; - -public class ImageDataURLNotValidException extends AbstractPlatformDomainRuleException { - - public ImageDataURLNotValidException() { - super("error.msg.dataURL.save", "Only GIF, PNG and JPEG Data URL's are allowed"); - } -} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageUploadException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageUploadException.java deleted file mode 100644 index 3fec6bc1abb..00000000000 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageUploadException.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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.infrastructure.core.exception; - -public class ImageUploadException extends AbstractPlatformDomainRuleException { - - public ImageUploadException(String badMimeType) { - super("error.msg.image.type.upload", "Only image files of type GIF,PNG and JPG are allowed, but not: " + badMimeType); - } -} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableSearchRequest.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableSearchRequest.java deleted file mode 100644 index 87b4a9121e2..00000000000 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableSearchRequest.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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.infrastructure.dataqueries.data; - -import java.io.Serializable; -import java.util.List; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * Immutable data object representing datatable data. - */ -@Data -@NoArgsConstructor -public final class DatatableSearchRequest implements Serializable { - - private List columnFilters; - - private List resultColumns; - - private String datatable; - -} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobParametersDTO.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobParametersDTO.java deleted file mode 100644 index ca1eff751be..00000000000 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobParametersDTO.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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.infrastructure.jobs.data; - -import java.util.Set; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@Data -@AllArgsConstructor -@EqualsAndHashCode -public class JobParametersDTO { - - private Set jobParameters; -} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLInjectionException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLInjectionException.java deleted file mode 100644 index 36ff0d7fbb0..00000000000 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLInjectionException.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * 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.infrastructure.security.utils; - -import java.sql.SQLException; -import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; - -@Deprecated -public class SQLInjectionException extends PlatformApiDataValidationException { - - public SQLInjectionException() { - super("error.msg.found.sql.injection", "Unexpected SQL Commands found", null); - } - - public SQLInjectionException(SQLException e) { - super("error.msg.found.sql.injection", "Unexpected SQL Commands found", null, e); - } - -} diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneyDeserializer.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneyDeserializer.java deleted file mode 100644 index ba7a06783dd..00000000000 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneyDeserializer.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * 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.organisation.monetary.serialization; - -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonParseException; -import java.lang.reflect.Type; -import java.math.MathContext; -import lombok.AllArgsConstructor; -import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; -import org.apache.fineract.organisation.monetary.domain.Money; - -@AllArgsConstructor -@Deprecated(forRemoval = true) -public class MoneyDeserializer implements JsonDeserializer { - - private final MathContext mc; - private final MonetaryCurrency currency; - - @Override - public Money deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) - throws JsonParseException { - return Money.of(currency, jsonElement.getAsBigDecimal(), mc); - } - -} diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneySerializer.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneySerializer.java deleted file mode 100644 index af3fd0b006c..00000000000 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneySerializer.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * 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.organisation.monetary.serialization; - -import com.google.gson.JsonElement; -import com.google.gson.JsonPrimitive; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import java.lang.reflect.Type; -import org.apache.fineract.organisation.monetary.domain.Money; - -@Deprecated(forRemoval = true) -public class MoneySerializer implements JsonSerializer { - - @Override - public JsonElement serialize(Money money, Type type, JsonSerializationContext jsonSerializationContext) { - return new JsonPrimitive(money.getAmount()); - } - -} diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/Staff.java b/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/Staff.java index e53e332c3f9..47dbdb0b57d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/Staff.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/Staff.java @@ -78,16 +78,4 @@ public class Staff extends AbstractPersistableCustom { @Column(name = "image_id") private Long imageId; - - // TODO: these functions are mistakenly included in an API serialization - - @Deprecated(forRemoval = true) - public boolean isNotLoanOfficer() { - return !isLoanOfficer(); - } - - @Deprecated(forRemoval = true) - public boolean isNotActive() { - return !isActive(); - } } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeTimeType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeTimeType.java index a1e693f61db..e9b8ab2aca0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeTimeType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeTimeType.java @@ -70,11 +70,6 @@ public static Object[] validWorkingCapitalLoanValues() { return validWorkingCapitalLoan().stream().map(ChargeTimeType::getValue).toArray(); } - public static Object[] validLoanChargeValues() { - return new Integer[] { ChargeTimeType.DISBURSEMENT.getValue(), ChargeTimeType.SPECIFIED_DUE_DATE.getValue(), - ChargeTimeType.INSTALMENT_FEE.getValue() }; - } - public static Object[] validSavingsValues() { return new Integer[] { ChargeTimeType.SPECIFIED_DUE_DATE.getValue(), ChargeTimeType.SAVINGS_ACTIVATION.getValue(), ChargeTimeType.SAVINGS_CLOSURE.getValue(), ChargeTimeType.WITHDRAWAL_FEE.getValue(), ChargeTimeType.ANNUAL_FEE.getValue(), @@ -203,10 +198,6 @@ public boolean isAllowedLoanChargeTime() { return isTimeOfDisbursement() || isOnSpecifiedDueDate() || isInstalmentFee() || isOverdueInstallment() || isTrancheDisbursement(); } - public boolean isAllowedClientChargeTime() { - return isOnSpecifiedDueDate(); - } - public boolean isAllowedSavingsChargeTime() { return isOnSpecifiedDueDate() || isSavingsActivation() || isSavingsClosure() || isWithdrawalFee() || isAnnualFee() || isMonthlyFee() || isWeeklyFee() || isOverdraftFee() || isSavingsNoActivityFee();