Removed type parameter from CopyFrom interface
This commit is contained in:
parent
26b7f4c4d2
commit
489c1f4b5c
10 changed files with 91 additions and 68 deletions
|
@ -23,7 +23,6 @@ import org.rometools.feed.module.opensearch.entity.OSQuery;
|
|||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.atom.Link;
|
||||
import com.sun.syndication.feed.module.Module;
|
||||
import com.sun.syndication.feed.module.ModuleImpl;
|
||||
|
||||
/**
|
||||
|
@ -134,7 +133,7 @@ public class OpenSearchModuleImpl extends ModuleImpl implements OpenSearchModule
|
|||
* @see com.sun.syndication.feed.CopyFrom#copyFrom(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void copyFrom(final CopyFrom<? extends Module> obj) {
|
||||
public void copyFrom(final CopyFrom obj) {
|
||||
final OpenSearchModule osm = (OpenSearchModule) obj;
|
||||
setTotalResults(osm.getTotalResults());
|
||||
setItemsPerPage(osm.getItemsPerPage());
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.rometools.feed.module.sse.modules;
|
|||
import java.util.Date;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.module.Module;
|
||||
import com.sun.syndication.feed.rss.Item;
|
||||
|
||||
/**
|
||||
|
@ -17,10 +16,12 @@ public class Conflict extends SSEModule {
|
|||
public static final String NAME = "conflict";
|
||||
|
||||
/**
|
||||
* An optional, string attribute. This text attribute identifies the endpoint that made the conflicting modification. It is used and compared
|
||||
* programmatically. See sx:update for format guidance.
|
||||
* An optional, string attribute. This text attribute identifies the endpoint that made the
|
||||
* conflicting modification. It is used and compared programmatically. See sx:update for format
|
||||
* guidance.
|
||||
* <p>
|
||||
* Note: Either or both of the when or by attributes MUST be present; it is invalid to have neither.
|
||||
* Note: Either or both of the when or by attributes MUST be present; it is invalid to have
|
||||
* neither.
|
||||
*/
|
||||
public static final String BY_ATTRIBUTE = "by";
|
||||
|
||||
|
@ -30,9 +31,11 @@ public class Conflict extends SSEModule {
|
|||
public static final String VERSION_ATTRIBUTE = "version";
|
||||
|
||||
/**
|
||||
* An optional, date-time attribute. This is the date-time when the conflicting modification took place. See sx:update for format guidance.
|
||||
* An optional, date-time attribute. This is the date-time when the conflicting modification
|
||||
* took place. See sx:update for format guidance.
|
||||
* <p>
|
||||
* Note: Either or both of the when or by attributes MUST be present; it is invalid to have neither.
|
||||
* Note: Either or both of the when or by attributes MUST be present; it is invalid to have
|
||||
* neither.
|
||||
*/
|
||||
public static final String WHEN_ATTRIBUTE = "when";
|
||||
|
||||
|
@ -42,7 +45,7 @@ public class Conflict extends SSEModule {
|
|||
private Item conflictItem;
|
||||
|
||||
@Override
|
||||
public void copyFrom(final CopyFrom<? extends Module> obj) {
|
||||
public void copyFrom(final CopyFrom obj) {
|
||||
final Conflict conflict = (Conflict) obj;
|
||||
conflict.when = when == null ? null : (Date) when.clone();
|
||||
conflict.by = by;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.rometools.feed.module.sse.modules;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.module.Module;
|
||||
|
||||
/**
|
||||
* <sx:conflicts> element within <sx:sync>
|
||||
|
@ -13,7 +12,7 @@ public class Conflicts extends SSEModule {
|
|||
public static final String NAME = "conflicts";
|
||||
|
||||
@Override
|
||||
public void copyFrom(final CopyFrom<? extends Module> obj) {
|
||||
public void copyFrom(final CopyFrom obj) {
|
||||
// nothing to copy, just a place-holder
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.module.Module;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
|
@ -40,7 +39,7 @@ public class History extends SSEModule {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void copyFrom(final CopyFrom<? extends Module> other) {
|
||||
public void copyFrom(final CopyFrom other) {
|
||||
final History otherHistory = (History) other;
|
||||
when = otherHistory.when == null ? null : (Date) otherHistory.when.clone();
|
||||
// dont copy immutable
|
||||
|
@ -55,8 +54,8 @@ public class History extends SSEModule {
|
|||
/**
|
||||
* Get the date-time when the most recent modification took place.
|
||||
* <p/>
|
||||
* This is the date-time when the most recent modification took place. If this attribute is omitted the value defaults to the earliest time representable in
|
||||
* RFC 822.
|
||||
* This is the date-time when the most recent modification took place. If this attribute is
|
||||
* omitted the value defaults to the earliest time representable in RFC 822.
|
||||
*
|
||||
* @return the date-time when the most recent modification took place.
|
||||
*/
|
||||
|
@ -77,15 +76,18 @@ public class History extends SSEModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provides access to a text attribute identifying the unique endpoint that made the most recent modification. This SHOULD be some combination of user and
|
||||
* device (so that a given user can edit a feed on multiple devices). This attribute is used programmatically to break ties in case two changes happened at
|
||||
* the same time (within the same second).
|
||||
* Provides access to a text attribute identifying the unique endpoint that made the most recent
|
||||
* modification. This SHOULD be some combination of user and device (so that a given user can
|
||||
* edit a feed on multiple devices). This attribute is used programmatically to break ties in
|
||||
* case two changes happened at the same time (within the same second).
|
||||
* <p/>
|
||||
* Either or both of the when or by must be present; it is invalid to have neither.
|
||||
* <p/>
|
||||
* If this attribute is omitted the value defaults to the empty string (which must be less than all other values for purposes of collation).
|
||||
* If this attribute is omitted the value defaults to the empty string (which must be less than
|
||||
* all other values for purposes of collation).
|
||||
*
|
||||
* @return A text attribute identifying the unique endpoint that made the most recent modification.
|
||||
* @return A text attribute identifying the unique endpoint that made the most recent
|
||||
* modification.
|
||||
*/
|
||||
public String getBy() {
|
||||
return by;
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.rometools.feed.module.sse.modules;
|
|||
import java.util.Date;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.module.Module;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
|
@ -24,12 +23,14 @@ public class Related extends SSEModule {
|
|||
public static final String NAME = "related";
|
||||
|
||||
/**
|
||||
* Indicates whether the link points to a file containing the complete collection of items for this feed.
|
||||
* Indicates whether the link points to a file containing the complete collection of items for
|
||||
* this feed.
|
||||
*/
|
||||
public static final int COMPLETE = 0;
|
||||
|
||||
/**
|
||||
* Indicates whether the link points to a feed whose contents are being incorporated into this feed by the publisher.
|
||||
* Indicates whether the link points to a feed whose contents are being incorporated into this
|
||||
* feed by the publisher.
|
||||
*/
|
||||
public static final int AGGREGATED = 1;
|
||||
|
||||
|
@ -51,7 +52,7 @@ public class Related extends SSEModule {
|
|||
public static final String UNTIL_ATTRIBUTE = "until";
|
||||
|
||||
@Override
|
||||
public void copyFrom(final CopyFrom<? extends Module> obj) {
|
||||
public void copyFrom(final CopyFrom obj) {
|
||||
final Related related = (Related) obj;
|
||||
related.link = link;
|
||||
related.since = since == null ? null : (Date) since.clone();
|
||||
|
@ -100,9 +101,11 @@ public class Related extends SSEModule {
|
|||
/**
|
||||
* type A required, string attribute. This attribute can have one of the following values:
|
||||
* <p>
|
||||
* "complete" if the link points to file containing the complete collection of items for this feed.
|
||||
* "complete" if the link points to file containing the complete collection of items for this
|
||||
* feed.
|
||||
* <p>
|
||||
* "aggregated" if the link points to a feed whose contents are being incorporated into this feed by the publisher.
|
||||
* "aggregated" if the link points to a feed whose contents are being incorporated into this
|
||||
* feed by the publisher.
|
||||
*
|
||||
* @return the type of the releated feed.
|
||||
*/
|
||||
|
@ -120,8 +123,8 @@ public class Related extends SSEModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* An optional, date-time attribute. This is the starting point of the related feed. If this attribute is omitted or blank, it is assumed that this is a
|
||||
* complete feed.
|
||||
* An optional, date-time attribute. This is the starting point of the related feed. If this
|
||||
* attribute is omitted or blank, it is assumed that this is a complete feed.
|
||||
*
|
||||
* @return the starting point of the related feed.
|
||||
*/
|
||||
|
|
|
@ -56,5 +56,5 @@ public abstract class SSEModule implements Module {
|
|||
}
|
||||
|
||||
@Override
|
||||
public abstract void copyFrom(CopyFrom<? extends Module> obj);
|
||||
public abstract void copyFrom(CopyFrom obj);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.rometools.feed.module.sse.modules;
|
|||
import java.util.Date;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.module.Module;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
|
@ -52,7 +51,7 @@ public class Sharing extends SSEModule {
|
|||
private Related related;
|
||||
|
||||
@Override
|
||||
public void copyFrom(final CopyFrom<? extends Module> obj) {
|
||||
public void copyFrom(final CopyFrom obj) {
|
||||
final Sharing sharing = (Sharing) obj;
|
||||
ordered = sharing.ordered;
|
||||
since = sharing.since == null ? null : (Date) sharing.since.clone();
|
||||
|
@ -62,8 +61,9 @@ public class Sharing extends SSEModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* ordered An optional, Boolean attribute. If present and its value is "true" (lower-case), subscribers MUST treat the item list as an ordered set (see
|
||||
* section 3.2). If this attribute is omitted or blank, it is assumed that this is an unordered feed.
|
||||
* ordered An optional, Boolean attribute. If present and its value is "true" (lower-case),
|
||||
* subscribers MUST treat the item list as an ordered set (see section 3.2). If this attribute
|
||||
* is omitted or blank, it is assumed that this is an unordered feed.
|
||||
*
|
||||
* @return a Boolean indicating if subscribers must treat the item list as an ordered set.
|
||||
*/
|
||||
|
@ -81,10 +81,12 @@ public class Sharing extends SSEModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provides an Integer that expresses the size of the window of change history kept by the publisher. Subscribers MAY use this value to determine the
|
||||
* frequency with which they must read a feed.
|
||||
* Provides an Integer that expresses the size of the window of change history kept by the
|
||||
* publisher. Subscribers MAY use this value to determine the frequency with which they must
|
||||
* read a feed.
|
||||
*
|
||||
* @return an Integer that expresses the size of the window of change history kept by the publisher.
|
||||
* @return an Integer that expresses the size of the window of change history kept by the
|
||||
* publisher.
|
||||
*/
|
||||
public Integer getWindow() {
|
||||
return window;
|
||||
|
@ -93,15 +95,17 @@ public class Sharing extends SSEModule {
|
|||
/**
|
||||
* Set an Integer that expresses the size of the window of change history kept by the publisher.
|
||||
*
|
||||
* @param window an Integer that expresses the size of the window of change history kept by the publisher.
|
||||
* @param window an Integer that expresses the size of the window of change history kept by the
|
||||
* publisher.
|
||||
*/
|
||||
public void setWindow(final Integer window) {
|
||||
this.window = window;
|
||||
}
|
||||
|
||||
/**
|
||||
* since An optional date-time attribute. All items updated on or after this date-time are included in the feed. If not present or null, the
|
||||
* "beginning of time" is assumed and the feed contains the node's complete item set as of the until date-time.
|
||||
* since An optional date-time attribute. All items updated on or after this date-time are
|
||||
* included in the feed. If not present or null, the "beginning of time" is assumed and the feed
|
||||
* contains the node's complete item set as of the until date-time.
|
||||
*
|
||||
* @return An optional date-time attribute.
|
||||
*/
|
||||
|
@ -110,7 +114,8 @@ public class Sharing extends SSEModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the optional date-time attribute where all items updated on or after this date-time are included in the feed.
|
||||
* Sets the optional date-time attribute where all items updated on or after this date-time are
|
||||
* included in the feed.
|
||||
*
|
||||
* @param since An optional date-time attribute.
|
||||
*/
|
||||
|
@ -119,9 +124,10 @@ public class Sharing extends SSEModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* until An optional date-time attribute. Items updated after this date are not included in the feed. The publisher must guarantee that the value of until
|
||||
* will increase if any items in the feed are updated. If this attribute is omitted or blank, the subscriber cannot make assumptions about when the feed was
|
||||
* updated.
|
||||
* until An optional date-time attribute. Items updated after this date are not included in the
|
||||
* feed. The publisher must guarantee that the value of until will increase if any items in the
|
||||
* feed are updated. If this attribute is omitted or blank, the subscriber cannot make
|
||||
* assumptions about when the feed was updated.
|
||||
*
|
||||
* @return the date where items updated after this date are not included in the feed.
|
||||
*/
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.module.Module;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
|
@ -48,7 +47,7 @@ public class Sync extends SSEModule {
|
|||
private List<Conflict> conflicts;
|
||||
|
||||
@Override
|
||||
public void copyFrom(final CopyFrom<? extends Module> obj) {
|
||||
public void copyFrom(final CopyFrom obj) {
|
||||
final Sync sync = (Sync) obj;
|
||||
deleted = sync.deleted;
|
||||
version = sync.version;
|
||||
|
@ -62,18 +61,21 @@ public class Sync extends SSEModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provides access to the sync id, a required, string attribute. This is the identifier for the item.
|
||||
* Provides access to the sync id, a required, string attribute. This is the identifier for the
|
||||
* item.
|
||||
* <p/>
|
||||
* The ID is assigned by the creator of the item, and MUST NOT be changed by subsequent publishers. Applications will collate and compare these identifiers,
|
||||
* therefore they MUST conform to the syntax for Namespace Specific Strings (the NSS portion of a URN) in RFC 2141.
|
||||
* The ID is assigned by the creator of the item, and MUST NOT be changed by subsequent
|
||||
* publishers. Applications will collate and compare these identifiers, therefore they MUST
|
||||
* conform to the syntax for Namespace Specific Strings (the NSS portion of a URN) in RFC 2141.
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the identifier for the item. The ID MUST be globally unique within the feed and it MUST be identical across feeds if an item is being shared or
|
||||
* replicated as part of multiple distinct independent feeds.
|
||||
* Set the identifier for the item. The ID MUST be globally unique within the feed and it MUST
|
||||
* be identical across feeds if an item is being shared or replicated as part of multiple
|
||||
* distinct independent feeds.
|
||||
*
|
||||
* @param id the identifier for the item.
|
||||
*/
|
||||
|
@ -82,8 +84,8 @@ public class Sync extends SSEModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provides access to a required, integer attribute. This is the modification sequence number of the item, starting at 1 and incrementing by 1 indefinitely
|
||||
* for each subsequent modification.
|
||||
* Provides access to a required, integer attribute. This is the modification sequence number of
|
||||
* the item, starting at 1 and incrementing by 1 indefinitely for each subsequent modification.
|
||||
*/
|
||||
public Integer getVersion() {
|
||||
return version;
|
||||
|
@ -99,8 +101,10 @@ public class Sync extends SSEModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provide access to an optional, Boolean attribute. If present and its value is "true" (lower-case), it indicates that the item has been deleted and this
|
||||
* is a tombstone. If not present, or if present with value of "false" or "", then the item is not deleted. All other values are invalid.
|
||||
* Provide access to an optional, Boolean attribute. If present and its value is "true"
|
||||
* (lower-case), it indicates that the item has been deleted and this is a tombstone. If not
|
||||
* present, or if present with value of "false" or "", then the item is not deleted. All other
|
||||
* values are invalid.
|
||||
*/
|
||||
public Boolean isDeleted() {
|
||||
return deleted;
|
||||
|
@ -116,20 +120,25 @@ public class Sync extends SSEModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provides access to an optional, Boolean conflict attribute. If present and its value is "true" (lower-case), it indicates there was an update conflict
|
||||
* detected when processing an update of this item, and it should potentially be examined by the user. If not present, or present with value of "false" or
|
||||
* "", Then no conflict has been detected. All other values are invalid.
|
||||
* Provides access to an optional, Boolean conflict attribute. If present and its value is
|
||||
* "true" (lower-case), it indicates there was an update conflict detected when processing an
|
||||
* update of this item, and it should potentially be examined by the user. If not present, or
|
||||
* present with value of "false" or "", Then no conflict has been detected. All other values are
|
||||
* invalid.
|
||||
*
|
||||
* @return indicates there was an update conflict detected when processing an update of this item.
|
||||
* @return indicates there was an update conflict detected when processing an update of this
|
||||
* item.
|
||||
*/
|
||||
public Boolean isConflict() {
|
||||
return conflict;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an indication of whether there was an update conflict detected when processing an update of this item.
|
||||
* Set an indication of whether there was an update conflict detected when processing an update
|
||||
* of this item.
|
||||
*
|
||||
* @param conflict an indication of whether there was an update conflict detected when processing an update of this item.
|
||||
* @param conflict an indication of whether there was an update conflict detected when
|
||||
* processing an update of this item.
|
||||
*/
|
||||
public void setConflict(final Boolean conflict) {
|
||||
this.conflict = conflict;
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.rometools.feed.module.sse.modules;
|
|||
import java.util.Date;
|
||||
|
||||
import com.sun.syndication.feed.CopyFrom;
|
||||
import com.sun.syndication.feed.module.Module;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
|
@ -28,7 +27,7 @@ public class Update extends SSEModule {
|
|||
private String by;
|
||||
|
||||
@Override
|
||||
public void copyFrom(final CopyFrom<? extends Module> other) {
|
||||
public void copyFrom(final CopyFrom other) {
|
||||
final Update otherUpdate = (Update) other;
|
||||
otherUpdate.when = when == null ? null : (Date) when.clone();
|
||||
// dont copy immutable
|
||||
|
@ -36,8 +35,9 @@ public class Update extends SSEModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provides access to the date-time when the modification took place. If this attribute is omitted the value defaults to the earliest time representable in
|
||||
* RFC 822. Either or both of the when or by attributes MUST be present; it is invalid to have neither.
|
||||
* Provides access to the date-time when the modification took place. If this attribute is
|
||||
* omitted the value defaults to the earliest time representable in RFC 822. Either or both of
|
||||
* the when or by attributes MUST be present; it is invalid to have neither.
|
||||
*/
|
||||
public Date getWhen() {
|
||||
return when;
|
||||
|
@ -53,9 +53,11 @@ public class Update extends SSEModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provides access to a text attribute identifying the unique endpoint that made a modification. This SHOULD be some combination of user and device (so that
|
||||
* a given user can edit a feed on multiple devices). This attribute is used programmatically to break ties in case two changes happened at the same time
|
||||
* (within the same second). Either or both of the when or by must be present; it is invalid to have neither.
|
||||
* Provides access to a text attribute identifying the unique endpoint that made a modification.
|
||||
* This SHOULD be some combination of user and device (so that a given user can edit a feed on
|
||||
* multiple devices). This attribute is used programmatically to break ties in case two changes
|
||||
* happened at the same time (within the same second). Either or both of the when or by must be
|
||||
* present; it is invalid to have neither.
|
||||
*
|
||||
* @return access to a text attribute identifying the unique endpoint that made a modification.
|
||||
*/
|
||||
|
|
|
@ -73,7 +73,7 @@ public class YWeatherModuleImpl extends ModuleImpl implements YWeatherEntryModul
|
|||
}
|
||||
|
||||
@Override
|
||||
public void copyFrom(final CopyFrom<? extends Module> o) {
|
||||
public void copyFrom(final CopyFrom o) {
|
||||
final YWeatherModuleImpl from = (YWeatherModuleImpl) o;
|
||||
setAstronomy(from.getAstronomy() != null ? (Astronomy) from.getAstronomy().clone() : null);
|
||||
setCondition(from.getCondition() != null ? (Condition) from.getCondition().clone() : null);
|
||||
|
|
Loading…
Reference in a new issue