示例#1
0
 @Override
 public String writeTags(Collection<TagInputBean> tagInputBeans) throws FlockException {
   Company company = securityHelper.getCompany();
   try {
     mediationFacade.createTags(company, tagInputBeans);
   } catch (ExecutionException | InterruptedException e) {
     throw new FlockException("Interrupted", e);
   }
   return null;
 }
示例#2
0
 @Override
 public String writeEntities(Collection<EntityInputBean> entityBatch) throws FlockException {
   Company company = securityHelper.getCompany();
   try {
     for (EntityInputBean entityInputBean : entityBatch) {
       mediationFacade.trackEntity(company, entityInputBean);
     }
     return "ok";
   } catch (InterruptedException e) {
     throw new FlockException("Interrupted", e);
   } catch (ExecutionException e) {
     throw new FlockException("Execution Problem", e);
   } catch (IOException e) {
     throw new FlockException("IO Exception", e);
   }
 }
示例#3
0
 @Override
 public ContentModel getContentModel(String modelKey) throws IOException {
   String[] args = modelKey.split(":");
   // ToDo: this is not yet properly supported - needs to be tested with Tag fortress - which is
   // logical
   if (args.length == 2) {
     Company company = securityHelper.getCompany();
     Fortress fortress = fortressService.getFortress(company, args[0]);
     DocumentType docType = conceptService.findDocumentType(fortress, args[1]);
     try {
       return contentModelService.get(company, fortress, docType);
     } catch (FlockException e) {
       throw new IOException("Problem locating content model [" + modelKey + "]");
     }
   }
   return null;
 }