當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。