You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by nikpawar89 <gi...@git.apache.org> on 2016/08/09 21:34:50 UTC

[GitHub] incubator-fineract pull request #200: address_module

GitHub user nikpawar89 opened a pull request:

    https://github.com/apache/incubator-fineract/pull/200

    address_module

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nikpawar89/incubator-fineract fineractaddress

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-fineract/pull/200.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #200
    
----
commit df624e3b4e122154f78ed6e244bd1623bd712a32
Author: nikpawar89 <ni...@yahoo.in>
Date:   2016-07-19T06:08:06Z

    address_module

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-fineract issue #200: address_module

Posted by Nayan <gi...@git.apache.org>.
Github user Nayan commented on the issue:

    https://github.com/apache/incubator-fineract/pull/200
  
    @nikpawar89 please add the API docs :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-fineract pull request #200: address_module

Posted by nikpawar89 <gi...@git.apache.org>.
Github user nikpawar89 closed the pull request at:

    https://github.com/apache/incubator-fineract/pull/200


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-fineract pull request #200: address_module

Posted by nazeer1100126 <gi...@git.apache.org>.
Github user nazeer1100126 commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/200#discussion_r74185883
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/Address.java ---
    @@ -0,0 +1,348 @@
    +/**
    + * 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.address.domain;
    +
    +import java.math.BigDecimal;
    +import java.util.Date;
    +import java.util.Set;
    +
    +import javax.persistence.CascadeType;
    +import javax.persistence.Entity;
    +import javax.persistence.ManyToOne;
    +import javax.persistence.OneToMany;
    +import javax.persistence.Table;
    +
    +import org.apache.fineract.infrastructure.codes.domain.CodeValue;
    +import org.apache.fineract.infrastructure.core.api.JsonCommand;
    +import org.apache.fineract.portfolio.client.domain.ClientAddress;
    +import org.springframework.data.jpa.domain.AbstractPersistable;
    +
    +import com.google.gson.JsonObject;
    +
    +@Entity
    +@Table(name = "m_address")
    +public class Address extends AbstractPersistable<Long> {
    +
    +	/*@OneToMany(mappedBy = "address", cascade = CascadeType.ALL)
    +	private List<ClientAddress> clientaddress = new ArrayList<>();*/
    +	
    +	@OneToMany(mappedBy = "address", cascade = CascadeType.ALL)
    +	private Set<ClientAddress> clientaddress;
    +
    +	private String street;
    +
    +	private String address_line_1;
    --- End diff --
    
    Give proper names to all variables in entity classes. You can refer other entity classes


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-fineract pull request #200: address_module

Posted by nazeer1100126 <gi...@git.apache.org>.
Github user nazeer1100126 commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/200#discussion_r74182909
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResource.java ---
    @@ -47,73 +47,74 @@
     @Scope("singleton")
     public class GlobalConfigurationApiResource {
    --- End diff --
    
    Since there is no change in this file, this file should not be part of this PR


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-fineract pull request #200: address_module

Posted by nazeer1100126 <gi...@git.apache.org>.
Github user nazeer1100126 commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/200#discussion_r74184857
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/AddressConfigurationApiResources.java ---
    @@ -0,0 +1,96 @@
    +/**
    + * 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.address.api;
    +
    +import java.util.Arrays;
    +import java.util.Collection;
    +import java.util.HashSet;
    +import java.util.Set;
    +
    +import javax.ws.rs.Consumes;
    +import javax.ws.rs.GET;
    +import javax.ws.rs.Path;
    +import javax.ws.rs.PathParam;
    +import javax.ws.rs.Produces;
    +import javax.ws.rs.core.Context;
    +import javax.ws.rs.core.MediaType;
    +import javax.ws.rs.core.UriInfo;
    +
    +import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
    +import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper;
    +import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings;
    +import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer;
    +import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
    +import org.apache.fineract.portfolio.address.data.AddressData;
    +import org.apache.fineract.portfolio.address.data.FieldConfigurationData;
    +import org.apache.fineract.portfolio.address.service.AddressReadPlatformServiceImpl;
    +import org.apache.fineract.portfolio.address.service.FieldConfigurationReadPlatformService;
    +import org.springframework.beans.factory.annotation.Autowired;
    +import org.springframework.context.annotation.Scope;
    +import org.springframework.stereotype.Component;
    +
    +@Path("/clients/addresses")
    +@Component
    +@Scope("singleton")
    +public class AddressConfigurationApiResources {
    --- End diff --
    
    Since client address template is coming as part of ClientApiResource.template() API , Is AddressConfigurationApiResources  required ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-fineract pull request #200: address_module

Posted by nazeer1100126 <gi...@git.apache.org>.
Github user nazeer1100126 commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/200#discussion_r74184606
  
    --- Diff: fineract-provider/src/main/resources/sql/migrations/core_db/V312__address_module_tables_metadat.sql ---
    @@ -0,0 +1,227 @@
    +--
    +-- 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.
    +
    +
    +
    +-- code inserts
    +INSERT INTO `m_code` (`code_name`, `is_system_defined`) VALUES ('STATE',1);
    +INSERT INTO `m_code` (`code_name`, `is_system_defined`) VALUES ('COUNTRY',1);
    +INSERT INTO `m_code` (`code_name`, `is_system_defined`) VALUES ('ADDRESS_TYPE',1);
    +
    +-- inserts for STATE
    +INSERT INTO `m_code_value` (`code_id`, `code_value`,`order_position`, `is_active`) 
    +VALUES(
    + (select id from m_code where code_name = 'STATE'), 'Andhra Pradesh', 0,1);
    --- End diff --
    
    I don't think we need to add states of India as part of SQL migration. This is admin job and he will be adding countries and states from the UI.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---