Examples of FileVersion


Examples of org.apache.isis.runtimes.dflt.objectstores.xml.internal.version.FileVersion

        assertEquals(first + 2, manager.nextId());
        assertEquals(first + 3, manager.nextId());
    }

    public void testInsertObjectWithFields() throws ObjectPersistenceException {
        final ObjectData data = createData(Role.class, 99, new FileVersion("user", 13));
        data.set("Person", SerialOid.createPersistent(101));
        assertNotNull(data.get("Person"));
        data.set("Name", "Harry");
        assertNotNull(data.get("Name"));
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.objectstores.xml.internal.version.FileVersion

        assertEquals(data.get("Person"), read.get("Person"));
        assertEquals(data.get("Name"), read.get("Name"));
    }

    public void testInsertObjectWithEmptyOneToManyAssociations() throws ObjectPersistenceException {
        final ObjectData data = createData(Team.class, 99, new FileVersion("user", 13));

        data.initCollection("Members");

        manager.insertObject(data);
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.objectstores.xml.internal.version.FileVersion

        final ReferenceVector c = read.elements("Members");
        assertNull(c);
    }

    public void testInsertObjectWithOneToManyAssociations() throws ObjectPersistenceException {
        final ObjectData data = createData(Team.class, 99, new FileVersion("user", 13));

        data.initCollection("Members");
        final SerialOid oid[] = new SerialOid[3];
        for (int i = 0; i < oid.length; i++) {
            oid[i] = SerialOid.createPersistent(104 + i);
View Full Code Here

Examples of org.hive2hive.core.model.FileVersion

    logger.debug("Adding a new version to the meta file.");

    // create a new version and add it to the meta file
    MetaFileSmall metaFileSmall = (MetaFileSmall) context.consumeMetaFile();
    newVersion = new FileVersion(metaFileSmall.getVersions().size(), FileUtil.getFileSize(context
        .getFile()), System.currentTimeMillis(), context.getMetaChunks());
    metaFileSmall.getVersions().add(newVersion);

    initiateCleanup();
  }
View Full Code Here

Examples of org.hive2hive.core.model.FileVersion

        .getBytes(), 1));
    List<MetaChunk> metaChunks2 = new ArrayList<MetaChunk>();
    metaChunks2.add(new MetaChunk(NetworkTestUtil.randomString(), NetworkTestUtil.randomString()
        .getBytes(), 2));
    List<FileVersion> fileVersions = new ArrayList<FileVersion>();
    fileVersions.add(new FileVersion(0, 123, System.currentTimeMillis(), metaChunks1));
    fileVersions.add(new FileVersion(1, 123, System.currentTimeMillis(), metaChunks2));
    MetaFileSmall metaFileSmall = new MetaFileSmall(metaFileEncryptionKeys.getPublic(), fileVersions,
        chunkEncryptionKeys);
    // encrypt the meta file
    HybridEncryptedContent encryptedMetaFile = H2HEncryptionUtil.encryptHybrid(metaFileSmall,
        metaFileEncryptionKeys.getPublic());
View Full Code Here

Examples of org.hive2hive.core.model.FileVersion

    MetaFile metaFile = null;
    if (context.isLargeFile()) {
      metaFile = new MetaFileLarge(context.generateOrGetMetaKeys().getPublic(), context.getMetaChunks());
    } else {
      // create new meta file with new version
      FileVersion version = new FileVersion(0, FileUtil.getFileSize(file), System.currentTimeMillis(),
          context.getMetaChunks());
      List<FileVersion> versions = new ArrayList<FileVersion>(1);
      versions.add(version);
      metaFile = new MetaFileSmall(context.generateOrGetMetaKeys().getPublic(), versions,
          context.consumeChunkKeys());
View Full Code Here

Examples of org.hive2hive.core.model.FileVersion

    if (selected == null) {
      throw new ProcessExecutionException("Selected file version is null.");
    }

    // find the selected version
    FileVersion selectedVersion = null;
    for (FileVersion version : metaFileSmall.getVersions()) {
      if (version.getIndex() == selected.getIndex()) {
        selectedVersion = version;
        break;
      }
View Full Code Here

Examples of org.hyperic.sigar.win32.FileVersion

            name = getSigar().getProcExe(pid).getName();
        } catch (SigarException e) {
            return;
        }

        FileVersion info = Win32.getFileVersion(name);
        if (info != null) {
            traceln("exe='" + name + "'");
            traceln("version=" + info.getProductVersion());
        }
    }
View Full Code Here

Examples of org.hyperic.sigar.win32.FileVersion

            name = getSigar().getProcExe(pid).getName();
        } catch (SigarException e) {
            return;
        }

        FileVersion info = Win32.getFileVersion(name);
        if (info != null) {
            traceln("exe='" + name + "'");
            traceln("version=" + info.getProductVersion());
        }
    }
View Full Code Here

Examples of org.hyperic.sigar.win32.FileVersion

        sb.append(val);
        println(sb.toString());
    }

    public void output(String exe) throws SigarException {
        FileVersion info = Win32.getFileVersion(exe);
        if (info == null) {
            return;
        }
        println("Version info for file '" + exe + "':");
        output("FileVersion", info.getFileVersion());
        output("ProductVersion", info.getProductVersion());
        for (Iterator it = info.getInfo().entrySet().iterator();
             it.hasNext();)
        {
            Map.Entry entry = (Map.Entry)it.next();
            output((String)entry.getKey(), (String)entry.getValue());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.