Search in sources :

Example 1 with ProcessDeleteItem

use of org.codice.ddf.catalog.async.data.api.internal.ProcessDeleteItem in project ddf by codice.

the class MetacardBackupPluginTest method generateDeleteRequest.

private ProcessRequest<ProcessDeleteItem> generateDeleteRequest() {
    List<ProcessDeleteItem> processDeleteItems = new ArrayList<>();
    for (String id : METACARD_IDS) {
        Metacard metacard = new MetacardImpl();
        metacard.setAttribute(new AttributeImpl(Core.ID, id));
        metacard.setAttribute(new AttributeImpl(Core.METADATA, XML_METADATA));
        ProcessDeleteItem processDeleteItem = mock(ProcessDeleteItem.class);
        when(processDeleteItem.getMetacard()).thenReturn(metacard);
        processDeleteItems.add(processDeleteItem);
    }
    ProcessRequest<ProcessDeleteItem> processRequest = mock(ProcessRequest.class);
    when(processRequest.getProcessItems()).thenReturn(processDeleteItems);
    return processRequest;
}
Also used : Metacard(ddf.catalog.data.Metacard) AttributeImpl(ddf.catalog.data.impl.AttributeImpl) ArrayList(java.util.ArrayList) ProcessDeleteItem(org.codice.ddf.catalog.async.data.api.internal.ProcessDeleteItem) MetacardImpl(ddf.catalog.data.impl.MetacardImpl)

Aggregations

Metacard (ddf.catalog.data.Metacard)1 AttributeImpl (ddf.catalog.data.impl.AttributeImpl)1 MetacardImpl (ddf.catalog.data.impl.MetacardImpl)1 ArrayList (java.util.ArrayList)1 ProcessDeleteItem (org.codice.ddf.catalog.async.data.api.internal.ProcessDeleteItem)1