com.github.restup.registry.settings.ServiceMethodAccess Maven / Gradle / Ivy
package com.github.restup.registry.settings;
/**
* Settings which define which methods are exposed internally by service implementations. Disabling
* these service will disallow executing them internally as well as via http endpoints. However, if
* enabled, they may still be disabled by {@link ControllerMethodAccess}. By default all are
* enabled.
*/
public interface ServiceMethodAccess extends MethodAccess {
static Builder builder() {
return new Builder();
}
static ServiceMethodAccess allEnabled() {
return builder().setAllEnabled().build();
}
static class Builder extends AbstractMethodAccessBuilder {
private Builder() {
super();
}
@Override
public ServiceMethodAccess build() {
return new BasicServiceMethodAccess(createDisabled, createMultipleDisabled, getByIdDisabled, listDisabled, deleteByIdDisabled, deleteByIdsDisabled, patchByIdDisabled,
patchMultipleDisabled, deleteByQueryDisabled, patchByQueryDisabled);
}
}
}