/** Check that the parameter instance is of a class that is authorized for * JDOPermission("setStateManager"). This method is called by the * replaceStateManager method in persistence-capable classes. * A class that is passed as the parameter to replaceStateManager must be * authorized for JDOPermission("setStateManager"). To improve performance, * first the set of authorized classes is checked, and if not present, a * regular permission check is made. The regular permission check requires * that all callers on the stack, including the persistence-capable class * itself, must be authorized for JDOPermission("setStateManager"). * @param sm an instance of StateManager whose class is to be checked. * @since 1.0.1 */ public static void checkAuthorizedStateManager (StateManager sm) { checkAuthorizedStateManagerClass(sm.getClass()); }
/** Check that the parameter instance is of a class that is authorized for * JDOPermission("setStateManager"). This method is called by the * replaceStateManager method in persistence-capable classes. * A class that is passed as the parameter to replaceStateManager must be * authorized for JDOPermission("setStateManager"). To improve performance, * first the set of authorized classes is checked, and if not present, a * regular permission check is made. The regular permission check requires * that all callers on the stack, including the persistence-capable class * itself, must be authorized for JDOPermission("setStateManager"). * @param sm an instance of StateManager whose class is to be checked. * @since 1.0.1 */ public static void checkAuthorizedStateManager (StateManager sm) { checkAuthorizedStateManagerClass(sm.getClass()); }