@Test public void testCreateInstallable() { final PackageId expectParentId = PackageId.fromString("test"); final String expectJcrPath = "/some/package/path.zip"; final PackageId expectEmbeddedId = PackageId.fromString("testtest"); EmbeddedPackageInstallableParams params = new EmbeddedPackageInstallableParams(expectEmbeddedId); EmbeddedPackageInstallable installable = params.createInstallable(expectParentId, expectJcrPath); assertSame("expect same parentId", expectParentId, installable.getParentId()); assertSame("expect same jcrPath", expectJcrPath, installable.getJcrPath()); assertSame("expect same embeddedId", expectEmbeddedId, installable.getEmbeddedId()); }
@NotNull @Override public EmbeddedPackageInstallable createInstallable(final PackageId parentPackageId, final String jcrPath) { return new EmbeddedPackageInstallable(parentPackageId, jcrPath, embeddedId); }
EmbeddedPackageInstallableParams implements SlingInstallableParams<EmbeddedPackageInstallable> { @NotNull @Override public EmbeddedPackageInstallable createInstallable(final PackageId parentPackageId, final String jcrPath) { return new EmbeddedPackageInstallable(parentPackageId, jcrPath, embeddedId); } }
EmbeddedPackageInstallableParams implements SlingInstallableParams<EmbeddedPackageInstallable> { @NotNull @Override public EmbeddedPackageInstallable createInstallable(final PackageId parentPackageId, final String jcrPath) { return new EmbeddedPackageInstallable(parentPackageId, jcrPath, embeddedId); } EmbeddedPackageInstallableParams(@NotNull final PackageId embeddedId); }
EmbeddedPackageInstallableParams implements SlingInstallableParams<EmbeddedPackageInstallable> { @NotNull @Override public EmbeddedPackageInstallable createInstallable(final PackageId parentPackageId, final String jcrPath) { return new EmbeddedPackageInstallable(parentPackageId, jcrPath, embeddedId); } EmbeddedPackageInstallableParams(@NotNull final PackageId embeddedId); PackageId getEmbeddedId(); @NotNull @Override EmbeddedPackageInstallable createInstallable(final PackageId parentPackageId, final String jcrPath); @Override @NotNull Class<EmbeddedPackageInstallable> getInstallableType(); }
EmbeddedPackageInstallableParams implements SlingInstallableParams<EmbeddedPackageInstallable> { @NotNull @Override public EmbeddedPackageInstallable createInstallable(final PackageId parentPackageId, final String jcrPath) { return new EmbeddedPackageInstallable(parentPackageId, jcrPath, embeddedId); } EmbeddedPackageInstallableParams(@NotNull final PackageId embeddedId); PackageId getEmbeddedId(); @NotNull @Override EmbeddedPackageInstallable createInstallable(final PackageId parentPackageId, final String jcrPath); @Override @NotNull Class<EmbeddedPackageInstallable> getInstallableType();  }