@@ -197,7 +197,7 @@ public static void addAttachment(SQLDatabase db, String attachmentsDir,
197197 * @throws AttachmentException if there was an error preparing the attachment, e.g., reading
198198 * attachment data.
199199 */
200- protected static PreparedAttachment prepareAttachment (String attachmentsDir ,
200+ public static PreparedAttachment prepareAttachment (String attachmentsDir ,
201201 AttachmentStreamFactory attachmentStreamFactory ,
202202 Attachment attachment )
203203 throws AttachmentException {
@@ -232,7 +232,7 @@ protected static PreparedAttachment prepareAttachment(String attachmentsDir,
232232 * @param attachments Attachments to search.
233233 * @return List of attachments which already exist in the attachment store, or an empty list if none.
234234 */
235- protected static List <SavedAttachment > findExistingAttachments (
235+ public static List <SavedAttachment > findExistingAttachments (
236236 Collection <? extends Attachment > attachments ) {
237237 ArrayList <SavedAttachment > list = new ArrayList <SavedAttachment >();
238238 for (Attachment a : attachments ) {
@@ -249,7 +249,7 @@ protected static List<SavedAttachment> findExistingAttachments(
249249 * @param attachments Attachments to search.
250250 * @return List of attachments which need adding to the attachment store, or an empty list if none.
251251 */
252- protected static List <Attachment > findNewAttachments (Collection <? extends Attachment > attachments ) {
252+ public static List <Attachment > findNewAttachments (Collection <? extends Attachment > attachments ) {
253253 ArrayList <Attachment > list = new ArrayList <Attachment >();
254254 for (Attachment a : attachments ) {
255255 if (!(a instanceof SavedAttachment )) {
@@ -263,12 +263,13 @@ protected static List<Attachment> findNewAttachments(Collection<? extends Attach
263263 * Download each attachment in {@code attachments} to a temporary location, and
264264 * return a list of attachments suitable for passing to {@code setAttachments}.
265265 *
266- * Typically {@code attachments} is found via a call to {@see findNewAttachments}.
266+ * Typically {@code attachments} is found via a call to {@link # findNewAttachments}.
267267 *
268268 * @param attachments List of attachments to prepare.
269269 * @return Attachments prepared for inserting into attachment store.
270+ * @see #findNewAttachments
270271 */
271- protected static List <PreparedAttachment > prepareAttachments (String attachmentsDir ,
272+ public static List <PreparedAttachment > prepareAttachments (String attachmentsDir ,
272273 AttachmentStreamFactory attachmentStreamFactory ,
273274 List <Attachment > attachments )
274275 throws AttachmentException {
@@ -393,7 +394,7 @@ public static void copyAttachmentsToRevision(SQLDatabase db, List<SavedAttachmen
393394 * @param newSequence identifies sequence number of revision to copy attachment data to
394395 * @param filename filename of attachment to copy
395396 */
396- protected static void copyAttachment (SQLDatabase db , long parentSequence , long newSequence ,
397+ public static void copyAttachment (SQLDatabase db , long parentSequence , long newSequence ,
397398 String filename ) throws SQLException {
398399 Cursor c = null ;
399400 try {
@@ -409,7 +410,7 @@ protected static void copyAttachment(SQLDatabase db, long parentSequence, long n
409410 * Called by BasicDatastore on the execution queue, this needs have the db passed ot it
410411 * @param db database to purge attachments from
411412 */
412- protected static void purgeAttachments (SQLDatabase db , String attachmentsDir ) {
413+ public static void purgeAttachments (SQLDatabase db , String attachmentsDir ) {
413414 // it's easier to deal with Strings since java doesn't know how to compare byte[]s
414415 Set <String > currentKeys = new HashSet <String >();
415416 Cursor c = null ;
0 commit comments