本文整理汇总了Java中org.raml.model.parameter.FormParameter类的典型用法代码示例。如果您正苦于以下问题:Java FormParameter类的具体用法?Java FormParameter怎么用?Java FormParameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FormParameter类属于org.raml.model.parameter包,在下文中一共展示了FormParameter类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getExampleBinaryUploadFormParameters
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
public Map<String, List<FormParameter>> getExampleBinaryUploadFormParameters() {
Map<String, List<FormParameter>> parameters = new HashMap<>();
FormParameter versionParameter = new FormParameter();
versionParameter.setExample("1.0");
versionParameter.setType(ParamType.STRING);
versionParameter.setDescription("Version of the node which should be updated. This information is used to determine conflicting updates.");
versionParameter.setRequired(true);
parameters.put("version", Arrays.asList(versionParameter));
FormParameter languageParameter = new FormParameter();
languageParameter.setExample("en");
languageParameter.setType(ParamType.STRING);
languageParameter.setDescription("Language of the node content which contains the binary field which should be updated.");
languageParameter.setRequired(true);
parameters.put("language", Arrays.asList(languageParameter));
FormParameter binaryParameter = new FormParameter();
binaryParameter.setDescription("Single binary file part.");
binaryParameter.setRequired(true);
binaryParameter.setType(ParamType.FILE);
parameters.put("binary", Arrays.asList(binaryParameter));
return parameters;
}
开发者ID:gentics,项目名称:mesh,代码行数:24,代码来源:NodeExamples.java
示例2: testConvertMimeType
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
@Test
public void testConvertMimeType() {
mimeType.setExample("mimeTypeExample");
mimeType.setSchema("mimeTypeSchema");
mimeType.setType("String");
List<FormParameter> formParameters = new ArrayList<>();
FormParameter formParam = new FormParameter();
formParam.setDisplayName("testFormParam");
Map<String, List<FormParameter>> formParameterMap = new HashMap<>();
formParameterMap.put("testFormParameterMap", formParameters);
mimeType.setFormParameters(formParameterMap);
ch.alv.components.web.api.config.MimeType result = converter.convertMimeType(mimeType);
assertEquals(mimeType.getExample(), result.getExample());
assertEquals(mimeType.getFormParameters().size(), result.getFormParameters().size());
assertEquals(mimeType.getSchema(), result.getSchema());
assertEquals("String", result.getType());
assertNull(converter.convertMimeType(null));
}
开发者ID:alv-ch,项目名称:alv-ch-java,代码行数:22,代码来源:RamlConverterTest.java
示例3: exampleRequest
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
@Override
public EndpointRoute exampleRequest(Map<String, List<FormParameter>> parameters) {
HashMap<String, MimeType> bodyMap = new HashMap<>();
MimeType mimeType = new MimeType();
mimeType.setFormParameters(parameters);
bodyMap.put("multipart/form-data", mimeType);
this.exampleRequestMap = bodyMap;
return this;
}
开发者ID:gentics,项目名称:mesh,代码行数:10,代码来源:EndpointImpl.java
示例4: apply
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
@Override
public void apply(FormParameter param, ResourceClassBuilder resourceClassBuilder) {
resourceClassBuilder.getApiClass()
.withMethod(new AddFormParamMethod(param, param.getDisplayName(),
resourceClassBuilder.getReq(), resourceClassBuilder.getApiClass()));
resourceClassBuilder.getDefaultsMethod().forParamDefaults(param.getDisplayName(), param);
}
开发者ID:qameta,项目名称:rarc,代码行数:9,代码来源:FormParamRule.java
示例5: extractFormParameters
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
Map<String, List<FormParameter>> extractFormParameters(Map<String, List<RamlFormParameter>> ramlFormParameters) {
Map<String, List<FormParameter>> formParameters = new LinkedHashMap<>(ramlFormParameters.size());
for(String key: ramlFormParameters.keySet()) {
formParameters.put(key, extractFormParameters(ramlFormParameters.get(key)));
}
return formParameters;
}
开发者ID:phoenixnap,项目名称:springmvc-raml-plugin,代码行数:8,代码来源:RJP08V1RamlModelFactory.java
示例6: testConvertFormParameters
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
@Test
public void testConvertFormParameters() {
List<FormParameter> sourceList = new ArrayList<>();
sourceList.add(new FormParameter());
List<ch.alv.components.web.api.config.FormParameter> result = converter.convertFormParameters(sourceList);
assertEquals(1, result.size());
assertNotNull(result.get(0));
}
开发者ID:alv-ch,项目名称:alv-ch-java,代码行数:9,代码来源:RamlConverterTest.java
示例7: testConvertFormParameter
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
@Test
public void testConvertFormParameter() {
FormParameter source = new FormParameter();
source.setDisplayName("testFormParam");
source.setExample("testFormParamExample");
source.setPattern("testFormParamPattern");
source.setType(ParamType.BOOLEAN);
source.setDefaultValue("testFormParamDefaultValue");
List<String> enums = new ArrayList<>();
enums.add("testValue");
source.setEnumeration(enums);
source.setMaximum(new BigDecimal("5"));
source.setMinimum(new BigDecimal("1"));
source.setMinLength(3);
source.setMaxLength(9);
source.setRepeat(true);
source.setRequired(true);
ch.alv.components.web.api.config.FormParameter result = converter.convertFormParameter(source);
assertEquals(source.getDisplayName(), result.getName());
assertEquals(source.getExample(), result.getExample());
assertEquals(source.getPattern(), result.getPattern());
assertEquals(ParameterType.BOOLEAN, result.getType());
assertEquals(source.getDefaultValue(), result.getDefaultValue());
assertEquals(source.getEnumeration(), result.getEnumeration());
assertEquals(source.getMaximum(), result.getMaximum());
assertEquals(source.getMinimum(), result.getMinimum());
assertEquals(source.getMinLength(), result.getMinLength());
assertEquals(source.getMaxLength(), result.getMaxLength());
assertEquals(source.isRepeat(), result.isRepeat());
assertEquals(source.isRequired(), result.isRequired());
assertNull(converter.convertFormParameter(null));
}
开发者ID:alv-ch,项目名称:alv-ch-java,代码行数:35,代码来源:RamlConverterTest.java
示例8: AddFormParamMethod
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
public AddFormParamMethod(FormParameter param, String name, ReqSpecField req, ApiResourceClass apiClass) {
this.param = param;
this.name = name;
this.req = req;
this.apiClass = apiClass;
}
开发者ID:qameta,项目名称:rarc,代码行数:7,代码来源:AddFormParamMethod.java
示例9: getParam
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
public FormParameter getParam() {
return param;
}
开发者ID:qameta,项目名称:rarc,代码行数:4,代码来源:AddFormParamMethod.java
示例10: extractFormParameter
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
FormParameter extractFormParameter(RamlFormParameter ramlFormParameter) {
return ((RJP08V1RamlFormParameter)ramlFormParameter).getFormParameter();
}
开发者ID:phoenixnap,项目名称:springmvc-raml-plugin,代码行数:4,代码来源:RJP08V1RamlModelFactory.java
示例11: createRamlFormParameter
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
@Override
public RamlFormParameter createRamlFormParameter() {
return createRamlFormParameter(new FormParameter());
}
开发者ID:phoenixnap,项目名称:springmvc-raml-plugin,代码行数:5,代码来源:RJP08V1RamlModelFactory.java
示例12: RJP08V1RamlFormParameter
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
public RJP08V1RamlFormParameter(FormParameter formParameter) {
this.formParameter = formParameter;
}
开发者ID:phoenixnap,项目名称:springmvc-raml-plugin,代码行数:4,代码来源:RJP08V1RamlFormParameter.java
示例13: exampleRequest
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
/**
* Set the endpoint request example via a form parameter list.
*
* @param parameters
* @return Fluent API
*/
EndpointRoute exampleRequest(Map<String, List<FormParameter>> parameters);
开发者ID:gentics,项目名称:mesh,代码行数:8,代码来源:EndpointRoute.java
示例14: getFormParameter
import org.raml.model.parameter.FormParameter; //导入依赖的package包/类
/**
* Expose internal representation only package private
* @return the internal model
*/
FormParameter getFormParameter() {
return formParameter;
}
开发者ID:phoenixnap,项目名称:springmvc-raml-plugin,代码行数:8,代码来源:RJP08V1RamlFormParameter.java
注:本文中的org.raml.model.parameter.FormParameter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论