Package org.springframework.roo.project

Examples of org.springframework.roo.project.LogicalPath


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


        // abstract
        final ClassOrInterfaceTypeDetails cid = getEntity(entity);
        Validate.isTrue(!Modifier.isAbstract(cid.getModifier()),
                "Type %s is abstract", entity.getFullyQualifiedTypeName());

        final LogicalPath path = PhysicalTypeIdentifier.getPath(cid
                .getDeclaredByMetadataId());
        dataOnDemandOperations.newDod(entity,
                new JavaType(entity.getFullyQualifiedTypeName()
                        + "DataOnDemand"));

        final JavaType name = new JavaType(entity + "IntegrationTest");
        final String declaredByMetadataId = PhysicalTypeIdentifier
                .createIdentifier(name,
                        Path.SRC_TEST_JAVA.getModulePathId(path.getModule()));

        if (metadataService.get(declaredByMetadataId) != null) {
            // The file already exists
            return;
        }
View Full Code Here

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

            final String physicalTypeIdentifier) {
        Validate.isTrue(PhysicalTypeIdentifier.isValid(physicalTypeIdentifier),
                "Physical type identifier is invalid");
        final JavaType javaType = PhysicalTypeIdentifier
                .getJavaType(physicalTypeIdentifier);
        final LogicalPath path = PhysicalTypeIdentifier
                .getPath(physicalTypeIdentifier);
        return projectOperations.getPathResolver().getIdentifier(path,
                javaType.getRelativeFileName());
    }
View Full Code Here

        List<AnnotationMetadataBuilder> annotations = null;

        ClassOrInterfaceTypeDetailsBuilder cidBuilder = null;
        if (existingController == null) {
            final LogicalPath controllerPath = pathResolver
                    .getFocusedPath(Path.SRC_MAIN_JAVA);
            final String resourceIdentifier = typeLocationService
                    .getPhysicalTypeCanonicalPath(controller, controllerPath);
            final String declaredByMetadataId = PhysicalTypeIdentifier
                    .createIdentifier(controller,
View Full Code Here

            if (Modifier.isAbstract(entityDetails.getModifier())) {
                continue;
            }

            final JavaType entityType = entityDetails.getType();
            final LogicalPath entityPath = PhysicalTypeIdentifier
                    .getPath(entityDetails.getDeclaredByMetadataId());

            // Check to see if this persistent type has a web scaffold metadata
            // listening to it
            final String downstreamWebScaffoldMetadataId = WebScaffoldMetadata
View Full Code Here

        }
    }

    private String getDbreXmlPath() {
        for (final String moduleName : projectOperations.getModuleNames()) {
            final LogicalPath logicalPath = LogicalPath.getInstance(
                    Path.SRC_MAIN_RESOURCES, moduleName);
            final String dbreXmlPath = projectOperations.getPathResolver()
                    .getIdentifier(logicalPath, DBRE_XML);
            if (fileManager.exists(dbreXmlPath)) {
                return dbreXmlPath;
View Full Code Here

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

        }

        // Acquire bean info (we need getters details, specifically)
        final JavaType javaType = SolrWebSearchMetadata
                .getJavaType(metadataIdentificationString);
        final LogicalPath path = SolrWebSearchMetadata
                .getPath(metadataIdentificationString);
        final String webScaffoldMetadataKey = WebScaffoldMetadata
                .createIdentifier(javaType, path);

        // We want to be notified if the getter info changes in any way
        metadataDependencyRegistry.registerDependency(webScaffoldMetadataKey,
                metadataIdentificationString);
        final WebScaffoldMetadata webScaffoldMetadata = (WebScaffoldMetadata) metadataService
                .get(webScaffoldMetadataKey);

        // Abort if we don't have getter information available
        if (webScaffoldMetadata == null || !webScaffoldMetadata.isValid()) {
            return null;
        }

        final JavaType targetObject = webScaffoldMetadata.getAnnotationValues()
                .getFormBackingObject();
        Validate.notNull(
                targetObject,
                "Could not acquire form backing object for the '%s' controller",
                WebScaffoldMetadata.getJavaType(webScaffoldMetadata.getId())
                        .getFullyQualifiedTypeName());

        final String targetObjectMid = typeLocationService
                .getPhysicalTypeIdentifier(targetObject);
        final LogicalPath targetObjectPath = PhysicalTypeIdentifier
                .getPath(targetObjectMid);

        final SolrMetadata solrMetadata = (SolrMetadata) metadataService
                .get(SolrMetadata.createIdentifier(targetObject,
                        targetObjectPath));
View Full Code Here

        }
    }

    public MetadataItem get(final String metadataIdentificationString) {
        javaType = SolrJspMetadata.getJavaType(metadataIdentificationString);
        final LogicalPath path = SolrJspMetadata
                .getPath(metadataIdentificationString);
        final String solrWebSearchMetadataKeyString = SolrWebSearchMetadata
                .createIdentifier(javaType, path);
        final SolrWebSearchMetadata webSearchMetadata = (SolrWebSearchMetadata) metadataService
                .get(solrWebSearchMetadataKeyString);
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.