Package ch.tocco.nice2.security.impl
Class PolicyImpl
java.lang.Object
ch.tocco.nice2.security.impl.PolicyImpl
- All Implemented Interfaces:
Policy
,Serializable
,Iterable<Rule>
Simple implementation of
Policy
.
This is used to be an anonymous class in PolicyBuilderImpl
, which caused
that the containing policy builder remained in memory even though it was no longer needed.- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetRules()
boolean
isEmpty()
iterator()
subPolicy
(Permission permission) Returns aPolicy
that contains only rules that are relevant for the given permission.subPolicy
(SecurityDomain securityDomain) Returns aPolicy
that contains only rules that are relevant for the given domain.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
PolicyImpl
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
getRules
-
subPolicy
Description copied from interface:Policy
Returns aPolicy
that contains only rules that are relevant for the given permission. This policy may be cached internally and is more efficient than filtering rules manually. -
subPolicy
Description copied from interface:Policy
Returns aPolicy
that contains only rules that are relevant for the given domain. This policy may be cached internally and is more efficient than filtering rules manually. -
iterator
-