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


Java ParamParser类代码示例

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


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

示例1: createFolder

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
/**
 * Create a metadata folder to the corresponding path
 * 
 * @param userName
 * @param containerName
 * @param parentPath
 * @return
 */
// TODO creation should be removed from SLUG header to json
@POST
@Path(OrionConstantValues.ORION_FILE_PATH + "{userWorkspace}/{containerName}/{parentPath}")
@RequestFilters({ EmptyRequestFilter.class, CreateFolderFilter.class, CreateHiddenFileFilter.class,
      CreateReadonlyFileFilter.class, CreateFileNameFilter.class })
@Produces(MediaType.APPLICATION_JSON)
@Headers(keys = { OrionHttpFields.ORION_VERSION_FIELD }, values = { OrionConstantValues.ORION_VERSION })
@ResponseParser(CreationResponseParser.class)
@Fallback(SameFileWithDiffTypeFallback.class)
boolean createFolder(@PathParam("userWorkspace") String userName, @PathParam("containerName") String containerName,
      @PathParam("parentPath") @ParamParser(EncodeBlobParentPathParamParser.class) String parentPath,
      @HeaderParam(OrionHttpFields.HEADER_SLUG) String blobName);
 
开发者ID:timur-han,项目名称:orion-jclouds,代码行数:21,代码来源:OrionApi.java

示例2: getBlob

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
/**
 * Get the blob on the path. This starts with a metadata request and then
 * file content is requested if the metadata could be fetched successfully.
 * 
 * @param userName
 * @param containerName
 * @param parentPath
 * @param blobName
 * @return
 */
@GET
@Path(OrionConstantValues.ORION_FILE_PATH + "{userWorkspace}/{containerName}/{parentPath}"
      + OrionConstantValues.ORION_METADATA_PATH + "{blobName}")
@Consumes(MediaType.APPLICATION_JSON)
@ResponseParser(BlobResponseParser.class)
@Fallback(ReturnNullOnNotFound.class)
@Headers(keys = { OrionHttpFields.ORION_VERSION_FIELD }, values = { OrionConstantValues.ORION_VERSION })
Blob getBlob(
      @PathParam("userWorkspace") String userName,
      @PathParam("containerName") String containerName,
      @PathParam("parentPath") @ParamParser(EncodeBlobParentPathParamParser.class) String parentPath,
      @PathParam("blobName") @ParamParser(BlobNameToMetadataNameParamParser.class) @ParamValidators(StringNameValidator.class) String blobName);
 
开发者ID:timur-han,项目名称:orion-jclouds,代码行数:23,代码来源:OrionApi.java

示例3: createMetadataFolder

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
/**
 * Create a metadata folder to the corresponding path
 * 
 * @param userName
 * @param containerName
 * @param parentPath
 * @return
 */
// TODO creation should be removed from SLUG header to json
@POST
@Path(OrionConstantValues.ORION_FILE_PATH + "{userWorkspace}/{containerName}/{parentPath}")
@RequestFilters({ EmptyRequestFilter.class, CreateFolderFilter.class, CreateHiddenFileFilter.class,
      CreateReadonlyFileFilter.class })
@Produces(MediaType.APPLICATION_JSON)
@Headers(keys = { OrionHttpFields.HEADER_SLUG, OrionHttpFields.ORION_VERSION_FIELD }, values = {
      OrionConstantValues.ORION_METADATA_FILE_NAME, OrionConstantValues.ORION_VERSION })
@ResponseParser(CreationResponseParser.class)
boolean createMetadataFolder(@PathParam("userWorkspace") String userName,
      @PathParam("containerName") String containerName,
      @PathParam("parentPath") @ParamParser(EncodeBlobParentPathParamParser.class) String parentPath);
 
开发者ID:timur-han,项目名称:orion-jclouds,代码行数:21,代码来源:OrionApi.java

示例4: createMetadata

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
/**
 * Create an empty metadata file.
 * 
 * @param userName
 * @param containerName
 * @param parentPath
 * @param fileName
 * @return
 */
// TODO creation should be removed from SLUG header to json
@POST
@Path(OrionConstantValues.ORION_IMPORT_PATH + "{userWorkspace}/{containerName}/{parentPath}"
      + OrionConstantValues.ORION_METADATA_PATH)
@Produces(MediaType.APPLICATION_JSON)
@ResponseParser(CreationResponseParser.class)
@Headers(keys = { OrionHttpFields.ORION_VERSION_FIELD, OrionHttpFields.ORION_XFER_OPTIONS }, values = {
      OrionConstantValues.ORION_VERSION, OrionConstantValues.XFER_RAW })
boolean createMetadata(@PathParam("userWorkspace") String userName,
      @PathParam("containerName") String containerName,
      @PathParam("parentPath") @ParamParser(EncodeBlobParentPathParamParser.class) String parentPath,
      @BinderParam(OrionMetadataBinder.class) OrionBlob fileName);
 
开发者ID:timur-han,项目名称:orion-jclouds,代码行数:22,代码来源:OrionApi.java

示例5: metadaFolderExits

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
/**
 * Check if the metadata folder exists
 * 
 * @param userName
 * @param containerName
 * @param parentPath
 * @return
 */
@GET
@Path(OrionConstantValues.ORION_FILE_PATH + "{userWorkspace}/{containerName}/{parentPath}"
      + OrionConstantValues.ORION_METADATA_FILE_NAME)
@Fallback(FileNotFoundFallback.class)
@Headers(keys = { OrionHttpFields.ORION_VERSION_FIELD }, values = { OrionConstantValues.ORION_VERSION })
boolean metadaFolderExits(@PathParam("userWorkspace") String userName,
      @PathParam("containerName") String containerName,
      @PathParam("parentPath") @ParamParser(EncodeBlobParentPathParamParser.class) String parentPath);
 
开发者ID:timur-han,项目名称:orion-jclouds,代码行数:17,代码来源:OrionApi.java

示例6: putMetadata

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
/**
 * Put metadata file contents.
 * 
 * @param userName
 * @param containerName
 * @param parentPath
 * @param blob
 * @return
 */
@PUT
@Path(OrionConstantValues.ORION_FILE_PATH + "{userWorkspace}/{containerName}/{parentPath}"
      + OrionConstantValues.ORION_METADATA_PATH + "{fileName}")
@Produces(MediaType.APPLICATION_JSON)
@ResponseParser(CreationResponseParser.class)
@Headers(keys = { OrionHttpFields.ORION_VERSION_FIELD }, values = { OrionConstantValues.ORION_VERSION })
boolean putMetadata(
      @PathParam("userWorkspace") String userName,
      @PathParam("containerName") String containerName,
      @PathParam("parentPath") @ParamParser(EncodeBlobParentPathParamParser.class) String parentPath,
      @PathParam("fileName") @ParamParser(BlobMetadataNameParamParser.class) @BinderParam(OrionMetadataBinder.class) OrionBlob blob);
 
开发者ID:timur-han,项目名称:orion-jclouds,代码行数:21,代码来源:OrionApi.java

示例7: getMetadata

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
/**
 * Return metadata object.
 * 
 * @param userName
 * @param containerName
 * @param parentPath
 * @param blobName
 * @return
 */
@GET
@Path(OrionConstantValues.ORION_FILE_PATH + "{userWorkspace}/{containerName}/{parentPath}"
      + OrionConstantValues.ORION_METADATA_PATH + "{fileName}")
@Consumes(MediaType.APPLICATION_JSON)
@ResponseParser(MetadataResponseParser.class)
@Fallback(ReturnNullOnNotFound.class)
@Headers(keys = { OrionHttpFields.ORION_VERSION_FIELD }, values = { OrionConstantValues.ORION_VERSION })
MutableBlobProperties getMetadata(@PathParam("userWorkspace") String userName,
      @PathParam("containerName") String containerName,
      @PathParam("parentPath") @ParamParser(EncodeBlobParentPathParamParser.class) String parentPath,
      @PathParam("fileName") @ParamParser(EncodeBlobNameParamParser.class) String blobName);
 
开发者ID:timur-han,项目名称:orion-jclouds,代码行数:21,代码来源:OrionApi.java

示例8: putObject

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
@Override
public String putObject(@Bucket @EndpointParam(parser = AssignCorrectHostnameForBucket.class) @BinderParam(BindAsHostPrefixIfConfigured.class) @ParamValidators({BucketNameValidator.class}) String bucketName, @ParamParser(ObjectKey.class) @BinderParam(BindS3ObjectMetadataToRequest.class) S3Object object, PutObjectOptions... options) {
    return null;
}
 
开发者ID:orange-cloudfoundry,项目名称:db-dumper-service,代码行数:5,代码来源:FakeS3Client.java

示例9: initiateMultipartUpload

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
@Override
public String initiateMultipartUpload(@Bucket @EndpointParam(parser = AssignCorrectHostnameForBucket.class) @BinderParam(BindAsHostPrefixIfConfigured.class) @ParamValidators({BucketNameValidator.class}) String bucketName, @ParamParser(ObjectMetadataKey.class) @BinderParam(BindObjectMetadataToRequest.class) ObjectMetadata objectMetadata, PutObjectOptions... options) {
    return UUID.randomUUID().toString();
}
 
开发者ID:orange-cloudfoundry,项目名称:db-dumper-service,代码行数:5,代码来源:FakeS3Client.java

示例10: importKeyPairInRegion

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
/**
 * Imports the public key from an RSA key pair that you created with a third-party tool. Compare
 * this with CreateKeyPair, in which AWS creates the key pair and gives the keys to you (AWS
 * keeps a copy of the public key). With ImportKeyPair, you create the key pair and give AWS just
 * the public key. The private key is never transferred between you and AWS.
 * 
 * <p/>
 * You can easily create an RSA key pair on Windows and Linux using the ssh-keygen command line
 * tool (provided with the standard OpenSSH installation). Standard library support for RSA key
 * pair creation is also available in Java, Ruby, Python, and many other programming languages.
 * 
 * <p/>
 * <h4>Supported Formats</h4>
 * <ul>
 * <li>OpenSSH public key format (e.g., the format in ~/.ssh/authorized_keys)</li>
 * <li>Base64 encoded DER format</li>
 * <li>SSH public key file format as specified in RFC4716</li>
 * </ul>
 * DSA keys are not supported. Make sure your key generator is set up to create RSA keys.
 * <p/>
 * Supported lengths: 1024, 2048, and 4096.
 * <p/>
 * 
 * @param region
 *           region to import the key into
 * @param keyName
 *           A unique name for the key pair. Accepts alphanumeric characters, spaces, dashes, and
 *           underscores.
 * @param publicKeyMaterial
 *           The public key
 * @return imported key including fingerprint
 */
@Named("ImportKeyPair")
@POST
@Path("/")
@FormParams(keys = ACTION, values = "ImportKeyPair")
@XMLResponseParser(KeyPairResponseHandler.class)
KeyPair importKeyPairInRegion(
      @EndpointParam(parser = RegionToEndpointOrProviderIfNull.class) @Nullable String region,
      @FormParam("KeyName") String keyName,
      @FormParam("PublicKeyMaterial") @ParamParser(EncodedRSAPublicKeyToBase64.class) String publicKeyMaterial);
 
开发者ID:apache,项目名称:stratos,代码行数:42,代码来源:AWSKeyPairApi.java

示例11: blobExists

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
/**
 * Check if a blob exists
 * 
 * @param userName
 * @param containerName
 * @param parentPath
 * @param blobName
 * @return
 */
@GET
@Path(OrionConstantValues.ORION_FILE_PATH + "{userWorkspace}/{containerName}/{parentPath}{blobName}")
@Fallback(FileNotFoundFallback.class)
@QueryParams(keys = { OrionHttpFields.QUERY_PARTS }, values = { OrionConstantValues.ORION_FILE_METADATA })
@Headers(keys = { OrionHttpFields.ORION_VERSION_FIELD }, values = { OrionConstantValues.ORION_VERSION })
boolean blobExists(@PathParam("userWorkspace") String userName, @PathParam("containerName") String containerName,
      @PathParam("parentPath") @ParamParser(EncodeBlobParentPathParamParser.class) String parentPath,
      @PathParam("blobName") @ParamParser(EncodeBlobNameParamParser.class) String blobName);
 
开发者ID:timur-han,项目名称:orion-jclouds,代码行数:18,代码来源:OrionApi.java

示例12: removeBlob

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
/**
 * Remove a blob. No "/" in the name and .metadata as name are possible.
 * 
 * @see EncodeBlobNameParamParser is used.
 * 
 * @param userWorkspace
 * @param containerName
 * @param parentPath
 * @param blobName
 * @return
 */
@DELETE
@Path(OrionConstantValues.ORION_FILE_PATH + "{userWorkspace}/{containerName}/{parentPath}")
@Fallback(FileNotFoundFallback.class)
@Headers(keys = { OrionHttpFields.ORION_VERSION_FIELD }, values = { OrionConstantValues.ORION_VERSION })
boolean removeBlob(
      @PathParam("userWorkspace") String userWorkspace,
      @PathParam("containerName") String containerName,
      @PathParam("parentPath") @ParamParser(EncodeBlobParentPathParamParser.class) String parentPath,
      @PathParam("blobName") @ParamParser(EncodeBlobNameParamParser.class) @ParamValidators(StringNameValidator.class) String blobName);
 
开发者ID:timur-han,项目名称:orion-jclouds,代码行数:21,代码来源:OrionApi.java

示例13: createBlob

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
/**
 * This method creates an empty file/folder depending on the request
 * parameters.
 * 
 * If a file/folder with the same name exists, it is removed and replaced
 * with the requested type.
 * 
 * @param userWorkspace
 * @param containerName
 * @param parentPath
 * @param blob
 * @return
 */
// TODO creation should be removed from SLUG header to json
@POST
@Path(OrionConstantValues.ORION_IMPORT_PATH + "{userWorkspace}/{containerName}/{parentPath}")
@Fallback(SameFileWithDiffTypeFallback.class)
@Headers(keys = { OrionHttpFields.ORION_VERSION_FIELD, OrionHttpFields.ORION_XFER_OPTIONS }, values = {
      OrionConstantValues.ORION_VERSION, OrionConstantValues.XFER_RAW })
boolean createBlob(@PathParam("userWorkspace") String userWorkspace,
      @PathParam("containerName") String containerName,
      @PathParam("parentPath") @ParamParser(EncodeBlobParentPathParamParser.class) String parentPath,
      @BinderParam(BlobCreationBinder.class) @ParamValidators(value = { BlobNameValidator.class }) OrionBlob blob);
 
开发者ID:timur-han,项目名称:orion-jclouds,代码行数:24,代码来源:OrionApi.java

示例14: getBlobContents

import org.jclouds.rest.annotations.ParamParser; //导入依赖的package包/类
/**
 * This method is used to get the blob contents
 * 
 * @param userWorkspace
 * @param containerName
 * @param parentPath
 * @param blob
 * @return
 */
@GET
@Path(OrionConstantValues.ORION_FILE_PATH + "{userWorkspace}/{containerName}/{parentPath}{blobName}")
@Headers(keys = { OrionHttpFields.ORION_VERSION_FIELD }, values = { OrionConstantValues.ORION_VERSION })
HttpResponse getBlobContents(@PathParam("userWorkspace") String userWorkspace,
      @PathParam("containerName") String containerName,
      @PathParam("parentPath") @ParamParser(EncodeBlobParentPathParamParser.class) String parentPath,
      @PathParam("blobName") @ParamParser(EncodeBlobNameParamParser.class) String blob);
 
开发者ID:timur-han,项目名称:orion-jclouds,代码行数:17,代码来源:OrionApi.java


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