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


Java ResourceOutputFilter类代码示例

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


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

示例1: convertResponse

import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
@Override
public Resource convertResponse(Object obj, ApiRequest request) {
    Resource resource = createResource(obj, ApiContext.getContext().getIdFormatter(), request);
    List<ResourceOutputFilter> filters = locator.getOutputFilters(resource);

    if (filters == null) {
        return resource;
    }

    for (ResourceOutputFilter filter : filters) {
        resource = filter.filter(request, obj, resource);
        if (resource == null) {
            break;
        }
    }

    return resource;
}
 
开发者ID:rancher,项目名称:cattle,代码行数:19,代码来源:ResponseObjectConverter.java

示例2: getOutputFilters

import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
@Override
public List<ResourceOutputFilter> getOutputFilters(Resource resource) {
    if (resource == null) {
        return null;
    }

    String type = resource.getType();
    return outputFiltersByType.get(type);
}
 
开发者ID:rancher,项目名称:cattle,代码行数:10,代码来源:ApiRouterImpl.java

示例3: convertResponse

import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
@Override
public Resource convertResponse(Object obj, ApiRequest request) {
    Resource resource = createResource(obj, ApiContext.getContext().getIdFormatter(), request);
    ResourceOutputFilter filter = outputFilterManager.getOutputFilter(resource);

    if ( filter != null ) {
        resource = filter.filter(request, obj, resource);
    }

    return resource;
}
 
开发者ID:rancher,项目名称:gdapi-java-server,代码行数:12,代码来源:AbstractBaseResourceManager.java

示例4: getOutputFilter

import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
@Override
public ResourceOutputFilter getOutputFilter(Resource resource) {
    if ( resource == null ) {
        return null;
    }

    return getFiltersByType().get(resource.getType());
}
 
开发者ID:rancher,项目名称:gdapi-java-server,代码行数:9,代码来源:ResourceOutputFilterManagerImpl.java

示例5: outputFilter

import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
@Override
public ApiRouterImpl outputFilter(Object type, ResourceOutputFilter filter) {
    forEach(type, typeName -> outputFiltersByType.put(typeName, filter));
    return this;
}
 
开发者ID:rancher,项目名称:cattle,代码行数:6,代码来源:ApiRouterImpl.java

示例6: getOutputFilters

import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
public List<ResourceOutputFilter> getOutputFilters() {
    return outputFilters;
}
 
开发者ID:rancher,项目名称:gdapi-java-server,代码行数:4,代码来源:ResourceOutputFilterManagerImpl.java

示例7: setOutputFilters

import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
@Inject
public void setOutputFilters(List<ResourceOutputFilter> outputFilters) {
    this.outputFilters = outputFilters;
}
 
开发者ID:rancher,项目名称:gdapi-java-server,代码行数:5,代码来源:ResourceOutputFilterManagerImpl.java

示例8: ResourceOutputFilterChain

import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
public ResourceOutputFilterChain(ResourceOutputFilter current, ResourceOutputFilter next) {
    super();
    this.current = current;
    this.next = next;
}
 
开发者ID:rancher,项目名称:gdapi-java-server,代码行数:6,代码来源:ResourceOutputFilterChain.java

示例9: getOutputFilters

import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
List<ResourceOutputFilter> getOutputFilters(Resource resource); 
开发者ID:rancher,项目名称:cattle,代码行数:2,代码来源:ResourceManagerLocator.java

示例10: outputFilter

import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
ApiRouter outputFilter(Object type, ResourceOutputFilter filter); 
开发者ID:rancher,项目名称:cattle,代码行数:2,代码来源:ApiRouter.java


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