ArchiveContentPartFacade p = o.getPart(ArchiveParamConstants.PART_TYPE_MAIN); is = p.getData(); String relPath = yar.substring(ARCHIVE_PREFIX.length());
@Override public ProfilePart getProfilePart(String userId, String partType) { try { ArchiveObjectFacade archiveObject = archive.getObjectWithAllParts(new YaddaObjectID(userId), false); ArchiveContentPartFacade archivePart = archiveObject.getPart(partType); if (archivePart != null) { ProfilePart profilePart = new ProfilePart(); profilePart.setType(archivePart.getType()); try { profilePart.setContent(IOUtils.toByteArray(archivePart.getData())); } catch (IOException e) { String message = "Setting part with part type " + partType + " to user profile for user " + userId + " not successfull."; logger.error(message, e); throw new RuntimeException(message, e); } return profilePart; } else { return null; } } catch (NotFoundException e) { // OK profile not found so part is null return null; } catch (ServiceException e) { String message = "Fetching user profile for user " + userId + " not successfull."; logger.error(message, e); throw new RuntimeException(message, e); } }
return; ArchiveContentPartFacade currentPart = currentObjFacade.getPart(partName); if (currentPart!=null) { if (regexpPattern==null || Pattern.matches(regexpPattern,