Package org.springframework.roo.project

Examples of org.springframework.roo.project.LogicalPath


                final ClassOrInterfaceTypeDetails proxy = gwtTypeService
                        .lookupProxyFromRequest(cid);
                if (proxy != null) {
                    final JavaType typeName = PhysicalTypeIdentifier
                            .getJavaType(proxy.getDeclaredByMetadataId());
                    final LogicalPath typePath = PhysicalTypeIdentifier
                            .getPath(proxy.getDeclaredByMetadataId());
                    downstreamDependency = GwtLocatorMetadata.createIdentifier(
                            typeName, typePath);
                    processed = true;
                }
            }
            if (!processed
                    && cid.getAnnotation(RooJavaType.ROO_GWT_PROXY) == null) {
                boolean found = false;
                for (final ClassOrInterfaceTypeDetails proxyCid : typeLocationService
                        .findClassesOrInterfaceDetailsWithAnnotation(RooJavaType.ROO_GWT_PROXY)) {
                    final AnnotationMetadata annotationMetadata = GwtUtils
                            .getFirstAnnotation(proxyCid,
                                    GwtUtils.ROO_PROXY_REQUEST_ANNOTATIONS);
                    if (annotationMetadata != null) {
                        final AnnotationAttributeValue<?> attributeValue = annotationMetadata
                                .getAttribute("value");
                        if (attributeValue != null) {
                            final String mirrorName = GwtUtils
                                    .getStringValue(attributeValue);
                            if (mirrorName != null
                                    && cid.getName()
                                            .getFullyQualifiedTypeName()
                                            .equals(attributeValue.getValue())) {
                                found = true;
                                final JavaType typeName = PhysicalTypeIdentifier
                                        .getJavaType(proxyCid
                                                .getDeclaredByMetadataId());
                                final LogicalPath typePath = PhysicalTypeIdentifier
                                        .getPath(proxyCid
                                                .getDeclaredByMetadataId());
                                downstreamDependency = GwtLocatorMetadata
                                        .createIdentifier(typeName, typePath);
                                break;
                            }
                        }
                    }
                }
                if (!found) {
                    return;
                }
            }
            else if (!processed) {
                // A physical Java type has changed, and determine what the
                // corresponding local metadata identification string would have
                // been
                final JavaType typeName = PhysicalTypeIdentifier
                        .getJavaType(upstreamDependency);
                final LogicalPath typePath = PhysicalTypeIdentifier
                        .getPath(upstreamDependency);
                downstreamDependency = GwtLocatorMetadata.createIdentifier(
                        typeName, typePath);
            }
View Full Code Here


        }

        // Go and get the entity metadata, as any type with finders has to be an
        // entity
        final JavaType javaType = PhysicalTypeIdentifier.getJavaType(id);
        final LogicalPath path = PhysicalTypeIdentifier.getPath(id);
        final String entityMid = JpaActiveRecordMetadata.createIdentifier(
                javaType, path);

        // Get the entity metadata
        final JpaActiveRecordMetadata jpaActiveRecordMetadata = (JpaActiveRecordMetadata) metadataService
View Full Code Here

        }

        // Go and get the entity metadata, as any type with finders has to be an
        // entity
        final JavaType javaType = PhysicalTypeIdentifier.getJavaType(id);
        final LogicalPath path = PhysicalTypeIdentifier.getPath(id);
        final String entityMid = JpaActiveRecordMetadata.createIdentifier(
                javaType, path);

        // Get the entity metadata
        final JpaActiveRecordMetadata jpaActiveRecordMetadata = (JpaActiveRecordMetadata) metadataService
View Full Code Here

        }
        return extendsTypes;
    }

    public String getGwtModuleXml(final String moduleName) {
        final LogicalPath logicalPath = LogicalPath.getInstance(
                Path.SRC_MAIN_JAVA, moduleName);
        final String gwtModuleXml = projectOperations.getPathResolver()
                .getRoot(logicalPath)
                + File.separatorChar
                + projectOperations.getTopLevelPackage(moduleName)
View Full Code Here

    @Override
    protected String getGovernorPhysicalTypeIdentifier(
            final String metadataIdentificationString) {
        final JavaType javaType = FinderMetadata
                .getJavaType(metadataIdentificationString);
        final LogicalPath path = FinderMetadata
                .getPath(metadataIdentificationString);
        return PhysicalTypeIdentifier.createIdentifier(javaType, path);
    }
View Full Code Here

        // We know governor type details are non-null and can be safely cast

        // Work out the MIDs of the other metadata we depend on
        final JavaType javaType = FinderMetadata
                .getJavaType(metadataIdentificationString);
        final LogicalPath path = FinderMetadata
                .getPath(metadataIdentificationString);
        final String jpaActiveRecordMetadataKey = JpaActiveRecordMetadata
                .createIdentifier(javaType, path);

        // We need to lookup the metadata we depend on
View Full Code Here

        final JavaType proxyType = new JavaType(
                destinationPackage.getFullyQualifiedPackageName() + "."
                        + entity.getName().getSimpleTypeName() + "Proxy");
        final String focusedModule = projectOperations.getFocusedModuleName();
        final LogicalPath proxyLogicalPath = LogicalPath.getInstance(
                SRC_MAIN_JAVA, focusedModule);
        final ClassOrInterfaceTypeDetailsBuilder cidBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                PhysicalTypeIdentifier.createIdentifier(proxyType,
                        proxyLogicalPath));
View Full Code Here

            final JavaPackage destinationPackage) {
        final JavaType requestType = new JavaType(
                destinationPackage.getFullyQualifiedPackageName() + "."
                        + entity.getType().getSimpleTypeName()
                        + "Request_Roo_Gwt");
        final LogicalPath focusedSrcMainJava = LogicalPath.getInstance(
                SRC_MAIN_JAVA, projectOperations.getFocusedModuleName());
        final ClassOrInterfaceTypeDetailsBuilder requestBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                PhysicalTypeIdentifier.createIdentifier(requestType,
                        focusedSrcMainJava));
        requestBuilder.setName(requestType);
View Full Code Here

        final JavaType unmanagedRequestType = new JavaType(
                destinationPackage.getFullyQualifiedPackageName() + "."
                        + entity.getType().getSimpleTypeName() + "Request");

        final LogicalPath focusedSrcMainJava = LogicalPath.getInstance(
                SRC_MAIN_JAVA, projectOperations.getFocusedModuleName());
        final ClassOrInterfaceTypeDetailsBuilder unmanagedRequestBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                PhysicalTypeIdentifier.createIdentifier(unmanagedRequestType,
                        focusedSrcMainJava));
        unmanagedRequestBuilder.setName(unmanagedRequestType);
View Full Code Here

    private static final Path PATH = Path.SRC_MAIN_JAVA; // Same as in the below

    @Test
    public void testGetLogicalPathFromMetadataInstanceId() {
        // Invoke
        final LogicalPath logicalPath = PhysicalTypeIdentifierNamingUtils
                .getPath(METADATA_INSTANCE_ID);

        // Check
        assertEquals(LogicalPath.getInstance(PATH, MODULE), logicalPath);
    }
View Full Code Here

TOP

Related Classes of org.springframework.roo.project.LogicalPath

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.