Examples of StringAttributeValue


Examples of org.springframework.roo.classpath.details.annotations.StringAttributeValue

    private AnnotationMetadataBuilder getRooWebScaffoldAnnotation(
            final JavaType entity, final Set<String> disallowedOperations,
            final String path, final JavaSymbolName pathName) {
        final List<AnnotationAttributeValue<?>> rooWebScaffoldAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        rooWebScaffoldAttributes.add(new StringAttributeValue(pathName, path));
        rooWebScaffoldAttributes.add(new ClassAttributeValue(
                new JavaSymbolName("formBackingObject"), entity));
        for (final String operation : disallowedOperations) {
            rooWebScaffoldAttributes.add(new BooleanAttributeValue(
                    new JavaSymbolName(operation), false));
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.StringAttributeValue

        .asList(new JavaSymbolName("uiModel"));

    final List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>();

    final List<AnnotationAttributeValue<?>> requestMappingAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    requestMappingAttributes.add(new StringAttributeValue(
        new JavaSymbolName("params"), "form"));
    requestMappingAttributes.add(PRODUCES_HTML);
    final AnnotationMetadataBuilder requestMapping = new AnnotationMetadataBuilder(
        REQUEST_MAPPING, requestMappingAttributes);
    annotations.add(requestMapping);
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.StringAttributeValue

      deleteMethodCall = fieldName + "."
          + deleteMethodAdditions.getMethodName() + "()";
    }

    final List<AnnotationAttributeValue<?>> attributes = new ArrayList<AnnotationAttributeValue<?>>();
    attributes.add(new StringAttributeValue(new JavaSymbolName("value"),
        idFieldName.getSymbolName()));
    final AnnotationMetadataBuilder pathVariableAnnotation = new AnnotationMetadataBuilder(
        PATH_VARIABLE, attributes);

    final List<AnnotationAttributeValue<?>> firstResultAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    firstResultAttributes.add(new StringAttributeValue(new JavaSymbolName(
        "value"), "page"));
    firstResultAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
        "required"), false));
    final AnnotationMetadataBuilder firstResultAnnotation = new AnnotationMetadataBuilder(
        REQUEST_PARAM, firstResultAttributes);

    final List<AnnotationAttributeValue<?>> maxResultsAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    maxResultsAttributes.add(new StringAttributeValue(new JavaSymbolName(
        "value"), "size"));
    maxResultsAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
        "required"), false));
    final AnnotationMetadataBuilder maxResultAnnotation = new AnnotationMetadataBuilder(
        REQUEST_PARAM, maxResultsAttributes);

    final List<AnnotatedJavaType> parameterTypes = Arrays.asList(
        new AnnotatedJavaType(javaTypePersistenceMetadataHolder
            .getIdentifierType(), pathVariableAnnotation.build()),
        new AnnotatedJavaType(new JavaType(Integer.class.getName()),
            firstResultAnnotation.build()), new AnnotatedJavaType(
            new JavaType(Integer.class.getName()),
            maxResultAnnotation.build()), new AnnotatedJavaType(
            MODEL));
    final List<JavaSymbolName> parameterNames = Arrays.asList(idFieldName,
        new JavaSymbolName("page"), new JavaSymbolName("size"),
        new JavaSymbolName("uiModel"));

    final List<AnnotationAttributeValue<?>> requestMappingAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    requestMappingAttributes.add(new StringAttributeValue(
        new JavaSymbolName("value"), "/{" + idFieldName.getSymbolName()
            + "}"));
    requestMappingAttributes.add(new EnumAttributeValue(new JavaSymbolName(
        "method"), new EnumDetails(REQUEST_METHOD, new JavaSymbolName(
        "DELETE"))));
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.StringAttributeValue

    if (governorHasMethodWithSameName(methodName)) {
      return null;
    }

    final List<AnnotationAttributeValue<?>> firstResultAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    firstResultAttributes.add(new StringAttributeValue(new JavaSymbolName(
        "value"), "page"));
    firstResultAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
        "required"), false));
    final AnnotationMetadataBuilder firstResultAnnotation = new AnnotationMetadataBuilder(
        REQUEST_PARAM, firstResultAttributes);

    final List<AnnotationAttributeValue<?>> maxResultsAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    maxResultsAttributes.add(new StringAttributeValue(new JavaSymbolName(
        "value"), "size"));
    maxResultsAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
        "required"), false));
    final AnnotationMetadataBuilder maxResultAnnotation = new AnnotationMetadataBuilder(
        REQUEST_PARAM, maxResultsAttributes);

    final List<AnnotationAttributeValue<?>> sortFieldNameAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    sortFieldNameAttributes.add(new StringAttributeValue(
        new JavaSymbolName("value"), "sortFieldName"));
    sortFieldNameAttributes.add(new BooleanAttributeValue(
        new JavaSymbolName("required"), false));
    final AnnotationMetadataBuilder sortFieldNameAnnotation = new AnnotationMetadataBuilder(
        REQUEST_PARAM, sortFieldNameAttributes);

    final List<AnnotationAttributeValue<?>> sortOrderAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    sortOrderAttributes.add(new StringAttributeValue(new JavaSymbolName(
        "value"), "sortOrder"));
    sortOrderAttributes.add(new BooleanAttributeValue(new JavaSymbolName(
        "required"), false));
    final AnnotationMetadataBuilder sortOrderAnnotation = new AnnotationMetadataBuilder(
        REQUEST_PARAM, sortOrderAttributes);
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.StringAttributeValue

      return null;
    }

    final List<AnnotationAttributeValue<?>> attributes = new ArrayList<AnnotationAttributeValue<?>>();
    final String idFieldName = idField.getFieldName().getSymbolName();
    attributes.add(new StringAttributeValue(new JavaSymbolName("value"),
        idFieldName));
    final AnnotationMetadataBuilder pathVariableAnnotation = new AnnotationMetadataBuilder(
        PATH_VARIABLE, attributes);

    final List<AnnotatedJavaType> parameterTypes = Arrays.asList(
        new AnnotatedJavaType(javaTypePersistenceMetadataHolder
            .getIdentifierType(), pathVariableAnnotation.build()),
        new AnnotatedJavaType(MODEL));
    final List<JavaSymbolName> parameterNames = Arrays.asList(
        new JavaSymbolName(idFieldName), new JavaSymbolName("uiModel"));

    final List<AnnotationAttributeValue<?>> requestMappingAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    requestMappingAttributes.add(new StringAttributeValue(
        new JavaSymbolName("value"), "/{" + idFieldName + "}"));
    requestMappingAttributes.add(PRODUCES_HTML);
    final AnnotationMetadataBuilder requestMapping = new AnnotationMetadataBuilder(
        REQUEST_MAPPING, requestMappingAttributes);
    final List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>();
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.StringAttributeValue

      return null;
    }

    final String idFieldName = idField.getFieldName().getSymbolName();
    final List<AnnotationAttributeValue<?>> attributes = new ArrayList<AnnotationAttributeValue<?>>();
    attributes.add(new StringAttributeValue(new JavaSymbolName("value"),
        idFieldName));
    final AnnotationMetadataBuilder pathVariableAnnotation = new AnnotationMetadataBuilder(
        PATH_VARIABLE, attributes);

    final List<AnnotatedJavaType> parameterTypes = Arrays.asList(
        new AnnotatedJavaType(javaTypePersistenceMetadataHolder
            .getIdentifierType(), pathVariableAnnotation.build()),
        new AnnotatedJavaType(MODEL));
    final List<JavaSymbolName> parameterNames = Arrays.asList(
        new JavaSymbolName(idFieldName), new JavaSymbolName("uiModel"));

    final List<AnnotationAttributeValue<?>> requestMappingAttributes = new ArrayList<AnnotationAttributeValue<?>>();
    requestMappingAttributes.add(new StringAttributeValue(
        new JavaSymbolName("value"), "/{" + idFieldName + "}"));
    requestMappingAttributes.add(new StringAttributeValue(
        new JavaSymbolName("params"), "form"));
    requestMappingAttributes.add(PRODUCES_HTML);
    final AnnotationMetadataBuilder requestMapping = new AnnotationMetadataBuilder(
        REQUEST_MAPPING, requestMappingAttributes);
    final List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>();
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.StringAttributeValue

                exclusionList.add(attributeValue.getValue());
            }
        }
        else if (excludeAttribute != null
                && excludeAttribute instanceof StringAttributeValue) {
            final StringAttributeValue excludeStringAttribute = (StringAttributeValue) excludeAttribute;
            exclusionList.add(excludeStringAttribute.getValue());
        }

        final List<String> readOnlyList = new ArrayList<String>();
        final AnnotationAttributeValue<?> readOnlyAttribute = mirrorAnnotation
                .getAttribute("readOnly");
        if (readOnlyAttribute != null
                && readOnlyAttribute instanceof ArrayAttributeValue) {
            @SuppressWarnings("unchecked")
            final ArrayAttributeValue<StringAttributeValue> readOnlyArrayAttribute = (ArrayAttributeValue<StringAttributeValue>) readOnlyAttribute;
            for (final StringAttributeValue attributeValue : readOnlyArrayAttribute
                    .getValue()) {
                readOnlyList.add(attributeValue.getValue());
            }
        }
        else if (readOnlyAttribute != null
                && readOnlyAttribute instanceof StringAttributeValue) {
            final StringAttributeValue readOnlyStringAttribute = (StringAttributeValue) readOnlyAttribute;
            readOnlyList.add(readOnlyStringAttribute.getValue());
        }

        final ClassOrInterfaceTypeDetails mirroredDetails = typeLocationService
                .getTypeDetails(mirroredType);
        if (mirroredDetails == null
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.StringAttributeValue

        if (governorHasMethodWithSameName(methodName)) {
            return null;
        }

        final List<AnnotationAttributeValue<?>> reqMapAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        reqMapAttributes.add(new StringAttributeValue(new JavaSymbolName(
                "params"), "autocomplete"));

        final List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>();
        annotations.add(new AnnotationMetadataBuilder(REQUEST_MAPPING,
                reqMapAttributes));
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.StringAttributeValue

        final List<AnnotationAttributeValue<?>> attributeValue = new ArrayList<AnnotationAttributeValue<?>>();
        if (!required) {
            attributeValue.add(new BooleanAttributeValue(new JavaSymbolName(
                    "required"), false));
        }
        attributeValue.add(new StringAttributeValue(
                new JavaSymbolName("value"), paramName));
        return new AnnotationMetadataBuilder(REQUEST_PARAM, attributeValue)
                .build();
    }
View Full Code Here

Examples of org.springframework.roo.classpath.details.annotations.StringAttributeValue

        parameterTypes.add(new AnnotatedJavaType(MODEL_MAP));
        parameterNames.add(new JavaSymbolName("modelMap"));

        final List<AnnotationAttributeValue<?>> requestMappingAttributes = new ArrayList<AnnotationAttributeValue<?>>();
        requestMappingAttributes.add(new StringAttributeValue(
                new JavaSymbolName("params"), "search"));
        final AnnotationMetadataBuilder requestMapping = new AnnotationMetadataBuilder(
                REQUEST_MAPPING, requestMappingAttributes);

        final List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>();
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.