output.addOutputMessage("Number of added Entries: "+entries.length); output.setTemplateName("searchform.html");
    public void execute(Map arguments, Registry registry, Output output)                 throws Exception    {        validateArguments(arguments, new String[] {ARG_URL});        UrlFetcher fetcher = (UrlFetcher) registry.getPlugin("fetcher");        Entry[] entries = fetcher.fetch(new URL[] {new URL( (String) arguments.get(ARG_URL) )});                if ( entries.length > 0 ) {            // read in and set optional fields            String title = (String) arguments.get(ARG_TITLE);            if ( title != null && !"".equals(title) )                 for(int i = 0; i < entries.length; i++) { entries[i].setTitle(title); }                        String note  = (String) arguments.get(ARG_NOTE);            String tags  = (String) arguments.get(ARG_TAGS);            if ( note != null || tags != null ) {                for(int i = 0; i < entries.length; i++) {                    if ( note != null )                        entries[i].setNote(note);                    if ( tags != null )                         entries[i].setTags( StringUtil.splitString(tags, Entry.TAG_SEPARATOR) );                }            }            // shall existing entries get overwritten, or an exception thrown?            String forceStr = (String) arguments.get(ARG_FORCE);            boolean force = false;            if ( "1".equals(forceStr) || "true".equalsIgnoreCase(forceStr) )                force = true;            // now finally store entries in index            EntryStore store = (EntryStore) registry.getPlugin("store");            store.addEntries(entries, force);        }    }