Package net.sourceforge.marathon.checklist

Examples of net.sourceforge.marathon.checklist.CheckList$Header


    public void addScreenCapture(File newFile) {
        screenCaptures.add(newFile);
    }

    public CheckList showAndEnterChecklist(File file, final IMarathonRuntime runtime, final JFrame instance) {
        final CheckList checklist;
        try {
            checklist = CheckList.read(new FileInputStream(file));
            CheckListForm checklistForm = new CheckListForm(checklist, Mode.ENTER);
            final CheckListDialog dialog = new CheckListDialog((JFrame) null, checklistForm);

            JButton screenCapture = UIUtils.createScreenCaptureButton();
            screenCapture.addActionListener(new ActionListener() {
                File captureFile = null;

                public void actionPerformed(ActionEvent e) {
                    boolean iconify = false;
                    int state = -1;
                    try {
                        if (instance != null && instance.getState() != JFrame.ICONIFIED) {
                            iconify = true;
                            state = instance.getState();
                        }
                        if (iconify)
                            instance.setState(JFrame.ICONIFIED);
                        dialog.setVisible(false);
                        if (captureFile == null)
                            captureFile = runtime.getScreenCapture();
                        if (captureFile == null) {
                            JOptionPane.showMessageDialog(null, "Could not create a screen capture");
                            return;
                        }
                        try {
                            AnnotateScreenCapture annotate = new AnnotateScreenCapture(captureFile, true);
                            if (annotate.showDialog() == AnnotateScreenCapture.APPROVE_OPTION) {
                                annotate.saveToFile(captureFile);
                                checklist.setCaptureFile(captureFile.getName());
                            }
                        } catch (IOException e1) {
                            e1.printStackTrace();
                        }
                    } finally {
View Full Code Here


        });
    }

    public void insertChecklist(String name) {
        if (exploratoryTest) {
            CheckList checklist = fillUpChecklist(name);
            if (checklist == null)
                return;
            try {
                File file = File.createTempFile(name, ".data", runReportDir);
                checklist.xsetDataFile(file);
                display.recordShowChecklist(runReportDir.getName() + "/" + file.getName());
            } catch (IOException e) {
                JOptionPane.showMessageDialog(null, "Unable to create a checklist data file");
                e.printStackTrace();
                return;
View Full Code Here

        public int showChecklist(final String fileName) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    final File file = new File(reportDir, fileName);
                    final CheckList checklist;
                    try {
                        checklist = CheckList.read(new FileInputStream(file));
                        CheckListForm checklistForm = new CheckListForm(checklist, Mode.DISPLAY);
                        final CheckListDialog dialog = new CheckListDialog((JFrame) null, checklistForm);

                        JButton screenCapture = null;
                        if (checklist.getCaptureFile() != null) {
                            screenCapture = UIUtils.createScreenCaptureButton();

                            screenCapture.addActionListener(new ActionListener() {
                                File captureFile = new File(file.getParent(), checklist.getCaptureFile());

                                public void actionPerformed(ActionEvent e) {
                                    try {
                                        AnnotateScreenCapture annotate = new AnnotateScreenCapture(captureFile, false);
                                        annotate.showDialog();
View Full Code Here

        log.debug("Unmarshalling SOAP message");
        Envelope soapMessage = (Envelope) unmarshallMessage(inTransport.getIncomingStream());
        samlMsgCtx.setInboundMessage(soapMessage);

        Header messageHeader = soapMessage.getHeader();
        if (messageHeader != null) {
            checkUnderstoodSOAPHeaders(soapMessage.getHeader().getUnknownXMLObjects());
        }

        List<XMLObject> soapBodyChildren = soapMessage.getBody().getUnknownXMLObjects();
View Full Code Here

     * @param messageContext the current message context being processed
     * @return a SOAPAction HTTP header URI value
     */
    protected String getSOAPAction(MessageContext messageContext) {
        Envelope env = (Envelope) messageContext.getOutboundMessage();
        Header header = env.getHeader();
        if (header == null) {
            return null;
        }
        List<XMLObject> objList = header.getUnknownXMLObjects(Action.ELEMENT_NAME);
        if (objList == null || objList.isEmpty()) {
            return null;
        } else {
            return ((Action)objList.get(0)).getValue();
        }
View Full Code Here

     */
    private void checkUnderstoodSOAPHeaders(MessageContext messageContext)
            throws MessageDecodingException {
       
        Envelope envelope = (Envelope) messageContext.getInboundMessage();
        Header soapHeader = envelope.getHeader();
        if (soapHeader == null) {
            log.debug("SOAP Envelope contained no Header");
            return;
        }
        List<XMLObject> headers = soapHeader.getUnknownXMLObjects();
        if (headers == null || headers.isEmpty()) {
            log.debug("SOAP Envelope header list was either null or empty");
            return;
        }

View Full Code Here

public class HeaderUnmarshaller extends AbstractXMLObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        Header header = (Header) parentXMLObject;
        header.getUnknownXMLObjects().add(childXMLObject);
    }
View Full Code Here

        header.getUnknownXMLObjects().add(childXMLObject);
    }

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        Header header = (Header) xmlObject;
        QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute
                .getPrefix());
        if (attribute.isId()) {
            header.getUnknownAttributes().registerID(attribQName);
        }
        header.getUnknownAttributes().put(attribQName, attribute.getValue());
    }
View Full Code Here

     *
     * @param envelope the SOAP 1.1 envelope to process
     * @param headerBlock the header to add
     */
    public static void addSOAP11HeaderBlock(Envelope envelope, XMLObject headerBlock) {
        Header envelopeHeader = envelope.getHeader();
        if (envelopeHeader == null) {
            envelopeHeader = (Header) Configuration.getBuilderFactory().getBuilder(Header.DEFAULT_ELEMENT_NAME)
                .buildObject(Header.DEFAULT_ELEMENT_NAME);
            envelope.setHeader(envelopeHeader);
        }
       
        envelopeHeader.getUnknownXMLObjects().add(headerBlock);
    }
View Full Code Here

     *          false specifies they should not be returned
     * @return the list of matching header blocks
     */
    public static List<XMLObject> getSOAP11HeaderBlock(Envelope envelope, QName headerName, Set<String> targetNodes,
            boolean isFinalDestination) {
        Header envelopeHeader = envelope.getHeader();
        if (envelopeHeader == null) {
            return Collections.emptyList();
        }
        ArrayList<XMLObject> headers = new ArrayList<XMLObject>();
        for (XMLObject header : envelopeHeader.getUnknownXMLObjects(headerName)) {
            if (isSOAP11HeaderTargetedToNode(header, targetNodes, isFinalDestination)) {
                headers.add(header);
            }
        }
       
View Full Code Here

TOP

Related Classes of net.sourceforge.marathon.checklist.CheckList$Header

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.