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

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


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

        WikiAttachment wikiAttachment = (WikiAttachment)parameter;

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

        String fileName = wikiAttachment.getFileName();
        if(fileName == null || fileName.trim().equals("")){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "TicketAttachment.fileName", this.getClass().getName()));
        }

        String pathToAttachment = pageName + "/" + fileName;
View Full Code Here


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

        WikiAttachment wikiAttachment = (WikiAttachment)parameter;

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

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

        String description = wikiAttachment.getDescription();
        if(description == null) description = "";

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

        byte[] binaryData = Utils.getBinaryData(fullFileName, tracProperties);

        MultiParameter multiParameter = new MultiParameter();
        multiParameter.addParameter(pageName);
        multiParameter.addParameter(fileName);
        multiParameter.addParameter(description);
        multiParameter.addParameter(binaryData);
        multiParameter.addParameter(wikiAttachment.isReplaceAttachment());

        return multiParameter;
    }
View Full Code Here

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

        WikiAttachment wikiAttachment = (WikiAttachment)parameter;

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

        String fileName = wikiAttachment.getFileName();
        if(fileName == null || fileName.trim().equals("")){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "TicketAttachment.fileName", this.getClass().getName()));
        }

        String description = wikiAttachment.getDescription();
        if(description == null) description = "";

        String fullFileName = wikiAttachment.getFullFileName();
        if(fullFileName == null || fullFileName.trim().equals("")){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "TicketAttachment.fullFileName", this.getClass().getName()));        }

        byte[] binaryData = Utils.getBinaryData(fullFileName, tracProperties);
View Full Code Here

TOP

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

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.