本文整理汇总了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;
}
示例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);
}
示例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;
}
示例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());
}
示例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;
}
示例6: getOutputFilters
import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
public List<ResourceOutputFilter> getOutputFilters() {
return outputFilters;
}
示例7: setOutputFilters
import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
@Inject
public void setOutputFilters(List<ResourceOutputFilter> outputFilters) {
this.outputFilters = outputFilters;
}
示例8: ResourceOutputFilterChain
import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
public ResourceOutputFilterChain(ResourceOutputFilter current, ResourceOutputFilter next) {
super();
this.current = current;
this.next = next;
}
示例9: getOutputFilters
import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
List<ResourceOutputFilter> getOutputFilters(Resource resource);
示例10: outputFilter
import io.github.ibuildthecloud.gdapi.response.ResourceOutputFilter; //导入依赖的package包/类
ApiRouter outputFilter(Object type, ResourceOutputFilter filter);