Search in sources :

Example 66 with LogicalPath

use of org.springframework.roo.project.LogicalPath in project spring-roo by spring-projects.

the class DbreModelServiceImpl method getDbreXmlPath.

private String getDbreXmlPath() {
    for (final String moduleName : getProjectOperations().getModuleNames()) {
        final LogicalPath logicalPath = LogicalPath.getInstance(Path.SRC_MAIN_RESOURCES, moduleName);
        final String dbreXmlPath = getProjectOperations().getPathResolver().getIdentifier(logicalPath, DBRE_XML);
        if (getFileManager().exists(dbreXmlPath)) {
            return dbreXmlPath;
        }
    }
    return getProjectOperations().getPathResolver().getFocusedIdentifier(Path.SRC_MAIN_RESOURCES, DBRE_XML);
}
Also used : LogicalPath(org.springframework.roo.project.LogicalPath)

Example 67 with LogicalPath

use of org.springframework.roo.project.LogicalPath in project spring-roo by spring-projects.

the class RepositoryJpaCustomMetadataProviderImpl method getGovernorPhysicalTypeIdentifier.

@Override
protected String getGovernorPhysicalTypeIdentifier(final String metadataIdentificationString) {
    final JavaType javaType = RepositoryJpaCustomMetadata.getJavaType(metadataIdentificationString);
    final LogicalPath path = RepositoryJpaCustomMetadata.getPath(metadataIdentificationString);
    return PhysicalTypeIdentifier.createIdentifier(javaType, path);
}
Also used : RooJavaType(org.springframework.roo.model.RooJavaType) JavaType(org.springframework.roo.model.JavaType) LogicalPath(org.springframework.roo.project.LogicalPath)

Example 68 with LogicalPath

use of org.springframework.roo.project.LogicalPath in project spring-roo by spring-projects.

the class ServiceImplMetadataProviderImpl method getServiceMetadata.

/**
 * Returns {@link ServiceMetadata} of _serviceInterfaceDetails_
 *
 * Also register metadata dependencies
 *
 * @param metadataIdentificationString
 * @param serviceInterfaceDetails
 * @return
 */
private ServiceMetadata getServiceMetadata(final String metadataIdentificationString, ClassOrInterfaceTypeDetails serviceInterfaceDetails) {
    final LogicalPath logicalPath = PhysicalTypeIdentifier.getPath(serviceInterfaceDetails.getDeclaredByMetadataId());
    final String serviceMetadataKey = ServiceMetadata.createIdentifier(serviceInterfaceDetails.getType(), logicalPath);
    registerDependency(serviceMetadataKey, metadataIdentificationString);
    final ServiceMetadata serviceMetadata = (ServiceMetadata) getMetadataService().get(serviceMetadataKey);
    return serviceMetadata;
}
Also used : LogicalPath(org.springframework.roo.project.LogicalPath)

Example 69 with LogicalPath

use of org.springframework.roo.project.LogicalPath in project spring-roo by spring-projects.

the class RepositoryJpaMetadataProviderImpl method getGovernorPhysicalTypeIdentifier.

@Override
protected String getGovernorPhysicalTypeIdentifier(final String metadataIdentificationString) {
    final JavaType javaType = RepositoryJpaMetadata.getJavaType(metadataIdentificationString);
    final LogicalPath path = RepositoryJpaMetadata.getPath(metadataIdentificationString);
    return PhysicalTypeIdentifier.createIdentifier(javaType, path);
}
Also used : RooJavaType(org.springframework.roo.model.RooJavaType) JavaType(org.springframework.roo.model.JavaType) LogicalPath(org.springframework.roo.project.LogicalPath)

Example 70 with LogicalPath

use of org.springframework.roo.project.LogicalPath in project spring-roo by spring-projects.

the class SecurityAuthorizationsMetadataProviderImpl method getGovernorPhysicalTypeIdentifier.

@Override
protected String getGovernorPhysicalTypeIdentifier(final String metadataIdentificationString) {
    final JavaType javaType = SecurityAuthorizationsMetadata.getJavaType(metadataIdentificationString);
    final LogicalPath path = SecurityAuthorizationsMetadata.getPath(metadataIdentificationString);
    return PhysicalTypeIdentifier.createIdentifier(javaType, path);
}
Also used : AnnotatedJavaType(org.springframework.roo.classpath.details.annotations.AnnotatedJavaType) RooJavaType(org.springframework.roo.model.RooJavaType) JavaType(org.springframework.roo.model.JavaType) LogicalPath(org.springframework.roo.project.LogicalPath)

Aggregations

LogicalPath (org.springframework.roo.project.LogicalPath)85 JavaType (org.springframework.roo.model.JavaType)62 RooJavaType (org.springframework.roo.model.RooJavaType)55 ClassOrInterfaceTypeDetails (org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails)13 JpaJavaType (org.springframework.roo.model.JpaJavaType)12 ClassOrInterfaceTypeDetailsBuilder (org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetailsBuilder)10 AnnotatedJavaType (org.springframework.roo.classpath.details.annotations.AnnotatedJavaType)9 AnnotationMetadataBuilder (org.springframework.roo.classpath.details.annotations.AnnotationMetadataBuilder)9 SpringJavaType (org.springframework.roo.model.SpringJavaType)9 ArrayList (java.util.ArrayList)8 InputStream (java.io.InputStream)7 AnnotationMetadata (org.springframework.roo.classpath.details.annotations.AnnotationMetadata)6 MemberDetails (org.springframework.roo.classpath.scanner.MemberDetails)5 BufferedInputStream (java.io.BufferedInputStream)4 IOException (java.io.IOException)4 OutputStream (java.io.OutputStream)4 ZipInputStream (java.util.zip.ZipInputStream)4 I18n (org.springframework.roo.addon.web.mvc.i18n.components.I18n)4 FieldMetadata (org.springframework.roo.classpath.details.FieldMetadata)3 JavaSymbolName (org.springframework.roo.model.JavaSymbolName)3