@Override public boolean multipleModulesAllowed(String moduleType) { ConnectModuleMeta meta = getModuleMeta(moduleType); return meta == null || meta.multipleModulesAllowed(); } }
/** * 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); } } }
@Override public boolean multipleModulesAllowed(String moduleType) { ConnectModuleMeta meta = getModuleMeta(moduleType); return meta == null || meta.multipleModulesAllowed(); } }
/** * 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); } }
/** * 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); } }
@Override public boolean multipleModulesAllowed(String moduleType) { return getModuleProviders().get(moduleType).getMeta().multipleModulesAllowed(); }
@Override public boolean multipleModulesAllowed(String moduleType) { return getModuleProviders().get(moduleType).getMeta().multipleModulesAllowed(); }
/** * Asserts that the module type accepts multiple modules. * * @param descriptor the add-on descriptor (without the module list) * @throws ConnectModuleValidationException if the assertion fails */ private void assertMultipleModulesAllowed(ShallowConnectAddonBean descriptor) throws ConnectModuleValidationException { if (!getMeta().multipleModulesAllowed()) { throw new ConnectModuleValidationException(descriptor, getMeta(), "Modules should be provided as a JSON array of objects.", null, null); } }
/** * Asserts that the module type only accepts a single module. * * @param descriptor the add-on descriptor (without the module list) * @throws ConnectModuleValidationException if the assertion fails */ private void assertMultipleModulesNotAllowed(ShallowConnectAddonBean descriptor) throws ConnectModuleValidationException { if (getMeta().multipleModulesAllowed()) { throw new ConnectModuleValidationException(descriptor, getMeta(), "A single module should be provided as a JSON object.", null, null); } } }