Package org.apache.jena.permissions.impl
Class ItemHolder<Base,Secured extends SecuredItem>
java.lang.Object
org.apache.jena.permissions.impl.ItemHolder<Base,Secured>
- Type Parameters:
Base
- The base class that is being securedSecured
- The implementation (proxy) of the secured class.
A class that holds the original item and the secured version of it.
This class is used by the Invoker to return secured versions of the object
during calls that return the called class for cascading.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the base item.Get the secured item.final Secured
setSecuredItem
(SecuredItemInvoker handler) Creates the proxy, saves it as the securedItem and returns it.
-
Constructor Details
-
ItemHolder
Constructor.- Parameters:
baseItem
- The base item.
-
-
Method Details
-
getBaseItem
Get the base item. This method is used in the proxy to get call to the underlying instance.- Returns:
- The instance that is being protected.
-
getSecuredItem
Get the secured item. This method is used in the invocation handler to get the instance of the proxy on which a method call was made. Generally used in returning the original object to support cascading.- Returns:
- the proxy.
-
setSecuredItem
Creates the proxy, saves it as the securedItem and returns it.- Parameters:
handler
- The SecuredItemInvoker to create the proxy with.- Returns:
- The proxy.
-