Class BasicSecurityPolicy.Builder
java.lang.Object
net.solarnetwork.central.security.BasicSecurityPolicy.Builder
- Enclosing class:
BasicSecurityPolicy
A builder for
BasicSecurityPolicy instances.
Configure properties on instances of this class, then call
build() to get a BasicSecurityPolicy instance.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()withAggregations(Set<net.solarnetwork.domain.datum.Aggregation> aggregations) withApiPaths(Set<String> apiPaths) withLocationPrecisions(Set<LocationPrecision> locationPrecisions) withMergedAggregations(Set<net.solarnetwork.domain.datum.Aggregation> aggregations) withMergedApiPaths(Set<String> apiPaths) withMergedLocationPrecisions(Set<LocationPrecision> locationPrecisions) withMergedNodeIds(Set<Long> nodeIds) withMergedNodeMetadataPaths(Set<String> nodeMetadataPaths) withMergedPolicy(SecurityPolicy policy) withMergedSourceIds(Set<String> sourceIds) withMergedUserMetadataPaths(Set<String> userMetadataPaths) withMinAggregation(net.solarnetwork.domain.datum.Aggregation minAggregation) withMinLocationPrecision(LocationPrecision minLocationPrecision) Treat the configuredlocationPrecisionsset as a single minimum value or a list of exact values.withNodeIds(Set<Long> nodeIds) withNodeMetadataPaths(Set<String> nodeMetadataPaths) withNotAfter(Instant date) withPolicy(SecurityPolicy policy) withRefreshAllowed(Boolean refreshAllowed) withSourceIds(Set<String> sourceIds) withUserMetadataPaths(Set<String> userMetadataPaths)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withPolicy
-
withMergedPolicy
-
withNodeIds
-
withNodeMetadataPaths
-
withUserMetadataPaths
-
withApiPaths
-
withSourceIds
-
withAggregations
public BasicSecurityPolicy.Builder withAggregations(Set<net.solarnetwork.domain.datum.Aggregation> aggregations) -
withLocationPrecisions
public BasicSecurityPolicy.Builder withLocationPrecisions(Set<LocationPrecision> locationPrecisions) -
withMergedNodeIds
-
withMergedNodeMetadataPaths
-
withMergedUserMetadataPaths
-
withMergedApiPaths
-
withMergedSourceIds
-
withMergedAggregations
public BasicSecurityPolicy.Builder withMergedAggregations(Set<net.solarnetwork.domain.datum.Aggregation> aggregations) -
withMergedLocationPrecisions
public BasicSecurityPolicy.Builder withMergedLocationPrecisions(Set<LocationPrecision> locationPrecisions) -
withMinAggregation
public BasicSecurityPolicy.Builder withMinAggregation(net.solarnetwork.domain.datum.Aggregation minAggregation) -
withMinLocationPrecision
Treat the configuredlocationPrecisionsset as a single minimum value or a list of exact values. By default iflocationPrecisionsis configured with a single value it will be treated as a minimum value, and anyLocationPrecisionwith aLocationPrecision.getPrecision()equal to or higher than that value's level will be included in the generatedBasicSecurityPolicy.getLocationPrecisions()set. Set this tofalseto disable that behavior and treatlocationPrecisionsas the exact values to include in the generatedBasicSecurityPolicy.getLocationPrecisions()set.- Parameters:
minLocationPrecision-falseto treat configured location precision values as-is,trueto treat as a minimum threshold- Returns:
- The builder.
-
withNotAfter
-
withRefreshAllowed
-
build
-