The examples below show how allowing multiple patterns per resource could simplify both service contributor development and significantly reduce the size of a generated gateway.xml.
Simplified Resource Contribution
ResourceDescriptor fileResource = context.getGatewayDescriptor().addResource(); fileResource.role( service.getRole() ); fileResource.pattern( WEBHDFS_EXTERNAL_PATH + "/?**" ); fileResource.pattern( WEBHDFS_EXTERNAL_PATH + "/**?**" );
Simplified Gateway Descriptor
<gateway> <resource> <role>WEBHDFS</role> <pattern>/webhdfs/v1/?**</pattern> <pattern>/webhdfs/v1/**?**</pattern> <filter> ... </filter> ... </resource> </gateway>