private static String createLifecycleExample() { LifecycleBean bean = LifecycleBean.newLifecycleBean() .withInstalled("/installed") .withUninstalled("/uninstalled") .withEnabled("/enabled") .withDisabled("/disabled") .build(); return gson.toJson(bean); }
private static String createLifecycleExample() { LifecycleBean bean = LifecycleBean.newLifecycleBean() .withInstalled("/installed") .withUninstalled("/uninstalled") .withEnabled("/enabled") .withDisabled("/disabled") .build(); return gson.toJson(bean); }
public ConnectRunner addUninstallLifecycle() { LifecycleBean lifecycle = getLifecycle(); addonBuilder.withLifecycle(newLifecycleBean(lifecycle).withUninstalled(UNINSTALLED_PATH).build()); return this; }
public ConnectRunner addUninstallLifecycle() { LifecycleBean lifecycle = getLifecycle(); addonBuilder.withLifecycle(newLifecycleBean(lifecycle).withUninstalled(UNINSTALLED_PATH).build()); return this; }
private static String createAddonExample() { Map<String, String> links = ImmutableMap.<String, String>builder().put("self", "http://www.example.com/connect/jira").build(); Set<ScopeName> scopes = Sets.newHashSet(ScopeName.READ, ScopeName.WRITE); ConnectAddonBean addonBean = newConnectAddonBean() .withKey("my-addon-key") .withName("My Connect Addon") .withDescription("A connect addon that does something") .withVendor(newVendorBean().withName("My Company").withUrl("http://www.example.com").build()) .withBaseurl("http://www.example.com/connect/jira") .withLinks(links) .withAuthentication(newAuthenticationBean().build()) .withLicensing(true) .withLifecycle(LifecycleBean.newLifecycleBean().withInstalled("/installed").withUninstalled("/uninstalled").build()) .withScopes(scopes) .build(); final JsonElement jsonRepresentation = gson.toJsonTree(addonBean); // Remove the version element from the example because our vendors should jsonRepresentation.getAsJsonObject().remove("version"); return gson.toJson(jsonRepresentation); }
private static String createAddonExample() { Map<String, String> links = ImmutableMap.<String, String>builder().put("self", "http://www.example.com/connect/jira").build(); Set<ScopeName> scopes = Sets.newHashSet(ScopeName.READ, ScopeName.WRITE); ConnectAddonBean addonBean = newConnectAddonBean() .withKey("my-addon-key") .withName("My Connect Addon") .withDescription("A connect addon that does something") .withVendor(newVendorBean().withName("My Company").withUrl("http://www.example.com").build()) .withBaseurl("http://www.example.com/connect/jira") .withLinks(links) .withAuthentication(newAuthenticationBean().build()) .withLicensing(true) .withLifecycle(LifecycleBean.newLifecycleBean().withInstalled("/installed").withUninstalled("/uninstalled").build()) .withScopes(scopes) .build(); final JsonElement jsonRepresentation = gson.toJsonTree(addonBean); // Remove the version element from the example because our vendors should jsonRepresentation.getAsJsonObject().remove("version"); return gson.toJson(jsonRepresentation); }