Package org.springframework.roo.classpath.details.annotations

Examples of org.springframework.roo.classpath.details.annotations.AnnotationMetadataBuilder.addAttribute()


        }

        // Build interface type
        final AnnotationMetadataBuilder interfaceAnnotationMetadata = new AnnotationMetadataBuilder(
                ROO_REPOSITORY_MONGO);
        interfaceAnnotationMetadata.addAttribute(new ClassAttributeValue(
                new JavaSymbolName("domainType"), domainType));
        final String interfaceMdId = PhysicalTypeIdentifier.createIdentifier(
                interfaceType, pathResolver.getPath(interfaceIdentifier));
        final ClassOrInterfaceTypeDetailsBuilder cidBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                interfaceMdId, Modifier.PUBLIC, interfaceType,
View Full Code Here


            return; // Type already exists - nothing to do
        }
        Validate.notNull(domainType, "Domain type required");
        final AnnotationMetadataBuilder interfaceAnnotationMetadata = new AnnotationMetadataBuilder(
                ROO_SERVICE);
        interfaceAnnotationMetadata
                .addAttribute(new ArrayAttributeValue<ClassAttributeValue>(
                        new JavaSymbolName("domainTypes"), Arrays
                                .asList(new ClassAttributeValue(
                                        new JavaSymbolName("foo"), domainType))));
        if (role == null) {
View Full Code Here

        if (requireAuthentication || usePermissionEvaluator || !role.equals("")) {
            interfaceAnnotationMetadata.addBooleanAttribute(
                    "requireAuthentication", requireAuthentication);
        }
        if (!role.equals("")) {
            interfaceAnnotationMetadata
                    .addAttribute(new ArrayAttributeValue<StringAttributeValue>(
                            new JavaSymbolName("authorizedCreateOrUpdateRoles"),
                            Arrays.asList(new StringAttributeValue(
                                    new JavaSymbolName("bar"), role))));
            interfaceAnnotationMetadata
View Full Code Here

            interfaceAnnotationMetadata
                    .addAttribute(new ArrayAttributeValue<StringAttributeValue>(
                            new JavaSymbolName("authorizedCreateOrUpdateRoles"),
                            Arrays.asList(new StringAttributeValue(
                                    new JavaSymbolName("bar"), role))));
            interfaceAnnotationMetadata
                    .addAttribute(new ArrayAttributeValue<StringAttributeValue>(
                            new JavaSymbolName("authorizedReadRoles"), Arrays
                                    .asList(new StringAttributeValue(
                                            new JavaSymbolName("bar"), role))));
            interfaceAnnotationMetadata
View Full Code Here

            interfaceAnnotationMetadata
                    .addAttribute(new ArrayAttributeValue<StringAttributeValue>(
                            new JavaSymbolName("authorizedReadRoles"), Arrays
                                    .asList(new StringAttributeValue(
                                            new JavaSymbolName("bar"), role))));
            interfaceAnnotationMetadata
                    .addAttribute(new ArrayAttributeValue<StringAttributeValue>(
                            new JavaSymbolName("authorizedDeleteRoles"), Arrays
                                    .asList(new StringAttributeValue(
                                            new JavaSymbolName("bar"), role))));
        }
View Full Code Here

        }

        // Build interface type
        final AnnotationMetadataBuilder interfaceAnnotationMetadata = new AnnotationMetadataBuilder(
                ROO_REPOSITORY_JPA);
        interfaceAnnotationMetadata.addAttribute(new ClassAttributeValue(
                new JavaSymbolName("domainType"), domainType));
        final String interfaceMdId = PhysicalTypeIdentifier.createIdentifier(
                interfaceType, pathResolver.getPath(interfaceIdentifier));
        final ClassOrInterfaceTypeDetailsBuilder cidBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                interfaceMdId, Modifier.PUBLIC, interfaceType,
View Full Code Here

            final List<StringAttributeValue> attributes = new ArrayList<StringAttributeValue>();
            for (final String excludeField : excludeFields) {
                attributes.add(new StringAttributeValue(new JavaSymbolName(
                        "value"), excludeField));
            }
            annotationBuilder
                    .addAttribute(new ArrayAttributeValue<StringAttributeValue>(
                            new JavaSymbolName("excludeFields"), attributes));
        }

        final ClassOrInterfaceTypeDetailsBuilder cidBuilder = new ClassOrInterfaceTypeDetailsBuilder(
View Full Code Here

        cidBuilder.addAnnotation(getAnnotation(jsonEntity));
        cidBuilder.addAnnotation(new AnnotationMetadataBuilder(
                SpringJavaType.CONTROLLER));
        final AnnotationMetadataBuilder requestMapping = new AnnotationMetadataBuilder(
                SpringJavaType.REQUEST_MAPPING);
        requestMapping.addAttribute(new StringAttributeValue(
                new JavaSymbolName("value"), "/"
                        + pluralMetadata.getPlural().toLowerCase()));
        cidBuilder.addAnnotation(requestMapping);
        typeManagementService.createOrUpdateTypeOnDisk(cidBuilder.build());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.