public ConnectAddonModuleValidationFailedAfterInstallEvent(ConnectModuleValidationException e) { addonKey = e.getAddon().getKey(); moduleType = e.getModuleMeta().getDescriptorKey(); message = e.getMessage(); }
protected void throwUnknownModuleType(String moduleTypeKey) throws ConnectModuleValidationException { throw new ConnectModuleValidationException( addon, new ConnectModuleMeta<ModuleBean>(moduleTypeKey, ModuleBean.class) { }, "No provider found for module type " + moduleTypeKey + " referenced in the descriptor", "connect.install.error.unknown.module", moduleTypeKey, addon.getKey()); }
/** * Asserts that the module type accepts multiple modules. * * @param moduleMeta the metadata for the module being deserialized * @param descriptor the add-on descriptor (without the module list) * @throws ConnectModuleValidationException if the assertion fails */ private void assertMultipleModulesAllowed(ConnectModuleMeta<?> moduleMeta, ShallowConnectAddonBean descriptor) throws ConnectModuleValidationException { if (!moduleMeta.multipleModulesAllowed()) { throw new ConnectModuleValidationException(descriptor, moduleMeta, "Modules should be provided as a JSON array of objects.", null, null); } }
public WebPanelModuleBeanBuilder(WebPanelModuleBean webPanelBean) { super(webPanelBean); this.location = webPanelBean.getLocation(); this.layout = webPanelBean.getLayout(); this.url = webPanelBean.getUrl(); this.weight = webPanelBean.getWeight(); this.tooltip = webPanelBean.getTooltip(); this.locationValidationEnabled = webPanelBean.isLocationValidationEnabled(); }
private static boolean addonUsesJwtAuthentication(ShallowConnectAddonBean addon) { return null != addon.getAuthentication() && AuthenticationType.JWT.equals(addon.getAuthentication().getType()); }
private static boolean addonRequiresAuth(ConnectAddonBean addon) { return addon.getAuthentication() != null && !AuthenticationType.NONE.equals(addon.getAuthentication().getType()); }
public WebSectionModuleBeanBuilder(WebSectionModuleBean defaultBean) { super(defaultBean); this.location = defaultBean.getLocation(); this.weight = defaultBean.getWeight(); this.tooltip = defaultBean.getTooltip(); }
public static TranslationsBean empty() { return new TranslationsBean(new TranslationPathsBean()); }
@Override public B build() { return (B) new NamedBean(this); } }
@Override public B build() { return (B) new BeanWithKeyAndParams(this); } }
@Override public String apply(final ReportCategory input) { return input.getKey(); } });
@Override public ModuleMultimap get() { return new ModuleMultimap(modules); } });
public KeyboardShortcutModuleBean() { this.weight = 0; this.shortcut = ""; this.target = new KeyboardShortcutTargetBean(); this.context = KeyboardShortcutContext.global; }
public ConnectAddonModuleValidationFailedAfterInstallEvent(ConnectModuleValidationException e) { addonKey = e.getAddon().getKey(); moduleType = e.getModuleMeta().getDescriptorKey(); message = e.getMessage(); }
/** * Asserts that the module type accepts multiple modules. * * @param moduleMeta the metadata for the module being deserialized * @param descriptor the add-on descriptor (without the module list) * @throws ConnectModuleValidationException if the assertion fails */ private void assertMultipleModulesAllowed(ConnectModuleMeta<?> moduleMeta, ShallowConnectAddonBean descriptor) throws ConnectModuleValidationException { if (!moduleMeta.multipleModulesAllowed()) { throw new ConnectModuleValidationException(descriptor, moduleMeta, "Modules should be provided as a JSON array of objects.", null, null); } }
private static boolean addonUsesJwtAuthentication(ConnectAddonBean addon) { return null != addon.getAuthentication() && AuthenticationType.JWT.equals(addon.getAuthentication().getType()); }
/** * Asserts that the module type only accepts a single module. * * @param moduleMeta the metadata for the module being deserialized * @param descriptor the add-on descriptor (without the module list) * @throws ConnectModuleValidationException if the assertion fails */ private void assertMultipleModulesNotAllowed(ConnectModuleMeta<?> moduleMeta, ShallowConnectAddonBean descriptor) throws ConnectModuleValidationException { if (moduleMeta.multipleModulesAllowed()) { throw new ConnectModuleValidationException(descriptor, moduleMeta, "A single module should be provided as a JSON object.", null, null); } } }
/** * Asserts that the module type only accepts a single module. * * @param moduleMeta the metadata for the module being deserialized * @param descriptor the add-on descriptor (without the module list) * @throws ConnectModuleValidationException if the assertion fails */ private void assertMultipleModulesNotAllowed(ConnectModuleMeta<?> moduleMeta, ShallowConnectAddonBean descriptor) throws ConnectModuleValidationException { if (moduleMeta.multipleModulesAllowed()) { throw new ConnectModuleValidationException(descriptor, moduleMeta, "A single module should be provided as a JSON object.", null, null); } } }