public Details checkManagedDetails(IObject object, Details trustedDetails) throws ApiUsageException, SecurityViolation { checkReady("managedDetails"); return interceptor.checkManagedDetails(object, trustedDetails); }
/** * asks {@link BasicSecuritySystem} to create a new managed {@link Details} * based on the previous state of this entity. If the previous state is null * (see ticket:3929) then throw an exception. * * @param entity * IObject to be updated * @param currentState * the possibly changed field data for this entity * @param previousState * the field data as seen in the db * @param idx * the index of Details in the state arrays. */ protected boolean resetDetails(IObject entity, Object[] currentState, Object[] previousState, int idx, Details newDetails) { if (previousState == null) { log.warn(String.format("Null previousState for %s(loaded=%s). Details=%s", entity, entity.isLoaded(), currentState[idx])); throw new InternalException("Previous state is null. Possibly caused by evict. See ticket:3929"); } final Details previous = (Details) previousState[idx]; final Details result = checkManagedDetails(entity, previous, newDetails); if (previous != result) { currentState[idx] = result; return true; } return false; }
/** * @see SecuritySystem#checkManagedDetails(IObject, Details) */ public Details checkManagedDetails(final IObject iobj, final Details previousDetails) { if (iobj == null) { throw new ApiUsageException("Argument cannot be null."); } return checkManagedDetails(iobj, previousDetails, iobj.getDetails().newInstance()); }