当前位置: 首页>>代码示例>>Java>>正文


Java QueryParameter.setExample方法代码示例

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


在下文中一共展示了QueryParameter.setExample方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例8: 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

示例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 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

示例10: getRAMLParameters

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

	// w
	QueryParameter widthParameter = new QueryParameter();
	widthParameter.setDescription("Set image target width. The height will automatically be calculated if the width was omitted.");
	widthParameter.setExample("1280");
	widthParameter.setRequired(false);
	widthParameter.setType(ParamType.NUMBER);
	parameters.put(WIDTH_QUERY_PARAM_KEY, widthParameter);

	// h
	QueryParameter heightParameter = new QueryParameter();
	heightParameter.setDescription("Set image target height. The width will automatically be calculated if the height was omitted.");
	heightParameter.setExample("720");
	heightParameter.setRequired(false);
	heightParameter.setType(ParamType.NUMBER);
	parameters.put(HEIGHT_QUERY_PARAM_KEY, heightParameter);

	// fpx
	QueryParameter fpxParameter = new QueryParameter();
	fpxParameter.setDescription(
			"Set the focal point x factor between 0  and 1 where 0.5 is the middle of the image.  You can use this parameter in combination with the "
					+ CROP_MODE_QUERY_PARAM_KEY + "=" + CropMode.FOCALPOINT.getKey()
					+ " parameter in order to crop and resize the image in relation to the given point.");
	fpxParameter.setRequired(false);
	fpxParameter.setExample("0.1");
	fpxParameter.setType(ParamType.NUMBER);
	parameters.put(FOCAL_POINT_X_QUERY_PARAM_KEY, fpxParameter);

	// fpy
	QueryParameter fpyParameter = new QueryParameter();
	fpyParameter.setDescription(
			"Set the focal point y factor between 0  and 1 where 0.5 is the middle of the image. You can use this parameter in combination with the "
					+ CROP_MODE_QUERY_PARAM_KEY + "=" + CropMode.FOCALPOINT.getKey()
					+ " parameter in order to crop and resize the image in relation to the given point.");
	fpyParameter.setRequired(false);
	fpyParameter.setExample("0.2");
	fpyParameter.setType(ParamType.NUMBER);
	parameters.put(FOCAL_POINT_Y_QUERY_PARAM_KEY, fpyParameter);

	// fpz
	QueryParameter fpzParameter = new QueryParameter();
	fpzParameter.setDescription("Set the focal point zoom factor. The value must be greater than one.");
	fpzParameter.setRequired(false);
	fpzParameter.setExample("1.5");
	fpzParameter.setType(ParamType.NUMBER);
	parameters.put(FOCAL_POINT_Z_QUERY_PARAM_KEY, fpzParameter);

	// rect
	QueryParameter rectParameter = new QueryParameter();
	rectParameter.setDescription("Set image crop area.");
	rectParameter.setExample("20,20,128,128");
	rectParameter.setRequired(false);
	rectParameter.setType(ParamType.STRING);
	parameters.put(RECT_QUERY_PARAM_KEY, rectParameter);

	// crop
	QueryParameter cropParameter = new QueryParameter();
	cropParameter.setDescription("Set the crop mode. Possible modes: " + CropMode.description());
	cropParameter.setExample("rect");
	cropParameter.setRequired(false);
	cropParameter.setType(ParamType.STRING);
	parameters.put(CROP_MODE_QUERY_PARAM_KEY, cropParameter);

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


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