Skip to content

Commit 86a80b2

Browse files
arnett, stutwincitiesguy
authored andcommitted
re-added and deprecated LifecycleRule constructors to avoid breaking changes
1 parent 540999e commit 86a80b2

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/main/java/com/emc/object/s3/bean/LifecycleRule.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,36 @@ public class LifecycleRule {
4040
private Expiration expiration;
4141
private NoncurrentVersionExpiration noncurrentVersionExpiration;
4242

43-
public LifecycleRule() { }
43+
public LifecycleRule() {
44+
this(null, null, null);
45+
}
4446

4547
public LifecycleRule(String id, String prefix, Status status) {
4648
this.id = id;
4749
this.prefix = prefix;
4850
this.status = status;
4951
}
5052

53+
/**
54+
* @see {@link #withExpirationDays(Integer)}
55+
* @deprecated please use builder methods instead
56+
*/
57+
@Deprecated
58+
public LifecycleRule(String id, String prefix, Status status, Integer expirationDays) {
59+
this(id, prefix, status);
60+
setExpirationDays(expirationDays);
61+
}
62+
63+
/**
64+
* @see {@link #withExpirationDate(Date)}
65+
* @deprecated please use builder methods instead
66+
*/
67+
@Deprecated
68+
public LifecycleRule(String id, String prefix, Status status, Date expirationDate) {
69+
this(id, prefix, status);
70+
setExpirationDate(expirationDate);
71+
}
72+
5173
public LifecycleRule withId(String id) {
5274
setId(id);
5375
return this;

0 commit comments

Comments
 (0)