Examples of newExpiration()


Examples of org.jets3t.service.model.LifecycleConfig.Rule.newExpiration()

            assertNull(config);

            // Create Rule with Expiration by Days
            LifecycleConfig newConfig = new LifecycleConfig();
            Rule newRule = newConfig.newRule("rule-1", "/nothing", Boolean.TRUE);
            Expiration expiration = newRule.newExpiration();
            expiration.setDays(7);

            // Apply initial Rule
            s3Service.setLifecycleConfig(bucketName, newConfig);
            config = s3Service.getLifecycleConfig(bucketName);
View Full Code Here

Examples of org.jets3t.service.model.LifecycleConfig.Rule.newExpiration()

            assertEquals(new Integer(3), rule.getTransition().getDays());
            assertEquals(new Integer(7), rule.getExpiration().getDays());

            // Add additional Rule
            Rule secondRule = config.newRule("second-rule", "/second", Boolean.FALSE);
            secondRule.newExpiration().setDays(100);
            s3Service.setLifecycleConfig(bucketName, config);
            config = s3Service.getLifecycleConfig(bucketName);
            assertEquals(2, config.getRules().size());
            rule = config.getRules().get(1);
            assertEquals("second-rule", rule.getId());
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.