-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ExtractedRecord object that cannot have extracted records (#922)
- Loading branch information
Showing
5 changed files
with
268 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
package emissary.core; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
import javax.annotation.Nullable; | ||
|
||
public class ExtractedRecord extends BaseDataObject implements IExtractedRecord { | ||
|
||
private static final long serialVersionUID = -6716572014928830135L; | ||
|
||
public ExtractedRecord() { | ||
super(); | ||
configure(); | ||
} | ||
|
||
public ExtractedRecord(byte[] newData, String name) { | ||
super(newData, name); | ||
configure(); | ||
} | ||
|
||
@SuppressWarnings("unused") | ||
public ExtractedRecord(byte[] newData, String name, @Nullable String form) { | ||
super(newData, name, form); | ||
configure(); | ||
} | ||
|
||
@SuppressWarnings("unused") | ||
public ExtractedRecord(byte[] newData, String name, String form, @Nullable String fileType) { | ||
super(newData, name, form, fileType); | ||
configure(); | ||
} | ||
|
||
private void configure() { | ||
this.extractedRecords = Collections.emptyList(); | ||
} | ||
|
||
@Override | ||
@Deprecated(forRemoval = true) | ||
public List<IBaseDataObject> getExtractedRecords() { | ||
return null; | ||
} | ||
|
||
@Override | ||
@Deprecated(forRemoval = true) | ||
public void setExtractedRecords(final List<? extends IBaseDataObject> extractedRecords) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
@Deprecated(forRemoval = true) | ||
public void addExtractedRecord(final IBaseDataObject extractedRecord) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
@Deprecated(forRemoval = true) | ||
public void addExtractedRecords(final List<? extends IBaseDataObject> extractedRecords) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
@Deprecated(forRemoval = true) | ||
public boolean hasExtractedRecords() { | ||
return false; | ||
} | ||
|
||
@Override | ||
@Deprecated(forRemoval = true) | ||
public void clearExtractedRecords() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
@Deprecated(forRemoval = true) | ||
public int getExtractedRecordCount() { | ||
return 0; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package emissary.core; | ||
|
||
public interface IExtractedRecord extends IBaseDataObject { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.