@Override public List<DataItemTransport> retrieveDataItemTransportList(String currentCollectionId, int maxResultsPerPage, int offset) throws ArchiveServiceException, BizPolicyException { ArchiveSearchResult<DataItem> results = archiveService .retrieveDataSetsForCollection(getDepositId(currentCollectionId), maxResultsPerPage, offset); return this.retrieveDataItemTransportList(results); }
/** * Resets the in-memory state of this instance, allowing it to be re-used. Often called in * a {@code @After} or {@code @Before} test method. */ public void reset() { deposit_info_dao.reset(); }
private boolean checkFileExists(String id) throws ArchiveServiceException { boolean found = false; MetadataFile file = metadataFileBizService.retrieveMetadataFile(id); if (file != null) { found = true; } return found; }
@Override public UserDetails loadUserByUsername(String id) throws UsernameNotFoundException, DataAccessException { Person p = userService.get(id); if (p == null) { throw new UsernameNotFoundException("User ID " + id + " not found."); } return new UserDetailsWrapper(p); }
public void addDeposit(DateTime depositDate) { DateTime depositDay = getDateTimeOrNull(depositDate, true); //If their is already a map entry update it, otherwise create a new one if(dailyDeposits.containsKey(depositDay)) { dailyDeposits.get(depositDay).updateDeposit(depositDate); } else { dailyDeposits.put(depositDay, new DailyDataItemCount(depositDate)); } }
public ArchiveSearchResult<DataItem> retrieveDataSetsForCollection(String collection_id, int numberOfResults, int offset) throws ArchiveServiceException { return archive_service.retrieveDataSetsForCollection(collection_id, numberOfResults, offset); }
private boolean checkDataItemExists(String id) throws ArchiveServiceException, BizPolicyException { boolean found = false; DataItem dataItem = dataItemBizService.getDataItem(id); if (dataItem != null) { found = true; } return found; }
private boolean checkProjectExists(String id) throws BizPolicyException { boolean found = false; Project project = projectBizService.getProject(id); if (project != null) { found = true; } return found; }
@Override public Project getProject(String id) throws BizPolicyException { Project proj = projectService.get(id); if (proj == null) { return null; } return proj; }
private String get_deposit_id(String bo_id, boolean waitForPendingObjects) throws ArchiveServiceException, InterruptedException { String depositId; if (waitForPendingObjects) { depositId = getDepositIdWaitForPending(bo_id); } else { depositId = getDepositIdIgnoreFailedOrPending(bo_id); } return depositId; }
public ArchiveSearchResult<MetadataFile> retrieveMetadataFile(String deposit_id) throws ArchiveServiceException { return archive_service.retrieveMetadataFile(deposit_id); }
@Override public boolean canCreateCollection(Person user, Collection parentCollection) throws RelationshipConstraintException { //If a person can deposit to a collection, he/she can create sub collection under the collection. see DC1423 for //requirements return canDepositToCollection(user, parentCollection); }
@Override public List<DataItem> getDataItemVersions(String business_id, Person user) throws ArchiveServiceException, BizPolicyException { return get_versions(business_id, user); }
public ArchiveSearchResult<MetadataFile> retrieveMetadataFile(String deposit_id) throws ArchiveServiceException { return retrieve(deposit_id, metadataFile_mapper); }
/** * Constructs the mock connector * * @param em the EventManager used to produce DcsEvent objects * @param archiveUtil the MockArchiveUtil used to store and retrieve DcsEntities */ public MockDcsConnector(EventManager em, MockArchiveUtil archiveUtil, DcsModelBuilder model_builder) { this.em = em; this.archiveUtil = archiveUtil; this.feedWriter = new AtomFeedWriterImpl(em); this.model_builder = model_builder; }
@Override public List<DataItemTransport> retrieveDataItemTransportList(String currentCollectionId, int maxResultsPerPage, int offset) throws ArchiveServiceException, BizPolicyException { ArchiveSearchResult<DataItem> results = archiveService .retrieveDataSetsForCollection(getDepositId(currentCollectionId), maxResultsPerPage, offset); return this.retrieveDataItemTransportList(results); }
/** * Resets the in-memory state of this instance, allowing it to be re-used. Often called in * a {@code @After} or {@code @Before} test method. */ public void reset() { deposit_info_dao.reset(); }
@Override public boolean canCreateCollection(Person user, Collection parentCollection) throws RelationshipConstraintException { //If a person can deposit to a collection, he/she can create sub collection under the collection. see DC1423 for //requirements return canDepositToCollection(user, parentCollection); }
@Override public List<DataItem> getDataItemVersions(String business_id, Person user) throws ArchiveServiceException, BizPolicyException { return get_versions(business_id, user); }
@Override public ArchiveSearchResult<RelationshipSet> retrieveRelationshipSet(String deposit_id) throws ArchiveServiceException { return retrieve(deposit_id, relationship_mapper); }