Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE 410] Updated proto package to be com.github.dozermapper.protobuf #447

Merged
merged 1 commit into from Jul 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Updated proto package to be com.github.dozermapper.protobuf
  • Loading branch information
garethahealy committed Jul 6, 2017
commit ccd550696f3df8545319ffa9c6adafc8eca2334c
16 changes: 16 additions & 0 deletions docs/asciidoc/migration/v6-to-v61.adoc
Expand Up @@ -107,3 +107,19 @@ Object createBean(Object source, Class<?> sourceClass, String targetBeanId, Bean
org.dozer.stats
org.dozer.jmx
----

=== 8. Updated dozer-proto package name
**From:**
[source,java,prettyprint]
----
org.dozer
----

**To:**
[source,java,prettyprint]
----
com.github.dozermapper.protobuf
----



Expand Up @@ -13,19 +13,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer;
package com.github.dozermapper.protobuf;

import java.util.Collection;
import java.util.Collections;

import com.github.dozermapper.protobuf.builder.ByProtobufBuilder;
import com.github.dozermapper.protobuf.classmap.generator.ProtobufBeanFieldsDetector;
import com.github.dozermapper.protobuf.propertydescriptor.ProtoFieldPropertyDescriptorCreationStrategy;

import org.dozer.DozerModule;
import org.dozer.builder.BeanBuilderCreationStrategy;
import org.dozer.builder.ByProtobufBuilder;
import org.dozer.classmap.generator.BeanFieldsDetector;
import org.dozer.classmap.generator.ProtobufBeanFieldsDetector;
import org.dozer.config.BeanContainer;
import org.dozer.factory.DestBeanCreator;
import org.dozer.propertydescriptor.PropertyDescriptorCreationStrategy;
import org.dozer.propertydescriptor.PropertyDescriptorFactory;
import org.dozer.propertydescriptor.ProtoFieldPropertyDescriptorCreationStrategy;

/**
* @author Dmitry Spikhalskiy
Expand Down
Expand Up @@ -13,13 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.builder;
package com.github.dozermapper.protobuf.builder;

import com.github.dozermapper.protobuf.util.ProtoUtils;
import com.google.protobuf.Message;

import org.dozer.BeanBuilder;
import org.dozer.builder.BeanBuilderCreationStrategy;
import org.dozer.factory.BeanCreationDirective;
import org.dozer.util.ProtoUtils;

/**
* @author Dmitry Spikhalskiy
Expand Down
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.builder;
package com.github.dozermapper.protobuf.builder;

import com.google.protobuf.Message;

Expand Down
Expand Up @@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.classmap.generator;
package com.github.dozermapper.protobuf.classmap.generator;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.google.common.base.CaseFormat;
import com.github.dozermapper.protobuf.util.ProtoUtils;
import com.google.protobuf.Descriptors;
import com.google.protobuf.Message;

import org.dozer.util.ProtoUtils;
import org.dozer.classmap.generator.BeanFieldsDetector;

/**
* @author Dmitry Spikhalskiy
Expand Down
Expand Up @@ -13,24 +13,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.propertydescriptor;
package com.github.dozermapper.protobuf.propertydescriptor;

import java.lang.reflect.Method;
import java.util.Map;

import com.github.dozermapper.protobuf.builder.ProtoBeanBuilder;
import com.github.dozermapper.protobuf.util.ProtoUtils;
import com.google.protobuf.Descriptors;
import com.google.protobuf.Message;

import org.dozer.BeanBuilder;
import org.dozer.MappingException;
import org.dozer.builder.ProtoBeanBuilder;
import org.dozer.config.BeanContainer;
import org.dozer.factory.DestBeanCreator;
import org.dozer.fieldmap.FieldMap;
import org.dozer.fieldmap.HintContainer;
import org.dozer.propertydescriptor.AbstractPropertyDescriptor;
import org.dozer.propertydescriptor.PropertyDescriptorFactory;
import org.dozer.util.DeepHierarchyUtils;
import org.dozer.util.MappingUtils;
import org.dozer.util.ProtoUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Expand Up @@ -13,16 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.propertydescriptor;
package com.github.dozermapper.protobuf.propertydescriptor;

import com.github.dozermapper.protobuf.util.ProtoUtils;
import com.google.protobuf.Descriptors;
import com.google.protobuf.Message;

import org.dozer.config.BeanContainer;
import org.dozer.factory.DestBeanCreator;
import org.dozer.fieldmap.HintContainer;
import org.dozer.propertydescriptor.DozerPropertyDescriptor;
import org.dozer.propertydescriptor.PropertyDescriptorCreationStrategy;
import org.dozer.propertydescriptor.PropertyDescriptorFactory;
import org.dozer.util.MappingUtils;
import org.dozer.util.ProtoUtils;

/**
* @author Dmitry Spikhalskiy
Expand Down
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.util;
package com.github.dozermapper.protobuf.util;

import java.lang.reflect.Method;
import java.util.ArrayList;
Expand All @@ -30,8 +30,7 @@

import org.apache.commons.lang3.StringUtils;
import org.dozer.config.BeanContainer;

import static com.google.common.base.CaseFormat.LOWER_UNDERSCORE;
import org.dozer.util.MappingUtils;

/**
* @author Dmitry Spikhalskiy
Expand Down
@@ -1 +1 @@
org.dozer.ProtobufSupportModule
com.github.dozermapper.protobuf.ProtobufSupportModule
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.functional_tests;
package com.github.dozermapper.protobuf.functional_tests;

public class FieldNaming {
private String snakeCaseField;
Expand Down
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.functional_tests;
package com.github.dozermapper.protobuf.functional_tests;

import org.dozer.DozerBeanMapperBuilder;
import org.dozer.Mapper;
Expand Down
Expand Up @@ -13,18 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.functional_tests;
package com.github.dozermapper.protobuf.functional_tests;

import java.util.Arrays;

import com.github.dozermapper.protobuf.vo.proto.LiteTestObject;
import com.github.dozermapper.protobuf.vo.proto.LiteTestObjectContainer;
import com.github.dozermapper.protobuf.vo.proto.ObjectWithCollection;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtoTestObjectWithNestedProtoObject;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollection;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollectionContainer;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.SimpleProtoTestObject;

import org.dozer.Mapper;
import org.dozer.vo.proto.LiteTestObject;
import org.dozer.vo.proto.LiteTestObjectContainer;
import org.dozer.vo.proto.ObjectWithCollection;
import org.dozer.vo.proto.ProtoTestObjects.ProtoTestObjectWithNestedProtoObject;
import org.dozer.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollection;
import org.dozer.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollectionContainer;
import org.dozer.vo.proto.ProtoTestObjects.SimpleProtoTestObject;
import org.junit.Before;
import org.junit.Test;

Expand Down
Expand Up @@ -13,32 +13,32 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dozer.functional_tests;
package com.github.dozermapper.protobuf.functional_tests;

import java.util.Arrays;

import com.github.dozermapper.protobuf.vo.proto.LiteTestObject;
import com.github.dozermapper.protobuf.vo.proto.MapExample;
import com.github.dozermapper.protobuf.vo.proto.ObjectWithCollection;
import com.github.dozermapper.protobuf.vo.proto.ObjectWithEnumCollection;
import com.github.dozermapper.protobuf.vo.proto.ObjectWithEnumField;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtoEnum;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtoObjectWithEnumField;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtoTestObjectWithNestedProtoObject;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufFieldNaming;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufMapExample;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithEnumCollection;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollection;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.SimpleProtoTestObject;
import com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.SimpleProtoTestObjectWithoutRequired;
import com.github.dozermapper.protobuf.vo.proto.SimpleEnum;
import com.github.dozermapper.protobuf.vo.proto.TestObject;
import com.github.dozermapper.protobuf.vo.proto.TestObjectContainer;

import org.dozer.Mapper;
import org.dozer.MappingException;
import org.dozer.config.BeanContainer;
import org.dozer.util.MappingUtils;
import org.dozer.vo.proto.LiteTestObject;
import org.dozer.vo.proto.MapExample;
import org.dozer.vo.proto.ObjectWithCollection;
import org.dozer.vo.proto.ObjectWithEnumCollection;
import org.dozer.vo.proto.ObjectWithEnumField;
import org.dozer.vo.proto.ProtoTestObjects.ProtoEnum;
import org.dozer.vo.proto.ProtoTestObjects.ProtoObjectWithEnumField;
import org.dozer.vo.proto.ProtoTestObjects.ProtoTestObjectWithNestedProtoObject;
import org.dozer.vo.proto.ProtoTestObjects.ProtobufFieldNaming;
import org.dozer.vo.proto.ProtoTestObjects.ProtobufMapExample;
import org.dozer.vo.proto.ProtoTestObjects.ProtobufWithEnumCollection;
import org.dozer.vo.proto.ProtoTestObjects.ProtobufWithSimpleCollection;
import org.dozer.vo.proto.ProtoTestObjects.SimpleProtoTestObject;
import org.dozer.vo.proto.ProtoTestObjects.SimpleProtoTestObjectWithoutRequired;
import org.dozer.vo.proto.SimpleEnum;
import org.dozer.vo.proto.TestObject;
import org.dozer.vo.proto.TestObjectContainer;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
Expand Down Expand Up @@ -67,7 +67,7 @@ public void setUp() throws Exception {

@Test
public void testTrivial() {
Class<?> type = MappingUtils.loadClass("org.dozer.vo.proto.ProtoTestObjects.SimpleProtoTestObject", beanContainer);
Class<?> type = MappingUtils.loadClass("com.github.dozermapper.protobuf.vo.proto.ProtoTestObjects.SimpleProtoTestObject", beanContainer);
assertNotNull(type);
}

Expand All @@ -77,7 +77,7 @@ public void testSimple_toProto() {
source.setOne("ABC");
SimpleProtoTestObject protoResult = mapper.map(source, SimpleProtoTestObject.class);
assertNotNull(protoResult);
Assert.assertEquals("ABC", protoResult.getOne());
assertEquals("ABC", protoResult.getOne());
}

@Test
Expand All @@ -88,7 +88,7 @@ public void testSimple_fromProto() {

TestObject pojoResult = mapper.map(source, TestObject.class);
assertNotNull(pojoResult);
Assert.assertEquals("ABC", pojoResult.getOne());
assertEquals("ABC", pojoResult.getOne());
}

@Test
Expand All @@ -97,7 +97,7 @@ public void testSimple_wildcard_toProto() {
source.setOne("ABC");
SimpleProtoTestObject protoResult = mapper.map(source, SimpleProtoTestObject.class);
assertNotNull(protoResult);
Assert.assertEquals("ABC", protoResult.getOne());
assertEquals("ABC", protoResult.getOne());
}

@Test
Expand All @@ -106,7 +106,7 @@ public void testSimple_wildcard_fromProto() {
sourceBuilder.setOne("ABC");
LiteTestObject pojoResult = mapper.map(sourceBuilder.build(), LiteTestObject.class);
assertNotNull(pojoResult);
Assert.assertEquals("ABC", pojoResult.getOne());
assertEquals("ABC", pojoResult.getOne());
}

@Test
Expand Down Expand Up @@ -136,9 +136,9 @@ public void testNestedProtoField_toProto() {

ProtoTestObjectWithNestedProtoObject result = mapper.map(source, ProtoTestObjectWithNestedProtoObject.class);
assertNotNull(result);
Assert.assertEquals("Name", result.getOne());
assertEquals("Name", result.getOne());
assertNotNull(result.getNestedObject());
Assert.assertEquals("InnerName", result.getNestedObject().getOne());
assertEquals("InnerName", result.getNestedObject().getOne());
}

@Test
Expand All @@ -152,9 +152,9 @@ public void testNestedProtoField_fromProto() {

TestObjectContainer result = mapper.map(source, TestObjectContainer.class);
assertNotNull(result);
Assert.assertEquals("Name", result.getOne());
assertEquals("Name", result.getOne());
assertNotNull(result.getNested());
Assert.assertEquals("InnerName", result.getNested().getOne());
assertEquals("InnerName", result.getNested().getOne());
}

@Test
Expand All @@ -165,7 +165,7 @@ public void testEnumProtoField_toProto() {
ProtoObjectWithEnumField result = mapper.map(source, ProtoObjectWithEnumField.class);
assertNotNull(result);
assertNotNull(result.getEnumField());
Assert.assertEquals(ProtoEnum.VALUE1, result.getEnumField());
assertEquals(ProtoEnum.VALUE1, result.getEnumField());
}

@Test
Expand All @@ -177,7 +177,7 @@ public void testEnumProtoField_fromProto() {
ObjectWithEnumField result = mapper.map(source, ObjectWithEnumField.class);
assertNotNull(result);
assertNotNull(result.getEnumField());
Assert.assertEquals(SimpleEnum.VALUE1, result.getEnumField());
assertEquals(SimpleEnum.VALUE1, result.getEnumField());
}

@Test
Expand All @@ -191,8 +191,8 @@ public void testRepeatedField_toProto() {
ProtobufWithSimpleCollection result = mapper.map(source, ProtobufWithSimpleCollection.class);
assertNotNull(result);
assertNotNull(result.getObjectList());
Assert.assertEquals(1, result.getObjectCount());
Assert.assertEquals("One", result.getObject(0).getOne());
assertEquals(1, result.getObjectCount());
assertEquals("One", result.getObject(0).getOne());
}

@Test
Expand All @@ -206,8 +206,8 @@ public void testRepeatedField_fromProto() {
ObjectWithCollection result = mapper.map(sourceBuilder.build(), ObjectWithCollection.class);
assertNotNull(result);
assertNotNull(result.getObjects());
Assert.assertEquals(1, result.getObjects().size());
Assert.assertEquals("One", result.getObjects().get(0).getOne());
assertEquals(1, result.getObjects().size());
assertEquals("One", result.getObjects().get(0).getOne());
}

@Test
Expand All @@ -218,8 +218,8 @@ public void testRepeatedEnumField_toProto() {
ProtobufWithEnumCollection result = mapper.map(source, ProtobufWithEnumCollection.class);
assertNotNull(result);
assertNotNull(result.getObjectList());
Assert.assertEquals(1, result.getObjectCount());
Assert.assertEquals(ProtoEnum.VALUE1, result.getObject(0));
assertEquals(1, result.getObjectCount());
assertEquals(ProtoEnum.VALUE1, result.getObject(0));
}

@Test
Expand All @@ -230,8 +230,8 @@ public void testRepeatedEnumField_fromProto() {
ObjectWithEnumCollection result = mapper.map(sourceBuilder.build(), ObjectWithEnumCollection.class);
assertNotNull(result);
assertNotNull(result.getEnums());
Assert.assertEquals(1, result.getEnums().size());
Assert.assertEquals(SimpleEnum.VALUE1, result.getEnums().get(0));
assertEquals(1, result.getEnums().size());
assertEquals(SimpleEnum.VALUE1, result.getEnums().get(0));
}

@Test
Expand Down