Search in sources :

Example 1 with RestLiMethodConfigBuilder

use of com.linkedin.restli.server.config.RestLiMethodConfigBuilder in project rest.li by linkedin.

the class TestAlwaysProjectedFieldsOnServer method initClass.

@BeforeClass
public void initClass() throws Exception {
    RestLiConfig config = new RestLiConfig();
    config.setMethodConfig(new RestLiMethodConfigBuilder().addAlwaysProjectedFields("*.*", "id,tone").addAlwaysProjectedFields("*.FINDER-*", "id,tone,total").build());
    super.init(false, config);
}
Also used : RestLiMethodConfigBuilder(com.linkedin.restli.server.config.RestLiMethodConfigBuilder) RestLiConfig(com.linkedin.restli.server.RestLiConfig) BeforeClass(org.testng.annotations.BeforeClass)

Example 2 with RestLiMethodConfigBuilder

use of com.linkedin.restli.server.config.RestLiMethodConfigBuilder in project rest.li by linkedin.

the class RestLiConfig method setValidateResourceKeys.

/**
 * Sets whether or not to enable resource key validation.
 */
public void setValidateResourceKeys(boolean validateResourceKeys) {
    _validateResourceKeys = validateResourceKeys;
    setMethodConfig(new RestLiMethodConfigBuilder(getMethodConfig()).withShouldValidateResourceKeys(_validateResourceKeys).build());
}
Also used : RestLiMethodConfigBuilder(com.linkedin.restli.server.config.RestLiMethodConfigBuilder)

Aggregations

RestLiMethodConfigBuilder (com.linkedin.restli.server.config.RestLiMethodConfigBuilder)2 RestLiConfig (com.linkedin.restli.server.RestLiConfig)1 BeforeClass (org.testng.annotations.BeforeClass)1