Package org.jboss.seam.wiki.core.exception

Examples of org.jboss.seam.wiki.core.exception.InvalidWikiConfigurationException


            bindSkins(descriptor, module);
            bindCacheRegions(descriptor, module);

            String macroName = descriptor.attributeValue("name");
            if (registry.getMacroPluginModulesByMacroName().containsKey(macroName)) {
                throw new InvalidWikiConfigurationException("Duplicate macro name, needs to be globally unique: " + macroName);
            }
            module.setName(macroName);

            // Finally, bind it
            plugin.getModules().add(module);
View Full Code Here


                MacroPluginModule macroPluginModule = registry.getMacroPluginModulesByKey().get(macroPluginKey);
                if (macroPluginModule != null) {
                    log.debug("binding all INSTANCE properties as parameters of macro '" + macroPluginModule.getName() +"': " + entity);
                    macroPluginModule.setPreferenceEntity(entity);
                } else {
                    throw new InvalidWikiConfigurationException(
                        "Configured mapping to macro module '"+macroPluginKey+"' not found for " + entity
                    );
                }
            } else {
                // Some INSTANCE properties are for one macro, others for other macros, so we need to mix and match
                for (PreferenceEntity.Property property : entity.getPropertiesInstanceVisible()) {
                    if (property.getMappedTo() == null || property.getMappedTo().length() == 0) continue;
                   
                    String macroPluginKey = property.getMappedTo();
                    MacroPluginModule macroPluginModule = registry.getMacroPluginModulesByKey().get(macroPluginKey);
                    if (macroPluginModule != null) {
                        log.debug("binding INSTANCE property as parameter of macro '" + macroPluginModule.getName() +"': " + property);
                        macroPluginModule.setPreferenceEntity(entity);
                        macroPluginModule.getParameters().add(property);
                    } else {
                        throw new InvalidWikiConfigurationException(
                            "Configured mapping to macro module  '"+macroPluginKey+"' not found for " + property + " in " + entity
                        );
                    }
                }
            }
View Full Code Here

    }

    private String getMessage(String key) {
        String message = messages.get(key);
        if (message.equals(key)) {
            throw new InvalidWikiConfigurationException("Could not find message key for label/description: " + key);
        }
        return message;
    }
View Full Code Here

    private String[] skins = {"d"};
    private SortedSet<String> fragmentCacheRegions = new TreeSet<String>();

    protected PluginModule(Plugin plugin, String key) {
        if (!key.matches(Plugin.KEY_PATTERN))
            throw new InvalidWikiConfigurationException("Key doesn't match pattern '"+Plugin.KEY_PATTERN+"': " + key);

        this.plugin = plugin;
        this.key = key;
    }
View Full Code Here

    private PluginInfo pluginInfo;
    private List<PluginModule> modules = new ArrayList<PluginModule>();

    public Plugin(String descriptorPath, String key) {
        if (!key.matches(KEY_PATTERN))
            throw new InvalidWikiConfigurationException("Key doesn't match pattern '"+KEY_PATTERN+"': " + key);

        this.descriptorPath = descriptorPath; // '/foo/bar/Baz.plugin.xhtml'
        this.descriptorPackagePath =
                descriptorPath.substring(0, descriptorPath.lastIndexOf("/")); // '/foo/bar'
        this.key = key;
View Full Code Here

                String[] groups = new String[matcher.groupCount()];
                for (int i = 0; i < groups.length; i++) {
                   groups[i] = matcher.group(i+1);
                }
                if (groups == null || groups.length != 3) {
                    throw new InvalidWikiConfigurationException("Deployment of i18n properties failed");
                }
                String packageName = groups[0];
                String pluginKey = groups[1];
                String locale = groups[2]; // Don't really need it here
View Full Code Here

    private SortedMap<String, MacroPluginModule> macroPluginModulesByMacroName = new TreeMap<String, MacroPluginModule>();
    private SortedSet<ProfilePluginModule> profilePluginModulesByPriority = new TreeSet<ProfilePluginModule>();

    public void addPlugin(String key, Plugin p) {
        if (plugins.containsKey(key)) {
            throw new InvalidWikiConfigurationException("Duplicate plugin key: " + key);
        }
        plugins.put(key, p);
    }
View Full Code Here

        for (Class<?> templateClass : templateClasses) {

            String templateName = interpolate(templateClass.getAnnotation(WikiDocumentTemplate.class).value());

            if (!WikiDocumentDefaults.class.isAssignableFrom(templateClass)) {
                throw new InvalidWikiConfigurationException("Annotated @WikiDocumentTemplate class '"
                                                            + templateClass
                                                            + "' does not implement WikiDocumentDefaults interface");
            }

            log.debug("adding template class " + templateClass.getName() + " as '" + templateName + "'");
View Full Code Here

TOP

Related Classes of org.jboss.seam.wiki.core.exception.InvalidWikiConfigurationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.