public IdentifiedList<T2Reference> registerEmptyList(int depth, ReferenceContext context) throws ListServiceException { checkDao(); checkGenerator(); context = EmptyReferenceContext.checkContext(context); T2ReferenceImpl newReference = T2ReferenceImpl.getAsImpl(getGenerator( context).nextListReference(false, depth)); T2ReferenceListImpl newList = new T2ReferenceListImpl(); newList.setTypedId(newReference); try { listDao.store(newList); return newList; } catch (DaoException de) { throw new ListServiceException(de); } }
public IdentifiedList<T2Reference> registerEmptyList(int depth) throws ListServiceException { checkDao(); checkGenerator(); T2ReferenceImpl newReference = T2ReferenceImpl .getAsImpl(t2ReferenceGenerator.nextListReference(false, depth)); T2ReferenceListImpl newList = new T2ReferenceListImpl(); newList.setTypedId(newReference); try { listDao.store(newList); return newList; } catch (DaoException de) { throw new ListServiceException(de); } }
public void deleteIdentifiedListsForWorkflowRun(String workflowRunId) throws ReferenceServiceException { checkDao(); listDao.deleteIdentifiedListsForWFRun(workflowRunId); }
private static ReferenceService createReferenceService() { SimpleT2ReferenceGenerator referenceGenerator = new SimpleT2ReferenceGenerator(); ReferenceSetAugmentorImpl referenceSetAugmentor = new ReferenceSetAugmentorImpl(); referenceSetAugmentor.setBuilders((List<ExternalReferenceBuilderSPI<?>>) getBuilders()); referenceSetAugmentor.setTranslators(getTranslators()); ReferenceSetServiceImpl referenceSetService = new ReferenceSetServiceImpl(); referenceSetService.setT2ReferenceGenerator(referenceGenerator); referenceSetService.setReferenceSetDao(new InMemoryReferenceSetDao()); referenceSetService.setReferenceSetAugmentor(referenceSetAugmentor); ListServiceImpl listService = new ListServiceImpl(); listService.setT2ReferenceGenerator(referenceGenerator); listService.setListDao(new InMemoryListDao()); ErrorDocumentServiceImpl errorDocumentService = new ErrorDocumentServiceImpl(); errorDocumentService.setT2ReferenceGenerator(referenceGenerator); errorDocumentService.setErrorDao(new InMemoryErrorDocumentDao()); ReferenceServiceImpl referenceService = new ReferenceServiceImpl(); referenceService.setReferenceSetService(referenceSetService); referenceService.setListService(listService); referenceService.setErrorDocumentService(errorDocumentService); referenceService.setConverters(getConverters()); referenceService.setValueBuilders(getValueBuilders()); return referenceService; }
public IdentifiedList<T2Reference> registerEmptyList(int depth, ReferenceContext context) throws ListServiceException { if (depth < 1) { throw new ListServiceException("Can't register empty lists of depth " + depth); } checkDao(); checkGenerator(); T2ReferenceImpl newReference = T2ReferenceImpl .getAsImpl(t2ReferenceGenerator.nextListReference(false, depth, context)); T2ReferenceListImpl newList = new T2ReferenceListImpl(); newList.setTypedId(newReference); try { listDao.store(newList); return newList; } catch (DaoException de) { throw new ListServiceException(de); } }
public IdentifiedList<T2Reference> getList(T2Reference id) throws ListServiceException { checkDao(); try { return listDao.get(id); } catch (DaoException de) { throw new ListServiceException(de); } }
public IdentifiedList<T2Reference> registerList(List<T2Reference> items) throws ListServiceException { checkDao(); checkGenerator(); if (items.isEmpty()) { throw new ListServiceException(
public IdentifiedList<T2Reference> registerList(List<T2Reference> items, ReferenceContext context) throws ListServiceException { checkDao(); checkGenerator(); context = EmptyReferenceContext.checkContext(context); if (items.isEmpty()) { .getAsImpl(getGenerator(context).nextListReference( containsErrors, depth + 1)); newList.setTypedId(newReference);
public IdentifiedList<T2Reference> getList(T2Reference id) throws ListServiceException { checkDao(); try { return listDao.get(id); } catch (DaoException de) { throw new ListServiceException(de); } }
public IdentifiedList<T2Reference> registerList(List<T2Reference> items, ReferenceContext context) throws ListServiceException { checkDao(); checkGenerator(); if (items.isEmpty()) { throw new ListServiceException(
public boolean delete(T2Reference reference) throws ReferenceServiceException { checkDao(); IdentifiedList<T2Reference> list=listDao.get(reference); if (list==null) return false; return listDao.delete(list); }
public IdentifiedList<T2Reference> getList(T2Reference id) throws ListServiceException { checkDao(); try { return listDao.get(id); } catch (DaoException de) { throw new ListServiceException(de); } }