protected void appendToStringFields(Objects.ToStringHelper toStringHelper) { toStringHelper .add("name", getName()) .add("key", getRawKey()) .add("url", getUrl()) .add("weight", getWeight()) .add("icon", getIcon()) .add("location", getLocation()); }
protected void appendToStringFields(Objects.ToStringHelper toStringHelper) { toStringHelper .add("name", getName()) .add("key", getRawKey()) .add("url", getUrl()) .add("weight", getWeight()) .add("icon", getIcon()) .add("location", getLocation()); }
public ConnectPageModuleBeanBuilder(ConnectPageModuleBean defaultBean) { super(defaultBean); this.weight = defaultBean.getWeight(); this.url = defaultBean.getUrl(); this.location = defaultBean.getLocation(); this.icon = defaultBean.getIcon(); }
public ConnectPageModuleBeanBuilder(ConnectPageModuleBean defaultBean) { super(defaultBean); this.weight = defaultBean.getWeight(); this.url = defaultBean.getUrl(); this.location = defaultBean.getLocation(); this.icon = defaultBean.getIcon(); }
private void addPluginInfoParameterForPageIfDeclared(PluginInformation pluginInfo, String parameterKey, ConnectAddonBean addon, String moduleType) { Optional<List<ModuleBean>> optionalPages = addon.getModules().getValidModuleListOfType( moduleType, moduleValidationExceptionHandler); optionalPages.ifPresent(moduleBeans -> { ConnectPageModuleBean page = (ConnectPageModuleBean) moduleBeans.get(0); if (null != page && !Strings.isNullOrEmpty(page.getUrl())) { pluginInfo.addParameter(parameterKey, ConnectIFrameServletPath.forModule(addon.getKey(), page.getRawKey())); } }); } }
private ModuleDescriptor<ConnectIFrame> createRawIFrame(ConnectPageModuleBean page, ConnectAddonBean connectAddonBean) { ConnectIFrameBuilder.ModuleUriBuilder moduleUriBuilder = connectIFrameBuilderFactory.builder() .addon(connectAddonBean.getKey()) .module(page.getKey(connectAddonBean)); ConnectIFrameBuilder.InitializedBuilder builder = setRawIFrameTemplate(moduleUriBuilder) .urlTemplate(page.getUrl()) .conditions(page.getConditions()) .conditionClasses(getConditionClasses()) .dimensions("100%", "100%"); // the client (js) will size the parent of the iframe // allow subclasses to customize the IFrame builder = customizeIFrameBuilder(builder, page, connectAddonBean); return iFrameModuleDescriptorGenerator.createModuleDescriptor( new ConnectIFrameBean(builder.build(), page.getRawKey(), Optional.of(RAW_CLASSIFIER)), connectAddonBean); }
private ConnectIFrame createRawIFrame(ConnectPageModuleBean page, ConnectAddonBean connectAddonBean) { return connectIFrameBuilderFactory.builder() .addon(connectAddonBean.getKey()) .module(page.getRawKey()) .genericBodyTemplate() .urlTemplate(page.getUrl()) .title(page.getDisplayName()) .conditions(getPageAndAdditionalConditions(page)) .dimensions("100%", "100%") // the client (js) will size the parent of the iframe .build(); }
private ConnectIFrame createPageIFrame(ConnectPageModuleBean page, ConnectAddonBean connectAddonBean) { return connectIFrameBuilderFactory.builder() .addon(connectAddonBean.getKey()) .module(page.getRawKey()) .pageTemplate() .urlTemplate(page.getUrl()) .decorator(getDecorator()) .conditions(getPageAndAdditionalConditions(page)) .title(page.getDisplayName()) .resizeToParent(true) .build(); }
private ModuleDescriptor<ConnectIFrame> createPageIFrame(ConnectPageModuleBean page, ConnectAddonBean connectAddonBean) { ConnectIFrameBuilder.ModuleUriBuilder moduleUriBuilder = connectIFrameBuilderFactory.builder() .addon(connectAddonBean.getKey()) .module(page.getKey(connectAddonBean)); ConnectIFrameBuilder.InitializedBuilder builder = setIFrameTemplate(moduleUriBuilder) .urlTemplate(page.getUrl()) .decorator(getDecorator()) .conditions(page.getConditions()) .conditionClasses(getConditionClasses()) .title(page.getDisplayName()) .resizeToParent(true); // allow subclasses to customize the IFrame builder = customizeIFrameBuilder(builder, page, connectAddonBean); return iFrameModuleDescriptorGenerator.createModuleDescriptor( new ConnectIFrameBean(builder.build(), page.getRawKey(), Optional.empty()), connectAddonBean); }
protected void registerIframeRenderStrategy(ConnectPageModuleBean page, ConnectAddonBean connectAddonBean) { // register a render strategy for our iframe page IFrameRenderStrategy pageRenderStrategy = iFrameRenderStrategyBuilderFactory.builder() .addOn(connectAddonBean.getKey()) .module(page.getKey(connectAddonBean)) .pageTemplate() .urlTemplate(page.getUrl()) .decorator(getDecorator()) .conditions(page.getConditions()) .conditionClasses(getConditionClasses()) .title(page.getDisplayName()) .resizeToParent(true) .build(); iFrameRenderStrategyRegistry.register(connectAddonBean.getKey(), page.getRawKey(), pageRenderStrategy); // and an additional strategy for raw content, in case the user wants to use it as a dialog target IFrameRenderStrategy rawRenderStrategy = iFrameRenderStrategyBuilderFactory.builder() .addOn(connectAddonBean.getKey()) .module(page.getKey(connectAddonBean)) .genericBodyTemplate() .urlTemplate(page.getUrl()) .conditions(page.getConditions()) .conditionClasses(getConditionClasses()) .dimensions("100%", "100%") // the client (js) will size the parent of the iframe .build(); iFrameRenderStrategyRegistry.register(connectAddonBean.getKey(), page.getRawKey(), RAW_CLASSIFIER, rawRenderStrategy); }