public static void checkRepresentationPermissions(User user, SelectedItems<IndexedRepresentation> selected, PermissionType permission) throws AuthorizationDeniedException, GenericException, RequestNotValidException { checkObjectPermissions(user, selected, rep -> rep.getAipId(), permission, RodaConstants.REPRESENTATION_FIELDS_TO_RETURN); }
public static void checkRepresentationPermissions(User user, IndexedRepresentation rep, PermissionType permissionType) throws AuthorizationDeniedException { checkAIPObjectPermissions(user, rep, r -> r.getAipId(), permissionType); }
private static List<Representation> getRepresentationFromList(ModelService model, List<IndexedRepresentation> retrieve) throws RequestNotValidException, GenericException, NotFoundException, AuthorizationDeniedException { List<Representation> representationsToReturn = new ArrayList<>(); for (IndexedRepresentation indexedRepresentation : retrieve) { representationsToReturn .add(model.retrieveRepresentation(indexedRepresentation.getAipId(), indexedRepresentation.getId())); } return representationsToReturn; }