Class PermissionCheckedCollection.PermissionCheckedCollectionMixin<T>
- java.lang.Object
-
- org.springframework.aop.support.IntroductionInfoSupport
-
- org.springframework.aop.support.DelegatingIntroductionInterceptor
-
- org.alfresco.repo.security.permissions.PermissionCheckedCollection.PermissionCheckedCollectionMixin<T>
-
- Type Parameters:
T- the type of theCollectionin use
- All Implemented Interfaces:
java.io.Serializable,PermissionCheckedCollection<T>,org.aopalliance.aop.Advice,org.aopalliance.intercept.Interceptor,org.aopalliance.intercept.MethodInterceptor,org.springframework.aop.DynamicIntroductionAdvice,org.springframework.aop.IntroductionInfo,org.springframework.aop.IntroductionInterceptor
- Enclosing interface:
- PermissionCheckedCollection<T>
public static class PermissionCheckedCollection.PermissionCheckedCollectionMixin<T> extends org.springframework.aop.support.DelegatingIntroductionInterceptor implements PermissionCheckedCollection<T>
Helper 'introduction' to allow simple addition of thePermissionCheckedCollectioninterface to existing collections.- Since:
- 4.0
- Author:
- Derek Hulley
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.security.permissions.PermissionCheckedCollection
PermissionCheckedCollection.PermissionCheckedCollectionMixin<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <TT> java.util.Collection<TT>create(java.util.Collection<TT> collection, boolean isCutOff, int sizeUnchecked, int sizeOriginal)Helper method to create aPermissionCheckedCollectionfrom an existingCollectionstatic <TT> java.util.Collection<TT>create(java.util.Collection<TT> collection, java.util.Collection<?> checkedSource)Helper method to create aPermissionCheckedCollectionfrom an existingCollectionby applying the same values as present on a potentially permission-checked source.booleanisCutOff()Check if the results have been truncated by permission check limits.intsizeOriginal()Get the number of objects in the original (unfiltered) collection.intsizeUnchecked()Get the number of objects in the original (unfiltered) collection that did not have any permission checks.-
Methods inherited from class org.springframework.aop.support.DelegatingIntroductionInterceptor
doProceed, invoke
-
Methods inherited from class org.springframework.aop.support.IntroductionInfoSupport
getInterfaces, implementInterfacesOnObject, implementsInterface, isMethodOnIntroducedInterface, suppressInterface
-
-
-
-
Method Detail
-
isCutOff
public boolean isCutOff()
Description copied from interface:PermissionCheckedCollectionCheck if the results have been truncated by permission check limits.- Specified by:
isCutOffin interfacePermissionCheckedCollection<T>- Returns:
- true - if the results (usually a collection) have been cut off by permission check limits
-
sizeUnchecked
public int sizeUnchecked()
Description copied from interface:PermissionCheckedCollectionGet the number of objects in the original (unfiltered) collection that did not have any permission checks.- Specified by:
sizeUncheckedin interfacePermissionCheckedCollection<T>- Returns:
- number of entries from the original collection that were not checked
-
sizeOriginal
public int sizeOriginal()
Description copied from interface:PermissionCheckedCollectionGet the number of objects in the original (unfiltered) collection.- Specified by:
sizeOriginalin interfacePermissionCheckedCollection<T>- Returns:
- number of entries in the original, pre-checked collection
-
create
public static final <TT> java.util.Collection<TT> create(java.util.Collection<TT> collection, java.util.Collection<?> checkedSource)Helper method to create aPermissionCheckedCollectionfrom an existingCollectionby applying the same values as present on a potentially permission-checked source. If the existing checked source is NOT permission-checked, then the collection will not be decorated.- Type Parameters:
TT- the type of theCollection- Parameters:
collection- theCollectionto proxycheckedSource- a collection that might implementPermissionCheckedCollection- Returns:
- a
Collectionof the same type but including thePermissionCheckedCollectioninterface
-
create
public static final <TT> java.util.Collection<TT> create(java.util.Collection<TT> collection, boolean isCutOff, int sizeUnchecked, int sizeOriginal)Helper method to create aPermissionCheckedCollectionfrom an existingCollection- Type Parameters:
TT- the type of theCollection- Parameters:
collection- theCollectionto proxyisCutOff- true if permission checking was cut off before completionsizeUnchecked- number of entries from the original collection that were not checkedsizeOriginal- number of entries in the original, pre-checked collection- Returns:
- a
Collectionof the same type but including thePermissionCheckedCollectioninterface
-
-