@Test public void testBrokenEncodingOptions() throws Exception { URI animation = getClass().getResource("/synfig-test-animation.sif").toURI(); Map<String, String> metadata = new HashMap<>(); List<String> options = new ArrayList<>(0); options.add("-t"); options.add("santa-claus"); Job job = null; try { job = animateService.animate(animation, metadata, options); logger.error("The test should have never reached this."); } catch (Exception e) { } Assert.assertNull(job); }
@Override public Job animate(URI animation, Map<String, String> metadata, List<String> arguments) throws AnimateServiceException { Gson gson = new Gson(); List<String> jobArguments = Arrays.asList(animation.toString(), gson.toJson(metadata), gson.toJson(arguments)); try { logger.debug("Create animate service job"); return serviceRegistry.createJob(JOB_TYPE, OPERATION, jobArguments, jobLoad); } catch (ServiceRegistryException e) { throw new AnimateServiceException(e); } }
AnimateServiceImpl extends AbstractJobProducer implements AnimateService, ManagedService { @Override public Job animate(URI animation, Map<String, String> metadata, List<String> arguments) throws AnimateServiceException { Gson gson = new Gson(); List<String> jobArguments = Arrays.asList(animation.toString(), gson.toJson(metadata), gson.toJson(arguments)); try { logger.debug("Create animate service job"); return serviceRegistry.createJob(JOB_TYPE, OPERATION, jobArguments, jobLoad); } catch (ServiceRegistryException e) { throw new AnimateServiceException(e); } } }
AnimateServiceImpl extends AbstractJobProducer implements AnimateService, ManagedService { @Override public Job animate(URI animation, Map<String, String> metadata, List<String> arguments) throws AnimateServiceException { Gson gson = new Gson(); List<String> jobArguments = Arrays.asList(animation.toString(), gson.toJson(metadata), gson.toJson(arguments)); try { logger.debug("Create animate service job"); return serviceRegistry.createJob(JOB_TYPE, OPERATION, jobArguments, jobLoad); } catch (ServiceRegistryException e) { throw new AnimateServiceException(e); } } AnimateServiceImpl(); }
AnimateServiceImpl extends AbstractJobProducer implements AnimateService, ManagedService { @Override public Job animate(URI animation, Map<String, String> metadata, List<String> arguments) throws AnimateServiceException { Gson gson = new Gson(); List<String> jobArguments = Arrays.asList(animation.toString(), gson.toJson(metadata), gson.toJson(arguments)); try { logger.debug("Create animate service job"); return serviceRegistry.createJob(JOB_TYPE, OPERATION, jobArguments, jobLoad); } catch (ServiceRegistryException e) { throw new AnimateServiceException(e); } } AnimateServiceImpl(); @Override @Activate void activate(ComponentContext cc); @Override void updated(Dictionary properties); @Override Job animate(URI animation, Map<String, String> metadata, List<String> arguments); @Reference void setWorkspace(Workspace workspace); @Reference void setServiceRegistry(ServiceRegistry jobManager); @Reference void setSecurityService(SecurityService securityService); @Reference void setUserDirectoryService(UserDirectoryService userDirectoryService); @Reference void setOrganizationDirectoryService(OrganizationDirectoryService organizationDirectoryService); }
AnimateServiceImpl extends AbstractJobProducer implements AnimateService, ManagedService { @Override public Job animate(URI animation, Map<String, String> metadata, List<String> arguments) throws AnimateServiceException { Gson gson = new Gson(); List<String> jobArguments = Arrays.asList(animation.toString(), gson.toJson(metadata), gson.toJson(arguments)); try { logger.debug("Create animate service job"); return serviceRegistry.createJob(JOB_TYPE, OPERATION, jobArguments, jobLoad); } catch (ServiceRegistryException e) { throw new AnimateServiceException(e); } } AnimateServiceImpl(); @Override @Activate void activate(ComponentContext cc); @Override void updated(Dictionary properties); @Override Job animate(URI animation, Map<String, String> metadata, List<String> arguments); @Reference void setWorkspace(Workspace workspace); @Reference void setServiceRegistry(ServiceRegistry jobManager); @Reference void setSecurityService(SecurityService securityService); @Reference void setUserDirectoryService(UserDirectoryService userDirectoryService); @Reference void setOrganizationDirectoryService(OrganizationDirectoryService organizationDirectoryService); static final String SYNFIG_BINARY_DEFAULT; }