public ArchiveObject2Meta next() { String loc = iter.next(); try { currentLoc= loc; ArchiveObject2Meta object = archiveFacade2.queryUniqueObject(loc, true); if (object == null) { logger.error("Unexpected problem: no conent found under address: " + loc); throw new MissingContentRuntimeException(loc); } return object; } catch (Exception ex) { logger.error("Unexpected problem: exception reading content under address: " + loc, ex); throw new MissingContentRuntimeException(loc); } }
public void removeDump(String dumpId) throws Exception { ArchiveObject2Meta dumpMeta = archiveFacade.queryUniqueObject(dumpId, false); if (dumpMeta == null) return; storageFacade.deleteObject(dumpMeta.getId()); }
ArchiveObject2Meta meta = ossf.queryUniqueObject(yar, true); ArchiveObjectFacade o = ossf.getObject(meta.getId(), new String[] {ArchiveParamConstants.PART_TYPE_MAIN}, false); ArchiveContentPartFacade p = o.getPart(ArchiveParamConstants.PART_TYPE_MAIN);
public List<String> listErrorDumps() throws Exception { ArchiveObject2Meta dumpDirectoryMeta = archiveFacade.queryUniqueObject(ERROR_DUMP_OBJECT_PATH, true); if (dumpDirectoryMeta == null) return Collections.emptyList(); ArchiveObjectFacade dumpDirectory = archiveFacade.getObject(dumpDirectoryMeta.getId(), null, true); List<String> dumpList = new LinkedList<String>(); for (Map.Entry<String, List<YaddaObjectID>> children : dumpDirectory.getChildren().entrySet()) { for (YaddaObjectID child : children.getValue()) { ArchiveObjectFacade childObject = archiveFacade.getObject(child, null, false); if (!childObject.getStatus().isDeleted()) { ArchiveObjectPath dumpPath = new ArchiveObjectPath(ERROR_DUMP_OBJECT_PATH, children.getKey()); dumpList.add(dumpPath.encode()); } } } return dumpList; }
sourceYarPath); ArchiveObject2Meta parentMeta = archiveFacade.queryUniqueObject( sourceYarPath, true); if (parentMeta==null) {
InputType.IDENTIFIER, filteringContext)); archiveFacade.queryUniqueObject(loc, true); } catch (ServiceException e) { log.error("No access rights for element in location=" + loc);
@Override public Set<DocumentAttachment> call() throws Exception { ArchiveObjectPath archivePath = ArchiveObjectPath.decode(path); ArchiveObject2Meta aObject = archiveFacadeProvider.getArchiveFacade().queryUniqueObject(archivePath, true); if (aObject == null) { throw new InvalidAttachmentException(path, "Attachment not available "); } ArchiveObjectFacade objectFacade = archiveFacadeProvider.getArchiveFacade().getObjectWithAllParts(aObject.getId(), true); Set<DocumentAttachment> attachments = new HashSet<DocumentAttachment>(); Collection<ArchiveContentPartFacade> parts = objectFacade.getParts(); try { for (ArchiveContentPartFacade partFacade : parts) { byte[] bytes = IOUtils.toByteArray(partFacade.getData()); DocumentAttachment documentAttachment = new DocumentAttachment(parent, partFacade.getId(), partFacade.getId(), partFacade.getSize(), partFacade.getMime(), bytes, false); documentAttachment.getProperties().put(ImporterConstants.PROPERTY_REMOTE_SOURCE_URL, path); attachments.add(documentAttachment); } } finally { closeFacades(parts); } return attachments; }
public String storeDump(ChunkErrorDump dump) throws Exception { if (archiveFacade.queryUniqueObject(SYSTEM_OBJECT_PATH, true) == null) { if (archiveFacade.queryUniqueObject(ERROR_DUMP_OBJECT_PATH, true) == null) {
if (loc.startsWith("yar://")) { try { archiveFacade.queryUniqueObject(loc, true); } catch (Exception e) { visible = false;
for (final Content c : e.getContents()) { for (final ContentFile cf : c.getLocations()) { final ArchiveObject2Meta o = archive.queryUniqueObject(cf.getAddress(), true); if (o != null) { final String archiveid = o.getId().getId();