public void deleteReferenceSetsForWorkflowRun(String workflowRunId) throws ReferenceServiceException { checkDao(); referenceSetDao.deleteReferenceSetsForWFRun(workflowRunId); } }
Set<Class<ExternalReferenceSPI>> ensureTypes, ReferenceContext context) throws ReferenceSetServiceException { checkDao(); checkAugmentor(); if (context == null) { context = new EmptyReferenceContext(); ReferenceSet rs = getReferenceSet(id); Set<ExternalReferenceSPI> newReferences = referenceSetAugmentor .augmentReferenceSet(rs, ensureTypes, context);
/** * {@inheritDoc} */ public ReferenceSet registerReferenceSet( Set<ExternalReferenceSPI> references, ReferenceContext context) throws ReferenceSetServiceException { checkDao(); checkGenerator(); context = EmptyReferenceContext.checkContext(context); ReferenceSetImpl rsi = new ReferenceSetImpl(); rsi .setExternalReferences(new HashSet<ExternalReferenceSPI>( references)); T2Reference id = getGenerator(context).nextReferenceSetReference(); rsi.setTypedId(T2ReferenceImpl.getAsImpl(id)); try { referenceSetDao.store(rsi); return rsi; } catch (DaoException de) { throw new ReferenceSetServiceException(de); } } }
Set<ExternalReferenceSPI> references, ReferenceContext context) throws ReferenceSetServiceException { checkDao(); checkGenerator();
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; }
Set<Class<ExternalReferenceSPI>> ensureTypes, ReferenceContext context) throws ReferenceSetServiceException { checkDao(); checkAugmentor(); if (context == null) { context = new EmptyReferenceContext(); ReferenceSet rs = getReferenceSet(id); Set<ExternalReferenceSPI> newReferences = referenceSetAugmentor .augmentReferenceSet(rs, ensureTypes, context);
/** * {@inheritDoc} */ public ReferenceSet registerReferenceSet( Set<ExternalReferenceSPI> references) throws ReferenceSetServiceException { checkDao(); checkGenerator(); ReferenceSetImpl rsi = new ReferenceSetImpl(); rsi .setExternalReferences(new HashSet<ExternalReferenceSPI>( references)); T2Reference id = t2ReferenceGenerator.nextReferenceSetReference(); rsi.setTypedId(T2ReferenceImpl.getAsImpl(id)); try { referenceSetDao.store(rsi); return rsi; } catch (DaoException de) { throw new ReferenceSetServiceException(de); } } }
Set<Class<ExternalReferenceSPI>> ensureTypes, ReferenceContext context) throws ReferenceSetServiceException { checkDao(); checkAugmentor(); if (context == null) { context = new EmptyReferenceContext(); ReferenceSet rs = getReferenceSet(id); Set<ExternalReferenceSPI> newReferences = referenceSetAugmentor .augmentReferenceSet(rs, ensureTypes, context);
/** * {@inheritDoc} */ public ReferenceSet getReferenceSet(T2Reference id) throws ReferenceSetServiceException { checkDao(); try { return referenceSetDao.get(id); } catch (DaoException de) { throw new ReferenceSetServiceException(de); } }
/** * {@inheritDoc} */ public ReferenceSet getReferenceSet(T2Reference id) throws ReferenceSetServiceException { checkDao(); try { return referenceSetDao.get(id); } catch (DaoException de) { throw new ReferenceSetServiceException(de); } }
public boolean delete(T2Reference reference) throws ReferenceServiceException { checkDao(); ReferenceSet set=referenceSetDao.get(reference); if (set==null) return false; return referenceSetDao.delete(set); }
/** * {@inheritDoc} */ public ReferenceSet getReferenceSet(T2Reference id) throws ReferenceSetServiceException { checkDao(); try { return referenceSetDao.get(id); } catch (DaoException de) { throw new ReferenceSetServiceException(de); } }