• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java QueryParameter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.raml.model.parameter.QueryParameter的典型用法代码示例。如果您正苦于以下问题:Java QueryParameter类的具体用法?Java QueryParameter怎么用?Java QueryParameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



QueryParameter类属于org.raml.model.parameter包,在下文中一共展示了QueryParameter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getRAMLParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
@Override
public Map<? extends String, ? extends QueryParameter> getRAMLParameters() {
	Map<String, QueryParameter> parameters = new HashMap<>();

	// role
	QueryParameter pageParameter = new QueryParameter();
	pageParameter.setDescription(
			"The _role_ query parameter take a UUID of a role and may be used to add permission information to the response via the _rolePerm_ property which lists the permissions for the specified role on the element.\n"
					+ "This may be useful when you are logged in as admin but you want to retrieve the editor role permissions on a given node.\n"
					+ "Endpoint: */api/v1/:projectName/nodes?role=:roleUuid*");
	pageParameter.setExample("24cf92691c7641158f92691c76c115ef");
	pageParameter.setRequired(false);
	pageParameter.setType(ParamType.STRING);
	parameters.put(ROLE_PERMISSION_QUERY_PARAM_KEY, pageParameter);

	return parameters;
}
 
开发者ID:gentics,项目名称:mesh,代码行数:18,代码来源:RolePermissionParametersImpl.java


示例2: getRAMLParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
@Override
public Map<? extends String, ? extends QueryParameter> getRAMLParameters() {
	Map<String, QueryParameter> parameters = new HashMap<>();

	// release
	QueryParameter pageParameter = new QueryParameter();
	pageParameter.setDescription(
			"Specifies the release to be used for loading data. The latest project release will be used if this parameter is omitted.");
	pageParameter.setExample("24cf92691c7641158f92691c76c115ef");
	pageParameter.setRequired(false);
	pageParameter.setType(ParamType.STRING);
	parameters.put(RELEASE_QUERY_PARAM_KEY, pageParameter);

	// version
	QueryParameter versionParameter = new QueryParameter();
	versionParameter.setDefaultValue("draft");
	versionParameter.setDescription(
			"Specifies the version to be loaded. Can either be published/draft or version number. e.g.: _0.1_, _1.0_, _draft_, _published_.");
	versionParameter.setExample("1.1");
	versionParameter.setRequired(false);
	versionParameter.setType(ParamType.STRING);
	parameters.put(VERSION_QUERY_PARAM_KEY, versionParameter);
	return parameters;
}
 
开发者ID:gentics,项目名称:mesh,代码行数:25,代码来源:VersioningParametersImpl.java


示例3: getRAMLParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
@Override
public Map<? extends String, ? extends QueryParameter> getRAMLParameters() {
	Map<String, QueryParameter> parameters = new HashMap<>();

	// includeAll
	QueryParameter includeAllParameter = new QueryParameter();
	includeAllParameter.setDescription(
			"If set to true all nodes will be included in the response. By default only container nodes are included in a navigation response.");
	includeAllParameter.setExample("true");
	includeAllParameter.setRequired(false);
	includeAllParameter.setType(ParamType.BOOLEAN);
	parameters.put(INCLUDE_ALL_QUERY_PARAM_KEY, includeAllParameter);

	// maxDepth
	QueryParameter maxDepthParameter = new QueryParameter();
	maxDepthParameter.setDescription("Specifies the maximum depth for the requested navigation tree structure.");
	maxDepthParameter.setExample("5");
	maxDepthParameter.setDefaultValue("10");
	maxDepthParameter.setRequired(false);
	maxDepthParameter.setType(ParamType.NUMBER);
	parameters.put(MAX_DEPTH_QUERY_PARAM_KEY, maxDepthParameter);

	return parameters;
}
 
开发者ID:gentics,项目名称:mesh,代码行数:25,代码来源:NavigationParametersImpl.java


示例4: getRAMLParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
@Override
public Map<? extends String, ? extends QueryParameter> getRAMLParameters() {
	Map<String, QueryParameter> parameters = new HashMap<>();

	QueryParameter updateAssigned = new QueryParameter();
	updateAssigned.setDescription("Update the schema version for all releases which already utilize the schema.");
	updateAssigned.setDefaultValue("true");
	updateAssigned.setType(ParamType.BOOLEAN);
	updateAssigned.setDefaultValue("true");
	parameters.put(UPDATE_ASSIGNED_RELEASES_QUERY_PARAM_KEY, updateAssigned);

	QueryParameter releaseNames = new QueryParameter();
	releaseNames.setDescription(
			"List of release names which should be included in the update process. By default all releases which use the schema will be updated. You can thus use this parameter to only include a subset of release in the update.");
	releaseNames.setType(ParamType.STRING);
	releaseNames.setExample("summerRelease,winterRelease");
	parameters.put(UPDATE_RELEASE_NAMES_QUERY_PARAM_KEY, releaseNames);

	return parameters;
}
 
开发者ID:gentics,项目名称:mesh,代码行数:21,代码来源:SchemaUpdateParametersImpl.java


示例5: getRAMLParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
@Override
public Map<? extends String, ? extends QueryParameter> getRAMLParameters() {
	Map<String, QueryParameter> parameters = new HashMap<>();

	// lang
	QueryParameter langParameter = new QueryParameter();
	langParameter.setDescription(
			"ISO 639-1 language tag of the language which should be loaded. Fallback handling can be applied by specifying multiple languages in a comma-separated list. The first matching language will be returned.  If omitted or the requested language is not available then the _defaultLanguage_ as configured in _mesh.yml_ will be returned.");
	langParameter.setExample("en,de");
	langParameter.setRequired(false);
	langParameter.setType(ParamType.STRING);
	parameters.put(LANGUAGES_QUERY_PARAM_KEY, langParameter);

	// resolveLinks
	QueryParameter resolveLinksParameter = new QueryParameter();
	resolveLinksParameter.setDescription(
			"The resolve links parameter can be set to either _short_, _medium_ or _full_. Stored mesh links will automatically be resolved and replaced by the resolved webroot link. With the parameter set the _path_ property as well as the _languagesPath_ property (for available language variants) will be included in the response. Gentics Mesh links in any HTML-typed field will automatically be resolved and replaced by the resolved link:features.html#_link_resolving[WebRoot path]. No resolving occurs if no link has been specified.");
	resolveLinksParameter.setExample("medium");
	resolveLinksParameter.setRequired(false);
	resolveLinksParameter.setType(ParamType.STRING);
	parameters.put(RESOLVE_LINKS_QUERY_PARAM_KEY, resolveLinksParameter);

	return parameters;
}
 
开发者ID:gentics,项目名称:mesh,代码行数:25,代码来源:NodeParametersImpl.java


示例6: getRAMLParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
@Override
public Map<? extends String, ? extends QueryParameter> getRAMLParameters() {
	Map<String, QueryParameter> parameters = new HashMap<>();
	// page
	QueryParameter pageParameter = new QueryParameter();
	pageParameter.setDefaultValue(String.valueOf(DEFAULT_PAGE));
	pageParameter.setDescription("Number of page to be loaded.");
	pageParameter.setExample("42");
	pageParameter.setRequired(false);
	pageParameter.setType(ParamType.NUMBER);
	parameters.put(PAGE_PARAMETER_KEY, pageParameter);

	// perPage
	QueryParameter perPageParameter = new QueryParameter();
	perPageParameter.setDefaultValue(String.valueOf(DEFAULT_PAGE_SIZE));
	perPageParameter.setDescription("Number of elements per page.");
	perPageParameter.setExample("42");
	perPageParameter.setRequired(false);
	perPageParameter.setType(ParamType.NUMBER);
	parameters.put(PER_PAGE_PARAMETER_KEY, perPageParameter);
	return parameters;
}
 
开发者ID:gentics,项目名称:mesh,代码行数:23,代码来源:PagingParametersImpl.java


示例7: addQueryParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
private void addQueryParameters(Action action, DCMethod method)
{
  Map<String, QueryParameter> params = action.getQueryParameters();
  for (String paramName : params.keySet())
  {
    QueryParameter param = params.get(paramName);
    DCMethodParameter methodParam = new DCMethodParameter();
    methodParam.setPathParam(false);
    methodParam.setName(paramName);
    ParamType paramType = param.getType();
    String type = paramType != null? paramType.name(): "string";
    Class javaType = typeMapping.get(type);
    if (javaType==null)
    {
      javaType = String.class;
      methodParam.setJavaType(javaType.getName());
    }
    method.addParam(methodParam);        
  }
}
 
开发者ID:oracle,项目名称:mobile-persistence,代码行数:21,代码来源:RAMLParser.java


示例8: getRAMLParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
@Override
public Map<? extends String, ? extends QueryParameter> getRAMLParameters() {
	Map<String, QueryParameter> parameters = new HashMap<>();
	// token
	QueryParameter pageParameter = new QueryParameter();
	pageParameter.setDescription(
			"Token code which can be used to update the user even if the connection is not authenticated. This can be used to implement a password recovery feature.");
	pageParameter.setExample(TokenUtil.randomToken());
	pageParameter.setRequired(false);
	pageParameter.setType(ParamType.STRING);
	parameters.put(TOKEN_PARAMETER_KEY, pageParameter);

	return parameters;
}
 
开发者ID:gentics,项目名称:mesh,代码行数:15,代码来源:UserParametersImpl.java


示例9: getRAMLParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
@Override
public Map<? extends String, ? extends QueryParameter> getRAMLParameters() {
	Map<String, QueryParameter> parameters = new HashMap<>();

	// recursive
	QueryParameter recursiveParameter = new QueryParameter();
	recursiveParameter.setDefaultValue("false");
	recursiveParameter.setDescription("Specifiy whether the invoked action should be applied recursively.");
	recursiveParameter.setExample("true");
	recursiveParameter.setRequired(false);
	recursiveParameter.setType(ParamType.BOOLEAN);
	parameters.put(RECURSIVE_PARAMETER_KEY, recursiveParameter);

	return parameters;
}
 
开发者ID:gentics,项目名称:mesh,代码行数:16,代码来源:PublishParametersImpl.java


示例10: getRAMLParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
@Override
public Map<? extends String, ? extends QueryParameter> getRAMLParameters() {
	Map<String, QueryParameter> parameters = new HashMap<>();

	// recursive
	QueryParameter recursiveParameter = new QueryParameter();
	recursiveParameter.setDefaultValue("false");
	recursiveParameter.setDescription("Specifiy whether deletion should also be applied recursively");
	recursiveParameter.setExample("true");
	recursiveParameter.setRequired(false);
	recursiveParameter.setType(ParamType.BOOLEAN);
	parameters.put(RECURSIVE_PARAMETER_KEY, recursiveParameter);

	return parameters;
}
 
开发者ID:gentics,项目名称:mesh,代码行数:16,代码来源:DeleteParametersImpl.java


示例11: renderParameterTable

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
private String renderParameterTable(Class<?> clazz) throws Exception {
	System.out.println(clazz.getName());
	AbstractParameters parameterObj = (AbstractParameters) clazz.newInstance();
	Map<? extends String, ? extends QueryParameter> ramlParameters = parameterObj.getRAMLParameters();

	Map<String, Object> context = new HashMap<>();
	List<Map<String, String>> list = new ArrayList<>();
	for (Entry<? extends String, ? extends QueryParameter> entry : ramlParameters.entrySet()) {
		String name = entry.getKey();
		QueryParameter value = entry.getValue();
		Map<String, String> paramDescription = new HashMap<>();
		paramDescription.put("name", name);
		paramDescription.put("type", value.getType().name().toLowerCase());
		paramDescription.put("default", value.getDefaultValue());
		paramDescription.put("example", value.getExample());
		paramDescription.put("description", value.getDescription());
		paramDescription.put("required", String.valueOf(value.isRequired()));
		list.add(paramDescription);
	}

	// Order list by field parameter name
	Collections.sort(list, new Comparator<Map<String, String>>() {
		@Override
		public int compare(Map<String, String> a1, Map<String, String> a2) {
			return a1.get("name").compareTo(a2.get("name"));
		}
	});

	context.put("entries", list);
	context.put("name", parameterObj.getName());
	return renderTable(context, paramTableTemplateSource);
}
 
开发者ID:gentics,项目名称:mesh,代码行数:33,代码来源:TableGenerator.java


示例12: apply

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
@Override
public void apply(QueryParameter param, ResourceClassBuilder resourceClassBuilder) {
    resourceClassBuilder.getApiClass().withMethod(
            new AddQueryParamMethod(param, param.getDisplayName(), resourceClassBuilder.getReq(),
                    resourceClassBuilder.getApiClass()));

    resourceClassBuilder.getDefaultsMethod().forParamDefaults(param.getDisplayName(), param);
}
 
开发者ID:qameta,项目名称:rarc,代码行数:9,代码来源:QueryParamRule.java


示例13: getParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
@Override
protected Map<String, ? extends AbstractParam> getParameters() {
    if (!expectation().hasValidAction())
        return new HashMap<>();

    Map<String, QueryParameter> parameters = expectation().getAction().get().getQueryParameters();
    return parameters == null ? new HashMap<>() : parameters;
}
 
开发者ID:ozwolf-software,项目名称:raml-mock-server,代码行数:9,代码来源:RequestQueryParametersValidator.java


示例14: queryTokenParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
private Map<String, QueryParameter> queryTokenParameters() {
    Map<String, QueryParameter> parameters = new HashMap<>();

    QueryParameter parameter = new QueryParameter();
    parameter.setRequired(true);
    parameter.setRepeat(false);
    parameter.setType(ParamType.INTEGER);

    parameters.put("token", parameter);

    return parameters;
}
 
开发者ID:ozwolf-software,项目名称:raml-mock-server,代码行数:13,代码来源:RequestSecurityValidatorTest.java


示例15: queryParameter

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
private Map<String, QueryParameter> queryParameter(boolean required, boolean repeatable) {
    QueryParameter parameter = new QueryParameter();
    parameter.setRequired(required);
    parameter.setRepeat(repeatable);
    parameter.setType(ParamType.INTEGER);
    Map<String, QueryParameter> parameters = new HashMap<>();
    parameters.put("ttl", parameter);
    return parameters;
}
 
开发者ID:ozwolf-software,项目名称:raml-mock-server,代码行数:10,代码来源:RequestQueryParametersValidatorTest.java


示例16: generateCombinationsOpt

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
private List<String> generateCombinationsOpt(String aUrl, Map<String, QueryParameter> aParams, String aSep) {
	List<String> oReturn=new ArrayList<String>(Arrays.asList(aUrl));
	Map<String, QueryParameter> oParams=new HashMap<String, QueryParameter>(aParams);
	for(Map.Entry<String, QueryParameter> oE:aParams.entrySet()) {
		String oUrl=aUrl;
		String oSep=aSep;
		if(!oE.getValue().isRequired()) {
			oUrl+=oSep+oE.getKey()+"="+Utils.encode(Resolver.getValueParam(oE.getValue(), oE.getKey(), "[QueryParameter]"));
			oSep="&";
			oParams.remove(oE.getKey());
			oReturn.addAll(generateCombinationsOpt(oUrl, oParams, oSep));
		}
	}
	return oReturn;
}
 
开发者ID:pagesjaunes,项目名称:raml-codegen,代码行数:16,代码来源:ActionAdaptator.java


示例17: generateCombinations

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
private List<String> generateCombinations(String aUrl) {
	Map<String, QueryParameter> oParameters=action.getQueryParameters();
	String oSep="?";
	for(Map.Entry<String, QueryParameter> oE:oParameters.entrySet()) {
		if(oE.getValue().isRequired()) {
			aUrl+=oSep+oE.getKey()+"="+Utils.encode(Resolver.getValueParam(oE.getValue(), oE.getKey(), "[QueryParameter]"));
			oSep="&";
		}
	}
	return generateCombinationsOpt(aUrl, oParameters, oSep);
}
 
开发者ID:pagesjaunes,项目名称:raml-codegen,代码行数:12,代码来源:ActionAdaptator.java


示例18: hasRequired

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
private boolean hasRequired() {
	for(Map.Entry<String, QueryParameter> oE:action.getQueryParameters().entrySet()) {
		if(oE.getValue().isRequired()) {
			return true;
		}
	}
	return false;
}
 
开发者ID:pagesjaunes,项目名称:raml-codegen,代码行数:9,代码来源:ActionAdaptator.java


示例19: convertQueryParameters

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
public List<ch.alv.components.web.api.config.QueryParameter> convertQueryParameters(List<QueryParameter> source) {
    List<ch.alv.components.web.api.config.QueryParameter> list = new ArrayList<>();
    if (CollectionUtils.isEmpty(source)) {
        return list;
    }
    for (QueryParameter parameter : source) {
        list.add(convertQueryParameter(parameter));
    }
    return list;
}
 
开发者ID:alv-ch,项目名称:alv-ch-java,代码行数:11,代码来源:RamlConverter.java


示例20: testConvertQueryParametersList

import org.raml.model.parameter.QueryParameter; //导入依赖的package包/类
@Test
public void testConvertQueryParametersList() {
    List<ch.alv.components.web.api.config.QueryParameter> result = converter.convertQueryParameters(queryParamsMap);
    assertEquals(1, result.size());
    assertEquals(queryParameter.getDisplayName(), result.get(0).getName());
    assertEquals(0, converter.convertQueryParameters(new ArrayList<QueryParameter>()).size());
}
 
开发者ID:alv-ch,项目名称:alv-ch-java,代码行数:8,代码来源:RamlConverterTest.java



注:本文中的org.raml.model.parameter.QueryParameter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SimpleMessage类代码示例发布时间:2022-05-21
下一篇:
Java RepositoryPolicy类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap