Examples of FileVersion


Examples of fitnesse.wiki.fs.FileVersion

    if (!FileResponder.isInFilesDirectory(new File(context.getRootPagePath()), pathName)) {
      return new ErrorResponder("Invalid path: " + pathName.getName()).makeResponse(context, request);
    }

    context.versionsController.delete(new FileVersion() {
      @Override
      public File getFile() {
        return pathName;
      }
View Full Code Here

Examples of fitnesse.wiki.fs.FileVersion

      if (!FileResponder.isInFilesDirectory(new File(rootPath), file)) {
        return new ErrorResponder("Invalid path: " + uploadedFile.getName()).makeResponse(context, request);
      }

      context.versionsController.makeVersion(new FileVersion() {

        @Override
        public File getFile() {
          return file;
        }
View Full Code Here

Examples of fitnesse.wiki.fs.FileVersion

      return new ErrorResponder("Invalid path: " + file.getName()).makeResponse(context, request);
    }

    final String user = request.getAuthorizationUsername();
    if (!file.exists())
      context.versionsController.addDirectory(new FileVersion() {

        @Override
        public File getFile() {
          return file;
        }
View Full Code Here

Examples of fitnesse.wiki.fs.FileVersion

    if (!FileResponder.isInFilesDirectory(rootPath, newFile)) {
      return new ErrorResponder("Invalid path: " + newFileName).makeResponse(context, request);
    }

    context.versionsController.rename(new FileVersion() {

      @Override
      public File getFile() {
        return newFile;
      }
View Full Code Here

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

    public void execute(final PersistenceCommandContext context) throws ObjectPersistenceException {
        if (LOG.isDebugEnabled()) {
            LOG.debug("  create object " + onObject());
        }
        final String user = getAuthenticationSession().getUserName();
        onObject().setOptimisticLock(new FileVersion(user));
        final ObjectData data = createObjectData(onObject(), true);
        getDataManager().insertObject(data);
    }
View Full Code Here

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

    public void execute(final PersistenceCommandContext context) throws ObjectPersistenceException {
        if (LOG.isDebugEnabled()) {
            LOG.debug("  save object " + onObject());
        }
        final String user = getAuthenticationSession().getUserName();
        onObject().setOptimisticLock(new FileVersion(user));

        final Data data = createObjectData(onObject(), true);
        getDataManager().save(data);
    }
View Full Code Here

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

                    final long version = Long.valueOf(attributes.getValue("ver"), 16).longValue();
                    final String user = attributes.getValue("user");
                    final long id = Long.valueOf(attributes.getValue("id"), 16).longValue();
                    final ObjectSpecification spec = IsisContext.getSpecificationLoader().loadSpecification(typeName);
                    final SerialOid oid = SerialOid.createPersistent(id);
                    object = new ObjectData(spec, oid, new FileVersion(user, version));
                } else if (tagName.equals("collection")) {
                    final String type = attributes.getValue("type");
                    final long version = Long.valueOf(attributes.getValue("ver"), 16).longValue();
                    final String user = attributes.getValue("user");
                    final long id = Long.valueOf(attributes.getValue("id"), 16).longValue();
                    final ObjectSpecification spec = IsisContext.getSpecificationLoader().loadSpecification(type);
                    final SerialOid oid = SerialOid.createPersistent(id);
                    collection = new CollectionData(spec, oid, new FileVersion(user, version));
                } else {
                    throw new SAXException("Invalid data");
                }
            }
        }
View Full Code Here

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

        oids = new SerialOid[SIZE];
        data = new ObjectData[SIZE];

        final ObjectSpecification type = system.getSpecification(Object.class);
        pattern = new ObjectData(type, null, new FileVersion("user", 13));
        for (int i = 0; i < SIZE; i++) {
            oids[i] = SerialOid.createPersistent(i);
            data[i] = new ObjectData(type, oids[i], new FileVersion("user", 13));
            manager.insertObject(data[i]);
        }

        LOG.debug("test starting...");
    }
View Full Code Here

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

        oid = isTransient ? SerialOid.createTransient(serialNum) : SerialOid.createPersistent(serialNum);

        spec = new TestProxySpecification(this.getClass());
        spec.fields = Collections.emptyList();

        version = new FileVersion("", System.currentTimeMillis());
        objectData = new ObjectData(spec, oid, version);
        objectDataVector = new ObjectDataVector();
    }
View Full Code Here

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

    public void testValueField() {
        FileVersion.setClock(new DefaultClock());

        final TestProxySpecification type = new TestProxySpecification("test");
        final ObjectData objectData = new ObjectData(type, SerialOid.createPersistent(13), new FileVersion(""));

        assertEquals(null, objectData.get("name"));
        objectData.set("name", "value");
        assertEquals("value", objectData.get("name"));
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.