本文整理匯總了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);