Package com.eviware.soapui.config

Examples of com.eviware.soapui.config.MaliciousAttachmentConfig


    public void setValueAt(Object aValue, int row, int column) {
        if (holder.getList().isEmpty()) {
            return;
        }

        MaliciousAttachmentConfig element = holder.getList().get(row);

        switch (column) {
            case 1:
                element.setContentType((String) aValue);
                break;
            case 2:
                element.setEnabled((Boolean) aValue);
                break;
        }
    }
View Full Code Here


                    ListModel listModel = holder.getFilesList().getList().getModel();
                    String key = ((AttachmentElement) listModel.getElementAt(idx)).getId();

                    for (MaliciousAttachmentElementConfig element : config.getElementList()) {
                        if (key.equals(element.getKey())) {
                            MaliciousAttachmentConfig att = element.addNewReplaceAttachment();
                            att.setFilename(filename);
                            att.setSize(size);
                            att.setContentType(contentType);
                            att.setEnabled(enabled);
                            att.setCached(cached);

                            holder.addResultToReplaceTable(att);
                            added = true;
                        }
                    }
View Full Code Here

                        ListModel listModel = holder.getFilesList().getList().getModel();
                        String key = ((AttachmentElement) listModel.getElementAt(idx)).getId();

                        for (MaliciousAttachmentElementConfig element : config.getElementList()) {
                            if (key.equals(element.getKey())) {
                                MaliciousAttachmentConfig att = element.addNewGenerateAttachment();
                                att.setFilename(filename);
                                att.setSize(newSize);
                                att.setContentType(contentType);
                                att.setEnabled(enabled);
                                att.setCached(cached);

                                holder.addResultToGenerateTable(att);

                                added = true;
                            }
View Full Code Here

                    if (attEl.getId().equals(element.getKey())) {
                        newElement.setRemove(element.getRemove());
                        holder.getTablesDialog().setBooleanValue(MutationTables.REMOVE_FILE, element.getRemove());

                        for (MaliciousAttachmentConfig el : element.getGenerateAttachmentList()) {
                            MaliciousAttachmentConfig newEl = newElement.addNewGenerateAttachment();
                            newEl.setFilename(el.getFilename());
                            newEl.setSize(el.getSize());
                            newEl.setContentType(el.getContentType());
                            newEl.setEnabled(el.getEnabled());
                            newEl.setCached(el.getCached());

                            holder.addResultToGenerateTable(newEl);
                        }

                        for (MaliciousAttachmentConfig el : element.getReplaceAttachmentList()) {
                            MaliciousAttachmentConfig newEl = newElement.addNewReplaceAttachment();
                            newEl.setFilename(el.getFilename());
                            newEl.setSize(el.getSize());
                            newEl.setContentType(el.getContentType());
                            newEl.setEnabled(el.getEnabled());
                            newEl.setCached(el.getCached());

                            holder.addResultToReplaceTable(newEl);
                        }

                        holder.refresh(attEl, null);
View Full Code Here

        return null;
    }

    public Object getValueAt(int rowIndex, int columnIndex) {
        MaliciousAttachmentConfig element = holder.getList().get(rowIndex);

        if (element != null) {
            switch (columnIndex) {
                case 0:
                    return (element.getCached()) ? new File(element.getFilename()).getName() : new File(
                            element.getFilename()).getAbsolutePath();
                case 1:
                    return element.getSize();
                case 2:
                    return element.getContentType();
                case 3:
                    return element.getEnabled();
            }
        }

        return null;
    }
View Full Code Here

    public void setValueAt(Object aValue, int row, int column) {
        if (holder.getList().isEmpty()) {
            return;
        }

        MaliciousAttachmentConfig element = holder.getList().get(row);

        switch (column) {
            case 2:
                element.setContentType((String) aValue);
                break;
            case 3:
                element.setEnabled((Boolean) aValue);
                break;
        }
    }
View Full Code Here

        } else {
            list = element.getReplaceAttachmentList();
            counter = counter - element.getGenerateAttachmentList().size();
        }

        MaliciousAttachmentConfig value = list.get(counter);
        File file = new File(value.getFilename());

        if (value.getEnabled()) {
            try {
                if (!file.exists()) {
                    UISupport.showErrorMessage("Missing file: " + file.getName());
                    return;
                }

                addAttachment(testStep, file, value.getContentType(), generated, value.getCached());
            } catch (IOException e) {
                SoapUI.logError(e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.config.MaliciousAttachmentConfig

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.