Package com.nineteendrops.tracdrops.client.core.multicall

Examples of com.nineteendrops.tracdrops.client.core.multicall.MultiParameter


        String query = searchQuery.getQuery();
        if(query == null){
            query = "";
        }

        MultiParameter multiParameter = new MultiParameter();
        multiParameter.addParameter(query);

        ArrayList<String> listOfFilters = new ArrayList<String>();
        if(!searchQuery.isOnAll()){
            if(searchQuery.isOnTickets()) listOfFilters.add(SearchKeys.ON_TICKETS);
            if(searchQuery.isOnChangesets()) listOfFilters.add(SearchKeys.ON_CHANGESETS);
            if(searchQuery.isOnMilestones()) listOfFilters.add(SearchKeys.ON_MILESTONES);
            if(searchQuery.isOnWiki()) listOfFilters.add(SearchKeys.ON_WIKI);

            multiParameter.addParameter(Utils.fillVectorFromArrayList(listOfFilters));
        }

        return multiParameter;
    }
View Full Code Here


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


        MultiParameter multiParameter = new MultiParameter();
        multiParameter.addParameter(summary);
        multiParameter.addParameter(description);

        Hashtable attributes = new Hashtable();
        for(String key: TicketKeys.FIELDS_ARRAY){
            if(!key.equals(TicketKeys.FIELD_SUMMARY) && !key.equals(TicketKeys.FIELD_DESCRIPTION)){
                String attribute = ticket.getOtherAttribute(key);
                if(attribute != null && !attribute.trim().equals("")){
                    attributes.put(key, attribute);
                }
            }
        }

        multiParameter.addParameter(attributes);

        return multiParameter;
    }
View Full Code Here

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

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

        MultiParameter multiParameter = new MultiParameter();
        multiParameter.addParameter(idTicket);
        multiParameter.addParameter(fileName);
        multiParameter.addParameter(description);
        multiParameter.addParameter(binaryData);

        return multiParameter;
    }
View Full Code Here

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


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

        return multiParameter;
    }
View Full Code Here

        if(description == null){
            description = "";
        }


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

        Hashtable attributes = new Hashtable();
        attributes.put(MilestoneKeys.DUE, due);
        attributes.put(MilestoneKeys.DESCRIPTION, description);

        // TODO: review codification <i4> is not good for TRAC it has to be <int>
        //attributes.put(MilestoneKeys.COMPLETED, (milestone.getCompleted() ? 1 : 0));

        multiParameter.addParameter(attributes);

        return multiParameter;
    }
View Full Code Here

        if(description == null){
            description = "";
        }


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

        Hashtable attributes = new Hashtable();
        attributes.put(ComponentKeys.OWNER, owner);
        attributes.put(ComponentKeys.DESCRIPTION, description);

        multiParameter.addParameter(attributes);

        return multiParameter;
    }
View Full Code Here

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

        String pathToAttachment = pageName + "/" + fileName;

        MultiParameter multiParameter = new MultiParameter();
        multiParameter.addParameter(pathToAttachment);

        return multiParameter;
    }
View Full Code Here

            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

        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);

        return multiParameter;
    }
View Full Code Here

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

        String pathToAttachment = pageName + "/" + fileName;

        MultiParameter multiParameter = new MultiParameter();
        multiParameter.addParameter(pathToAttachment);
        multiParameter.addParameter(binaryData);

        return multiParameter;
    }
View Full Code Here

TOP

Related Classes of com.nineteendrops.tracdrops.client.core.multicall.MultiParameter

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.