Examples of AgeValue


Examples of net.sourceforge.fullsync.rules.filefilter.values.AgeValue

      ruleComposite = new SizeValueRuleComposite(composite, SWT.NULL, (SizeValue) value);
      ruleComposite.addValueChangedListener(this);
    }
    else if (ruleClass.equals(FileAgeFileFilterRule.class)) {
      if (!(value instanceof AgeValue)) {
        value = new AgeValue();
      }

      ruleComposite = new AgeValueRuleComposite(composite, SWT.NULL, (AgeValue) value);
      ruleComposite.addValueChangedListener(this);
    }
View Full Code Here

Examples of net.sourceforge.fullsync.rules.filefilter.values.AgeValue

  }

  public void testOpIs() throws FilterRuleNotAppliableException, ParseException {
    SystemDate.getInstance().setTimeSpeed(0);
    SystemDate.getInstance().setCurrent(dateFormat.parse("01/01/2005 10:00:01").getTime());
    FileAgeFileFilterRule filterRule = new FileAgeFileFilterRule(new AgeValue(1, AgeValue.SECONDS), FileAgeFileFilterRule.OP_IS);
    assertTrue(filterRule.match(new TestNode("foobar.txt", "/root/foobar.txt", true, false, 1024, dateFormat.parse(
        "01/01/2005 10:00:00").getTime())));
    assertFalse(filterRule.match(new TestNode("foobar.txt", "/root/foobar.txt", true, false, 1024, dateFormat.parse(
        "01/01/2005 10:00:01").getTime())));
    assertFalse(filterRule.match(new TestNode("foobar.txt", "/root/foobar.txt", true, false, 1024, dateFormat.parse(
View Full Code Here

Examples of net.sourceforge.fullsync.rules.filefilter.values.AgeValue

  }

  public void testOpIsnt() throws FilterRuleNotAppliableException, ParseException {
    SystemDate.getInstance().setTimeSpeed(0);
    SystemDate.getInstance().setCurrent(dateFormat.parse("01/01/2005 10:00:01").getTime());
    FileAgeFileFilterRule filterRule = new FileAgeFileFilterRule(new AgeValue(1, AgeValue.SECONDS), FileAgeFileFilterRule.OP_ISNT);
    assertFalse(filterRule.match(new TestNode("foobar.txt", "/root/foobar.txt", true, false, 1024, dateFormat.parse(
        "01/01/2005 10:00:00").getTime())));
    assertTrue(filterRule.match(new TestNode("foobar.txt", "/root/foobar.txt", true, false, 1024, dateFormat.parse(
        "01/01/2005 10:00:01").getTime())));
    assertTrue(filterRule.match(new TestNode("foobar.txt", "/root/foobar.txt", true, false, 1024, dateFormat.parse(
View Full Code Here

Examples of net.sourceforge.fullsync.rules.filefilter.values.AgeValue

  }

  public void testOpIsGreaterThan() throws FilterRuleNotAppliableException, ParseException {
    SystemDate.getInstance().setTimeSpeed(0);
    SystemDate.getInstance().setCurrent(dateFormat.parse("01/01/2005 10:00:00").getTime());
    FileAgeFileFilterRule filterRule = new FileAgeFileFilterRule(new AgeValue(1, AgeValue.SECONDS),
        FileAgeFileFilterRule.OP_IS_GREATER_THAN);
    assertFalse(filterRule.match(new TestNode("foobar.txt", "/root/foobar.txt", true, false, 1024, dateFormat.parse(
        "01/01/2005 10:00:00").getTime())));
    assertFalse(filterRule.match(new TestNode("foobar.txt", "/root/foobar.txt", true, false, 1024, dateFormat.parse(
        "01/01/2005 10:00:01").getTime())));
View Full Code Here

Examples of net.sourceforge.fullsync.rules.filefilter.values.AgeValue

  }

  public void testOpIsLessThan() throws FilterRuleNotAppliableException, ParseException {
    SystemDate.getInstance().setTimeSpeed(0);
    SystemDate.getInstance().setCurrent(dateFormat.parse("01/01/2005 10:00:00").getTime());
    FileAgeFileFilterRule filterRule = new FileAgeFileFilterRule(new AgeValue(10, AgeValue.SECONDS),
        FileAgeFileFilterRule.OP_IS_LESS_THAN);
    assertTrue(filterRule.match(new TestNode("foobar.txt", "/root/foobar.txt", true, false, 1024, dateFormat.parse(
        "01/01/2005 10:00:00").getTime())));
    assertTrue(filterRule.match(new TestNode("foobar.txt", "/root/foobar.txt", true, false, 1024, dateFormat.parse(
        "01/01/2005 09:59:57").getTime())));
View Full Code Here

Examples of net.sourceforge.fullsync.rules.filefilter.values.AgeValue

    }

    if (ruleType.equals(FileAgeFileFilterRule.typeName)) {
      int op = Integer.parseInt(fileFilterRuleElement.getAttribute("op"));
      String age = fileFilterRuleElement.getAttribute("age");
      rule = new FileAgeFileFilterRule(new AgeValue(age), op);
    }

    if (ruleType.equals(SubfilterFileFilerRule.typeName)) {
      NodeList filterList = fileFilterRuleElement.getElementsByTagName("NestedFileFilter");
      Element subfileFilerElement = (Element) filterList.item(0);
View Full Code Here

Examples of net.sourceforge.fullsync.rules.filefilter.values.AgeValue

      DateValue date = (DateValue) value;
      rule = new FileModificationDateFileFilterRule(date, op);
    }

    if (ruleType.equals(FileAgeFileFilterRule.typeName)) {
      AgeValue age = (AgeValue) value;
      rule = new FileAgeFileFilterRule(age, op);
    }

    if (ruleType.equals(SubfilterFileFilerRule.typeName)) {
      FilterValue filterValue = (FilterValue) value;
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.