Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Refactoring addon-plural
Browse files Browse the repository at this point in the history
  • Loading branch information
jcagarcia committed Mar 4, 2015
1 parent 1fd2f8f commit 1c555d7
Show file tree
Hide file tree
Showing 38 changed files with 102 additions and 39 deletions.
2 changes: 1 addition & 1 deletion addon-cloud/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
Expand Down
2 changes: 1 addition & 1 deletion addon-dbre/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
Expand Down
2 changes: 1 addition & 1 deletion addon-dod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
Expand Down
2 changes: 1 addition & 1 deletion addon-email/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
Expand Down
2 changes: 1 addition & 1 deletion addon-finder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.classpath.TypeLocationService;
import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetailsBuilder;
import org.springframework.roo.classpath.details.ImportMetadataBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
import org.osgi.service.component.ComponentContext;
import org.springframework.roo.addon.configurable.addon.ConfigurableMetadataProvider;
import org.springframework.roo.addon.jpa.addon.entity.JpaEntityAnnotationValues;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.PluralMetadataProvider;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadataProvider;
import org.springframework.roo.classpath.PhysicalTypeIdentifier;
import org.springframework.roo.classpath.PhysicalTypeMetadata;
import org.springframework.roo.classpath.customdata.taggers.CustomDataKeyDecorator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.springframework.roo.addon.jpa.addon.activerecord.EntityLayerProvider;
import org.springframework.roo.addon.jpa.addon.activerecord.JpaActiveRecordMetadataProvider;
import org.springframework.roo.addon.jpa.addon.activerecord.JpaCrudAnnotationValues;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.classpath.TypeLocationService;
import org.springframework.roo.classpath.customdata.tagkeys.MethodMetadataCustomDataKey;
import org.springframework.roo.classpath.layers.MemberTypeAdditions;
Expand Down
2 changes: 1 addition & 1 deletion addon-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Service;
import org.osgi.service.component.ComponentContext;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.classpath.PhysicalTypeIdentifier;
import org.springframework.roo.classpath.PhysicalTypeMetadata;
import org.springframework.roo.classpath.itd.AbstractItdMetadataProvider;
Expand Down
2 changes: 1 addition & 1 deletion addon-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<!-- Spring Roo modules -->
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.osgi.service.component.ComponentContext;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.classpath.PhysicalTypeIdentifier;
import org.springframework.roo.classpath.PhysicalTypeMetadata;
import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.apache.felix.scr.annotations.Service;
import org.osgi.service.component.ComponentContext;
import org.springframework.roo.addon.layers.service.annotations.RooService;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.addon.security.PermissionEvaluatorMetadata;
import org.springframework.roo.classpath.PhysicalTypeIdentifier;
import org.springframework.roo.classpath.PhysicalTypeMetadata;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.classpath.TypeLocationService;
import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails;
import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetailsBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.springframework.roo.addon.layers.service.addon.ServiceInterfaceLocator;
import org.springframework.roo.addon.layers.service.addon.ServiceLayerProvider;
import org.springframework.roo.addon.layers.service.annotations.RooService;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.classpath.TypeLocationService;
import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails;
import org.springframework.roo.classpath.layers.MemberTypeAdditions;
Expand Down
2 changes: 1 addition & 1 deletion addon-layers-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>

</dependency>
<dependency>
Expand Down
29 changes: 29 additions & 0 deletions addon-plural/addon/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>../../addon-plural</relativePath>
</parent>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
<packaging>bundle</packaging>
<name>Spring Roo - Addon - Plural Details</name>
<description>Determines the plural term for a given String literal using Inflector (https://inflector.dev.java.net/).</description>


<dependencies>
<!-- Annotations dependency -->
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural.annotations</artifactId>
<version>${project.parent.version}</version>
</dependency>
</dependencies>

<properties>
<target.jar.directory>${basedir}/../../target/all</target.jar.directory>
</properties>

</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.springframework.roo.addon.plural;
package org.springframework.roo.addon.plural.addon;

import org.springframework.roo.addon.plural.annotations.RooPlural;
import org.springframework.roo.classpath.PhysicalTypeMetadata;
import org.springframework.roo.classpath.details.annotations.populator.AbstractAnnotationValues;
import org.springframework.roo.classpath.details.annotations.populator.AutoPopulate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.plural;
package org.springframework.roo.addon.plural.addon;

import static org.springframework.roo.model.RooJavaType.ROO_PLURAL;

Expand All @@ -10,6 +10,7 @@
import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.jvnet.inflector.Noun;
import org.springframework.roo.addon.plural.annotations.RooPlural;
import org.springframework.roo.classpath.PhysicalTypeIdentifierNamingUtils;
import org.springframework.roo.classpath.PhysicalTypeMetadata;
import org.springframework.roo.classpath.details.FieldMetadata;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.plural;
package org.springframework.roo.addon.plural.addon;

import org.springframework.roo.classpath.itd.ItdTriggerBasedMetadataProvider;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.plural;
package org.springframework.roo.addon.plural.addon;

import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Service;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.springframework.roo.addon.plural;
package org.springframework.roo.addon.plural.addon;

import org.springframework.roo.addon.plural.addon.PluralAnnotationValues;
import org.springframework.roo.addon.plural.annotations.RooPlural;
import org.springframework.roo.classpath.details.annotations.populator.AnnotationValuesTestCase;

/**
Expand Down
19 changes: 19 additions & 0 deletions addon-plural/annotations/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath>../../addon-plural</relativePath>
</parent>
<artifactId>org.springframework.roo.addon.plural.annotations</artifactId>
<packaging>bundle</packaging>
<name>Spring Roo - Annotations - Plural Details</name>
<description>Determines the plural term for a given String literal using Inflector (https://inflector.dev.java.net/).</description>

<properties>
<target.jar.directory>${basedir}/../../target/all</target.jar.directory>
</properties>

</project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.springframework.roo.addon.plural;
package org.springframework.roo.addon.plural.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
15 changes: 13 additions & 2 deletions addon-plural/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
<relativePath>../runtime/osgi-bundle</relativePath>
</parent>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<packaging>bundle</packaging>
<name>Spring Roo - Addon - Plural Details</name>
<packaging>pom</packaging>
<name>Spring Roo - Plural Details</name>
<description>Determines the plural term for a given String literal using Inflector (https://inflector.dev.java.net/).</description>

<modules>
<module>addon</module>
<module>annotations</module>
</modules>

<dependencies>
<!-- OSGi -->
<dependency>
Expand Down Expand Up @@ -69,4 +75,9 @@
<artifactId>org.springframework.roo.wrapping.inflector</artifactId>
</dependency>
</dependencies>

<properties>
<target.jar.directory>${basedir}/../target/all</target.jar.directory>
</properties>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.osgi.service.component.ComponentContext;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.classpath.PhysicalTypeIdentifier;
import org.springframework.roo.classpath.PhysicalTypeMetadata;
import org.springframework.roo.classpath.TypeManagementService;
Expand Down
2 changes: 1 addition & 1 deletion addon-tailor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
Expand Down
2 changes: 1 addition & 1 deletion addon-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
Expand Down
2 changes: 1 addition & 1 deletion addon-web-mvc-controller/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.classpath.PhysicalTypeIdentifier;
import org.springframework.roo.classpath.TypeLocationService;
import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.addon.web.mvc.controller.scaffold.WebScaffoldMetadata;
import org.springframework.roo.classpath.PhysicalTypeCategory;
import org.springframework.roo.classpath.PhysicalTypeIdentifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.springframework.roo.addon.finder.FinderMetadata;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.addon.web.mvc.controller.scaffold.WebScaffoldMetadata;
import org.springframework.roo.classpath.PhysicalTypeCategory;
import org.springframework.roo.classpath.PhysicalTypeIdentifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.apache.felix.scr.annotations.Service;
import org.osgi.service.component.ComponentContext;
import org.springframework.roo.addon.json.addon.JsonMetadata;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.addon.web.mvc.controller.details.FinderMetadataDetails;
import org.springframework.roo.addon.web.mvc.controller.details.JavaTypePersistenceMetadataDetails;
import org.springframework.roo.addon.web.mvc.controller.details.WebMetadataService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.springframework.roo.addon.plural.PluralMetadata;
import org.springframework.roo.addon.plural.addon.PluralMetadata;
import org.springframework.roo.addon.web.mvc.controller.WebMvcOperations;
import org.springframework.roo.addon.web.mvc.controller.scaffold.WebScaffoldAnnotationValues;
import org.springframework.roo.classpath.PhysicalTypeCategory;
Expand Down
2 changes: 1 addition & 1 deletion addon-web-selenium/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@
</dependency>
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.addon.plural</artifactId>
<artifactId>org.springframework.roo.addon.plural.addon</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
public class PhysicalTypeIdentifierNamingUtilsTest {

// instance ID
private static final String METADATA_CLASS_ID = "MID:org.springframework.roo.addon.plural.PluralMetadata";
private static final String METADATA_INSTANCE_ID = "MID:org.springframework.roo.addon.plural.PluralMetadata#core|SRC_MAIN_JAVA?com.example.domain.Thing";
private static final String METADATA_CLASS_ID = "MID:org.springframework.roo.addon.plural.addon.PluralMetadata";
private static final String METADATA_INSTANCE_ID = "MID:org.springframework.roo.addon.plural.addon.PluralMetadata#core|SRC_MAIN_JAVA?com.example.domain.Thing";
private static final String MODULE = "core"; // Same as in the above
// instance ID
private static final Path PATH = Path.SRC_MAIN_JAVA; // Same as in the below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public final class RooJavaType {
public static final JavaType ROO_PERMISSION_EVALUATOR = new JavaType(
"org.springframework.roo.addon.security.RooPermissionEvaluator");
public static final JavaType ROO_PLURAL = new JavaType(
"org.springframework.roo.addon.plural.RooPlural");
"org.springframework.roo.addon.plural.annotations.RooPlural");
public static final JavaType ROO_REPOSITORY_JPA = new JavaType(
"org.springframework.roo.addon.layers.repository.jpa.annotations.RooJpaRepository");
public static final JavaType ROO_REPOSITORY_MONGO = new JavaType(
Expand Down

0 comments on commit 1c555d7

Please sign in to comment.