@Test public void testSetPrimaryBitstreamID() throws SQLException, AuthorizeException, IOException { doNothing().when(authorizeServiceSpy).authorizeAction(context, item, Constants.WRITE); doNothing().when(authorizeServiceSpy).authorizeAction(context, b, Constants.ADD); doNothing().when(authorizeServiceSpy) .authorizeAction(any(Context.class), any(Bitstream.class), eq(Constants.WRITE)); File f = new File(testProps.get("test.bitstream").toString()); Bitstream bs = bitstreamService.create(context, new FileInputStream(f)); bundleService.addBitstream(context, b, bs); b.setPrimaryBitstreamID(bs); assertThat("testSetPrimaryBitstreamID 0", b.getPrimaryBitstream(), equalTo(bs)); }
public void setPrimaryBitstreamID(Bitstream bitstream) { primaryBitstream = bitstream; setModified(); }
Bundle extends DSpaceObject implements DSpaceObjectLegacySupport { public void setPrimaryBitstreamID(Bitstream bitstream) { primaryBitstream = bitstream; setModified(); } }
Bundle extends DSpaceObject implements DSpaceObjectLegacySupport { public void setPrimaryBitstreamID(Bitstream bitstream) { primaryBitstream = bitstream; setModified(); } protected  Bundle(); }
Bundle extends DSpaceObject implements DSpaceObjectLegacySupport { public void setPrimaryBitstreamID(Bitstream bitstream) { primaryBitstream = bitstream; setModified(); } protected  Bundle(); @Override Integer getLegacyId(); @Override String getName(); void setName(Context context, String name); Bitstream getPrimaryBitstream(); void setPrimaryBitstreamID(Bitstream bitstream); void unsetPrimaryBitstreamID(); List<Bitstream> getBitstreams(); void clearBitstreams(); void removeBitstream(Bitstream bitstream); List<Item> getItems(); @Override boolean equals(Object obj); @Override int hashCode(); @Override int getType(); }
Bundle extends DSpaceObject implements DSpaceObjectLegacySupport { public void setPrimaryBitstreamID(Bitstream bitstream) { primaryBitstream = bitstream; setModified(); } protected  Bundle(); @Override Integer getLegacyId(); @Override String getName(); void setName(Context context, String name); Bitstream getPrimaryBitstream(); void setPrimaryBitstreamID(Bitstream bitstream); void unsetPrimaryBitstreamID(); List<Bitstream> getBitstreams(); void clearBitstreams(); void removeBitstream(Bitstream bitstream); List<Item> getItems(); @Override boolean equals(Object obj); @Override int hashCode(); @Override int getType();  }