public static VendorBeanBuilder newVendorBean() { return new VendorBeanBuilder(); }
private static ConnectRunner newRemotePlugin(String product, String productBaseUrl) { final String addonKey = AddonTestUtils.randomAddonKey(); return new ConnectRunner(productBaseUrl, addonKey) .setAuthenticationToNone() .addScopes( ScopeName.READ, ScopeName.WRITE, ScopeName.DELETE, product.equals("jira") ? ScopeName.PROJECT_ADMIN : ScopeName.SPACE_ADMIN, ScopeName.ADMIN) .setVendor( new VendorBeanBuilder() .withName("Test Perf Vendor") .withUrl("www.example.com") .build()); } }
public ShallowConnectAddonBean() { this.key = ""; this.name = ""; this.version = "1.0"; this.description = ""; this.vendor = VendorBean.newVendorBean().build(); this.links = newHashMap(); this.lifecycle = LifecycleBean.newLifecycleBean().build(); this.scopes = new HashSet<>(); this.baseUrl = ""; this.authentication = newAuthenticationBean().build(); this.enableLicensing = null; }
builder.withName(rawConnectAddonListingData.getAddonName().orElse(null)) .withDescription(rawConnectAddonListingData.getDescription().orElse(null)) .withVendor(new VendorBeanBuilder() .withName(rawConnectAddonListingData.getVendorName().orElse(null)) .withUrl(rawConnectAddonListingData.getVendorUrl().orElse("")) .build()
public ShallowConnectAddonBean() { this.key = ""; this.name = ""; this.version = "1.0"; this.description = ""; this.vendor = VendorBean.newVendorBean().build(); this.links = newHashMap(); this.lifecycle = LifecycleBean.newLifecycleBean().build(); this.scopes = new HashSet<>(); this.baseUrl = ""; this.authentication = newAuthenticationBean().build(); this.enableLicensing = false; this.translations = TranslationsBean.empty(); this.dependencies = new DependenciesBean(); }
this.vendor = VendorBean.newVendorBean().build();
public static VendorBeanBuilder newVendorBean(VendorBean defaultBean) { return new VendorBeanBuilder(defaultBean); }
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); }
this.vendor = VendorBean.newVendorBean().build();
public static VendorBeanBuilder newVendorBean(VendorBean defaultBean) { return new VendorBeanBuilder(defaultBean); }
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); }
public static VendorBeanBuilder newVendorBean() { return new VendorBeanBuilder(); }