Package org.jitterbit.integration.jms

Examples of org.jitterbit.integration.jms.MessagePropertiesDescriptor


            setAllowsChildren(true);
            addPropertyNodes(message);
        }

        private void addPropertyNodes(JmsMessage message) {
            MessagePropertiesDescriptor userProps = message.getUserDefinedProperties();
            if (userProps.isEmpty()) {
                new DefaultKongaTreeNode(this, PackageResources.TreeSelector.NO_PROPERTIES, false);
            } else {
                insertPropertyNodes(userProps.getProperties(), this);
            }
        }
View Full Code Here


     *
     */
    public PropertiesDescriptor asPropertiesDescriptor() {
        // TODO: Handle illegal names (i.e. empty) and default values
        // (i.e. type incompatibilities)
        MessagePropertiesDescriptor d = new MessagePropertiesDescriptor();
        for (int index = 0, rows = getRowCount(); index < rows; ++index) {
            MessagePropertyTableRow row = getRowObjectAt(index);
            MessageProperty p = row.getProperty();
            d.addProperty(p, row.getDefaultValue());
        }
        return d;
    }
View Full Code Here

        lifeTime[2] = "JMSTimeToLive";
        lifeTime[3] = HeaderProperties.EXPIRATION.getType().getBackendStringDescription();
        lifeTime[4] = Long.toString(jmsMessage.getLifeTime());
        m_updatedDataElements.add(getInterchangeDataRow(lifeTime));

        MessagePropertiesDescriptor userPropertiesDescr = jmsMessage.getUserDefinedProperties();
        if (userPropertiesDescr == null)
            return;

        List<MessageProperty> userProperties = userPropertiesDescr.getProperties();
        for (MessageProperty property : userProperties) {
            String[] row = new String[5];
            row[0] = Integer.toString(jmsEntityId);
            row[1] = guid;
            row[2] = property.getName();
            row[3] = property.getType().getBackendStringDescription();
            row[4] = userPropertiesDescr.getDefaultValue(property);
            m_updatedDataElements.add(getInterchangeDataRow(row));
        }
    }
View Full Code Here

    public final void createJmsProperties() {
        if (isJms() && m_root != null && m_root.hasChildren()) {
            Collection<MessageProperty> systemProperties = getJmsSystemProperties();
            Collection<MessageProperty> standardProperties = getJmsStandardProperties();
            MessagePropertiesDescriptor userProperties = getJmsUserDefinedProperties();
            if (systemProperties == null && standardProperties == null && userProperties == null)
                return;
            Node jms = m_root.findChildFolder(sJMS);
            if (jms == null) {
                jms = create_node(m_root, "JMS Properties", sJMS, true);
                jms.setCromName(sJMS);
            }
            final String io = (m_where == c_TreeMapperTarget) ? "out." : "in.";
            createJmsBranch(jms, "Header", "$jms.header." + io, systemProperties);
            createJmsBranch(jms, "Standard", "$jms.property." + io, standardProperties);
            if (userProperties != null)
                createJmsBranch(jms, "User defined", "$jms.property." + io, userProperties.getProperties());
        }
    }
View Full Code Here

    }

    @Override
    public void applyTo(JmsMessage m) throws IntegrationDataPanelException {
        try {
            MessagePropertiesDescriptor descriptor = new MessagePropertiesDescriptor();
            PropertiesDescriptor tableData = table.getCurrentData();
            for (MessageProperty p : tableData.properties()) {
                String defVal = tableData.getDefaultValue(p);
                descriptor.addProperty(p, defVal);
            }
            m.setUserDefinedProperties(descriptor);
        } catch (IllegalArgumentException ex) {
            throw new IntegrationDataPanelException(ex.getMessage(), ex);
        }
View Full Code Here

     */
    public JmsMessage(JmsMessageId id, String name) {
        super(EntityType.JmsMessage, id, name);
        headerDescriptor = new MessageHeaderDescriptor();
        standardProperties = new StandardPropertiesDescriptor();
        userDefinedProperties = new MessagePropertiesDescriptor();
    }
View Full Code Here

     *
     * @return a <code>MessagePropertiesDescriptor</code> instance representing the user defined
     *         properties that have been defined for this <code>JmsMessage</code>.
     */
    public MessagePropertiesDescriptor getUserDefinedProperties() {
        return new MessagePropertiesDescriptor(userDefinedProperties);
    }
View Full Code Here

     *            properties for this <code>JmsMessage</code>. Passing <code>null</code> to
     *            this method is equivalent of passing an empty descriptor.
     */
    public void setUserDefinedProperties(MessagePropertiesDescriptor props) {
        boolean changed = false;
        MessagePropertiesDescriptor old = userDefinedProperties;
        if (props == null) {
            changed = (userDefinedProperties.size() > 0);
            if (changed) {
                userDefinedProperties = new MessagePropertiesDescriptor();
            }
        } else {
            changed = !props.equals(userDefinedProperties);
            if (changed) {
                userDefinedProperties = new MessagePropertiesDescriptor(props);
            }
        }
        if (changed) {
            firePropertyChange(USER_DEFINED_PROPERTIES, old, props);
        }
View Full Code Here

    @Override
    public JmsMessage clone() {
        JmsMessage clone = (JmsMessage) super.clone();
        clone.headerDescriptor = new MessageHeaderDescriptor(headerDescriptor);
        clone.standardProperties = new StandardPropertiesDescriptor(standardProperties);
        clone.userDefinedProperties = new MessagePropertiesDescriptor(userDefinedProperties);
        if (xmlPayloadStructure != null) {
            clone.xmlPayloadStructure = new XmlStructure(xmlPayloadStructure);
        } else {
            clone.xmlPayloadStructure = null;
        }
View Full Code Here

        PanelTestFrame frame = createFrame();
        frame.publish();
    }
   
    private PropertiesDescriptorTable createTable() {
        MessagePropertiesDescriptor d = createDescriptor();
        //MessageHeaderDescriptor d = new MessageHeaderDescriptor();
        PropertiesDescriptorTable table = new PropertiesDescriptorTable(d);
        table.addUndoListener(new UndoableEditListener() {

            @Override
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.jms.MessagePropertiesDescriptor

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.