Package com.nineteendrops.tracdrops.client.api.wiki

Examples of com.nineteendrops.tracdrops.client.api.wiki.WikiPage


        if(parameter == null){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "wikiPage", this.getClass().getName()));
        }

        WikiPage wikiPage = (WikiPage)parameter;

        // check for mandatory fields
        String name = wikiPage.getName();
        if(name == null || name.trim().equals("")){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "wikiPage.name", this.getClass().getName()));
        }

        String content = wikiPage.getContent();
        if(content == null || content.trim().equals("")){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "wikiPage.content", this.getClass().getName()));
        }

        MultiParameter multiParameter = new MultiParameter();
        multiParameter.addParameter(name);
        multiParameter.addParameter(content);

        Hashtable attributes = new Hashtable();
        String comment = wikiPage.getComment();
        if(comment != null && !comment.trim().equals("")){
            attributes.put(WikiKeys.COMMENT, comment);
        }

        multiParameter.addParameter(attributes);
View Full Code Here


    // Prepare Wiki Pages
    @Test(dataProvider = "wikiPagesProvider", expectedExceptions = {TracMethodExecutionException.class})
    public void wikiPagesCreateOrUpdate(String name, String content, String comment){

        wikiManager.putPage(new WikiPage(name, content, comment));
    }
View Full Code Here

TOP

Related Classes of com.nineteendrops.tracdrops.client.api.wiki.WikiPage

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.