@Test public void testByIdAndVersion() throws ServiceRegistryException { String[] mp = createAndAddMediaPackagesSimple(1, 2, 2, Opt.<String>none()); createIdAndVersionExpectation(mp[0], 1, 2); EasyMock.replay(sr); tsamjp.moveByIdAndVersion(VersionImpl.mk(1L), mp[0], REMOTE_STORE_1_ID); EasyMock.verify(sr); }
public Job moveByIdAndVersion(final Version version, final String mpId, final String targetStorage) { RequireUtil.notNull(version, "version"); RequireUtil.notEmpty(mpId, "mpId"); RequireUtil.notEmpty(targetStorage, "targetStorage"); List<String> args = new LinkedList<String>(); args.add(targetStorage); args.add(mpId); args.add(version.toString()); try { return serviceRegistry.createJob(JOB_TYPE, Operation.MoveByIdAndVersion.toString(), args, null, true, JOB_LOAD); } catch (ServiceRegistryException e) { throw new AssetManagerException("Unable to create a job", e); } }
TieredStorageAssetManagerJobProducer extends AbstractJobProducer { public Job moveByIdAndVersion(final Version version, final String mpId, final String targetStorage) { RequireUtil.notNull(version, "version"); RequireUtil.notEmpty(mpId, "mpId"); RequireUtil.notEmpty(targetStorage, "targetStorage"); List<String> args = new LinkedList<String>(); args.add(targetStorage); args.add(mpId); args.add(version.toString()); try { return serviceRegistry.createJob(JOB_TYPE, Operation.MoveByIdAndVersion.toString(), args, null, true, JOB_LOAD); } catch (ServiceRegistryException e) { throw new AssetManagerException("Unable to create a job", e); } } }
TieredStorageAssetManagerJobProducer extends AbstractJobProducer { public Job moveByIdAndVersion(final Version version, final String mpId, final String targetStorage) { RequireUtil.notNull(version, "version"); RequireUtil.notEmpty(mpId, "mpId"); RequireUtil.notEmpty(targetStorage, "targetStorage"); List<String> args = new LinkedList<String>(); args.add(targetStorage); args.add(mpId); args.add(version.toString()); try { return serviceRegistry.createJob(JOB_TYPE, Operation.MoveByIdAndVersion.toString(), args, null, true, JOB_LOAD); } catch (ServiceRegistryException e) { throw new AssetManagerException("Unable to create a job", e); } } TieredStorageAssetManagerJobProducer(); }
TieredStorageAssetManagerJobProducer extends AbstractJobProducer { public Job moveByIdAndVersion(final Version version, final String mpId, final String targetStorage) { RequireUtil.notNull(version, "version"); RequireUtil.notEmpty(mpId, "mpId"); RequireUtil.notEmpty(targetStorage, "targetStorage"); List<String> args = new LinkedList<String>(); args.add(targetStorage); args.add(mpId); args.add(version.toString()); try { return serviceRegistry.createJob(JOB_TYPE, Operation.MoveByIdAndVersion.toString(), args, null, true, JOB_LOAD); } catch (ServiceRegistryException e) { throw new AssetManagerException("Unable to create a job", e); } } TieredStorageAssetManagerJobProducer(); @Override void activate(ComponentContext cc); boolean datastoreExists(String storeId); Job moveByIdAndVersion(final Version version, final String mpId, final String targetStorage); Job moveById(final String mpId, final String targetStorage); Job moveByDate(final Date start, final Date end, final String targetStorage); Job moveByIdAndDate(final String mpId, final Date start, final Date end, final String targetStorage); }
TieredStorageAssetManagerJobProducer extends AbstractJobProducer { public Job moveByIdAndVersion(final Version version, final String mpId, final String targetStorage) { RequireUtil.notNull(version, "version"); RequireUtil.notEmpty(mpId, "mpId"); RequireUtil.notEmpty(targetStorage, "targetStorage"); List<String> args = new LinkedList<String>(); args.add(targetStorage); args.add(mpId); args.add(version.toString()); try { return serviceRegistry.createJob(JOB_TYPE, Operation.MoveByIdAndVersion.toString(), args, null, true, JOB_LOAD); } catch (ServiceRegistryException e) { throw new AssetManagerException("Unable to create a job", e); } } TieredStorageAssetManagerJobProducer(); @Override void activate(ComponentContext cc); boolean datastoreExists(String storeId); Job moveByIdAndVersion(final Version version, final String mpId, final String targetStorage); Job moveById(final String mpId, final String targetStorage); Job moveByDate(final Date start, final Date end, final String targetStorage); Job moveByIdAndDate(final String mpId, final Date start, final Date end, final String targetStorage); static final String JOB_TYPE; static final Float JOB_LOAD; static final Float NONTERMINAL_JOB_LOAD; }